/* ============================================================
   Idea Factory — shared sub-page styles
   Used by: projects.html, awards.html, blog.html
   ============================================================ */

:root{
  --ink: #0a0a0c;
  --ink-2: #131316;
  --ink-3: #1c1c20;
  --line: #f3ede0;
  --line-soft: rgba(243,237,224,0.55);
  --line-fainter: rgba(243,237,224,0.35);
  --rule: rgba(243,237,224,0.14);
  --rule-2: rgba(243,237,224,0.08);
  --warm: #f0a14a;
  --warm-deep: #d68a35;
  --teal: #6fb6a1;
}

*{ box-sizing: border-box; }
html, body{
  margin: 0; padding: 0;
  background: var(--ink); color: var(--line);
}
body{
  font-family: "Space Grotesk", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}
/* faint film grain */
body::before{
  content:""; position: fixed; inset: 0;
  background-image: radial-gradient(rgba(243,237,224,0.04) 1px, transparent 1.2px);
  background-size: 3px 3px;
  pointer-events: none; z-index: 90;
  opacity: 0.5; mix-blend-mode: screen;
}

/* type helpers */
.serif{ font-family: "Instrument Serif", serif; font-weight: 400; }
.mono{
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--line-soft);
}
.eyebrow{
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--warm);
}
.serif em, em.warm{ font-style: italic; color: var(--warm); }
a{ color: inherit; }

/* corners (the same crosshair frame as Spark page) */
.corner{
  position: fixed;
  width: 18px; height: 18px;
  border-color: rgba(243,237,224,0.35);
  z-index: 55; pointer-events: none;
}
.corner.tl{ top: 18px; left: 18px; border-top: 1px solid; border-left: 1px solid; }
.corner.tr{ top: 18px; right: 18px; border-top: 1px solid; border-right: 1px solid; }
.corner.bl{ bottom: 18px; left: 18px; border-bottom: 1px solid; border-left: 1px solid; }
.corner.br{ bottom: 18px; right: 18px; border-bottom: 1px solid; border-right: 1px solid; }

/* ============================================================
   Top nav
   ============================================================ */
nav.top{
  position: fixed; top:0; left:0; right:0; z-index: 60;
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 32px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--line);
  background: linear-gradient(to bottom, rgba(10,10,12,0.88), rgba(10,10,12,0.6) 70%, rgba(10,10,12,0));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
nav.top a{ color: inherit; text-decoration: none; }
nav.top .logo{ display: inline-flex; align-items: baseline; gap: 0; }
nav.top .logo .mark{
  font-family: "Instrument Serif", serif;
  font-size: 24px; line-height: 1;
  text-transform: none; letter-spacing: -0.01em;
}
nav.top .logo .mark .bang{ color: var(--warm); font-style: italic; padding-right: 2px; }
nav.top .links{
  display: flex; gap: 28px; align-items: center;
}
nav.top .links a{ position: relative; transition: color .2s ease; }
nav.top .links a:hover{ color: var(--warm); }
nav.top .links a.active{ color: var(--warm); }
nav.top .links a.active::before{
  content:"·";
  margin-right: 8px; color: var(--warm);
}
nav.top .cta{
  border: 1px solid rgba(243,237,224,0.3);
  padding: 8px 14px; border-radius: 100px;
  transition: background .2s, color .2s, border-color .2s;
}
nav.top .cta:hover{ background: var(--warm); color: var(--ink); border-color: var(--warm); }

/* ============================================================
   Page header
   ============================================================ */
.page-header{
  padding: 150px 48px 80px;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: end;
  max-width: 1600px;
  margin: 0 auto;
}
.page-header .breadcrumbs{
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--line-soft);
  margin-bottom: 18px;
}
.page-header .breadcrumbs a{ color: var(--line-soft); text-decoration: none; transition: color .2s; }
.page-header .breadcrumbs a:hover{ color: var(--warm); }
.page-header .breadcrumbs .sep{ margin: 0 10px; opacity: 0.5; }
.page-header h1{
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: clamp(64px, 9.5vw, 168px);
  line-height: 0.9;
  letter-spacing: -0.025em;
  margin: 18px 0 0;
}
.page-header h1 em{ font-style: italic; color: var(--warm); }
.page-header .lede{
  font-size: 17px;
  line-height: 1.55;
  color: rgba(243,237,224,0.78);
  max-width: 480px;
  margin: 0;
}
.page-header .lede strong{ color: var(--line); font-weight: 500; }
.page-header .meta-row{
  margin-top: 28px;
  display: flex; gap: 24px; flex-wrap: wrap;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; letter-spacing: 0.14em;
  color: var(--line-soft);
  text-transform: uppercase;
}
.page-header .meta-row .item{
  display: flex; flex-direction: column; gap: 4px;
}
.page-header .meta-row .item .v{ color: var(--line); }

/* ============================================================
   Section title rule
   ============================================================ */
.section-title{
  max-width: 1600px;
  margin: 100px auto 40px;
  padding: 0 48px;
  display: flex; justify-content: space-between; align-items: end;
  gap: 40px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 18px;
}
.section-title h2{
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: clamp(36px, 4.8vw, 64px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0;
}
.section-title h2 em{ color: var(--warm); font-style: italic; }
.section-title .count{
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--line-soft);
}

/* ============================================================
   Cross-links footer (the same 3 pages, linking around)
   ============================================================ */
.cross-links{
  margin-top: 120px;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}
