@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('fonts/geist.woff2') format('woff2');
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/instrument-serif.woff2') format('woff2');
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/instrument-serif-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/jetbrains-mono.woff2') format('woff2');
}

:root {
  --bg: #FAF6EF;
  --bg-2: #F4EDE2;
  --ink: #1F1A14;
  --ink-soft: #4A3F32;
  --muted: #8C7E6C;
  --line: #E1D6C2;
  --line-strong: #C9BBA1;
  --card: #FFFFFF;
  --accent: #D9714E;
  --accent-soft: #FBE8DD;
  --accent-ink: #8B3A1E;
  --green: #4F8A5D;
  --grid: rgba(31,26,20,.05);
  --shadow: 0 1px 2px rgba(31,26,20,.04), 0 8px 24px -12px rgba(31,26,20,.08);
  --shadow-lg: 0 2px 4px rgba(31,26,20,.05), 0 24px 48px -16px rgba(31,26,20,.14);
}
[data-theme="dark"] {
  --bg: #0F0E0C;
  --bg-2: #1A1815;
  --ink: #F2EDE3;
  --ink-soft: #BFB5A4;
  --muted: #7A7164;
  --line: #2A2620;
  --line-strong: #3D372E;
  --card: #15130F;
  --accent: #E8825D;
  --accent-soft: rgba(232,130,93,.13);
  --accent-ink: #F2A487;
  --green: #6FA87B;
  --grid: rgba(242,237,227,.04);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.5);
  --shadow-lg: 0 2px 4px rgba(0,0,0,.4), 0 24px 48px -16px rgba(0,0,0,.7);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Geist", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01","cv11","tnum";
  transition: background .3s, color .3s;
  overflow-x: hidden;
}
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; font-feature-settings: "tnum","ss01"; }
.serif { font-family: "Instrument Serif", "Times New Roman", serif; font-weight: 400; }

/* Engineering grid background */
body::before {
  content: "";
  position: fixed; inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
}

/* ============ GATE ============ */
.gate {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  transition: opacity .6s ease, visibility .6s ease;
}
.gate.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.gate-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(800px 500px at 15% 20%, rgba(217,113,78,.12), transparent 60%),
    radial-gradient(600px 400px at 85% 80%, rgba(217,113,78,.08), transparent 60%);
  pointer-events: none;
}
.gate-corner {
  position: absolute; top: 24px; left: 24px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .1em;
}
.gate-corner.tr { left: auto; right: 24px; text-align: right; }
.gate-corner.bl { top: auto; bottom: 24px; }
.gate-corner.br { top: auto; bottom: 24px; left: auto; right: 24px; text-align: right; }
.gate-card {
  position: relative;
  width: 100%; max-width: 480px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 40px 36px 36px;
  box-shadow: var(--shadow-lg);
}
.gate-card::before, .gate-card::after,
.gate-card-c1, .gate-card-c2 {
  content: ""; position: absolute;
  width: 12px; height: 12px;
  border: 1.5px solid var(--accent);
}
.gate-card::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.gate-card::after { top: -1px; right: -1px; border-left: none; border-bottom: none; }
.gate-card-c1 { bottom: -1px; left: -1px; border-right: none; border-top: none; }
.gate-card-c2 { bottom: -1px; right: -1px; border-left: none; border-top: none; }

