/* ============================================================
   CODEBLU — Geospatial Portfolio
   Design tokens + base + sections
   ============================================================ */

:root {
  /* Surfaces */
  --bg:        #0C0F14;
  --bg-2:      #0F141B;
  --surface:   #121821;
  --surface-2: #161E29;
  --line:      #1E2935;
  --line-2:    #283545;

  /* Accents */
  --teal:      #00D8C0;
  --teal-dim:  #0a8d80;
  --amber:     #F5A623;
  --slate:     #3A4F6C;
  --slate-2:   #4D6488;

  /* Text */
  --ink:       #E6EDF5;
  --ink-2:     #9DB0C4;
  --ink-3:     #5E7088;
  --ink-faint: #36465a;

  /* Type */
  --display: "Space Grotesk", system-ui, sans-serif;
  --body:    "Inter", system-ui, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, monospace;

  /* Rhythm */
  --pad: clamp(20px, 5vw, 96px);
  --maxw: 1340px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  cursor: none;
}

/* ---- Contour texture layer (fixed, behind everything) ---- */
.field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 80% -10%, rgba(0,216,192,0.06), transparent 45%),
    radial-gradient(circle at 0% 100%, rgba(245,166,35,0.04), transparent 40%);
}
.field svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.field .contour { stroke: var(--slate); fill: none; }

/* ---- Hacker-map canvas (cyber threat map background) ---- */
#hacker-map {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  width: 100%; height: 100%; display: block;
}

/* ---- Selection + scrollbar ---- */
::selection { background: var(--teal); color: #04110f; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--slate); }

/* ============================================================
   CUSTOM CROSSHAIR CURSOR
   ============================================================ */
.cursor {
  position: fixed;
  top: 0; left: 0;
  z-index: 9999;
  pointer-events: none;
  width: 26px; height: 26px;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
}
.cursor::before, .cursor::after {
  content: "";
  position: absolute;
  background: var(--teal);
  transition: opacity .2s;
}
.cursor::before { left: 50%; top: 0; width: 1.5px; height: 100%; transform: translateX(-50%); }
.cursor::after  { top: 50%; left: 0; height: 1.5px; width: 100%; transform: translateY(-50%); }
.cursor .dot {
  position: absolute; left: 50%; top: 50%;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--teal);
  transform: translate(-50%, -50%);
}
.cursor .ring {
  position: absolute; left: 50%; top: 50%;
  width: 26px; height: 26px;
  border: 1px solid rgba(0,216,192,0.5);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: transform .25s var(--ease), border-color .25s;
}
body.hovering .cursor .ring { transform: translate(-50%, -50%) scale(1); border-color: var(--amber); }
body.hovering .cursor .dot  { background: var(--amber); }
@media (hover: none), (pointer: coarse) {
  body { cursor: auto; }
  .cursor { display: none; }
}

/* ============================================================
   LOADING SCREEN
   ============================================================ */
#loader {
  position: fixed; inset: 0; z-index: 10000;
  background: var(--bg);
  display: grid; place-items: center;
  transition: opacity .8s var(--ease), visibility .8s;
}
#loader.done { opacity: 0; visibility: hidden; }
.loader-inner { width: min(420px, 80vw); text-align: center; }
.loader-grid { width: 100%; height: 160px; margin-bottom: 22px; }
.loader-grid line, .loader-grid path { stroke: var(--teal); fill: none; }
.loader-label {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink-2);
  display: flex; justify-content: space-between;
}
.loader-label .pct { color: var(--teal); }
.loader-bar { height: 1px; background: var(--line-2); margin-top: 10px; position: relative; overflow: hidden; }
.loader-bar i { position: absolute; inset: 0 100% 0 0; background: var(--teal); transition: right .2s linear; }

/* ============================================================
   LAYOUT HELPERS
   ============================================================ */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
section { position: relative; z-index: 1; }

.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--teal);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--teal); display: inline-block; }

.section-head { margin-bottom: clamp(36px, 5vw, 64px); }
.section-head h2 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(32px, 5vw, 58px); line-height: 1.02;
  letter-spacing: -0.02em; margin-top: 18px;
  text-wrap: balance;
}
.section-head p { color: var(--ink-2); max-width: 56ch; margin-top: 16px; font-size: 17px; }