.cross-links .page-link{
  position: relative;
  padding: 56px 36px;
  color: var(--line);
  text-decoration: none;
  display: grid;
  gap: 14px;
  min-height: 240px;
  transition: background .35s ease;
  overflow: hidden;
}
.cross-links .page-link + .page-link{ border-left: 1px solid var(--rule); }
.cross-links .page-num{
  font-family: "JetBrains Mono", monospace;
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--line-soft);
}
.cross-links .page-title{
  font-family: "Instrument Serif", serif;
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1; letter-spacing: -0.02em;
  align-self: end;
}
.cross-links .page-title em{ color: var(--warm); font-style: italic; }
.cross-links .page-meta{
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--line-soft);
}
.cross-links .page-arr{
  font-family: "Instrument Serif", serif;
  font-size: 22px;
  width: 44px; height: 44px;
  border: 1px solid rgba(243,237,224,0.4);
  border-radius: 100%;
  display: inline-flex; align-items: center; justify-content: center;
  justify-self: start;
  transition: transform .3s, background .3s, color .3s, border-color .3s;
}
.cross-links .page-link[aria-current]{ background: rgba(243,237,224,0.03); pointer-events: none; opacity: 0.55; }
.cross-links .page-link:hover{ background: rgba(243,237,224,0.04); }
.cross-links .page-link:hover .page-arr{
  background: var(--warm); border-color: var(--warm); color: var(--ink);
  transform: translateX(6px);
}

/* ============================================================
   Page foot
   ============================================================ */
.page-foot{
  padding: 32px 48px 28px;
  border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between; align-items: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px; letter-spacing: 0.18em;
  color: rgba(243,237,224,0.45);
  text-transform: uppercase;
}
.page-foot a{ color: inherit; text-decoration: none; transition: color .2s; }
.page-foot a:hover{ color: var(--warm); }
.page-foot .right{ display: flex; gap: 28px; }

/* ============================================================
   Card-visual library (reused across pages)
   ============================================================ */
.cv{
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--ink-2);
}
.cv-stripes{
  background:
    repeating-linear-gradient(45deg, var(--warm) 0 14px, transparent 14px 28px),
    var(--ink-2);
}
.cv-rings{
  background: var(--ink-2);
}
.cv-rings::before, .cv-rings::after{
  content:""; position: absolute; border-radius: 100%;
  border: 1.5px solid var(--line);
}
.cv-rings::before{ inset: 18%; }
.cv-rings::after{ inset: 32%; }
.cv-rings .dot{
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 16px; height: 16px; border-radius: 100%;
  background: var(--warm);
}
.cv-grid{
  background:
    linear-gradient(rgba(243,237,224,0.18) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgba(243,237,224,0.18) 1px, transparent 1px) 0 0 / 22px 22px,
    var(--ink);
}
.cv-grid::after{
  content:""; position: absolute;
  left: 32%; top: 28%;
  width: 80px; height: 80px;
  background: var(--warm);
  transform: rotate(45deg);
}
.cv-wave{
  background: var(--line);
  position: relative;
  overflow: hidden;
}
.cv-wave::before{
  content:""; position: absolute;
  left: -10%; right: -10%;
  top: 40%; bottom: -20%;
  background: var(--warm);
  border-radius: 50% 50% 0 0 / 70% 70% 0 0;
}
.cv-wave::after{
  content:""; position: absolute;
  left: -10%; right: -10%;
  top: 65%; bottom: -30%;
  background: var(--ink);
  border-radius: 50% 50% 0 0 / 70% 70% 0 0;
}
.cv-blocks{
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 3px;
  padding: 3px;
  background: var(--line);
}
.cv-blocks > b{ display: block; }
.cv-blocks > b:nth-child(1){ background: var(--warm); }
.cv-blocks > b:nth-child(2){ background: var(--ink); }
.cv-blocks > b:nth-child(3){ background: var(--teal); }
.cv-blocks > b:nth-child(4){ background: var(--warm-deep); }
.cv-arc{
  background: var(--ink-3);
  position: relative;
  overflow: hidden;
}
.cv-arc::before{
  content:""; position: absolute;
  left: 50%; bottom: -55%;
  width: 220%; height: 220%;
  transform: translateX(-50%);
  border-radius: 100%;
  background: var(--line);
}
.cv-arc::after{
  content:""; position: absolute;
  left: 50%; top: 18%;
  width: 14px; height: 14px;
  border-radius: 100%;
  background: var(--warm);
  transform: translateX(-50%);
}
.cv-bulb{
  background: var(--ink);
  display: grid; place-items: center;
}
.cv-bulb svg{ width: 50%; height: 50%; color: var(--line); }

/* tag pill */
.tag{
  display: inline-flex; align-items: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--line);
  padding: 4px 10px;
  border: 1px solid var(--rule);
  border-radius: 100px;
}
.tag.warm{ color: var(--warm); border-color: rgba(240,161,74,0.45); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px){
  nav.top{ padding: 16px 18px; }
  nav.top .links{ gap: 14px; font-size: 10px; }
  nav.top .links a:not(.active):not(.cta){ display: none; }
  .page-header{ padding: 120px 22px 56px; grid-template-columns: 1fr; gap: 28px; }
  .section-title{ padding: 0 22px; margin: 70px auto 28px; flex-direction: column; align-items: flex-start; gap: 12px; }
  .cross-links{ grid-template-columns: 1fr; }
  .cross-links .page-link{ border-left: none !important; border-top: 1px solid var(--rule); padding: 36px 22px; min-height: 180px; }
  .page-foot{ padding: 28px 22px; flex-direction: column; gap: 12px; align-items: flex-start; }
  .page-foot .right{ flex-direction: column; gap: 8px; }
  .corner{ display: none; }
}
