/* =====================================================================
   Dustin Bloss — shared stylesheet
   Loaded by every page. Page-specific styles live in each page's <style>.

   Contents
     1. Tokens            6. Header, brand & nav      11. Carousel
     2. Base              7. Mobile drawer            12. Skill marquee
     3. Ambient backdrop  8. Surfaces & type         13. Sheet (modal)
     4. Layout            9. Buttons & chips          14. Footer
     5. Motion           10. Status & misc           15. Utilities
   ===================================================================== */


/* === SECTION: TOKENS === */
:root {
  color-scheme: dark;

  --bg: #0b0d17;
  --bg-elev: #0f111a;
  --surface: rgba(15, 23, 42, 0.5);
  --surface-strong: rgba(30, 41, 59, 0.92);
  --surface-sunk: rgba(2, 6, 23, 0.45);
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #ffffff;
  --text-2: #cbd5e1;
  --text-3: #94a3b8;
  --nav-active: #1e293b;
  --nyit-blue: #0052a5;
  --nyit-gold: #fdb913;

  --purple: #7c3aed;
  --violet: #a78bfa;
  --cyan: #38bdf8;
  --green: #22c55e;
  --amber: #f59e0b;
  --rose: #f472b6;
  --gold: #fdb913;
  --accent: var(--purple);
  --gradient: linear-gradient(135deg, #7c3aed 0%, #38bdf8 55%, #22c55e 100%);

  --radius-lg: 22px;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 20px 50px -24px rgba(0, 0, 0, 0.7);
  --shadow-pop: 0 30px 80px -20px rgba(0, 0, 0, 0.75);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;

  --header-h: 64px;
  --page-w: 1120px;
}

[data-theme="light"] {
  color-scheme: light;

  --bg: #fbfaf2;
  --bg-elev: #ffffff;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --surface-sunk: rgba(24, 24, 27, 0.03);
  --border: rgba(24, 24, 27, 0.08);
  --border-strong: rgba(24, 24, 27, 0.14);
  --text: #18181b;
  --text-2: #52525b;
  --text-3: #71717a;
  --nav-active: #ffffff;
  --nyit-gold: #b7791f;

  --violet: #6d28d9;
  --cyan: #0284c7;
  --green: #16a34a;
  --amber: #d97706;
  --rose: #db2777;
  --gold: #b7791f;

  --shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 16px 40px -24px rgba(24, 24, 27, 0.25);
  --shadow-pop: 0 30px 80px -24px rgba(24, 24, 27, 0.35);
}


/* === SECTION: BASE === */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font: 400 15.5px/1.6 var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.3s, color 0.3s, opacity 0.25s ease;
}

body.is-leaving { opacity: 0; }
body.is-locked { overflow: hidden; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: -0.022em;
  line-height: 1.15;
  font-weight: 700;
}

p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
strong { font-weight: 600; color: var(--text); }

::selection { background: rgba(124, 58, 237, 0.35); }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 8px;
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border: 3px solid var(--bg);
  border-radius: 999px;
}


/* === SECTION: AMBIENT BACKDROP (orbs + dot grid + particle canvas) === */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: radial-gradient(1000px 520px at 50% -12%, rgba(99, 102, 241, 0.16), rgba(56, 189, 248, 0.05) 45%, transparent 72%);
}

[data-theme="light"] .ambient { background: radial-gradient(1000px 520px at 50% -12%, rgba(99, 102, 241, 0.08), transparent 70%); }

/* Soft orbs are radial gradients, not blurred boxes — no per-frame filter cost. */
.ambient::before,
.ambient::after,
.ambient__orb {
  content: "";
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}

.ambient::before {
  width: 70vmax; height: 55vmax;
  top: -22vmax; right: -18vmax;
  background: radial-gradient(closest-side, rgba(124, 58, 237, 0.2), transparent);
  animation: orb-drift-a 26s ease-in-out infinite alternate;
}

.ambient::after {
  width: 60vmax; height: 50vmax;
  top: -8vmax; left: -22vmax;
  background: radial-gradient(closest-side, rgba(34, 197, 94, 0.11), transparent);
  animation: orb-drift-b 32s ease-in-out infinite alternate;
}

.ambient__orb {
  width: 55vmax; height: 45vmax;
  bottom: -25vmax; left: 30%;
  background: radial-gradient(closest-side, rgba(56, 189, 248, 0.08), transparent);
  animation: orb-drift-a 38s ease-in-out infinite alternate-reverse;
}

