@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

/* =====================================================================
   Duy Anh Hong — Vien-style portfolio
   FONTS       : Outfit (display & interface)
   COLORS      : editorial palette
                 cream #F5F2E9 · sand #ECE6D6 · ink #1C1A14
                 persimmon oklch(64% .22 38) · lime oklch(91% .18 118)
   ===================================================================== */

:root {
  /* ── Editorial palette ── */
  --cream:       oklch(96.5% 0.012 95);   /* #F5F2E9 warm cream     */
  --cream-2:     oklch(93.2% 0.018 92);   /* #ECE6D6 sand           */
  --ink:         oklch(20%   0.012 80);   /* #1C1A14 warm near-black*/
  --ink-2:       oklch(38%   0.012 80);   /* muted ink              */
  --ink-faint:   oklch(20%   0.012 80 / .12);
  --lime:        oklch(64%   0.22  38);   /* persimmon orange as primary accent */
  --lime-deep:   oklch(57%   0.21  36);
  --persimmon:   oklch(91%   0.18  118);  /* lime green as secondary accent */
  --border:      oklch(20%   0.012 80 / .88);
  --shadow:      6px 6px 0 oklch(20% 0.012 80);
  --radius:      18px;
  --maxw:        1360px;
  --display:     "Outfit", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --sans:        "Outfit", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; font-size: 112.5%; }
body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--lime); color: var(--ink); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

/* faint grid texture */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background:
    linear-gradient(var(--ink-faint) 1px, transparent 1px) 0 0 / 100% 56px,
    linear-gradient(90deg, var(--ink-faint) 1px, transparent 1px) 0 0 / 56px 100%;
  opacity: .3;
  mask-image: radial-gradient(120% 100% at 50% 0%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(120% 100% at 50% 0%, #000 30%, transparent 78%);
}

/* ── NAV — centered sticky pill ──────────────────────────────────── */
.nav {
  position: fixed;
  top: clamp(.8rem, 2vw, 1.4rem);
  left: 50%; transform: translateX(-50%);
  z-index: 100;
  width: max-content; max-width: calc(100vw - 1.5rem);
}
.nav-inner {
  position: relative;
  display: flex; align-items: center;
  gap: clamp(.4rem, 1.4vw, 1.1rem);
  padding: .55rem .7rem;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: oklch(96.5% 0.012 95 / .82);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 12px 36px -12px oklch(20% 0.012 80 / .5);
  overflow-x: auto; scrollbar-width: none;
}
.nav-inner::-webkit-scrollbar { display: none; }
.nav-bubble {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 0;
  width: 0;
  background: var(--ink);
  border-radius: 999px;
  pointer-events: none;
  z-index: 0;
  transition: transform 0.36s cubic-bezier(0.34, 1.56, 0.64, 1),
              width 0.36s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.22s ease;
  opacity: 0;
}
.nav a {
  position: relative;
  z-index: 1;
  font-family: var(--display);
  font-size: clamp(.92rem, 1.1vw, 1.05rem);
  font-weight: 700;
  letter-spacing: .01em;
  padding: .35rem .85rem; border-radius: 999px;
  white-space: nowrap;
  color: var(--ink);
  transition: color .22s ease;
}
.nav a:hover { color: var(--persimmon); }
.nav a.active { color: var(--cream); font-weight: 700; }

/* ── Section shell ───────────────────────────────────────────────── */
.section {
  position: relative;
  width: 100%; max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2rem, 4.5vh, 3.5rem) clamp(1.4rem, 5vw, 3.5rem);
}
.section--hero { min-height: 100vh; display: flex; align-items: center; }

.sec-head {
  font-family: var(--display);
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1.08;
  margin-bottom: clamp(1rem, 2vh, 1.5rem);
  min-height: 1.1em;
}
.sec-head .dot { color: var(--persimmon); }
.type-cursor {
  display: inline-block;
  width: 0.09em;
  height: 0.82em;
  background-color: var(--persimmon);
  margin-left: 0.08em;
  vertical-align: -0.02em;
  border-radius: 2px;
  box-shadow: 0 0 12px oklch(58% 0.22 35 / 0.5);
  animation: typeCursorBlink 0.85s infinite ease-in-out;
}
@keyframes typeCursorBlink {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0; transform: scaleY(0.92); }
}

/* ── Smooth Scroll Reveal & Glide Up ────────────────────────────── */
.reveal, .sec-head, .ask-inner {
  opacity: 0;
  transform: translateY(48px) scale(0.985);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.section--hero .reveal,
.section--hero .sec-head {
  opacity: 1;
  transform: none;
  transition: none;
}
.in .reveal, .reveal.in, .sec-head.in, .ask-inner.in {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.reveal.d1 { transition-delay: .09s; }
.reveal.d2 { transition-delay: .18s; }
.reveal.d3 { transition-delay: .27s; }
.reveal.d4 { transition-delay: .36s; }

/* lime highlight & stroke helpers */
.hl {
  background: var(--lime);
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
  padding: .02em .14em; border-radius: 3px;
}
.stroke {
  color: transparent;
  -webkit-text-stroke: 1.4px var(--ink);
  text-stroke: 1.4px var(--ink);
}

/* ── HERO ────────────────────────────────────────────────────────── */
.hero-inner { width: 100%; }
.hero-eyebrow {
  font-size: clamp(.8rem, 1.1vw, .95rem);
  letter-spacing: .26em; text-transform: uppercase;
  color: var(--ink-2); font-weight: 500;
  margin-bottom: 1.4rem;
  display: flex; align-items: center; gap: .8rem;
}
.hero-eyebrow::before { content: ""; width: 42px; height: 2px; background: var(--ink); display: inline-block; }

.section--hero h1 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2.2rem, 5.2vw, 4.8rem);
  line-height: 1.04; letter-spacing: -.01em;
}
.section--hero h1 .line { display: block; }
.section--hero h1 .hl-line {
  display: inline-flex; align-items: center; gap: .2em; margin: .08em 0;
}
.spark { color: var(--ink); font-size: .62em; transform: translateY(-.12em); display: inline-block; }
.section--hero h1 .hl { padding: .04em .18em; }

.hero-sub {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.35rem, 3.6vw, 3rem);
  line-height: 1.05; margin-top: .12em;
}

