:root {
  --bg: #282c34;
  --fg: #abb2bf;
  --card: #21252b;
  --muted: #5c6370;
  --border: #3e4452;
  --accent: #61afef;
  --green: #98c379;
  --yellow: #e5c07b;
  --cyan: #56b6c2;
  --navy-teal: var(--yellow);
  --purple: #c678dd;
  --footer-bg: #1e2127;
  --footer-fg: #abb2bf;
  --header-bg: rgba(40, 44, 52, 0.75);
  --subtle-line: rgba(255, 255, 255, 0.06);
  --radius-xl: 1.5rem;
  --container: 1200px;
  --marquee-height: 3.25rem;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
  font-weight: 300;
  font-size: 1.125rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  padding-bottom: calc(var(--marquee-height) + env(safe-area-inset-bottom));
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ── SCROLL ANIMATIONS ── */
.reveal {
  opacity: 0;
  filter: blur(6px);
  transform: translateY(24px);
  transition: opacity 0.8s ease, filter 0.8s ease, transform 0.8s ease;
}
.reveal.visible { opacity: 1; filter: blur(0); transform: translateY(0); }
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; filter: none; transform: none; transition: none; }
  .marquee-track { animation: none !important; }
}

/* ══════ STICKY HEADER ══════ */
.sticky-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding: 0 1.5rem;
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--header-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--subtle-line);
  transform: translate3d(0, -100%, 0);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  pointer-events: none;
}
.sticky-header.visible {
  transform: translate3d(0, 0, 0);
  opacity: 1;
  pointer-events: all;
}
.sticky-header-name {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 900; font-size: 0.875rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fg);
}
.sticky-header-cta {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1.25rem; border-radius: 9999px;
  background: var(--accent); color: var(--bg);
  font-size: 0.8125rem; font-weight: 500;
  transition: transform 0.2s ease, opacity 0.2s ease; min-height: 40px;
  font-family: 'Inter', sans-serif;
}
.sticky-header-cta:hover { transform: scale(1.03); }
.sticky-header-cta svg { width: 14px; height: 14px; }

@media (min-width: 768px) {
  .sticky-header { padding: 0 2rem; }
}

/* ══════ HERO ══════ */
.hero {
  padding: clamp(4.5rem, 9vw, 8rem) 0 0;
  text-align: center;
}

.hero h1 {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 900;
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  max-width: 800px;
  margin-left: auto; margin-right: auto;
}

