/* ==========================================================================
   Edward Georgevic — Portfolio
   Design system + components (dark premium)
   ========================================================================== */

:root {
  --bg:        #08090c;
  --bg-2:      #0c0e13;
  --surface:   #12141b;
  --surface-2: #171a23;
  --line:      rgba(255,255,255,.08);
  --line-2:    rgba(255,255,255,.14);
  --text:      #f4f6fb;
  --muted:     #9aa3b2;
  --muted-2:   #6b7484;
  --accent:    #5b8cff;
  --accent-2:  #38e2c8;
  --accent-ink:#0a1020;
  --glow:      rgba(91,140,255,.35);
  --radius:    18px;
  --radius-lg: 26px;
  --maxw:      1180px;
  --ease:      cubic-bezier(.22,.61,.36,1);
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-disp: "Space Grotesk", var(--font-sans);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Ambient background glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60rem 40rem at 12% -8%, rgba(91,140,255,.16), transparent 60%),
    radial-gradient(48rem 40rem at 100% 4%, rgba(56,226,200,.10), transparent 55%),
    var(--bg);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.4'/%3E%3C/svg%3E");
  opacity: .022;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--accent); color: #fff; }

/* Keyboard focus + skip link (a11y) */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 300;
  background: var(--accent); color: #fff; padding: 10px 18px; border-radius: 10px;
  font-family: var(--font-disp); font-weight: 600; font-size: .9rem;
  transition: top .25s var(--ease);
}
.skip-link:focus { top: 16px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Typography ---------- */
h1,h2,h3,h4 { font-family: var(--font-disp); font-weight: 600; line-height: 1.08; letter-spacing: -.02em; }
.eyebrow {
  font-family: var(--font-disp);
  font-size: .78rem; font-weight: 600; letter-spacing: .22em;
  text-transform: uppercase; color: var(--accent);
  display: inline-flex; align-items: center; gap: .6rem;
}
.eyebrow::before { content:""; width: 26px; height: 1px; background: var(--accent); opacity:.7; }

.section { padding: clamp(70px, 11vw, 140px) 0; position: relative; }
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(2rem, 4.6vw, 3.1rem); margin: 18px 0 16px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

.gradient-text {
  background: linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-disp); font-weight: 600; font-size: .98rem;
  padding: 14px 26px; border-radius: 100px; border: 1px solid transparent;
  cursor: pointer; transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease), border-color .3s;
  white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; transition: transform .3s var(--ease); }