.ambient__grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.028) 1px, transparent 1.2px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 85%);
}

.ambient__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

[data-theme="light"] .ambient::before { background: radial-gradient(closest-side, rgba(124, 58, 237, 0.08), transparent); }
[data-theme="light"] .ambient::after { background: radial-gradient(closest-side, rgba(22, 163, 74, 0.06), transparent); }
[data-theme="light"] .ambient__orb { background: radial-gradient(closest-side, rgba(2, 132, 199, 0.06), transparent); }
[data-theme="light"] .ambient__grid { background-image: radial-gradient(circle, rgba(0, 0, 0, 0.05) 1px, transparent 1.2px); }

@keyframes orb-drift-a {
  to { transform: translate3d(-6vmax, 4vmax, 0) scale(1.06); }
}

@keyframes orb-drift-b {
  to { transform: translate3d(5vmax, 6vmax, 0) scale(0.95); }
}

.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1002;
  height: 2px;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}


/* === SECTION: LAYOUT === */
.page {
  position: relative;
  z-index: 1;
  max-width: var(--page-w);
  margin: 0 auto;
  padding: calc(var(--header-h) + 44px) 20px 72px;
  animation: page-in 0.6s var(--ease) both;
}

/* minmax(0, 1fr) stops wide content (e.g. marquee rows) from stretching the column. */
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.stack--lg { display: grid; grid-template-columns: minmax(0, 1fr); gap: 56px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .grid-3 { grid-template-columns: 1fr; }
  .page { padding: calc(var(--header-h) + 30px) 14px 56px; }
}


/* === SECTION: MOTION === */
@keyframes page-in {
  from { opacity: 0; transform: translateY(8px); }
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}


/* === SECTION: HEADER, BRAND & NAV === */
/* Floating bar: inset from the viewport edges, aligned to the page shell. */
.site-header {
  position: fixed;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 1000;
  max-width: calc(var(--page-w) + 40px);
  height: var(--header-h);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 14px 0 16px;
  border-radius: 22px;
  background: color-mix(in srgb, var(--bg-elev) 70%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--border);
  box-shadow: 0 12px 40px -20px rgba(0, 0, 0, 0.8);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  justify-self: start;
  border-radius: 12px;
}

/* Monogram: dark squircle with a 1px gradient rim — reads as a mark, not a button. */
.brand__mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font: 700 13px/1 var(--font-display);
  letter-spacing: -0.04em;
  color: #fff;
  background:
    linear-gradient(160deg, #1a2436, #0b111c) padding-box,
    var(--gradient) border-box;
  border: 1px solid transparent;
  box-shadow: 0 6px 18px -6px rgba(124, 58, 237, 0.55);
  transition: transform 0.4s var(--ease-spring), box-shadow 0.3s;
}

.brand__mark::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 45%);
  pointer-events: none;
}

.brand:hover .brand__mark {
  transform: rotate(-6deg) scale(1.05);
  box-shadow: 0 8px 24px -6px rgba(56, 189, 248, 0.6);
}

.brand__text { display: grid; line-height: 1.15; }
.brand__name { font: 600 15px/1.2 var(--font-display); letter-spacing: -0.015em; }
.brand__role { font-size: 11px; color: var(--text-3); letter-spacing: 0.02em; }

[data-theme="light"] .brand__mark {
  background: linear-gradient(160deg, #1f2937, #0b111c) padding-box, var(--gradient) border-box;
}

.site-nav {
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface-sunk);
  border: 1px solid var(--border);
}

.site-nav__link {
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
  transition: color 0.2s, background-color 0.2s;
}

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

.site-nav__link.is-active {
  color: var(--text);
  background: var(--nav-active);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), inset 0 0 0 1px var(--border);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface-sunk);
  color: var(--text-2);
  cursor: pointer;
  transition: color 0.2s, background-color 0.2s, transform 0.2s var(--ease-spring);
}

.icon-button:hover { color: var(--text); background: var(--surface); }
.icon-button:active { transform: scale(0.92); }

/* Theme toggle swaps sun/moon via the root theme attribute. */
.theme-toggle .icon-moon,
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

.menu-button { display: none; position: relative; }

.menu-button span {
  position: absolute;
  left: 11px;
  width: 16px;
  height: 1.6px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.35s var(--ease), opacity 0.2s;
}

