/* ========== BASE ========== */
:root {
  --bg-0: #05080f;
  --bg-1: #0a1020;
  --bg-2: #0f1830;
  --nav-ink: #e9eef9;
  --ink: #e9eef9;
  --ink-dim: #8aa0c6;
  --ink-faint: #5a6f96;
  --gold: #d4a84b;
  --gold-2: #f5cd7a;
  --gold-soft: rgba(212, 168, 75, 0.18);
  --stroke: rgba(255, 255, 255, 0.08);
  --stroke-2: rgba(255, 255, 255, 0.14);
  --glass: rgba(255, 255, 255, 0.035);
  --glass-2: rgba(255, 255, 255, 0.06);
  --radius: 18px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { background: var(--bg-0); color: var(--ink); font-family: 'Inter', system-ui, -apple-system, sans-serif; font-feature-settings: "ss01", "cv11"; -webkit-font-smoothing: antialiased; }

body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(1200px 800px at 10% -10%, rgba(30, 60, 140, 0.35), transparent 60%),
    radial-gradient(900px 700px at 110% 10%, rgba(212, 168, 75, 0.12), transparent 55%),
    radial-gradient(1000px 900px at 50% 120%, rgba(40, 80, 180, 0.25), transparent 60%),
    var(--bg-0);
}

h1, h2, h3, h4 { font-family: 'Fraunces', 'Cormorant Garamond', serif; font-weight: 500; letter-spacing: -0.02em; line-height: 1.05; }
h1 { font-size: clamp(3rem, 9vw, 7.5rem); }
h2 { font-size: clamp(2rem, 5vw, 3.75rem); }
p { line-height: 1.65; color: var(--ink-dim); }
a { color: inherit; text-decoration: none; }

