/* Home 2 — dark page, blue-violet hero glow, two-column case study grid */

html[data-home2="1"],
html[data-home2="1"] body {
  background: #08080b !important;
  color: #f5f5f7 !important;
  overflow-x: clip;
}

/* Home 2 ships its own nav and footer; only the site-wide chrome is hidden,
   not headers inside the page or the case study window */
html[data-home2="1"] header:not(.h2 header, .project-window-root header),
html[data-home2="1"] footer:not(.h2 footer, .project-window-root footer) {
  display: none !important;
}

html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.h2 {
  --bg: #08080b;
  --ink: #f5f5f7;
  --muted: #a3a3ad;
  --line: rgba(255, 255, 255, 0.1);
  --surface: #14141a;
  --surface-2: rgba(255, 255, 255, 0.06);
  --accent: #a5b4fc;
  --accent-gradient: linear-gradient(100deg, #c7d2fe 0%, #a5b4fc 35%, #c4b5fd 70%, #93c5fd 100%);
  /* Shape system: pills for actions, soft rectangles for surfaces, tight rectangles for tags */
  --radius-pill: 999px;
  --radius-card: 1rem;
  --radius-tag: 0.25rem;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);

  margin: 0 auto;
  padding: 0 var(--page-padding);
  color: var(--ink);
  font-family: var(--font-switzer), "Switzer", system-ui, sans-serif;
  font-kerning: normal;
  font-feature-settings: "kern", "liga", "calt";
  letter-spacing: -0.011em;
  text-rendering: optimizeLegibility;
  /* Light-on-dark text renders heavy without grayscale smoothing */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Zero-specificity scope so utility colors inside case studies still win */
:where(.h2) a {
  color: inherit;
  text-decoration: none;
}

/* Outlines follow each element's own radius, so pills stay pills on focus */
.h2 :focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

/* —— Nav: transparent over the glow, solid once scrolled —— */
.h2-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 4rem;
  margin: 0 calc(var(--page-padding) * -1);
  padding: 0 var(--page-padding);
  transition: background-color 0.35s ease;
}

.h2-nav[data-scrolled="1"] {
  background: rgba(8, 8, 11, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.h2-nav .h2-nav-brand {
  min-height: 2.75rem;
  color: var(--ink);
}

.h2-nav-list {
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.h2-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition:
    color 0.2s ease,
    background-color 0.2s ease;
}

.h2-nav-link:hover {
  color: var(--ink);
  background: var(--surface-2);
}

.h2-nav-link[aria-current="page"] {
  position: relative;
  color: var(--ink);
}

.h2-nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  right: 0.85rem;
  bottom: 0.4rem;
  left: 0.85rem;
  height: 1px;
  background: var(--accent-gradient);
}

.h2 ::selection {
  background: rgba(165, 180, 252, 0.35);
  color: #fff;
}

/* —— Hero —— */
.h2-hero {
  position: relative;
  isolation: isolate;
  --horizon-gap: clamp(6rem, 15vh, 10rem);
  /* 0→1 scroll progress, scrubbed by useHeroExit */
  --exit: 0;
  display: grid;
  place-items: center;
  /* Fills the first screen so work only enters on scroll */
  min-height: calc(100svh + 4rem);
  margin-top: -4rem;
  padding: 8rem 0 calc(var(--horizon-gap) + 2.5rem);
  text-align: center;
}

/* Full-bleed layers escape the centered container */
.h2-hero-glow,
.h2-stars {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: -1;
  width: 100vw;
  height: 100%;
  transform: translateX(-50%);
  pointer-events: none;
}

/* Aurora rising off a lit planet horizon */
.h2-hero-glow {
  --horizon: calc(100% - var(--horizon-gap));
  overflow: hidden;
  opacity: calc(1 - var(--exit) * 0.9);
  background:
    radial-gradient(90% 55% at 50% 0%, rgba(79, 70, 229, 0.28), transparent 70%),
    radial-gradient(60% 40% at 50% var(--horizon), rgba(99, 102, 241, 0.35), transparent 70%);
}

.h2-hero-glow::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 8%;
  width: min(120%, 110rem);
  height: calc(var(--horizon) - 6%);
  background:
    radial-gradient(38% 55% at 50% 100%, rgba(165, 180, 252, 0.95), transparent 70%),
    radial-gradient(30% 60% at 30% 100%, rgba(59, 130, 246, 0.95), transparent 72%),
    radial-gradient(30% 60% at 70% 100%, rgba(168, 85, 247, 0.9), transparent 72%),
    radial-gradient(55% 80% at 50% 100%, rgba(79, 70, 229, 0.75), transparent 75%);
  filter: blur(48px);
  opacity: calc(1 - var(--exit) * 1.3);
  transform: translateX(-50%);
  animation: h2-aurora 14s ease-in-out infinite alternate;
  will-change: transform, opacity;
}

