/* ============================================================
   DAN CALIN — "SIGNAL"
   An agent control-room: warm-black, molten amber, kinetic.
   Type: Clash Display (heavy display) + JetBrains Mono (system)
   ============================================================ */

@import url('https://api.fontshare.com/v2/css?f[]=clash-display@400,500,600,700&display=swap');

:root {
  /* Surfaces — warm near-black */
  --bg:        #0a0806;
  --bg-1:      #0f0b08;
  --bg-2:      #15100a;
  --surface:   #1a140d;
  --line:      rgba(255, 200, 130, 0.10);
  --line-2:    rgba(255, 200, 130, 0.20);

  /* Ink — warm whites */
  --ink:       #f7efe2;
  --ink-2:     #b6a892;
  --ink-3:     #786c58;
  --ink-4:     #4a4135;

  /* Amber — the signal */
  --amber:     #ff9d2e;
  --amber-hi:  #ffc266;
  --amber-deep:#c26a0c;
  --glow:      rgba(255, 157, 46, 0.22);
  --glow-soft: rgba(255, 157, 46, 0.10);

  /* live status */
  --live:      #54e08a;

  --display: "Clash Display", system-ui, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.76, 0, 0.24, 1);

  --maxw: 1280px;
  --gutter: clamp(20px, 5vw, 88px);
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 16px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--amber); color: #1c1304; }
a { color: inherit; text-decoration: none; }
img, canvas { display: block; }

/* ============================================================
   Global atmosphere — grid + grain + glow blooms
   ============================================================ */
.bg-layers { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.bg-grid {
  position: absolute; inset: -2px;
  background-image:
    linear-gradient(to right, rgba(255,200,130,0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,200,130,0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(130% 100% at 50% 0%, #000 30%, transparent 78%);
          mask-image: radial-gradient(130% 100% at 50% 0%, #000 30%, transparent 78%);
}
.bg-bloom {
  position: absolute; width: 60vw; height: 60vw; border-radius: 50%;
  background: radial-gradient(circle, var(--glow-soft), transparent 65%);
  filter: blur(30px);
}
.bg-bloom.b1 { top: -20vw; right: -10vw; }
.bg-bloom.b2 { bottom: 0; left: -20vw; opacity: 0.6; }
.bg-grain {
  position: absolute; inset: 0; opacity: 0.05; mix-blend-mode: screen;
  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='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.bg-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 50% 35%, transparent 50%, rgba(0,0,0,0.6) 100%);
}

/* ============================================================
   Shared atoms
   ============================================================ */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); position: relative; z-index: 2; }
main { position: relative; z-index: 2; }

.mono-label {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--amber);
  display: inline-flex; align-items: center; gap: 10px;
}
.mono-label .tick { width: 26px; height: 1px; background: var(--amber-deep); }

.section { padding-block: clamp(96px, 14vw, 200px); position: relative; }
.kicker {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-3);
}
.kicker b { color: var(--amber); font-weight: 500; }

h2.head {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(34px, 6.5vw, 82px); line-height: 0.98; letter-spacing: -0.02em;
  margin-top: 22px; text-wrap: balance;
}
.lead { color: var(--ink-2); max-width: 54ch; margin-top: 24px; font-size: clamp(15px, 1.7vw, 18px); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em; font-weight: 500;
  padding: 15px 26px; border: 1px solid var(--line-2); color: var(--ink);
  position: relative; overflow: hidden; transition: color 0.55s var(--ease), border-color 0.55s, transform 0.5s var(--ease);
  background: transparent;
}
.btn .ar { transition: transform 0.5s var(--ease); }
.btn::before {
  content: ""; position: absolute; inset: 0; background: var(--amber);
  transform: translateY(101%); transition: transform 0.62s var(--ease-io); z-index: -1;
}
.btn:hover { color: #1c1304; border-color: var(--amber); }
.btn:hover::before { transform: translateY(0); }
.btn:hover .ar { transform: translate(3px, -3px); }
.btn.solid { background: var(--amber); color: #1c1304; border-color: var(--amber); }
.btn.solid::before { background: var(--amber-hi); }
.btn.solid:hover { color: #1c1304; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px var(--gutter);
  transition: background 0.5s var(--ease), border-color 0.5s, padding 0.5s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(10,8,6,0.7); backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3); border-bottom-color: var(--line);
  padding-block: 12px;
}
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em; }
.brand .mk {
  width: 30px; height: 30px; display: grid; place-items: center;
  border: 1px solid var(--amber); color: var(--amber);
  font-family: var(--display); font-weight: 600; font-size: 14px; position: relative;
}
.brand .mk::after { content:""; position:absolute; inset:0; box-shadow: inset 0 0 14px var(--glow); opacity:0; animation: mkpulse 3s var(--ease-io) infinite; }
@keyframes mkpulse { 50% { opacity: 1; } }
.brand b { font-weight: 500; }
.nav-links { display: flex; gap: 32px; }
.nav-links a {
  font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); letter-spacing: 0.03em;
  position: relative; transition: color 0.3s;
}
.nav-links a span { color: var(--amber); }
.nav-links a::after { content:""; position:absolute; left:0; bottom:-5px; height:1px; width:0; background: var(--amber); transition: width 0.4s var(--ease); }
.nav-links a:hover, .nav-links a.active { color: var(--ink); } .nav-links a:hover::after, .nav-links a.active::after { width:100%; }
.nav-cta {
  font-family: var(--mono); font-size: 12px; color: var(--ink); letter-spacing: 0.03em;
  display: inline-flex; align-items: center; gap: 9px; padding: 9px 15px; border: 1px solid var(--line-2);
}
.nav-cta .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 rgba(84,224,138,0.5); animation: live 2.4s ease-out infinite; }
@keyframes live { 0%{box-shadow:0 0 0 0 rgba(84,224,138,0.5);} 70%{box-shadow:0 0 0 8px rgba(84,224,138,0);} 100%{box-shadow:0 0 0 0 rgba(84,224,138,0);} }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
#wave { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.hero-veil {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, rgba(10,8,6,0.55) 0%, transparent 24%, transparent 92%, transparent 100%);
}
.hero-inner { position: relative; z-index: 3; width: 100%; padding-top: 80px; }

