/* =============================================================
   Anya von Diessl — Editorial Portfolio
   Self-contained stylesheet. No dependency on the sibling
   /ProfessionalWebsite site — only external Google Fonts.
   ============================================================= */

:root {
  /* ---- palette: black, white, and paper, with one blue accent ---- */
  --paper: #f4f1ea; /* main page background — matches the business card's cream */
  --surface: #ffffff;      /* raised paper / card surface */
  --line: rgba(15, 15, 15, 0.12);   /* hairline dividers on light bg */

  --ink: #121212;          /* primary text + dark bookend surfaces — near-black */
  --ink-soft: #47474a;     /* secondary text on light bg — neutral gray */
  --ink-faint: #85858a;    /* tertiary text on light bg — neutral gray */

  --dark: #0e0e0f;         /* hero + contact surface — black */
  --dark-line: #2f2f31;
  --dark-text: #f5f5f3;
  --dark-muted: #b7b6b3;
  --dark-faint: #85847f;

  --accent: #2454e8;       /* the one accent — blue, used for links and interaction */
  --accent-light: #6f8fef; /* the accent, lightened for use on dark surfaces */
  --accent-tint: #e9edfb;  /* pale blue surface (Experience section) */
  --accent-ink: #14224f;   /* text on accent-tint */
  --accent-muted: #4a5a94;

  --card-shadow: 0 18px 40px -22px rgba(15, 15, 15, 0.35);

  /* ---- type: two working families ---- */
  --f-display: "Archivo", sans-serif;   /* masthead + major headings only */
  --f-text: "Newsreader", Georgia, serif;         /* body, nav, labels, buttons */
  --f-mono: "IBM Plex Mono", ui-monospace, monospace; /* dates + numbered list only */

  --container: 1240px;

  /* ---- radii: a small deliberate scale ---- */
  --r-control: 8px;    /* buttons, nav pill, chips */
  --r-panel: 16px;     /* the one large feature panel */
  --r-image: 4px;      /* research covers, photo-like blocks */
  --r-card: 10px;      /* the business card */
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  background: var(--paper);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--f-text);
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: #fff;
}

/* ---------- Ambient texture: a faint grain over the whole page ---------- */
#grain {
  position: fixed;
  inset: -60px;
  z-index: 998;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-drift 9s steps(8) infinite;
}

@keyframes grain-drift {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%, -6%); }
  40%  { transform: translate(-8%, 3%); }
  60%  { transform: translate(5%, -4%); }
  80%  { transform: translate(-4%, 7%); }
  100% { transform: translate(0, 0); }
}

/* ---------- Spotlight hover: a soft glow that tracks the cursor ---------- */
.spotlight {
  position: relative;
  overflow: hidden;
}

.spotlight::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  opacity: 0;
  border-radius: inherit;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.16), transparent 62%);
  mix-blend-mode: screen;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

/* Flip-cards need `overflow: visible` on the perspective-holding element
   itself — combined with a 3D transform, `.spotlight`'s overflow:hidden
   breaks backface-visibility in Safari, letting the far face show through
   mirrored. Each face already clips its own content independently, and
   the glow above keeps its rounded corners via `border-radius: inherit`. */
.flip-card.spotlight {
  overflow: visible;
}

.spotlight.spotlight-active::before {
  opacity: 1;
}

.spotlight-tint::before {
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(36, 84, 232, 0.09), transparent 65%);
  mix-blend-mode: normal;
}

@media (pointer: coarse) {
  .spotlight::before {
    display: none;
  }
}

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

h1,
h2,
h3,
p {
  margin: 0;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
}

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(24px, 6vw, 72px);
}

/* Small interface label — uppercase, tracked eyebrow text */
.label {
  font-family: var(--f-display);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--ink-soft);
  letter-spacing: 0.9px;
}

/* ---------- Masthead (nav + hero) ---------- */
.top {
  position: relative;
  background: var(--dark);
  color: var(--dark-text);
  overflow: hidden;
}

.top::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 36px;
  background: linear-gradient(to bottom, rgba(14, 14, 15, 0) 0%, var(--paper) 100%);
  pointer-events: none;
}

header.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 0;
}

.wordmark {
  display: block;
  line-height: 0;
}

.wordmark img {
  display: block;
  height: 32px;
  width: auto;
}

