/* ==========================================================
   Onur Caner Kucuk — portfolio
   Palette: Midnight Black #02070A · Electric Blue #0297DE · Cantaloupe Orange #FC734D
   ========================================================== */

:root {
  --black: #02070A;
  --blue: #0297DE;
  --orange: #FC734D;

  --font-sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-serif: "Instrument Serif", Georgia, serif;

  --radius: 14px;
  --radius-sm: 8px;
  --maxw: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Dark (default) ---------- */
:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #02070A;
  --bg-elev: #06121A;
  --surface: rgba(8, 24, 34, .72);
  --surface-solid: #081822;
  --border: rgba(2, 151, 222, .18);
  --border-strong: rgba(2, 151, 222, .42);
  --text: #E7F1F7;
  --text-muted: #8CA4B3;
  --text-dim: #587080;
  --accent: #0297DE;          /* fills, traces */
  --accent-ink: #3FB4F0;      /* text on bg */
  --hot: #FC734D;
  --hot-ink: #FF8B69;
  --trace: rgba(2, 151, 222, .16);
  --trace-strong: rgba(2, 151, 222, .38);
  --copper: rgba(252, 115, 77, .85);
  --grid-dot: rgba(2, 151, 222, .16);
  --chip-body: #0B1A23;
  --chip-die: #07131A;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 20px 60px -30px rgba(0,0,0,.8);
  --vignette: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(2,7,10,0) 0%, rgba(2,7,10,.55) 70%, rgba(2,7,10,.85) 100%);
  --board-rgb: 2, 151, 222;
  --board-alpha: .11;
}

/* ---------- Light ---------- */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F3F6F8;
  --bg-elev: #FFFFFF;
  --surface: rgba(255, 255, 255, .82);
  --surface-solid: #FFFFFF;
  --border: rgba(2, 7, 10, .10);
  --border-strong: rgba(2, 151, 222, .45);
  --text: #02070A;
  --text-muted: #455864;
  --text-dim: #7A8C97;
  --accent: #0297DE;
  --accent-ink: #0175AE;
  --hot: #FC734D;
  --hot-ink: #D9502A;
  --trace: rgba(2, 120, 180, .16);
  --trace-strong: rgba(2, 120, 180, .40);
  --copper: rgba(217, 80, 42, .85);
  --grid-dot: rgba(2, 7, 10, .12);
  --chip-body: #0B1A23;
  --chip-die: #07131A;
  --shadow: 0 1px 2px rgba(2,7,10,.04), 0 20px 50px -30px rgba(2,40,70,.35);
  --vignette: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(243,246,248,0) 0%, rgba(243,246,248,.5) 70%, rgba(243,246,248,.85) 100%);
  --board-rgb: 2, 120, 180;
  --board-alpha: .10;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--orange); color: var(--black); }
:focus-visible { outline: 2px solid var(--hot); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

em { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--hot-ink); letter-spacing: 0; }

#board {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  z-index: -2; pointer-events: none;
}
.vignette { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--vignette); }

/* ---------- LEDs ---------- */
.led {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--hot); box-shadow: 0 0 0 3px rgba(252,115,77,.18), 0 0 12px var(--hot);
  animation: blink 2.4s infinite;
}
.led--sm { width: 6px; height: 6px; box-shadow: 0 0 8px var(--hot); }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.nav__progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; }
.nav__progress span {
  display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, var(--accent), var(--hot));
  box-shadow: 0 0 10px var(--accent);
}

.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-weight: 600; letter-spacing: .06em; }
.logo svg { overflow: visible; }
.logo__pins path { stroke: var(--accent); stroke-width: 2; stroke-linecap: round; fill: none; }
.logo__body { fill: var(--chip-body); stroke: var(--accent); stroke-width: 1.5; }
.logo__dot { fill: var(--hot); }
.logo__text { font-size: 15px; display: flex; align-items: baseline; gap: 6px; }
.logo__rev { font-size: 10px; color: var(--text-dim); font-weight: 500; letter-spacing: .08em; }

