/* =========================================================
   Portfolio — Datacurve-inspired motion system
   Warm cream + ink, sticky hero, particle canvas, scroll FX
   ========================================================= */

:root {
  /* Warm palette (Datacurve-like) */
  --cream: #f8f6f2;
  --cream-2: #f0ece4;
  --sand: #ddd2c0;
  --ink: #131110;
  --ink-soft: #1c1612;
  --ink-raised: #29221c;
  --brown-400: #948572;
  --brown-500: #6c5e4e;
  --brown-600: #54483b;
  --blue-100: #bfdfec;
  --blue-200: #8fc7dd;
  --blue-700: #01567e;
  --blue-500: #0a7795;

  --surface: var(--cream);
  --surface-dark: var(--ink);
  --text: var(--ink);
  --text-secondary: var(--brown-600);
  --text-muted: var(--brown-400);
  --border: rgba(19, 17, 16, 0.1);
  --border-dark: rgba(248, 246, 242, 0.1);

  --font-display: "Instrument Serif", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 64px;
  --announce-h: 46px;
  --pad-x: clamp(1.25rem, 6vw, 7.5rem);
  --max: 1440px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Grain overlay for depth */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px;
}

::selection {
  background: rgba(10, 119, 149, 0.22);
  color: var(--ink);
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
strong { font-weight: 500; color: inherit; }
button { font: inherit; background: none; border: none; cursor: pointer; color: inherit; }

.shell {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

/* ---------- Particle canvas ---------- */
.dot-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  transition: opacity 0.6s var(--ease);
}

body.is-dark-section .dot-canvas {
  opacity: 0.35;
}

/* ---------- Announcement ---------- */
.announcement {
  position: relative;
  z-index: 60;
  padding: 0.5rem var(--pad-x) 0;
  background: var(--cream);
}

.announcement__link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 38px;
  max-width: var(--max);
  margin-inline: auto;
  padding: 0 1rem;
  border-radius: 8px;
  background: var(--blue-100);
  color: var(--blue-700);
  font-size: 0.875rem;
  font-weight: 450;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}

.announcement__link:hover {
  background: var(--blue-200);
  transform: translateY(-1px);
}

.announcement__em { font-weight: 500; }
.announcement__em::before { content: " · "; font-weight: 400; }

@media (max-width: 640px) {
  .announcement__em { display: none; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(248, 246, 242, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: background 0.35s, border-color 0.35s, color 0.35s;
}

.site-header.scrolled {
  border-bottom-color: var(--border);
}

body.is-dark-section .site-header {
  background: rgba(19, 17, 16, 0.82);
  color: var(--cream);
  border-bottom-color: var(--border-dark);
}

.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.logo span { opacity: 0.45; }

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav a {
  font-size: 0.9rem;
  font-weight: 450;
  color: var(--brown-600);
  transition: color 0.2s;
}

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

body.is-dark-section .nav a { color: rgba(248, 246, 242, 0.65); }
body.is-dark-section .nav a:hover { color: var(--cream); }

.nav__cta {
  color: var(--ink) !important;
  font-weight: 500;
}

body.is-dark-section .nav__cta { color: var(--cream) !important; }

.menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.menu-btn span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}

.menu-btn[aria-expanded="true"] span:first-child {
  transform: translateY(3.75px) rotate(45deg);
}
.menu-btn[aria-expanded="true"] span:last-child {
  transform: translateY(-3.75px) rotate(-45deg);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 1.35rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: transform 0.25s var(--ease), background 0.25s, border-color 0.25s, box-shadow 0.25s, color 0.25s;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--ink);
  color: var(--cream);
  box-shadow: 0 8px 24px rgba(19, 17, 16, 0.15);
}

.btn--primary:hover {
  background: var(--ink-soft);
  box-shadow: 0 12px 32px rgba(19, 17, 16, 0.2);
}

.btn--invert {
  background: var(--cream) !important;
  color: var(--ink) !important;
}

.btn--secondary {
  border: 1px solid rgba(19, 17, 16, 0.18);
  color: var(--ink);
  background: transparent;
}

.btn--secondary:hover {
  border-color: rgba(19, 17, 16, 0.4);
  background: rgba(19, 17, 16, 0.03);
}

.btn--ghost {
  border: 1px solid rgba(248, 246, 242, 0.22);
  color: var(--cream);
  background: transparent;
}

.btn--ghost:hover {
  border-color: rgba(248, 246, 242, 0.45);
  background: rgba(248, 246, 242, 0.06);
}

/* ---------- Type ---------- */
.display-md {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 400;
  margin-bottom: 1.5rem;
  text-wrap: balance;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brown-400);
}