.nav {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  gap: 22px;
  padding: 12px 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(14, 14, 15, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 30px -14px rgba(0, 0, 0, 0.55);
}

.nav a {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  white-space: nowrap;
  color: var(--dark-muted);
  transition: color 0.15s ease;
}

.nav a:hover,
.nav a.active {
  color: #fff;
}

.nav-contact {
  position: fixed;
  top: 24px;
  right: clamp(24px, 6vw, 72px);
  z-index: 100;
  padding: 12px 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(14, 14, 15, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 30px -14px rgba(0, 0, 0, 0.55);
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  white-space: nowrap;
  color: var(--dark-text);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.nav-contact:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* ---------- Hamburger (mobile nav trigger) ---------- */
.hamburger {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--dark-line);
  background: rgba(255, 255, 255, 0.03);
  flex: none;
  z-index: 101;
}

.hamburger-box {
  position: relative;
  width: 16px;
  height: 11px;
  display: block;
}

.hamburger-box span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.4px;
  background: var(--dark-text);
  transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease;
}

.hamburger-box span:nth-child(1) { top: 0; }
.hamburger-box span:nth-child(2) { top: 5px; }
.hamburger-box span:nth-child(3) { top: 10px; }

.hamburger[aria-expanded="true"] .hamburger-box span:nth-child(1) {
  top: 5px;
  transform: rotate(45deg);
}

.hamburger[aria-expanded="true"] .hamburger-box span:nth-child(2) {
  opacity: 0;
}

.hamburger[aria-expanded="true"] .hamburger-box span:nth-child(3) {
  top: 5px;
  transform: rotate(-45deg);
}

/* ---------- Mobile menu overlay ---------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-menu.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.mobile-menu a {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 28px;
  letter-spacing: -0.3px;
  color: var(--dark-muted);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s ease, color 0.15s ease;
}

.mobile-menu.is-open a {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu.is-open a:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu.is-open a:nth-child(2) { transition-delay: 0.1s; }
.mobile-menu.is-open a:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu.is-open a:nth-child(4) { transition-delay: 0.2s; }
.mobile-menu.is-open a:nth-child(5) { transition-delay: 0.25s; }

.mobile-menu a:hover {
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .mobile-menu,
  .mobile-menu a {
    transition: none;
  }
}

/* Hero — asymmetric masthead, not a centred stack */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: end;
  padding: 32px 0 0;
  min-height: 0;
}

.hero-text {
  order: 1;
  align-self: center;
  position: relative;
}

.hero-photo-col {
  order: 2;
  position: relative;
  width: 100%;
  min-height: 420px;
}

.hero h1 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(44px, 5.2vw, 68px);
  line-height: 1;
  letter-spacing: -1.5px;
  margin: 0 0 18px;
  text-wrap: balance;
  color: var(--dark-text);
  text-shadow:
    0 0 14px rgba(255, 255, 255, 0.65),
    0 0 34px rgba(255, 255, 255, 0.4),
    0 0 76px rgba(255, 255, 255, 0.28);
}

.hero .copy {
  font-family: var(--f-text);
  font-size: 18px;
  line-height: 1.5;
  color: var(--dark-muted);
  max-width: 420px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 34px;
}