.nav__links { display: flex; gap: 4px; font-size: 14px; }
.nav__links a {
  position: relative; padding: 8px 14px; border-radius: 999px; color: var(--text-muted);
  transition: color .2s, background-color .2s;
}
.nav__links a:hover { color: var(--text); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.nav__links a.is-active { color: var(--text); }
.nav__links a.is-active::after {
  content: ""; position: absolute; left: 50%; bottom: 2px; width: 5px; height: 5px; border-radius: 50%;
  transform: translateX(-50%); background: var(--hot); box-shadow: 0 0 8px var(--hot);
}
.nav__actions { display: flex; align-items: center; gap: 10px; }

/* Theme switch — a little SPDT toggle */
.switch { background: none; border: 0; padding: 0; cursor: pointer; }
.switch__track {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  width: 74px; height: 34px; padding: 0 10px; border-radius: 999px;
  background: var(--bg-elev); border: 1px solid var(--border-strong);
  font-family: var(--font-mono); font-size: 9px; letter-spacing: .1em; color: var(--text-dim);
  box-shadow: inset 0 1px 3px rgba(0,0,0,.25);
}
.switch__knob {
  position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: #fff;
  box-shadow: 0 0 14px rgba(2,151,222,.6);
  transition: transform .35s var(--ease), background-color .35s;
}
.switch__knob svg { grid-area: 1 / 1; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; transition: opacity .25s, transform .35s var(--ease); }
.switch__knob .i-moon { fill: currentColor; stroke: none; }
:root[data-theme="light"] .switch__knob { transform: translateX(40px); background: var(--hot); box-shadow: 0 0 14px rgba(252,115,77,.6); }
:root[data-theme="dark"] .i-sun, :root[data-theme="light"] .i-moon { opacity: 0; transform: rotate(-90deg) scale(.5); }
.switch__label--on { opacity: .9; }
:root[data-theme="light"] .switch__label--off { opacity: .9; }
:root[data-theme="light"] .switch__label--on { opacity: 0; }
:root[data-theme="dark"] .switch__label--off { opacity: 0; }

.menu-btn { display: none; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-elev); cursor: pointer; position: relative; }
.menu-btn span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .3s var(--ease); }
.menu-btn span:first-child { top: 15px; }
.menu-btn span:last-child { top: 23px; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 22px;
  border-radius: 999px; font-weight: 600; font-size: 15px; cursor: pointer;
  border: 1px solid transparent; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s, background-color .25s, border-color .25s, color .25s;
}
.btn svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn--primary { background: var(--hot); color: var(--black); box-shadow: 0 10px 30px -10px rgba(252,115,77,.7); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -10px rgba(252,115,77,.9); }
.btn--primary svg { transition: transform .25s var(--ease); }
.btn--primary:hover svg { transform: translateX(3px); }
.btn--ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); transform: translateY(-2px); }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center;
  gap: clamp(24px, 5vw, 64px); min-height: calc(100svh - 68px); padding-block: clamp(40px, 8vh, 90px);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px; margin: 0 0 22px;
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink);
  padding: 8px 14px 8px 12px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface);
}
.hero__title {
  margin: 0; font-size: clamp(3.2rem, 8.4vw, 7rem); line-height: .92; letter-spacing: -.045em; font-weight: 600;
}
.hero__title em { font-size: 1.08em; letter-spacing: -.02em; padding-right: .04em; }
.hero__title .dot { color: var(--accent); }
.hero__lead { margin: 28px 0 0; max-width: 34ch; font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: var(--text-muted); }
.hl { color: var(--text); background: linear-gradient(transparent 62%, color-mix(in srgb, var(--accent) 30%, transparent) 62%); }