::selection { background: var(--gold); color: #111; }

/* ========== ANIMATED BG ========== */
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.7) 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.7) 0%, transparent 70%);
}
.bg-orb {
  position: fixed; border-radius: 50%; filter: blur(80px);
  pointer-events: none; z-index: 0; opacity: 0.5;
  mix-blend-mode: screen;
}
.bg-orb.a { width: 520px; height: 520px; background: #2f4fd4; top: -120px; left: -80px; animation: orbA 24s ease-in-out infinite alternate; }
.bg-orb.b { width: 420px; height: 420px; background: #d4a84b; top: 40%; right: -120px; opacity: 0.25; animation: orbB 30s ease-in-out infinite alternate; }
.bg-orb.c { width: 600px; height: 600px; background: #1a3a8e; bottom: -200px; left: 30%; animation: orbC 36s ease-in-out infinite alternate; }

@keyframes orbA { to { transform: translate(200px, 100px) scale(1.2); } }
@keyframes orbB { to { transform: translate(-150px, 200px) scale(0.9); } }
@keyframes orbC { to { transform: translate(120px, -120px) scale(1.1); } }

.noise {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.04;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}

/* ========== NAVBAR ========== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 40px;
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.nav.scrolled {
  padding: 14px 40px;
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  background: rgba(5, 8, 15, 0.6);
  border-bottom: 1px solid var(--stroke);
}
.nav-brand {
  font-family: 'Fraunces', serif; font-size: 1.25rem; font-weight: 500;
  display: flex; align-items: center; gap: 10px;
}
.nav-brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  display: grid; place-items: center; color: #0a0f1c; font-weight: 700; font-family: 'Inter'; font-size: 0.85rem;
  box-shadow: 0 4px 20px rgba(212, 168, 75, 0.35), inset 0 1px 0 rgba(255,255,255,0.4);
}
.nav-links { display: flex; gap: 4px; font-size: 0.875rem; }
.nav-links a {
  padding: 8px 16px; border-radius: 999px; color: var(--ink-dim);
  transition: all 0.25s; position: relative;
}
.nav-links a:hover { color: var(--ink); background: var(--glass); }
.nav-links a.active { color: var(--gold); }
.nav-cta {
  padding: 10px 20px; border-radius: 999px; font-size: 0.85rem;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: #0a0f1c; font-weight: 600; cursor: pointer; border: none;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(212, 168, 75, 0.3);
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 30px rgba(212, 168, 75, 0.5); }

/* ========== LAYOUT ========== */
.section {
  position: relative; z-index: 2;
  padding: 140px 40px;
  max-width: 1400px; margin: 0 auto;
}
.section-head { display: flex; align-items: baseline; gap: 20px; margin-bottom: 60px; }
.section-num {
  font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; color: var(--gold);
  letter-spacing: 0.1em; text-transform: uppercase;
}
.section-title { flex: 1; }
.section-sub { color: var(--ink-dim); max-width: 500px; margin-top: 14px; }

/* ========== HERO V2 ========== */
.hero-v2 {
  min-height: 100vh;
  padding: 110px 40px 60px;
  display: flex; flex-direction: column; gap: 40px;
  position: relative; max-width: 1400px; margin: 0 auto; z-index: 2;
}
.hero-matrix {
  position: absolute; top: 0; right: 40px; width: min(520px, 40%);
  font-family: 'JetBrains Mono', monospace; font-size: 0.7rem;
  color: rgba(255,255,255,0.12); line-height: 1.9;
  padding-top: 100px; pointer-events: none;
  mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
}
.hero-matrix-line { white-space: pre; overflow: hidden; }

.hero-topbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px; flex-wrap: wrap; position: relative; z-index: 2;
}
.hero-clock {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'JetBrains Mono', monospace; font-size: 0.8rem;
  color: var(--ink-dim); letter-spacing: 0.08em;
}
.hero-clock .sep { color: var(--gold); opacity: 0.6; }
.hero-clock-time { color: var(--gold); min-width: 70px; }

.hero-grid {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 60px;
  align-items: center; flex: 1; position: relative; z-index: 2;
}

.hero-left { display: flex; flex-direction: column; gap: 30px; }

.hero-slab { display: flex; flex-direction: column; gap: 0; }
.hero-slab-row {
  display: flex; align-items: baseline; gap: 24px;
  opacity: 0; transform: translateY(40px);
  animation: slabIn 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.hero-slab-row:nth-child(2) { animation-delay: 0.15s; }
@keyframes slabIn { to { opacity: 1; transform: translateY(0); } }
.hero-slab-tick {
  font-family: 'JetBrains Mono', monospace; font-size: 0.8rem;
  color: var(--ink-faint); letter-spacing: 0.1em;
  align-self: flex-start; padding-top: 18px;
}
.hero-slab-name {
  font-family: 'Fraunces', serif; font-weight: 400;
  font-size: clamp(3.5rem, 11vw, 9rem); line-height: 0.92;
  letter-spacing: -0.04em;
}
.hero-slab-name.gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-2) 50%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  background-size: 200% 100%; animation: shimmer 6s linear infinite;
  font-style: italic;
}
.hero-slab-name.italic { font-style: italic; }

.hero-role-tag {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: 'JetBrains Mono', monospace; font-size: 0.85rem;
  color: var(--ink); text-transform: uppercase; letter-spacing: 0.18em;
  max-width: fit-content;
}
.hero-role-line {
  width: 48px; height: 1px; background: linear-gradient(to right, var(--gold), transparent);
}

.hero-v2 .hero-sub { max-width: 520px; font-size: 1.05rem; margin: 0; }
.hero-v2 .hero-actions { margin-top: 10px; }

/* ID CARD */
.hero-right { display: flex; justify-content: center; position: relative; }
.id-card {
  width: 100%; max-width: 380px; padding: 30px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.015));
  border: 1px solid var(--stroke-2);
  border-radius: 22px;
  backdrop-filter: blur(30px) saturate(1.4); -webkit-backdrop-filter: blur(30px) saturate(1.4);
  position: relative;
  box-shadow: 0 40px 100px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.08);
  animation: cardFloat 8s ease-in-out infinite;
}
@keyframes cardFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(0.3deg); }
}
.id-corner {
  position: absolute; width: 14px; height: 14px;
  border: 1px solid var(--gold);
}
.id-corner.tl { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.id-corner.tr { top: 10px; right: 10px; border-left: none; border-bottom: none; }
.id-corner.bl { bottom: 10px; left: 10px; border-right: none; border-top: none; }
.id-corner.br { bottom: 10px; right: 10px; border-left: none; border-top: none; }

.id-card-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px;
}
.id-card-label {
  font-family: 'JetBrains Mono', monospace; font-size: 0.7rem;
  color: var(--ink-faint); letter-spacing: 0.1em;
}
.id-card-pill {
  font-family: 'JetBrains Mono', monospace; font-size: 0.65rem;
  color: #4ade80; padding: 4px 10px; border-radius: 999px;
  background: rgba(74, 222, 128, 0.1); border: 1px solid rgba(74, 222, 128, 0.3);
  letter-spacing: 0.15em;
}