/* Entrance: hero content fades/rises in once script.js confirms load */
.hero h1,
.hero .copy,
.hero-actions {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.hero-photo,
.hero-circuit {
  opacity: 0;
  transition: opacity 1s ease;
}

.hero.is-loaded h1 {
  opacity: 1;
  transform: none;
  transition-delay: 0.1s;
}

.hero.is-loaded .copy {
  opacity: 1;
  transform: none;
  transition-delay: 0.22s;
}

.hero.is-loaded .hero-actions {
  opacity: 1;
  transform: none;
  transition-delay: 0.34s;
}

.hero.is-loaded .hero-photo {
  opacity: 1;
  transition-delay: 0.15s;
}

.hero.is-loaded .hero-circuit {
  opacity: 1;
  transition-delay: 0.1s;
}

.btn-pill,
.btn-icon {
  border: 1px solid var(--dark-line);
  background: linear-gradient(#1c1c1e, #0e0e0f);
  color: var(--dark-text);
  border-radius: 999px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 26px;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex: none;
}

.btn-icon svg {
  width: 19px;
  height: 19px;
}

.btn-pill:hover,
.btn-icon:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* Circuit — right-angle traces fanning out from the photo (standing in
   for a chip) to node dots around it, with a small colored pulse
   periodically travelling each trace's length. Pure decoration:
   absolutely positioned, non-interactive, sits behind the photo. */
.hero-circuit {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hero-circuit svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.circuit-trace {
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 1.2;
  stroke-linejoin: round;
}

.circuit-pin {
  fill: rgba(255, 255, 255, 0.4);
}

.circuit-node {
  fill: #141416;
  stroke: rgba(255, 255, 255, 0.32);
  stroke-width: 1;
}

/* Traveling signal lights — a small radial-gradient dot animated along each
   trace via CSS offset-path (same technique/easing/colors as the reference
   cpu-architecture component), clipped to the trace's corridor by an SVG
   mask so it only ever appears to travel inside the line. */
.circuit-signal {
  animation-name: circuit-travel;
  animation-iteration-count: infinite;
  animation-timing-function: cubic-bezier(0.75, -0.01, 0, 0.99);
}

.circuit-signal-0 { offset-path: path("M 200,100 L 200,61.5 L 90,61.5 L 90,30"); animation-duration: 5s; animation-delay: 1s; }
.circuit-signal-1 { offset-path: path("M 260,100 L 260,56.0 L 260,56.0 L 260,20"); animation-duration: 2s; animation-delay: 6s; }
.circuit-signal-2 { offset-path: path("M 320,100 L 320,61.5 L 430,61.5 L 430,30"); animation-duration: 6s; animation-delay: 4s; }
.circuit-signal-3 { offset-path: path("M 200,340 L 200,378.5 L 100,378.5 L 100,410"); animation-duration: 3s; animation-delay: 3s; }
.circuit-signal-4 { offset-path: path("M 260,340 L 260,384.0 L 260,384.0 L 260,420"); animation-duration: 4s; animation-delay: 9s; }
.circuit-signal-5 { offset-path: path("M 320,340 L 320,375.75 L 420,375.75 L 420,405"); animation-duration: 7s; animation-delay: 3s; }
.circuit-signal-6 { offset-path: path("M 160,140 L 88.5,140 L 88.5,70 L 30,70"); animation-duration: 4s; animation-delay: 4s; }
.circuit-signal-7 { offset-path: path("M 160,185 L 85.75,185 L 85.75,150 L 25,150"); animation-duration: 3s; animation-delay: 3s; }
.circuit-signal-8 { offset-path: path("M 160,255 L 85.75,255 L 85.75,290 L 25,290"); animation-duration: 5s; animation-delay: 1s; }
.circuit-signal-9 { offset-path: path("M 160,300 L 88.5,300 L 88.5,370 L 30,370"); animation-duration: 2s; animation-delay: 6s; }
.circuit-signal-10 { offset-path: path("M 360,140 L 431.5,140 L 431.5,70 L 490,70"); animation-duration: 6s; animation-delay: 4s; }
.circuit-signal-11 { offset-path: path("M 360,185 L 434.25,185 L 434.25,150 L 495,150"); animation-duration: 3s; animation-delay: 3s; }
.circuit-signal-12 { offset-path: path("M 360,255 L 434.25,255 L 434.25,290 L 495,290"); animation-duration: 4s; animation-delay: 9s; }
.circuit-signal-13 { offset-path: path("M 360,300 L 431.5,300 L 431.5,370 L 490,370"); animation-duration: 7s; animation-delay: 3s; }

@keyframes circuit-travel {
  0% {
    offset-distance: 0%;
  }
  100% {
    offset-distance: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {

  .hero h1,
  .hero .copy,
  .hero-actions,
  .hero-photo,
  .hero-circuit {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .circuit-signal {
    animation: none;
    opacity: 0;
  }

  #grain {
    animation: none;
  }
}

/* Portrait — a sharp-cornered box with a faint rim light, centered in
   .hero-photo-col so it sits over the middle of the circuit traces and
   hides their convergence point, with room on every side for the traces
   to extend into. */
.hero-photo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: 260px;
  margin: 0;
  border-radius: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 30px 60px -20px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

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

/* Education — label + degrees pinned left, divider, bio on the right */
.education-layout {
  display: grid;
  grid-template-columns: 0.7fr auto 1.7fr;
  gap: 32px;
  align-items: start;
}

.education-intro {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.degree-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.degree-entry {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.degree-school {
  font-family: var(--f-text);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  margin: 0;
}

.degree-name {
  font-family: var(--f-text);
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
}

.degree-concentration {
  font-family: var(--f-text);
  font-size: 12.5px;
  color: var(--ink-faint);
  margin: 0;
}

.education-divider {
  width: 1px;
  align-self: stretch;
  background: var(--line);
}

.education-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.education-headline {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(21px, 2.5vw, 27px);
  line-height: 1.3;
  letter-spacing: -0.3px;
  color: var(--ink);
  max-width: 640px;
  margin: 0;
  text-wrap: balance;
}

.education-bio {
  font-family: var(--f-text);
  font-size: clamp(15.5px, 1.6vw, 17px);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 600px;
  margin: 0;
}

.degree-dates {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0;
}

/* ---------- Generic section rhythm ---------- */
.section {
  padding: 84px 0;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.section-heading h2 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.6px;
  margin-top: 10px;
  text-wrap: balance;
}

.section-heading .aside {
  max-width: 300px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.5;
}

/* ---------- Research: three image-led cards, text overlaid on the image ---------- */
.research-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.research-card {
  position: relative;
  border-radius: 0;
  aspect-ratio: 4 / 5;
  background: var(--surface);
  box-shadow: 2px 3px 6px rgba(15, 15, 15, 0.07), 9px 13px 22px -6px rgba(15, 15, 15, 0.16);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.research-card:hover {
  transform: translateY(-6px);
  box-shadow: 3px 5px 8px rgba(15, 15, 15, 0.08), 14px 22px 32px -8px rgba(15, 15, 15, 0.22);
}

/* Research cards: white ground, thin light-grey border, illustration
   fading to white before the text — distinct from the ventures' cream
   paper cards and the engineering section's dark cards. */
.research-card .flip-card-face {
  background: var(--surface);
  border: 1px solid rgba(15, 15, 15, 0.08);
  border-radius: 0;
  box-shadow: none;
  color: inherit;
  padding: 0;
}

.research-card .flip-card-back {
  color: var(--ink-soft);
  padding: 24px 22px;
}

.research-card .flip-card-back h3 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.2px;
  color: var(--ink);
  margin: 14px 0 12px;
}

.research-card .flip-desc {
  color: var(--ink-soft);
  font-size: 13.5px;
}

.research-card .flip-btn {
  border: 1px solid rgba(15, 15, 15, 0.14);
  background: rgba(15, 15, 15, 0.03);
  color: var(--ink);
}

.research-card-orange .flip-btn:hover {
  border-color: #c8703a;
  background: rgba(200, 112, 58, 0.12);
}

.research-card-green .flip-btn:hover {
  border-color: #5c8a68;
  background: rgba(92, 138, 104, 0.12);
}

.research-card-blue .flip-btn:hover {
  border-color: #3f6fd1;
  background: rgba(63, 111, 209, 0.12);
}

.research-card .flip-card-front {
  display: flex;
  flex-direction: column;
}

.research-card-top {
  padding: 26px 22px 0;
}

.research-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 24px;
}

.research-card-header img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex: none;
  margin-top: 1px;
}

.research-card-header span {
  font-family: var(--f-text);
  font-size: 14.5px;
  line-height: 1.35;
  color: var(--ink);
  max-width: 190px;
}

.research-card-top h3 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.3px;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 10px;
}

.research-card-top .copy {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 22px;
}

.research-card-media {
  position: relative;
  flex: 1;
  min-height: 110px;
  border-radius: 0;
  overflow: hidden;
}

.research-card-media svg {
  width: 100%;
  height: 100%;
  display: block;
}

.text-link {
  font-family: var(--f-text);
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 2px;
  border-bottom: 1px solid currentColor;
  transition: opacity 0.15s ease;
}

.text-link:hover {
  opacity: 0.6;
}

/* ---------- Engineering: text pinned left, cards scroll right ---------- */
.eng-layout {
  display: grid;
  grid-template-columns: 0.7fr 1.7fr;
  gap: 40px;
  align-items: start;
}

.eng-intro .label {
  color: var(--ink-faint);
}

.eng-intro h2 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(30px, 3.4vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.4px;
  margin: 14px 0 14px;
}

/* Small pager-style indicator, used under a section's h2 */
.section-dots {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 18px;
}

.section-dots .pager-bar {
  width: 22px;
  height: 4px;
  border-radius: 999px;
  background: var(--ink);
  flex: none;
}

.section-dots .pager-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink-faint);
  flex: none;
}

.eng-intro .copy {
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.6;
}

.eng-scroll {
  min-width: 0;
  overflow-x: auto;
  margin: 0 -4px;
  padding: 4px 4px 14px;
  -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(to right, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, black 92%, transparent 100%);
}

.eng-track {
  display: flex;
  gap: 20px;
  width: max-content;
}

.eng-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 300px;
  min-height: 220px;
  flex: none;
  border: none;
  border-radius: var(--r-image);
  padding: 28px 26px 24px;
  background: var(--ink);
  color: var(--dark-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.eng-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow);
}

.eng-card-label {
  color: var(--dark-faint);
}

.eng-card h3 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.2px;
  line-height: 1.22;
  margin: 12px 0 0;
  color: var(--dark-text);
  max-width: 88%;
}

