/* Youssef Farouk. Structure and motion follow the Strand reference:
   flat warm black, framed column with hairline guides, Cabinet Grotesk headlines,
   Geist body, Geist Mono for data, dark glass panels. */

:root {
  --bg: #110f0d;
  --panel: #171513;
  --panel-2: #1d1b18;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #f4f2ee;
  --muted: #8f8a83;
  --dim: #5c5853;
  --live: #3ddc84;
  --sync: #5ac8fa;
  --warn: #f5a524;
  --display: "Cabinet Grotesk", "Geist", "Helvetica Neue", Arial, sans-serif;
  --sans: "Geist", "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --max: 1320px;
  --pad: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, video, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 13px; letter-spacing: 0; }
.muted { color: var(--muted); }

/* The framed column: content sits between two hairline guides, sections are split by full-width rules */
.frame { max-width: var(--max); margin: 0 auto; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.row { border-bottom: 1px solid var(--line); }

h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.02; }
.h1 { font-size: clamp(44px, 6.4vw, 88px); }
.h2 { font-size: clamp(32px, 4.2vw, 56px); }
.h3 { font-size: clamp(22px, 2vw, 28px); }
.lede { color: var(--muted); font-size: clamp(16px, 1.3vw, 18px); max-width: 60ch; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 42px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--panel-2); font-size: 15px; font-weight: 500; text-decoration: none; cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.btn:hover { background: #26231f; border-color: rgba(255, 255, 255, 0.22); }
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--text); color: #0b0a09; border-color: var(--text); }
.btn.primary:hover { background: #fff; }
.link { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; }
.link .chev { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--line-2); transition: transform 0.2s; }
.link:hover { color: var(--text); }
.link:hover .chev { transform: translateX(3px); }

/* Nav */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(17, 15, 13, 0.72); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); }
.nav-in { position: relative; max-width: var(--max); margin: 0 auto; height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 var(--pad); }
.nav .mark { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -0.01em; }
.nav .mark svg { width: 24px; height: 24px; }
.nav ul { display: flex; gap: 6px; list-style: none; margin: 0 auto 0 32px; padding: 0; }
.nav ul a { display: block; padding: 8px 12px; border-radius: 8px; text-decoration: none; font-size: 14px; font-weight: 500; color: var(--muted); }
.nav ul a:hover, .nav ul a[aria-current="page"] { color: var(--text); }
.nav .btn { min-height: 36px; padding: 0 14px; font-size: 14px; }
.nav .menu { display: none; }
@media (max-width: 860px) {
  .nav ul, .nav .nav-cta { display: none; }
  .nav .menu { display: inline-flex; }
  .nav.open ul { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; margin: 0; padding: 8px var(--pad) 20px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .nav.open ul a { font-size: 20px; padding: 12px 0; color: var(--text); }
}

/* Hero: copy on the left, the logo drawn in moving strands on the right */
.hero { position: relative; overflow: hidden; }
.hero-top { padding: 14px var(--pad); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; min-height: min(78vh, 760px); }
.hero .content { position: relative; z-index: 1; display: grid; justify-items: start; gap: 24px; padding: clamp(48px, 8vw, 96px) var(--pad); }
.hero h1 { max-width: 12ch; }
.hero .lede { max-width: 46ch; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-mark { position: relative; align-self: stretch; min-height: 420px; }
.hero-mark canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; }
.pill { display: inline-flex; align-items: center; gap: 12px; padding: 5px 14px 5px 5px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(23, 21, 19, 0.8); font-size: 14px; color: var(--muted); text-decoration: none; }
.pill b { font-weight: 500; color: var(--text); background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 2px 10px; font-size: 13px; }
.pill:hover { color: var(--text); }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; min-height: 0; }
  .hero .content { padding-bottom: 8px; }
  .hero-mark { min-height: 380px; }
}

/* Three disciplines under the hero */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); }
.steps a { padding: 28px var(--pad); text-decoration: none; border-right: 1px solid var(--line); transition: background 0.2s; }
.steps a:last-child { border-right: 0; }
.steps a:hover { background: rgba(255, 255, 255, 0.02); }
.steps b { font-weight: 600; }
.steps b span { color: var(--dim); margin-right: 4px; font-weight: 500; }
.steps p { color: var(--muted); margin-top: 6px; font-size: 15px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } .steps a { border-right: 0; border-bottom: 1px solid var(--line); } .steps a:last-child { border-bottom: 0; } }

