:root {
  --bg: #07090f;
  --bg-2: #0a0d15;
  --bg-elev: #0f131d;
  --surface: rgba(20, 26, 38, 0.6);
  --surface-strong: rgba(24, 31, 46, 0.86);
  --text: #e9edf6;
  --text-muted: #9aa4ba;
  --text-soft: #69728a;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --accent: #f3f6fc;
  --accent-ink: #090c13;
  --red-strong: rgba(255, 86, 86, 0.6);
  --blue-strong: rgba(78, 156, 255, 0.62);
  --shadow-soft: 0 14px 30px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 26px 56px -30px rgba(0, 0, 0, 0.8);
  --shadow-deep: 0 36px 80px -34px rgba(0, 0, 0, 0.92);
  --shadow-reactive: 0 40px 100px -42px rgba(0, 0, 0, 0.95);
  --max: 1140px;
  --radius-sm: 8px;
  --radius-md: 18px;
  --radius-lg: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  --cursor-x: 50%;
  --cursor-y: 18%;
  --cursor-dx: 0px;
  --cursor-dy: 0px;
  margin: 0;
  color: var(--text);
  font-family: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-weight: 400;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(circle at top left, rgba(58, 64, 78, 0.22), transparent 42%),
    linear-gradient(180deg, #0c0e13 0%, #07080c 100%);
}

body::before,
body::after {
  content: '';
  position: fixed;
  inset: auto;
  width: 34rem;
  height: 34rem;
  border-radius: 999px;
  filter: blur(90px);
  pointer-events: none;
  z-index: -1;
  opacity: 0.5;
}

body::before {
  top: -8rem;
  left: -10rem;
  background: rgba(120, 128, 145, 0.14);
}

body::after {
  right: -8rem;
  top: 18rem;
  background: rgba(120, 128, 145, 0.1);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease, text-shadow 180ms ease;
}

.shell {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 11, 18, 0.78);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand,
.nav-links a {
  font-size: 0.94rem;
  line-height: 1;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--text-muted);
}

.nav-links a {
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red-strong), var(--blue-strong));
  opacity: 0;
  transform: scaleX(0.45);
  transition: opacity 180ms ease, transform 180ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text);
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  opacity: 1;
  transform: scaleX(1);
}

/* ---- Section seams: a clean neutral hairline that fades at the edges ---- */
.hero-section,
.section {
  position: relative;
}

.section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1) 50%, transparent);
  pointer-events: none;
  z-index: 0;
}

.hero-section {
  overflow: hidden;
  padding: 96px 0 96px;
  background: linear-gradient(180deg, rgba(15, 18, 26, 0.55), rgba(7, 9, 14, 0.85));
}

/* Reactive cursor glow — the only place red/blue live in the hero backdrop */
.hero-section::before {
  content: '';
  position: absolute;
  inset: -25%;
  background:
    radial-gradient(circle at var(--cursor-x) var(--cursor-y), rgba(78, 156, 255, 0.18), transparent 18rem),
    radial-gradient(circle at calc(100% - var(--cursor-x)) 28%, rgba(255, 86, 86, 0.12), transparent 20rem);
  opacity: 0.85;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.hero-blob,
.section-blob,
.section-blur,
.contact-blob {
  position: absolute;
  border-radius: 999px;
  filter: blur(50px);
  pointer-events: none;
}

.hero-blob-one {
  width: 24rem;
  height: 24rem;
  left: -4rem;
  top: 1rem;
  background: rgba(130, 138, 156, 0.12);
}

.hero-blob-two {
  width: 28rem;
  height: 28rem;
  right: -8rem;
  top: -3rem;
  background: rgba(130, 138, 156, 0.1);
}

.hero-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.8fr);
  gap: 34px;
  align-items: center;
}

.hero-copy,
.hero-panel,
.section-heading,
.project-card,
.capability-card,
.timeline-item,
.achievement-card,
.contact-card {
  position: relative;
  z-index: 1;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.status-pill,
.eyebrow,
.project-meta,
.snapshot-label,
.metric-label,
.achievement-label,
.timeline-date {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.eyebrow {
  margin: 0 0 14px;
  color: rgba(233, 237, 246, 0.55);
}

.eyebrow-dark {
  color: rgba(233, 237, 246, 0.5);
}

.hero-copy h1,
.section-heading h2,
.contact-card h2 {
  margin: 0;
  line-height: 0.98;
  letter-spacing: -0.05em;
  font-weight: 400;
  text-wrap: balance;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.4),
    0 14px 30px rgba(0, 0, 0, 0.55);
}

.hero-copy h1 {
  max-width: 12ch;
  font-size: clamp(3.3rem, 7vw, 5.8rem);
  transform: translate3d(var(--cursor-dx), var(--cursor-dy), 0);
  transition: transform 260ms ease-out;
}

.hero-text,
.section-heading p,
.project-card p,
.capability-card p,
.timeline-content p,
.contact-copy p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.58;
}