.eng-card-btn {
  align-self: flex-end;
  margin-top: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--dark-line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--dark-text);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.eng-card:hover .eng-card-btn {
  border-color: var(--accent);
  background: rgba(36, 84, 232, 0.12);
}

.eng-card-btn svg {
  width: 14px;
  height: 14px;
}

/* Mentorship cards: same size/rhythm as .eng-card, but flip in place
   (via the shared .flip-card mechanics) instead of opening a modal. */
.mentor-card {
  width: 300px;
  min-height: 220px;
  flex: none;
}

.mentor-card:hover {
  transform: translateY(-4px);
}

.mentor-card .flip-card-face {
  background: var(--ink);
  color: var(--dark-text);
  border: 0;
  box-shadow: none;
}

.mentor-card .flip-card-front h3,
.mentor-card .flip-card-back h3 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.2px;
  line-height: 1.22;
  color: var(--dark-text);
  max-width: 92%;
}

.mentor-card .flip-highlight {
  color: var(--dark-text);
}

.mentor-card .flip-desc {
  color: var(--dark-muted);
  font-size: 13.5px;
}

.mentor-card .flip-btn {
  border: 1px solid var(--dark-line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--dark-text);
}

.mentor-card .flip-btn:hover {
  border-color: var(--accent);
  background: rgba(36, 84, 232, 0.12);
}

/* ---------- Sub-page intro (Teaching & Mentorship) ---------- */
.page-intro {
  padding: 140px 0 60px;
  text-align: center;
}

.page-back {
  display: inline-flex;
  margin-bottom: 28px;
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: 0.4px;
  color: var(--ink-soft);
  border-bottom-color: var(--ink-soft);
}

.page-back:hover {
  color: var(--ink);
}