.menu-button span:nth-child(1) { top: 13px; }
.menu-button span:nth-child(2) { top: 18px; }
.menu-button span:nth-child(3) { top: 23px; }
.menu-button[aria-expanded="true"] span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.menu-button[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-button[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 800px) {
  .site-header { top: 8px; left: 8px; right: 8px; grid-template-columns: 1fr auto; padding: 0 10px 0 12px; border-radius: 18px; }
  .site-nav, .site-header .theme-toggle { display: none; }
  .menu-button { display: grid; }
}


/* === SECTION: MOBILE DRAWER === */
.drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 1001;
  background: rgba(3, 6, 12, 0.5);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s, visibility 0s 0.35s;
}

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  z-index: 1002;
  width: min(330px, 86vw);
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 16px calc(20px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg-elev) 92%, transparent);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-pop);
  transform: translateX(104%);
  visibility: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  transition: transform 0.45s var(--ease), visibility 0s 0.45s;
}

.drawer.is-open { transform: none; visibility: visible; transition: transform 0.45s var(--ease); }
.drawer.is-open + .drawer-scrim,
.drawer-scrim.is-open { opacity: 1; visibility: visible; transition: opacity 0.35s; }

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 14px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.drawer__label {
  padding: 14px 8px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.drawer__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  padding: 0 14px;
  border-radius: 14px;
  font: 600 17px/1 var(--font-display);
  letter-spacing: -0.01em;
  color: var(--text-2);
  opacity: 0;
  transform: translateX(16px);
  transition: opacity 0.4s, transform 0.5s var(--ease), background-color 0.2s, color 0.2s;
}

.drawer__link::after { content: "›"; font-size: 22px; font-weight: 400; color: var(--text-3); }
.drawer__link:hover { background: var(--surface-sunk); color: var(--text); }
.drawer__link.is-active { color: var(--text); background: var(--surface-sunk); }
.drawer.is-open .drawer__link { opacity: 1; transform: none; }
.drawer.is-open .drawer__link:nth-of-type(2) { transition-delay: 0.04s; }
.drawer.is-open .drawer__link:nth-of-type(3) { transition-delay: 0.08s; }
.drawer.is-open .drawer__link:nth-of-type(4) { transition-delay: 0.12s; }

.drawer__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.drawer__actions .btn { justify-content: center; }
.drawer__actions .btn--primary { grid-column: 1 / -1; }

.drawer__foot {
  margin-top: auto;
  padding: 18px 8px 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-3);
}


/* === SECTION: SURFACES & TYPE === */
.card {
  position: relative;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.card--flush { padding: 0; overflow: hidden; }
.card--tight { padding: 20px; }

.tile {
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--surface-sunk);
  border: 1px solid var(--border);
}

.eyebrow {
  display: block;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
}

.section-title { font-size: clamp(20px, 2.4vw, 24px); margin-bottom: 6px; }
.section-sub { color: var(--text-2); font-size: 14.5px; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 18px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.section-head::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.page-hero { padding: 40px 36px; }
.page-hero__title { font-size: clamp(30px, 5vw, 48px); letter-spacing: -0.035em; margin-bottom: 12px; }
.page-hero__lead { max-width: 62ch; font-size: 16.5px; color: var(--text-2); line-height: 1.6; }

.text-2 { color: var(--text-2); }
.text-3 { color: var(--text-3); }
.small { font-size: 13px; }

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

@media (max-width: 560px) {
  .card { padding: 22px 18px; }
  .page-hero { padding: 28px 22px; }
}


/* === SECTION: BUTTONS & CHIPS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-sunk);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s, border-color 0.2s, transform 0.25s var(--ease-spring), box-shadow 0.25s;
}

.btn:hover { background: var(--surface); border-color: var(--border-strong); transform: translateY(-1px); }
.btn:active { transform: scale(0.97); }
.btn svg { flex-shrink: 0; }

.btn--primary {
  border-color: transparent;
  background: var(--purple);
  color: #fff;
  box-shadow: 0 8px 24px -10px rgba(124, 58, 237, 0.9);
}

.btn--primary:hover { background: #6d28d9; box-shadow: 0 12px 30px -10px rgba(124, 58, 237, 0.95); }
.btn--block { width: 100%; justify-content: center; }

.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* One chip, any color: set --tone inline or via a modifier. */
.chip {
  --tone: var(--text-3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  color: color-mix(in srgb, var(--tone) 70%, var(--text));
  background: color-mix(in srgb, var(--tone) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--tone) 26%, transparent);
}

.chip--dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tone);
}