.idx {
  font-family: var(--mono); font-size: 12px; color: var(--ink-3);
  letter-spacing: 0.1em;
}

/* ============================================================
   NAVBAR
   ============================================================ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px var(--pad);
  transition: background .4s var(--ease), border-color .4s, padding .4s var(--ease);
  border-bottom: 1px solid transparent;
}
nav.scrolled {
  background: rgba(12,15,20,0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
  padding-top: 14px; padding-bottom: 14px;
}
.logo {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--ink);
}
.monogram {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid var(--teal); color: var(--teal);
  font-family: var(--display); font-weight: 700; font-size: 15px;
  letter-spacing: 0.04em; position: relative;
}
.monogram::after {
  content: ""; position: absolute; inset: 3px;
  border: 1px solid rgba(0,216,192,0.25);
}
.logo .lw { display: flex; flex-direction: column; line-height: 1; }
.logo .lw b { font-family: var(--display); font-weight: 600; font-size: 14px; letter-spacing: 0.02em; color: var(--ink-2); }
.logo .lw span { font-family: var(--mono); font-size: 10px; color: var(--ink); letter-spacing: 0.14em; margin-top: 3px; }

.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-2); text-decoration: none;
  position: relative; padding: 4px 0;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: var(--teal); transition: width .3s var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }
.nav-cta {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--teal); text-decoration: none;
  transition: color .3s;
}
.nav-cta:hover { color: var(--teal); }
.nav-toggle { display: none; }

/* ============================================================
   HERO
   ============================================================ */
#hero { height: 100svh; min-height: 640px; position: relative; overflow: hidden; }
#hero-canvas { position: absolute; inset: 0; z-index: 0; }
#hero canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; }
.hero-fallback { position: absolute; inset: 0; }

.hero-vignette {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 38%, rgba(12,15,20,0.42) 100%),
    linear-gradient(to bottom, rgba(12,15,20,0.45) 0%, transparent 26%, transparent 60%, rgba(12,15,20,0.82) 100%);
}
/* sweeping scan line */
.scanline {
  position: absolute; left: 0; right: 0; height: 2px; z-index: 3; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(0,216,192,0.7), transparent);
  box-shadow: 0 0 18px rgba(0,216,192,0.6);
  animation: scan 7s linear infinite;
  opacity: 0.7;
}
@keyframes scan { 0% { top: -2%; } 100% { top: 102%; } }