.gate-mark-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.gate-mark {
  width: 44px; height: 44px;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 600; font-size: 14px;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: .04em;
}
.gate-id {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.gate h1 {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: 38px;
  line-height: 1.05;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.gate h1 em { color: var(--accent); font-style: italic; }
.gate p.lede {
  color: var(--muted);
  margin: 0 0 28px;
  font-size: 14.5px;
  line-height: 1.55;
}
.gate-label {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted);
  margin-bottom: 10px;
  font-family: "JetBrains Mono", monospace;
}
.gate-label .req { color: var(--accent); }
.gate-input {
  width: 100%;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg-2);
  font-family: "JetBrains Mono", monospace;
  font-size: 16px;
  letter-spacing: .15em;
  text-align: center;
  text-transform: uppercase;
  color: var(--ink);
  outline: none;
  transition: all .2s;
}
.gate-input:focus {
  border-color: var(--accent);
  background: var(--card);
  box-shadow: 0 0 0 3px rgba(217,113,78,.18);
}
.gate-input.shake {
  animation: shake .4s;
  border-color: #c44;
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
.gate-btn {
  width: 100%;
  margin-top: 14px;
  padding: 15px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.gate-btn:hover { background: var(--accent-ink); }
.gate-error {
  margin-top: 14px;
  color: #c44;
  font-size: 12px;
  text-align: center;
  min-height: 18px;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: .04em;
}
[data-theme="dark"] .gate-error { color: #ff7a5e; }
.gate-foot {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px dashed var(--line);
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
  line-height: 1.7;
  font-family: "JetBrains Mono", monospace;
}
.gate-foot a { color: var(--accent); text-decoration: none; }
.key-hint kbd {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1px 6px;
  font-size: 10.5px;
}

/* ============ APP ============ */
.app {
  opacity: 0;
  transition: opacity .6s ease .2s;
  position: relative;
  z-index: 1;
}
.app.is-visible { opacity: 1; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Nav */
nav.top {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.avatar {
  width: 34px; height: 34px;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 600; font-size: 13px;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: .04em;
  flex-shrink: 0;
}
.brand-name { font-weight: 500; font-size: 14px; white-space: nowrap; }
.welcome {
  margin-left: 12px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 11.5px;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.welcome span.who { color: var(--ink); text-transform: none; letter-spacing: 0; font-family: "Geist", sans-serif; font-size: 13px; }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  color: var(--ink-soft); text-decoration: none;
  font-size: 13px;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: .04em;
  transition: color .15s;
  position: relative;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent); }
.nav-links a.active::after {
  content: ""; position: absolute;
  left: 0; right: 0; bottom: -19px;
  height: 2px; background: var(--accent);
}
.nav-actions { display: flex; gap: 8px; align-items: center; }
.icon-btn {
  width: 36px; height: 36px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
  display: grid; place-items: center;
  color: var(--ink-soft);
  transition: all .15s;
}
.icon-btn:hover { background: var(--bg-2); color: var(--ink); border-color: var(--line-strong); }
.icon-btn svg { width: 16px; height: 16px; }
.btn-primary {
  background: var(--accent); color: #fff;
  padding: 10px 16px; border-radius: 4px;
  font-size: 12px; font-weight: 500;
  text-decoration: none;
  border: none; cursor: pointer;
  transition: all .15s;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.btn-primary:hover { background: var(--accent-ink); }
.btn-secondary {
  background: transparent; color: var(--ink);
  padding: 10px 16px; border-radius: 4px;
  font-size: 12px; font-weight: 500;
  border: 1px solid var(--line-strong);
  cursor: pointer; text-decoration: none;
  transition: all .15s;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.btn-secondary:hover { background: var(--bg-2); border-color: var(--ink); }

/* Mobile menu */
.menu-btn { display: none; }
.mobile-menu {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 39;
  transform: translateY(-100%);
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
  padding: 100px 32px 40px;
}
.mobile-menu.open { transform: translateY(0); }
.mobile-menu a {
  display: block;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-family: "Instrument Serif", serif;
  font-size: 32px;
  color: var(--ink);
  text-decoration: none;
}
.mobile-menu .num {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--muted);
  margin-right: 14px;
  letter-spacing: .1em;
  vertical-align: middle;
}

/* Section markers */
.section-marker {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 32px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-marker .num { color: var(--accent); }
.section-marker .line {
  flex: 1; height: 1px; background: var(--line);
  position: relative;
}
.section-marker .line::before, .section-marker .line::after {
  content: ""; position: absolute;
  width: 1px; height: 7px; background: var(--line);
  top: -3px;
}
.section-marker .line::before { left: 0; }
.section-marker .line::after { right: 0; }
.section-marker .meta { color: var(--muted); }

/* HERO */
.hero { padding: 60px 0 100px; position: relative; }
.hero-bg-letters {
  position: absolute; right: -40px; top: 50%;
  transform: translateY(-50%);
  font-family: "Instrument Serif", serif;
  font-size: clamp(220px, 30vw, 380px);
  line-height: .9;
  color: var(--accent);
  opacity: .04;
  pointer-events: none;
  user-select: none;
  font-style: italic;
}
[data-theme="dark"] .hero-bg-letters { opacity: .08; }
.hero-meta {
  display: flex; gap: 24px; flex-wrap: wrap;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px dashed var(--line);
}
.hero-meta .pair { display: flex; gap: 8px; }
.hero-meta .pair b { color: var(--ink); font-weight: 500; }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px;
  background: rgba(79,138,93,.08);
  border: 1px solid rgba(79,138,93,.25);
  border-radius: 999px;
  color: var(--green);
  font-size: 11.5px;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: .06em;
  margin-bottom: 28px;
}
.status-pill .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(79,138,93,.15);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 4px rgba(79,138,93,.15); }
  50% { box-shadow: 0 0 0 8px rgba(79,138,93,0); }
}
h1.hero-title {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: clamp(56px, 9vw, 124px);
  line-height: 1;
  letter-spacing: -0.025em;
  margin: 0 0 32px;
  max-width: 950px;
}
h1.hero-title em { color: var(--accent); font-style: italic; }
.hero-lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 580px;
  margin: 0 0 40px;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 540px;
  gap: 0;
  margin-bottom: 40px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--card);
}
.stat {
  padding: 18px 22px;
  border-right: 1px solid var(--line);
}
.stat:last-child { border-right: none; }
.stat .v { font-size: 22px; font-weight: 600; line-height: 1; font-family: "JetBrains Mono", monospace; letter-spacing: -0.01em; }
.stat .l { font-size: 10px; color: var(--muted); margin-top: 8px; text-transform: uppercase; letter-spacing: .1em; font-family: "JetBrains Mono", monospace; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-cta a {
  padding: 14px 22px; border-radius: 4px;
  font-size: 12px; font-weight: 500;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all .15s;
  display: inline-flex; align-items: center; gap: 10px;
}
.hero-cta a.primary { background: var(--accent); color: #fff; }
.hero-cta a.primary:hover { background: var(--accent-ink); }
.hero-cta a.secondary { background: var(--card); color: var(--ink); border: 1px solid var(--line-strong); }
.hero-cta a.secondary:hover { background: var(--bg-2); border-color: var(--ink); }

/* SECTIONS */
section.scroll-target { scroll-margin-top: 80px; padding: 60px 0 80px; }
h2.section-title {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: clamp(40px, 5.5vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  max-width: 900px;
}
h2.section-title em { color: var(--accent); font-style: italic; }
.section-lede {
  font-size: 16px;
  color: var(--ink-soft);
  max-width: 640px;
  line-height: 1.55;
  margin: 0 0 48px;
}

/* ABOUT */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: start;
}
.about-copy p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0 0 18px;
}
.quote-block {
  font-family: "Instrument Serif", serif;
  font-size: 28px !important;
  line-height: 1.25 !important;
  color: var(--ink) !important;
  border-left: 2px solid var(--accent);
  padding-left: 20px;
  margin: 0 0 24px !important;
}
.quote-block em { color: var(--accent); font-style: italic; }
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.info-card {
  background: var(--card);
  padding: 22px;
  transition: background .15s;
}
.info-card:hover { background: var(--bg-2); }
.info-card .l { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-family: "JetBrains Mono", monospace; margin-bottom: 8px; }
.info-card .v { font-size: 15px; font-weight: 500; }
.info-card.span2 { grid-column: span 2; }
.strengths-card {
  grid-column: span 2;
  background: var(--card);
  padding: 22px;
}
.strengths-card .l { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-family: "JetBrains Mono", monospace; margin-bottom: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  padding: 6px 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 12px;
  color: var(--ink-soft);
  font-family: "JetBrains Mono", monospace;
  letter-spacing: .02em;
}
.tag.accent { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }

/* TIMELINE */
.timeline {
  position: relative;
  padding-left: 32px;
}
.timeline::before {
  content: ""; position: absolute;
  left: 7px; top: 12px; bottom: 12px;
  width: 1px; background: var(--line-strong);
}
.tl-item {
  position: relative;
  margin-bottom: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 22px 26px;
  transition: all .2s;
}
.tl-item:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.tl-item::before {
  content: "";
  position: absolute;
  left: -32px; top: 26px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--line-strong);
  transition: all .2s;
}
.tl-item.current::before {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.tl-period { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.tl-current-pill {
  display: inline-block; margin-left: 8px;
  padding: 2px 8px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-radius: 3px;
  font-size: 10px;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: .1em;
}
.tl-title { font-size: 19px; font-weight: 600; margin: 8px 0 4px; letter-spacing: -0.01em; }
.tl-sub { color: var(--ink-soft); font-size: 14px; margin-bottom: 12px; }
.tl-desc { color: var(--ink-soft); font-size: 14px; line-height: 1.6; }

/* SKILLS */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 4px;
  margin-bottom: 56px;
}
.skill-card {
  background: var(--card);
  padding: 28px;
  transition: all .2s;
  cursor: default;
}
.skill-card:hover { background: var(--bg-2); }
.skill-num {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .1em;
  margin-bottom: 22px;
}
.skill-num .nbox {
  width: 24px; height: 24px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-radius: 3px;
  display: grid; place-items: center;
  font-size: 11px;
  font-weight: 600;
}
.skill-card h3 { font-size: 18px; font-weight: 600; margin: 0 0 8px; letter-spacing: -0.01em; }
.skill-card p { color: var(--muted); font-size: 13.5px; line-height: 1.55; margin: 0; }

.competence-head {
  display: flex; align-items: baseline; justify-content: space-between;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 16px;
  margin-bottom: 28px;
}
.competence-head h3 { font-family: "Instrument Serif", serif; font-weight: 400; font-size: 32px; margin: 0; letter-spacing: -0.01em; }
.competence-head .meta { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }
.competence-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.competence-col h4 {
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--accent);
  margin: 0 0 18px;
  font-weight: 500;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.cap-item {
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px dashed var(--line);
}
.cap-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.cap-name { font-size: 14px; font-weight: 600; margin-bottom: 10px; letter-spacing: -0.01em; }
.cap-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.cap-list li {
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  color: var(--ink-soft);
  letter-spacing: .03em;
  display: flex; align-items: baseline; gap: 8px;
}
.cap-list li::before {
  content: "·";
  color: var(--accent);
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}

/* PROJECTS */
.project-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 28px 32px;
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 24px;
  align-items: start;
  transition: all .2s;
}
.project-card:hover { border-color: var(--accent); }
.project-icon {
  width: 48px; height: 48px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-radius: 4px;
  display: grid; place-items: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 600;
}
.proj-co { font-family: "JetBrains Mono", monospace; font-size: 10.5px; color: var(--accent-ink); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 6px; }
[data-theme="dark"] .proj-co { color: var(--accent); }
.proj-title { font-size: 22px; font-weight: 600; margin: 0 0 10px; letter-spacing: -0.01em; }
.proj-desc { color: var(--ink-soft); font-size: 14.5px; line-height: 1.55; margin: 0 0 16px; max-width: 720px; }
.proj-num {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .12em;
  text-align: right;
}
.conf-note {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  padding: 18px 22px;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.5;
  margin-top: 18px;
  background: var(--card);
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.conf-note .label {
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  color: var(--accent);
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 600;
  flex-shrink: 0;
  padding-top: 1px;
}

/* INTERESTS */
.interests-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.interest-card {
  background: var(--card);
  padding: 22px;
  transition: all .2s;
}
.interest-card:hover { background: var(--bg-2); }
.interest-card.feat { background: var(--accent-soft); }
.interest-card.feat:hover { background: var(--accent-soft); }
.interest-card h4 { font-size: 16px; font-weight: 600; margin: 0 0 6px; letter-spacing: -0.01em; }
.interest-card p { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.5; }
.interest-card.feat h4, .interest-card.feat p { color: var(--accent-ink); }
[data-theme="dark"] .interest-card.feat h4, [data-theme="dark"] .interest-card.feat p { color: var(--accent); }
.interest-card.span2 { grid-column: span 2; }

/* CONTACT */
.contact-section {
  padding: 100px 0 100px !important;
}
.contact-shell {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0;
  overflow: hidden;
  position: relative;
}
.contact-shell::before {
  content: ""; position: absolute;
  inset: 0;
  background:
    radial-gradient(800px 400px at 100% 0%, var(--accent-soft), transparent 60%),
    radial-gradient(600px 400px at 0% 100%, var(--accent-soft), transparent 60%);
  opacity: .8;
  pointer-events: none;
}
[data-theme="dark"] .contact-shell::before { opacity: 1; }
.contact-header {
  position: relative;
  padding: 32px 40px;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px dashed var(--line);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.contact-header .left { color: var(--accent); }
.contact-body {
  position: relative;
  padding: 80px 64px 64px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: start;
}
.contact-left h3 {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: clamp(48px, 6vw, 80px);
  line-height: .98;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
}
.contact-left h3 em { color: var(--accent); font-style: italic; }
.contact-left p {
  font-size: 17px;
  color: var(--ink-soft);
  line-height: 1.55;
  max-width: 520px;
  margin: 0 0 36px;
}
.contact-cta-row {
  display: flex; gap: 10px; flex-wrap: wrap;
}
.contact-cta-row a {
  padding: 16px 26px; border-radius: 4px;
  font-size: 12.5px; font-weight: 500;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all .15s;
  display: inline-flex; align-items: center; gap: 10px;
}
.contact-cta-row a.primary { background: var(--accent); color: #fff; }
.contact-cta-row a.primary:hover { background: var(--accent-ink); transform: translateY(-1px); }
.contact-cta-row a.secondary { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.contact-cta-row a.secondary:hover { background: var(--bg-2); border-color: var(--ink); }

.contact-right {
  border-left: 1px dashed var(--line);
  padding-left: 60px;
}
.contact-right h4 {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted);
  margin: 0 0 24px;
  font-weight: 500;
}
.contact-method {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px dashed var(--line);
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  transition: all .15s;
}
.contact-method:last-child { border-bottom: none; }
.contact-method:hover { color: var(--accent); padding-left: 6px; }
.contact-method .num {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .1em;
}
.contact-method .label {
  font-size: 11px;
  font-family: "JetBrains Mono", monospace;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  margin-bottom: 4px;
}
.contact-method .value {
  font-size: 16px;
  font-weight: 500;
}
.contact-method .arrow {
  font-family: "JetBrains Mono", monospace;
  color: var(--muted);
  transition: all .15s;
}
.contact-method:hover .arrow { color: var(--accent); transform: translateX(4px); }

.contact-footer {
  position: relative;
  padding: 22px 40px;
  border-top: 1px dashed var(--line);
  display: flex; justify-content: space-between; align-items: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.contact-footer .signal {
  display: inline-flex; align-items: center; gap: 6px;
}
.contact-footer .signal .dot {
  width: 6px; height: 6px; background: var(--green); border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(79,138,93,.18);
}

footer.foot {
  padding: 40px 0 50px;
  border-top: 1px solid var(--line);
  margin-top: 40px;
  color: var(--muted);
  font-size: 11.5px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}
footer.foot a { color: var(--muted); text-decoration: none; }
footer.foot a:hover { color: var(--accent); }

/* Scroll dots indicator */
.scroll-rail {
  position: fixed; right: 16px; top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  display: flex; flex-direction: column; gap: 12px;
}
.scroll-rail a {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--line-strong);
  transition: all .2s;
  text-decoration: none;
}
.scroll-rail a.active { background: var(--accent); transform: scale(1.6); }
.scroll-rail a:hover { background: var(--accent); }

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  .container { padding: 0 28px; }
  .nav-links { display: none; }
  .welcome { font-size: 10.5px; max-width: 140px; }
  .menu-btn { display: grid; }
  .skills-grid, .competence-grid, .interests-grid { grid-template-columns: 1fr 1fr; }
  .contact-body { grid-template-columns: 1fr; gap: 48px; padding: 56px 40px 48px; }
  .contact-right { border-left: none; border-top: 1px dashed var(--line); padding-left: 0; padding-top: 40px; }
  .about-grid { grid-template-columns: 1fr; }
  .scroll-rail { display: none; }
  .hero-bg-letters { font-size: 200px; right: -20px; opacity: .03; }
}
@media (max-width: 768px) {
  html, body { overflow-x: hidden; width: 100%; }
  body { padding-left: 0; padding-right: 0; }
  .container {
    width: 100%; max-width: 100%;
    padding-left: 24px !important;
    padding-right: 24px !important;
    margin-left: auto; margin-right: auto;
  }
  nav.top .container, section .container, footer .container, .hero .container {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
  .nav-row { gap: 10px; padding: 12px 0; }
  .welcome, .nav-links { display: none; }
  .menu-btn { display: grid; }
  .hero { padding-top: 32px; padding-bottom: 64px; }
  .hero-meta { gap: 10px; font-size: 10px; }
  .hero-title { font-size: clamp(42px, 14vw, 64px) !important; line-height: .95; }
  .hero-lede { font-size: 15px; line-height: 1.5; }
  .hero-stats { grid-template-columns: 1fr; }
  .about-grid, .competence-grid, .contact-body, .skills-grid, .interests-grid { grid-template-columns: 1fr !important; }
  .project-card { grid-template-columns: 1fr; gap: 18px; padding: 22px; }
  .proj-num { text-align: left; }
  .contact-body { gap: 40px; padding: 48px 24px; }
  .contact-right { border-left: none; padding-left: 0; }
  .contact-header, .contact-footer { padding-left: 24px; padding-right: 24px; }
  .info-grid { grid-template-columns: 1fr; }
  .info-card.span2, .strengths-card { grid-column: span 1; }
  .interest-card.span2 { grid-column: span 1; }
  .skills-grid, .interests-grid, .info-grid { gap: 1px; }
  .project-card, .skill-card, .interest-card, .tl-item, .contact-shell, .info-card { width: 100%; max-width: 100%; }
  .hero-bg-letters { display: none; }
  .gate-card { padding: 28px 22px; }
  .gate h1 { font-size: 32px; }
  .mobile-menu { padding-left: 24px; padding-right: 24px; }
}
@media (max-width: 640px) {
  .container { padding: 0 22px; }
  .nav-row { padding: 12px 0; }
  .brand-name { display: none; }
  .nav-actions .btn-primary { display: none; }
  .hero { padding: 40px 0 64px; }
  .hero-meta { gap: 14px; font-size: 10px; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .hero-stats .stat:nth-child(3) { grid-column: span 2; border-top: 1px solid var(--line); border-right: none; }
  .hero-stats .stat:nth-child(2) { border-right: none; }
  .hero-cta { flex-direction: column; }
  .hero-cta a { justify-content: center; }
  section.scroll-target { padding: 44px 0 56px; }
  .skills-grid, .competence-grid, .interests-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .info-card.span2, .strengths-card { grid-column: span 1; }
  .project-card { grid-template-columns: 40px 1fr; padding: 20px 18px; gap: 14px; }
  .proj-num { display: none; }
  .contact-section { padding: 60px 0 70px !important; }
  .contact-header, .contact-footer { padding-left: 22px; padding-right: 22px; flex-wrap: wrap; gap: 8px; }
  .contact-body { padding: 40px 22px 40px; }
  .contact-cta-row a { width: 100%; justify-content: center; }
  .gate { padding: 16px; }
  .gate-card { padding: 32px 24px 28px; }
  .gate h1 { font-size: 30px; }
  .gate-corner { display: none; }
  .timeline { padding-left: 24px; }
  .timeline::before { left: 5px; }
  .tl-item::before { left: -24px; width: 12px; height: 12px; top: 24px; }
  .tl-item { padding: 18px 18px; }
  .competence-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .stat { padding: 16px 16px; }
  .skill-card { padding: 22px 18px; }
  .section-marker { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
