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

:root {
  --bg:        #050506;
  --bg2:       #0a0a0c;
  --surface:   rgba(255, 255, 255, 0.025);
  --surface-2: rgba(255, 255, 255, 0.045);
  --border:    rgba(255, 255, 255, 0.09);
  --border-2:  rgba(255, 255, 255, 0.18);
  --accent:    #5b9cff;
  --accent-2:  #2dd4bf;
  --accent-3:  #a78bfa;
  --text:      #f2f2f0;
  --muted:     rgba(242, 242, 240, 0.55);
  --faint:     rgba(242, 242, 240, 0.32);
  --radius:    10px;
  --radius-lg: 14px;
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
  --mono:      'JetBrains Mono', ui-monospace, 'SF Mono', 'Cascadia Mono', Consolas, monospace;
  --display:   'Space Grotesk', 'Inter', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

@media (pointer: fine) {
  body, a, button, .clickable { cursor: none; }
}

/* technical micro-label used all over the site */
.mono-label {
  font-family: var(--mono);
  font-size: 10.5px; font-weight: 500;
  letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--faint);
}

/* ───────────────── BACKGROUND LAYERS ───────────────── */
/* faint engineering grid + a barely-there accent tint */
#bg-mesh {
  position: fixed; inset: 0; z-index: -3;
  background:
    radial-gradient(70% 55% at 25% 10%, var(--mesh-1, rgba(91,156,255,0.06)), transparent 70%),
    radial-gradient(55% 50% at 80% 85%, var(--mesh-3, rgba(45,212,191,0.04)), transparent 70%),
    var(--bg);
}
#bg-mesh::before {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: radial-gradient(120% 90% at 50% 40%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 40%, #000 40%, transparent 100%);
}
#canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; pointer-events: none; opacity: .6; }
#bg-vignette {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(130% 100% at 50% 0%, transparent 60%, rgba(5,5,6,0.6) 100%),
    linear-gradient(to bottom, rgba(5,5,6,0.3), transparent 15%, transparent 85%, rgba(5,5,6,0.6));
}

