
:root {
  --bg: #08111f;
  --bg-elevated: rgba(14, 24, 43, 0.82);
  --bg-soft: rgba(255,255,255,0.04);
  --panel: rgba(255,255,255,0.06);
  --panel-strong: rgba(255,255,255,0.09);
  --text: #eff5ff;
  --muted: #aeb8cc;
  --line: rgba(255,255,255,0.12);
  --line-strong: rgba(255,255,255,0.18);
  --accent: #5eead4;
  --accent-2: #60a5fa;
  --accent-3: #f59e0b;
  --success: #86efac;
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --shadow: 0 24px 70px rgba(0,0,0,0.34);
  --max: 1180px;
  --nav-height: 84px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  line-height: 1.6;
  background:
    radial-gradient(circle at 0% 0%, rgba(96,165,250,0.22), transparent 25%),
    radial-gradient(circle at 100% 0%, rgba(94,234,212,0.16), transparent 22%),
    radial-gradient(circle at 50% 100%, rgba(245,158,11,0.07), transparent 18%),
    linear-gradient(180deg, #07101d 0%, #091321 44%, #0b1524 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }
.container { width: min(var(--max), calc(100% - 2rem)); margin: 0 auto; }
.topbar {
  position: sticky; top: 0; z-index: 100; background: rgba(8, 17, 31, 0.82);
  backdrop-filter: blur(18px); border-bottom: 1px solid var(--line);
}
.nav-shell {
  min-height: var(--nav-height); display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.9rem 0; position: relative;
}

.brand { display: inline-flex; align-items: center; gap: 0.85rem; min-width: 0; flex: 1 1 auto; }
.brand-text { min-width: 0; }
.brand-photo {
  width: 46px; height: 46px; border-radius: 50%; object-fit: cover; object-position: center 20%;
  border: 1px solid rgba(255,255,255,0.15); box-shadow: 0 12px 28px rgba(0,0,0,0.32); flex-shrink: 0;
}
.brand-text strong { display: block; font-size: 0.98rem; letter-spacing: 0.01em; }
.brand-text small {
  display: block; font-size: 0.73rem; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav-toggle {
  display: none; width: 46px; height: 46px; border-radius: 14px; border: 1px solid var(--line);
  background: rgba(255,255,255,0.04); color: var(--text); align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-links { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.nav-links a {
  color: var(--muted); font-size: 0.95rem; padding: 0.6rem 0.9rem; border: 1px solid transparent;
  border-radius: 999px; transition: 0.2s ease; white-space: nowrap;
}
.contact-cta {
  background: linear-gradient(135deg, #2dd4bf, #3b82f6) !important;
  color: #ffffff !important;
  box-shadow: 0 10px 28px rgba(0,0,0,0.28);
}
.contact-cta:hover, .contact-cta:focus-visible {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 18px 45px rgba(0,0,0,0.55), 0 0 20px rgba(59,130,246,0.35);
  filter: brightness(1.08);
  border-color: transparent !important;
}
.nav-links a:hover, .nav-links a:focus-visible, .nav-links a.active {
  color: var(--text); background: rgba(255,255,255,0.06); border-color: var(--line); outline: none;
}
main { overflow: clip; }
.hero { padding: 2.2rem 0 1.5rem; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr); gap: 1rem; align-items: stretch; }
.panel, .card, .metric, .timeline-item, .footer-card, .stack-card, .quote-box {
  background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); backdrop-filter: blur(10px);
}
.hero-copy {
  position: relative; overflow: hidden; border-radius: var(--radius-xl); padding: clamp(1.4rem, 2vw, 2.5rem);
  animation: fadeUp .7s ease both;
}
.hero-copy::before {
  content: ""; position: absolute; inset: auto -90px -90px auto; width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(96,165,250,0.3), transparent 70%); pointer-events: none; filter: blur(6px);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.42rem 0.82rem; border-radius: 999px;
  font-size: 0.79rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent);
  border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.05); margin-bottom: 1.1rem;
}
.hero-intro { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.hero-headshot {
  width: 92px; height: 92px; border-radius: 50%; object-fit: cover; object-position: center 20%;
  border: 2px solid rgba(255,255,255,0.14); box-shadow: 0 12px 30px rgba(0,0,0,0.32);
}
h1, h2, h3, p, blockquote { margin-top: 0; }
h1 { font-size: clamp(2.5rem, 6vw, 5.2rem); line-height: 0.95; letter-spacing: -0.055em; margin-bottom: 1rem; max-width: 10.8ch; }
h2 { font-size: clamp(1.7rem, 3vw, 2.8rem); line-height: 1.02; letter-spacing: -0.045em; margin-bottom: 0.45rem; }
h3 { font-size: 1.08rem; line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 0.65rem; }
p.lead { font-size: 1.06rem; color: var(--muted); max-width: 62ch; }
.accent-text {
  background: linear-gradient(135deg, var(--accent), var(--accent-2), #dbeafe);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cta-row, .button-row { display: flex; gap: 0.85rem; flex-wrap: wrap; margin-top: 1.35rem; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem; padding: 0.92rem 1.25rem;
  border-radius: 999px; border: 1px solid transparent; font-weight: 600; transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #08101f; }
.button-secondary { border-color: var(--line); background: rgba(255,255,255,0.03); color: var(--text); }
.hero-side { display: grid; gap: 1rem; }
.stack-card, .profile-card { border-radius: var(--radius-xl); padding: 1.35rem; animation: fadeUp .8s ease both; }
.profile-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03)), linear-gradient(135deg, rgba(96,165,250,0.12), rgba(94,234,212,0.12));
  border: 1px solid var(--line);
}
.stat-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 0.8rem; }
.metric {
  padding: .95rem; border-radius: 18px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
}
.metric strong { display:block; margin-bottom:.2rem; font-size:1rem; }
.metric span { color: var(--muted); font-size:.92rem; }
section.page-section { padding: 1rem 0 4rem; }
.section-heading { display:flex; justify-content:space-between; align-items:end; gap:1rem; margin-bottom:1.35rem; }
.section-heading p { color: var(--muted); max-width: 58ch; margin-bottom:0; }
.grid-2, .grid-3 { display:grid; gap:1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.card {
  padding: 1.35rem; border-radius: var(--radius-lg); height:100%; transition: transform .25s ease, border-color .25s ease, background .25s ease, box-shadow .25s ease; animation: fadeUp .8s ease both;
}
.card:hover { transform: translateY(-4px); border-color: rgba(96,165,250,0.35); background: rgba(255,255,255,0.075); box-shadow: 0 26px 80px rgba(0,0,0,0.28); }
.card p { color: var(--muted); margin-bottom:0; }
.card p + p { margin-top: .85rem; }
.kicker { display:inline-block; margin-bottom:.8rem; font-size:.78rem; letter-spacing:.08em; text-transform:uppercase; color: var(--accent-3); }
.tag-cloud { display:flex; flex-wrap:wrap; gap:.7rem; margin-top:1rem; }
.tag { padding:.6rem .85rem; border-radius:999px; border:1px solid var(--line); background: rgba(255,255,255,0.04); color:#d8e1f5; font-size:.92rem; }
.timeline { display:grid; gap:1rem; }
.timeline-item { display:grid; grid-template-columns:110px 1fr; gap:1rem; align-items:start; padding:1.15rem 1.2rem; border-radius: var(--radius-lg); animation: fadeUp .8s ease both; }
.timeline-year { color: var(--accent); font-weight:700; font-size:.95rem; letter-spacing:.04em; text-transform:uppercase; }
.timeline-item p { color: var(--muted); margin-bottom:0; }
.quote-box {
  padding: 1.8rem; border-radius: 28px; text-align:center; margin-right: auto; margin-left: auto; background: linear-gradient(135deg, rgba(94,234,212,0.12), rgba(96,165,250,0.12)), rgba(255,255,255,0.04); animation: glowPulse 5s ease-in-out infinite;
}
.quote-box blockquote { font-size: clamp(1.4rem, 3vw, 2.25rem); line-height:1.2; letter-spacing:-0.04em; margin:0; }
.quote-box p { color: var(--muted); margin-top:.8rem; margin-bottom:0; }
.page-banner { padding: 1.4rem 0 0.75rem; }
.page-banner-card {
  border-radius: var(--radius-xl); padding: clamp(1.3rem, 2vw, 2rem); background: linear-gradient(135deg, rgba(96,165,250,0.11), rgba(94,234,212,0.08)), rgba(255,255,255,0.04); border: 1px solid var(--line); box-shadow: var(--shadow); animation: fadeUp .7s ease both;
}
.page-banner-card p { color: var(--muted); max-width: 60ch; margin-bottom:0; }
footer { padding: 0 0 3rem; }
.footer-card {
  display:flex; justify-content:space-between; gap:1rem; flex-wrap:wrap; align-items:center; padding:1.2rem 1.4rem; border-radius: var(--radius-lg); animation: fadeUp .8s ease both;
}
.footer-card p { margin:0; color: var(--muted); }
.small-links { display:flex; flex-wrap:wrap; gap:1rem; }
.small-links a { color: var(--text); opacity: .88; }
.small-links a:hover { opacity: 1; }
@keyframes fadeUp { from { opacity:0; transform: translateY(16px); } to { opacity:1; transform: translateY(0); } }
@keyframes glowPulse { 0%,100% { box-shadow: 0 20px 60px rgba(0,0,0,0.35);} 50% { box-shadow: 0 24px 70px rgba(96,165,250,0.18);} }
@media (max-width: 960px) {
  .hero-grid, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .timeline-item { grid-template-columns: 1fr; }
  .nav-shell { align-items: center; }
  .nav-toggle { display: inline-flex; }
  .brand { padding-right: 0.5rem; }
  .brand-photo { width: 42px; height: 42px; }
  .brand-text strong { font-size: 0.98rem; }
  .brand-text small { max-width: 150px; }
  .nav-links {
    position: absolute;
    top: calc(100% + 0.7rem);
    left: 0;
    right: 0;
    z-index: 120;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    padding: 0.8rem;
    background: rgba(8, 17, 31, 0.97);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(0,0,0,0.45);
    backdrop-filter: blur(18px);
  }
  .nav-links.open { display:flex; }
  .nav-links a {
    width:100%;
    display:block;
    padding: 0.95rem 1rem;
    border-radius: 16px;
    background: rgba(255,255,255,0.04);
  }
  .nav-links a.button {
    display: inline-flex;
    width: 100%;
    justify-content: center;
  }
}
@media (max-width: 640px) {
  .container { width: min(var(--max), calc(100% - 1rem)); }
  .nav-shell { gap: 0.75rem; }
  .brand-photo { width: 40px; height: 40px; }
  .brand-text strong { font-size: 0.95rem; }
  .brand-text small { font-size: 0.68rem; max-width: 135px; }
  .hero { padding-top: 1.25rem; }
  .hero-copy, .page-banner-card, .stack-card, .profile-card, .footer-card, .card, .timeline-item, .quote-box { border-radius: 20px; }
  .hero-copy, .stack-card, .profile-card, .page-banner-card { padding: 1.1rem; }
  h1 { font-size: clamp(2.15rem, 11vw, 3.25rem); max-width: 100%; }
  .hero-headshot { width: 74px; height: 74px; }
  .stat-grid { grid-template-columns: 1fr; }
  .cta-row, .button-row { flex-direction: column; }
  .button { width:100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation:none !important; transition:none !important; scroll-behavior:auto !important; }
}

/* =========================
   MOBILE NAV FIX (FINAL)
========================= */

@media (max-width: 960px) {

  /* Fix header layout */
  .nav-shell {
    align-items: center;
    position: relative;
  }

  /* Prevent brand from breaking layout */
  .brand {
    min-width: 0;
    flex: 1;
  }

  .brand-text {
    min-width: 0;
  }

  /* 🔥 FIX subtitle cutoff */
  .brand-text small {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    max-width: none !important;
    line-height: 1.2;
  }

  /* Ensure menu sits BELOW header cleanly */
  .nav-links {
    position: absolute;
    top: calc(100% + 0.75rem);
    left: 0;
    right: 0;

    display: none;
    flex-direction: column;

    padding: 0.85rem;
    border-radius: 22px;

    background: rgba(8, 17, 31, 0.98);
    border: 1px solid var(--line);
    box-shadow: 0 30px 80px rgba(0,0,0,0.55);

    z-index: 200;
  }

  .nav-links.open {
    display: flex;
  }

  /* Make menu items feel like buttons */
  .nav-links a {
    width: 100%;
    display: block;
    padding: 1rem;
    border-radius: 16px;

    background: rgba(255,255,255,0.05);
    border: 1px solid transparent;
  }

  /* Improve CTA in menu */
  .nav-links a.button {
    display: flex;
    justify-content: center;
    width: 100%;
  }
}


/* =========================
   SMALL SCREEN POLISH
========================= */

@media (max-width: 640px) {

  .brand-text small {
    font-size: 0.7rem;
    line-height: 1.2;
  }

  .brand-photo {
    width: 38px;
    height: 38px;
  }

}


/* Field Notes Slide */
.field-notes-slide-wrap {
  padding: 1.25rem 0 3rem;
}

.field-notes-slide {
  max-width: 900px;
    margin: 2rem auto 0 auto; /* top, right, bottom, left */
    border-radius: 30px;
  padding: 2rem;
  background:
    radial-gradient(circle at top right, rgba(96,165,250,0.18), transparent 28%),
    radial-gradient(circle at bottom left, rgba(94,234,212,0.14), transparent 24%),
    rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  box-shadow: 0 26px 80px rgba(0,0,0,0.36);
  text-align: center;
}

.field-notes-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.field-notes-title {
  max-width: 13ch;
  margin: 0 auto 0.75rem;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.field-notes-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--accent);
  margin: 0 0 1rem 0;
  font-weight: 600;
}

.field-notes-lead {
  max-width: 700px;
  margin: 0 auto 1.5rem;
  color: var(--muted);
  font-size: 1rem;
}

.field-notes-list {
  display: grid;
  gap: 0.9rem;
  margin: 1.5rem 0;
  text-align: left;
}

.field-note-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 0.85rem;
  align-items: start;
  padding: 1rem 1rem 1rem 0.95rem;
  border-radius: 20px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
}