.hero-text {
  max-width: 34rem;
  margin-top: 22px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 17px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.98rem;
  font-weight: 600;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: #ffffff;
  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.55),
    0 0 0 5px rgba(78, 156, 255, 0.14),
    0 0 38px rgba(255, 86, 86, 0.22);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--text);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(78, 156, 255, 0.42);
  box-shadow: 0 14px 34px rgba(78, 156, 255, 0.16);
}

.button-secondary-dark {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.button-secondary-dark:hover,
.button-secondary-dark:focus-visible {
  background: rgba(255, 255, 255, 0.12);
}

.hero-panel {
  display: grid;
  gap: 18px;
}

.terminal-card,
.hero-note-card,
.project-card,
.capability-card,
.timeline-item,
.achievement-card,
.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-card);
}

.terminal-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-deep);
  transform: perspective(900px) rotateX(0deg) rotateY(-1deg);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.terminal-card:hover {
  transform: perspective(900px) rotateX(1deg) rotateY(-3deg) translateY(-3px);
  border-color: rgba(78, 156, 255, 0.32);
  box-shadow:
    var(--shadow-reactive),
    -18px 18px 46px rgba(78, 156, 255, 0.16);
}

.terminal-bar {
  display: flex;
  gap: 8px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--line);
}

.terminal-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}

.terminal-body {
  padding: 20px 18px;
  font-family: 'Source Code Pro', ui-monospace, monospace;
  font-size: 0.77rem;
  line-height: 1.8;
}

.terminal-body p {
  margin: 0;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
}

.terminal-key {
  color: var(--text-soft);
}

.terminal-value {
  color: var(--text);
}

.hero-note-grid {
  display: grid;
  gap: 14px;
}

.hero-note-card {
  padding: 18px;
  border-radius: var(--radius-md);
}

.hero-note-card-accent {
  background:
    linear-gradient(180deg, rgba(34, 40, 52, 0.72), rgba(22, 27, 37, 0.64)),
    radial-gradient(circle at right top, rgba(255, 255, 255, 0.06), transparent 48%);
}

.snapshot-label,
.project-meta,
.metric-label,
.achievement-label,
.timeline-date {
  display: block;
  margin-bottom: 10px;
  color: rgba(233, 237, 246, 0.5);
}

.hero-note-card strong,
.metric-row strong,
.achievement-card strong {
  font-size: 1rem;
  line-height: 1.45;
  font-weight: 600;
  color: var(--text);
}

.section {
  padding: 108px 0;
}

.section-work {
  background: linear-gradient(180deg, rgba(15, 18, 25, 0.5), rgba(9, 11, 16, 0.85));
}