.hero-content {
  position: relative; z-index: 4; height: 100%;
  display: flex; flex-direction: column; justify-content: center;
  max-width: var(--maxw); margin: 0 auto;
  padding: 0 var(--pad);
  pointer-events: none;
}
.hero-content > * { pointer-events: auto; }
.hero-tag {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.3em; color: var(--teal);
  display: inline-flex; align-items: center; gap: 12px; margin-bottom: 26px;
}
.hero-tag .pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--teal);
  box-shadow: 0 0 0 0 rgba(0,216,192,0.6); animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0,216,192,0.5); }
  70% { box-shadow: 0 0 0 12px rgba(0,216,192,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,216,192,0); }
}
.hero-content h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(40px, 8.4vw, 124px); line-height: 0.94;
  letter-spacing: -0.03em; text-transform: uppercase;
  text-wrap: balance;
}
.hero-content h1 .lo { display: block; color: var(--ink); }
.hero-content h1 .hi { display: block; color: transparent; -webkit-text-stroke: 1.4px var(--ink-2); }
.role-ticker {
  font-family: var(--mono); font-size: clamp(15px, 2.2vw, 22px);
  color: var(--ink-2); margin-top: 28px; letter-spacing: 0.04em;
  display: flex; align-items: center; gap: 4px; min-height: 1.6em;
}
.role-ticker .lead { color: var(--ink-3); margin-right: 10px; }
.role-ticker .roleword { color: var(--amber); }
.cursor-blink { display: inline-block; width: 11px; height: 1.05em; background: var(--teal); margin-left: 4px; transform: translateY(2px); animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero-ctas { display: flex; gap: 16px; margin-top: 40px; flex-wrap: wrap; }
.btn {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 15px 26px; text-decoration: none; display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid var(--teal); color: var(--teal); background: rgba(0,216,192,0.04);
  transition: background .3s, color .3s, box-shadow .3s, border-color .3s;
  position: relative;
}
.btn:hover { background: var(--teal); color: #04110f; box-shadow: 0 0 30px rgba(0,216,192,0.45); }
.btn.ghost { border-color: var(--line-2); color: var(--ink); background: transparent; }
.btn.ghost:hover { border-color: var(--amber); color: var(--amber); background: rgba(245,166,35,0.06); box-shadow: 0 0 26px rgba(245,166,35,0.2); }

/* hero corner coordinates + variant switch */
.hero-corner {
  position: absolute; z-index: 4; font-family: var(--mono); font-size: 11.5px;
  letter-spacing: 0.14em; color: var(--ink-3); text-transform: uppercase;
}
.hero-corner.tl { top: 96px; left: var(--pad); }
.hero-corner.br { bottom: 26px; right: var(--pad); text-align: right; }
.hero-corner.bl { bottom: 26px; left: var(--pad); }
.hero-corner .c-teal { color: var(--teal); }

.hero-switch {
  position: absolute; z-index: 5; bottom: 26px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px; align-items: center;
  background: rgba(12,15,20,0.6); border: 1px solid var(--line);
  backdrop-filter: blur(8px); padding: 6px;
}
.hero-switch button {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-2); background: transparent; border: none; padding: 7px 13px; cursor: none;
  transition: color .25s, background .25s;
}
.hero-switch button:hover { color: var(--ink); }
.hero-switch button.active { color: #04110f; background: var(--teal); }
.hero-switch .sw-label { color: var(--ink-3); padding: 0 8px 0 4px; }

.scroll-hint {
  position: absolute; z-index: 4; bottom: 76px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.25em; color: var(--ink-3);
  text-transform: uppercase; display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.scroll-hint .ln { width: 1px; height: 34px; background: linear-gradient(var(--teal), transparent); animation: drop 2s var(--ease) infinite; }
@keyframes drop { 0%,100% { opacity: .3; transform: scaleY(.5); transform-origin: top; } 50% { opacity: 1; transform: scaleY(1); } }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(28px); filter: blur(8px); transition: opacity .9s var(--ease), transform .9s var(--ease), filter .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; filter: blur(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; filter: none; }
  .scanline, .scroll-hint .ln, .hero-tag .pulse { animation: none; }
}

/* ============================================================
   ABOUT
   ============================================================ */
#about { padding: clamp(90px, 12vw, 170px) 0; }
.about-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(40px, 6vw, 84px); align-items: center; }
.photo-wrap { position: relative; }
.photo-frame {
  position: relative; aspect-ratio: 1/1; width: 100%;
  background:
    radial-gradient(circle at 50% 40%, rgba(0,216,192,0.22), transparent 62%),
    linear-gradient(145deg, var(--surface-2), var(--bg-2));
  border: 1px solid var(--line-2);
  display: grid; place-items: center; overflow: hidden;
}
.photo-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-frame .ph-label { font-family: var(--mono); font-size: 12px; color: var(--ink-3); letter-spacing: 0.16em; text-align: center; z-index: 1; }
.photo-frame .ph-label b { display: block; color: var(--teal); margin-bottom: 6px; font-size: 13px; }
.photo-corners::before, .photo-corners::after,
.photo-corners i::before, .photo-corners i::after {
  content: ""; position: absolute; width: 18px; height: 18px; border: 1px solid var(--teal); z-index: 2;
}
.photo-corners::before { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.photo-corners::after  { top: 10px; right: 10px; border-left: 0; border-bottom: 0; }
.photo-corners i::before { bottom: 10px; left: 10px; border-right: 0; border-top: 0; }
.photo-corners i::after  { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }
.photo-coord { position: absolute; bottom: 14px; left: 14px; font-family: var(--mono); font-size: 10.5px; color: var(--ink-2); letter-spacing: 0.1em; z-index: 3; }

.about-bio p { font-size: clamp(17px, 1.5vw, 20px); color: var(--ink); line-height: 1.7; }
.about-bio p + p { margin-top: 16px; color: var(--ink-2); font-size: 16px; }
.about-bio .lead-em { color: var(--teal); }

.pill-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; align-items: center; }
.pill {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid var(--line-2); color: var(--ink-2); padding: 8px 14px;
}
.pill.on { border-color: var(--teal-dim); color: var(--teal); }
.pill-arrow { color: var(--ink-3); font-family: var(--mono); }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 34px; }
.stat {
  border: 1px solid var(--line); background: var(--surface);
  padding: 22px 18px; position: relative; overflow: hidden;
}
.stat::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: linear-gradient(90deg, var(--teal), transparent); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.stat:hover::before { transform: scaleX(1); }
.stat .num { font-family: var(--display); font-weight: 700; font-size: clamp(30px, 4vw, 44px); color: var(--ink); letter-spacing: -0.02em; }
.stat .num em { color: var(--teal); font-style: normal; }
.stat .lab { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-top: 8px; }