.id-avatar {
  position: relative; display: flex; flex-direction: column; align-items: center;
  padding: 16px 0 20px;
}
.id-avatar-ring {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 130px; height: 130px; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--gold), transparent 30%, var(--gold) 60%, transparent 90%, var(--gold));
  animation: spin 8s linear infinite;
  opacity: 0.5;
}
@keyframes spin { to { transform: translateX(-50%) rotate(360deg); } }
.id-avatar-inner {
  position: relative; width: 118px; height: 118px; border-radius: 50%;
  background: linear-gradient(135deg, #0a1430, #152350);
  border: 2px solid var(--bg-0);
  display: grid; place-items: center; margin: 6px 0 10px;
  box-shadow: inset 0 4px 30px rgba(212, 168, 75, 0.15), 0 10px 40px rgba(0,0,0,0.5);
}
.id-avatar-initials {
  font-family: 'Fraunces', serif; font-style: italic; font-weight: 400;
  font-size: 3rem;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.id-avatar-caption {
  font-family: 'JetBrains Mono', monospace; font-size: 0.65rem;
  color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.15em;
}

.id-rows {
  display: flex; flex-direction: column; gap: 0;
  border-top: 1px dashed var(--stroke); margin-top: 10px; padding-top: 14px;
}
.id-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 0; font-size: 0.82rem;
  border-bottom: 1px dashed var(--stroke);
}
.id-row:last-child { border-bottom: none; }
.id-row span { font-family: 'JetBrains Mono', monospace; color: var(--ink-faint); font-size: 0.7rem; letter-spacing: 0.1em; }
.id-row b { color: var(--ink); font-weight: 500; }

.id-bars { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.id-bar { display: flex; flex-direction: column; gap: 6px; }
.id-bar span {
  font-family: 'JetBrains Mono', monospace; font-size: 0.68rem;
  color: var(--ink-dim); letter-spacing: 0.12em; text-transform: uppercase;
}
.id-bar i {
  display: block; height: 3px; border-radius: 2px; width: 100%;
  background: rgba(255,255,255,0.07); position: relative; overflow: hidden;
}
.id-bar i::after {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: var(--v);
  background: linear-gradient(to right, var(--gold), var(--gold-2));
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(212, 168, 75, 0.4);
  animation: barIn 1.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  transform-origin: left; transform: scaleX(0);
}
@keyframes barIn { to { transform: scaleX(1); } }

/* Hero bottom meta */
.hero-bottombar {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  padding: 24px 0 0; border-top: 1px solid var(--stroke);
  position: relative; z-index: 2;
}
.hero-bottombar > div { display: flex; flex-direction: column; gap: 4px; }
.hero-bottombar span {
  font-family: 'JetBrains Mono', monospace; font-size: 0.65rem;
  color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.15em;
}
.hero-bottombar b { color: var(--ink); font-weight: 500; font-size: 0.92rem; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-matrix { display: none; }
  .hero-bottombar { grid-template-columns: repeat(2, 1fr); }
  .hero-right { order: -1; }
  .id-card { max-width: 340px; }
  .hero-topbar { flex-direction: column; align-items: flex-start; }
}
.hero-kicker {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--stroke);
  font-size: 0.8rem; color: var(--ink-dim);
  backdrop-filter: blur(10px);
  width: fit-content; margin-bottom: 30px;
}
.hero-kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 10px #4ade80; animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.4; } }

.hero h1 { margin-bottom: 20px; }
.hero h1 .gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-2) 50%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  background-size: 200% 100%; animation: shimmer 6s linear infinite;
  font-style: italic; font-weight: 400;
}
@keyframes shimmer { to { background-position: 200% 0; } }