.page-intro h1 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(34px, 4.4vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.6px;
  margin: 0 auto 16px;
  max-width: 700px;
  text-wrap: balance;
}

.page-intro .copy {
  max-width: 520px;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.6;
}

/* ---------- Engineering: project detail modal ---------- */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.project-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.project-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 8, 6, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.project-modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--r-panel);
  background: var(--ink);
  color: var(--dark-text);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.25s ease;
}

.project-modal.is-open .project-modal-panel {
  transform: translateY(0) scale(1);
}

/* ---------- IDE-style chrome around the project modal ---------- */
.ide-titlebar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 16px;
  background: #1c1c1e;
  border-bottom: 1px solid var(--dark-line);
  flex: none;
}

.ide-dots {
  display: flex;
  gap: 7px;
  flex: none;
}

.ide-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.ide-dot-red {
  background: #ff5f56;
}

.ide-dot-yellow {
  background: #ffbd2e;
}

.ide-dot-green {
  background: #27c93f;
}

.ide-menu {
  display: flex;
  gap: 15px;
  font-family: var(--f-text);
  font-size: 12px;
  color: var(--dark-faint);
  overflow: hidden;
  white-space: nowrap;
}

.ide-tabs {
  display: flex;
  background: #18181a;
  border-bottom: 1px solid var(--dark-line);
  flex: none;
  overflow-x: auto;
}

.ide-tab {
  padding: 9px 18px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.2px;
  color: var(--dark-faint);
  border-right: 1px solid var(--dark-line);
  white-space: nowrap;
}

.ide-tab-active {
  color: var(--dark-text);
  background: var(--ink);
}

.ide-body {
  display: flex;
  flex: 1;
  min-height: 0;
}

.ide-sidebar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 48px;
  flex: none;
  background: #1c1c1e;
  border-right: 1px solid var(--dark-line);
  padding: 16px 0;
}

.ide-sidebar-top,
.ide-sidebar-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.ide-sidebar svg {
  width: 18px;
  height: 18px;
  color: var(--dark-faint);
}

.ide-sidebar-top svg:first-child {
  color: var(--dark-text);
}

.ide-content {
  position: relative;
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 44px 40px 36px;
}

.project-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--dark-line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--dark-text);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.project-modal-close:hover {
  border-color: var(--accent);
  background: rgba(36, 84, 232, 0.12);
}

.project-modal-close svg {
  width: 13px;
  height: 13px;
}

.project-modal-panel h3 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 26px;
  letter-spacing: -0.3px;
  line-height: 1.2;
  margin: 10px 0 16px;
  color: var(--dark-text);
}

.project-modal-panel .copy {
  color: var(--dark-muted);
  font-size: 15.5px;
  line-height: 1.6;
}

.project-modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.project-tag {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.3px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--dark-line);
  color: var(--dark-muted);
}

.modal-headline {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.1px;
  color: var(--dark-text);
  margin: 4px 0 12px;
}

.modal-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 24px 0;
  padding: 20px 0;
  border-top: 1px solid var(--dark-line);
  border-bottom: 1px solid var(--dark-line);
}

.modal-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-value {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.1px;
  color: var(--dark-text);
}

.stat-label {
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.3px;
  color: var(--dark-faint);
}

.modal-full-desc {
  margin-top: 0;
}

body.modal-open,
body.nav-open {
  overflow: hidden;
}

/* ---------- Experience: plain section, no card treatment ---------- */
.about {
  padding: 84px 0;
  display: grid;
  grid-template-columns: 0.85fr 1.4fr;
  gap: 56px;
}

.about .label {
  color: var(--ink-faint);
}

.about h2 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.18;
  letter-spacing: -0.3px;
  margin: 14px 0 16px;
  color: var(--ink);
}

.about .copy {
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.6;
  max-width: 340px;
  margin-bottom: 20px;
}

.cv-list {
  display: flex;
  flex-direction: column;
}

.cv-row {
  display: flex;
  gap: 18px;
  padding: 24px 0;
}

.cv-row:first-child {
  padding-top: 0;
}

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

.cv-logo {
  width: 54px;
  height: 54px;
  border-radius: 9px;
  object-fit: contain;
  flex: none;
  margin-top: 2px;
}

.cv-body {
  flex: 1;
  min-width: 0;
}

.cv-row-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cv-org {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 20px;
  color: var(--ink);
  letter-spacing: -0.1px;
}

.cv-role-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.cv-role {
  font-size: 14.5px;
  color: var(--ink-soft);
}

.cv-year {
  display: block;
  font-family: var(--f-mono);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-faint);
  margin-bottom: 10px;
}

.cv-toggle {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  color: var(--ink-soft);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.cv-toggle:hover {
  border-color: var(--ink-faint);
  background: rgba(23, 20, 15, 0.03);
}

.cv-toggle svg {
  width: 11px;
  height: 11px;
  transition: transform 0.2s ease;
}

.cv-row.is-open .cv-toggle svg {
  transform: rotate(90deg);
}

.cv-desc-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
}