.section--dark .eyebrow { color: rgba(248, 246, 242, 0.45); }

.mono {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--brown-400);
}

.section--dark .mono { color: rgba(248, 246, 242, 0.45); }

/* ---------- Sticky Hero ---------- */
.hero-sticky {
  position: relative;
  z-index: 1;
  height: 100vh;
  height: 100dvh;
  min-height: 640px;
}

.hero-sticky__inner {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
}

/* Dot loading pulse */
.dotmorph-loading {
  position: absolute;
  bottom: 44px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 7px;
  z-index: 2;
  transition: opacity 0.5s;
}

.dotmorph-loading.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.dotmorph-loading-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink);
  opacity: 0.22;
  animation: dotmorph-loading-pulse 1.2s ease-in-out infinite;
}

.dotmorph-loading-dot:nth-child(2) { animation-delay: 0.18s; }
.dotmorph-loading-dot:nth-child(3) { animation-delay: 0.36s; }

@keyframes dotmorph-loading-pulse {
  0%, 100% { opacity: 0.18; transform: scale(0.85); }
  50% { opacity: 0.7; transform: scale(1.15); }
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(100%, 1120px);
  padding: 0 1.5rem;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}

.hero-content.is-ready {
  opacity: 1;
  transform: none;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero-copy {
  text-align: left;
  min-width: 0;
}

.hero-photo {
  width: min(100%, 340px);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(19, 17, 16, 0.1);
  box-shadow:
    0 24px 60px rgba(19, 17, 16, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.4) inset;
  opacity: 0;
  transform: scale(0.92) translateX(24px);
  transition: opacity 1s var(--ease-out) 0.2s, transform 1s var(--ease-out) 0.2s;
  justify-self: end;
  background: var(--cream-2);
}

.hero-content.is-ready .hero-photo {
  opacity: 1;
  transform: none;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 12%;
  display: block;
}

.hero-kicker {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brown-500);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7.5vw, 5.5rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  font-weight: 400;
  margin-bottom: 1.5rem;
}

/* Line reveal */
.hero-title .line {
  display: block;
  overflow: hidden;
}

.hero-title .line__inner {
  display: block;
  transform: translateY(110%);
  transition: transform 1.1s var(--ease-out);
}

.hero-content.is-ready .hero-title .line__inner {
  transform: none;
}

.hero-content.is-ready .hero-title .line:nth-child(1) .line__inner { transition-delay: 0.05s; }
.hero-content.is-ready .hero-title .line:nth-child(2) .line__inner { transition-delay: 0.18s; }
.hero-content.is-ready .hero-title .line:nth-child(3) .line__inner { transition-delay: 0.32s; }

.hero-lede {
  max-width: 34rem;
  margin: 0 0 2rem;
  color: var(--brown-600);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.7;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.9s var(--ease-out) 0.45s, transform 0.9s var(--ease-out) 0.45s;
}

.hero-content.is-ready .hero-lede {
  opacity: 1;
  transform: none;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.75rem;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.9s var(--ease-out) 0.55s, transform 0.9s var(--ease-out) 0.55s;
}

.hero-content.is-ready .hero-actions,
.closing .hero-actions.reveal-up.visible {
  opacity: 1;
  transform: none;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 1.25rem 1.75rem;
  opacity: 0;
  transition: opacity 0.9s var(--ease-out) 0.7s;
}

.hero-content.is-ready .hero-links {
  opacity: 1;
}

.dotted-link {
  font-size: 0.9rem;
  color: var(--brown-600);
  border-bottom: 1px dotted rgba(84, 72, 59, 0.45);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}

.dotted-link:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* Scroll cue */
.scroll-cue {
  position: absolute;
  right: var(--pad-x);
  bottom: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  z-index: 2;
  opacity: 0;
  animation: fadeIn 1s 1.2s forwards;
}

.scroll-cue span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brown-400);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.scroll-cue__line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--brown-400), transparent);
  transform-origin: top;
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0% { transform: scaleY(0); opacity: 0; }
  40% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* ---------- Bridge (light about) ---------- */
.bridge {
  position: relative;
  z-index: 2;
  background: var(--cream);
  padding: 7rem 0 6rem;
  border-top: 1px solid var(--border);
}

.bridge__shell {
  max-width: 920px;
}

.bridge__eyebrow {
  margin-bottom: 1rem;
}

.bridge__title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 400;
  margin-bottom: 2rem;
}

.bridge__prose p {
  color: var(--brown-600);
  font-size: 1.08rem;
  max-width: 40rem;
  margin-bottom: 1.15rem;
}

.bridge__prose strong {
  color: var(--ink);
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.meta-k {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brown-400);
  margin-bottom: 0.35rem;
}