.btn-primary {
  background: linear-gradient(100deg, var(--accent), #7aa4ff);
  color: #fff; box-shadow: 0 8px 30px -8px var(--glow);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 40px -10px var(--glow); }
.btn-primary:hover svg { transform: translateX(4px); }
.btn-ghost { background: rgba(255,255,255,.04); border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { background: rgba(255,255,255,.09); transform: translateY(-3px); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .4s var(--ease), border-color .4s, backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(8,9,12,.72); backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { font-family: var(--font-disp); font-weight: 700; font-size: 1.12rem; letter-spacing: -.01em; display:flex; align-items:center; gap:.6rem; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 0 12px var(--glow); }
.brand small { color: var(--muted-2); font-weight: 500; }
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a { font-size: .95rem; color: var(--muted); font-weight: 500; transition: color .25s; position: relative; }
.nav-links a::after { content:""; position:absolute; left:0; bottom:-6px; height:1px; width:0; background: var(--accent); transition: width .3s var(--ease); }
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }
.nav-cta { padding: 10px 20px; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; transition: .3s var(--ease); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; padding-top: 90px; overflow: hidden; }
.hero-grid { position:absolute; inset:0; z-index:-1;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 60px 60px; mask-image: radial-gradient(70% 60% at 50% 30%, #000 0%, transparent 100%);
  opacity: .5;
}
.hero-inner { max-width: 940px; }
.hero .avail {
  display:inline-flex; align-items:center; gap:.6rem; padding: 8px 16px; border-radius:100px;
  background: rgba(56,226,200,.08); border:1px solid rgba(56,226,200,.25); color: var(--accent-2);
  font-size:.82rem; font-weight:600; font-family:var(--font-disp); letter-spacing:.03em; margin-bottom: 30px;
}
.avail .pulse { width:8px; height:8px; border-radius:50%; background: var(--accent-2); box-shadow: 0 0 0 0 rgba(56,226,200,.6); animation: pulse 2s infinite; }
@keyframes pulse { 0%{ box-shadow:0 0 0 0 rgba(56,226,200,.5);} 70%{ box-shadow:0 0 0 10px rgba(56,226,200,0);} 100%{ box-shadow:0 0 0 0 rgba(56,226,200,0);} }
.hero h1 { font-size: clamp(2.7rem, 8vw, 5.6rem); line-height: 1.02; margin-bottom: 26px; }
.hero h1 .line { display:block; overflow: hidden; }
.hero p.lead { font-size: clamp(1.1rem, 2.2vw, 1.4rem); color: var(--muted); max-width: 640px; margin-bottom: 40px; }
.hero p.lead strong { color: var(--text); font-weight: 600; }
.hero-cta { display:flex; gap: 14px; flex-wrap: wrap; margin-bottom: 56px; }
.hero-meta { display:flex; gap: 40px; flex-wrap: wrap; }
.hero-meta .item { }
.hero-meta .k { font-family: var(--font-disp); font-size: 1.9rem; font-weight: 600; }
.hero-meta .l { color: var(--muted-2); font-size: .86rem; }
.scroll-hint { position:absolute; bottom: 30px; left: 50%; transform: translateX(-50%); color: var(--muted-2); font-size:.78rem; letter-spacing:.2em; text-transform:uppercase; display:flex; flex-direction:column; align-items:center; gap:8px; }
.scroll-hint .bar { width:1px; height:40px; background: linear-gradient(var(--accent), transparent); animation: drop 1.8s infinite; }
@keyframes drop { 0%{ transform: scaleY(0); transform-origin: top;} 45%{ transform: scaleY(1); transform-origin: top;} 55%{ transform: scaleY(1); transform-origin: bottom;} 100%{ transform: scaleY(0); transform-origin: bottom;} }

/* ---------- Marquee / logos ---------- */
.strip { border-top:1px solid var(--line); border-bottom:1px solid var(--line); padding: 26px 0; overflow: hidden; }
.strip-track { display:flex; gap: 60px; align-items:center; white-space: nowrap; animation: scroll 28s linear infinite; width: max-content; }
.strip:hover .strip-track { animation-play-state: paused; }
.strip-track span { font-family: var(--font-disp); font-weight: 500; color: var(--muted-2); font-size: 1.05rem; display:flex; align-items:center; gap: 60px; }
.strip-track span::after { content:"✦"; color: var(--accent); opacity:.4; font-size:.7rem; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- Showcase carousel (work-first) ---------- */
.hero-compact { min-height: 0; padding-top: clamp(120px, 14vw, 156px); padding-bottom: clamp(28px, 4vw, 46px); }
.hero-compact h1 { font-size: clamp(2.2rem, 5.2vw, 3.9rem); margin-bottom: 18px; }
.hero-compact p.lead { max-width: 820px; font-size: clamp(1.02rem, 1.55vw, 1.18rem); margin-bottom: 26px; }
.hero-compact .hero-cta { margin-bottom: 0; }

.showcase { padding: 0 0 clamp(60px, 9vw, 120px); }
.sc-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.sc-hint { color: var(--muted-2); font-size: .9rem; margin-top: 10px; }
.sc-controls { display: flex; align-items: center; gap: 10px; }
.sc-count { font-family: var(--font-disp); font-size: .9rem; letter-spacing: .08em; color: var(--muted-2); margin-right: 6px; font-variant-numeric: tabular-nums; }
.sc-count b { color: var(--text); font-weight: 600; }
.sc-btn {
  width: 44px; height: 44px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(255,255,255,.04); border: 1px solid var(--line-2); color: var(--text);
  cursor: pointer; transition: background .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.sc-btn svg { width: 18px; height: 18px; }
.sc-btn:hover { background: rgba(91,140,255,.12); border-color: var(--accent); transform: translateY(-2px); }
.sc-btn[disabled] { opacity: .3; cursor: default; transform: none; background: rgba(255,255,255,.04); border-color: var(--line); }

.sc-viewport {
  display: flex; gap: 24px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none; -ms-overflow-style: none;
  border-radius: var(--radius-lg);
}
.sc-viewport::-webkit-scrollbar { display: none; }
.sc-viewport:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* Slides sit under 100% width so the NEXT card always peeks in from the right —
   the clearest possible signal that this is a deck, not a single case study. */
.sc-slide {
  flex: 0 0 88%; scroll-snap-align: start; display: grid; grid-template-columns: 1.1fr 1fr;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}
/* Off-centre slides recede, so the active one reads as the one in focus */
.sc-slide:not(.is-current) { opacity: .55; }
@media (prefers-reduced-motion: reduce) { .sc-slide { transition: none; } }
.sc-media { position: relative; display: block; overflow: hidden; background: var(--bg-2); min-height: 440px; }
.sc-media picture { display: block; width: 100%; height: 100%; }
.sc-media img { width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: transform .8s var(--ease); }
.sc-slide:hover .sc-media img { transform: scale(1.04); }
.sc-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 45%, rgba(8,9,12,.5)); }

.sc-info { padding: clamp(28px, 4vw, 50px); display: flex; flex-direction: column; justify-content: center; }
.sc-info h2 { font-size: clamp(1.7rem, 3.1vw, 2.4rem); margin-bottom: 14px; }
.sc-info p { color: var(--muted); margin-bottom: 24px; }
.sc-metrics { display: flex; gap: 28px; flex-wrap: wrap; margin-bottom: 28px; }
.sc-metrics .m .n { font-family: var(--font-disp); font-size: 1.35rem; font-weight: 600; color: var(--text); }
.sc-metrics .m .t { font-size: .8rem; color: var(--muted-2); }
.sc-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Named tabs, not anonymous dots — the visitor can see there are three
   projects and what they are, without having to click to find out. */
.sc-tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.sc-dot {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-sans); font-size: .88rem; line-height: 1;
  padding: 10px 18px; border-radius: 100px; cursor: pointer;
  background: rgba(255,255,255,.04); border: 1px solid var(--line); color: var(--muted);
  transition: background .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease), transform .3s var(--ease);
}
.sc-dot .num { font-family: var(--font-disp); font-size: .78rem; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.sc-dot:hover { border-color: var(--line-2); color: var(--text); transform: translateY(-2px); }
.sc-dot.is-active { color: var(--text); border-color: var(--accent); background: rgba(91,140,255,.12); }
.sc-dot.is-active .num { color: var(--accent-2); }
.sc-dot:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Screen-reader-only slide announcer */
.sc-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 900px) {
  .sc-slide { grid-template-columns: 1fr; flex-basis: 90%; }
  .sc-media { min-height: 240px; }
  .sc-viewport { gap: 16px; }
  .sc-head { align-items: center; }
}
@media (max-width: 560px) {
  .sc-metrics { gap: 20px; }
  .hero-compact { padding-top: 104px; }
  .hero-compact .avail { margin-bottom: 20px; }
  .sc-actions .btn { width: 100%; justify-content: center; }
  /* Keep the peek + arrows on mobile: they are the affordance.
     The counter is dropped here — at 390px it collides with the hint,
     and the numbered tabs already communicate position. */
  .sc-slide { flex-basis: 87%; }
  .sc-count { display: none; }
  .sc-head { align-items: center; gap: 12px; }
  .sc-btn { width: 40px; height: 40px; }
  .sc-hint { font-size: .84rem; margin-top: 8px; }
  .sc-tabs { gap: 8px; }
  .sc-dot { font-size: .8rem; padding: 9px 14px; }
}

/* ---------- About ---------- */
.about-grid { display:grid; grid-template-columns: 1.3fr .9fr; gap: 60px; align-items: start; }
.about-lead { font-size: clamp(1.3rem,2.4vw,1.7rem); font-family: var(--font-disp); font-weight: 500; line-height: 1.4; letter-spacing: -.01em; }
.about-lead .gradient-text { font-weight: 600; }
.about-body { color: var(--muted); margin-top: 22px; font-size: 1.04rem; }
.about-body + .about-body { margin-top: 16px; }
.about-side { background: var(--surface); border:1px solid var(--line); border-radius: var(--radius-lg); padding: 30px; }
.about-side h4 { font-size: .8rem; letter-spacing:.18em; text-transform:uppercase; color: var(--muted-2); margin-bottom: 18px; }
.chips { display:flex; flex-wrap: wrap; gap: 9px; }
.chip { font-size:.85rem; padding: 7px 13px; border-radius: 100px; background: rgba(255,255,255,.04); border:1px solid var(--line); color: var(--text); transition: border-color .25s, background .25s, transform .25s; }
.chip:hover { border-color: var(--accent); background: rgba(91,140,255,.08); transform: translateY(-2px); }

/* ---------- Work ---------- */
.work-list { display: flex; flex-direction: column; gap: 26px; }
.work-card {
  position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 0;
  background: var(--surface); border:1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; transition: border-color .4s var(--ease), transform .4s var(--ease), box-shadow .4s var(--ease);
}
.work-card:hover { border-color: var(--line-2); transform: translateY(-4px); box-shadow: 0 30px 60px -30px rgba(0,0,0,.8); }
.work-card:nth-child(even) { grid-template-columns: 1fr 1.05fr; }
.work-card:nth-child(even) .wc-media { order: 2; }
.wc-media { position: relative; overflow: hidden; background: var(--bg-2); min-height: 340px; }
.wc-media picture { display: block; width: 100%; height: 100%; }
.wc-media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .8s var(--ease); }
.work-card:hover .wc-media img { transform: scale(1.04); }
.wc-media::after { content:""; position:absolute; inset:0; background: linear-gradient(120deg, transparent 40%, rgba(8,9,12,.5)); }
.wc-body { padding: clamp(28px, 4vw, 46px); display:flex; flex-direction: column; justify-content: center; }
.wc-tag { display:inline-flex; align-items:center; gap:.5rem; font-size:.76rem; font-weight:600; letter-spacing:.14em; text-transform:uppercase; color: var(--accent-2); margin-bottom: 16px; }
.wc-body h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 14px; }
.wc-body p { color: var(--muted); margin-bottom: 22px; }
.wc-metrics { display:flex; gap: 26px; margin-bottom: 26px; flex-wrap: wrap; }
.wc-metrics .m .n { font-family: var(--font-disp); font-size: 1.35rem; font-weight: 600; color: var(--text); }
.wc-metrics .m .t { font-size: .8rem; color: var(--muted-2); }
.wc-tags { display:flex; flex-wrap:wrap; gap: 8px; margin-bottom: 26px; }
.wc-tags .chip { font-size:.78rem; padding: 5px 11px; }
.wc-link { display:inline-flex; align-items:center; gap:.5rem; font-family: var(--font-disp); font-weight:600; color: var(--text); font-size:.98rem; align-self: flex-start; }
.wc-link svg { width:16px; height:16px; transition: transform .3s var(--ease); }
.work-card:hover .wc-link svg { transform: translateX(5px); }
.wc-link { position: relative; }
.stretch { position:absolute; inset:0; z-index: 2; }