.hero-actions {
  display: flex; flex-wrap: wrap; gap: .8rem;
  margin-top: clamp(2rem, 5vh, 3.2rem);
}
.btn {
  font-family: var(--sans); font-weight: 500; font-size: .98rem;
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .72rem 1.35rem;
  border: 2px solid var(--ink); border-radius: 999px;
  background: var(--cream);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.btn svg { width: 15px; height: 15px; }
.btn:hover { background: var(--ink); color: var(--cream); }
.btn--primary { background: var(--lime); }
.btn--primary:hover { background: var(--lime-deep); color: var(--cream); }

/* handwritten "interesting read!" note pointing at the Deep Dives button */
.btn-annotated { position: relative; display: inline-flex; }
.scribble {
  position: absolute; top: calc(100% + 6px); left: 38%;
  display: flex; align-items: flex-end;
  pointer-events: none; color: var(--ink);
}
.scribble-arrow { width: 86px; height: 63px; flex: none; overflow: visible; }
.scribble-text {
  font-family: "Caveat", "Segoe Print", "Bradley Hand", cursive;
  font-weight: 700; font-size: 1.45rem; line-height: 1;
  white-space: nowrap; color: var(--lime-deep);
  transform: rotate(-5deg) translate(3px, 8px);
}
.scribble-path, .scribble-head { stroke-dasharray: 260; stroke-dashoffset: 260; }
.scribble-path { animation: scribble-draw 1.1s .6s ease-out forwards; }
.scribble-head { animation: scribble-draw .3s 1.6s ease-out forwards; }
.scribble-text { opacity: 0; animation: scribble-fade .4s 1.7s ease-out forwards; }
@keyframes scribble-draw { to { stroke-dashoffset: 0; } }
@keyframes scribble-fade { to { opacity: 1; } }
@media (max-width: 720px) { .scribble { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .scribble-path, .scribble-head { stroke-dashoffset: 0; }
  .scribble-text { opacity: 1; }
}

.hero-scroll {
  position: absolute; bottom: 2.2rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  font-size: .72rem; letter-spacing: .25em; text-transform: uppercase; color: var(--ink-2);
}
.hero-scroll .bar { width: 2px; height: 46px; background: var(--ink); animation: scrollpulse 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes scrollpulse { 0%,100%{transform:scaleY(.4);opacity:.4} 50%{transform:scaleY(1);opacity:1} }

/* ── ABOUT ───────────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: minmax(240px,360px) 1fr;
  gap: clamp(2rem,5vw,4rem); align-items: start;
}
.avatar-wrap {
  position: relative;
  width: 100%;
  max-width: 360px;
  perspective: 1000px;
  transform-style: preserve-3d;
}
.avatar {
  position: relative; z-index: 1;
  width: 100%; aspect-ratio: 1 / 1.18; object-fit: cover;
  object-position: 50% 20%;
  border: 2.5px solid var(--ink); border-radius: 0;
  background: var(--cream-2);
  box-shadow: 8px 8px 0 var(--ink);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
  will-change: transform;
}
.avatar-wrap:hover .avatar {
  box-shadow: 12px 14px 0 var(--ink);
}
.about-copy p { font-size: clamp(1.05rem,1.7vw,1.4rem); line-height: 1.65; margin-bottom: 1.2rem; }
.about-copy p:last-child { margin-bottom: 0; }
.about-facts { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.6rem; padding-bottom: 4px; }
.fact {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: .42rem .95rem;
  font-size: .92rem;
  background: var(--cream);
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow .18s ease, background .18s ease;
  user-select: none;
}
.fact:hover {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
  background: var(--cream-2);
}
.fact b { font-weight: 600; }

/* ── EDUCATION ───────────────────────────────────────────────────── */
.edu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.edu-card {
  border-top: 2px solid var(--ink);
  padding: clamp(1.4rem,3vw,2rem) 0 0;
}
.edu-card-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.2rem; }
.edu-card-head img { width: 60px; height: 60px; object-fit: contain; border-radius: 8px; flex-shrink: 0; }
.edu-card-head img.edu-logo-uiuc,
.edu-card-head img[src*="uiuclogo"] {
  width: 78px;
  height: 78px;
  margin: 0 -0.35rem;
}
.edu-card-head .type { font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.edu-card-head h3 { font-family: var(--display); font-size: clamp(0.95rem,1.4vw,1.2rem); line-height: 1.15; margin-top: .2rem; }
.edu-body p { font-size: .97rem; line-height: 1.55; color: var(--ink-2); margin-bottom: .5rem; }
.edu-body p strong { color: var(--ink); }
.edu-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .9rem; }
.edu-chip { background: var(--lime); color: var(--ink); font-size: .78rem; font-weight: 600; padding: .2rem .65rem; border-radius: 999px; border: 1.5px solid var(--lime-deep); }
.edu-chip a { color: inherit; }
.edu-highlights { margin-top: 1rem; border-top: 2px solid var(--cream-2); padding-top: .9rem; }
.edu-highlights li { font-size: .88rem; color: var(--ink-2); padding: .22rem 0 .22rem 1.2rem; position: relative; }
.edu-highlights li::before { content: "→"; position: absolute; left: 0; color: var(--persimmon); font-weight: 700; }

/* ── TECH STACK ──────────────────────────────────────────────────── */
.tech-intro { font-size: clamp(1.05rem,1.6vw,1.35rem); color: var(--ink-2); margin-top: -.6rem; margin-bottom: 1.8rem; max-width: 46ch; }
.tech-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.35rem;
  padding: 8px 6px 20px 2px;
}
.tech, .tech-tile {
  position: relative;
  width: 98px;
  height: 98px;
  border-radius: 50%;
  background: var(--cream);
  border: 2.5px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transform: scale(0.2) translateY(24px);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.15s ease,
              background 0.15s ease,
              opacity 0.35s ease;
}

.tech-grid.in .tech-tile,
.in .tech-grid .tech-tile,
.tech-tile.in {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.tech-tile:hover {
  transform: scale(1.12) translateY(-4px) !important;
  box-shadow: 6px 8px 0 var(--ink);
  background: var(--cream-2);
  z-index: 10;
}
.tech-tile:active {
  transform: scale(0.96) translate(2px, 2px) !important;
  box-shadow: 2px 2px 0 var(--ink);
}

.tech img, .tech-tile img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  transition: transform 0.2s ease;
}
.tech-tile:hover img { transform: scale(1.08); }
.tech .ph, .tech-tile .ph { width: 54px; height: 54px; display: grid; place-items: center; font-family: var(--display); font-size: 1.8rem; }

/* Floating label above circle */
.tech-tile::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--ink);
  color: var(--cream);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: .02em;
  padding: 0.28rem 0.75rem;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
  box-shadow: 2px 2px 0 var(--ink-faint);
  z-index: 20;
}
.tech-tile::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  border-width: 5px 5px 0 5px;
  border-style: solid;
  border-color: var(--ink) transparent transparent transparent;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 20;
}
.tech-tile:hover::after,
.tech-tile:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── EXPERIENCE ──────────────────────────────────────────────────── */
.xp-list { display: flex; flex-direction: column; gap: 1.4rem; }
.xp {
  border-top: 2px solid var(--ink);
  padding: clamp(1.4rem,3vw,2.2rem) 0 0;
}
.xp-top { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: baseline; margin-bottom: .9rem; }
.xp-role { font-family: var(--display); font-size: clamp(1.15rem,1.8vw,1.55rem); line-height: 1.15; }
.xp-org { font-weight: 500; color: var(--ink-2); margin-top: .25rem; }
.xp-org a { border-bottom: 1.5px solid var(--lime-deep); }
.xp-time { font-size: .8rem; font-weight: 600; white-space: nowrap; letter-spacing: .12em; text-transform: uppercase; color: var(--lime-deep); }
.xp-desc { font-size: 1rem; line-height: 1.6; color: var(--ink-2); margin: 0; }
.xp-desc strong {
  background: none; padding: 0; font-weight: 600; color: var(--ink);
  border-bottom: none;
}
.xp-desc strong.num {
  border-bottom: 0; font-weight: 700; padding: 0;
  background: none;
}
.xp ul { display: flex; flex-direction: column; gap: .55rem; }
.xp ul li { position: relative; padding-left: 1.4rem; font-size: 1rem; line-height: 1.55; }
.xp ul li::before { content: "→"; position: absolute; left: 0; color: var(--persimmon); font-weight: 700; }
.xp ul li strong {
  background: none; padding: 0; font-weight: 600; color: var(--ink);
  border-bottom: none;
}
.xp ul li strong.num {
  border-bottom: 0; font-weight: 700; padding: 0;
  background: none;
}
.strip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.6rem;
  margin-bottom: .6rem;
}
.strip-label {
  font-size: .84rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-2);
}
.strip-toggle-btn {
  font-family: inherit;
  font-size: .8rem;
  font-weight: 600;
  background: var(--cream-2);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: .24rem .8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  transition: all .2s ease;
  box-shadow: 2px 2px 0 var(--ink);
}
.strip-toggle-btn:hover {
  background: var(--lime);
  transform: translateY(-1px);
  box-shadow: 3px 3px 0 var(--ink);
}
.strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.2rem;
  margin-top: .8rem;
}
.strip img {
  width: 100%;
  height: clamp(300px, 32vw, 440px);
  border-radius: 14px;
  object-fit: cover;
  background: var(--cream-2);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  cursor: zoom-in;
  transition: transform .25s ease, box-shadow .25s ease;
}
.strip img:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 6px 6px 0 var(--ink);
}
/* Large expanded view */
.strip.strip--large {
  grid-template-columns: 1fr;
  gap: 2rem;
}
.strip.strip--large img {
  height: clamp(400px, 55vw, 680px);
  object-fit: contain;
  background: var(--ink);
}
/* Solo screenshot view */
.strip.strip--solo {
  grid-template-columns: 1fr;
  max-width: 100%;
}
.strip.strip--solo img {
  height: auto;
  max-height: 480px;
  object-fit: cover;
  object-position: top center;
  background: var(--ink);
}