/* ───────────────── CUSTOM CURSOR (reticle) ───────────────── */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 10000;
  pointer-events: none;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
}
.cursor-dot {
  width: 5px; height: 5px; background: #fff; border-radius: 1px;
  transition: width .18s var(--ease), height .18s var(--ease), opacity .2s;
}
.cursor-ring {
  width: 34px; height: 34px; border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.65);
  transition: width .25s var(--ease), height .25s var(--ease),
              border-color .25s var(--ease), opacity .2s, background .25s, border-radius .25s var(--ease);
}
/* crosshair ticks on the reticle */
.cursor-ring::before, .cursor-ring::after {
  content: ''; position: absolute; background: rgba(255,255,255,0.55);
}
.cursor-ring::before { left: 50%; top: -5px; width: 1px; height: 5px; box-shadow: 0 39px 0 rgba(255,255,255,0.55); }
.cursor-ring::after  { top: 50%; left: -5px; height: 1px; width: 5px; box-shadow: 39px 0 0 rgba(255,255,255,0.55); }
.cursor-ring.hover { width: 52px; height: 52px; border-radius: 10px; border-color: #fff; }
.cursor-ring.hover::before { box-shadow: 0 57px 0 rgba(255,255,255,0.55); }
.cursor-ring.hover::after  { box-shadow: 57px 0 0 rgba(255,255,255,0.55); }
.cursor-dot.hover  { width: 0; height: 0; }
.cursor-ring.click { width: 26px; height: 26px; }
.cursor-ring.click::before { box-shadow: 0 31px 0 rgba(255,255,255,0.55); }
.cursor-ring.click::after  { box-shadow: 31px 0 0 rgba(255,255,255,0.55); }
body.cv-active .cursor-ring { border-color: var(--cv-color, var(--accent-2)); background: var(--cv-glow, rgba(45,212,191,0.12)); mix-blend-mode: normal; }
body.cv-active .cursor-dot  { background: var(--cv-color, var(--accent-2)); mix-blend-mode: normal; }
body.cv-active .cursor-ring { width: 46px; height: 46px; }
body.cv-active .cursor-ring::before { box-shadow: 0 51px 0 var(--cv-color, rgba(255,255,255,0.55)); background: var(--cv-color, rgba(255,255,255,0.55)); }
body.cv-active .cursor-ring::after  { box-shadow: 51px 0 0 var(--cv-color, rgba(255,255,255,0.55)); background: var(--cv-color, rgba(255,255,255,0.55)); }
body.cv-active .cursor-ring.hover { width: 68px; height: 68px; box-shadow: 0 0 0 3px var(--cv-glow, rgba(45,212,191,0.18)); }
body.cv-active .cursor-ring.hover::before { box-shadow: 0 73px 0 var(--cv-color, rgba(255,255,255,0.55)); }
body.cv-active .cursor-ring.hover::after  { box-shadow: 73px 0 0 var(--cv-color, rgba(255,255,255,0.55)); }
body.cv-active .cursor-ring.click::before { box-shadow: 0 31px 0 var(--cv-color, rgba(255,255,255,0.55)); }
body.cv-active .cursor-ring.click::after  { box-shadow: 31px 0 0 var(--cv-color, rgba(255,255,255,0.55)); }
.cursor-hidden { opacity: 0 !important; }
@media (pointer: coarse) { .cursor-dot, .cursor-ring { display: none; } }

/* ───────────────── NAV ───────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px clamp(20px, 5vw, 56px);
  background: rgba(5,5,6,0.6);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: var(--mono);
  font-weight: 600; font-size: 14px; letter-spacing: 0;
  color: var(--text); text-decoration: none;
}
.nav-logo span { color: var(--muted); }
.nav-right { display: flex; align-items: center; gap: clamp(14px, 2.5vw, 34px); }
.nav-links { display: flex; gap: clamp(12px, 2vw, 26px); align-items: center; }
.nav-links a {
  color: var(--muted); text-decoration: none;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 1.4px; text-transform: uppercase;
  transition: color .2s;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  padding: 8px 16px; background: var(--text); color: #050506 !important;
  border-radius: 4px; transition: all .2s !important;
}
.nav-cta:hover { background: #fff; transform: translateY(-1px); }

.cv-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 13px; border-radius: 4px;
  border: 1px solid var(--border-2); background: transparent;
  color: var(--muted); font-family: var(--mono); font-size: 10.5px; font-weight: 500;
  letter-spacing: 1.2px; text-transform: uppercase;
  transition: all .2s;
}
.cv-toggle:hover { color: var(--text); border-color: var(--accent-2); }
.cv-toggle.on { color: #050506; background: var(--accent-2); border-color: transparent; }
.cv-toggle .cv-eye { font-size: 14px; line-height: 1; }
@media (max-width: 640px){ .cv-toggle span.lbl { display: none; } }

/* ───────────────── LAYOUT ───────────────── */
main { position: relative; z-index: 1; }
section { padding: clamp(80px, 12vh, 140px) clamp(20px, 5vw, 48px); max-width: 1160px; margin: 0 auto; }
main > section:not(#hero):not(#experience) { border-top: 1px solid var(--border); }

/* ───────────────── HERO ───────────────── */
#hero {
  min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
  padding-top: 140px; position: relative; max-width: 1280px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px; border-radius: 4px;
  border: 1px solid var(--border-2); background: rgba(255,255,255,0.02);
  font-family: var(--mono); font-size: 10.5px; font-weight: 500;
  letter-spacing: 1.8px; text-transform: uppercase;
  color: var(--muted); margin-bottom: 34px; width: fit-content;
  opacity: 0; animation: fadeUp .9s .15s var(--ease) forwards;
}
.hero-badge-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2);
  animation: pulse 2s infinite; flex-shrink: 0;
}
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.7); } }
.hero-name {
  font-family: var(--display);
  font-size: clamp(56px, 11vw, 132px); font-weight: 700;
  line-height: 0.9; letter-spacing: -3px; text-transform: uppercase;
  opacity: 0; animation: fadeUp .9s .3s var(--ease) forwards;
  position: relative; z-index: 2;
}
.hero-name .line1 { display: block; color: var(--text); }
.hero-name .line2 {
  display: block; color: transparent;
  -webkit-text-stroke: 1.5px rgba(242,242,240,0.75);
}
.hero-sub {
  font-size: clamp(16px, 2.2vw, 21px); font-weight: 400; color: var(--text);
  margin-top: 28px; letter-spacing: -0.3px; max-width: 560px;
  opacity: 0; animation: fadeUp .9s .45s var(--ease) forwards;
  position: relative; z-index: 2;
}
.hero-bio {
  max-width: 520px; font-size: 15px; line-height: 1.8; color: var(--muted); margin-top: 20px;
  opacity: 0; animation: fadeUp .9s .6s var(--ease) forwards;
  position: relative; z-index: 2;
}
.hero-ctas {
  display: flex; gap: 12px; margin-top: 42px; flex-wrap: wrap;
  opacity: 0; animation: fadeUp .9s .75s var(--ease) forwards;
  position: relative; z-index: 2;
}
.btn-primary {
  padding: 14px 28px; background: var(--text); color: #050506;
  border: 1px solid var(--text); border-radius: 4px;
  font-family: var(--mono); font-size: 11.5px; font-weight: 600;
  letter-spacing: 1.6px; text-transform: uppercase;
  text-decoration: none; transition: all .25s var(--ease);
  display: inline-block;
}
.btn-primary:hover { background: #fff; transform: translateY(-2px); }
.btn-secondary {
  padding: 14px 28px; background: transparent; color: var(--text);
  border: 1px solid var(--border-2); border-radius: 4px;
  font-family: var(--mono); font-size: 11.5px; font-weight: 500;
  letter-spacing: 1.6px; text-transform: uppercase;
  text-decoration: none; transition: all .25s var(--ease);
  display: inline-block;
}
.btn-secondary:hover { border-color: rgba(255,255,255,0.45); transform: translateY(-2px); }
.hero-stats {
  display: flex; gap: 0; margin-top: 60px; flex-wrap: wrap;
  border-top: 1px solid var(--border);
  opacity: 0; animation: fadeUp .9s .9s var(--ease) forwards;
  position: relative; z-index: 2; width: fit-content;
}
.hero-stats .stat { padding: 20px clamp(24px, 4vw, 44px) 0 0; margin-right: clamp(24px, 4vw, 44px); border-right: 1px solid var(--border); }
.hero-stats .stat:last-child { border-right: none; margin-right: 0; padding-right: 0; }
.stat-num { font-family: var(--display); font-size: 30px; font-weight: 700; letter-spacing: -1px; }
.stat-label { font-family: var(--mono); font-size: 10px; color: var(--faint); margin-top: 6px; font-weight: 500; letter-spacing: 1.4px; text-transform: uppercase; }
.scroll-hint {
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 10px; letter-spacing: 3px; text-transform: uppercase; color: var(--faint);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  opacity: 0; animation: fadeUp 1s 1.2s var(--ease) forwards;
}
.scroll-hint .bar { width: 1px; height: 36px; background: linear-gradient(var(--faint), transparent); animation: scrollBar 2s infinite; }
@keyframes scrollBar { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 50.1% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ── the IK robot arm ── */
/* The canvas spans the whole hero (behind the text, z-index 1 vs 2) so the
   arm never gets clipped when it reaches across toward the name. */
.hero-visual {
  position: absolute; top: 90px; right: 0; bottom: 0; left: 0;
  z-index: 1; pointer-events: none;
  opacity: 0; animation: fadeUp 1.2s .5s var(--ease) forwards;
}
#arm-canvas { width: 100%; height: 100%; display: block; }
.arm-hud {
  position: absolute; right: 8px; bottom: 40px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 1.2px;
  color: var(--faint); text-align: right; line-height: 1.9;
  text-transform: uppercase; white-space: pre;
}
.arm-hud .val { color: var(--muted); }
@media (max-width: 980px) { .hero-visual { display: none; } }

/* ───────────────── TAG MARQUEE (between hero & experience) ───────────────── */
.tag-marquee {
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  overflow: hidden; padding: 16px 0; position: relative; z-index: 1;
  background: rgba(255,255,255,0.012);
}
.tag-marquee-track {
  display: flex; gap: 44px; width: max-content;
  animation: marquee 60s linear infinite;
}
.tag-marquee-track span {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 2.5px; text-transform: uppercase; color: var(--faint);
  display: inline-flex; align-items: center; gap: 44px; white-space: nowrap;
}
.tag-marquee-track span::after { content: '+'; color: var(--border-2); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ───────────────── REVEAL ───────────────── */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: .08s; } .reveal-d2 { transition-delay: .16s; }
.reveal-d3 { transition-delay: .24s; } .reveal-d4 { transition-delay: .32s; }

/* ───────────────── SECTION LABELS ───────────────── */
.section-eyebrow {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 2.5px; text-transform: uppercase; color: var(--muted);
  margin-bottom: 18px; display: flex; align-items: center; gap: 14px;
}
.section-eyebrow .sec-num { color: var(--faint); }
.section-eyebrow::after { content: ''; height: 1px; width: 56px; background: var(--border-2); }
.section-heading {
  font-family: var(--display);
  font-size: clamp(32px, 5.5vw, 60px); font-weight: 700;
  letter-spacing: -1.5px; line-height: 1.02; margin-bottom: 56px;
  text-transform: uppercase;
}

.glass {
  background: var(--surface); border: 1px solid var(--border);
}

/* ───────────────── EXPERIENCE ───────────────── */
#experience .timeline { display: flex; flex-direction: column; }
.timeline-item { display: grid; grid-template-columns: 200px 1fr; gap: 0 44px; padding: 36px 0; border-bottom: 1px solid var(--border); }
.timeline-item:first-child { border-top: 1px solid var(--border); }
.timeline-period { font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--faint); letter-spacing: 1.2px; text-transform: uppercase; margin-bottom: 8px; }
.timeline-company { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--text); text-decoration: none; transition: color .2s; letter-spacing: .6px; text-transform: uppercase; }
.timeline-company:hover { color: var(--accent); }
.timeline-role { font-size: 19px; font-weight: 600; margin-bottom: 8px; letter-spacing: -.3px; }
.timeline-desc { font-size: 14px; color: var(--muted); line-height: 1.75; }
.timeline-tags { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 14px; }
.timeline-img { margin-top: 16px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); max-width: 440px; background: rgba(255,255,255,0.02); }
.timeline-img img { display: block; width: 100%; height: auto; }