.cv-row.is-open .cv-desc-wrap {
  grid-template-rows: 1fr;
}

.cv-desc-inner {
  overflow: hidden;
}

.cv-desc {
  font-family: var(--f-text);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-top: 14px;
  max-width: 620px;
}

/* ---------- Ventures: text pinned left, cards scroll right ---------- */
.venture-section {
  background: var(--dark);
  color: var(--dark-text);
  padding: 84px 0;
}

.venture-layout {
  display: grid;
  grid-template-columns: 0.7fr 1.7fr;
  gap: 40px;
  align-items: start;
}

.venture-intro .label {
  color: var(--dark-faint);
}

.venture-intro h2 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(30px, 3.4vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.4px;
  color: var(--dark-text);
  margin: 14px 0 14px;
}

.venture-intro .copy {
  color: var(--dark-muted);
  font-size: 15.5px;
  line-height: 1.6;
}

.venture-bento-top,
.venture-bento-bottom {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 226px;
  gap: 20px;
}

.venture-bento-bottom {
  margin-top: 20px;
}

.flip-card {
  grid-column: span 1;
  grid-row: span 1;
  perspective: 1400px;
  transition: transform 0.25s ease;
}

.flip-card-featured {
  grid-column: span 2;
  grid-row: span 2;
}

.flip-card-tall {
  grid-column: span 1;
  grid-row: span 2;
}

.flip-card-wide {
  grid-column: span 2;
  grid-row: span 1;
}

.flip-card:hover {
  transform: translateY(-4px);
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0.15, 0.2, 1);
  transform-style: preserve-3d;
}

.flip-card.is-flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--r-image);
  background: #f4f1ea;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 2.8px 4.2px 10px rgba(0, 0, 0, 0.12),
    11px 16px 19px rgba(0, 0, 0, 0.1);
  color: #46443f;
  padding: 28px 26px 24px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.flip-card-back {
  transform: rotateY(180deg);
  padding-top: 46px;
}

.flip-card-front .label {
  color: #8a8679;
  margin-bottom: 10px;
}

.flip-card-front h3 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 23px;
  line-height: 1.2;
  letter-spacing: -0.2px;
  color: #3c3a35;
}

.flip-card-featured .flip-card-front h3 {
  font-size: clamp(23px, 2.6vw, 32px);
  max-width: 80%;
}

.flip-card-featured .flip-highlight {
  font-size: 17px;
  max-width: 65%;
}

.flip-card-featured .flip-card-back h3 {
  font-size: 24px;
  max-width: 75%;
}

.flip-card-featured .flip-desc {
  font-size: 15px;
  max-width: 80%;
}

.flip-highlight {
  margin-top: auto;
  padding-top: 20px;
  font-family: var(--f-text);
  font-style: italic;
  font-size: 15px;
  line-height: 1.5;
  color: var(--accent);
  max-width: 85%;
}

.flip-card-back h3 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 19px;
  line-height: 1.22;
  letter-spacing: -0.1px;
  color: #3c3a35;
}

.flip-date {
  position: absolute;
  top: 20px;
  right: 26px;
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.3px;
  color: var(--ink-faint);
  white-space: nowrap;
}

.flip-desc {
  margin-top: 14px;
  font-family: var(--f-text);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  overflow-y: auto;
  min-height: 0;
  flex: 1;
}

.flip-btn {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.03);
  color: #3c3a35;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.flip-btn:hover {
  border-color: var(--accent);
  background: rgba(36, 84, 232, 0.1);
}

.flip-btn svg {
  width: 14px;
  height: 14px;
}

.flip-card-back .flip-btn svg {
  transform: rotate(180deg);
}

/* ---------- Venture cards: open a plain detail pop-up instead of flipping ---------- */
.venture-card {
  grid-column: span 1;
  grid-row: span 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  text-align: left;
  font: inherit;
  cursor: pointer;
  border-radius: var(--r-image);
  background: #f4f1ea;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 2.8px 4.2px 10px rgba(0, 0, 0, 0.12),
    11px 16px 19px rgba(0, 0, 0, 0.1);
  color: #46443f;
  padding: 28px 26px 24px;
  transition: transform 0.25s ease;
}

.venture-card-featured {
  grid-column: span 2;
  grid-row: span 2;
}

.venture-card-tall {
  grid-column: span 1;
  grid-row: span 2;
}

.venture-card-wide {
  grid-column: span 2;
  grid-row: span 1;
}

.venture-card:hover {
  transform: translateY(-4px);
}

.venture-card h3 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 23px;
  line-height: 1.2;
  letter-spacing: -0.2px;
  color: #3c3a35;
}

.venture-card-featured h3 {
  font-size: clamp(23px, 2.6vw, 32px);
  max-width: 80%;
}

.venture-card-featured .venture-card-highlight {
  font-size: 17px;
  max-width: 65%;
}