.hero-sub {
  font-size: clamp(1.0625rem, 2.5vw, 1.25rem);
  color: var(--muted);
  max-width: 580px;
  margin: 0 auto 2.5rem;
  line-height: 1.75;
  font-weight: 300;
}
.hero-sub strong { color: #5f8da6; }

.hero-cta-wrap { position: relative; display: inline-flex; margin-bottom: 3rem; }

.hero-cta {
  display: inline-flex; align-items: center; gap: 0.625rem;
  padding: 1rem 2rem; border-radius: 9999px;
  background: var(--accent); color: var(--bg);
  font-size: 1rem; font-weight: 500;
  transition: transform 0.2s ease, opacity 0.2s ease;
  position: relative; z-index: 1; min-height: 56px;
}
.hero-cta:hover { transform: scale(1.03); }
.hero-cta svg { width: 18px; height: 18px; }

.hero .hero-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.08em;
  width: 100%;
  max-width: none;
  margin: 0 auto clamp(3rem, 6vw, 5rem);
  text-align: center;
  font-size: clamp(1.75rem, 8.5vw, 7.5rem);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.hero .hero-title span {
  display: block;
  white-space: nowrap;
  opacity: 0;
  filter: blur(10px);
  transform: translateY(0.35em);
  transition:
    opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero .hero-title.reveal {
  opacity: 1;
  filter: none;
  transform: none;
  transition: none;
}

.hero .hero-title.visible span {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

.hero .hero-title span:nth-child(1) { transition-delay: 0.05s; }
.hero .hero-title span:nth-child(2) { transition-delay: 0.2s; }
.hero .hero-title span:nth-child(3) { transition-delay: 0.35s; }

body.hero-intro-pending {
  overflow: hidden;
}

body.hero-intro-pending .sticky-header,
body.hero-intro-pending .hero-sub,
body.hero-intro-pending .hero-cta-wrap,
body.hero-intro-pending main > :not(.hero),
body.hero-intro-pending .footer,
body.hero-intro-pending .marquee {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

body.hero-intro-complete .hero-sub,
body.hero-intro-complete .hero-cta-wrap,
body.hero-intro-complete main > :not(.hero),
body.hero-intro-complete .footer,
body.hero-intro-complete .marquee {
  animation: post-title-reveal 1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes post-title-reveal {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero .hero-title span {
    opacity: 1;
    filter: none;
    transform: none;
    transition: none;
  }

  body.hero-intro-complete .hero-sub,
  body.hero-intro-complete .hero-cta-wrap,
  body.hero-intro-complete main > :not(.hero),
  body.hero-intro-complete .footer,
  body.hero-intro-complete .marquee {
    animation: none;
  }
}

/* ══════ MARQUEE ══════ */
.marquee {
  position: fixed;
  z-index: 40;
  right: 0;
  bottom: 0;
  left: 0;
  height: calc(var(--marquee-height) + env(safe-area-inset-bottom));
  background: var(--card);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
  overflow: hidden;
  display: flex;
  align-items: center;
  pointer-events: none;
}
.marquee-track {
  display: flex; gap: 3rem;
  flex: none;
  animation: scroll-m 35s linear infinite;
  width: max-content;
}
.marquee-item {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500; font-size: 0.75rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); white-space: nowrap;
  display: flex; align-items: center; gap: 3rem;
}
.marquee-item::after { content: '\00b7'; color: var(--border); font-size: 1.25rem; }

@keyframes scroll-m { to { transform: translateX(-50%); } }

/* ══════ SECTIONS SHARED ══════ */
.section { padding: 4rem 0; }
@media (min-width: 768px) { .section { padding: 5rem 0; } }
@media (min-width: 1024px) { .section { padding: 9rem 0; } }

.section-header-split {
  display: flex; flex-direction: column; gap: 1.5rem; margin-bottom: 3rem;
}
@media (min-width: 768px) {
  .section-header-split { flex-direction: row; align-items: flex-start; gap: 3rem; }
  .section-header-left { flex: 0 0 55%; }
  .section-header-right { flex: 1; padding-top: 0.25rem; }
}

.section-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.375rem 0.875rem; border-radius: 9999px;
  border: 1px solid var(--border); font-size: 0.875rem;
  font-weight: 400; width: fit-content; margin-bottom: 1rem;
}
.section-badge svg { width: 14px; height: 14px; color: var(--muted); }

.section-title {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 900;
  font-size: clamp(1.75rem, 5vw, 3.25rem);
  line-height: 1.1; letter-spacing: -0.025em;
}

.section-desc { font-size: 1.125rem; color: var(--muted); line-height: 1.75; font-weight: 300; }

/* ══════ PHASE PANELS ══════ */
.phase { padding: 4rem 0; }
@media (min-width: 768px) { .phase { padding: 5rem 0; } }
@media (min-width: 1024px) { .phase { padding: 9rem 0; } }
.phase + .phase { border-top: 1px solid var(--border); }

.phase-inner { display: flex; flex-direction: column; gap: 2rem; }
@media (min-width: 768px) {
  .phase-inner { flex-direction: row; gap: 3rem; align-items: center; }
  .phase-inner.reverse { flex-direction: row-reverse; }
}

.phase-content { flex: 1; display: flex; flex-direction: column; gap: 1.25rem; }

.phase-label {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500; font-size: 0.6875rem;
  letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted);
}
.phase-label svg { width: 16px; height: 16px; }
.role-symbol { flex: 0 0 auto; }
.phase-label-navy .role-symbol { color: var(--navy-teal); }
.phase-label-apple .role-symbol { color: var(--purple); }
.phase-label-microsoft .role-symbol { color: var(--green); }

.apple-symbol {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.25rem;
  line-height: 1;
}

.ms-logo {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  width: 16px;
  height: 16px;
}
.ms-logo span { background: currentColor; }

.phase-heading {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 900;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  line-height: 1.15; letter-spacing: -0.02em;
}

.phase-body { font-size: 1.0625rem; color: var(--muted); line-height: 1.8; font-weight: 300; }
.phase-body strong { color: var(--accent); font-weight: 500; }
.apple-degree-callout {
  align-self: flex-start;
  padding: 0.4rem 0.65rem;
  border-left: 2px solid var(--purple);
  background: rgba(198, 120, 221, 0.06);
  color: var(--fg);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.625rem;
  line-height: 1.5;
}

.phase-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; padding-top: 0.5rem; }
.phase-tag {
  display: inline-block; padding: 0.25rem 0.75rem; border-radius: 9999px;
  border: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.625rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--cyan);
}