/* ── content blocks (experience subsections + custom sections) ── */
.cs-block { margin-top: 16px; }
.cs-block-title {
  font-family: var(--display);
  font-size: 15.5px; font-weight: 600; letter-spacing: -0.2px;
  margin-bottom: 10px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.cs-block-text p { font-size: 14px; color: var(--muted); line-height: 1.75; margin-bottom: 10px; }
.cs-block-text p:last-child { margin-bottom: 0; }
.cs-img { margin-top: 12px; }
.cs-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 12px; }
.cs-fig { margin: 0; }
.cs-fig figcaption { font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.cs-fig img { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--border); background: rgba(255,255,255,0.02); }
.cs-video {
  position: relative; aspect-ratio: 16/9; margin-top: 14px;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); background: #000;
}
.cs-video iframe, .cs-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cs-video-link { margin-top: 12px; }
.cs-video-link a { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--border-2); padding-bottom: 3px; transition: color .2s, border-color .2s; }
.cs-video-link a:hover { color: var(--accent); border-color: var(--accent); }
.cs-side-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 22px; align-items: start; }
.cs-side-grid .cs-img, .cs-side-grid .cs-gallery { margin-top: 0; }
@media (max-width: 760px) { .cs-side-grid { grid-template-columns: 1fr; } }