.hero-eye { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; margin-bottom: 30px; }
.hero-eye .ln2 { font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em; color: var(--ink-3); }
.hero-eye .ln2 b { color: var(--ink-2); font-weight: 400; }

.hero h1 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(46px, 10vw, 158px); line-height: 0.9; letter-spacing: -0.03em;
}
.hero h1 .verb { color: var(--amber); display: inline-block; transition: text-shadow 0.4s, color 0.4s; }
.hero h1 .ln { display: block; }
.hero h1 .am { color: var(--amber); }
.hero h1 .ln.am { text-shadow: 0 0 38px var(--glow-soft); animation: amberbreath 4s var(--ease-io) infinite; }
@keyframes amberbreath { 50% { text-shadow: 0 0 50px var(--glow); } }
@media (prefers-reduced-motion: reduce) { .hero h1 .ln.am { animation: none; } }
.hero h1 .verb.lit { text-shadow: 0 0 40px var(--glow); }
.scramble { white-space: pre-wrap; }

.hero .sub {
  margin-top: 36px; max-width: 60ch; color: var(--ink-2);
  font-size: clamp(15px, 1.8vw, 18.5px); line-height: 1.7;
}
.hero .sub b { color: var(--ink); font-weight: 500; }
.hero .sub .am { color: var(--amber-hi); }

.hero-cta { margin-top: 40px; display: flex; gap: 14px; flex-wrap: wrap; }

/* live caption — agent streaming a single line */
.hero-caption {
  margin-top: 38px; font-family: var(--mono); font-size: 13px; color: var(--ink-3);
  display: flex; align-items: center; gap: 12px; min-height: 22px;
}
.hero-caption .pip { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 10px var(--amber); flex-shrink: 0; animation: caretblink 1.2s steps(1) infinite; }
.hero-caption .txt { color: var(--ink-2); }
.hero-caption .txt em { color: var(--amber); font-style: normal; }
@keyframes caretblink { 50% { opacity: 0.25; } }