/* ============================================================
   SKILLS
   ============================================================ */
#skills { padding: clamp(70px, 10vw, 130px) 0; }
.skills-scroll {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px;
  max-width: var(--maxw); margin: 0 auto;
  padding: 6px var(--pad) 10px;
}
.skill-card {
  background: var(--surface); border: 1px solid var(--line);
  padding: 28px 26px 30px; position: relative;
  transition: transform .4s var(--ease), border-color .4s, box-shadow .4s;
  transform-style: preserve-3d; will-change: transform;
}
.skill-card:hover { border-color: var(--teal-dim); box-shadow: 0 22px 60px -30px rgba(0,216,192,0.5); }
.skill-card .sk-no { font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.1em; }
.skill-card h3 { font-family: var(--display); font-weight: 600; font-size: 22px; margin: 14px 0 4px; letter-spacing: -0.01em; }
.skill-card .sk-cat { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber); }
.skill-list { margin-top: 22px; display: flex; flex-direction: column; gap: 14px; }
.skill-item { display: grid; gap: 7px; }
.skill-item .si-top { display: flex; justify-content: space-between; align-items: baseline; }
.skill-item .si-name { font-size: 14.5px; color: var(--ink); }
.skill-item .si-pct { font-family: var(--mono); font-size: 12px; color: var(--teal); }
.skill-item .bar { height: 2px; background: var(--line-2); position: relative; overflow: hidden; }
.skill-item .bar i { position: absolute; inset: 0 100% 0 0; background: linear-gradient(90deg, var(--teal-dim), var(--teal)); transition: right 1.1s var(--ease); }
.skill-card.in .skill-item .bar i { /* width set via inline var */ }
.skill-tags { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 9px; }
.skill-tag {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.03em;
  color: var(--ink); border: 1px solid var(--line-2); background: var(--bg-2);
  padding: 9px 13px; transition: border-color .3s, color .3s, background .3s;
}
.skill-card:hover .skill-tag { border-color: rgba(0,216,192,0.28); }
.skill-tag:hover { color: var(--teal); border-color: var(--teal-dim); background: rgba(0,216,192,0.05); }

/* ============================================================
   PROJECTS — bento
   ============================================================ */
#projects { padding: clamp(70px, 10vw, 130px) 0; }
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; grid-auto-rows: minmax(220px, auto); }
.proj { grid-column: span 3; }
.proj.lg { grid-column: span 4; grid-row: span 2; }
.proj.med { grid-column: span 2; grid-row: span 2; }
.proj.sm { grid-column: span 2; }
.proj-card {
  position: relative; height: 100%; background: var(--surface);
  border: 1px solid var(--line); overflow: hidden;
  display: flex; flex-direction: column; padding: 0;
  transition: transform .4s var(--ease);
}
.proj-card::before {
  content: ""; position: absolute; inset: 0; padding: 1px; z-index: 4; pointer-events: none;
  background: linear-gradient(130deg, var(--teal), var(--amber), var(--slate));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .4s var(--ease);
}
.proj-card:hover::before { opacity: 1; }
.proj-shot {
  position: relative; flex: 1; min-height: 120px; overflow: hidden;
  background: linear-gradient(160deg, var(--surface-2), var(--bg-2));
  border-bottom: 1px solid var(--line);
}
.proj-shot .shot-grid { position: absolute; inset: 0; opacity: .5;
  background-image: linear-gradient(var(--line-2) 1px, transparent 1px), linear-gradient(90deg, var(--line-2) 1px, transparent 1px);
  background-size: 34px 34px; }