/* experience subsections render as their own cards */
.exp-sections { margin-top: 20px; display: flex; flex-direction: column; gap: 14px; }
.exp-sections .cs-block {
  margin-top: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}

/* custom page sections */
.custom-section .cs-blocks { display: flex; flex-direction: column; gap: 16px; }
.custom-section .cs-blocks .cs-block {
  margin-top: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
}
.tag {
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: 1.2px; text-transform: uppercase;
  padding: 4px 9px; border-radius: 3px;
  background: transparent; color: var(--muted);
  border: 1px solid var(--border-2);
}

/* ───────────────── HACKATHONS ───────────────── */
.hack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.hack-card { border-radius: var(--radius); padding: 26px; transition: all .35s var(--ease); display: flex; flex-direction: column; }
.hack-card:hover { transform: translateY(-4px); border-color: var(--border-2); background: var(--surface-2); }
.hack-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.hack-name { font-size: 18px; font-weight: 600; letter-spacing: -.3px; }
.hack-date { font-family: var(--mono); font-size: 10.5px; color: var(--faint); white-space: nowrap; letter-spacing: 1px; text-transform: uppercase; }
.hack-placement { font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--accent-2); margin-bottom: 12px; letter-spacing: 1px; text-transform: uppercase; }
.hack-desc { font-size: 13.5px; color: var(--muted); line-height: 1.7; flex: 1; margin-bottom: 14px; }