/* marquee band at hero bottom */
.marquee {
  position: relative; z-index: 3; border-block: 1px solid var(--line);
  background: rgba(15,11,8,0.5); overflow: hidden; padding: 16px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: flex; gap: 0; width: max-content; animation: scrollx 32s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  font-family: var(--display); font-weight: 500; font-size: clamp(20px, 2.6vw, 34px);
  letter-spacing: -0.01em; padding: 0 32px; color: var(--ink); white-space: nowrap; display: inline-flex; align-items: center; gap: 32px;
}
.marquee-track span::after { content: "◆"; color: var(--amber); font-size: 0.5em; }
.marquee-track span.ghost { color: transparent; -webkit-text-stroke: 1px var(--ink-4); }
@keyframes scrollx { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

.scroll-cue {
  position: absolute; bottom: 92px; right: var(--gutter); z-index: 3;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.2em; color: var(--ink-3);
  text-transform: uppercase; display: flex; align-items: center; gap: 12px;
}
.scroll-cue .ln { width: 44px; height: 1px; background: var(--ink-4); position: relative; overflow: hidden; }
.scroll-cue .ln::after { content:""; position:absolute; inset:0; left:-100%; width:100%; background: var(--amber); animation: cue 2s var(--ease-io) infinite; }
@keyframes cue { to { left: 100%; } }

@media (prefers-reduced-motion: reduce) { .scroll-cue .ln::after, .brand .mk::after, .nav-cta .dot { animation: none; } }

/* ============================================================
   APPROACH — two signal pipelines
   ============================================================ */
.bridge { position: relative; display: flex; flex-direction: column; align-items: center; margin-top: clamp(-160px, -14vw, -90px); padding-bottom: clamp(36px, 5vw, 64px); pointer-events: none; }
.bridge .conduit { width: 1px; height: clamp(150px, 20vw, 260px); background: linear-gradient(180deg, transparent, rgba(255,157,46,0.30) 26%, var(--amber)); position: relative; --p: 0; --po: 0; }
.bridge .conduit::after { content: ""; position: absolute; left: -2px; width: 5px; height: 42%; border-radius: 3px; background: linear-gradient(180deg, transparent, var(--amber-hi)); filter: drop-shadow(0 0 8px var(--amber)); top: calc(var(--p) * 100% - 42%); opacity: var(--po); }
@keyframes flowdown { 0% { top: -42%; opacity: 0; } 14% { opacity: 1; } 80% { opacity: 1; } 100% { top: 58%; opacity: 0; } }
.bridge .junction { position: relative; width: 100%; height: 14px; display: flex; align-items: center; justify-content: center; }
.bridge .junction .rail { position: absolute; left: 0; right: 0; top: 50%; height: 1px; transform: translateY(-50%); background: linear-gradient(90deg, transparent, var(--line-2) 16%, var(--line-2) 84%, transparent); }
.bridge .junction .node-end { position: relative; z-index: 1; width: 11px; height: 11px; transform: rotate(45deg); border: 1px solid var(--amber); background: var(--bg); box-shadow: 0 0 18px var(--glow); transition: box-shadow 0.4s var(--ease); }
.bridge .junction .node-end::after { content: ""; position: absolute; inset: 3px; background: var(--amber); }
.bridge.arrived .junction .node-end { box-shadow: 0 0 34px var(--amber); }
@media (prefers-reduced-motion: reduce) { .bridge .conduit::after { display: none; } .bridge .junction .node-end { box-shadow: 0 0 18px var(--glow); } }

.flows { margin-top: clamp(48px, 7vw, 96px); display: flex; flex-direction: column; gap: clamp(28px, 4vw, 48px); }
.flow { border-top: 1px solid var(--line); padding-top: clamp(26px, 3.5vw, 40px); }
.flow-head { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 30px; }
.flow-no { font-family: var(--display); font-weight: 600; font-size: clamp(30px, 4vw, 52px); line-height: 0.8; color: var(--ink-4); letter-spacing: -0.03em; transition: color 0.6s var(--ease); }
.flow.live .flow-no { color: var(--amber); }
.flow-title { font-family: var(--display); font-weight: 600; font-size: clamp(20px, 2.4vw, 30px); letter-spacing: -0.02em; }
.flow-sub { color: var(--ink-2); font-size: 14.5px; margin-top: 6px; max-width: 52ch; }

.flow-track {
  display: flex; align-items: center; gap: clamp(6px, 1.2vw, 16px); flex-wrap: wrap;
}
.node {
  font-family: var(--mono); font-size: clamp(12px, 1.4vw, 15px); letter-spacing: 0.01em;
  color: var(--ink-3); padding: 11px 16px; border: 1px solid var(--line);
  background: var(--bg-1); position: relative; white-space: nowrap;
  transition: color 0.45s var(--ease), border-color 0.45s var(--ease), background 0.45s var(--ease), box-shadow 0.6s var(--ease), transform 0.45s var(--ease);
}
.node.key { color: var(--ink-2); border-color: var(--line-2); border-style: dashed; }
.node .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-4); margin-right: 9px; vertical-align: 1px; transition: background 0.45s, box-shadow 0.45s; }
.node.on {
  color: var(--ink); border-color: var(--amber); background: var(--bg-2);
  box-shadow: 0 0 24px var(--glow), inset 0 0 14px var(--glow-soft); transform: translateY(-2px);
}
.node.on .dot { background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.node.key.on { background: var(--amber); color: #1c1304; border-style: solid; }
.node.key.on .dot { background: #1c1304; box-shadow: none; }

.arrow {
  flex: 0 0 auto; width: clamp(20px, 3vw, 44px); height: 1px; background: var(--line-2);
  position: relative; transition: background 0.4s var(--ease);
}
.arrow::after {
  content: ""; position: absolute; right: -1px; top: 50%; width: 5px; height: 5px;
  border-top: 1px solid var(--line-2); border-right: 1px solid var(--line-2);
  transform: translateY(-50%) rotate(45deg); transition: border-color 0.4s var(--ease);
}
.arrow.on { background: linear-gradient(90deg, var(--amber-deep), var(--amber)); }
.arrow.on::after { border-color: var(--amber); }
/* loop-back marker for the dev loop */
.flow .loopback { font-family: var(--mono); font-size: 11px; color: var(--ink-3); margin-top: 14px; display: flex; align-items: center; gap: 8px; letter-spacing: 0.04em; }
.flow .loopback .ic { color: var(--amber); }

@media (prefers-reduced-motion: reduce) {
  .node { color: var(--ink-2); border-color: var(--line-2); }
  .node .dot { background: var(--amber); }
}
@media (max-width: 560px) {
  .flow-track { gap: 8px; }
  .arrow { width: 16px; }
  .node { padding: 9px 12px; }
}

/* ============================================================
   AGENT TERMINAL — "watch it act"
   ============================================================ */
.term-shell { margin-top: clamp(44px, 6vw, 72px); border: 1px solid var(--line-2); background: rgba(8,6,4,0.85); box-shadow: 0 40px 120px rgba(0,0,0,0.6), 0 0 0 1px rgba(0,0,0,0.4) inset; }
.term-bar { display: flex; align-items: center; gap: 14px; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.term-bar .lights { display: flex; gap: 7px; }
.term-bar .lights i { width: 11px; height: 11px; border-radius: 50%; background: var(--ink-4); }
.term-bar .lights i:first-child { background: var(--amber-deep); }
.term-bar .ttl { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.term-bar .ttl b { color: var(--ink-2); font-weight: 400; }
.term-bar .live-tag { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--live); display: flex; align-items: center; gap: 7px; letter-spacing: 0.1em; }
.term-bar .live-tag .d { width: 7px; height: 7px; border-radius: 50%; background: var(--live); animation: live 2.4s ease-out infinite; }
.term-body {
  font-family: var(--mono); font-size: clamp(12px, 1.4vw, 14.5px); line-height: 1.95;
  padding: clamp(20px, 3vw, 36px); min-height: 360px; white-space: pre-wrap; color: var(--ink-2);
}
.term-body .usr { color: var(--ink); }
.term-body .usr::before { content: "❯ "; color: var(--amber); }
.term-body .call { color: var(--ink-2); }
.term-body .tok { color: var(--amber); }
.term-body .ok { color: var(--live); }
.term-body .mut { color: var(--ink-3); }
.term-body .caret { display: inline-block; width: 9px; height: 1.05em; background: var(--amber); vertical-align: -2px; animation: caretblink 1s steps(1) infinite; }

/* ============================================================
   MIKO SPOTLIGHT
   ============================================================ */
.spotlight { display: grid; grid-template-columns: 0.82fr 1.18fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.sp-meta .stats { margin-top: 30px; display: flex; gap: 30px; flex-wrap: wrap; }
.sp-meta .stat .n { font-family: var(--display); font-weight: 600; font-size: clamp(28px, 3.4vw, 44px); color: var(--ink); line-height: 1; letter-spacing: -0.02em; }
.sp-meta .stat .l { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-top: 8px; }
.sp-meta .stat .n .u { color: var(--amber); }
@media (max-width: 960px) { .spotlight { grid-template-columns: 1fr; } }

/* ============================================================
   WORK
   ============================================================ */
.work-list { display: flex; flex-direction: column; gap: 0; margin-top: clamp(40px, 6vw, 72px); }
.project {
  display: grid; grid-template-columns: 0.92fr 1.08fr; gap: clamp(28px, 5vw, 80px); align-items: center;
  padding-block: clamp(44px, 6vw, 84px); border-top: 1px solid var(--line); position: relative;
}
.project:last-child { border-bottom: 1px solid var(--line); }
.project.flip .p-meta { order: 2; } .project.flip .p-media { order: 1; }
.project .p-media { order: 2; }

.p-no { font-family: var(--display); font-weight: 600; font-size: clamp(46px, 7vw, 92px); line-height: 0.8; color: var(--ink-4); letter-spacing: -0.03em; transition: color 0.5s var(--ease); }
.project:hover .p-no { color: var(--amber); }
.p-tag { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); margin: 16px 0 12px; }
.project h3 { font-family: var(--display); font-weight: 600; font-size: clamp(28px, 4vw, 50px); line-height: 1; letter-spacing: -0.025em; }
.project h3 .kic { color: var(--ink-3); font-weight: 400; }
.p-desc { color: var(--ink-2); margin-top: 18px; max-width: 46ch; font-size: 15.5px; line-height: 1.7; }
.p-stack { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); padding: 6px 12px; border: 1px solid var(--line); transition: border-color 0.3s, color 0.3s, background 0.3s; }
.project:hover .chip { border-color: var(--line-2); }
.chip:hover { background: var(--amber); color: #1c1304; border-color: var(--amber); }
.p-link { margin-top: 30px; display: inline-flex; align-items: center; gap: 11px; font-family: var(--mono); font-size: 13px; color: var(--ink); border-bottom: 1px solid var(--line-2); padding-bottom: 5px; transition: color 0.3s, gap 0.3s, border-color 0.3s; }
.p-link:hover { color: var(--amber); gap: 15px; border-color: var(--amber); }

/* media frames — real screenshots */
.p-media .frame {
  position: relative; display: block; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 2 / 1;
  background: var(--bg-1);
  transition: border-color 0.5s var(--ease), transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
.p-media .frame img { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform 0.8s var(--ease); }
.project:hover .p-media .frame { border-color: var(--line-2); transform: translateY(-6px); box-shadow: 0 40px 100px rgba(0,0,0,0.55); }
.project:hover .p-media .frame img { transform: scale(1.04); }
.p-media .frame .corner { position: absolute; left: 14px; bottom: 12px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; color: var(--ink); background: rgba(8,6,4,0.7); backdrop-filter: blur(6px); padding: 5px 10px; border: 1px solid var(--line); }
.p-media .frame .scan { position: absolute; inset: 0; pointer-events: none; height: 38%; background: linear-gradient(transparent, var(--glow), transparent); opacity: 0; transform: translateY(-100%); }
.project:hover .p-media .frame .scan { opacity: 1; animation: scan 2.6s var(--ease-io) infinite; }
@keyframes scan { to { transform: translateY(280%); } }
@media (prefers-reduced-motion: reduce) { .project:hover .p-media .frame .scan { animation: none; opacity: 0; } .project:hover .p-media .frame img { transform: none; } }

/* ============================================================
   SKILLS — kinetic grid
   ============================================================ */
.skills-grid { margin-top: clamp(40px, 6vw, 64px); display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--line); }
.skill-col { padding: 28px 24px; border-right: 1px solid var(--line); transition: background 0.4s; position: relative; overflow: hidden; }
.skill-col:last-child { border-right: 0; }
.skill-col:hover { background: var(--bg-1); }
.skill-col h4 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--amber); margin-bottom: 20px; }
.skill-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.skill-col li { font-family: var(--display); font-weight: 500; font-size: 17px; color: var(--ink-2); display: flex; align-items: center; gap: 10px; transition: color 0.3s, transform 0.3s var(--ease); }
.skill-col li::before { content: ""; width: 5px; height: 5px; background: var(--ink-4); transition: background 0.3s; }
.skill-col li:hover { color: var(--ink); transform: translateX(4px); } .skill-col li:hover::before { background: var(--amber); }

/* CERTS */
.certs { margin-top: clamp(40px, 5vw, 56px); display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cert { display: flex; align-items: center; gap: 22px; padding: 26px 30px; border: 1px solid var(--line); background: var(--bg-1); transition: border-color 0.4s var(--ease), transform 0.4s var(--ease), background 0.4s; }
.cert:hover { border-color: var(--line-2); transform: translateY(-4px); background: var(--bg-2); }
.cert .bd { width: 54px; height: 54px; flex-shrink: 0; border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--amber); }
.cert:hover .bd { border-color: var(--amber); box-shadow: inset 0 0 16px var(--glow); }
.cert .bd svg { width: 24px; height: 24px; }
.cert .org { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.cert h4 { font-family: var(--display); font-weight: 500; font-size: 18px; margin-top: 5px; letter-spacing: -0.01em; }
.cert .vf { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); display: inline-flex; align-items: center; gap: 6px; transition: color 0.3s, gap 0.3s; }
.cert:hover .vf { color: var(--amber); gap: 9px; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact { position: relative; overflow: hidden; }
.contact .big { font-family: var(--display); font-weight: 600; font-size: clamp(44px, 10vw, 150px); line-height: 0.88; letter-spacing: -0.03em; text-wrap: balance; }
.contact .big .am { color: var(--amber); }
.contact-row { margin-top: clamp(44px, 6vw, 76px); display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cc { border: 1px solid var(--line); background: var(--bg-1); padding: 26px 28px; display: flex; flex-direction: column; gap: 12px; transition: border-color 0.4s var(--ease), transform 0.4s var(--ease), background 0.4s; }
.cc:hover { border-color: var(--line-2); transform: translateY(-5px); background: var(--bg-2); }
.cc .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.cc .v { font-family: var(--display); font-weight: 500; font-size: clamp(17px, 2vw, 22px); display: flex; align-items: center; justify-content: space-between; gap: 14px; letter-spacing: -0.01em; }
.cc .v .ar { color: var(--ink-3); transition: transform 0.4s var(--ease), color 0.3s; }
.cc:hover .v .ar { transform: translate(4px,-4px); color: var(--amber); }

.foot { margin-top: clamp(72px, 10vw, 130px); padding-top: 30px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); }
.foot .am { color: var(--amber); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .threads { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .skill-col:nth-child(2n) { border-right: 0; }
  .skill-col { border-bottom: 1px solid var(--line); }
  .project { grid-template-columns: 1fr; gap: 26px; }
  .project .p-media, .project.flip .p-media { order: -1; }
  .project .p-meta, .project.flip .p-meta { order: 0; }
  .certs, .contact-row { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .nav-links, .nav-cta { display: none; }
  .skills-grid { grid-template-columns: 1fr; }
  .skill-col { border-right: 0; }
  .hero h1 { font-size: clamp(44px, 14vw, 90px); }
  .scroll-cue { display: none; }
}
