/* =========================================================
   DESIGN SYSTEM — Dark Editorial Portfolio
   ========================================================= */

/* --- Fonts --- */
@import url('https://api.fontshare.com/v2/css?f[]=satoshi@300,400,500,700,900&display=swap');

/* --- Custom Properties --- */
:root {
  /* Palette: monochromatic grays + cold blue accent */
  --bg-root:       hsl(0, 0%, 4%);
  --bg-surface:    hsl(0, 0%, 7%);
  --bg-elevated:   hsl(0, 0%, 10%);
  --bg-hover:      hsl(0, 0%, 13%);
  --border-subtle: hsl(0, 0%, 14%);
  --border-mid:    hsl(0, 0%, 20%);

  --text-primary:   hsl(0, 0%, 92%);   /* #ebebeb  — 19.5:1 on bg-root */
  --text-secondary: hsl(0, 0%, 60%);   /* #999     — 7.3:1  on bg-root */
  --text-tertiary:  hsl(0, 0%, 40%);   /* #666     — 4.6:1  on bg-root (AA) */
  --text-ghost:     hsl(0, 0%, 22%);

  --accent:         hsl(210, 100%, 60%);
  --accent-hover:   hsl(210, 100%, 70%);
  --accent-subtle:  hsl(210, 100%, 12%);

  /* Typography */
  --font-sans: 'Satoshi', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --weight-light:   300;
  --weight-regular: 400;
  --weight-medium:  500;
  --weight-bold:    700;
  --weight-black:   900;

  /* Spacing scale */
  --s-2:  0.125rem;
  --s-4:  0.25rem;
  --s-8:  0.5rem;
  --s-12: 0.75rem;
  --s-16: 1rem;
  --s-20: 1.25rem;
  --s-24: 1.5rem;
  --s-32: 2rem;
  --s-40: 2.5rem;
  --s-48: 3rem;
  --s-64: 4rem;
  --s-80: 5rem;
  --s-96: 6rem;
  --s-128: 8rem;
  --s-160: 10rem;

  /* Layout */
  --max-width:    1200px;
  --content-width: 820px;
  --gutter:        clamp(1.25rem, 4vw, 3rem);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 150ms;
  --duration-mid:  300ms;
  --duration-slow: 600ms;
}


/* =========================================================
   RESET & BASE
   ========================================================= */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  font-weight: var(--weight-regular);
  color: var(--text-primary);
  background-color: var(--bg-root);
  line-height: 1.6;
  overflow-x: hidden;
}

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

img {
  display: block;
  max-width: 100%;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

::selection {
  background: var(--accent);
  color: var(--bg-root);
}


/* =========================================================
   UTILITY: Containers
   ========================================================= */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: var(--content-width);
}


/* =========================================================
   UTILITY: Scroll-triggered reveal
   ========================================================= */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

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

/* Stagger children */
.reveal-stagger > .reveal:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger > .reveal:nth-child(2) { transition-delay: 80ms; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 160ms; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 240ms; }
.reveal-stagger > .reveal:nth-child(5) { transition-delay: 320ms; }
.reveal-stagger > .reveal:nth-child(6) { transition-delay: 400ms; }
.reveal-stagger > .reveal:nth-child(7) { transition-delay: 480ms; }
.reveal-stagger > .reveal:nth-child(8) { transition-delay: 560ms; }


/* =========================================================
   NAVIGATION — Fixed top bar
   ========================================================= */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--s-16) 0;
  background: hsla(0, 0%, 4%, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--duration-mid) var(--ease-out);
}

.site-nav.is-scrolled {
  border-bottom-color: var(--border-subtle);
}

.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-nav__logo {
  display: flex;
  align-items: baseline;
  gap: 0.35em;
  text-decoration: none;
}

.site-nav__logo-first {
  font-weight: var(--weight-black);
  font-size: 1.0625rem;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.site-nav__logo-last {
  font-weight: var(--weight-medium);
  font-size: 1.0625rem;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}

.site-nav__links {
  display: flex;
  gap: var(--s-32);
  list-style: none;
}

.site-nav__link {
  font-size: 0.8125rem;
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  transition: color var(--duration-fast) var(--ease-out);
  text-transform: uppercase;
}

.site-nav__link:hover {
  color: var(--text-primary);
}

.site-nav__link--resume {
  color: var(--accent);
  padding: var(--s-4) var(--s-12);
  border: 1px solid var(--accent);
  border-radius: 4px;
  transition: background var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out);
}