/* ---------- Services ---------- */
.svc-grid { display:grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.svc {
  background: var(--surface); border:1px solid var(--line); border-radius: var(--radius); padding: 32px;
  transition: border-color .35s, transform .35s var(--ease), background .35s;
}
.svc:hover { border-color: var(--line-2); transform: translateY(-5px); background: var(--surface-2); }
.svc .ic { width: 48px; height: 48px; border-radius: 13px; display:grid; place-items:center;
  background: linear-gradient(135deg, rgba(91,140,255,.18), rgba(56,226,200,.12));
  border:1px solid var(--line-2); margin-bottom: 22px; }
.svc .ic svg { width: 24px; height: 24px; stroke: var(--accent); }
.svc h3 { font-size: 1.2rem; margin-bottom: 10px; }
.svc p { color: var(--muted); font-size: .96rem; }
.svc ul { list-style:none; margin-top: 16px; display:flex; flex-direction:column; gap: 8px; }
.svc ul li { color: var(--muted); font-size: .9rem; display:flex; gap: 9px; align-items:flex-start; }
.svc ul li::before { content:"→"; color: var(--accent); font-weight: 700; }

/* ---------- Timeline ---------- */
.tl { display:grid; grid-template-columns: 1fr; gap: 0; position: relative; }
.tl-item { display:grid; grid-template-columns: 200px 1fr; gap: 40px; padding: 30px 0; border-top:1px solid var(--line); transition: background .3s; }
.tl-item:hover { background: linear-gradient(90deg, rgba(91,140,255,.04), transparent 40%); }
.tl-item:last-child { border-bottom: 1px solid var(--line); }
.tl-when { color: var(--muted-2); font-family: var(--font-disp); font-size: .92rem; padding-top: 4px; }
.tl-when .role { display:block; color: var(--accent); font-weight: 600; margin-top: 4px; font-size:.86rem; }
.tl-what h3 { font-size: 1.3rem; margin-bottom: 6px; }
.tl-what .org { color: var(--muted); font-weight: 500; margin-bottom: 12px; }
.tl-what ul { list-style:none; display:flex; flex-direction:column; gap:7px; }
.tl-what ul li { color: var(--muted); font-size: .95rem; padding-left: 20px; position: relative; }
.tl-what ul li::before { content:""; position:absolute; left:0; top:.6em; width:7px; height:7px; border-radius:50%; border:1.5px solid var(--accent); }

/* ---------- Contact ---------- */
.contact { text-align: center; }
.contact-card {
  position: relative; background: linear-gradient(150deg, var(--surface-2), var(--surface));
  border:1px solid var(--line-2); border-radius: var(--radius-lg); padding: clamp(46px, 7vw, 90px) 30px; overflow: hidden;
}
.contact-card::before { content:""; position:absolute; inset:0; z-index:0;
  background: radial-gradient(40rem 26rem at 50% -30%, var(--glow), transparent 60%); opacity:.5; }
.contact-card > * { position: relative; z-index: 1; }
.contact-card h2 { font-size: clamp(2.1rem, 5vw, 3.6rem); margin-bottom: 18px; }
.contact-card p { color: var(--muted); font-size: 1.1rem; max-width: 520px; margin: 0 auto 36px; }
.contact-cta { display:flex; gap: 14px; justify-content:center; flex-wrap: wrap; }
.contact-links { display:flex; gap: 28px; justify-content:center; flex-wrap:wrap; margin-top: 40px; color: var(--muted); font-size:.95rem; }
.contact-links a { display:inline-flex; align-items:center; gap:.5rem; transition: color .25s; }
.contact-links a:hover { color: var(--text); }
.contact-links svg { width:16px; height:16px; }

/* Contact form */
.contact-form { max-width: 560px; margin: 8px auto 0; text-align: left; display: flex; flex-direction: column; gap: 18px; }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cf-field { display: flex; flex-direction: column; gap: 8px; }
.cf-field label { font-size: .82rem; font-weight: 600; letter-spacing: .03em; color: var(--muted); }
.contact-form input, .contact-form textarea {
  width: 100%; font-family: var(--font-sans); font-size: 1rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px;
  padding: 13px 15px; transition: border-color .25s, box-shadow .25s, background .25s;
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: var(--muted-2); }
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--accent); background: var(--surface-2);
  box-shadow: 0 0 0 3px rgba(91,140,255,.18);
}
.contact-form textarea { resize: vertical; min-height: 120px; }
.cf-submit { align-self: flex-start; justify-content: center; margin-top: 2px; }
.cf-submit:disabled { opacity: .6; cursor: default; transform: none; }
.cf-status { font-size: .92rem; color: var(--muted); min-height: 1.2em; margin: 0; }
.cf-status.ok { color: var(--accent-2); }
.cf-status.err { color: #ff7a7a; }
.contact-form .hp { position: absolute; left: -9999px; opacity: 0; width: 0; height: 0; }
@media (max-width: 560px) { .cf-row { grid-template-columns: 1fr; } .cf-submit { align-self: stretch; } }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 40px 0; }
.footer-inner { display:flex; justify-content: space-between; align-items:center; flex-wrap: wrap; gap: 16px; color: var(--muted-2); font-size:.9rem; }
.footer-inner a:hover { color: var(--text); }
.to-top { display:inline-flex; align-items:center; gap:.5rem; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity:1; transform:none; transition:none; } .strip-track { animation:none; } }