/* SignEd reconstruction clips: keep each clip's aspect ratio (no crop) */
.strip-recon-label {
  margin-top: 1.6rem;
  margin-bottom: 0;
  text-transform: none;
  letter-spacing: .01em;
}
.strip.strip--recon {
  gap: .8rem;
}
.strip.strip--recon-mesh {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.strip-recon-video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.strip--recon-mesh .strip-recon-video { background: #a9a9a9; }

/* ── BANNER VIDEO SHOWCASE (Pacific Demo) ────────────────────────── */
.strip--video {
  margin-top: 1rem;
}

.video-banner-wrap {
  position: relative;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .25s ease, box-shadow .25s ease;
}

.video-banner-wrap:hover {
  transform: translateY(-2px);
  box-shadow: 6px 6px 0 var(--ink);
}

.proj-banner-video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: cover;
  object-position: top center;
  background: var(--ink);
  margin: 0;
  cursor: pointer;
}

.dd-banner-frame {
  position: relative;
  background: var(--ink);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 6px 6px 0 var(--ink);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
  cursor: default;
}

.dd-banner-frame:hover {
  transform: translateY(-2px);
  box-shadow: 8px 8px 0 var(--ink);
}

.dd-banner-video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: cover;
  background: var(--ink);
  cursor: pointer;
}

.video-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(17, 17, 16, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--lime);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  border: 1.5px solid rgba(228, 254, 86, 0.7);
  pointer-events: none;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  user-select: none;
}

.video-badge::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