.h2-hero-glow::after {
  content: "";
  position: absolute;
  left: 50%;
  top: var(--horizon);
  width: max(170vw, 90rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(50% 12% at 50% 0%, rgba(165, 180, 252, 0.22), transparent 100%),
    var(--bg);
  box-shadow:
    0 0 0 1px rgba(224, 231, 255, 0.55),
    0 -2px 12px rgba(199, 210, 254, 0.7),
    0 -24px 80px rgba(129, 140, 248, 0.65),
    0 -60px 180px rgba(59, 130, 246, 0.45);
  /* Sinks and flattens as the page scrolls, like dropping below the horizon */
  opacity: calc(1 - var(--exit) * 1.15);
  transform: translateX(-50%) translateY(calc(var(--exit) * 24vh))
    scale(calc(1 + var(--exit) * 0.3));
  will-change: transform, opacity;
}

@keyframes h2-aurora {
  from {
    transform: translateX(-53%) scale(1, 0.94);
  }
  to {
    transform: translateX(-47%) scale(1.06, 1.04);
  }
}

/* Film grain keeps the gradient from banding */
.h2-stars {
  opacity: calc(1 - var(--exit));
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.07'/%3E%3C/svg%3E");
}

.h2-stars span {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  opacity: 0.25;
  animation: h2-twinkle ease-in-out infinite;
}

@keyframes h2-twinkle {
  0%,
  100% {
    opacity: 0.15;
  }
  50% {
    opacity: 0.85;
  }
}

.h2-hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Children carry the exit so it doesn't fight the entrance animation */
.h2-hero-content > * {
  opacity: calc(1 - var(--exit) * 1.6);
  translate: 0 calc(var(--exit) * -3rem);
}

/* Display sizes need tighter tracking and leading than text sizes */
.h2-hero-title {
  max-width: 15ch;
  margin: 0 0 clamp(1.75rem, 1rem + 1.6vw, 2.75rem);
  color: #f7f7fb;
  font-family: "Neue Montreal", var(--font-switzer), "Switzer", system-ui, sans-serif;
  font-size: clamp(2.625rem, 1.1rem + 5.4vw, 6.25rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-wrap: balance;
  text-shadow:
    0 0 18px rgba(255, 255, 255, 0.22),
    0 0 48px rgba(199, 210, 254, 0.2),
    0 0 96px rgba(129, 140, 248, 0.16);
}

/* Clipped backgrounds stop at the line box, so pad for descenders.
   text-shadow would paint over a clipped gradient; drop-shadow sits behind it. */
/* Keeps punctuation attached to an inline-block accent word */
.h2-nowrap {
  white-space: nowrap;
}

.h2-accent {
  display: inline-block;
  margin-bottom: -0.16em;
  padding-bottom: 0.16em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 0 18px rgba(165, 180, 252, 0.35));
}

.h2-hero-intro {
  max-width: 52rem;
  margin: 0 0 2.25rem;
  color: rgba(235, 236, 245, 0.72);
  font-size: clamp(0.9375rem, 0.9rem + 0.2vw, 1.0625rem);
  line-height: 1.6;
  letter-spacing: -0.006em;
  text-wrap: balance;
}

/* Outline pill over the glow, frosted so the aurora doesn't show through the label */
.h2 .h2-hero-cta {
  background: rgba(10, 8, 30, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.h2-hero-cta-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-gradient);
  box-shadow: 0 0 0 0 rgba(165, 180, 252, 0.6);
  animation: h2-pulse 2.4s ease-out infinite;
}

@keyframes h2-pulse {
  70% {
    box-shadow: 0 0 0 6px rgba(165, 180, 252, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(165, 180, 252, 0);
  }
}

@keyframes h2-enter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

/* —— Sections —— */
.h2-section {
  padding-bottom: clamp(5rem, 10vw, 8rem);
}

#work {
  padding-top: clamp(1.5rem, 4vh, 3rem);
}

.h2-section-title {
  margin: 0 0 clamp(1.75rem, 3vw, 2.5rem);
  font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.75rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

/* —— Case study pages: the whole page runs light ——
   --accent and --surface are shared with the site theme, so they go back to its
   light values for the case study utilities (text-accent, bg-surface) */
html[data-home2-theme="light"],
html[data-home2-theme="light"] body {
  background: #fff !important;
  color: #161519 !important;
}

.h2--light {
  --bg: #fff;
  --ink: #161519;
  --muted: #62625d;
  --line: rgba(22, 21, 25, 0.1);
  --surface: #e8e7e2;
  --surface-2: rgba(22, 21, 25, 0.05);
  --accent: #2e69ff;
  background: var(--bg);
}

.h2--light .h2-nav[data-scrolled="1"] {
  background: rgba(255, 255, 255, 0.8);
}

/* The footer is shared chrome, so it stays dark on light pages too */
.h2--light .h2-footer {
  --bg: #08080b;
  --ink: #f5f5f7;
  --muted: #a3a3ad;
  --line: rgba(255, 255, 255, 0.1);
  --surface: #14141a;
  --surface-2: rgba(255, 255, 255, 0.06);
  --accent: #a5b4fc;
  margin: 0 calc(var(--page-padding) * -1);
  padding-right: var(--page-padding);
  padding-left: var(--page-padding);
  border-top: 0;
  background: var(--bg);
  color: var(--ink);
}

.h2-case {
  margin: 0 calc(var(--page-padding) * -1);
}

.h2 .h2-case .h2-btn {
  border-color: rgba(22, 21, 25, 0.18);
}

@media (max-width: 639px) {
  .h2 .h2-case nav[aria-label="Case study navigation"] .h2-btn {
    padding: 0 0.875rem;
    font-size: 0.875rem;
  }
}

.h2 .h2-case .h2-btn:hover {
  border-color: #161519;
  background: #161519;
  color: #fff;
}

/* Beats the forced ink color on case study headings in globals.css */
.h2 .h2-case .project-window-case-study :is(h1, h2, h3).case-heading-on-dark,
.h2 .h2-case .project-window-case-study :is(h1, h2, h3).case-heading-on-dark * {
  color: #fff !important;
}

/* —— Project grid —— */
/* Proportions mirror the original homepage caption cards */
.h2-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2.25rem, 4vw, 3.25rem) clamp(1.25rem, 2.5vw, 2rem);
}