/* ==========================================================================
   Case study pages
   ========================================================================== */
.cs-hero { padding: 150px 0 60px; position: relative; }
.back-link { display:inline-flex; align-items:center; gap:.5rem; color: var(--muted); font-size:.92rem; margin-bottom: 34px; transition: color .25s, gap .25s; }
.back-link:hover { color: var(--text); gap:.8rem; }
.back-link svg { width:16px; height:16px; }
.cs-hero .tag { color: var(--accent-2); }
.cs-hero h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); margin: 16px 0 20px; max-width: 900px; }
.cs-hero .sub { font-size: clamp(1.1rem,2vw,1.35rem); color: var(--muted); max-width: 720px; }
.cs-facts { display:flex; flex-wrap:wrap; gap: 44px; margin-top: 44px; padding-top: 34px; border-top: 1px solid var(--line); }
.cs-facts .f .l { font-size:.78rem; text-transform:uppercase; letter-spacing:.14em; color: var(--muted-2); margin-bottom: 6px; }
.cs-facts .f .v { font-family: var(--font-disp); font-weight:600; font-size: 1.05rem; }
.cs-facts .f .v a { color: var(--accent); }

.cs-figure { border-radius: var(--radius-lg); overflow: hidden; border:1px solid var(--line); margin: 0 0 8px; background: var(--bg-2); }
.cs-figure picture { display: block; }
.cs-figure img { width: 100%; display: block; cursor: zoom-in; transition: transform .5s var(--ease); }
.cs-figure:hover img { transform: scale(1.015); }
figcaption { color: var(--muted-2); font-size:.86rem; padding: 12px 4px 0; }