.site-nav__link--resume:hover {
  background: var(--accent);
  color: var(--bg-root);
}

/* Hamburger toggle — hidden on desktop */
.site-nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.site-nav__toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: transform var(--duration-mid) var(--ease-out),
              opacity var(--duration-mid) var(--ease-out);
}

.site-nav__toggle.is-active .site-nav__toggle-bar:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.site-nav__toggle.is-active .site-nav__toggle-bar:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}


/* =========================================================
   SECTION 1: HERO — Centered single-column, stark
   Layout Family: Centered Axis
   ========================================================= */

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--s-128) var(--gutter) var(--s-96);
  position: relative;
  overflow: hidden;
}

/* Ambient gradient glow behind hero content */
.hero::before {
  content: '';
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 140%;
  height: 80%;
  background: radial-gradient(
    ellipse 60% 50% at 50% 40%,
    hsla(210, 100%, 50%, 0.08) 0%,
    hsla(200, 100%, 60%, 0.04) 35%,
    hsla(220, 80%, 40%, 0.02) 60%,
    transparent 80%
  );
  pointer-events: none;
  z-index: 0;
}

/* Ensure hero content sits above the glow */
.hero > * {
  position: relative;
  z-index: 1;
}

.hero__label {
  font-size: 0.75rem;
  font-weight: var(--weight-bold);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--s-24);
}

.hero__title {
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  font-weight: var(--weight-black);
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 14ch;
  margin-bottom: var(--s-24);
  /* Gradient text fill */
  background: linear-gradient(
    135deg,
    hsl(0, 0%, 100%) 0%,
    hsl(0, 0%, 92%) 25%,
    hsl(210, 100%, 72%) 55%,
    hsl(195, 100%, 60%) 100%
  );
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 8s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.hero__subtitle {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  font-weight: var(--weight-regular);
  color: var(--text-secondary);
  max-width: 38ch;
  line-height: 1.6;
  margin-bottom: var(--s-48);
}

.hero__cta-group {
  display: flex;
  align-items: center;
  gap: var(--s-16);
  flex-wrap: wrap;
  justify-content: center;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--s-8);
  padding: var(--s-12) var(--s-32);
  font-size: 0.875rem;
  font-weight: var(--weight-bold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bg-root);
  background: var(--accent);
  border-radius: 6px;
  transition: background var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}

.hero__cta:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.hero__cta--secondary {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.hero__cta--secondary:hover {
  background: var(--accent);
  color: var(--bg-root);
}

.hero__cta-arrow {
  display: inline-block;
  transition: transform var(--duration-fast) var(--ease-out);
}

.hero__cta:hover .hero__cta-arrow {
  transform: translateY(2px);
}

.hero__scroll-hint {
  position: absolute;
  bottom: var(--s-40);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-8);
}

.hero__scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--border-mid), transparent);
  animation: scrollPulse 2s var(--ease-out) infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50%      { opacity: 1;   transform: scaleY(1.15); }
}


/* =========================================================
   SECTION DIVIDER
   ========================================================= */

.section-divider {
  width: 100%;
  height: 1px;
  background: var(--border-subtle);
  border: none;
}


/* =========================================================
   SECTION HEADER (shared)
   ========================================================= */

.section-header {
  margin-bottom: var(--s-64);
}

.section-header__number {
  font-size: 0.75rem;
  font-weight: var(--weight-bold);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--s-16);
  display: block;
}

.section-header__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: var(--weight-bold);
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text-primary);
}


/* =========================================================
   SECTION 2: TRANSITION STORY — Vertical stepped timeline
   Layout Family: Timeline / Rail
   ========================================================= */

.timeline-section {
  padding: var(--s-128) 0;
}

.timeline {
  position: relative;
  padding-left: var(--s-64);
}

/* Vertical rail line — static background track */
.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 15px;
  width: 1px;
  background: var(--border-subtle);
}