.chip--plain { --tone: var(--text-3); color: var(--text-2); }
.chip--green { --tone: var(--green); }
.chip--cyan { --tone: var(--cyan); }
.chip--purple { --tone: var(--violet); }
.chip--amber { --tone: var(--amber); }
.chip--rose { --tone: var(--rose); }
.chip--gold { --tone: var(--gold); }

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }

.text-link {
  color: var(--cyan);
  font-weight: 500;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.3s var(--ease);
}

.text-link:hover { background-size: 100% 1px; }


/* === SECTION: STATUS & MISC === */
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
}

.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.status--live { color: var(--green); }
.status--live::before { box-shadow: 0 0 8px currentColor; animation: pulse 2.4s ease-in-out infinite; }
.status--bare::before { display: none; }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 55%, transparent); }
  50% { box-shadow: 0 0 0 6px transparent; }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 1100;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-pop);
  backdrop-filter: blur(16px);
  font-size: 13.5px;
  font-weight: 500;
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.4s var(--ease);
}

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

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 900;
  opacity: 0;
  transform: translateY(12px) scale(0.9);
  pointer-events: none;
  background: var(--surface-strong);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  transition: opacity 0.3s, transform 0.4s var(--ease-spring), background-color 0.2s;
}

.back-to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }


/* === SECTION: CAROUSEL ===
   Slides are stacked and cross-faded. Controls stay hidden unless the
   carousel carries .carousel--interactive (set by JS for full views). */
.carousel {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  background: #05080f;
  touch-action: pan-y;
  user-select: none;
}

.carousel__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.035);
  transition: opacity 0.9s var(--ease), transform 1.4s var(--ease);
}

.carousel__slide.is-active { opacity: 1; transform: none; z-index: 1; }

/* Photo keeps its aspect ratio; a blurred copy fills the letterbox. */
.carousel__backdrop {
  position: absolute;
  inset: -24px;
  width: calc(100% + 48px);
  height: calc(100% + 48px);
  object-fit: cover;
  filter: blur(26px) brightness(0.42) saturate(1.3);
}

.carousel__img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.carousel__caption {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  max-width: calc(100% - 28px);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  color: #f1f5f9;
  background: rgba(5, 8, 15, 0.55);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s, transform 0.5s var(--ease);
}

.carousel__arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: none;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(10, 14, 24, 0.5);
  backdrop-filter: blur(12px);
  cursor: pointer;
  translate: 0 -50%;
  transition: background-color 0.2s, scale 0.25s var(--ease-spring), opacity 0.2s;
}

.carousel__arrow:hover { background: rgba(124, 58, 237, 0.7); scale: 1.06; }
.carousel__arrow:active { scale: 0.94; }
.carousel__arrow--prev { left: 14px; }
.carousel__arrow--next { right: 14px; }

.carousel__dots {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 3;
  display: none;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(5, 8, 15, 0.42);
  backdrop-filter: blur(10px);
  translate: -50% 0;
}

.carousel__dot {
  position: relative;
  width: 7px;
  height: 7px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: width 0.4s var(--ease);
}

/* Active dot doubles as the countdown until the next slide. */
.carousel__dot.is-active { width: 26px; }

.carousel__dot.is-active::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #fff;
  transform-origin: 0 50%;
  animation: dot-countdown var(--interval, 5s) linear forwards;
}

.carousel.is-paused .carousel__dot.is-active::after { animation-play-state: paused; }

@keyframes dot-countdown {
  from { transform: scaleX(0); }
}

.carousel__count {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  display: none;
  padding: 3px 10px;
  border-radius: 999px;
  font: 600 11.5px/1.5 var(--font);
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(5, 8, 15, 0.45);
  backdrop-filter: blur(10px);
}

.carousel--interactive .carousel__arrow,
.carousel--interactive .carousel__count { display: grid; }
.carousel--interactive .carousel__dots { display: flex; }
.carousel--interactive .carousel__caption { bottom: 52px; }
.carousel--interactive .is-active .carousel__caption { opacity: 1; transform: none; }

@media (hover: none) {
  .carousel__arrow { width: 36px; height: 36px; }
}