/* ── LIVE PREVIEW (iframe embed) ─────────────────────────────────── */
.live-preview {
  margin-top: 1.2rem;
  border: 2px solid var(--ink); border-radius: 14px;
  overflow: hidden;
}
.live-preview-bar {
  display: flex; align-items: center; gap: .5rem;
  padding: .5rem .85rem;
  background: var(--cream-2); border-bottom: 2px solid var(--ink);
}
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-faint); border: 1.5px solid var(--ink); flex-shrink: 0; }
.live-dot:nth-child(1) { background: #ff5f57; border-color: #e0443e; }
.live-dot:nth-child(2) { background: #febc2e; border-color: #d4a017; }
.live-dot:nth-child(3) { background: #28c840; border-color: #1aab29; }
.live-url { flex: 1; font-size: .8rem; color: var(--ink-2); text-align: center; font-weight: 500; letter-spacing: .01em; }
.live-open { font-size: .78rem; font-weight: 600; color: var(--ink); border: 1.5px solid var(--ink); border-radius: 999px; padding: .15rem .6rem; transition: background .18s; }
.live-open:hover { background: var(--lime); }
.live-preview iframe {
  width: 100%; height: 420px;
  border: none; display: block;
  background: var(--cream-2);
}

/* ── PROJECTS ────────────────────────────────────────────────────── */
.proj-intro { font-size: clamp(1.05rem,1.6vw,1.35rem); color: var(--ink-2); margin-top: -.6rem; margin-bottom: 1.8rem; max-width: 50ch; }
.proj-list { display: flex; flex-direction: column; gap: clamp(2rem,5vw,3.4rem); }
.proj {
  display: block;
  border-top: 2px solid var(--ink);
  padding-top: clamp(1.4rem,3vw,2.2rem);
}
.proj-head { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-bottom: .3rem; }
.proj-head h3 { font-family: var(--display); font-size: clamp(1.25rem,2.2vw,1.85rem); line-height: 1.15; font-weight: 400; }
.proj-head .logo { height: 3.1rem; width: auto; object-fit: contain; flex-shrink: 0; }
.proj-head .logo--admitarc,
.proj-head img[src*="admitarc"] { height: 2.35rem; }
.proj-logo-link {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  flex-shrink: 0;
  text-decoration: none;
  transition: transform .15s ease, opacity .15s ease;
}
.proj-logo-link:hover {
  transform: scale(1.05);
  opacity: .88;
}
.badge { font-size: .76rem; font-weight: 600; letter-spacing: .02em; border: 2px solid var(--ink); border-radius: 999px; padding: .2rem .7rem; background: var(--lime); }
.proj-links { display: flex; gap: .5rem; margin-left: auto; flex-wrap: wrap; }
.proj-links a,
.proj-links button {
  font-family: inherit; font-size: .82rem; font-weight: 600;
  border: 2px solid var(--ink); border-radius: 999px;
  padding: .25rem .8rem; transition: background .2s, color .2s, transform .15s;
  background: transparent; color: var(--ink);
  cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
}
.proj-links a:hover,
.proj-links button:hover { background: var(--lime); }
.proj-time { font-size: .88rem; color: var(--ink-2); font-weight: 500; margin-bottom: .7rem; }
.proj-desc { font-size: 1rem; line-height: 1.6; color: var(--ink-2); margin-bottom: 1rem; }
.proj-desc strong {
  background: none; padding: 0; font-weight: 600; color: var(--ink);
  border-bottom: none;
}
.proj-desc strong.num {
  border-bottom: 0; font-weight: 700; padding: 0;
  background: none;
}
.proj-body ul { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1rem; }
.proj-body ul li { position: relative; padding-left: 1.4rem; line-height: 1.55; }
.proj-body ul li::before { content: "→"; position: absolute; left: 0; color: var(--persimmon); font-weight: 700; }
.proj-body ul li strong {
  background: none; padding: 0; font-weight: 600; color: var(--ink);
  border-bottom: none;
}
.proj-body ul li strong.num {
  border-bottom: 0; font-weight: 700; padding: 0;
  background: none;
}
.proj-body code { font-family: ui-monospace,"SF Mono",Menlo,monospace; font-size: .85em; background: var(--cream-2); border: 1px solid var(--ink-faint); padding: 0 .3em; border-radius: 4px; }
.tech-chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.tech-chips span { font-size: .8rem; font-weight: 500; border: 1.5px solid var(--ink); border-radius: 999px; padding: .22rem .7rem; background: var(--cream); }

/* ── SKILLS ──────────────────────────────────────────────────────── */
.trio { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.2rem; }
.glass {
  border-top: 2px solid var(--ink);
  padding: 1.4rem 0 0;
}
.glass--accent .kicker { color: var(--lime-deep); }
.kicker { font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); margin-bottom: .5rem; }
.glass h3 { font-family: var(--display); font-size: 1.2rem; margin-bottom: 1rem; }
.glass p { font-size: .9rem; line-height: 1.6; color: var(--ink-2); margin-bottom: .5rem; }
.glass--accent p { color: var(--ink-2); }
.glass--accent h3 { color: var(--ink); }
.sk-row { display: grid; grid-template-columns: 90px 1fr; gap: .4rem; font-size: .88rem; line-height: 1.5; padding: .4rem 0; border-bottom: 1px solid var(--ink-faint); color: var(--ink-2); }
.sk-row strong { color: var(--ink); }
.pills { display: flex; flex-wrap: wrap; gap: .4rem; }
.pills li { font-size: .8rem; font-weight: 500; border: 1.5px solid var(--ink); border-radius: 4px; padding: .2rem .6rem; color: var(--ink-2); }
.awards-list { display: flex; flex-direction: column; gap: .6rem; }
.awards-list li { display: flex; align-items: baseline; gap: .55rem; font-size: .88rem; color: var(--ink-2); }
.awards-list li a { color: var(--lime-deep); border-bottom: 1.5px solid var(--lime-deep); }
.awards-list em { color: var(--ink-2); font-style: normal; }
.snapshot { display: flex; flex-direction: column; gap: .9rem; }
.snapshot li { display: flex; align-items: flex-start; gap: .8rem; }
.snapshot li span { font-size: 1.1rem; flex-shrink: 0; }
.snapshot li div { font-size: .9rem; line-height: 1.5; color: oklch(96.5% 0.012 95 / .75); }
.snapshot li strong { color: var(--cream); display: block; margin-bottom: .1rem; }

/* ── CONTACT ─────────────────────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem,5vw,4rem); align-items: start; }
.contact-copy p { font-size: clamp(1.1rem,1.8vw,1.5rem); line-height: 1.5; margin-bottom: 1.6rem; }
.contact-copy .small { font-size: 1rem; color: var(--ink-2); }
.contact-copy .small a { border-bottom: 2px solid var(--lime-deep); font-weight: 500; }
.socials { display: flex; flex-direction: column; gap: .7rem; margin-top: 1.8rem; }
.socials a { display: flex; align-items: center; gap: .8rem; border-bottom: 1.5px solid var(--ink-faint); padding: .9rem 0; transition: color .18s; }
.socials a:hover { color: var(--lime-deep); }
.socials .ci { font-family: var(--display); width: 1.8rem; text-align: center; font-size: 1.1rem; }
.socials .cl { font-size: .76rem; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-2); display: block; }
.socials .cv { font-weight: 500; }
.cform { display: flex; flex-direction: column; gap: 1.6rem; }
.cfield { position: relative; }
.cfield input, .cfield textarea {
  width: 100%; font-family: var(--display);
  font-size: clamp(1.2rem,2.2vw,1.7rem);
  color: var(--ink); background: transparent;
  border: none; border-bottom: 2px solid var(--ink);
  padding: .4rem 0; resize: none;
}
.cfield textarea { line-height: 1.3; }
.cfield input::placeholder, .cfield textarea::placeholder { color: oklch(20% 0.012 80 / .35); }
.cfield input:focus, .cfield textarea:focus { outline: none; border-bottom-color: var(--persimmon); }
.cform .btn { align-self: flex-start; font-family: var(--display); font-size: 1.2rem; padding: .6rem 2rem; }
.cform-status { min-height: 1.2em; margin: 0; font-size: .9rem; }
.cform-status.is-ok { color: oklch(52% 0.15 150); }
.cform-status.is-err { color: var(--persimmon); }

/* ── FOOTER ──────────────────────────────────────────────────────── */
.footer {
  max-width: var(--maxw); margin: 0 auto;
  padding: 2.4rem clamp(1.4rem,5vw,3.5rem) 3rem;
  border-top: 2px solid var(--ink);
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  font-size: .9rem; color: var(--ink-2);
}
.footer .brand { font-family: var(--display); font-size: 1.1rem; color: var(--ink); }

/* ── RESPONSIVE ──────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .avatar-wrap { max-width: 280px; margin: 0 auto 1rem; }
  .edu-grid { grid-template-columns: 1fr; }
  .trio { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .proj { grid-template-columns: 1fr; gap: .4rem; }
}
@media (max-width: 560px) {
  .nav { width: calc(100vw - 1rem); }
  .nav-inner { justify-content: space-between; padding: .4rem .45rem; gap: .1rem; }
  .nav a { padding: .3rem .42rem; font-size: .82rem; }
  .section--hero h1 .hl-line { flex-wrap: wrap; }
  .hero-sub { margin-top: .3em; }
  .xp-top { flex-direction: column; }
  .tech, .tech-tile { width: 78px; height: 78px; }
  .tech img, .tech-tile img { width: 44px; height: 44px; }
  .tech-grid { gap: 0.9rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: .01ms !important; }
  .reveal, .sec-head .ch { opacity: 1 !important; transform: none !important; }
}

/* ── LIGHTBOX ────────────────────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(18, 18, 16, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 1rem;
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
  cursor: default;
}
.lightbox.open { opacity: 1; pointer-events: all; }
.lightbox-wrap {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  max-width: min(96vw, 1500px);
  max-height: 92vh;
  width: 100%;
}
.lightbox-img-box {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  max-width: 100%;
  max-height: 80vh;
  overflow: hidden;
  border-radius: 14px;
}
.lightbox img {
  max-width: min(94vw, 1400px); max-height: 80vh;
  width: auto; height: auto;
  object-fit: contain;
  border: 2px solid var(--ink); border-radius: 14px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, .75);
  transform: scale(.95);
  transition: transform .25s cubic-bezier(.2,.8,.2,1);
  cursor: zoom-in;
  user-select: none;
}
.lightbox.open img { transform: scale(1); }
.lightbox.is-zoomed img {
  max-width: none;
  max-height: none;
  transform: scale(1.6);
  cursor: zoom-out;
}
.lightbox-close {
  position: absolute; top: 1.2rem; right: 1.4rem;
  font-family: var(--display); font-size: 1.5rem;
  color: var(--cream); background: var(--ink);
  border: 2px solid var(--cream); border-radius: 999px;
  width: 2.8rem; height: 2.8rem;
  display: grid; place-items: center;
  cursor: pointer; line-height: 1;
  transition: background .18s, color .18s, transform .18s;
  z-index: 10005;
  box-shadow: 2px 2px 0 var(--cream);
}
.lightbox-close:hover { background: var(--lime); color: var(--ink); border-color: var(--ink); transform: scale(1.08); }

.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: var(--cream); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 999px;
  width: 3.4rem; height: 3.4rem;
  display: grid; place-items: center;
  font-size: 1.6rem; font-weight: 700;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
  transition: all .18s ease;
  z-index: 10005;
}
.lightbox-nav:hover {
  background: var(--lime);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 4px 4px 0 var(--ink);
}
.lightbox-prev { left: 1.2rem; }
.lightbox-next { right: 1.2rem; }

.lightbox-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-top: .85rem;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: .4rem 1.2rem;
  font-size: .88rem; font-weight: 600;
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  max-width: 90vw;
  flex-wrap: wrap;
}
.lightbox-caption {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 50vw;
}
.lightbox-counter {
  background: var(--lime);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: .15rem .55rem;
  font-size: .78rem;
}
.lightbox-zoom-toggle {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: .84rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: .3rem;
}
.lightbox-zoom-toggle:hover { color: var(--persimmon); }

@media (max-width: 680px) {
  .lightbox-nav { width: 2.6rem; height: 2.6rem; font-size: 1.2rem; }
  .lightbox-prev { left: .4rem; }
  .lightbox-next { right: .4rem; }
  .lightbox-close { top: .8rem; right: .8rem; width: 2.4rem; height: 2.4rem; font-size: 1.2rem; }
  .strip.strip--large img { height: 320px; }
  .lightbox-caption { max-width: 40vw; }
}

/* ── DEEP DIVE ARTICLE PAGES ─────────────────────────────────────── */
.dd-page {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(4.5rem, 8vw, 7rem) 1.5rem clamp(3rem, 6vw, 5rem);
}
.dd-back-link {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .88rem; font-weight: 600;
  color: var(--ink);
  margin-bottom: 2rem;
  padding: .35rem .95rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--cream-2);
  transition: all .2s ease;
  text-decoration: none;
  box-shadow: 2px 2px 0 var(--ink);
}
.dd-back-link:hover {
  background: var(--lime);
  transform: translateX(-3px);
  box-shadow: 3px 3px 0 var(--ink);
}
.dd-header {
  margin-bottom: 2.6rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--ink);
}
.dd-kicker {
  font-size: .82rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--lime-deep);
  margin-bottom: .6rem;
}
.dd-title-lockup {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  margin-bottom: 1.2rem;
}
.dd-title-lockup .dd-title {
  margin-bottom: 0;
  flex: 1;
  min-width: 0;
}
.dd-header-logo {
  width: clamp(5.2rem, 9vw, 7.2rem);
  height: clamp(5.2rem, 9vw, 7.2rem);
  max-width: none;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.08));
}
@media (max-width: 560px) {
  .dd-title-lockup {
    gap: 1.1rem;
  }
  .dd-header-logo {
    width: clamp(3.8rem, 14vw, 4.8rem);
    height: clamp(3.8rem, 14vw, 4.8rem);
  }
}
.dd-title {
  font-family: var(--display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.15; font-weight: 800;
  margin-bottom: 1rem;
  color: var(--ink);
}
.dd-subtitle {
  font-size: clamp(1.08rem, 2vw, 1.25rem);
  line-height: 1.6;
  color: var(--ink-2);
  margin-bottom: 1.4rem;
}
.dd-meta-grid {
  display: flex; flex-wrap: wrap; gap: .55rem;
  align-items: center;
}
.dd-meta-chip {
  font-size: .82rem; font-weight: 600;
  background: var(--cream-2);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: .28rem .8rem;
  color: var(--ink);
}
.dd-actions-bar {
  display: flex; gap: .7rem; flex-wrap: wrap;
  margin-top: 1.4rem;
}
.dd-btn {
  font-size: .86rem; font-weight: 600;
  border: 2px solid var(--ink); border-radius: 999px;
  padding: .4rem 1.1rem;
  background: var(--cream-2); color: var(--ink);
  display: inline-flex; align-items: center; gap: .35rem;
  transition: all .2s ease;
  box-shadow: 2.5px 2.5px 0 var(--ink);
  text-decoration: none;
}
.dd-btn:hover {
  background: var(--lime);
  transform: translateY(-2px);
  box-shadow: 4px 4px 0 var(--ink);
}
.dd-btn--primary {
  background: var(--persimmon);
}
.dd-btn--primary:hover {
  background: var(--lime);
}

/* ── Deep Dive Table of Contents ── */
.dd-toc {
  background: var(--cream-2);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--ink);
  padding: 1.15rem 1.35rem 1.25rem;
  margin-top: 1.6rem;
}
.dd-toc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  padding-bottom: .75rem;
  margin-bottom: .85rem;
  border-bottom: 1.5px dashed var(--ink-faint);
}
.dd-toc-title {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--display);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.01em;
}
.dd-toc-icon {
  font-size: 1rem;
  line-height: 1;
}
.dd-toc-grid {
  display: flex;
  gap: 1.4rem;
}
.dd-toc-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.dd-toc-item {
  display: flex;
  flex-direction: column;
}
.dd-toc-link {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  padding: .4rem .55rem;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
  line-height: 1.4;
  transition: all .15s ease;
}
.dd-toc-link:hover {
  background: var(--cream);
  color: var(--ink);
  transform: translateX(3px);
}
.dd-toc-num {
  font-family: 'JetBrains Mono', Consolas, Menlo, monospace;
  font-size: .76rem;
  font-weight: 700;
  color: var(--lime-deep);
  letter-spacing: .02em;
  flex-shrink: 0;
}
.dd-toc-text {
  flex: 1;
}
.dd-toc-sublist {
  padding: .15rem 0 .25rem 1.95rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.dd-toc-sublink {
  font-size: .8rem;
  color: var(--ink-2);
  text-decoration: none;
  line-height: 1.35;
  transition: all .15s ease;
  display: inline-block;
}
.dd-toc-sublink:hover {
  color: var(--lime-deep);
  transform: translateX(2px);
}

@media (max-width: 640px) {
  .dd-toc-grid {
    flex-direction: column;
    gap: .35rem;
  }
  .dd-toc {
    padding: 1rem 1.05rem;
  }
}


/* ── Deep Dive Hero Visual ── */
.dd-hero {
  margin: 2.2rem 0 3.2rem;
}
.dd-hero-frame {
  position: relative;
  background: var(--ink);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 6px 6px 0 var(--ink);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
  cursor: zoom-in;
}
.dd-hero-frame:hover {
  transform: translateY(-2px);
  box-shadow: 8px 8px 0 var(--ink);
}
.dd-hero-img {
  display: block;
  width: 100%;
  height: auto;
}
.dd-hero-caption {
  font-size: .88rem;
  line-height: 1.6;
  color: var(--ink-2);
  margin-top: .85rem;
  padding: 0 .4rem;
}
.dd-hero-caption strong {
  color: var(--ink);
}

.dd-content {
  font-size: 1.06rem;
  line-height: 1.78;
  color: var(--ink);
}
.dd-section {
  margin-bottom: 3.2rem;
}
.dd-section h2 {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3.2vw, 2.15rem);
  line-height: 1.2; font-weight: 700;
  margin: 2.2rem 0 .9rem;
  color: var(--ink);
  padding-bottom: .4rem;
  border-bottom: 1.5px solid var(--ink-faint);
}
.dd-section h3 {
  font-family: var(--display);
  font-size: 1.35rem; font-weight: 700;
  margin: 1.6rem 0 .6rem;
  color: var(--ink);
}
.dd-section p {
  margin-bottom: 1.2rem;
  color: var(--ink-2);
}
.dd-section p strong {
  color: var(--ink);
}
.dd-section ul, .dd-section ol {
  margin: 1rem 0 1.5rem;
  padding-left: 0;
  list-style: none;
  display: flex; flex-direction: column; gap: .6rem;
}
.dd-section ul li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--ink-2);
  line-height: 1.65;
}
.dd-section ul li strong {
  color: var(--ink);
}
.dd-section ul li::before {
  content: "→";
  position: absolute; left: 0;
  color: var(--lime-deep);
  font-weight: 700;
}
.dd-callout {
  background: var(--cream-2);
  border: 2px solid var(--ink);
  border-left: 6px solid var(--lime);
  border-radius: var(--radius);
  padding: 1.25rem 1.6rem;
  margin: 1.8rem 0;
  box-shadow: 4px 4px 0 var(--ink-faint);
}
.dd-callout-title {
  font-family: var(--display);
  font-size: 1.15rem; font-weight: 700;
  margin-bottom: .4rem;
  color: var(--ink);
}
.dd-callout p {
  margin-bottom: 0;
  color: var(--ink-2);
  font-size: 1rem;
}
.dd-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2rem;
  margin: 2rem 0;
}
.dd-stat-card {
  background: var(--cream-2);
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 1.2rem 1.4rem;
  box-shadow: 3px 3px 0 var(--ink);
}
.dd-stat-num {
  font-family: var(--display);
  font-size: 2.2rem; font-weight: 800;
  line-height: 1;
  color: var(--lime-deep);
  margin-bottom: .3rem;
}
.dd-stat-label {
  font-size: .88rem; font-weight: 600;
  color: var(--ink);
}
.dd-stat-sub {
  font-size: .78rem;
  color: var(--ink-2);
  margin-top: .2rem;
}
.dd-code-block {
  background: var(--ink);
  color: var(--cream);
  border-radius: 14px;
  padding: 1.2rem 1.4rem;
  margin: 1.5rem 0;
  overflow-x: auto;
  white-space: pre;
  font-family: "JetBrains Mono", Consolas, Menlo, monospace;
  font-size: .88rem;
  line-height: 1.6;
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink-faint);
}