/* Vertical rail line — animated progress fill */
.timeline::after {
  content: '';
  position: absolute;
  top: 0;
  left: 15px;
  width: 1px;
  height: 0%;
  background: var(--accent);
  box-shadow: 0 0 8px hsla(210, 100%, 60%, 0.3);
  transition: none; /* JS drives this */
  z-index: 1;
}

.timeline__item {
  position: relative;
  padding-bottom: var(--s-80);
  /* Slide-from-left reveal */
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.7s var(--ease-out),
              transform 0.7s var(--ease-out);
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__item.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Node dot */
.timeline__node {
  position: absolute;
  left: calc(-1 * var(--s-64) + 8px);
  top: 6px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--bg-root);
  border: 2px solid var(--border-mid);
  transition: border-color 0.4s var(--ease-out),
              background 0.4s var(--ease-out),
              transform 0.4s var(--ease-out),
              box-shadow 0.4s var(--ease-out);
  z-index: 3;
}

/* Ripple ring pseudo-element */
.timeline__node::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  opacity: 0;
  transform: scale(0.5);
  transition: none;
}

.timeline__item.is-visible .timeline__node {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 12px hsla(210, 100%, 60%, 0.4);
  transform: scale(1.15);
  animation: nodeSettle 0.6s 0.3s var(--ease-out) forwards;
}

.timeline__item.is-visible .timeline__node::after {
  animation: nodeRipple 0.8s 0.1s var(--ease-out) forwards;
}

@keyframes nodeRipple {
  0% {
    opacity: 0.8;
    transform: scale(0.6);
  }
  100% {
    opacity: 0;
    transform: scale(2.2);
  }
}

@keyframes nodeSettle {
  0%   { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.timeline__duration {
  font-size: 0.75rem;
  font-weight: var(--weight-bold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--s-8);
}

.timeline__role {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: var(--weight-bold);
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: var(--s-16);
}

.timeline__desc {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 52ch;
  line-height: 1.65;
}

.timeline__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-8);
  margin-top: var(--s-16);
}

/* Tags fade in with stagger when parent is visible */
.timeline__tag {
  font-size: 0.6875rem;
  font-weight: var(--weight-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: var(--s-4) var(--s-12);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  background: var(--bg-surface);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s var(--ease-out),
              transform 0.4s var(--ease-out);
}

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

.timeline__item.is-visible .timeline__tag:nth-child(1) { transition-delay: 0.35s; }
.timeline__item.is-visible .timeline__tag:nth-child(2) { transition-delay: 0.43s; }
.timeline__item.is-visible .timeline__tag:nth-child(3) { transition-delay: 0.51s; }
.timeline__item.is-visible .timeline__tag:nth-child(4) { transition-delay: 0.59s; }


/* =========================================================
   SECTION 3: STORY TAKEAWAY — Full-width editorial blockquote
   Layout Family: Breakout / Interruption
   ========================================================= */

.takeaway {
  padding: var(--s-128) 0;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.takeaway__inner {
  max-width: 860px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.takeaway__label {
  font-size: 0.75rem;
  font-weight: var(--weight-bold);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--s-32);
}

.takeaway__quote {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: var(--weight-medium);
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  position: relative;
  padding-left: var(--s-32);
  border-left: 3px solid var(--accent);
}

.takeaway__attribution {
  margin-top: var(--s-32);
  font-size: 0.875rem;
  font-weight: var(--weight-regular);
  color: var(--text-tertiary);
  padding-left: var(--s-32);
}


/* =========================================================
   SECTION 4: SELECTED PROJECTS — Asymmetric card grid
   Layout Family: Grid / Modular
   ========================================================= */

.projects-section {
  padding: var(--s-128) 0;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-24);
}

.project-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: var(--s-32);
  display: flex;
  flex-direction: column;
  gap: var(--s-16);
  transition: border-color var(--duration-mid) var(--ease-out),
              background var(--duration-mid) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.project-card:hover {
  border-color: var(--border-mid);
  background: var(--bg-elevated);
}

/* Make first card span full width for asymmetry */
.project-card:first-child {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-32);
  padding: var(--s-40);
}

.project-card:first-child .project-card__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-card__status {
  font-size: 0.6875rem;
  font-weight: var(--weight-bold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: var(--s-8);
}

.project-card__status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 1; }
}

.project-card__title {
  font-size: 1.25rem;
  font-weight: var(--weight-bold);
  letter-spacing: -0.01em;
  color: var(--text-primary);
  line-height: 1.3;
}