.hero-sub { font-size: 1.15rem; max-width: 620px; margin-top: 20px; }
.hero-meta {
  display: flex; gap: 40px; margin-top: 60px;
  font-family: 'JetBrains Mono', monospace; font-size: 0.8rem;
  color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.1em;
}
.hero-meta > div > span { display: block; color: var(--ink); font-family: 'Inter'; text-transform: none; letter-spacing: 0; font-size: 1rem; margin-top: 4px; }

.hero-actions { display: flex; gap: 14px; margin-top: 40px; }
.btn {
  padding: 14px 26px; border-radius: 999px; font-size: 0.9rem;
  border: 1px solid var(--stroke-2); background: var(--glass);
  color: var(--ink); font-weight: 500; cursor: pointer;
  transition: all 0.25s; backdrop-filter: blur(10px);
  display: inline-flex; align-items: center; gap: 10px;
}
.btn:hover { background: var(--glass-2); border-color: var(--gold-soft); transform: translateY(-1px); }
.btn.primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: #0a0f1c; border-color: transparent; font-weight: 600;
  box-shadow: 0 4px 30px rgba(212, 168, 75, 0.35);
}
.btn.primary:hover { box-shadow: 0 8px 40px rgba(212, 168, 75, 0.55); }

.hero-scroll {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
  font-family: 'JetBrains Mono', monospace; font-size: 0.7rem;
  color: var(--ink-faint); letter-spacing: 0.2em; text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.hero-scroll-line { width: 1px; height: 40px; background: linear-gradient(to bottom, var(--gold), transparent); animation: scrollLine 2s ease-in-out infinite; }
@keyframes scrollLine { 0%, 100% { transform: scaleY(0.3); transform-origin: top; } 50% { transform: scaleY(1); } }

/* ========== ABOUT / STATS ========== */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 40px; }
.stat {
  padding: 30px; border-radius: var(--radius);
  background: var(--glass); border: 1px solid var(--stroke);
  backdrop-filter: blur(20px);
}
.stat-num { font-family: 'Fraunces', serif; font-size: 3rem; font-weight: 400; color: var(--gold); }
.stat-label { font-size: 0.85rem; color: var(--ink-dim); margin-top: 4px; }

/* ========== CARDS / TILT ========== */
.card {
  position: relative; padding: 28px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.01));
  border: 1px solid var(--stroke);
  backdrop-filter: blur(20px);
  transition: transform 0.15s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.3s, box-shadow 0.3s;
  transform-style: preserve-3d;
  cursor: pointer;
}
.card::before {
  content: ''; position: absolute; inset: 0; border-radius: var(--radius); pointer-events: none;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%), rgba(212, 168, 75, 0.12), transparent 40%);
  opacity: 0; transition: opacity 0.3s;
}
.card:hover { border-color: rgba(212, 168, 75, 0.3); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4); }
.card:hover::before { opacity: 1; }
.card > * { transform: translateZ(30px); }