.proj-shot .shot-art { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.proj-shot .shot-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.proj-shot .shot-label { position: absolute; bottom: 12px; left: 14px; z-index: 3; font-family: var(--mono); font-size: 10.5px; color: var(--ink-2); letter-spacing: 0.12em; text-shadow: 0 1px 4px rgba(0,0,0,0.6); pointer-events: none; }
.proj-shot .shot-glow { position: absolute; inset: 0; z-index: 2; background: radial-gradient(circle at 70% 30%, rgba(0,216,192,0.16), transparent 55%); opacity: 0; transition: opacity .5s; pointer-events: none; }
.proj-card:hover .shot-glow { opacity: 1; }
.proj-body { padding: 22px 24px 24px; position: relative; z-index: 2; }
.proj-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.proj-tags span { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); border: 1px solid var(--teal-dim); padding: 4px 9px; }
.proj-body h3 { font-family: var(--display); font-weight: 600; font-size: clamp(19px, 2vw, 27px); letter-spacing: -0.01em; line-height: 1.1; }
.proj-body p { color: var(--ink-2); font-size: 14.5px; margin-top: 10px; max-width: 48ch; }
.proj-link { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; transition: color .3s, gap .3s; }
.proj-link:hover { color: var(--amber); gap: 14px; }
.proj-no { position: absolute; top: 16px; right: 18px; z-index: 3; font-family: var(--mono); font-size: 11px; color: var(--ink-3); }

/* ============================================================
   EXPERIENCE timeline
   ============================================================ */
#experience { padding: clamp(70px, 10vw, 130px) 0; }
.timeline { position: relative; max-width: 1040px; margin: 0 auto; }
.timeline::before { content: ""; position: absolute; left: 50%; top: 6px; bottom: 6px; width: 1px; background: var(--line-2); transform: translateX(-50%); }
.tl-item { position: relative; width: 50%; padding: 0 48px 50px; }
.tl-item:nth-child(odd) { left: 0; text-align: right; }
.tl-item:nth-child(even) { left: 50%; }
.tl-node { position: absolute; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--teal); box-shadow: 0 0 0 4px rgba(0,216,192,0.12), 0 0 18px rgba(0,216,192,0.6); z-index: 2; }
.tl-item:nth-child(odd) .tl-node { right: -7px; }
.tl-item:nth-child(even) .tl-node { left: -7px; }
.tl-card { background: var(--surface); border: 1px solid var(--line); padding: 22px 24px; transition: border-color .4s, transform .4s var(--ease); }
.tl-card:hover { border-color: var(--teal-dim); transform: translateY(-3px); }
.tl-date { font-family: var(--mono); font-size: 12px; color: var(--amber); letter-spacing: 0.08em; }
.tl-card h3 { font-family: var(--display); font-weight: 600; font-size: 22px; color: var(--teal); margin: 8px 0 2px; }
.tl-role { font-size: 15px; color: var(--ink); font-weight: 500; }
.tl-card p { color: var(--ink-2); font-size: 14px; margin-top: 10px; }
.tl-loc { font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.1em; margin-top: 10px; display: block; }

/* ============================================================
   EDUCATION & CERTS
   ============================================================ */
#education { padding: clamp(70px, 10vw, 130px) 0; }
.edu-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.edu-card { background: var(--surface); border: 1px solid var(--line); padding: 28px 26px; position: relative; transition: border-color .4s, transform .4s var(--ease); }
.edu-card:hover { border-color: var(--teal-dim); transform: translateY(-4px); }
.edu-card .edu-yr { font-family: var(--mono); font-size: 12px; color: var(--amber); letter-spacing: 0.1em; }
.edu-card h3 { font-family: var(--display); font-weight: 600; font-size: 20px; margin: 14px 0 6px; line-height: 1.15; }
.edu-card .edu-org { font-size: 14px; color: var(--ink-2); }
.edu-card .edu-deg { font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.1em; text-transform: uppercase; margin-top: 16px; }
.cert-strip { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.cert {
  display: flex; align-items: center; gap: 12px; padding: 13px 18px;
  border: 1px solid var(--line-2); background: var(--surface);
  transition: border-color .3s, background .3s;
}
.cert:hover { border-color: var(--teal-dim); }
.cert .badge { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--teal-dim); color: var(--teal); font-family: var(--mono); font-size: 11px; }
.cert .cert-t { font-family: var(--display); font-weight: 600; font-size: 14px; }
.cert .cert-s { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); letter-spacing: 0.08em; }
.cert.prog .badge { border-color: var(--amber); color: var(--amber); }