.project-card__desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.project-card__tech {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-8);
  margin-top: auto;
}

.project-card__tech-tag {
  font-size: 0.6875rem;
  font-weight: var(--weight-medium);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding: var(--s-4) var(--s-8);
  background: var(--bg-root);
  border-radius: 3px;
}

/* Skeleton / placeholder card */
.project-card--skeleton {
  pointer-events: none;
}

.project-card--skeleton .skeleton-line {
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(
    90deg,
    var(--bg-elevated) 25%,
    var(--bg-hover) 50%,
    var(--bg-elevated) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
}

.skeleton-line--title {
  width: 70%;
  height: 18px !important;
  margin-bottom: var(--s-12);
}

.skeleton-line--text {
  width: 100%;
  margin-bottom: var(--s-8);
}

.skeleton-line--text-short {
  width: 55%;
}

.skeleton-line--tag {
  width: 60px;
  height: 22px !important;
  border-radius: 3px;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Skeleton preview area for first card */
.project-card__preview {
  background: var(--bg-elevated);
  border-radius: 6px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.project-card__preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-12);
  color: var(--text-ghost);
}

.project-card__preview-icon {
  width: 32px;
  height: 32px;
  border: 2px solid var(--border-subtle);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

.project-card__preview-text {
  font-size: 0.6875rem;
  font-weight: var(--weight-medium);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}


/* =========================================================
   SECTION 5: TECH STACK — Inline chip / tag layout
   Layout Family: Inline Flow
   ========================================================= */

.stack-section {
  padding: var(--s-128) 0;
  border-top: 1px solid var(--border-subtle);
}

.stack-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--s-48);
}

.stack-category__label {
  font-size: 0.6875rem;
  font-weight: var(--weight-bold);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: var(--s-20);
  display: flex;
  align-items: center;
  gap: var(--s-12);
  flex-wrap: wrap;
}

.stack-category__context {
  font-size: 0.5625rem;
  font-weight: var(--weight-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-ghost);
  padding: 2px var(--s-8);
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  background: var(--bg-surface);
}

.stack-category__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-8);
}

.stack-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s-8);
  font-size: 0.875rem;
  font-weight: var(--weight-medium);
  color: var(--text-primary);
  padding: var(--s-8) var(--s-16);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  transition: border-color var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out);
}

.stack-chip:hover {
  border-color: var(--border-mid);
  background: var(--bg-elevated);
}

/* Learning variant: dashed border, slightly muted */
.stack-chip--learning {
  border-style: dashed;
  color: var(--text-secondary);
}

.stack-chip__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.stack-chip__dot--primary   { background: var(--accent); }
.stack-chip__dot--secondary { background: hsl(150, 60%, 50%); }
.stack-chip__dot--tertiary  { background: hsl(35, 90%, 55%); }


/* =========================================================
   SECTION 6: FOOTER / CONTACT — Stark split layout
   Layout Family: Split Axis
   ========================================================= */

.site-footer {
  padding: var(--s-96) 0 var(--s-48);
  border-top: 1px solid var(--border-subtle);
}

.footer-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: var(--s-96);
}

.footer-cta__label {
  font-size: 0.75rem;
  font-weight: var(--weight-bold);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: var(--s-24);
}

.footer-cta__heading {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: var(--weight-black);
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: var(--s-32);
}

.footer-cta__link {
  display: inline-flex;
  align-items: center;
  gap: var(--s-8);
  font-size: 1rem;
  font-weight: var(--weight-bold);
  color: var(--accent);
  padding: var(--s-16) var(--s-40);
  border: 2px solid var(--accent);
  border-radius: 6px;
  transition: background var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}

.footer-cta__link:hover {
  background: var(--accent);
  color: var(--bg-root);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--s-32);
  border-top: 1px solid var(--border-subtle);
}