.venture-card-highlight {
  margin-top: auto;
  padding-top: 20px;
  font-family: var(--f-text);
  font-style: italic;
  font-size: 15px;
  line-height: 1.5;
  color: var(--accent);
  max-width: 85%;
}

.venture-card-expand {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.03);
  color: #3c3a35;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.venture-card:hover .venture-card-expand {
  border-color: var(--accent);
  background: rgba(36, 84, 232, 0.1);
}

.venture-card-expand svg {
  width: 14px;
  height: 14px;
}

/* Plain venture detail pop-up: reuses the .project-modal shell (backdrop,
   panel, close button) but skips the IDE-window chrome used for projects —
   just the card's own title, date, and description on a simple panel. */
.venture-modal-content {
  position: relative;
  padding: 44px 40px 36px;
  overflow-y: auto;
}

.venture-modal-date {
  display: block;
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.4px;
  color: var(--dark-faint);
  margin-bottom: 14px;
}

/* ---------- Teaching & mentorship banner: full-bleed black strip ---------- */
.teaching-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 28px;
  padding: 40px clamp(24px, 6vw, 72px);
  background: var(--dark);
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(19px, 2.2vw, 24px);
  letter-spacing: -0.2px;
  color: var(--dark-text);
  transition: background 0.2s ease;
}

.teaching-banner:hover {
  background: #17171a;
}

.teaching-banner-arrow {
  font-family: var(--f-text);
  font-weight: 400;
  font-size: 21px;
  color: var(--dark-text);
  transition: transform 0.15s ease;
}

.teaching-banner:hover .teaching-banner-arrow {
  transform: translateX(5px);
}

/* ---------- Technical Skills & Background ---------- */
.skills-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.skills-heading .copy {
  max-width: 340px;
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.6;
  text-wrap: balance;
}

.skills-heading .label {
  color: var(--ink-faint);
}

.skills-heading h2 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(30px, 3.6vw, 44px);
  letter-spacing: -0.5px;
  margin-top: 8px;
}

.skills-panel {
  padding: 8px 0 0;
}

/* Also used by the pager-dots under the Engineering section's carousel. */
.skills-dots {
  justify-content: center;
  margin: 16px 0 22px;
}

.skills-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-bottom: 8px;
}

.skills-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-text);
  font-size: 13.5px;
  color: var(--ink-soft);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot-a {
  background: #ffa45b;
}

.dot-b {
  background: #91b58a;
}

.dot-c {
  background: #8ab6ff;
}

.dot-d {
  background: #b79ae0;
}

.skills-scroll-hint {
  margin: 10px 0 0;
  text-align: center;
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.4px;
  color: var(--ink-faint);
}

.graph-dots {
  justify-content: flex-end;
  margin: 16px 0 0;
}

.skills-graph {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 1;
  cursor: grab;
  touch-action: none;
}

.skills-graph:active {
  cursor: grabbing;
}