/* ══════ STATS ══════ */
.stats {
  background: var(--card);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}

.stats-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 640px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .stats-grid { grid-template-columns: repeat(3, 1fr); } }

.stat-card {
  background: var(--bg); border-radius: var(--radius-xl);
  padding: 2rem; display: flex; flex-direction: column; gap: 1rem;
}

.stat-icon {
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.stat-icon svg { width: 20px; height: 20px; color: var(--muted); }

.stat-num {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 900; font-size: 3rem; line-height: 1; letter-spacing: -0.03em;
}

.stat-lbl {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500; font-size: 0.625rem;
  letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted);
}

.stat-desc { font-size: 0.9375rem; color: var(--muted); line-height: 1.6; font-weight: 300; }

/* ══════ CTA ══════ */
.cta-section { text-align: center; border-top: 1px solid var(--border); }
.cta-section .section-title { margin-bottom: 1rem; }
.cta-section .section-desc { max-width: 480px; margin: 0 auto 2.5rem; }

.cta-btns { display: flex; flex-direction: column; gap: 1rem; align-items: center; }
@media (min-width: 480px) { .cta-btns { flex-direction: row; justify-content: center; } }

.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 1rem 2rem; border-radius: 9999px;
  background: var(--accent); color: var(--bg);
  font-size: 1rem; font-weight: 500;
  transition: transform 0.2s ease, opacity 0.2s ease;
  min-height: 56px;
}
.btn-primary:hover { transform: scale(1.03); }

.resume-clicked {
  opacity: 0;
  transform: scale(0.97);
  pointer-events: none;
}

.btn-secondary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 1rem 2rem; border-radius: 9999px;
  border: 1px solid var(--border);
  font-size: 1rem; font-weight: 500;
  transition: all 0.2s; min-height: 56px;
}
.btn-secondary:hover { background: var(--card); }
.btn-secondary svg, .btn-primary svg { width: 16px; height: 16px; }

/* ══════ FOOTER ══════ */
.footer {
  background: var(--footer-bg); color: var(--footer-fg);
  padding: 4rem 0 2rem; position: relative; overflow: hidden;
}

.footer-top { display: flex; flex-direction: column; gap: 2rem; margin-bottom: 3rem; }
@media (min-width: 768px) {
  .footer-top { flex-direction: row; justify-content: space-between; align-items: flex-start; }
}

.footer-brand { max-width: 320px; }
.footer-brand-name {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 900; font-size: 1rem;
  letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.75rem;
}
.footer-brand-tagline { font-size: 0.9375rem; opacity: 0.6; line-height: 1.6; font-weight: 300; }

.footer-links { display: flex; gap: 4rem; }
.footer-col-title {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500; font-size: 0.625rem;
  letter-spacing: 0.15em; text-transform: uppercase;
  opacity: 0.4; margin-bottom: 1rem;
}
.footer-col a {
  display: flex; align-items: center;
  font-size: 0.9375rem; opacity: 0.7;
  padding: 0.375rem 0; transition: opacity 0.2s;
  font-weight: 300; min-height: 44px;
}
.footer-col a:hover { opacity: 1; }

.footer-watermark {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 900;
  font-size: clamp(5rem, 18vw, 14rem);
  text-transform: uppercase; letter-spacing: -0.03em;
  opacity: 0.04; text-align: center; line-height: 1;
  margin: 2rem 0;
  user-select: none; pointer-events: none;
}

.footer-bottom {
  display: flex; flex-direction: column; gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
@media (min-width: 768px) {
  .footer-bottom { flex-direction: row; justify-content: space-between; align-items: center; }
}

.footer-copy { font-size: 0.8125rem; opacity: 0.4; font-weight: 300; }

.footer-social { display: flex; gap: 1.25rem; }
.footer-social a {
  opacity: 0.6; transition: opacity 0.2s;
  display: flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px;
}
.footer-social a:hover { opacity: 1; }
.footer-social svg { width: 20px; height: 20px; }

/* Matt's Navy ET rating symbol */
.et-rating {
  width: 20px; height: 20px;
  fill: none; stroke: currentColor;
  stroke-linecap: butt; stroke-linejoin: round;
  stroke-width: 3.4;
}
.et-rating-fill, .et-rating-star {
  fill: currentColor; stroke: none;
}