.section-light {
  background: linear-gradient(180deg, #0d0f14 0%, #08090d 100%);
}

.section-capabilities {
  overflow: hidden;
  background: linear-gradient(180deg, #121419 0%, #0d0f14 52%, #0a0b10 100%);
  color: #ffffff;
}

.section-timeline {
  background: linear-gradient(180deg, rgba(14, 16, 22, 0.55), rgba(9, 11, 16, 0.92));
}

.section-contact {
  overflow: hidden;
  padding: 108px 0 120px;
  background: linear-gradient(180deg, #111318 0%, #08090d 100%);
}

.section-blur-left {
  width: 18rem;
  height: 18rem;
  left: -5rem;
  top: 8rem;
  background: rgba(130, 138, 156, 0.1);
}

.section-blob-right {
  width: 24rem;
  height: 24rem;
  right: -8rem;
  top: 4rem;
  background: rgba(130, 138, 156, 0.1);
}

.contact-blob {
  width: 30rem;
  height: 30rem;
  right: -10rem;
  bottom: -12rem;
  background: rgba(130, 138, 156, 0.12);
}

.section-heading {
  margin-bottom: 38px;
}

.section-heading h2,
.contact-card h2 {
  max-width: 13ch;
  font-size: clamp(2.5rem, 5vw, 4.4rem);
}

.wide-copy {
  max-width: 760px;
}

.narrow-copy {
  max-width: 640px;
}

.section-heading p {
  margin-top: 16px;
  max-width: 40rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.project-card {
  display: grid;
  gap: 20px;
  padding: 28px;
  border-radius: 22px;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease, background 220ms ease;
}

.project-card::before,
.capability-card::before,
.hero-note-card::before,
.achievement-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 86, 86, 0.16), transparent 32%, rgba(78, 156, 255, 0.18));
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.project-card:hover,
.project-card:focus-within {
  transform: translateY(-6px);
  border-color: rgba(78, 156, 255, 0.32);
  box-shadow: var(--shadow-reactive);
}

.project-card:hover::before,
.project-card:focus-within::before,
.capability-card:hover::before,
.hero-note-card:hover::before,
.achievement-card:hover::before {
  opacity: 1;
}

.project-card-featured {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  box-shadow: var(--shadow-deep);
}

.project-card h3,
.capability-card h3,
.timeline-content h3 {
  margin: 0 0 12px;
  font-size: 1.95rem;
  line-height: 1.06;
  letter-spacing: -0.04em;
  font-weight: 400;
  color: var(--text);
  text-shadow: 0 12px 26px rgba(0, 0, 0, 0.5);
  transition: color 180ms ease, text-shadow 180ms ease;
}

.project-card:hover h3,
.timeline-item:hover h3 {
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.4),
    -8px 12px 24px rgba(78, 156, 255, 0.26),
    8px 14px 26px rgba(255, 86, 86, 0.18);
}

.project-points {
  margin: 18px 0 0;
  padding-left: 18px;
  color: var(--text-muted);
  line-height: 1.75;
}

.project-panel {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 18px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.code-panel span,
.note-panel span {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: 'Source Code Pro', ui-monospace, monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.metric-panel {
  gap: 16px;
}

.metric-row {
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.metric-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.capability-card {
  padding: 28px;
  border-radius: 22px;
  background: rgba(22, 28, 42, 0.72);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 26px 64px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease, background 220ms ease;
}

.capability-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow:
    0 38px 96px rgba(0, 0, 0, 0.6),
    -18px 22px 58px rgba(78, 156, 255, 0.16),
    18px 18px 48px rgba(255, 86, 86, 0.12);
}

.capability-card:hover h3 {
  text-shadow:
    -8px 12px 24px rgba(78, 156, 255, 0.3),
    8px 14px 26px rgba(255, 86, 86, 0.22);
}

.capability-card h3 {
  color: #ffffff;
}

.capability-card p {
  color: rgba(255, 255, 255, 0.76);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.tag-row span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.tag-row span:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(78, 156, 255, 0.42);
}

.timeline-layout {
  display: grid;
  gap: 28px;
}

.timeline-stack {
  display: grid;
  gap: 18px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  padding: 22px 24px;
  border-radius: 22px;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.timeline-item:hover,
.achievement-card:hover,
.hero-note-card:hover {
  transform: translateY(-4px);
  border-color: rgba(78, 156, 255, 0.3);
  box-shadow: var(--shadow-reactive);
}

.timeline-date {
  margin-bottom: 0;
  color: rgba(233, 237, 246, 0.55);
}

.timeline-content h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.achievement-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.achievement-card {
  padding: 20px;
  border-radius: 20px;
}

.contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 30px;
  align-items: end;
  padding: 36px;
  border-radius: 28px;
  background: rgba(18, 24, 38, 0.82);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 32px 88px rgba(0, 0, 0, 0.6);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.contact-card:hover {
  transform: translateY(-4px);
  border-color: rgba(78, 156, 255, 0.32);
  box-shadow:
    0 40px 110px rgba(0, 0, 0, 0.68),
    -26px 28px 70px rgba(78, 156, 255, 0.16),
    28px 24px 64px rgba(255, 86, 86, 0.12);
}

.contact-card h2,
.contact-card p,
.contact-card .eyebrow {
  color: #ffffff;
}

.contact-card p {
  color: rgba(255, 255, 255, 0.74);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header {
    background: rgba(8, 11, 18, 0.96);
  }

  .terminal-card,
  .hero-note-card,
  .project-card,
  .timeline-item,
  .achievement-card {
    background: rgba(16, 21, 32, 0.96);
  }

  .capability-card {
    background: rgba(22, 28, 42, 0.96);
  }

  .contact-card {
    background: rgba(18, 24, 38, 0.96);
  }
}

/* ---- Scroll reveal (reactive entrance) ---- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 720ms cubic-bezier(0.22, 1, 0.36, 1), transform 720ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

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

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

  .hero-copy h1,
  .terminal-card,
  .project-card:hover,
  .capability-card:hover,
  .timeline-item:hover,
  .achievement-card:hover,
  .hero-note-card:hover,
  .contact-card:hover {
    transform: none !important;
  }
}

@media (max-width: 1060px) {
  .hero-layout,
  .project-card-featured,
  .capability-grid,
  .contact-card,
  .timeline-item,
  .achievement-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    max-width: 10ch;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(calc(100% - 28px), var(--max));
  }

  .nav {
    min-height: 86px;
    flex-direction: column;
    justify-content: center;
    padding: 12px 0;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
  }

  .hero-section,
  .section,
  .section-contact {
    padding: 78px 0;
  }

  .hero-copy h1 {
    max-width: none;
    font-size: clamp(2.7rem, 12vw, 4rem);
  }

  .section-heading h2,
  .contact-card h2 {
    max-width: 15ch;
    font-size: clamp(2.1rem, 11vw, 3rem);
  }

  .project-card,
  .capability-card,
  .timeline-item,
  .achievement-card,
  .contact-card,
  .hero-note-card {
    padding: 22px;
  }

  .terminal-body p {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .hero-text,
  .section-heading p,
  .project-card p,
  .capability-card p,
  .timeline-content p,
  .contact-copy p {
    font-size: 1rem;
  }
}