/* ========== SKILLS ========== */
.skills-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px;
}
.skill-card { padding: 30px 28px; }
.skill-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--gold-soft); border: 1px solid rgba(212, 168, 75, 0.3);
  display: grid; place-items: center; color: var(--gold);
  margin-bottom: 18px;
}
.skill-title { font-family: 'Fraunces', serif; font-size: 1.4rem; font-weight: 500; margin-bottom: 6px; }
.skill-desc { font-size: 0.9rem; color: var(--ink-dim); margin-bottom: 18px; min-height: 40px; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.skill-tag {
  padding: 4px 10px; border-radius: 999px; font-size: 0.72rem;
  background: rgba(255,255,255,0.04); border: 1px solid var(--stroke);
  color: var(--ink-dim); font-family: 'JetBrains Mono', monospace;
}

/* ========== TIMELINE ========== */
.timeline { position: relative; padding-left: 40px; }
.timeline::before {
  content: ''; position: absolute; top: 8px; bottom: 8px; left: 10px;
  width: 1px; background: linear-gradient(to bottom, var(--gold) 0%, var(--stroke) 20%, var(--stroke) 80%, transparent 100%);
}
.tl-item { position: relative; padding: 0 0 50px 40px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute; left: -0px; top: 8px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--bg-0); border: 2px solid var(--gold);
  box-shadow: 0 0 0 4px rgba(212, 168, 75, 0.1), 0 0 20px rgba(212, 168, 75, 0.5);
}
.tl-dot::after {
  content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--gold);
  animation: pulse 2.5s ease-in-out infinite;
}
.tl-period { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: var(--gold); letter-spacing: 0.1em; text-transform: uppercase; }
.tl-title { font-family: 'Fraunces', serif; font-size: 1.5rem; font-weight: 500; margin: 6px 0 2px; }
.tl-company { color: var(--ink-dim); font-size: 0.9rem; margin-bottom: 14px; }
.tl-list { list-style: none; }
.tl-list li {
  padding: 6px 0 6px 18px; position: relative; font-size: 0.92rem; color: var(--ink-dim);
}
.tl-list li::before {
  content: ''; position: absolute; left: 0; top: 14px; width: 8px; height: 1px; background: var(--gold);
}

/* ========== SCHOOL ========== */
.school-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.school-card { padding: 36px; position: relative; overflow: hidden; }
.school-card .badge {
  font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; color: var(--gold);
  text-transform: uppercase; letter-spacing: 0.15em;
}
.school-card h3 { margin: 10px 0 6px; font-size: 1.8rem; }
.school-meta { color: var(--ink-dim); font-size: 0.9rem; margin-bottom: 20px; }
.school-detail { display: flex; gap: 24px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--stroke); }
.school-detail > div > span { display: block; font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 4px; }

/* ========== PROJECTS ========== */
.proj-tabs { display: flex; gap: 6px; margin-bottom: 30px; border-bottom: 1px solid var(--stroke); padding-bottom: 16px; }
.proj-tab {
  padding: 8px 18px; border-radius: 999px; font-size: 0.85rem; color: var(--ink-dim);
  background: transparent; border: 1px solid transparent; cursor: pointer; transition: all 0.25s;
  font-family: inherit;
}
.proj-tab:hover { color: var(--ink); }
.proj-tab.active { background: var(--gold-soft); color: var(--gold); border-color: rgba(212, 168, 75, 0.3); }

.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.proj-card {
  padding: 0; overflow: hidden; display: flex; flex-direction: column;
}
.proj-card > * { transform: none; }
.proj-img {
  aspect-ratio: 16/10; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #0a1430, #152350);
  border-bottom: 1px solid var(--stroke);
}
.proj-img-pattern {
  position: absolute; inset: 0; opacity: 0.5;
  background-image:
    repeating-linear-gradient(45deg, transparent 0, transparent 8px, rgba(212, 168, 75, 0.08) 8px, rgba(212, 168, 75, 0.08) 9px);
}
.proj-img-glyph {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: 'Fraunces', serif; font-size: 5rem; font-weight: 400; color: var(--gold); opacity: 0.6;
  font-style: italic;
}
.proj-body { padding: 24px 28px 28px; }
.proj-meta { display: flex; gap: 10px; font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 12px; }
.proj-meta .dotsep { color: var(--stroke-2); }
.proj-title { font-family: 'Fraunces', serif; font-size: 1.3rem; font-weight: 500; margin-bottom: 6px; }
.proj-desc { font-size: 0.88rem; color: var(--ink-dim); margin-bottom: 16px; }
.proj-arrow {
  display: inline-flex; align-items: center; gap: 8px; color: var(--gold);
  font-size: 0.85rem; font-weight: 500;
}