/* ── VISUAL ARCHITECTURE FLOW DIAGRAMS ───────────────────────────── */
.dd-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .85rem;
  margin: 2.2rem 0;
  padding: 1.8rem 1.4rem;
  background: var(--cream-2);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--ink-faint);
}
.dd-flow-node {
  width: 100%;
  max-width: 680px;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 1.05rem 1.35rem;
  box-shadow: 3px 3px 0 var(--ink);
  text-align: center;
  transition: transform .18s ease, box-shadow .18s ease;
}
.dd-flow-node:hover {
  transform: translateY(-2px);
  box-shadow: 4px 4px 0 var(--ink);
}
.dd-flow-node--primary {
  background: var(--cream);
  border-left: 6px solid var(--persimmon);
}
.dd-flow-node--accent {
  background: var(--cream);
  border-left: 6px solid var(--lime-deep);
}
.dd-flow-node--dark {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}
.dd-flow-node--dark .dd-flow-title {
  color: var(--cream);
}
.dd-flow-node--dark .dd-flow-desc {
  color: oklch(85% 0.01 80);
}
.dd-flow-tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .15rem .55rem;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: var(--lime);
  color: var(--ink);
  margin-bottom: .4rem;
}
.dd-flow-title {
  font-family: var(--display);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: .3rem;
  line-height: 1.3;
}
.dd-flow-desc {
  font-size: .88rem;
  color: var(--ink-2);
  line-height: 1.5;
}
.dd-flow-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
  font-weight: 700;
  user-select: none;
}
.dd-flow-arrow span {
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-2);
  margin-bottom: .2rem;
}
.dd-flow-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  width: 100%;
  max-width: 680px;
}
@media (max-width: 640px) {
  .dd-flow-split {
    grid-template-columns: 1fr;
  }
}
.dd-flow-split .dd-flow-node {
  max-width: 100%;
  text-align: left;
}
.dd-flow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: .85rem;
  width: 100%;
  max-width: 720px;
}
.dd-flow-grid .dd-flow-node {
  max-width: 100%;
  text-align: left;
  padding: .85rem 1.05rem;
}
.dd-formula-box {
  background: var(--cream-2);
  border: 2px solid var(--ink);
  border-left: 6px solid var(--persimmon);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  margin: 1.4rem 0;
  box-shadow: 4px 4px 0 var(--ink-faint);
  overflow-x: hidden;
  max-width: 100%;
}
.dd-formula-box .katex-display {
  margin: .35rem 0;
  overflow: visible;
  font-size: clamp(.8rem, 2vw, .98rem);
}
.dd-formula-box .katex {
  white-space: normal;
}
.dd-formula-title {
  font-family: var(--display);
  font-size: 1.12rem;
  font-weight: 700;
  margin-bottom: .6rem;
  color: var(--ink);
}
.dd-formula-code {
  display: block;
  font-family: "JetBrains Mono", Consolas, Menlo, monospace;
  font-size: .95rem;
  font-weight: 600;
  color: var(--ink);
  padding: .65rem .85rem;
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  margin: .6rem 0 1rem;
  line-height: 1.6;
}
.dd-spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: .92rem;
}
.dd-spec-table th, .dd-spec-table td {
  padding: .7rem .95rem;
  border: 1.5px solid var(--ink);
  text-align: left;
}
.dd-spec-table th {
  background: var(--cream-2);
  font-weight: 700;
  color: var(--ink);
}
.dd-spec-table td {
  background: var(--cream);
  color: var(--ink-2);
}
.dd-badge {
  display: inline-block;
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .2rem .55rem;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: var(--lime);
  color: var(--ink);
  margin-right: .35rem;
}