/* === SECTION: SKILL MARQUEE === */
.marquee {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 8px 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee__row {
  display: flex;
  gap: 8px;
  width: max-content;
  animation: marquee 60s linear infinite;
}

.marquee__row:nth-child(even) { animation-direction: reverse; animation-duration: 72s; }
.marquee__row:nth-child(3) { animation-duration: 54s; }
.marquee:hover .marquee__row { animation-play-state: paused; }

@keyframes marquee {
  to { transform: translateX(-50%); }
}

.marquee__center {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.marquee__center .btn {
  pointer-events: auto;
  min-height: 48px;
  padding: 0 24px;
  font-size: 15px;
  background: var(--surface-strong);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-pop);
}


/* === SECTION: FEATURE CARD ===
   The Experience-page card, shared by every page: content on the left,
   optional media on the right, full details opened in the detail sheet. */
.feature-list { display: grid; gap: 20px; }

.feature {
  --tone: var(--cyan);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  transition: border-color 0.3s;
}

.feature:hover { border-color: color-mix(in srgb, var(--tone) 32%, var(--border)); }
.feature:not(:has(.feature__media, .feature__panel)) { grid-template-columns: 1fr; }

.feature__head { display: flex; align-items: center; gap: 14px; }

.feature__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border-radius: 14px;
  font-size: 23px;
  background: color-mix(in srgb, var(--tone) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--tone) 24%, transparent);
}

.feature__icon img { width: 100%; height: 100%; object-fit: cover; object-position: center 12%; }

.feature__title { font-size: 22px; }
.feature__sub { margin-top: 3px; font-size: 14px; color: var(--text-3); }

.feature__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin: 18px 0 12px;
  font-size: 13px;
  color: var(--text-3);
}

.feature__summary { max-width: 58ch; font-size: 15px; line-height: 1.7; color: var(--text-2); }
.feature__tags { margin-top: 16px; }

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0 24px;
}

.metrics li { padding: 12px 14px; border-radius: 14px; background: var(--surface-sunk); border: 1px solid var(--border); }
.metrics strong { display: block; font: 700 18px/1.2 var(--font-display); letter-spacing: -0.02em; color: var(--text); }
.metrics span { font-size: 12px; color: var(--text-3); }

.feature__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.feature__open svg { transition: transform 0.3s var(--ease); }
.feature__open:hover svg { transform: translateX(3px); }

.feature__media { cursor: pointer; }
.feature__media .carousel__img { transition: transform 0.8s var(--ease); }
.feature__media:hover .carousel__img { transform: scale(1.02); }

/* Non-photo media: framed code or spec panel in the right column. */
.feature__panel {
  align-self: stretch;
  overflow: auto;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: #05080f;
  border: 1px solid var(--border);
  font: 12.5px/1.7 var(--font-mono);
  color: #cbd5e1;
  white-space: pre;
}

.feature__panel .c { color: #64748b; }
.feature__panel .k { color: #c4b5fd; }
.feature__panel .s { color: #86efac; }
.feature__panel .n { color: #fcd34d; }

@media (max-width: 760px) {
  .feature { grid-template-columns: 1fr; gap: 20px; }
  .feature__media, .feature__panel { order: -1; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Detail content — rendered inside the sheet. */
.detail__prose p { margin-top: 16px; font-size: 16px; line-height: 1.75; color: var(--text-2); }

.detail__columns { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; margin-top: 30px; }

.detail__heading {
  margin: 30px 0 14px;
  font: 600 12px/1 var(--font);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}

.detail__columns .detail__heading { margin-top: 0; }

.detail__list li { position: relative; margin-bottom: 10px; padding-left: 18px; font-size: 14.5px; color: var(--text-2); }

.detail__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tone);
}

.detail__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.detail__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.detail__grid .tile h4 { margin-bottom: 6px; font-size: 14.5px; }
.detail__grid .tile p { font-size: 13.5px; color: var(--text-2); }
.detail__grid .span-all { grid-column: 1 / -1; }

.file-list { overflow: hidden; border-radius: var(--radius); border: 1px solid var(--border); }

.file-list a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  transition: background-color 0.2s;
}

.file-list a:first-child { border-top: 0; }
.file-list a:hover { background: var(--surface-sunk); }
.file-list strong { display: block; font-size: 13.5px; }
.file-list small { font-size: 12px; color: var(--text-3); }

@media (max-width: 640px) {
  .detail__columns, .detail__grid, .detail__grid--3 { grid-template-columns: 1fr; gap: 20px; }
}


/* === SECTION: TIMELINE === */
.timeline { position: relative; display: grid; gap: 22px; margin-top: 22px; padding-left: 28px; }

.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 1.5px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--purple), var(--green), var(--cyan));
  opacity: 0.45;
}