.skills-stack {
  margin-top: 28px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.skills-stack .label {
  color: var(--ink-faint);
  margin-bottom: 12px;
}

.skills-stack-row {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(19px, 2.4vw, 28px);
  letter-spacing: -0.3px;
  color: var(--ink);
  line-height: 1.55;
}

/* ---------- Contact: content sits inside a black box, not a black section ---------- */
.contact {
  padding: 84px 0;
}

.contact-box {
  background: var(--dark);
  color: var(--dark-text);
  border-radius: var(--r-panel);
  padding: 64px clamp(24px, 5vw, 64px);
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.contact .label {
  color: var(--dark-faint);
}

.contact h2 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(38px, 4.6vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.8px;
  margin: 16px 0 14px;
  text-wrap: balance;
}

.contact .copy {
  color: var(--dark-muted);
  font-size: 16px;
  max-width: 420px;
}

/* Contact form */
.contact-form {
  margin-top: 32px;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cf-field {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--dark-line);
  border-radius: 12px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.cf-field:focus-within {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.05);
}

.cf-field input,
.cf-field textarea {
  width: 100%;
  border: 0;
  background: none;
  outline: none;
  padding: 16px 18px;
  font-family: var(--f-text);
  font-size: 15.5px;
  color: var(--dark-text);
  resize: vertical;
}

.cf-field textarea {
  min-height: 90px;
}

.cf-field input::placeholder,
.cf-field textarea::placeholder {
  color: var(--dark-faint);
}

.cf-submit {
  align-self: flex-start;
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 6px 6px 6px 22px;
  background: var(--dark-text);
  color: var(--ink);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.cf-submit:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.cf-submit-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(18, 18, 18, 0.1);
  color: var(--ink);
}

.cf-submit[disabled] {
  opacity: 0.6;
  cursor: default;
}

/* Bot trap: real visitors never see or fill this field */
.cf-honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.cf-status {
  min-height: 18px;
  margin: 2px 0 0;
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: 0.2px;
  color: var(--dark-muted);
}

.cf-status-success {
  color: #8fd19e;
}

.cf-status-error {
  color: #f2a2a2;
}

/* The one deliberate paper moment on the whole site — letterpress business card */
.business-card {
  background: #f4f1ea;
  color: #46443f;
  border-radius: 0;
  max-width: 470px;
  margin-left: auto;
  box-shadow: 2px 3px 6px rgba(15, 15, 15, 0.07), 9px 13px 22px -6px rgba(15, 15, 15, 0.16);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.business-card:hover {
  transform: translateY(-6px);
  box-shadow: 3px 5px 8px rgba(15, 15, 15, 0.08), 14px 22px 32px -8px rgba(15, 15, 15, 0.22);
}

.business-card-inner {
  display: flex;
  flex-direction: column;
  min-height: 270px;
  padding: 30px 36px;
  font-family: "Playfair Display", "ChronicleText", Georgia, serif;
  color: #46443f;
}

.bc-email {
  align-self: flex-end;
  font-size: 13px;
  letter-spacing: 1px;
  font-variant: small-caps;
  color: #46443f;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.bc-email:hover {
  color: #1f1e1b;
}

.bc-center {
  margin: auto 0;
  text-align: center;
}

.bc-name {
  margin: 0;
  font-size: 30px;
  font-weight: 500;
  font-variant: small-caps;
  letter-spacing: 2px;
  color: #3c3a35;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85),
    0 -0.5px 0 rgba(0, 0, 0, 0.06);
}

.bc-sur {
  font-size: 1.12em;
  letter-spacing: 3px;
}

.business-card .role {
  margin: 10px 0 0;
  font-size: 15px;
  font-variant: small-caps;
  letter-spacing: 2px;
  color: #5c5a53;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
  text-align: center;
}

.bc-location {
  text-align: center;
  margin: 0;
  font-size: 13px;
  font-variant: small-caps;
  letter-spacing: 1.5px;
  color: #55534c;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--dark);
  color: var(--dark-text);
  padding: 64px 0 32px;
}

.footer-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-name {
  margin: 0 0 14px;
  font-size: 26px;
  line-height: 1;
}

.footer-name-first {
  font-family: var(--f-display);
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--dark-text);
  text-transform: uppercase;
}

.footer-name-last {
  font-family: var(--f-text);
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
}

.footer-tagline {
  margin: 0;
  max-width: 420px;
  font-family: var(--f-mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--dark-muted);
}

.footer-contact {
  display: flex;
  align-items: center;
  gap: 18px;
}

.footer-email {
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--dark-muted);
  transition: color 0.15s ease;
}

.footer-email:hover {
  color: var(--dark-text);
}

.footer-social {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.45);
  transition: color 0.15s ease, background 0.15s ease;
}

.footer-social:hover {
  color: var(--dark-text);
  background: rgba(255, 255, 255, 0.08);
}

.footer-rule {
  height: 1px;
  background: var(--dark-line);
  margin: 40px 0 22px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--dark-faint);
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .nav-contact {
    display: none;
  }
}

@media (max-width: 900px) {
  .section,
  .venture-section {
    padding: 60px 0;
  }

  .skills-graph {
    aspect-ratio: auto;
    height: 900px;
  }

  .hero,
  .research-grid,
  .about,
  .venture-layout,
  .eng-layout,
  .contact-inner {
    grid-template-columns: 1fr;
  }

  .education-layout {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .education-divider {
    display: none;
  }

  .business-card {
    margin: 0 auto;
    max-width: 100%;
  }

  .footer-contact {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .hero-photo-col {
    order: -1;
    min-height: 320px;
  }

  .hero-photo {
    width: 210px;
  }

  .hero-photo img {
    height: 240px;
  }

  .hero {
    min-height: 0;
  }

  .venture-bento-top,
  .venture-bento-bottom {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .flip-card,
  .flip-card-featured,
  .flip-card-tall,
  .flip-card-wide,
  .venture-card,
  .venture-card-featured,
  .venture-card-tall,
  .venture-card-wide {
    grid-column: span 1;
    grid-row: span 1;
    height: 340px;
  }

  .venture-intro {
    margin-bottom: 8px;
  }

  .nav {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .eng-card,
  .mentor-card {
    width: 260px;
    min-height: 200px;
  }

  .eng-card {
    padding: 24px 22px;
  }

  .page-intro {
    padding: 120px 0 44px;
  }

  .ide-content {
    padding: 26px 22px 30px;
  }

  .ide-menu span:nth-child(n + 5) {
    display: none;
  }

  .ide-sidebar {
    width: 40px;
  }

  .ide-sidebar svg {
    width: 16px;
    height: 16px;
  }

  .modal-stats {
    grid-template-columns: 1fr;
    gap: 14px;
  }

}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

/* .research-card is scroll-revealed (.reveal.is-visible sets transform:none
   at the same specificity as a plain :hover), so this needs to match or
   beat that specificity to actually lift the card on hover. */
.research-card.reveal.is-visible:hover {
  transform: translateY(-6px);
  box-shadow: 3px 5px 8px rgba(15, 15, 15, 0.08), 14px 22px 32px -8px rgba(15, 15, 15, 0.22);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