.cs-cols { display:grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.cs-block h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 18px; }
.cs-block p { color: var(--muted); font-size: 1.06rem; margin-bottom: 16px; }
.cs-block p strong, .cs-block li strong { color: var(--text); font-weight: 600; }
.cs-block code, figcaption code, .cs-list code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: .88em; background: rgba(91,140,255,.12); color: #cdd9ff;
  padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line);
}
.cs-list { list-style:none; display:flex; flex-direction:column; gap: 14px; margin: 8px 0; }
.cs-list li { color: var(--muted); padding-left: 30px; position: relative; font-size: 1.02rem; }
.cs-list li::before { content:"✓"; position:absolute; left:0; top:0; color: var(--accent-2); font-weight:700; }

.cs-gallery { display:grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.cs-gallery .cs-figure { margin: 0; }
.cs-gallery .span-2 { grid-column: 1 / -1; }

.cs-quote { border-left: 3px solid var(--accent); padding: 8px 0 8px 28px; margin: 10px 0; }
.cs-quote p { font-family: var(--font-disp); font-size: clamp(1.2rem,2.4vw,1.6rem); color: var(--text); font-weight: 500; line-height: 1.4; }
.cs-quote cite { color: var(--muted-2); font-style: normal; font-size:.95rem; display:block; margin-top: 12px; }

.cs-next { border-top:1px solid var(--line); }
.cs-next a { display:flex; justify-content: space-between; align-items:center; gap: 20px; padding: 40px 0; transition: padding .3s var(--ease); flex-wrap: wrap; }
.cs-next a:hover { padding-left: 10px; }
.cs-next .lbl { color: var(--muted-2); font-size:.8rem; text-transform:uppercase; letter-spacing:.16em; }
.cs-next h3 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
.cs-next .arw { width: 54px; height:54px; border-radius:50%; border:1px solid var(--line-2); display:grid; place-items:center; transition: background .3s, transform .3s; }
.cs-next a:hover .arw { background: var(--accent); transform: translateX(6px); }
.cs-next .arw svg { width:22px; height:22px; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset:0; z-index: 200; background: rgba(4,5,7,.92); backdrop-filter: blur(8px); display:none; align-items:center; justify-content:center; padding: 30px; cursor: zoom-out; opacity:0; transition: opacity .3s; }
.lightbox.open { display:flex; opacity:1; }
.lightbox img { max-width: 94vw; max-height: 90vh; border-radius: 12px; box-shadow: 0 40px 100px rgba(0,0,0,.6); }
.lightbox .close { position:absolute; top: 24px; right: 30px; color:#fff; font-size: 2rem; background:none; border:0; cursor:pointer; line-height:1; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-links { position: fixed; inset: 0 0 0 auto; width: min(78vw, 320px); flex-direction: column; align-items: flex-start; justify-content: center; gap: 26px; padding: 40px; background: var(--bg-2); border-left:1px solid var(--line); transform: translateX(100%); transition: transform .4s var(--ease); }
  .nav-links.open { transform: none; }
  .nav-links a { font-size: 1.2rem; }
  .nav-toggle { display: block; z-index: 101; }
  .nav-toggle.open span:nth-child(1){ transform: translateY(7px) rotate(45deg);}
  .nav-toggle.open span:nth-child(2){ opacity:0;}
  .nav-toggle.open span:nth-child(3){ transform: translateY(-7px) rotate(-45deg);}
  .about-grid { grid-template-columns: 1fr; gap: 34px; }
  .work-card, .work-card:nth-child(even) { grid-template-columns: 1fr; }
  .work-card:nth-child(even) .wc-media { order: 0; }
  .wc-media { min-height: 240px; }
  .svc-grid { grid-template-columns: 1fr; }
  .cs-cols { grid-template-columns: 1fr; gap: 34px; }
  .tl-item { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 560px) {
  .hero-meta { gap: 26px; }
  .cs-gallery { grid-template-columns: 1fr; }
  .hero-cta .btn, .contact-cta .btn { width: 100%; justify-content: center; }
}

/* ---- 404 page ---- */
.nf { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 40px 24px; }
  .nf .code { font-family: var(--font-disp); font-weight: 700; font-size: clamp(5rem, 20vw, 12rem); line-height: 1; }
  .nf h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 8px 0 14px; }
  .nf p { color: var(--muted); max-width: 440px; margin: 0 auto 32px; }