/* ───────────────── PROJECTS ───────────────── */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 16px; }
.project-card { border-radius: var(--radius-lg); overflow: hidden; transition: all .4s var(--ease); position: relative; display: flex; flex-direction: column; }
.project-card:hover { transform: translateY(-5px); border-color: var(--border-2); background: var(--surface-2); }
.project-card-link { position: absolute; inset: 0; z-index: 3; }
.project-img { width: 100%; height: 210px; background: rgba(255,255,255,0.02); display: flex; align-items: center; justify-content: center; font-size: 54px; position: relative; overflow: hidden; flex-shrink: 0; border-bottom: 1px solid var(--border); }
.project-img img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(0.85); transition: filter .4s, transform .5s var(--ease); }
.project-card:hover .project-img img { filter: saturate(1.05); transform: scale(1.03); }
.project-img-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 55%, rgba(5,5,6,0.5)); }
.project-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.project-tags { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 14px; }
.project-name { font-size: 19px; font-weight: 600; margin-bottom: 9px; letter-spacing: -.3px; }
.project-desc { font-size: 13.5px; color: var(--muted); line-height: 1.7; flex: 1; }
.project-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; }
.project-link { font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; color: var(--text); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; transition: gap .2s, color .2s; }
.project-card:hover .project-link { color: var(--accent); gap: 10px; }
.project-year { font-family: var(--mono); font-size: 10.5px; color: var(--faint); letter-spacing: 1px; }
.project-card.featured { grid-column: 1 / -1; }
@media (min-width: 920px) {
  .project-card.featured { display: grid; grid-template-columns: 1.3fr 1fr; }
  .project-card.featured .project-img { height: 100%; min-height: 280px; border-bottom: none; border-right: 1px solid var(--border); }
}
.projects-more { margin-top: 40px; text-align: center; }

/* ───────────────── CONTACT ───────────────── */
#contact { text-align: center; }
.contact-card { border-radius: var(--radius-lg); padding: clamp(40px, 7vw, 64px) clamp(24px, 5vw, 56px); max-width: 680px; margin: 0 auto; }
.contact-icon { width: 56px; height: 56px; border-radius: var(--radius); background: rgba(255,255,255,0.03); border: 1px solid var(--border-2); display: flex; align-items: center; justify-content: center; font-size: 24px; margin: 0 auto 26px; }
#contact .contact-sub { font-size: 15.5px; color: var(--muted); margin-bottom: 32px; line-height: 1.7; }
#contact .section-eyebrow { justify-content: center; }
#contact .section-eyebrow::after { display: none; }