/* Logos */
.logos { padding: 36px 0 40px; }
.logos > p { padding: 0 var(--pad); margin-bottom: 26px; color: var(--muted); font-size: 15px; }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; align-items: center; gap: 64px; width: max-content; list-style: none; margin: 0; padding: 0; animation: marquee 50s linear infinite; }
.client { display: flex; align-items: center; gap: 10px; height: 40px; white-space: nowrap; font-family: var(--display); font-weight: 700; font-size: 22px; color: rgba(244, 242, 238, 0.82); }
.client img { height: 30px; width: auto; opacity: 0.85; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Scroll-lit statement */
.statement { padding: clamp(80px, 10vw, 140px) var(--pad) 40px; }
.statement p { font-family: var(--display); font-weight: 700; font-size: clamp(28px, 3.6vw, 48px); line-height: 1.12; letter-spacing: -0.015em; max-width: 26ch; }
.statement .w { color: rgba(244, 242, 238, 0.2); transition: color 0.3s; }
.statement .w.on { color: var(--text); }

/* Brief demo (the chat box) */
.demo { position: relative; padding: 40px var(--pad) clamp(80px, 10vw, 130px); display: grid; justify-items: center; overflow: hidden; }
.demo canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.chat { position: relative; width: min(560px, 100%); border-radius: 16px; border: 1px solid var(--line-2); background: rgba(23, 21, 19, 0.9); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); overflow: hidden; box-shadow: 0 40px 80px rgba(0, 0, 0, 0.45); }
.chat-ask { padding: 18px 20px; font-size: 16px; min-height: 62px; border-bottom: 1px solid var(--line); }
.chat-ask .caret { display: inline-block; width: 1px; height: 1.1em; background: var(--text); vertical-align: -3px; margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.chat-status { padding: 12px 20px; color: var(--muted); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; }
.chat-results { list-style: none; margin: 0; padding: 6px 0; min-height: 198px; }
.chat-results li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 20px; opacity: 0; transform: translateY(6px); transition: opacity 0.35s var(--ease), transform 0.35s var(--ease); }
.chat-results li.shown { opacity: 1; transform: none; }
.chat-results .name { display: flex; align-items: center; gap: 12px; font-weight: 500; min-width: 0; }
.chat-results .name img { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; flex: none; }
.tag { font-family: var(--mono); font-size: 12px; padding: 3px 8px; border-radius: 6px; border: 1px solid; white-space: nowrap; }
.tag.live { color: var(--live); border-color: rgba(61, 220, 132, 0.35); background: rgba(61, 220, 132, 0.08); }
.tag.sync { color: var(--sync); border-color: rgba(90, 200, 250, 0.35); background: rgba(90, 200, 250, 0.08); }
.tag.warn { color: var(--warn); border-color: rgba(245, 165, 36, 0.35); background: rgba(245, 165, 36, 0.08); }

/* Feature tabs: sticky tab bar, one tall panel per discipline */
.tabs { position: sticky; top: 64px; z-index: 20; display: grid; grid-template-columns: repeat(3, 1fr); background: rgba(17, 15, 13, 0.88); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.tabs button { background: none; border: 0; padding: 16px 8px; font-size: 15px; font-weight: 500; color: var(--muted); cursor: pointer; position: relative; }
.tabs button[aria-selected="true"] { color: var(--text); }
.tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 25%; right: 25%; bottom: -1px; height: 1px; background: var(--text); }
.feature { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - 116px); border-bottom: 1px solid var(--line); scroll-margin-top: 116px; }
.feature:last-child { border-bottom: 0; }
.feature-copy { padding: clamp(48px, 7vw, 100px) var(--pad); display: grid; align-content: end; gap: 18px; border-right: 1px solid var(--line); }
.feature-copy ul { list-style: none; margin: 10px 0 14px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-copy li { font-size: 14px; font-weight: 500; display: grid; gap: 10px; align-content: start; }
.feature-copy li svg { width: 18px; height: 18px; color: var(--muted); }
.feature-visual { position: relative; display: grid; place-items: center; padding: 48px var(--pad); overflow: hidden; min-height: 520px; }
.feature-visual canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.stack { position: relative; width: min(420px, 100%); display: grid; gap: 10px; }
.stack a { display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(23, 21, 19, 0.92); text-decoration: none; transition: transform 0.3s var(--ease), border-color 0.2s; }
.stack a:hover { transform: translateX(-6px); border-color: rgba(255, 255, 255, 0.3); }
.stack img { width: 84px; height: 62px; object-fit: cover; border-radius: 8px; flex: none; background: var(--panel-2); }
.stack .t { display: grid; gap: 2px; min-width: 0; }
.stack .t b { font-weight: 600; }
.stack .t span { color: var(--muted); }
.stack .tag { margin-left: auto; }
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; min-height: 0; }
  .feature-copy { border-right: 0; order: 2; }
  .feature-copy ul { grid-template-columns: 1fr; }
  .feature-visual { min-height: 440px; border-bottom: 1px solid var(--line); }
}