.h2-card-btn {
  all: unset;
  display: flex;
  flex-direction: column;
  width: 100%;
  cursor: pointer;
}

.h2-card-btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 6px;
  border-radius: calc(var(--radius-card) + 0.25rem);
}

.h2-card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--surface);
}

.h2-card-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.h2-card-media :is(img, video) {
  object-fit: cover;
  transition:
    transform 0.6s var(--ease),
    opacity 0.45s ease;
}

.h2-card-media-hover {
  opacity: 0;
}

.h2-card-btn:hover .h2-card-media :is(img, video),
.h2-card-btn:focus-visible .h2-card-media :is(img, video) {
  transform: scale(1.015);
}

.h2-card-btn:hover .h2-card-media-hover,
.h2-card-btn:focus-visible .h2-card-media-hover {
  opacity: 1;
}

.h2-card-tags {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: none;
}

/* —— Tags: the only rounded-rectangle element —— */
.h2-card-tags li,
.h2-writing-meta,
.h2-chips li {
  padding: 0.22rem 0.5rem;
  border-radius: var(--radius-tag);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-transform: uppercase;
}

/* On photos the fill darkens instead, so tags read over any image */
.h2-card-tags li {
  background: rgba(16, 16, 16, 0.55);
}

.h2-card-caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-top: 0.935rem;
  padding: 0 0.75rem 0.55rem;
  transition: box-shadow 0.25s ease;
}

.h2-card-btn:hover .h2-card-caption,
.h2-card-btn:focus-visible .h2-card-caption {
  box-shadow: 0 10px 12px -10px rgba(139, 123, 255, 0.45);
}

.h2-card-title,
.h2-card-meta {
  margin: 0;
  line-height: 1.35;
}

.h2-card-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: clamp(calc(0.9375rem + 2px), calc(1.15vw + 2px), calc(1.125rem + 2px));
  font-weight: 500;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}