.terminal {
  margin: 22px 0 0; display: flex; align-items: center; gap: 10px; min-height: 24px;
  font-family: var(--font-mono); font-size: 13.5px; color: var(--text-muted);
}
.terminal__prompt { color: var(--hot-ink); }
.terminal__caret { width: 8px; height: 16px; background: var(--accent); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.stats { display: flex; gap: clamp(20px, 4vw, 44px); margin: 44px 0 0; padding-top: 26px; border-top: 1px dashed var(--border-strong); }
.stat { display: flex; flex-direction: column-reverse; }
.stat dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); }
.stat dd { margin: 0; font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 600; letter-spacing: -.03em; line-height: 1.1; }

/* Chip illustration */
.hero__chip { position: relative; }
.hero__chip::before {
  content: ""; position: absolute; inset: 15% 20%; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 28%, transparent), transparent 70%);
  filter: blur(30px); z-index: -1;
}
.chip { width: 100%; height: auto; overflow: visible; }
.chip__griddot { fill: var(--grid-dot); }
.chip__grid { mask: radial-gradient(circle at 50% 50%, #000 30%, transparent 72%); -webkit-mask: radial-gradient(circle at 50% 50%, #000 30%, transparent 72%); }
.traces path { fill: none; stroke: var(--trace-strong); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.flows path {
  fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round;
  stroke-dasharray: 8 100; stroke-dashoffset: 108;
  animation: flow var(--d, 3s) linear infinite; animation-delay: var(--o, 0s);
}
.flows path.o { stroke: var(--hot); }
@keyframes flow { to { stroke-dashoffset: 0; } }
.pads circle { fill: var(--bg); stroke: var(--copper); stroke-width: 3; }
.pads .via { fill: var(--copper); stroke: none; }
.labels text { font-family: var(--font-mono); font-size: 13px; font-weight: 600; letter-spacing: .12em; fill: var(--text); }
.labels .sub { font-size: 10.5px; font-weight: 500; letter-spacing: .08em; fill: var(--text-dim); }
.ic__pins rect { fill: #9AA9B3; }
:root[data-theme="light"] .ic__pins rect { fill: #8B9AA4; }
.ic__body { fill: var(--chip-body); stroke: rgba(255,255,255,.06); }
.ic__die { fill: var(--chip-die); stroke: rgba(2,151,222,.25); stroke-dasharray: 2 4; }
.ic__dot { fill: #1D2E38; }
.ic__name { font-family: var(--font-mono); font-size: 38px; font-weight: 600; letter-spacing: .16em; fill: #E7F1F7; }
.ic__part { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .14em; fill: #6E8796; }
.ic { transform-origin: 260px 260px; animation: hum 6s ease-in-out infinite; }
@keyframes hum { 50% { transform: translateY(-4px); } }

/* ---------- Ticker ---------- */
.ticker {
  overflow: hidden; border-block: 1px solid var(--border); background: var(--surface);
  mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.ticker__track { display: flex; width: max-content; animation: ticker 48s linear infinite; }
.ticker span {
  display: inline-flex; align-items: center; gap: 22px; padding: 16px 0 16px 22px;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); white-space: nowrap;
}
.ticker span::after { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 2px solid var(--copper); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding-block: clamp(72px, 12vw, 140px) 0; scroll-margin-top: 60px; }
.section__head { position: relative; margin-bottom: clamp(36px, 6vw, 64px); max-width: 760px; }
.refdes {
  display: inline-grid; place-items: center; min-width: 38px; height: 26px; padding: 0 8px; margin-bottom: 18px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--accent-ink);
  border: 1px solid var(--border-strong); border-radius: 6px; position: relative;
}
.refdes::after {
  content: ""; position: absolute; left: 100%; top: 50%; width: 64px; height: 1px;
  background: linear-gradient(90deg, var(--border-strong), transparent);
}
.section__kicker { margin: 0 0 10px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-dim); }
.section__title { margin: 0; font-size: clamp(2.1rem, 5vw, 3.6rem); line-height: 1.02; letter-spacing: -.035em; font-weight: 600; }
.section__title em { font-size: 1.08em; }

.card {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}

/* Reveal */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.about__text p { margin: 0 0 18px; color: var(--text-muted); font-size: 1.08rem; }
.about__text strong { color: var(--text); font-weight: 600; }
.facts { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 10px; }
.facts li { display: flex; gap: 16px; align-items: baseline; padding: 12px 0; border-top: 1px dashed var(--border); }
.facts__k { flex: none; width: 44px; font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; letter-spacing: .12em; color: var(--hot-ink); }

.scope { margin: 0; border-radius: var(--radius); overflow: hidden; background: #050D12; border: 1px solid rgba(2,151,222,.28); box-shadow: var(--shadow); color: #CFE3EE; }
.scope__bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; color: #7E97A6; border-bottom: 1px solid rgba(2,151,222,.2); }
.scope__run { display: inline-flex; align-items: center; gap: 8px; color: var(--orange); }
.scope__run .led { background: #3BD16F; box-shadow: 0 0 8px #3BD16F; }
.scope__screen { position: relative; aspect-ratio: 400 / 220; overflow: hidden; background: radial-gradient(ellipse at center, #08202C 0%, #040B10 80%); }
.scope__screen svg { width: 100%; height: 100%; }
.scope__grid path { stroke: rgba(120,180,210,.13); stroke-width: 1; fill: none; stroke-dasharray: 2 3; vector-effect: non-scaling-stroke; }
.scope__grid .scope__axis { stroke: rgba(120,180,210,.28); stroke-dasharray: none; }
.scope__wave path { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.scope__wave--clk path { stroke: #2BB3F5; filter: drop-shadow(0 0 4px #0297DE); }
.scope__wave--data path { stroke: var(--orange); filter: drop-shadow(0 0 4px #FC734D); }
.scope__wave { animation: sweep 4s linear infinite; }
.scope__wave--data { animation-duration: 6s; }
@keyframes sweep { to { transform: translateX(-400px); } }
.scope__legend { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 12px 16px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; color: #7E97A6; border-top: 1px solid rgba(2,151,222,.2); }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 8px; vertical-align: -1px; }
.sw--b { background: #2BB3F5; } .sw--o { background: var(--orange); }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0 0 0 44px; position: relative; display: grid; gap: 28px; }
.timeline__bus { position: absolute; left: 13px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--trace-strong); }
.timeline__bus span {
  position: absolute; inset: 0; border-radius: inherit; transform-origin: top; transform: scaleY(var(--tp, 0));
  background: linear-gradient(var(--accent), var(--hot)); box-shadow: 0 0 12px var(--accent);
}
.job { position: relative; }
.job__via {
  position: absolute; left: -40px; top: 30px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--copper);
  transition: box-shadow .4s, background-color .4s;
}
.job__via::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--copper); opacity: .0; transition: opacity .4s; }
.job.is-lit .job__via { box-shadow: 0 0 0 5px rgba(252,115,77,.15), 0 0 16px var(--hot); }
.job.is-lit .job__via::after { opacity: 1; }
.job__via::before { content: ""; position: absolute; left: 100%; top: 50%; width: 16px; height: 2px; margin-top: -1px; background: var(--copper); }
.job__card { padding: clamp(20px, 3vw, 32px); transition: border-color .3s, transform .3s var(--ease); }
.job__card:hover { border-color: var(--border-strong); }
.job__head { display: flex; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 18px; }
.job__company { margin: 0; font-size: 1.45rem; letter-spacing: -.02em; font-weight: 600; line-height: 1.2; }
.job__role { margin: 4px 0 0; color: var(--accent-ink); font-weight: 500; }
.job__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); letter-spacing: .04em; }
.badge { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px; border-radius: 999px; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.badge--live { color: var(--hot-ink); border: 1px solid color-mix(in srgb, var(--hot) 45%, transparent); background: color-mix(in srgb, var(--hot) 10%, transparent); }
.job__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.job__list li, .module__list li { position: relative; padding-left: 22px; color: var(--text-muted); font-size: .98rem; }
.job__list li::before, .module__list li::before {
  content: ""; position: absolute; left: 2px; top: .7em; width: 10px; height: 2px; background: var(--accent);
}
.job__list li::after, .module__list li::after {
  content: ""; position: absolute; left: 10px; top: calc(.7em - 2px); width: 6px; height: 6px; border-radius: 50%; border: 1.5px solid var(--accent); background: var(--bg);
}

.tags { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .04em; padding: 5px 10px; border-radius: 6px;
  color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 9%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}

/* ---------- Projects ---------- */
.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.module { padding: clamp(24px, 3.4vw, 38px); overflow: hidden; transition: transform .35s var(--ease), border-color .35s, box-shadow .35s; }
.module:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow), 0 0 0 1px var(--border-strong), 0 30px 60px -40px var(--accent); }
.module--wide { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.hole { position: absolute; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--copper); background: var(--bg); opacity: .8; }
.hole--tl { top: 12px; left: 12px; } .hole--tr { top: 12px; right: 12px; } .hole--bl { bottom: 12px; left: 12px; } .hole--br { bottom: 12px; right: 12px; }
.module__id { margin: 0 0 10px; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .14em; color: var(--hot-ink); }
.module__title { margin: 0 0 12px; font-size: clamp(1.4rem, 2.4vw, 1.9rem); letter-spacing: -.025em; line-height: 1.15; font-weight: 600; }
.module__desc { margin: 0 0 16px; color: var(--text); opacity: .86; }
.module__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.module__icon { width: 52px; height: 52px; margin-bottom: 20px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--border-strong); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.module__icon svg, .edu__icon svg { width: 30px; height: 30px; fill: none; stroke: var(--accent-ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.module__icon .acc, .edu__icon .acc { stroke: var(--hot); }
.module__art { border-radius: 12px; border: 1px dashed var(--border-strong); background: color-mix(in srgb, var(--bg) 60%, transparent); padding: 14px; }
.module__art svg { width: 100%; height: auto; }
.sch rect { fill: none; stroke: var(--text-muted); stroke-width: 2; }
.sch .sch__mcu { stroke: var(--accent); fill: color-mix(in srgb, var(--accent) 10%, transparent); }
.sch .sch__opto { stroke-dasharray: 4 4; }
.sch path { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.sch .sch__thin { stroke-width: 2; stroke: var(--text-muted); }
.sch .sch__accent { stroke: var(--hot); }
.sch text { font-family: var(--font-mono); font-size: 13px; font-weight: 600; letter-spacing: .1em; fill: var(--text); }
.sch__pulse { fill: var(--hot); filter: drop-shadow(0 0 6px #FC734D); }
.wifi { animation: blink 1.6s infinite; }

/* ---------- BOM ---------- */
.bom { overflow: hidden; }
.bom__row {
  display: grid; grid-template-columns: 70px minmax(180px, .9fr) minmax(0, 2.4fr) 56px; gap: 20px; align-items: center;
  padding: 18px clamp(18px, 3vw, 30px); border-top: 1px solid var(--border);
  transition: background-color .25s;
}
.bom__row:not(.bom__row--head):hover { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.bom__row--head { border-top: 0; padding-block: 14px; background: color-mix(in srgb, var(--accent) 7%, transparent); font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); }
.bom__ref { font-family: var(--font-mono); font-weight: 600; color: var(--hot-ink); }
.bom__name { font-weight: 600; }
.bom__val { display: flex; flex-wrap: wrap; gap: 7px; }
.bom__val i {
  font-style: normal; font-family: var(--font-mono); font-size: 12px; padding: 5px 10px; border-radius: 6px;
  border: 1px solid var(--border); color: var(--text-muted); background: var(--bg-elev);
  transition: color .2s, border-color .2s;
}
.bom__val i:hover { color: var(--accent-ink); border-color: var(--border-strong); }
.bom__qty { font-family: var(--font-mono); text-align: right; color: var(--text-dim); }

/* ---------- Education ---------- */
.edu { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.edu__card { display: flex; gap: 22px; align-items: flex-start; padding: clamp(22px, 3vw, 32px); }
.edu__icon { flex: none; width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; border: 1px solid var(--border-strong); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.edu__title { margin: 0 0 6px; font-size: 1.35rem; letter-spacing: -.02em; line-height: 1.25; font-weight: 600; }
.edu__school { margin: 0; color: var(--text-muted); }

/* ---------- Contact ---------- */
.contact { padding-bottom: clamp(60px, 9vw, 110px); }
.contact__inner { padding: clamp(36px, 7vw, 88px) clamp(22px, 6vw, 72px); text-align: center; overflow: hidden; border-color: var(--border-strong); }
.contact__traces { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.contact__traces path { fill: none; stroke: var(--trace); stroke-width: 2; vector-effect: non-scaling-stroke; }
.contact__traces .f { stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: 10 100; stroke-dashoffset: 110; animation: flow 3.5s linear infinite; }
.contact__traces .f.o { stroke: var(--hot); animation-delay: -1.7s; }
.contact__title { margin: 6px 0 18px; font-size: clamp(2.3rem, 6.4vw, 4.8rem); line-height: 1; letter-spacing: -.04em; font-weight: 600; }
.contact__title em { font-size: 1.08em; }
.contact__lead { margin: 0 auto; max-width: 48ch; color: var(--text-muted); font-size: 1.08rem; }
.contact__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }

/* ---------- Footer ---------- */
.footer {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  padding-block: 28px 36px; border-top: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; color: var(--text-dim);
}
.footer__top:hover { color: var(--accent-ink); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 48px; }
  .hero__chip { max-width: 560px; width: 100%; margin-inline: auto; order: -1; }
  .about { grid-template-columns: 1fr; }
  .module--wide { grid-template-columns: 1fr; }
  .bom__row { grid-template-columns: 52px minmax(0, 1fr) 40px; }
  .bom__row .bom__val { grid-column: 2 / 4; grid-row: 2; }
  .bom__row--head span:nth-child(3) { display: none; }
}
@media (max-width: 820px) {
  .menu-btn { display: block; }
  .nav__links {
    position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px;
    background: color-mix(in srgb, var(--bg) 96%, transparent); border-bottom: 1px solid var(--border);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    transform: translateY(-8px); opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .25s, transform .25s var(--ease), visibility .25s;
  }
  .nav__links.is-open { transform: none; opacity: 1; visibility: visible; pointer-events: auto; }
  .nav__links a { padding: 14px 4px; border-radius: 0; border-bottom: 1px dashed var(--border); font-size: 16px; }
  .nav__links a.is-active::after { left: auto; right: 6px; top: 50%; bottom: auto; transform: translateY(-50%); }
  .projects, .edu { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero { padding-top: 28px; gap: 8px; }
  .hero__chip { margin-inline: -8px; width: calc(100% + 16px); }
  .labels .sub { display: none; }
  .labels text { font-size: 15px; }
  .stats { gap: 18px; justify-content: space-between; }
  .stat dt { font-size: 10px; }
  .timeline { padding-left: 32px; }
  .timeline__bus { left: 7px; }
  .job__via { left: -34px; width: 18px; height: 18px; }
  .job__via::before { width: 12px; }
  .job__meta { align-items: flex-start; }
  .btn { height: 46px; padding: 0 18px; }
  .contact__actions .btn { width: 100%; justify-content: center; }
  .footer { justify-content: center; text-align: center; }
  .footer__mid { width: 100%; order: -1; }
  .logo__rev { display: none; }
  .edu__card { flex-direction: column; gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
  .flows path, .contact__traces .f { display: none; }
}