.meta-v {
  font-size: 0.95rem;
  color: var(--brown-600);
}

a.meta-v:hover { color: var(--ink); }

/* ---------- Sections ---------- */
.section {
  position: relative;
  z-index: 2;
  padding: 6.5rem 0;
}

.section--light {
  background: var(--cream);
  color: var(--ink);
}

.section--dark {
  background: var(--ink);
  color: var(--cream);
}

.section--dark .display-md,
.section--dark h3 {
  color: var(--cream);
}

.section-grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 2rem 3rem;
}

.section-main { max-width: 860px; min-width: 0; }

.section-intro {
  color: var(--brown-600);
  font-size: 1.05rem;
  max-width: 36rem;
  margin: -0.5rem 0 2.5rem;
}

.section--dark .section-intro {
  color: rgba(248, 246, 242, 0.6);
}

/* ---------- Jobs ---------- */
.job {
  padding: 2rem 0;
  border-top: 1px solid var(--border-dark);
}

.job:first-of-type { margin-top: 1rem; }

.job__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-bottom: 1rem;
}

.job__head h3 {
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.job__org {
  color: rgba(248, 246, 242, 0.55);
  font-size: 0.95rem;
  margin-top: 0.2rem;
}

.job__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: rgba(248, 246, 242, 0.4);
  text-align: right;
}

.pill {
  display: inline-flex;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(248, 246, 242, 0.18);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: rgba(248, 246, 242, 0.65);
}

.section--light .pill {
  border-color: var(--border);
  color: var(--brown-500);
}

.job__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.job__list li {
  position: relative;
  padding-left: 1rem;
  color: rgba(248, 246, 242, 0.62);
  font-size: 0.95rem;
}

.job__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(248, 246, 242, 0.35);
}

.job__list strong { color: var(--cream); }

/* ---------- Work cards ---------- */
.work-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

a.work-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--cream-2);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), border-color 0.3s;
  will-change: transform;
}

a.work-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(19, 17, 16, 0.08);
  border-color: rgba(19, 17, 16, 0.2);
}

a.work-card:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 3px;
}

.work-card__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.65rem;
}

.work-card__title-row h3 {
  margin-bottom: 0;
}

.work-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--blue-700);
  opacity: 0.85;
  flex-shrink: 0;
  transition: opacity 0.2s, transform 0.25s var(--ease);
}

a.work-card:hover .work-card__link {
  opacity: 1;
  transform: translateX(2px);
}

.work-card__visual {
  position: relative;
  min-height: 180px;
  background: var(--ink);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.work-card__num {
  position: relative;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: rgba(248, 246, 242, 0.85);
  letter-spacing: 0.05em;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(28px);
  animation: orbFloat 8s ease-in-out infinite;
}

.orb-a {
  width: 120px;
  height: 120px;
  background: var(--blue-500);
  opacity: 0.55;
  top: 20%;
  left: 15%;
}

.orb-b {
  width: 90px;
  height: 90px;
  background: #c2412a;
  opacity: 0.4;
  bottom: 15%;
  right: 10%;
  animation-delay: -3s;
}

.work-card__visual[data-visual="1"] .orb-a {
  background: #8fc7dd;
  opacity: 0.6;
}
.work-card__visual[data-visual="1"] .orb-b {
  background: #54aac8;
  opacity: 0.45;
}

.work-card__visual[data-visual="2"] .orb-a {
  background: #dd8470;
  opacity: 0.55;
}
.work-card__visual[data-visual="2"] .orb-b {
  background: #0a7795;
  opacity: 0.45;
}

.work-card__visual[data-visual="3"] .orb-a {
  background: #c2412a;
  opacity: 0.5;
}
.work-card__visual[data-visual="3"] .orb-b {
  background: #2189af;
  opacity: 0.5;
}

.work-card__visual[data-visual="4"] .orb-a {
  background: #8b5cf6;
  opacity: 0.55;
}
.work-card__visual[data-visual="4"] .orb-b {
  background: #06b6d4;
  opacity: 0.45;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(12px, -16px) scale(1.08); }
  66% { transform: translate(-10px, 10px) scale(0.94); }
}

.work-card__body {
  padding: 1.75rem 1.75rem 1.6rem;
}

.work-card__body h3 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 0.65rem;
  color: var(--ink);
}

.work-card__title-row h3 {
  margin-bottom: 0;
}

.work-card__body p {
  color: var(--brown-600);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.work-card__body strong { color: var(--ink); }

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

.tags span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0.28rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--brown-500);
  background: rgba(255, 255, 255, 0.4);
}

/* ---------- Skills ---------- */
.skills {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--border-dark);
  margin-top: 0.5rem;
}