/* ── COLLAPSIBLE TECHNICAL SPECIFICATION DRAWER ─────────────────── */
details.dd-tech-collapsible {
  background: var(--cream-2);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius);
  margin: 2.8rem 0;
  box-shadow: 5px 5px 0 var(--ink);
  overflow: hidden;
  transition: box-shadow .2s ease;
}
details.dd-tech-collapsible[open] {
  box-shadow: 7px 7px 0 var(--ink);
}
summary.dd-tech-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  padding: 1.5rem 1.8rem;
  cursor: pointer;
  user-select: none;
  list-style: none;
  background: var(--cream-2);
  transition: background .2s ease;
}
summary.dd-tech-summary::-webkit-details-marker {
  display: none;
}
summary.dd-tech-summary:hover {
  background: var(--cream);
}
details.dd-tech-collapsible[open] summary.dd-tech-summary {
  border-bottom: 2px solid var(--ink);
  background: var(--cream);
}
.dd-tech-summary-left {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.dd-tech-summary-title {
  font-family: var(--display);
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}
.dd-tech-summary-sub {
  font-size: .92rem;
  color: var(--ink-2);
  margin: 0;
  line-height: 1.5;
}
.dd-tech-toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .86rem;
  font-weight: 700;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: .45rem 1.15rem;
  background: var(--lime);
  color: var(--ink);
  box-shadow: 2.5px 2.5px 0 var(--ink);
  flex-shrink: 0;
  transition: all .2s ease;
}
details.dd-tech-collapsible[open] .dd-tech-toggle-pill {
  background: var(--persimmon);
}
.dd-tech-toggle-icon {
  font-size: 1.1rem;
  transition: transform .25s ease;
  line-height: 1;
}
details.dd-tech-collapsible[open] .dd-tech-toggle-icon {
  transform: rotate(180deg);
}
.dd-tech-body {
  padding: 1.8rem 1.8rem 2.2rem;
  background: var(--cream);
  font-size: .94rem;
  line-height: 1.65;
}
.dd-tech-body .dd-section {
  margin-bottom: 2.2rem;
}
.dd-tech-body .dd-section h2,
.dd-tech-body h2 {
  font-size: clamp(1.15rem, 2.2vw, 1.35rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: .65rem;
  color: var(--ink);
}
.dd-tech-body .dd-section h3,
.dd-tech-body h3 {
  font-size: 1.02rem;
  font-weight: 700;
  margin-top: 1.2rem;
  margin-bottom: .45rem;
  color: var(--ink);
}
.dd-tech-body p {
  font-size: .94rem;
  line-height: 1.65;
  margin-bottom: .85rem;
}
.dd-tech-body ul,
.dd-tech-body ol {
  font-size: .91rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}
.dd-tech-body li {
  margin-bottom: .35rem;
}
.dd-tech-body .dd-flow {
  margin: 1.4rem auto;
}
.dd-tech-body .dd-flow-title {
  font-size: .96rem;
}
.dd-tech-body .dd-flow-desc {
  font-size: .82rem;
  line-height: 1.45;
}
.dd-tech-body .dd-flow-tag {
  font-size: .68rem;
  padding: .15rem .45rem;
}
.dd-tech-body .dd-flow-arrow {
  font-size: 1.15rem;
}
.dd-tech-body .dd-flow-arrow span {
  font-size: .68rem;
}
.dd-tech-body .dd-formula-box {
  padding: 1rem 1.25rem;
  margin: 1.4rem 0;
  font-size: .92rem;
}
.dd-tech-body .dd-formula-title {
  font-size: 1.02rem;
  margin-bottom: .45rem;
}
.dd-tech-body .dd-formula-code {
  font-size: .86rem;
  padding: .5rem .75rem;
  line-height: 1.5;
}
.dd-tech-body .dd-spec-table {
  font-size: .86rem;
  margin: 1.2rem 0;
}
.dd-tech-body .dd-spec-table th,
.dd-tech-body .dd-spec-table td {
  padding: .55rem .75rem;
}
@media (max-width: 640px) {
  summary.dd-tech-summary {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.2rem 1.4rem;
  }
  .dd-tech-body {
    padding: 1.2rem 1.2rem 1.8rem;
  }
}
.dd-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}
.dd-gallery img {
  width: 100%; height: 200px;
  object-fit: cover;
  border: 2px solid var(--ink);
  border-radius: 12px;
  box-shadow: 3px 3px 0 var(--ink);
}
.dd-footer-nav {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 2px solid var(--ink);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}