.field-note-item p {
  margin: 0;
  color: var(--text);
  line-height: 1.6;
}

.field-note-emoji {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(255,255,255,0.08);
  font-size: 1.2rem;
}

.field-notes-funny-tags {
  justify-content: center;
  margin-top: 1.5rem;
}

.field-notes-funny-tags .tag {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.14);
}

.field-notes-footer {
  margin-top: 1.5rem;
  display: grid;
  gap: 1rem;
  justify-items: center;
}

.field-notes-footer p {
  margin: 0;
  color: var(--muted);
  max-width: 640px;
}

@media (max-width: 640px) {
  .field-notes-slide {
    padding: 1.1rem;
    border-radius: 22px;
  }

  .field-notes-badge {
    font-size: 0.68rem;
    line-height: 1.3;
    padding: 0.45rem 0.7rem;
  }

  .field-notes-title {
    max-width: 100%;
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .field-notes-subtitle {
    font-size: 1rem;
  }

  .field-notes-lead {
    font-size: 0.94rem;
    margin-bottom: 1.1rem;
  }

  .field-notes-list {
    gap: 0.75rem;
  }

  .field-note-item {
    grid-template-columns: 38px 1fr;
    gap: 0.7rem;
    padding: 0.85rem;
    border-radius: 18px;
  }

  .field-note-emoji {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 1rem;
  }

  .field-note-item p {
    font-size: 0.93rem;
    line-height: 1.55;
  }

  .field-notes-funny-tags .tag {
    font-size: 0.76rem;
    padding: 0.48rem 0.65rem;
  }

  .field-notes-footer .button {
    width: 100%;
  }
}