.skill {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-dark);
}

.skill:nth-child(odd) {
  padding-right: 1.75rem;
  border-right: 1px solid var(--border-dark);
}

.skill:nth-child(even) {
  padding-left: 1.75rem;
}

.skill h3 {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.skill p {
  color: rgba(248, 246, 242, 0.55);
  font-size: 0.92rem;
}

/* ---------- Education ---------- */
.edu {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.edu h3 {
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 0.3rem;
}

.edu p { color: var(--brown-600); }

.edu__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.certs {
  margin-top: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.certs li {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-left: 1rem;
  border-left: 2px solid var(--sand);
  color: var(--brown-600);
  font-size: 0.95rem;
}

/* ---------- Closing ---------- */
.closing {
  position: relative;
  z-index: 2;
  padding: 8rem 0 7rem;
  overflow: hidden;
}

.closing__glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(10, 119, 149, 0.35), transparent 65%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  filter: blur(40px);
  animation: glowPulse 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.85; transform: translate(-50%, -50%) scale(1.15); }
}

.closing__inner {
  position: relative;
  max-width: 800px;
}

.closing__title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 400;
  margin-bottom: 1.25rem;
}

.closing p {
  color: rgba(248, 246, 242, 0.6);
  font-size: 1.1rem;
  max-width: 32rem;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.closing .hero-actions {
  justify-content: flex-start;
  opacity: 1;
  transform: none;
  margin-bottom: 0;
}

/* ---------- Footer ---------- */
.footer {
  position: relative;
  z-index: 2;
  background: var(--ink);
  border-top: 1px solid var(--border-dark);
  padding: 1.75rem 0 2rem;
  color: var(--cream);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer__brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.footer__links {
  display: flex;
  gap: 1.5rem;
}

.footer__links a {
  font-size: 0.88rem;
  color: rgba(248, 246, 242, 0.55);
  transition: color 0.2s;
}

.footer__links a:hover { color: var(--cream); }

.footer__copy {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: rgba(248, 246, 242, 0.35);
}

/* ---------- Scroll reveal ---------- */
.reveal-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.85s var(--ease-out), transform 0.85s var(--ease-out);
}

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

/* Stagger children when parent is visible */
.reveal-up.visible:nth-child(1) { transition-delay: 0s; }
.reveal-up.visible:nth-child(2) { transition-delay: 0.06s; }
.reveal-up.visible:nth-child(3) { transition-delay: 0.12s; }
.reveal-up.visible:nth-child(4) { transition-delay: 0.18s; }
.reveal-up.visible:nth-child(5) { transition-delay: 0.24s; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .hero-copy {
    text-align: center;
    order: 2;
  }

  .hero-photo {
    order: 1;
    width: min(72vw, 240px);
    justify-self: center;
    border-radius: 50%;
    transform: scale(0.92) translateY(12px);
  }

  .hero-content.is-ready .hero-photo {
    transform: none;
  }

  .hero-actions,
  .hero-links {
    justify-content: center;
  }

  .hero-lede {
    margin-inline: auto;
  }

  .section-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  a.work-card,
  .work-card {
    grid-template-columns: 1fr;
  }

  .work-card__visual {
    min-height: 140px;
  }

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

  .skill:nth-child(odd),
  .skill:nth-child(even) {
    padding: 1.35rem 0;
    border-right: none;
  }

  .meta-grid { grid-template-columns: 1fr; gap: 1rem; }

  .scroll-cue { display: none; }
}

@media (max-width: 720px) {
  .menu-btn { display: flex; }

  .nav {
    position: fixed;
    inset: calc(var(--header-h) + var(--announce-h)) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem var(--pad-x) 1.25rem;
    background: rgba(248, 246, 242, 0.97);
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s var(--ease), opacity 0.3s;
  }

  body.is-dark-section .nav {
    background: rgba(19, 17, 16, 0.97);
    border-bottom-color: var(--border-dark);
  }

  .nav.open {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  .nav a {
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
  }

  body.is-dark-section .nav a {
    border-bottom-color: var(--border-dark);
  }

  .job__meta {
    align-items: flex-start;
    text-align: left;
  }

  .edu__side { align-items: flex-start; }

  .section { padding: 4.5rem 0; }
  .bridge { padding: 4.5rem 0; }
  .closing { padding: 5.5rem 0 5rem; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal-up,
  .hero-content,
  .hero-photo,
  .hero-title .line__inner,
  .hero-lede,
  .hero-actions,
  .hero-links,
  .orb,
  .closing__glow,
  .dotmorph-loading-dot,
  .scroll-cue__line {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .dot-canvas { display: none; }
}