/* ========== MODAL ========== */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(2, 5, 10, 0.75);
  backdrop-filter: blur(10px);
  display: grid; place-items: center;
  padding: 40px 20px;
  animation: fadeIn 0.3s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } }
.modal {
  max-width: 760px; width: 100%; max-height: 90vh; overflow-y: auto;
  background: linear-gradient(180deg, #0d1530, #07102a);
  border: 1px solid var(--stroke-2);
  border-radius: 24px;
  padding: 40px;
  position: relative;
  animation: modalIn 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 40px 100px rgba(0,0,0,0.6), 0 0 0 1px rgba(212, 168, 75, 0.1);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(30px) scale(0.97); } }
.modal-close {
  position: absolute; top: 20px; right: 20px; width: 40px; height: 40px;
  border-radius: 50%; background: var(--glass); border: 1px solid var(--stroke);
  color: var(--ink); cursor: pointer; display: grid; place-items: center;
  transition: all 0.2s;
}
.modal-close:hover { background: var(--glass-2); transform: rotate(90deg); }
.modal-kicker { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: var(--gold); letter-spacing: 0.15em; text-transform: uppercase; }
.modal h3 { font-size: 2.2rem; margin: 10px 0 6px; font-family: 'Fraunces', serif; }
.modal-sub { color: var(--ink-dim); margin-bottom: 24px; }
.modal-section { margin-top: 28px; }
.modal-section h4 { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: var(--gold); letter-spacing: 0.15em; text-transform: uppercase; font-weight: 500; margin-bottom: 10px; }
.modal-section p, .modal-section li { color: var(--ink-dim); font-size: 0.95rem; line-height: 1.7; }
.modal-section ul { padding-left: 18px; }
.modal-section ul li { margin: 4px 0; }

/* ========== CV VIEWER ========== */
.cv-viewer {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--stroke-2);
  background: #111; height: 850px; position: relative;
  box-shadow: 0 40px 80px rgba(0,0,0,0.5);
}
.cv-viewer iframe { width: 100%; height: 100%; border: none; }

/* ========== VEILLE ========== */
.veille-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.veille-card.placeholder {
  border-style: dashed; opacity: 0.7;
  display: grid; place-items: center; min-height: 200px;
  text-align: center;
}
.veille-card.placeholder p { font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.1em; }

/* ========== AVENIR ========== */
.avenir-wrap {
  position: relative; padding: 60px; border-radius: 28px;
  background: linear-gradient(135deg, rgba(212, 168, 75, 0.08), rgba(30, 60, 140, 0.1));
  border: 1px solid var(--stroke-2);
  overflow: hidden;
}
.avenir-wrap::before {
  content: ''; position: absolute; inset: -1px;
  background: linear-gradient(135deg, rgba(212, 168, 75, 0.3), transparent 40%, rgba(212, 168, 75, 0.2));
  border-radius: 28px; padding: 1px; z-index: -1;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.avenir-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: start; }
.avenir-quote { font-family: 'Fraunces', serif; font-size: 2rem; line-height: 1.3; font-weight: 400; }
.avenir-quote em { color: var(--gold); font-style: italic; }
.avenir-points { display: flex; flex-direction: column; gap: 18px; }
.avenir-point { display: flex; gap: 16px; align-items: start; }
.avenir-point-num { font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; color: var(--gold); padding-top: 4px; }
.avenir-point h4 { font-family: 'Fraunces', serif; font-size: 1.2rem; font-weight: 500; margin-bottom: 4px; }
.avenir-point p { font-size: 0.9rem; }