/* Secondary to the title: smaller and quieter */
.h2-card-meta {
  flex: 0 1 auto;
  font-size: clamp(calc(0.8125rem + 1px), calc(0.75rem + 0.25vw + 1px), calc(0.9375rem + 1px));
  letter-spacing: -0.005em;
  max-width: 46%;
  overflow: hidden;
  color: var(--muted);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* —— Writing —— */
.h2-writing {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem clamp(1rem, 2vw, 1.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.h2-writing-item {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.h2-writing-thumb {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  margin-bottom: 0.5rem;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line);
}

.h2-writing-thumb img {
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.h2-writing-item:hover .h2-writing-thumb img {
  transform: scale(1.04);
}

.h2-writing-item:hover .h2-writing-title {
  color: var(--accent);
}

.h2-writing-title {
  transition: color 0.2s ease;
  font-size: 1.1875rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.h2-writing-desc {
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.5;
  letter-spacing: -0.006em;
  text-wrap: pretty;
}

/* Accent tag: a translucent tint of the brand gradient, so it sits quietly on the dark page */
.h2 .h2-writing-meta {
  align-self: flex-start;
  margin-bottom: 0.25rem;
  background: linear-gradient(
    100deg,
    rgba(199, 210, 254, 0.16) 0%,
    rgba(196, 181, 253, 0.16) 60%,
    rgba(147, 197, 253, 0.16) 100%
  );
  color: #dfe3ff;
}

/* —— About —— */
.h2-about {
  position: relative;
  isolation: isolate;
  padding-top: clamp(4rem, 8vw, 6rem);
  border-top: 1px solid var(--line);
}

.h2-about::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  z-index: -1;
  width: min(70rem, 100%);
  height: 28rem;
  background: radial-gradient(50% 60% at 50% 0%, rgba(99, 102, 241, 0.14), transparent 70%);
  transform: translateX(-50%);
  pointer-events: none;
}

.h2-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.h2-eyebrow::before {
  content: "";
  flex: none;
  width: 1.5rem;
  height: 1px;
  background: var(--accent-gradient);
}

.h2-about > .h2-eyebrow {
  margin-bottom: 1.75rem;
}

.h2-about-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr);
  gap: 2rem clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.h2-about-intro--page {
  grid-template-areas:
    "id lead"
    "edu copy";
  row-gap: clamp(2.5rem, 5vw, 3.5rem);
}

.h2-about-intro--page .h2-about-id {
  grid-area: id;
}

.h2-about-intro--page .h2-about-lead {
  grid-area: lead;
}

.h2-about-intro--page .h2-education {
  grid-area: edu;
  margin-top: 0;
}

.h2-about-copy {
  grid-area: copy;
}

.h2-about-copy .h2-about-body {
  margin-top: 0;
}

.h2-about-copy .h2-about-actions {
  margin-top: clamp(2.75rem, 5vw, 3.75rem);
}

.h2-about-name,
.h2-about-lead {
  font-family: "Neue Montreal", var(--font-switzer), "Switzer", system-ui, sans-serif;
  font-weight: 500;
}

.h2-about-name {
  margin: 0;
  font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.25rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.h2-about-role {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.h2-about-portrait {
  display: block;
  width: 7rem;
  height: 7rem;
  margin-top: 1.75rem;
  border-radius: 50%;
  object-fit: cover;
}

.h2-about-lead {
  max-width: 22ch;
  margin: 0;
  font-size: clamp(1.875rem, 1rem + 2.6vw, 3.5rem);
  line-height: 1.14;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.h2-about-body {
  max-width: 38rem;
  margin: 1.5rem 0 0;
  color: rgba(235, 236, 245, 0.72);
  font-size: 1.0625rem;
  line-height: 1.65;
  letter-spacing: -0.006em;
  text-wrap: pretty;
}

.h2-about-more,
.h2-about-actions {
  margin-top: 2.25rem;
}

/* —— Round buttons (About CTA, Get in touch) —— */
.h2 .h2-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 3.5rem;
  padding: 0 1.75rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-pill);
  font-family: "Neue Montreal", var(--font-switzer), "Switzer", system-ui, sans-serif;
  font-size: clamp(1.0625rem, 0.95rem + 0.5vw, 1.375rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease,
    box-shadow 0.25s ease;
}

.h2 .h2-btn--sm {
  min-height: 2.75rem;
  padding: 0 1.25rem;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
}

.h2 .h2-btn:hover {
  border-color: rgba(199, 210, 254, 0.5);
  background: rgba(255, 255, 255, 0.06);
}

.h2 .h2-btn--primary {
  border-color: transparent;
  background: #f5f5f7;
  color: #0b0b12;
}

.h2 .h2-btn--primary:hover {
  border-color: transparent;
  background: #fff;
  box-shadow: 0 0 0 6px rgba(165, 180, 252, 0.18), 0 10px 40px rgba(129, 140, 248, 0.35);
}

.h2-btn-arrow {
  transition: transform 0.35s var(--ease);
}

.h2-btn:hover .h2-btn-arrow {
  transform: translateX(3px);
}

/* —— About page —— */
.h2-about--page {
  padding: clamp(4rem, 10vw, 8rem) 0 clamp(5rem, 10vw, 8rem);
  border-top: 0;
}

/* Full-bleed echo of the homepage aurora */
.h2-about--page::before {
  top: -4rem;
  width: 100vw;
  height: 44rem;
  background:
    radial-gradient(45% 55% at 50% 0%, rgba(129, 140, 248, 0.32), transparent 70%),
    radial-gradient(30% 40% at 25% 10%, rgba(59, 130, 246, 0.22), transparent 70%),
    radial-gradient(30% 40% at 75% 10%, rgba(168, 85, 247, 0.2), transparent 70%);
}

.h2-about-block {
  margin-top: clamp(8rem, 16vw, 12rem);
}

/* Single-row fact strip under the intro; hairlines come from the 1px grid gap */
.h2-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: clamp(3.5rem, 7vw, 5rem) 0 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--line);
}

.h2-fact {
  padding: 1.35rem 1.5rem 1.5rem;
  background: var(--bg);
}

.h2-fact-label {
  margin: 0 0 0.6rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.h2-fact-value {
  margin: 0;
  font-family: "Neue Montreal", var(--font-switzer), "Switzer", system-ui, sans-serif;
  font-size: clamp(1.125rem, 0.95rem + 0.6vw, 1.5rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.h2-fact-sep {
  color: var(--muted);
}

.h2-fact-arrow {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.h2-principles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Same surface as the fact cells, kept as separate cards */
.h2-principle {
  position: relative;
  padding: 1.35rem 1.5rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--bg);
  transition: border-color 0.3s ease;
}

.h2-principle::before {
  content: "";
  position: absolute;
  top: -1px;
  right: 1.5rem;
  width: 1.5rem;
  height: 1px;
  background: var(--accent-gradient);
}

.h2-principle:hover {
  border-color: rgba(165, 180, 252, 0.28);
}

.h2-index {
  width: fit-content;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 0.75rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}

.h2-principle-title {
  margin: 0.25rem 0 0.6rem;
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.h2-principle-body {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.55;
  text-wrap: pretty;
}

/* Expertise: heading column beside numbered rows, matching the intro grid */
.h2-expertise {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr);
  gap: 2rem clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.h2-expertise-head {
  position: sticky;
  top: 6rem;
}

.h2-block-heading {
  max-width: 14ch;
  margin: 0;
  font-family: "Neue Montreal", var(--font-switzer), "Switzer", system-ui, sans-serif;
  font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.25rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.h2-principles-heading {
  max-width: none;
  margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
}

.h2-expertise-rows,
.h2-chips,
.h2-education {
  margin: 0;
  padding: 0;
  list-style: none;
}

.h2-expertise-row {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 0.75rem 1.5rem;
  align-items: baseline;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--line);
  /* Gradient rule draws across the top edge on hover */
  background: var(--accent-gradient) no-repeat 0 0 / 0% 1px;
  transition: background-size 0.6s var(--ease);
}

.h2-expertise-row:first-child {
  border-top: 1px solid var(--line);
}

.h2-expertise-row:hover {
  background-size: 100% 1px;
}

.h2-expertise-row-title {
  margin: 0;
  font-family: "Neue Montreal", var(--font-switzer), "Switzer", system-ui, sans-serif;
  font-size: clamp(1.25rem, 1rem + 0.8vw, 1.75rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.h2-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.h2-chips li {
  transition: background-color 0.3s ease;
}

.h2-expertise-row:hover .h2-chips li {
  background: rgba(255, 255, 255, 0.14);
}

.h2-education {
  display: grid;
  gap: 1.25rem;
  margin-top: 2rem;
}

.h2-expertise-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.h2-expertise-items {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* —— Footer —— */
.h2-footer {
  padding: clamp(3rem, 8vw, 6rem) 0 2rem;
  border-top: 1px solid var(--line);
}

.h2-hello {
  display: inline-block;
  padding-bottom: 0.08em;
  font-size: clamp(3.5rem, 1rem + 11vw, 10rem);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.06em;
}

.h2-hello-char {
  display: inline-block;
  transition: transform 0.5s var(--ease);
}

.h2-hello:hover .h2-hello-char,
.h2-hello:focus-visible .h2-hello-char {
  transform: translateY(-0.12em);
}

.h2-contact {
  margin-top: clamp(2rem, 4vw, 3rem);
}

.h2-contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.h2-copy {
  position: relative;
  display: inline-flex;
}

.h2 .h2-copy .h2-btn {
  cursor: pointer;
}

/* Tag-style chip, but opaque so it reads over whatever sits above the button */
.h2-copy-toast {
  position: absolute;
  bottom: calc(100% + 0.6rem);
  left: 50%;
  padding: 0.3rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-tag);
  background: #16161d;
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 0.35rem);
  transition:
    opacity 0.2s ease,
    transform 0.3s var(--ease);
}

.h2-copy-toast:empty {
  padding: 0;
  border: 0;
}

.h2-copy-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.h2-footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem 2rem;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  color: var(--muted);
  font-size: 0.875rem;
  letter-spacing: -0.005em;
}

.h2-footer-row p {
  margin: 0;
}

.h2-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.h2-footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  transition: color 0.2s ease;
}

.h2-footer-links a:hover {
  color: var(--accent);
}

/* —— Responsive —— */
@media (max-width: 999px) {
  .h2-writing,
  .h2-principles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .h2-expertise {
    grid-template-columns: 1fr;
  }

  .h2-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .h2-expertise-head {
    position: static;
  }

  .h2-block-heading {
    max-width: none;
  }

  /* Cards are too narrow for title and meta side by side; stack so the meta isn't truncated */
  .h2-card-caption {
    flex-direction: column;
    gap: 0.3rem;
  }

  .h2-card-meta {
    max-width: none;
    text-align: left;
    white-space: normal;
  }
}

@media (max-width: 719px) {
  .h2-grid,
  .h2-about-intro,
  .h2-principles {
    grid-template-columns: 1fr;
  }

  /* Research: a scannable list, thumbnail beside the copy, hairlines between rows */
  .h2-writing {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .h2-writing > li + li {
    border-top: 1px solid var(--line);
  }

  .h2-writing-item {
    display: grid;
    grid-template-columns: 7.5rem minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
    gap: 0.4rem 1rem;
    align-items: start;
    padding: 1.25rem 0;
  }

  .h2-writing > li:first-child .h2-writing-item {
    padding-top: 0;
  }

  .h2-writing-thumb {
    grid-row: 1 / -1;
    margin-bottom: 0;
    border-radius: 0.625rem;
  }

  .h2-writing-title {
    font-size: 1.0625rem;
    line-height: 1.25;
  }

  .h2 .h2-writing-meta {
    justify-self: start;
    margin-bottom: 0.1rem;
  }

  .h2-writing-desc {
    font-size: 0.875rem;
    line-height: 1.45;
  }

  /* Facts: one per row, label left and value right, so the strip stays compact */
  .h2-facts {
    grid-template-columns: 1fr;
  }

  .h2-fact {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
  }

  .h2-fact-label {
    flex: none;
    margin: 0;
  }

  .h2-fact-value {
    font-size: 1.0625rem;
    text-align: right;
  }

  .h2-chips {
    flex-direction: column;
    align-items: flex-start;
  }

  .h2-about-intro--page {
    grid-template-areas:
      "id"
      "lead"
      "copy"
      "edu";
  }

  .h2-expertise-row {
    grid-template-columns: 2.25rem minmax(0, 1fr);
  }

  .h2-expertise-row .h2-chips {
    grid-column: 2;
  }

  .h2-nav-link {
    padding: 0 0.6rem;
    font-size: 0.9375rem;
  }

  .h2-hero {
    --horizon-gap: 5rem;
    min-height: max(calc(100svh + 4rem), 36rem);
    padding-top: 7rem;
  }

  .h2-hero-title {
    letter-spacing: -0.03em;
    line-height: 1.1;
  }

  .h2-hero-break {
    display: none;
  }

  .h2-hero-glow::before {
    filter: blur(32px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .h2-hero-glow::before,
  .h2-hero-content,
  .h2-hero-cta-dot,
  .h2-stars span {
    animation: none;
  }

  .h2 *,
  .h2 *::before,
  .h2 *::after {
    transition-duration: 0.01ms !important;
  }
}