/* ── DEEP DIVES HUB ───────────────────────────────────────────────── */
.dd-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin: 2.5rem 0 4rem;
}
.dd-card {
  background: var(--cream);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 6px 6px 0 var(--ink);
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
  position: relative;
}
.dd-card:hover {
  transform: translateY(-4px);
  box-shadow: 10px 10px 0 var(--ink);
}
.dd-card-tag {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--lime-deep);
  margin-bottom: .6rem;
}
.dd-card-header {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-bottom: .8rem;
}
.dd-card-header .dd-card-title {
  margin-bottom: 0;
  flex: 1;
  min-width: 0;
}
.dd-card-logo {
  height: 3.2rem;
  width: auto;
  max-width: 64px;
  object-fit: contain;
  flex-shrink: 0;
}
.dd-card-title {
  font-family: var(--display);
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: .8rem;
  color: var(--ink);
}
.dd-card-desc {
  font-size: .98rem;
  line-height: 1.65;
  color: var(--ink-2);
  margin-bottom: 1.4rem;
  flex-grow: 1;
}
.dd-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .8rem;
  padding-top: 1.2rem;
  border-top: 1.5px solid var(--ink-faint);
}


/* ─────────────────────────────────────────────────────────────────
   Refinements
   ───────────────────────────────────────────────────────────────── */

