:root {
  --navy: #0f172a;
  --navy-soft: #17233b;
  --slate: #94a3b8;
  --slate-deep: #64748b;
  --white: #e2e8f0;
  --teal: #5eead4;
  --teal-soft: rgba(94, 234, 212, .1);
  --line: rgba(148, 163, 184, .16);
  --mono: 'DM Mono', 'SFMono-Regular', Consolas, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--navy);
  color: var(--slate);
  font-family: var(--sans);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--teal); color: var(--navy); }

a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--teal); outline-offset: 4px; }

.spotlight {
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 20%), rgba(29, 78, 216, .16), transparent 80%);
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: 0;
}

.skip-link {
  background: var(--teal);
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  left: 0;
  padding: 10px 14px;
  position: absolute;
  top: 0;
  transform: translateY(-100%);
  z-index: 5;
}

.skip-link:focus { transform: translateY(0); }

.site-shell {
  margin: 0 auto;
  max-width: 1280px;
  min-height: 100vh;
  padding: 0 64px;
  position: relative;
  z-index: 1;
}

.site-layout {
  display: grid;
  gap: 64px;
  grid-template-columns: minmax(320px, .9fr) minmax(0, 1.1fr);
}

.site-header {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: 96px 0 48px;
  position: sticky;
  top: 0;
}

.brand {
  color: var(--white);
  display: inline-block;
  font-size: clamp(2.35rem, 4vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -.065em;
  line-height: 1;
}

.site-role {
  color: var(--white);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -.025em;
  margin: 18px 0 0;
}

.site-intro {
  font-size: 15px;
  line-height: 1.55;
  margin: 18px 0 0;
  max-width: 290px;
}

.primary-nav { margin-top: 72px; width: max-content; }
.nav-link {
  align-items: center;
  display: flex;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .12em;
  padding: 10px 0;
  text-transform: uppercase;
  transition: color .22s;
}

.nav-indicator {
  background: var(--slate-deep);
  display: inline-block;
  height: 1px;
  margin-right: 16px;
  transition: background .22s, margin-right .22s, width .22s;
  width: 30px;
}

.nav-link:hover, .nav-link:focus-visible { color: var(--white); }
.nav-link:hover .nav-indicator, .nav-link:focus-visible .nav-indicator { background: var(--white); margin-right: 16px; width: 60px; }

.header-bottom { align-items: flex-start; display: flex; flex-direction: column; gap: 28px; }
.social-links { display: flex; flex-wrap: wrap; gap: 20px; }
.social-links a { color: var(--slate-deep); font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; transition: color .2s; }
.social-links a:hover { color: var(--teal); }

.mode-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  font-family: var(--mono);
  font-size: 9px;
  gap: 8px;
  letter-spacing: .08em;
  padding: 0;
  text-transform: uppercase;
}

.mode-toggle:hover { color: var(--teal); }
.mode-dot { background: var(--teal); border-radius: 50%; display: inline-block; height: 6px; width: 6px; }

main { padding: 144px 0 64px; }
.content-section { margin-bottom: 160px; scroll-margin-top: 48px; }
.hero-section { min-height: 620px; }

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--white); }
h1 { font-size: clamp(3.6rem, 7vw, 6.1rem); font-weight: 700; letter-spacing: -.08em; line-height: 1.03; margin-bottom: 32px; }
h1 span, h2 span { color: var(--teal); }
h2 { font-size: clamp(1.7rem, 3vw, 2.45rem); font-weight: 600; letter-spacing: -.055em; line-height: 1.1; margin-bottom: 42px; }

.mobile-section-label, .experience-type, .experience-date, .project-meta, .project-index, .tag-row, .project-note, .site-footer {
  font-family: var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.mobile-section-label { color: var(--teal); display: none; font-size: 10px; font-weight: 500; margin-bottom: 18px; }
.hero-copy { font-size: 17px; line-height: 1.65; max-width: 640px; }
.hero-copy p { margin-bottom: 18px; }
.hero-copy p:last-child { margin-bottom: 0; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 38px; }
.text-link { color: var(--white); font-size: 14px; font-weight: 600; }
.text-link span { color: var(--teal); font-size: 18px; margin-left: 4px; transition: transform .2s; }
.text-link:hover { color: var(--teal); }
.text-link:hover span { display: inline-block; transform: translate(3px, -3px); }
.text-button { background: transparent; border: 0; cursor: pointer; padding: 0; }

.highlight-list { border-top: 1px solid var(--line); display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); list-style: none; margin: 76px 0 0; padding: 24px 0 0; }
.highlight-list li { display: flex; flex-direction: column; gap: 5px; }
.highlight-list strong { color: var(--white); font-size: 19px; letter-spacing: -.04em; }
.highlight-list span { font-family: var(--mono); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }

.section-heading { margin-bottom: 36px; }
.experience-list, .project-list { list-style: none; margin: 0; padding: 0; }
.experience-item, .project-item {
  display: grid;
  gap: 24px;
  grid-template-columns: 108px minmax(0, 1fr);
  margin: 0 -24px;
  padding: 24px;
  position: relative;
  transition: background .22s, box-shadow .22s, opacity .22s;
}