.timeline__item { position: relative; }

.timeline__item::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 5px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--tone, var(--cyan));
  box-shadow: 0 0 10px color-mix(in srgb, var(--tone, var(--cyan)) 45%, transparent);
}

.timeline__date { font-size: 12px; font-weight: 600; color: var(--text-3); letter-spacing: 0.02em; }
.timeline__title { margin-top: 2px; font-size: 15px; font-weight: 600; }
.timeline__org, .timeline__text { font-size: 13.5px; color: var(--text-2); }


/* === SECTION: NYIT BANNER (permanent graduation announcement) === */
.nyit-banner {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 28px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid color-mix(in srgb, var(--nyit-gold) 45%, transparent);
  background:
    radial-gradient(420px 160px at 100% 50%, rgba(253, 185, 19, 0.2), transparent 70%),
    linear-gradient(120deg, #002b64, #003f91 55%, #0f2350);
  box-shadow: 0 18px 50px -24px rgba(0, 82, 165, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nyit-banner__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--nyit-gold);
}

.nyit-banner__tag::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--nyit-gold);
  box-shadow: 0 0 10px var(--nyit-gold);
}

.nyit-banner__title { font-size: clamp(20px, 3vw, 26px); letter-spacing: -0.025em; }
.nyit-banner__title em { font-style: normal; color: var(--nyit-gold); }
.nyit-banner__sub { margin-top: 4px; font-size: 13.5px; color: rgba(214, 228, 255, 0.82); }

.nyit-banner .btn { color: #0b1b3a; background: var(--nyit-gold); border-color: var(--nyit-gold); }
.nyit-banner .btn:hover { background: #ffd35a; }

[data-theme="light"] .nyit-banner { --nyit-gold: #fdb913; }


/* === SECTION: SHEET (native <dialog> modal) === */
.sheet {
  width: min(860px, calc(100vw - 32px));
  max-height: min(88vh, 900px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 26px;
  color: var(--text);
  background: var(--bg-elev);
  box-shadow: var(--shadow-pop);
  overflow: hidden;
}

.sheet[open] { display: flex; flex-direction: column; animation: sheet-in 0.5s var(--ease); }
.sheet.is-closing { animation: sheet-out 0.25s ease forwards; }
.sheet::backdrop { background: rgba(3, 6, 12, 0.62); backdrop-filter: blur(8px); animation: fade-in 0.3s ease; }
.sheet.is-closing::backdrop { animation: fade-in 0.25s ease reverse forwards; }

.sheet__scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.sheet__body { padding: 28px 32px 34px; }

.sheet__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  color: #fff;
  background: rgba(10, 14, 24, 0.55);
  backdrop-filter: blur(12px);
  border-color: rgba(255, 255, 255, 0.14);
}

.sheet__close:hover { color: #fff; background: rgba(10, 14, 24, 0.8); }

.detail-sheet { --tone: var(--cyan); }
.detail-sheet__media { aspect-ratio: 16 / 10; border-radius: 0; }
.detail-sheet__media[hidden] + .sheet__body { padding-top: 60px; }
.detail-sheet .feature__title { font-size: clamp(22px, 3vw, 28px); }

@media (max-width: 640px) { .detail-sheet__media { aspect-ratio: 1 / 1; } }

@keyframes sheet-in {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
}

@keyframes sheet-out {
  to { opacity: 0; transform: translateY(12px) scale(0.98); }
}

@keyframes fade-in {
  from { opacity: 0; }
}

@media (max-width: 640px) {
  .sheet {
    width: 100vw;
    max-width: 100vw;
    max-height: 92vh;
    margin: auto 0 0;
    border-radius: 24px 24px 0 0;
  }
  .sheet[open] { animation-name: sheet-up; }
  .sheet__body { padding: 22px 20px calc(28px + env(safe-area-inset-bottom)); }

  @keyframes sheet-up {
    from { transform: translateY(100%); }
  }
}


/* === SECTION: FOOTER === */
.site-footer {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 14px;
  max-width: var(--page-w);
  margin: 0 auto;
  padding: 36px 20px calc(44px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 13px;
  color: var(--text-3);
}

.site-footer__name { font: 600 15px/1.2 var(--font-display); color: var(--text); }

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
}

.site-footer__links a { transition: color 0.2s; }
.site-footer__links a:hover { color: var(--text); }


/* === SECTION: UTILITIES === */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

[hidden] { display: none !important; }