/* The nav is fixed, so an anchor jump used to bury the section heading
   underneath it. Push the scroll target clear of the nav pill. */
section[id] { scroll-margin-top: clamp(5.5rem, 9vw, 7rem); }

/* One lockup for every company / school mark. These were four different
   inline heights, so a square shield and a wide wordmark carried wildly
   different visual weight on the same line. */
.brand {
  display: inline-block;
  height: 1.3em; width: auto; max-width: 4.6em;
  object-fit: contain; object-position: left center;
  vertical-align: middle;
  position: relative;
  top: -0.12em;
  margin-right: .42em;
}

/* The icon grid degrades to a letter when the CDN is unreachable; make that
   fallback look deliberate rather than broken. */
.tech-tile .ph {
  place-items: center;
  width: 3.2rem; height: 3.2rem; margin: 0 auto;
  font-family: var(--display); font-size: 1.6rem; font-weight: 700;
  color: var(--ink-2);
  border: 1.5px solid oklch(20% 0.012 80 / .22);
  border-radius: 12px;
}

/* ─────────────────────────────────────────────────────────────────
   Elevation

   The palette declared --shadow (6px 6px 0) from the beginning and
   nothing ever used it; .btn even carries a box-shadow transition with
   no shadow to transition. This finishes that language: one hard offset
   shadow on every raised surface, and one "press" interaction — the
   element moves into its own shadow — shared with the search field.
   ───────────────────────────────────────────────────────────────── */

.xp, .proj, .edu-card {
  background: var(--cream);
  border: 2px solid var(--border);
  border-top: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.3rem, 2.6vw, 2rem);
  transition: opacity .8s cubic-bezier(0.16, 1, 0.3, 1),
              transform .8s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow .14s ease;
}
.xp:hover, .proj:hover, .edu-card:hover {
  transform: translate(3px, 3px);
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .14s ease, box-shadow .14s ease;
}



.btn { box-shadow: 4px 4px 0 var(--ink); }
.btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }

/* keep the shadows from being clipped where cards sit flush in a grid */
.edu-grid, .tech-grid { padding-right: 6px; padding-bottom: 6px; }