/* ========== CONTACT ========== */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 50px; }
.contact-info h3 { font-family: 'Fraunces', serif; font-size: 2.2rem; margin-bottom: 20px; }
.contact-info p { margin-bottom: 30px; }
.contact-item { display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid var(--stroke); }
.contact-item:last-child { border-bottom: 1px solid var(--stroke); }
.contact-item-ico { width: 40px; height: 40px; border-radius: 10px; background: var(--gold-soft); color: var(--gold); display: grid; place-items: center; flex-shrink: 0; }
.contact-item-label { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.1em; }
.contact-item-value { color: var(--ink); font-size: 0.95rem; margin-top: 2px; }

.form {
  padding: 36px; border-radius: var(--radius);
  background: var(--glass); border: 1px solid var(--stroke-2);
  backdrop-filter: blur(20px);
}
.form-row { display: flex; gap: 16px; }
.form-row > .field { flex: 1; }
.field { margin-bottom: 18px; }
.field label { display: block; font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px; }
.field input, .field textarea {
  width: 100%; padding: 14px 16px; border-radius: 12px;
  background: rgba(0,0,0,0.3); border: 1px solid var(--stroke);
  color: var(--ink); font-family: inherit; font-size: 0.95rem;
  transition: border-color 0.2s, background 0.2s;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--gold); background: rgba(0,0,0,0.4);
}
.field textarea { resize: vertical; min-height: 120px; font-family: inherit; }
.form-status { margin-top: 14px; font-size: 0.85rem; color: var(--gold); min-height: 20px; font-family: 'JetBrains Mono', monospace; }

/* ========== FOOTER ========== */
.footer {
  position: relative; z-index: 2;
  padding: 60px 40px 40px; max-width: 1400px; margin: 0 auto;
  border-top: 1px solid var(--stroke);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.85rem; color: var(--ink-faint);
}

/* ========== REVEAL ANIMATION ========== */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-stagger > * { opacity: 0; transform: translateY(30px); transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal-stagger.in > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 0.12s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 0.19s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 0.26s; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: 0.33s; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: 0.40s; }

/* ========== TWEAKS PANEL ========== */
.tweaks {
  position: fixed; bottom: 24px; right: 24px; z-index: 200;
  width: 300px; padding: 20px;
  background: rgba(10, 15, 30, 0.9);
  backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
  border: 1px solid var(--stroke-2);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  font-size: 0.85rem;
}
.tweaks-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.tweaks-title { font-family: 'Fraunces', serif; font-size: 1.1rem; }
.tweaks-close { background: transparent; border: none; color: var(--ink-dim); cursor: pointer; font-size: 1.2rem; line-height: 1; }
.tweak-row { margin-bottom: 14px; }
.tweak-label { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch {
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; transition: transform 0.15s, border-color 0.2s;
}
.swatch:hover { transform: scale(1.1); }
.swatch.active { border-color: var(--ink); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; font-size: 0.85rem; color: var(--ink-dim); }
.toggle {
  width: 36px; height: 20px; border-radius: 10px; background: rgba(255,255,255,0.1); position: relative; cursor: pointer; transition: background 0.2s;
  border: none;
}
.toggle.on { background: var(--gold); }
.toggle::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: white; transition: transform 0.2s;
}
.toggle.on::after { transform: translateX(16px); }

/* ========== RESPONSIVE ========== */
@media (max-width: 860px) {
  .nav { padding: 16px 20px; }
  .nav-links { display: none; }
  .section { padding: 80px 20px; }
  .hero { padding: 100px 20px 60px; }
  .hero-meta { flex-wrap: wrap; gap: 20px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .school-grid, .avenir-grid, .contact-grid { grid-template-columns: 1fr; gap: 24px; }
  .form-row { flex-direction: column; gap: 0; }
  .footer { flex-direction: column; gap: 16px; text-align: center; }
  .tweaks { bottom: 12px; right: 12px; width: calc(100% - 24px); }
  .avenir-wrap { padding: 30px; }
  .avenir-quote { font-size: 1.4rem; }
}