/* ============================================================
   CONTACT
   ============================================================ */
#contact { padding: clamp(100px, 14vw, 200px) 0 0; position: relative; }
.contact-inner { text-align: center; max-width: 900px; margin: 0 auto; }
.contact-inner h2 { font-family: var(--display); font-weight: 700; font-size: clamp(40px, 8vw, 100px); line-height: 0.96; letter-spacing: -0.03em; text-wrap: balance; }
.contact-inner h2 .em { color: var(--teal); }
.contact-inner > p { color: var(--ink-2); font-size: 18px; margin-top: 24px; max-width: 50ch; margin-inline: auto; }
.contact-meta { font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em; color: var(--ink-3); margin-top: 22px; }
.contact-meta { word-break: break-word; }
.contact-links { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 44px; }
.c-link {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; border: 1px solid var(--line-2);
  padding: 16px 26px; display: inline-flex; align-items: center; gap: 10px;
  transition: border-color .3s, color .3s, background .3s, box-shadow .3s;
}
.c-link:hover { border-color: var(--teal); color: var(--teal); box-shadow: 0 0 30px rgba(0,216,192,0.25); }
.c-link .ar { color: var(--ink-3); }
.c-link:hover .ar { color: var(--teal); }

footer { margin-top: clamp(80px, 12vw, 150px); border-top: 1px solid var(--line); padding: 26px 0 34px; }
.foot-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); letter-spacing: 0.1em; }
.foot-inner .c-teal { color: var(--teal); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .photo-frame { max-width: 380px; }
  .skills-scroll { grid-template-columns: repeat(2, 1fr); }
  .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: minmax(200px, auto); }
  .proj, .proj.lg, .proj.med, .proj.sm { grid-column: span 2; grid-row: auto; }
  .timeline::before { left: 18px; }
  .tl-item { width: 100%; left: 0 !important; text-align: left !important; padding: 0 0 40px 48px; }
  .tl-item .tl-node { left: 11px !important; right: auto !important; }
  .edu-row { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-links.open { display: flex; position: absolute; top: 100%; right: 0; left: 0; flex-direction: column; gap: 0; background: rgba(12,15,20,0.96); border-bottom: 1px solid var(--line); padding: 10px var(--pad) 20px; }
  .nav-links.open a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: grid; gap: 5px; background: none; border: none; cursor: none; padding: 8px; }
  .nav-toggle span { width: 24px; height: 1.5px; background: var(--ink); display: block; transition: .3s; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
  .hero-corner.tl { display: none; }
  .hero-switch { bottom: 18px; }
  .scroll-hint { display: none; }
}
/* tablet refinements */
@media (max-width: 1100px) {
  .skills-scroll { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  nav { padding: 16px var(--pad); }
  nav.scrolled { padding-top: 12px; padding-bottom: 12px; }
  .hero-content h1 { font-size: clamp(34px, 10.5vw, 68px); letter-spacing: -0.03em; }
  .role-ticker { font-size: clamp(14px, 4.4vw, 20px); }
}

@media (max-width: 560px) {
  .stat-row { grid-template-columns: 1fr; }
  .skills-scroll { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr; }
  .proj, .proj.lg, .proj.med, .proj.sm { grid-column: span 1; }
  .hero-content h1 { font-size: clamp(28px, 10.5vw, 50px); }
  .hero-ctas { gap: 12px; }
  .hero-ctas .btn { flex: 1 1 auto; justify-content: center; }
  .hero-corner.br { font-size: 10px; bottom: 16px; }
  .contact-links { flex-direction: column; }
  .c-link { justify-content: center; }
  .foot-inner { justify-content: center; text-align: center; }
}

/* very small phones — prevent hero title overflow */
@media (max-width: 360px) {
  .hero-content h1 { font-size: clamp(24px, 10.5vw, 40px); }
  :root { --pad: 16px; }
}