.experience-item::before, .project-item::before { border-radius: 6px; content: ''; inset: 8px 0; pointer-events: none; position: absolute; transition: background .22s; z-index: -1; }
.experience-item:hover::before, .project-item:hover::before { background: rgba(30, 41, 59, .62); box-shadow: inset 0 1px 0 rgba(148, 163, 184, .08), 0 12px 28px rgba(2, 6, 23, .15); }
.experience-date, .project-index { color: var(--slate-deep); font-size: 9px; line-height: 1.45; padding-top: 4px; }
.experience-type, .project-meta { color: var(--teal); font-size: 9px; margin-bottom: 9px; }
.experience-body h3, .project-body h3 { font-size: 16px; font-weight: 600; letter-spacing: -.025em; line-height: 1.35; margin-bottom: 8px; }
.experience-body > p:last-child, .project-body > p:not(.project-meta) { font-size: 14px; line-height: 1.6; margin: 0; }
.experience-location { color: var(--slate-deep); font-family: var(--mono); font-size: 9px; letter-spacing: .08em; margin-bottom: 11px; text-transform: uppercase; }

.project-item { padding-bottom: 32px; padding-top: 32px; }
.project-body h3 span { color: var(--teal); display: inline-block; font-size: 18px; margin-left: 4px; transition: transform .2s; }
.project-item:hover .project-body h3 span { transform: translate(3px, -3px); }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tag-row span { background: var(--teal-soft); border-radius: 999px; color: var(--teal); font-size: 8px; padding: 5px 10px; }
.project-note { color: var(--slate-deep); font-size: 8px; margin: 30px 0 0 132px; }

.contact-section { margin-bottom: 120px; max-width: 560px; }
.contact-section h2 { font-size: clamp(3rem, 6vw, 5rem); line-height: 1.02; margin-bottom: 26px; }
.contact-copy { font-size: 15px; max-width: 420px; }
.contact-email { border-bottom: 1px solid var(--teal); color: var(--white); display: inline-flex; font-family: var(--mono); font-size: 13px; margin-top: 15px; padding-bottom: 5px; transition: color .2s, border-color .2s; }
.contact-email span { color: var(--teal); font-family: var(--sans); font-size: 16px; margin-left: 8px; }
.contact-email:hover { border-color: var(--white); color: var(--teal); }

.site-footer { color: var(--slate-deep); display: flex; flex-wrap: wrap; font-size: 8px; gap: 20px; justify-content: space-between; line-height: 1.6; }
.site-footer p { margin: 0; }

.toast { background: var(--teal); bottom: 24px; color: var(--navy); font-family: var(--mono); font-size: 9px; left: 50%; letter-spacing: .05em; opacity: 0; padding: 12px 15px; pointer-events: none; position: fixed; text-transform: uppercase; transform: translate(-50%, 20px); transition: opacity .25s, transform .25s; z-index: 10; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

body.career-mode .primary-nav,
body.career-mode #experience,
body.career-mode #projects,
body.career-mode #contact,
body.career-mode .site-footer { display: none; }
body.career-mode main { padding-top: 144px; }

@media (min-width: 961px) {
  html, body {
    height: 100%;
    overflow: hidden;
  }

  .site-shell {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
  }

  .site-layout {
    height: 100%;
    min-height: 0;
  }

  .site-header {
    height: 100vh;
    min-height: 0;
    position: relative;
  }

  main {
    height: 100vh;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scroll-padding-top: 48px;
    scrollbar-gutter: stable;
  }
}

@media (max-width: 960px) {
  .site-shell { padding: 0 40px; }
  .site-layout { display: block; }
  .site-header { min-height: auto; padding: 64px 0 0; position: relative; }
  .header-bottom { margin-top: 42px; }
  .primary-nav { margin-top: 42px; }
  main { padding-top: 92px; }
  .hero-section { min-height: auto; }
  .content-section { margin-bottom: 120px; }
}

@media (max-width: 640px) {
  .site-shell { padding: 0 24px; }
  .site-header { padding-top: 42px; }
  .brand { font-size: 2.5rem; }
  .site-role { font-size: 16px; }
  .site-intro { font-size: 14px; }
  .primary-nav { display: flex; flex-wrap: wrap; gap: 5px 18px; width: auto; }
  .nav-link { font-size: 9px; }
  .nav-indicator { display: none; }
  .header-bottom { gap: 22px; margin-top: 32px; }
  main { padding-top: 72px; }
  .content-section { margin-bottom: 96px; scroll-margin-top: 24px; }
  .mobile-section-label { display: block; }
  h1 { font-size: clamp(3.25rem, 15vw, 5rem); margin-bottom: 26px; }
  h2 { margin-bottom: 28px; }
  .hero-copy { font-size: 15px; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 18px; margin-top: 30px; }
  .highlight-list { gap: 16px 12px; grid-template-columns: 1fr 1fr; margin-top: 58px; }
  .highlight-list li:last-child { grid-column: span 2; }
  .experience-item, .project-item { gap: 10px; grid-template-columns: 1fr; margin: 0 -12px; padding: 22px 12px; }
  .experience-item::before, .project-item::before { inset: 6px 0; }
  .experience-date, .project-index { padding-top: 0; }
  .experience-body h3, .project-body h3 { font-size: 17px; }
  .experience-body > p:last-child, .project-body > p:not(.project-meta) { font-size: 13px; }
  .project-note { margin-left: 0; }
  .contact-section h2 { font-size: clamp(3.2rem, 15vw, 5rem); }
  .site-footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