.footer-bottom__copy {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

.footer-bottom__links {
  display: flex;
  gap: var(--s-24);
  list-style: none;
}

.footer-bottom__link {
  font-size: 0.8125rem;
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  transition: color var(--duration-fast) var(--ease-out);
}

.footer-bottom__link:hover {
  color: var(--text-primary);
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 768px) {
  /* --- Mobile Nav Overlay --- */
  .site-nav__toggle {
    display: flex;
  }

  .site-nav__links {
    position: fixed;
    inset: 0;
    z-index: 99;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--s-40);
    background: hsla(0, 0%, 4%, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--duration-mid) var(--ease-out),
                visibility var(--duration-mid) var(--ease-out);
  }

  .site-nav__links.is-open {
    opacity: 1;
    visibility: visible;
  }

  .site-nav__link {
    font-size: 1.125rem;
    letter-spacing: 0.08em;
  }

  /* --- Hero --- */
  .hero {
    padding-top: var(--s-96);
    padding-bottom: var(--s-64);
    min-height: 100svh;
  }

  .hero__title {
    max-width: 100%;
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .hero__subtitle {
    max-width: 100%;
    font-size: 1rem;
  }

  .hero__cta {
    padding: var(--s-16) var(--s-32);
    font-size: 0.8125rem;
  }

  .hero__scroll-hint {
    display: none;
  }

  /* --- Section headers --- */
  .section-header {
    margin-bottom: var(--s-40);
  }

  .section-header__title {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  .section-header__title br {
    display: none;
  }

  /* --- Timeline --- */
  .timeline-section {
    padding: var(--s-80) 0;
  }

  .timeline {
    padding-left: var(--s-40);
  }

  .timeline::before {
    left: 9px;
  }

  .timeline__node {
    left: calc(-1 * var(--s-40) + 2px);
    width: 13px;
    height: 13px;
  }

  .timeline__item {
    padding-bottom: var(--s-48);
  }

  .timeline__role {
    font-size: 1.125rem;
  }

  .timeline__desc {
    font-size: 0.9375rem;
  }

  .timeline__tags {
    gap: var(--s-4);
  }

  .timeline__tag {
    font-size: 0.625rem;
    padding: 3px var(--s-8);
  }

  /* --- Takeaway --- */
  .takeaway {
    padding: var(--s-80) 0;
  }

  .takeaway__quote {
    font-size: clamp(1.125rem, 5vw, 1.5rem);
    padding-left: var(--s-20);
  }

  .takeaway__attribution {
    padding-left: var(--s-20);
  }

  /* --- Projects --- */
  .projects-section {
    padding: var(--s-80) 0;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: var(--s-16);
  }

  .project-card {
    padding: var(--s-24);
  }

  .project-card:first-child {
    grid-template-columns: 1fr;
    padding: var(--s-24);
    gap: var(--s-20);
  }

  .project-card__preview {
    min-height: 160px;
  }

  .project-card__title {
    font-size: 1.0625rem;
  }

  .project-card__desc {
    font-size: 0.875rem;
  }

  .project-card__tech {
    gap: var(--s-4);
  }

  .project-card__tech-tag {
    font-size: 0.625rem;
  }

  /* --- Stack --- */
  .stack-section {
    padding: var(--s-80) 0;
  }

  .stack-categories {
    grid-template-columns: 1fr;
    gap: var(--s-32);
  }

  .stack-chip {
    font-size: 0.8125rem;
    padding: var(--s-8) var(--s-12);
  }

  /* --- Footer --- */
  .site-footer {
    padding: var(--s-64) 0 var(--s-32);
  }

  .footer-cta {
    margin-bottom: var(--s-64);
  }

  .footer-cta__heading {
    font-size: clamp(1.75rem, 7vw, 2.5rem);
  }

  .footer-cta__link {
    font-size: 0.875rem;
    padding: var(--s-12) var(--s-32);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--s-16);
    text-align: center;
  }
}

/* Extra small: phones in portrait */
@media (max-width: 400px) {
  :root {
    --gutter: 1rem;
  }

  .hero__title {
    font-size: 1.75rem;
  }

  .hero__label {
    font-size: 0.6875rem;
  }

  .timeline {
    padding-left: var(--s-32);
  }

  .timeline::before {
    left: 7px;
  }

  .timeline__node {
    left: calc(-1 * var(--s-32) + 1px);
    width: 11px;
    height: 11px;
  }

  .takeaway__quote {
    font-size: 1rem;
    padding-left: var(--s-16);
  }

  .takeaway__attribution {
    padding-left: var(--s-16);
  }

  .footer-cta__heading {
    font-size: 1.5rem;
  }
}
