:root {
  --bg: #070708;
  --bg-elevated: #0e0e10;
  --bg-card: #121214;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8e8ec;
  --text-muted: #8b8b9a;
  --accent: #3ee8b5;
  --accent-dim: rgba(62, 232, 181, 0.15);
  --accent-glow: rgba(62, 232, 181, 0.35);
  --font-sans: "Outfit", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --radius: 12px;
  --header-h: 72px;
  --max: 1100px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  background-image: radial-gradient(ellipse 120% 80% at 50% -20%, rgba(62, 232, 181, 0.12), transparent 55%);
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}

a:hover {
  color: #6ff5d0;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn:focus-visible {
  outline-offset: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
  padding: 0 1.5rem;
  background: rgba(7, 7, 8, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand:hover {
  color: var(--accent);
}

.brand-mark {
  font-size: 0.85rem;
}

.brand-sub {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 500;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.site-nav a:hover {
  color: var(--accent);
}

.header-cta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 0.55rem 1rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 999px;
  white-space: nowrap;
}

.header-cta:hover {
  background: var(--accent-dim);
  color: #6ff5d0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 22px;
  background: var(--text);
  margin: 0 auto;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Hero */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  text-align: center;
}

.hero-kicker {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin: 0 0 1.5rem;
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  margin: 0 0 0.5rem;
}

.hero-name {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 8vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
  background: linear-gradient(135deg, #fff 0%, #a8a8b8 50%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-display-name {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text);
  margin: 0.35rem 0 0.15rem;
}

.hero-role-line {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}

.hero-slash {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--text-muted);
  margin: 0.35rem 0 1.25rem;
}

.hero-lead {
  max-width: 38rem;
  margin: 0 auto 2rem;
  color: var(--text-muted);
  font-weight: 400;
}

.hero-lead strong {
  color: var(--text);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 3rem;
}

.btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  display: inline-block;
}

.btn-primary {
  background: var(--accent);
  color: #04120d;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: #6ff5d0;
  color: #04120d;
}

.btn-ghost {
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 44rem;
  margin: 0 auto 2rem;
}

@media (min-width: 640px) {
  .hero-stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat {
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.stat-value {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.scroll-hint {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  color: var(--text-muted);
  margin: 0;
  opacity: 0.7;
}

/* Meta strip */
.meta-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.meta-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem;
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .meta-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .meta-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.meta-key {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

.meta-val {
  font-size: 0.95rem;
  font-weight: 500;
}

/* Sections */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.section--alt {
  background: var(--bg-elevated);
  max-width: none;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section--alt>.section-tag,
.section--alt>.section-title,
.section--alt>.timeline,
.section--alt>.edu-grid,
.section--alt>.highlights-lead,
.section--alt>.highlights-grid,
.section--alt>.orgs-strip {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}

.section--alt .section-tag {
  display: block;
}

.section--alt .section-title {
  display: block;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0 0 0.5rem;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  margin: 0 0 2rem;
  letter-spacing: -0.02em;
}

.section-links {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  margin: 2rem 0 0;
}

.section-links a {
  margin-right: 1.5rem;
}

.section-links a:last-child {
  margin-right: 0;
}

/* Impact highlights */
.highlights-lead {
  color: var(--text-muted);
  max-width: 42rem;
  margin: -1rem 0 1.75rem;
  font-size: 0.98rem;
}

.highlights-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 700px) {
  .highlights-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .highlights-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.highlight-card {
  padding: 1.35rem 1.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.highlight-card:hover {
  border-color: rgba(62, 232, 181, 0.22);
  box-shadow: 0 12px 40px -20px var(--accent-glow);
}

.highlight-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  letter-spacing: 0.02em;
  line-height: 1.35;
}

.highlight-context {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.65rem;
}

.highlight-details {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-muted);
  list-style: disc;
}

.highlight-details li {
  margin-bottom: 0.25rem;
}

.highlight-details li:last-child {
  margin-bottom: 0;
}

.orgs-strip {
  margin-top: 2.75rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.orgs-strip-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.orgs-strip-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.org-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* About */
.about-grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.about-copy p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.about-copy p:last-child {
  margin-bottom: 0;
}

.about-quote {
  font-style: italic;
  color: var(--text) !important;
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin: 1.25rem 0 !important;
}

.about-pillars {
  display: grid;
  gap: 1rem;
}

@media (min-width: 500px) {
  .about-pillars {
    grid-template-columns: repeat(2, 1fr);
  }
}

.pillar {
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.pillar-icon {
  font-size: 1.25rem;
  display: block;
  margin-bottom: 0.5rem;
}

.pillar h3 {
  font-size: 1rem;
  margin: 0 0 0.35rem;
  font-weight: 600;
}

.pillar p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Timeline / jobs */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.job {
  padding: 1.5rem 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.job:hover {
  border-color: rgba(62, 232, 181, 0.25);
  box-shadow: 0 0 0 1px var(--accent-dim);
}

.job-head {
  margin-bottom: 1rem;
}

.job-dates {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.35rem;
}

.job h3 {
  font-size: 1.1rem;
  margin: 0 0 0.25rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.job-company {
  margin: 0;
  font-weight: 500;
  color: var(--accent);
}

.job-note {
  color: var(--text-muted);
  font-weight: 400;
}

.job-bullets {
  margin: 0 0 1rem;
  padding-left: 1.15rem;
  color: var(--text-muted);
}

.job-bullets li {
  margin-bottom: 0.4rem;
}

.job-bullets li:last-child {
  margin-bottom: 0;
}

.job-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 0.3rem 0.55rem;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.tag--lg {
  font-size: 0.75rem;
  padding: 0.4rem 0.65rem;
}

.skills-intro {
  color: var(--text-muted);
  max-width: 40rem;
  margin: -1rem 0 1.5rem;
}

.skill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Education */
.edu-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 700px) {
  .edu-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.edu-card {
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.edu-card h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.edu-year {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  margin: 0 0 0.5rem;
}

.edu-card p:last-child {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Contact */
.section-contact {
  padding-bottom: 5rem;
}

.contact-lead {
  color: var(--text-muted);
  max-width: 32rem;
  margin: -1rem 0 2rem;
}

.contact-list {
  list-style: none;
  margin: 0 0 2.5rem;
  padding: 0;
}

.contact-list li {
  margin-bottom: 0.85rem;
}

.contact-list a {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 500;
}

.contact-list a:hover {
  color: var(--accent);
}

.contact-icon {
  font-size: 1.1rem;
}

.terminal {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.8;
  padding: 1.25rem 1.5rem;
  background: #050506;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 28rem;
}

.terminal-line {
  margin: 0;
}

.terminal-line.dim {
  color: var(--text-muted);
}

.prompt {
  color: var(--accent);
}

.prompt.dim {
  opacity: 0.6;
}

.indent {
  padding-left: 1rem;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 2rem 1.5rem 3rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-brand {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent);
  margin-right: 0.35rem;
}

.footer-copy {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
}

/* Mobile nav */
@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }

  .header-cta {
    display: none;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: rgba(7, 7, 8, 0.97);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem 1.25rem;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s;
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0.75rem;
  }

  .site-nav a {
    font-size: 0.8rem;
  }
}

@media (max-width: 900px) {
  body.nav-open {
    overflow: hidden;
  }
}

/* —— Animations —— */
.hero-enter {
  opacity: 0;
  animation: heroFadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--enter, 0) * 0.075s);
}

@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-stats .hero-stat {
  opacity: 0;
  animation: heroFadeUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.scroll-hint-anim {
  opacity: 0;
  animation: hintFadeUp 0.65s 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards,
    scrollBob 2.8s ease-in-out 1.65s infinite;
}

@keyframes hintFadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 0.72;
    transform: translateY(0);
  }
}

@keyframes scrollBob {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(8px);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  filter: blur(0);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-slow {
  transition-duration: 1s;
}

.skill-cloud .tag {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.skill-cloud .tag:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px -6px var(--accent-glow);
}

.section-contact.is-visible .terminal {
  transition: box-shadow 0.9s ease 0.2s, border-color 0.5s ease 0.2s;
  box-shadow: 0 0 48px -16px var(--accent-glow);
  border-color: rgba(62, 232, 181, 0.22);
}

.reduce-motion .hero-enter,
.reduce-motion .hero-stats .hero-stat,
.reduce-motion .scroll-hint-anim {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}

.reduce-motion .scroll-hint-anim {
  opacity: 0.65 !important;
}

.reduce-motion .reveal {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

.reduce-motion .section-contact.is-visible .terminal {
  box-shadow: none;
  border-color: var(--border);
}

/* Print / save as PDF */
@media print {
  html {
    scroll-behavior: auto;
  }

  body {
    background: #fff;
    color: #111;
    background-image: none;
  }

  .site-header,
  .scroll-hint,
  .terminal,
  .nav-toggle {
    display: none !important;
  }

  .hero-name {
    -webkit-text-fill-color: #111;
    background: none;
    color: #111;
  }

  .hero-display-name,
  .hero-role-line,
  .hero-lead,
  .hero-slash {
    color: #333;
  }

  .stat-value,
  .section-tag,
  .highlight-context,
  .meta-key,
  .job-company,
  .edu-year,
  .footer-brand {
    color: #0d4f3c;
  }

  a {
    color: #0d4f3c;
    text-decoration: underline;
  }

  .job,
  .highlight-card,
  .pillar,
  .edu-card,
  .stat {
    border-color: #ccc;
    break-inside: avoid;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  .section,
  .section--alt {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }
}