/* Two-column section: copy left, panel right */
.split { display: grid; grid-template-columns: 5fr 7fr; }
.split > :first-child { padding: clamp(48px, 8vw, 110px) var(--pad); display: grid; align-content: end; gap: 18px; border-right: 1px solid var(--line); }
.split > :last-child { padding: clamp(32px, 5vw, 64px) var(--pad); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split > :first-child { border-right: 0; border-bottom: 1px solid var(--line); } }
.panel { border-radius: 16px; border: 1px solid var(--line-2); background: var(--panel); overflow: hidden; }
.panel-head, .panel-foot { padding: 12px 18px; color: var(--muted); display: flex; justify-content: space-between; gap: 16px; }
.panel-head { border-bottom: 1px solid var(--line); }
.panel-foot { border-top: 1px solid var(--line); justify-content: flex-start; gap: 24px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 96px 1fr auto; gap: 16px; align-items: start; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 0; }
.timeline .yr { font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 3px; }
.timeline b { font-weight: 600; display: block; }
.timeline p { color: var(--muted); font-size: 14px; margin-top: 4px; }
@media (max-width: 560px) { .timeline li { grid-template-columns: 1fr; gap: 6px; } .timeline .tag { justify-self: start; } }

/* Testimonial slider */
.quote-slider { display: grid; grid-template-columns: 5fr 7fr; min-height: 560px; }
.qs-left { padding: clamp(48px, 7vw, 96px) var(--pad); border-right: 1px solid var(--line); display: grid; align-content: space-between; gap: 32px; }
.qs-left .big { font-family: var(--display); font-weight: 700; font-size: clamp(64px, 8vw, 112px); line-height: 0.9; letter-spacing: -0.03em; }
.qs-right { position: relative; padding: clamp(48px, 7vw, 96px) var(--pad); display: grid; align-content: end; gap: 28px; overflow: hidden; }
.qs-right .initial { position: absolute; right: 0.02em; top: -0.2em; font-family: var(--display); font-weight: 800; font-size: clamp(240px, 32vw, 460px); line-height: 1; color: rgba(255, 255, 255, 0.04); pointer-events: none; user-select: none; }
.qs-right blockquote { position: relative; margin: 0; font-family: var(--display); font-weight: 500; font-size: clamp(22px, 2.3vw, 32px); line-height: 1.25; letter-spacing: -0.01em; max-width: 32ch; }
.qs-who { position: relative; display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.qs-who b { display: block; font-weight: 600; }
.qs-nav { display: flex; gap: 8px; }
.qs-nav button { width: 38px; height: 38px; min-height: 0; padding: 0; border-radius: 50%; }
.stars { letter-spacing: 3px; }
.fade { transition: opacity 0.3s var(--ease); }
.fade.out { opacity: 0; }
@media (max-width: 860px) { .quote-slider { grid-template-columns: 1fr; min-height: 0; } .qs-left { border-right: 0; border-bottom: 1px solid var(--line); } }

/* Stats */
.stats-head { padding: clamp(64px, 8vw, 110px) var(--pad) 48px; }
.stats-head p { font-family: var(--display); font-weight: 700; font-size: clamp(26px, 3vw, 40px); line-height: 1.15; max-width: 32ch; }
.stats-head p span { color: rgba(244, 242, 238, 0.4); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.stat { padding: 32px var(--pad) 40px; border-right: 1px solid var(--line); display: grid; gap: 8px; }
.stat:last-child { border-right: 0; }
.stat .n { font-family: var(--display); font-weight: 700; font-size: clamp(40px, 4.4vw, 60px); line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 15px; }
@media (max-width: 860px) { .stats { grid-template-columns: 1fr 1fr; } .stat:nth-child(2) { border-right: 0; } .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }

/* Software grid */
.tools { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.tools > div { padding: 28px var(--pad) 32px; border-right: 1px solid var(--line); }
.tools > div:last-child { border-right: 0; }
.tools h3 { font-size: 17px; margin-bottom: 16px; font-family: var(--sans); font-weight: 600; letter-spacing: 0; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { font-size: 13px; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel); }
@media (max-width: 1000px) { .tools { grid-template-columns: 1fr 1fr; } .tools > div:nth-child(2) { border-right: 0; } .tools > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
@media (max-width: 560px) { .tools { grid-template-columns: 1fr; } .tools > div { border-right: 0; border-bottom: 1px solid var(--line); } .tools > div:last-child { border-bottom: 0; } }

/* FAQ */
.faq { display: grid; grid-template-columns: 5fr 7fr; }
.faq > div:first-child { padding: clamp(48px, 7vw, 96px) var(--pad); display: grid; align-content: start; gap: 14px; }
.faq-list { padding: clamp(32px, 6vw, 80px) var(--pad); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; display: flex; justify-content: space-between; gap: 16px; padding: 20px 0; font-weight: 500; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 20px; line-height: 1; transition: transform 0.25s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding: 0 0 22px; max-width: 60ch; }
@media (max-width: 860px) { .faq { grid-template-columns: 1fr; } }

/* Quote + contact */
.quote { display: grid; grid-template-columns: 5fr 7fr; }
.quote-side { padding: clamp(48px, 7vw, 96px) var(--pad); border-right: 1px solid var(--line); display: grid; align-content: space-between; gap: 40px; }
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list a { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.contact-list a span:last-child { color: var(--muted); }
.contact-list a:hover span:last-child { color: var(--text); }
.cv-buttons { display: grid; gap: 8px; }
.form-wrap { padding: clamp(32px, 6vw, 80px) var(--pad); }
.form-card { padding: clamp(20px, 3vw, 32px); display: grid; gap: 22px; }
.switch { display: inline-flex; padding: 4px; gap: 4px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); justify-self: start; }
.switch button { border: 0; background: none; padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--muted); cursor: pointer; }
.switch button[aria-pressed="true"] { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.form { display: grid; gap: 22px; }
.form[hidden] { display: none; }
.form fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; }
.form legend, .form label { font-size: 14px; font-weight: 500; padding: 0; margin-bottom: 2px; }
.pick { display: flex; flex-wrap: wrap; gap: 6px; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick label { margin: 0; padding: 8px 12px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--bg); font-weight: 400; cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s; user-select: none; }
.pick label:hover { border-color: rgba(255, 255, 255, 0.28); }
.pick input:checked + label { background: var(--text); color: #0b0a09; border-color: var(--text); }
.pick input:focus-visible + label { outline: 2px solid var(--text); outline-offset: 2px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { display: grid; gap: 6px; }
.field input, .field textarea { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg); font-size: 15px; transition: border-color 0.2s; }
.field input::placeholder, .field textarea::placeholder { color: var(--dim); }
.field input:focus, .field textarea:focus { outline: none; border-color: rgba(255, 255, 255, 0.4); }
.field textarea { min-height: 96px; resize: vertical; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.form-status { font-size: 14px; color: var(--muted); }
.form-status[data-state="error"] { color: #ff6b6b; }
@media (max-width: 860px) { .quote { grid-template-columns: 1fr; } .quote-side { border-right: 0; border-bottom: 1px solid var(--line); } }
@media (max-width: 560px) { .fields { grid-template-columns: 1fr; } }

/* Final CTA + footer */
.cta { position: relative; overflow: hidden; text-align: center; padding: clamp(80px, 11vw, 150px) var(--pad); display: grid; justify-items: center; gap: 26px; }
.cta canvas { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 70%; pointer-events: none; }
.cta > * { position: relative; }
.footer-cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; padding: 48px var(--pad); }
.footer-cols h4 { margin: 0 0 14px; font-size: 14px; font-weight: 500; color: var(--muted); }
.footer-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 15px; }
.footer-cols a { text-decoration: none; }
.footer-cols a:hover { color: var(--muted); }
.footer-cols .mark { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 20px; margin-bottom: 12px; }
.footer-cols .mark svg { width: 24px; height: 24px; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 20px var(--pad); color: var(--muted); font-size: 14px; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--live); margin-right: 8px; box-shadow: 0 0 0 3px rgba(61, 220, 132, 0.18); }
@media (max-width: 760px) { .footer-cols { grid-template-columns: 1fr 1fr; } .footer-cols > div:first-child { grid-column: span 2; } }

/* Category page */
.page-head { padding: clamp(64px, 9vw, 120px) var(--pad) 40px; display: grid; gap: 20px; }
.cat-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-tabs a { padding: 8px 14px; border-radius: 9px; border: 1px solid var(--line-2); text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 500; }
.cat-tabs a[aria-current="page"] { background: var(--text); color: #0b0a09; border-color: var(--text); }
.grid-work { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.card { padding: 20px var(--pad) 28px; text-decoration: none; display: grid; gap: 16px; border-bottom: 1px solid var(--line); }
.grid-work .card:nth-child(odd) { border-right: 1px solid var(--line); }
.card .media { aspect-ratio: 4 / 3; overflow: hidden; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.card:hover img { transform: scale(1.03); }
.card .meta { display: flex; justify-content: space-between; gap: 16px; }
.card .meta strong { font-family: var(--display); font-size: 22px; font-weight: 700; }
@media (max-width: 760px) { .grid-work { grid-template-columns: 1fr; } .grid-work .card:nth-child(odd) { border-right: 0; } }

/* Project page */
.crumbs { display: flex; gap: 8px; color: var(--muted); font-size: 14px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.project-head { padding: clamp(56px, 8vw, 110px) var(--pad) 40px; display: grid; gap: 22px; }
.project-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.project-meta span { padding: 4px 10px; border-radius: 7px; border: 1px solid var(--line-2); color: var(--muted); }
.project-text { display: grid; gap: 14px; max-width: 70ch; color: var(--muted); font-size: 17px; }
.project-text p:first-child { color: var(--text); }
.project-text.collapsed { max-height: 12em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.more { justify-self: start; }
.project-body { padding: 32px var(--pad) 64px; display: grid; gap: 12px; border-top: 1px solid var(--line); }
.project-video { border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2); background: var(--panel); }
.project-video video { width: 100%; }
.gallery { display: grid; gap: 12px; }
.gallery img { width: 100%; height: auto; border-radius: 12px; background: var(--panel); cursor: zoom-in; }
.next-project { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 32px var(--pad); text-decoration: none; border-top: 1px solid var(--line); }
.next-project img { width: min(280px, 40%); aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; }

.lightbox { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; background: rgba(10, 9, 8, 0.9); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); padding: 24px; }
.lightbox.open { display: grid; }
.lightbox img { max-height: calc(100vh - 48px); width: auto; border-radius: 10px; }
.lightbox button { position: absolute; top: 20px; right: 20px; }

/* Entrances: one load sequence on the hero; sections fade up once as they enter */
@media (prefers-reduced-motion: no-preference) {
  .rise { opacity: 0; transform: translateY(18px); filter: blur(6px); animation: rise 0.9s var(--ease) forwards; }
  .rise.d1 { animation-delay: 0.1s; } .rise.d2 { animation-delay: 0.2s; } .rise.d3 { animation-delay: 0.32s; }
  @keyframes rise { to { opacity: 1; transform: none; filter: none; } }
  .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
  .reveal.shown { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; flex-wrap: wrap; justify-content: center; width: auto; padding: 0 16px; }
  .statement .w { color: var(--text); }
  .chat-results li { opacity: 1; transform: none; }
}