.contact-form { display: flex; flex-direction: column; gap: 12px; text-align: left; margin-bottom: 32px; }
.form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cf-input {
  width: 100%; padding: 14px 16px; background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-2); border-radius: 6px; color: var(--text);
  font-size: 14px; outline: none; transition: border-color .2s, background .2s;
  font-family: inherit;
}
.cf-input::placeholder { color: var(--faint); }
.cf-input:focus { border-color: rgba(255,255,255,0.45); background: rgba(255,255,255,0.04); }
.cf-textarea { resize: vertical; min-height: 120px; line-height: 1.6; }
.cf-submit { width: 100%; text-align: center; margin-top: 4px; cursor: none; }
.cf-status { font-size: 13px; min-height: 18px; margin-top: 2px; text-align: center; font-family: var(--mono); }
.cf-status.ok { color: var(--accent-2); }
.cf-status.err { color: #ff6b6b; }

.social-links { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.social-link {
  padding: 11px 22px; background: transparent; border: 1px solid var(--border-2); border-radius: 4px;
  color: var(--text); text-decoration: none;
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 1.4px; text-transform: uppercase;
  transition: all .2s;
}
.social-link:hover { border-color: rgba(255,255,255,0.5); background: rgba(255,255,255,0.04); transform: translateY(-2px); }

/* ───────────────── ABOUT ME ───────────────── */
.about-wrap { display: grid; grid-template-columns: 320px 1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.about-photo-col { text-align: center; position: relative; }
.about-photo {
  width: 100%; aspect-ratio: 4/5; border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-2);
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
/* CAD-style corner brackets on the photo */
.about-photo::before, .about-photo::after {
  content: ''; position: absolute; width: 18px; height: 18px; pointer-events: none;
}
.about-photo::before { top: -7px; left: -7px; border-top: 1.5px solid var(--muted); border-left: 1.5px solid var(--muted); }
.about-photo::after { bottom: -7px; right: -7px; border-bottom: 1.5px solid var(--muted); border-right: 1.5px solid var(--muted); }
.about-photo.has-photo .about-photo-fallback { display: none; }
.about-photo-fallback { font-size: 84px; opacity: 0.55; }
.about-caption { font-family: var(--mono); font-size: 11px; color: var(--faint); margin-top: 16px; letter-spacing: 1.2px; text-transform: uppercase; }
.about-bio { font-size: 15.5px; line-height: 1.85; color: var(--muted); }
.about-bio p { margin-bottom: 16px; }
.about-bio p:last-child { margin-bottom: 0; }
@media (max-width: 768px) {
  .about-wrap { grid-template-columns: 1fr; }
  .about-photo-col { max-width: 280px; margin: 0 auto; }
}

/* ───────────────── FOOTER ───────────────── */
footer {
  position: relative; z-index: 1; border-top: 1px solid var(--border);
  padding: 30px clamp(20px,5vw,48px); display: flex; align-items: center; justify-content: space-between;
  max-width: 1160px; margin: 0 auto; flex-wrap: wrap; gap: 14px;
}
.footer-copy { font-family: var(--mono); font-size: 11px; color: var(--faint); letter-spacing: .8px; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-family: var(--mono); font-size: 11px; color: var(--muted); text-decoration: none; transition: color .2s; letter-spacing: 1.2px; text-transform: uppercase; }
.footer-links a:hover { color: var(--text); }
.footer-tolerance {
  width: 100%; text-align: center; order: 10;
  padding-top: 18px; margin-top: 6px; border-top: 1px solid var(--border);
  font-family: var(--mono); font-size: 10px; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--faint);
}

/* ───────────────── CAMERA / CV UI ───────────────── */
#cv-panel {
  position: fixed; left: 20px; bottom: 20px; z-index: 9000;
  width: 220px; border-radius: var(--radius); overflow: hidden;
  background: rgba(5,5,6,0.85); border: 1px solid var(--border-2);
  backdrop-filter: blur(14px); display: none;
}
#cv-panel.show { display: block; animation: fadeUp .4s var(--ease); }
.cv-video-wrap { position: relative; width: 100%; aspect-ratio: 4/3; background: #000; }
#cv-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); opacity: .55; }
#cv-overlay { position: absolute; inset: 0; width: 100%; height: 100%; transform: scaleX(-1); }
.cv-meta { padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cv-status { font-family: var(--mono); font-size: 9.5px; font-weight: 600; color: var(--accent-2); display: flex; align-items: center; gap: 6px; letter-spacing: .8px; text-transform: uppercase; }
.cv-status .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); animation: pulse 1.4s infinite; }
.cv-gesture { font-size: 10px; color: var(--muted); }
.cv-hint { position: fixed; left: 50%; top: 80px; transform: translateX(-50%); z-index: 9001;
  background: rgba(5,5,6,0.9); border: 1px solid var(--border-2); border-radius: 6px;
  padding: 10px 20px; font-size: 13px; color: var(--text); backdrop-filter: blur(10px);
  display: none; align-items: center; gap: 10px; }
.cv-hint.show { display: flex; animation: fadeUp .4s var(--ease); }

#hero-badge-dot { cursor: none; }

/* ───────────────── TOAST ───────────────── */
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px); background: rgba(20,20,22,0.95); border: 1px solid var(--border-2); border-radius: 6px; padding: 13px 24px; font-size: 13.5px; z-index: 12000; opacity: 0; transition: all .3s var(--ease); pointer-events: none; backdrop-filter: blur(12px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }

/* ═════════════ PROJECTS GALLERY PAGE (projects.html) ═════════════ */
.subpage-hero { padding-top: 130px; padding-bottom: 0; }
.back-link { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); text-decoration: none; font-weight: 500; transition: color .2s, gap .2s; margin-bottom: 28px; }
.back-link:hover { color: var(--text); gap: 12px; }
.gallery-layout { display: grid; grid-template-columns: 240px 1fr; gap: clamp(28px, 5vw, 56px); align-items: start; max-width: 1220px; margin: 0 auto; padding: 0 clamp(20px,5vw,48px) 120px; position: relative; z-index: 1; }
.gallery-sidebar { position: sticky; top: 110px; }
.gallery-sidebar-title { font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: 2px; text-transform: uppercase; color: var(--faint); margin-bottom: 16px; }
.gallery-nav { display: flex; flex-direction: column; gap: 2px; }
.gallery-nav-item {
  text-align: left; background: none; border: none; font-family: inherit;
  color: var(--muted); font-size: 14px; font-weight: 500; padding: 9px 12px;
  border-radius: 6px; transition: all .18s; border-left: 2px solid transparent;
}
.gallery-nav-item:hover { color: var(--text); background: var(--surface); }
.gallery-nav-item.active { color: var(--text); background: var(--surface-2); border-left-color: var(--text); }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
@media (max-width: 820px) {
  .gallery-layout { grid-template-columns: 1fr; }
  .gallery-sidebar { position: static; }
  .gallery-nav { flex-direction: row; flex-wrap: wrap; gap: 8px; }
}

/* ═════════════ PROJECT DETAIL PAGE (project.html) ═════════════ */
.detail-wrap { max-width: 880px; margin: 0 auto; padding: 130px clamp(20px,5vw,48px) 120px; position: relative; z-index: 1; }
.detail-hero-img {
  width: 100%; height: clamp(220px, 40vh, 420px); border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border); display: flex; align-items: center; justify-content: center;
  font-size: 90px; overflow: hidden; margin: 28px 0 36px;
}
.detail-hero-img img { width: 100%; height: 100%; object-fit: cover; }
.detail-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.detail-title { font-family: var(--display); font-size: clamp(34px, 6vw, 62px); font-weight: 700; letter-spacing: -2px; line-height: 1.02; margin-bottom: 18px; text-transform: uppercase; }
.detail-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.detail-year { font-family: var(--mono); font-size: 11px; color: var(--faint); letter-spacing: 1.4px; text-transform: uppercase; }
.detail-body { font-size: 16px; line-height: 1.9; color: rgba(242,242,240,0.78); }
.detail-body p { margin-bottom: 18px; }
.detail-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 36px; }
.detail-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 40px; }
.detail-gallery img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); display: block; }
.detail-not-found { text-align: center; padding: 160px 24px; }

/* custom project detail sections */
.proj-sections { display: flex; flex-direction: column; gap: 18px; margin-top: 44px; }
.proj-section { border-radius: var(--radius); padding: 26px 28px; scroll-margin-top: 100px; }
.proj-section .cs-block { margin-top: 0; }
.proj-section .cs-block-title { font-size: 19px; margin-bottom: 14px; padding-bottom: 10px; }
.proj-section .cs-block-text p { font-size: 14.5px; }

/* "Contents" sidebar */
.detail-toc { border-radius: var(--radius); padding: 18px 20px; margin: 24px 0 8px; }
.toc-title { font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--faint); margin-bottom: 12px; }
.toc-link { display: block; font-size: 12.5px; color: var(--muted); text-decoration: none; padding: 5px 0 5px 12px; border-left: 2px solid var(--border); transition: color .2s, border-color .2s; }
.toc-link:hover { color: var(--text); }
.toc-link.active { color: var(--text); border-left-color: var(--text); }
@media (min-width: 1400px) {
  .detail-toc {
    position: fixed; top: 110px; left: calc(50% - 690px);
    width: 220px; margin: 0;
    max-height: calc(100vh - 170px); overflow-y: auto;
  }
}

/* ───────────────── RESPONSIVE ───────────────── */
@media (max-width: 768px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .timeline-item { grid-template-columns: 1fr; gap: 8px; }
  .hero-name { letter-spacing: -2px; }
  .form-2col { grid-template-columns: 1fr; }
  #cv-panel { width: 160px; }
  footer { flex-direction: column; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .tag-marquee-track { animation: none !important; }
}
