/* =========================================================
   DESIGN TOKENS — Apple-inspired, light + dark
   ========================================================= */
:root {
  color-scheme: light;

  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --bg-elev: #ffffff;
  --card: #f5f5f7;          /* tile on a white section */
  --card-on-alt: #ffffff;   /* tile on a gray section */
  --ph-base: #eceef3;

  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --hairline: rgba(0, 0, 0, 0.1);
  --fill: rgba(0, 0, 0, 0.05);
  --fill-2: rgba(0, 0, 0, 0.08);
  --seg-thumb: #ffffff;

  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-text: #0066cc;
  --accent-tint: rgba(0, 113, 227, 0.09);

  /* Apple system colors */
  --blue: #007aff;
  --green: #34c759;
  --indigo: #5856d6;
  --orange: #ff9500;
  --pink: #ff2d55;
  --purple: #af52de;
  --teal: #30b0c7;
  --yellow: #ffcc00;
  --red: #ff3b30;

  --frame-edge: #c9c9ce;
  --frame-edge-2: rgba(0, 0, 0, 0.05);

  --grad: linear-gradient(90deg, #0a7cff 0%, #7a5af8 48%, #e9408f 100%);

  /* Liquid glass */
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-bg-strong: rgba(252, 252, 254, 0.84);
  --glass-border: rgba(255, 255, 255, 0.75);
  --glass-ring: rgba(0, 0, 0, 0.07);
  --glass-hi: rgba(255, 255, 255, 0.95);
  --glass-sheen: rgba(255, 255, 255, 0.55);
  --glass-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.16), 0 2px 6px rgba(0, 0, 0, 0.04);
  --glass-blur: blur(22px) saturate(180%);

  --shadow-hover: 0 2px 6px rgba(0, 0, 0, 0.04), 0 24px 50px -20px rgba(0, 0, 0, 0.18);
  --shadow-modal: 0 40px 120px -24px rgba(0, 0, 0, 0.35);
  --avatar: linear-gradient(180deg, #a6abb6, #80858f);

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

  --r-xl: 28px;
  --r-lg: 22px;
  --r-md: 16px;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.32, 0.64, 1);
  --nav-h: 56px;
  --nav-top: 12px;
}

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

  --bg: #000000;
  --bg-alt: #0c0c0e;
  --bg-elev: #1c1c1e;
  --card: #161618;
  --card-on-alt: #1c1c1e;
  --ph-base: #121214;

  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --text-3: #8e8e93;
  --hairline: rgba(255, 255, 255, 0.12);
  --fill: rgba(255, 255, 255, 0.07);
  --fill-2: rgba(255, 255, 255, 0.12);
  --seg-thumb: #48484a;

  --accent: #0071e3;
  --accent-hover: #0a84ff;
  --accent-text: #2997ff;
  --accent-tint: rgba(41, 151, 255, 0.14);

  --blue: #0a84ff;
  --green: #30d158;
  --indigo: #5e5ce6;
  --orange: #ff9f0a;
  --pink: #ff375f;
  --purple: #bf5af2;
  --teal: #40c8e0;
  --yellow: #ffd60a;
  --red: #ff453a;

  --frame-edge: #4a4a4e;
  --frame-edge-2: rgba(255, 255, 255, 0.05);

  --grad: linear-gradient(90deg, #2997ff 0%, #9b7bff 48%, #ff5c9d 100%);

  --glass-bg: rgba(44, 44, 48, 0.5);
  --glass-bg-strong: rgba(38, 38, 42, 0.82);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-ring: rgba(0, 0, 0, 0.5);
  --glass-hi: rgba(255, 255, 255, 0.14);
  --glass-sheen: rgba(255, 255, 255, 0.07);
  --glass-shadow: 0 12px 36px -12px rgba(0, 0, 0, 0.7), 0 2px 6px rgba(0, 0, 0, 0.3);

  --shadow-hover: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 24px 50px -20px rgba(0, 0, 0, 0.8);
  --shadow-modal: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 40px 120px -24px rgba(0, 0, 0, 0.9);
  --avatar: linear-gradient(180deg, #727278, #4a4a4f);
}

/* =========================================================
   BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + var(--nav-top) + 16px); }
body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.011em;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.modal-open { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; letter-spacing: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
strong { color: var(--text); font-weight: 600; }
::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent-text) 55%, transparent); outline-offset: 3px; border-radius: 10px; }

.container { width: min(1120px, 100% - 48px); margin-inline: auto; }
.mono { font-family: var(--font-mono); }
.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--fill-2); border-radius: 10px; border: 3px solid var(--bg); }

/* =========================================================
   GLASS
   ========================================================= */
.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 0 0 0.5px var(--glass-ring), var(--glass-shadow);
}

/* =========================================================
   BUTTONS & CHIPS
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 999px;
  font-size: 1rem; font-weight: 500; line-height: 1.2;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { color: var(--accent-text); box-shadow: inset 0 0 0 1px var(--accent-text); }
.btn-ghost:hover { background: var(--accent-text); color: var(--bg); }
.btn-sm { padding: 7px 14px; font-size: 0.875rem; gap: 4px; }
.btn-sm .i { width: 14px; height: 14px; }
.btn-lg { padding: 14px 28px; font-size: 1.0625rem; }
.btn:disabled { opacity: 0.3; pointer-events: none; }

.icon-btn {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  color: var(--text-2); transition: background 0.2s, color 0.2s;
}
.icon-btn:hover { background: var(--fill); color: var(--text); }
.icon-btn .i { width: 18px; height: 18px; }
.icon-sun { display: none; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 0.8125rem; font-weight: 500; color: var(--text-2);
  padding: 6px 12px; border-radius: 999px; background: var(--fill);
  transition: color 0.2s, background 0.2s;
}
.chip:hover { color: var(--text); background: var(--fill-2); }
.chip-accent { color: var(--accent-text); background: var(--accent-tint); }
.chip-accent:hover { color: var(--accent-text); background: color-mix(in srgb, var(--accent-tint) 100%, var(--accent-text) 8%); }

.social {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
  background: var(--fill); color: var(--text-2);
  transition: background 0.2s, color 0.2s, transform 0.2s var(--ease);
}
.social:hover { background: var(--fill-2); color: var(--text); transform: translateY(-2px); }
.social .i { width: 19px; height: 19px; }

/* =========================================================
   NAV — floating liquid-glass capsule
   ========================================================= */
.nav {
  position: fixed; top: var(--nav-top); left: 0; right: 0; z-index: 100;
  display: flex; justify-content: center; padding: 0 12px; pointer-events: none;
}
.nav-bar {
  pointer-events: auto; position: relative; isolation: isolate;
  width: min(1120px, 100%); height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 10px 0 10px; border-radius: 999px;
}
/* Glass lives on pseudo-elements so the menus inside can still blur the page. */
.nav-bar::before, .nav-bar::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none; }
.nav-bar::before {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 0 0 0.5px var(--glass-ring), var(--glass-shadow);
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.nav-bar::after { background: linear-gradient(180deg, var(--glass-sheen), transparent 60%); opacity: 0.8; }
.nav.scrolled .nav-bar::before { background: var(--glass-bg-strong); }

.nav-logo { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 0.9375rem; letter-spacing: -0.02em; padding: 4px 8px 4px 2px; border-radius: 999px; }
.logo-mark {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--text); color: var(--bg); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0;
}
.nav-links { position: relative; display: flex; align-items: center; gap: 2px; }
.nav-links a {
  position: relative; z-index: 1; padding: 8px 14px; font-size: 0.875rem; font-weight: 500;
  color: var(--text-2); border-radius: 999px; transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-indicator {
  position: absolute; left: 0; top: 50%; height: 36px; width: 0; translate: 0 -50%;
  border-radius: 999px; background: var(--fill-2);
  box-shadow: inset 0 1px 0 var(--glass-hi), inset 0 0 0 0.5px var(--glass-ring);
  opacity: 0; pointer-events: none;
  transition: transform 0.55s var(--spring), width 0.55s var(--spring), opacity 0.3s var(--ease);
}
.nav-indicator.show { opacity: 1; }
.nav-indicator.instant { transition: opacity 0.3s var(--ease); }
.nav-actions { display: flex; align-items: center; gap: 6px; }

.dropdown { position: relative; }
.dropdown #resume-btn .i { transition: transform 0.25s var(--ease); }
.dropdown.open #resume-btn .i { transform: rotate(180deg); }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 14px); min-width: 300px; padding: 6px;
  border-radius: 16px; background: var(--glass-bg-strong);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 0 0 0.5px var(--glass-ring), 0 24px 60px -16px rgba(0, 0, 0, 0.3);
  opacity: 0; transform: translateY(-6px) scale(0.97); transform-origin: top right; pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.3s var(--spring);
}
.dropdown.open .dropdown-menu { opacity: 1; transform: none; pointer-events: auto; }
.dropdown-menu a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  font-size: 0.875rem; font-weight: 500; color: var(--text); transition: background 0.12s, color 0.12s;
}
.dropdown-menu a .i { color: var(--accent-text); width: 18px; height: 18px; }
.dropdown-menu small { display: block; color: var(--text-3); font-size: 0.75rem; font-weight: 400; }
.dropdown-menu a:hover { background: var(--accent); color: #fff; }
.dropdown-menu a:hover .i, .dropdown-menu a:hover small { color: rgba(255, 255, 255, 0.85); }

.nav-toggle { display: none; width: 36px; height: 36px; border-radius: 50%; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.nav-toggle:hover { background: var(--fill); }
.nav-toggle span { width: 16px; height: 1.5px; background: var(--text); border-radius: 2px; transition: transform 0.35s var(--ease-out); }
.nav-toggle.open span:nth-child(1) { transform: translateY(3.75px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { transform: translateY(-3.75px) rotate(-45deg); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative; z-index: 1; overflow-x: clip; overflow-y: visible; text-align: center;
  padding: calc(var(--nav-h) + var(--nav-top) + 88px) 0 40px;
  background:
    radial-gradient(1100px 520px at 50% -140px, color-mix(in srgb, var(--blue) 9%, transparent), transparent 70%),
    var(--bg);
}
.hero-copy { max-width: 940px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }

.status-pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px 7px 12px; border-radius: 999px;
  font-size: 0.875rem; font-weight: 500; color: var(--text-2);
}
.pulse-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.pulse-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--green); animation: ping 2s var(--ease-out) infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: 0.6; } 80%, 100% { transform: scale(2.8); opacity: 0; } }

.hero-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(3rem, 8.6vw, 6.25rem); line-height: 1.02; letter-spacing: -0.045em;
  margin-top: 28px;
}
.hero-role {
  margin-top: 8px; min-height: 1.25em;
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.6rem, 4.4vw, 3rem); line-height: 1.2; letter-spacing: -0.035em;
}
.role-word {
  display: inline-block; padding-bottom: 0.06em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero-tagline {
  margin-top: 22px; max-width: 700px;
  font-size: clamp(1.0625rem, 1.65vw, 1.3125rem); line-height: 1.45; letter-spacing: -0.016em;
  color: var(--text-2);
}
.hero-ctas { display: flex; gap: 14px; margin-top: 36px; flex-wrap: wrap; justify-content: center; }
.hero-socials { display: flex; gap: 10px; margin-top: 28px; justify-content: center; }

.hero-copy .reveal:nth-child(2) { transition-delay: 80ms; }
.hero-copy .reveal:nth-child(3) { transition-delay: 160ms; }
.hero-copy .reveal:nth-child(4) { transition-delay: 240ms; }
.hero-copy .reveal:nth-child(5) { transition-delay: 320ms; }
.hero-copy .reveal:nth-child(6) { transition-delay: 400ms; }
.hero-visual.reveal { transition-delay: 380ms; transform: translateY(48px) scale(0.98); }
.hero-visual.reveal.in { transform: none; }

/* macOS window */
.hero-visual { position: relative; max-width: 860px; margin: 80px auto 0; text-align: left; }
.hero-glow {
  position: absolute; inset: 12% 4% -4%; z-index: 0; border-radius: 40%;
  background: linear-gradient(110deg, #0a84ff, #5e5ce6 30%, #bf5af2 52%, #ff375f 74%, #ff9f0a);
  background-size: 200% 100%;
  filter: blur(64px); opacity: 0.32;
  animation: glow-drift 14s ease-in-out infinite alternate;
}
[data-theme="dark"] .hero-glow { opacity: 0.42; }
@keyframes glow-drift { to { background-position: 100% 0; transform: scale(1.04); } }

.window {
  position: relative; z-index: 1; overflow: hidden; border-radius: 14px;
  background: rgba(30, 30, 32, 0.9);
  -webkit-backdrop-filter: blur(30px) saturate(160%); backdrop-filter: blur(30px) saturate(160%);
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.6),
    inset 0 0 0 1px rgba(255, 255, 255, 0.07),
    0 50px 100px -30px rgba(0, 0, 0, 0.45),
    0 24px 48px -24px rgba(0, 0, 0, 0.3);
}
[data-theme="dark"] .window {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 50px 100px -30px rgba(0, 0, 0, 0.9);
}
.window-bar {
  position: relative; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
  border-bottom: 1px solid rgba(0, 0, 0, 0.45);
}
.window-title {
  position: absolute; left: 50%; translate: -50% 0; white-space: nowrap;
  font-size: 0.8125rem; font-weight: 600; color: rgba(235, 235, 245, 0.5); letter-spacing: -0.01em;
}
.dot { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.2); }
.dot.r { background: #ff5f57; } .dot.y { background: #febc2e; } .dot.g { background: #28c840; }
.terminal-body {
  padding: 20px 22px 26px; min-height: 300px; white-space: pre-wrap;
  font-size: 0.8125rem; line-height: 1.85; letter-spacing: 0; color: rgba(235, 235, 245, 0.68);
}
.terminal-body .t-cmd { color: #ffffff; }
.terminal-body .t-ok { color: #32d74b; }
.terminal-body .t-key { color: #5dd8ff; }
.terminal-body .t-val { color: #ff7ab2; }
.terminal-body .t-dim { color: rgba(235, 235, 245, 0.35); }
.terminal-body .caret { color: #fff; animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.float-chip {
  position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px 9px 12px; border-radius: 999px; white-space: nowrap;
  font-size: 0.875rem; font-weight: 600; color: var(--text); letter-spacing: -0.01em;
  animation: bob 7s ease-in-out infinite;
}
.chip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--d); box-shadow: 0 0 0 3px color-mix(in srgb, var(--d) 22%, transparent); }
.chip-a { top: -20px; right: -28px; }
.chip-b { top: 58%; left: 0; translate: calc(-100% + 22px) 0; animation-delay: -2.4s; }
.chip-c { bottom: -20px; right: 12%; animation-delay: -4.8s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* =========================================================
   STATS
   ========================================================= */
.stats { padding: 96px 0 112px; background: var(--bg); }
.stats-grid {
  display: grid; grid-template-columns: repeat(6, 1fr);
  background: var(--card); border-radius: var(--r-xl); overflow: hidden;
}
.stat { padding: 32px 16px 30px; text-align: center; box-shadow: 1px 0 0 var(--hairline), 0 1px 0 var(--hairline); }
.stat-num {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -0.035em; line-height: 1.05;
  font-size: clamp(2rem, 3.2vw, 2.625rem); font-variant-numeric: tabular-nums;
}
.stat-label { margin-top: 8px; font-size: 0.8125rem; color: var(--text-2); line-height: 1.35; letter-spacing: -0.005em; }

/* =========================================================
   SECTIONS
   ========================================================= */
.section { padding: 128px 0; position: relative; background: var(--bg); --card-bg: var(--card); }
.section.alt { background: var(--bg-alt); --card-bg: var(--card-on-alt); }
.card { background: var(--card-bg, var(--card)); border-radius: var(--r-xl); }

.section-head { margin-bottom: 56px; max-width: 820px; }
.eyebrow { display: inline-block; font-size: 1.0625rem; font-weight: 600; color: var(--accent-text); margin-bottom: 10px; letter-spacing: -0.01em; }
.section-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.25rem, 5vw, 3.5rem); line-height: 1.07; letter-spacing: -0.04em;
}
.section-title .dim { color: var(--text-3); }
.section-sub { margin-top: 16px; color: var(--text-2); font-size: 1.1875rem; letter-spacing: -0.014em; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }

/* =========================================================
   ABOUT
   ========================================================= */
.about-grid { display: grid; grid-template-columns: 360px 1fr; gap: 64px; align-items: start; }
.about-card { padding: 40px 32px 32px; text-align: center; }
.avatar {
  width: 112px; height: 112px; margin: 0 auto 20px; border-radius: 50%;
  display: grid; place-items: center; background: var(--avatar); color: #fff;
  font-family: var(--font-display); font-weight: 600; font-size: 2.6rem; letter-spacing: -0.02em;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.35), 0 10px 30px -10px rgba(0, 0, 0, 0.35);
}
.about-name { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; letter-spacing: -0.025em; }
.about-role { color: var(--accent-text); font-weight: 500; margin-top: 2px; }
.about-loc { color: var(--text-3); font-size: 0.875rem; margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; }
.about-loc .i { width: 14px; height: 14px; }
.edu { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--hairline); text-align: left; }
.edu-label { font-size: 0.8125rem; font-weight: 600; color: var(--text-3); }
.edu-school { font-weight: 600; margin-top: 8px; line-height: 1.35; letter-spacing: -0.015em; }
.edu-degree { color: var(--text-2); font-size: 0.9375rem; margin-top: 4px; }
.edu-hl { margin-top: 16px; display: grid; gap: 8px; }
.edu-hl span { display: flex; gap: 8px; align-items: center; font-size: 0.875rem; color: var(--text-2); }
.edu-hl span::before { content: "★"; color: var(--orange); font-size: 0.8rem; }
.about-text p {
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem); line-height: 1.5; letter-spacing: -0.017em;
  color: var(--text-2); margin-bottom: 22px;
}
.focus-label { font-size: 0.875rem; font-weight: 600; color: var(--text-3); margin: 34px 0 14px; }

/* =========================================================
   TIMELINE
   ========================================================= */
.timeline { position: relative; padding-left: 40px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 34px; bottom: 34px; width: 2px; border-radius: 2px; background: var(--hairline); }
.tl-item { position: relative; margin-bottom: 20px; }
.tl-dot {
  position: absolute; left: -40px; top: 36px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--text-3);
}
.tl-item.current .tl-dot { border-color: var(--green); }
.tl-item.current .tl-dot::after { content: ""; position: absolute; inset: 2px; border-radius: 50%; background: var(--green); }
.tl-card { padding: 32px 36px; }
.tl-top { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.tl-role { font-family: var(--font-display); font-size: 1.375rem; font-weight: 600; line-height: 1.25; letter-spacing: -0.025em; }
.tl-company { color: var(--accent-text); font-weight: 500; margin-top: 2px; }
.tl-meta { text-align: right; font-size: 0.875rem; color: var(--text-3); }
.tl-period { color: var(--text); font-weight: 500; font-size: 0.9375rem; font-variant-numeric: tabular-nums; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.badge-now {
  display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 0.75rem; font-weight: 600;
  color: var(--green); background: color-mix(in srgb, var(--green) 14%, transparent);
}
.tl-bullets { margin: 20px 0; display: grid; gap: 10px; }
.tl-bullets li { position: relative; padding-left: 20px; color: var(--text-2); font-size: 1rem; line-height: 1.5; }
.tl-bullets li::before { content: ""; position: absolute; left: 3px; top: 0.66em; width: 5px; height: 5px; border-radius: 50%; background: var(--text-3); }

/* =========================================================
   PROJECTS
   ========================================================= */
.filters-wrap { margin-bottom: 40px; max-width: 100%; overflow-x: auto; scrollbar-width: none; padding: 2px; margin-left: -2px; }
.filters-wrap::-webkit-scrollbar { display: none; }
.filters {
  position: relative; display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px;
  background: var(--fill-2); white-space: nowrap;
}
.seg-thumb {
  position: absolute; left: 0; top: 4px; bottom: 4px; width: 0; border-radius: 999px;
  background: var(--seg-thumb); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
  transition: transform 0.5s var(--spring), width 0.5s var(--spring);
}
.seg-thumb.instant { transition: none; }
.filter-btn {
  position: relative; z-index: 1; padding: 8px 16px; border-radius: 999px;
  font-size: 0.875rem; font-weight: 500; color: var(--text-2);
  display: inline-flex; gap: 7px; align-items: center; transition: color 0.2s;
}
.filter-btn:hover, .filter-btn.active { color: var(--text); }
.filter-btn .count { font-size: 0.75rem; color: var(--text-3); font-variant-numeric: tabular-nums; }

.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.project-card {
  display: flex; flex-direction: column; cursor: pointer; text-align: left; overflow: hidden;
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out), opacity 0.9s var(--ease-out);
}
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.project-card.hide { display: none; }
.project-card.pop, .mini-card.pop { animation: popin 0.55s var(--ease-out) both; }
@keyframes popin { from { opacity: 0; transform: translateY(16px) scale(0.985); } to { opacity: 1; transform: none; } }

.pc-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--ph-base); }
.pc-media > img, .pc-media > video { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-out); }
.project-card:hover .pc-media > img, .project-card:hover .pc-media > video { transform: scale(1.035); }
.pc-media-count {
  position: absolute; top: 14px; right: 14px; z-index: 2; display: flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; color: var(--text);
}
.pc-media-count .i { width: 13px; height: 13px; }
.pc-badges { position: absolute; left: 14px; bottom: 14px; right: 14px; z-index: 2; display: flex; gap: 8px; flex-wrap: wrap; }
.metric-badge {
  padding: 6px 12px; border-radius: 999px; font-size: 0.8125rem; font-weight: 600; color: var(--text);
  font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
  background: var(--glass-bg-strong);
}

.pc-body { padding: 26px 30px 30px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pc-cats { display: flex; gap: 14px; flex-wrap: wrap; }
.cat-tag { font-size: 0.8125rem; font-weight: 600; color: var(--text-2); display: inline-flex; align-items: center; gap: 7px; }
.cat-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--blue)); }
.pc-title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; line-height: 1.2; letter-spacing: -0.028em; }
.pc-hook { color: var(--text-2); font-size: 1rem; line-height: 1.5; }
.pc-tech { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 8px; }
.pc-tech .chip { font-size: 0.75rem; padding: 4px 10px; }
.pc-more { font-size: 0.75rem; color: var(--text-3); align-self: center; padding-left: 2px; }
.pc-cta { display: inline-flex; align-items: center; gap: 2px; font-size: 1rem; font-weight: 500; color: var(--accent-text); margin-top: 8px; }
.pc-cta .i, .mini-arrow .i { width: 16px; height: 16px; stroke-width: 2.2; transition: transform 0.3s var(--ease-out); }
.project-card:hover .pc-cta .i, .mini-card:hover .mini-arrow .i { transform: translateX(3px); }
.project-card:hover .pc-cta, .mini-card:hover .mini-arrow { text-decoration: underline; text-underline-offset: 3px; }

/* App-icon tile (used for placeholders, mini cards, skills) */
.app-icon {
  display: grid; place-items: center; color: #fff; aspect-ratio: 1;
  background: linear-gradient(155deg, color-mix(in srgb, var(--c1) 72%, #fff) 0%, var(--c1) 48%, color-mix(in srgb, var(--c1) 55%, var(--c2, var(--c1))) 100%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.45), inset 0 -2px 6px rgba(0, 0, 0, 0.12), 0 8px 20px -8px color-mix(in srgb, var(--c1) 70%, transparent);
}
.app-icon svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.app-icon .node { fill: currentColor; stroke: none; }

/* Placeholder media */
.ph {
  position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden;
  background:
    radial-gradient(70% 90% at 12% 0%, color-mix(in srgb, var(--c1) 26%, transparent), transparent 70%),
    radial-gradient(60% 80% at 95% 100%, color-mix(in srgb, var(--c2) 22%, transparent), transparent 70%),
    var(--ph-base);
}
.ph-icon { width: 30%; max-width: 128px; border-radius: 23%; transition: transform 0.8s var(--ease-out); }
.ph-icon svg { width: 62%; height: auto; stroke-width: 2.6; }
.project-card:hover .ph-icon { transform: scale(1.05); }
.ph-tag {
  position: absolute; top: 14px; left: 14px; z-index: 2; padding: 5px 11px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 500; color: var(--text-2);
}

/* More projects */
.more-head { display: flex; align-items: center; gap: 18px; margin: 80px 0 24px; }
.more-head h3 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; letter-spacing: -0.025em; white-space: nowrap; }
.more-line { flex: 1; height: 1px; background: var(--hairline); }
.more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.mini-card {
  padding: 26px 26px 24px; cursor: pointer; display: flex; flex-direction: column; gap: 12px; text-align: left;
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out), opacity 0.9s var(--ease-out);
}
.mini-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.mini-card.hide { display: none; }
.mini-top { display: flex; justify-content: space-between; align-items: center; }
.mini-icon { width: 48px; border-radius: 12px; }
.mini-icon svg { width: 28px; height: 28px; stroke-width: 3.6; }
.mini-metric { font-size: 0.9375rem; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.mini-title { font-family: var(--font-display); font-size: 1.1875rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.022em; }
.mini-hook { color: var(--text-2); font-size: 0.9375rem; line-height: 1.5; flex: 1; }
.mini-arrow { display: inline-flex; align-items: center; gap: 2px; font-size: 0.9375rem; font-weight: 500; color: var(--accent-text); }
.empty-note { text-align: center; color: var(--text-3); padding: 40px 0; }

/* =========================================================
   MODAL
   ========================================================= */
.modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 32px; }
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute; inset: 0; background: rgba(0, 0, 0, 0.32);
  -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
  animation: fade 0.35s var(--ease) both;
}
[data-theme="dark"] .modal-backdrop { background: rgba(0, 0, 0, 0.6); }
@keyframes fade { from { opacity: 0; } }
.modal-panel {
  position: relative; width: min(980px, 100%); max-height: calc(100vh - 64px); display: flex; flex-direction: column;
  background: var(--bg-elev); border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-modal);
  animation: modalin 0.5s var(--ease-out) both;
}
@keyframes modalin { from { opacity: 0; transform: translateY(40px) scale(0.97); } }
.modal.closing .modal-panel { animation: modalout 0.25s var(--ease) both; }
.modal.closing .modal-backdrop { animation: fade 0.25s var(--ease) reverse both; }
@keyframes modalout { to { opacity: 0; transform: translateY(24px) scale(0.98); } }
.modal-close {
  position: absolute; top: 16px; right: 16px; z-index: 5; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; color: var(--text-2);
  background: var(--glass-bg-strong); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: 0 0 0 0.5px var(--glass-ring), 0 4px 12px -4px rgba(0, 0, 0, 0.2);
  transition: color 0.2s, transform 0.3s var(--ease-out);
}
.modal-close .i { width: 16px; height: 16px; stroke-width: 2.4; }
.modal-close:hover { color: var(--text); transform: scale(1.06); }
.modal-scroll { overflow-y: auto; overscroll-behavior: contain; }
.modal-scroll::-webkit-scrollbar-thumb { border-color: var(--bg-elev); }

.modal-media { position: relative; background: var(--bg-alt); }
[data-theme="dark"] .modal-media { background: #000; }
.mm-stage { position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden; }
.mm-stage > img, .mm-stage > video { width: 100%; height: 100%; object-fit: contain; animation: fade 0.4s var(--ease) both; }
.mm-stage.is-video { background: #000; }
.mm-stage.is-video .mm-caption { top: 16px; bottom: auto; } /* keep clear of the video controls */
.mm-caption {
  position: absolute; left: 16px; bottom: 16px; max-width: calc(100% - 32px); z-index: 2;
  padding: 7px 14px; border-radius: 999px; font-size: 0.8125rem; font-weight: 500; color: var(--text);
}
.mm-arrow {
  position: absolute; top: 50%; translate: 0 -50%; z-index: 3; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; color: var(--text); transition: transform 0.2s var(--ease);
}
.mm-arrow:hover { transform: scale(1.08); }
.mm-prev { left: 16px; } .mm-next { right: 16px; }
.mm-thumbs { display: flex; gap: 10px; padding: 12px 16px; overflow-x: auto; background: var(--bg-elev); border-bottom: 1px solid var(--hairline); }
.mm-thumb { position: relative; flex: 0 0 88px; height: 54px; border-radius: 10px; overflow: hidden; opacity: 0.5; box-shadow: 0 0 0 2px transparent; transition: opacity 0.2s, box-shadow 0.2s; }
.mm-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mm-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, 0.25); }
.mm-play .i { width: 18px; height: 18px; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5)); }
.mm-thumb.active, .mm-thumb:hover { opacity: 1; }
.mm-thumb.active { box-shadow: 0 0 0 2px var(--accent-text); }

.modal-body { padding: 36px 44px 8px; }
.modal-cats { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.modal-title { font-family: var(--font-display); font-size: clamp(1.75rem, 3.2vw, 2.5rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.035em; padding-right: 40px; }
.modal-hook { color: var(--text-2); margin-top: 12px; font-size: 1.1875rem; line-height: 1.45; letter-spacing: -0.014em; }
.modal-metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 12px; margin: 32px 0 40px; }
.metric { padding: 20px 18px; border-radius: 18px; background: var(--fill); animation: popin 0.5s var(--ease-out) both; }
.metric-val { font-family: var(--font-display); font-size: 1.875rem; font-weight: 700; line-height: 1.1; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.metric-val.is-text { font-size: 1.3125rem; letter-spacing: -0.025em; padding: 5px 0 3px; }
.metric-label { font-size: 0.8125rem; color: var(--text-2); margin-top: 6px; line-height: 1.35; }
.modal-sub { font-family: var(--font-display); font-size: 1.1875rem; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 16px; }
.modal-bullets { display: grid; gap: 12px; margin-bottom: 36px; }
.modal-bullets li { position: relative; padding-left: 22px; color: var(--text-2); font-size: 1rem; line-height: 1.55; }
.modal-bullets li::before { content: ""; position: absolute; left: 3px; top: 0.62em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-text); }
.modal-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 20px 44px 28px; margin-top: 32px; border-top: 1px solid var(--hairline); }
.modal-count { font-size: 0.8125rem; color: var(--text-3); font-variant-numeric: tabular-nums; text-align: center; }

/* =========================================================
   SKILLS
   ========================================================= */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.skill-card { padding: 30px 28px; }
.skill-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.skill-icon { width: 46px; border-radius: 12px; }
.skill-icon .i { width: 24px; height: 24px; stroke-width: 2; }
.skill-head h3 { font-family: var(--font-display); font-size: 1.1875rem; font-weight: 600; letter-spacing: -0.022em; line-height: 1.25; }
.skill-head small { display: block; font-size: 0.8125rem; color: var(--text-3); font-weight: 400; letter-spacing: -0.005em; }

/* =========================================================
   ACHIEVEMENTS
   ========================================================= */
.ach-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: start; }
.ach-title { font-family: var(--font-display); font-size: 1.3125rem; font-weight: 600; letter-spacing: -0.022em; margin-bottom: 16px; }
/* iOS-style grouped list */
.cert-list { background: var(--card-bg); border-radius: var(--r-lg); overflow: hidden; }
.cert { position: relative; display: flex; gap: 16px; align-items: center; padding: 18px 22px; }
.cert + .cert::before { content: ""; position: absolute; top: 0; left: 78px; right: 0; height: 1px; background: var(--hairline); }
.cert-icon { flex: 0 0 40px; border-radius: 10px; --c1: var(--blue); --c2: var(--indigo); }
.cert-icon .i { width: 22px; height: 22px; }
.cert h4 { font-size: 1rem; font-weight: 600; line-height: 1.35; letter-spacing: -0.015em; }
.cert p { font-size: 0.875rem; color: var(--text-2); margin-top: 2px; }
.award-list { display: grid; gap: 16px; }
.award { padding: 26px 24px; display: flex; gap: 18px; align-items: center; }
.award-icon { flex: 0 0 52px; border-radius: 50%; --c1: #ffb800; --c2: #ff8a00; }
.award-icon .i { width: 26px; height: 26px; }
.award h4 { font-family: var(--font-display); font-size: 1.1875rem; font-weight: 600; letter-spacing: -0.022em; }
.award p { color: var(--text-2); font-size: 0.9375rem; margin-top: 2px; line-height: 1.45; }

/* =========================================================
   CONTACT & FOOTER
   ========================================================= */
.contact { padding-bottom: 112px; }
.contact-card { position: relative; overflow: hidden; padding: 88px 48px; text-align: center; border-radius: 36px; }
.contact-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(40% 70% at 28% -10%, color-mix(in srgb, var(--blue) 16%, transparent), transparent 70%),
    radial-gradient(40% 70% at 72% -10%, color-mix(in srgb, var(--purple) 14%, transparent), transparent 70%);
}
.contact-card > * { position: relative; }
.contact-title { font-family: var(--font-display); font-size: clamp(2.25rem, 5.6vw, 4rem); font-weight: 700; line-height: 1.06; letter-spacing: -0.045em; max-width: 860px; margin: 0 auto; }
.contact-sub { color: var(--text-2); max-width: 600px; margin: 22px auto 0; font-size: clamp(1.0625rem, 1.6vw, 1.25rem); line-height: 1.45; letter-spacing: -0.015em; }
.contact-actions { display: flex; gap: 14px; justify-content: center; margin-top: 38px; flex-wrap: wrap; }
.contact-socials { display: flex; justify-content: center; gap: 10px; margin-top: 30px; }

.footer { padding: 22px 0 30px; background: var(--bg-alt); border-top: 1px solid var(--hairline); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; color: var(--text-3); font-size: 0.75rem; letter-spacing: 0; }
.back-top { color: var(--text-2); transition: color 0.2s; }
.back-top:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 400; translate: -50% 16px; opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 10px; padding: 12px 20px 12px 16px; border-radius: 999px;
  font-size: 0.9375rem; font-weight: 500; color: #fff;
  background: rgba(30, 30, 32, 0.82); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 0 0.5px rgba(0, 0, 0, 0.4), 0 16px 40px -12px rgba(0, 0, 0, 0.45);
  transition: opacity 0.3s var(--ease), translate 0.45s var(--spring);
}
.toast .i { color: #30d158; width: 18px; height: 18px; stroke-width: 2.4; }
.toast.show { opacity: 1; translate: -50% 0; }

/* =========================================================
   HERO VARIANTS — only the active one is shown
   ========================================================= */
.hero-host > [data-variant]:not(.is-active) { display: none; }

/* Lettered logo tile (an <img> on top replaces it once the logo file exists) */
.logo-tile { position: relative; overflow: hidden; flex-shrink: 0; }
.logo-tile em { font-style: normal; font-weight: 700; letter-spacing: -0.03em; }
.logo-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 14%; }

/* Preview switcher (temporary) */
.variant-switch {
  position: fixed; left: 16px; bottom: 16px; z-index: 150;
  display: flex; gap: 2px; padding: 4px; border-radius: 999px;
}
@media (max-width: 760px) { .variant-switch { left: 50%; translate: -50% 0; bottom: 12px; } }
.variant-switch button {
  position: relative; z-index: 1; padding: 8px 16px; border-radius: 999px; white-space: nowrap;
  font-size: 0.875rem; font-weight: 500; color: var(--text-2); transition: color 0.2s;
}
.variant-switch button:hover, .variant-switch button.active { color: var(--text); }
body.modal-open .variant-switch { display: none; }

/* ---------- Variant 1: detection canvas ---------- */
.hero-canvas { padding: calc(var(--nav-h) + var(--nav-top) + 12px) 12px 0; background: var(--bg); }
.cv-board {
  --ruler: 24px;
  --grid-line: color-mix(in srgb, var(--text) 5.5%, transparent);
  --tick: color-mix(in srgb, var(--text) 38%, transparent);
  --tick-2: color-mix(in srgb, var(--text) 18%, transparent);
  position: relative; isolation: isolate; overflow: hidden;
  min-height: max(680px, calc(100svh - var(--nav-h) - var(--nav-top) - 24px));
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-xl);
  background-color: var(--bg-alt);
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 40px 40px; background-position: var(--ruler) var(--ruler);
  box-shadow: inset 0 0 0 1px var(--hairline);
  cursor: crosshair;
}
.cv-board a, .cv-board button { cursor: pointer; }

.cv-ruler, .cv-corner { position: absolute; z-index: 4; pointer-events: none; background-color: var(--bg-alt); }
.cv-ruler { overflow: hidden; font: 500 9px/1 var(--font-mono); color: var(--text-3); letter-spacing: 0; }
.cv-ruler-x {
  top: 0; left: var(--ruler); right: 0; height: var(--ruler); border-bottom: 1px solid var(--hairline);
  background-image: linear-gradient(90deg, var(--tick) 1px, transparent 1px), linear-gradient(90deg, var(--tick-2) 1px, transparent 1px);
  background-size: 100px 9px, 10px 5px; background-position: 0 100%, 0 100%; background-repeat: repeat-x;
}
.cv-ruler-y {
  left: 0; top: var(--ruler); bottom: 0; width: var(--ruler); border-right: 1px solid var(--hairline);
  background-image: linear-gradient(180deg, var(--tick) 1px, transparent 1px), linear-gradient(180deg, var(--tick-2) 1px, transparent 1px);
  background-size: 9px 100px, 5px 10px; background-position: 100% 0, 100% 0; background-repeat: repeat-y;
}
.cv-corner { top: 0; left: 0; width: var(--ruler); height: var(--ruler); border-right: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.cv-ruler span { position: absolute; }
.cv-ruler-x span { top: 4px; }
.cv-ruler-y span { left: 4px; writing-mode: vertical-rl; transform: rotate(180deg); }
.cv-mark { position: absolute; left: 0; top: 0; background: var(--pink); opacity: 0; transition: opacity 0.2s; }
.cv-ruler-x .cv-mark { bottom: 0; width: 1.5px; }
.cv-ruler-y .cv-mark { right: 0; height: 1.5px; }
.cv-board.tracking .cv-mark { opacity: 1; }

.cv-hud {
  position: absolute; z-index: 3; pointer-events: none; display: flex; align-items: center; gap: 7px;
  font: 500 12px/1 var(--font-mono); color: var(--text-2); letter-spacing: 0; white-space: nowrap;
}
.cv-clock { top: calc(var(--ruler) + 18px); left: 50%; translate: -50% 0; font-variant-numeric: tabular-nums; }
.cv-clock .rec { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: rec 1.6s steps(1) infinite; }
@keyframes rec { 50% { opacity: 0.25; } }
.cv-stats { left: calc(var(--ruler) + 16px); bottom: 16px; }
.cv-coords { right: 18px; bottom: 16px; font-variant-numeric: tabular-nums; }

.cv-scan {
  position: absolute; left: 0; right: 0; top: -30%; height: 30%; z-index: 1; pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--blue) 7%, transparent) 80%, color-mix(in srgb, var(--blue) 30%, transparent) 99%, var(--blue) 99.4%);
}
.hero-canvas.play .cv-scan { animation: cv-scan 1.8s cubic-bezier(0.45, 0, 0.2, 1) 0.05s both; }
@keyframes cv-scan { 0% { top: -30%; opacity: 1; } 88% { opacity: 1; } 100% { top: 100%; opacity: 0; } }

/* Detection labels */
.cv-label {
  position: absolute; left: -1.5px; bottom: 100%; padding: 3px 7px 2px; border-radius: 4px 4px 0 0;
  background: var(--c, var(--blue)); color: #fff; white-space: nowrap;
  font: 600 11px/1.25 var(--font-mono); letter-spacing: 0;
}
.cv-label b { font-weight: 600; opacity: 0.85; font-variant-numeric: tabular-nums; }

.cv-stage {
  position: relative; z-index: 2; width: 100%; max-width: 1180px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 92px 48px 84px;
}
.cv-row { width: 100%; display: flex; justify-content: space-between; gap: 16px; }
.cv-row-top { align-items: flex-end; margin-top: 44px; margin-bottom: -4px; padding: 0 3%; }
.cv-row-top > :nth-child(1) { translate: 0 -12px; }
.cv-row-top > :nth-child(2) { translate: 0 6px; }
.cv-row-bottom { align-items: flex-start; margin-top: 2px; padding: 0 1%; }
.cv-row-bottom > :nth-child(1) { translate: 0 22px; }
.cv-row-bottom > :nth-child(2) { translate: 0 14px; }

.cv-target { position: relative; padding: 2px 24px 10px; margin: 22px 0 18px; }
.cv-box { position: absolute; inset: 0; pointer-events: none; border: 1.5px solid var(--blue); background: color-mix(in srgb, var(--blue) 5%, transparent); }
.cv-box > i { position: absolute; width: 10px; height: 10px; background: var(--bg); border: 1.5px solid var(--blue); }
.cv-box > i:nth-of-type(1) { left: -6px; top: -6px; }
.cv-box > i:nth-of-type(2) { right: -6px; top: -6px; }
.cv-box > i:nth-of-type(3) { left: -6px; bottom: -6px; }
.cv-box > i:nth-of-type(4) { right: -6px; bottom: -6px; }
.cv-name {
  font-family: var(--font-display); font-weight: 800; line-height: 1.04; letter-spacing: -0.05em;
  font-size: clamp(2.6rem, 6.4vw, 6rem);
}

.cv-det {
  --c: var(--blue);
  position: relative; display: inline-flex; align-items: center; gap: 12px; padding: 10px 18px 10px 10px;
  border: 1.5px solid var(--c); border-radius: 2px; text-align: left; white-space: nowrap;
  background: color-mix(in srgb, var(--c) 7%, var(--bg-alt));
}
.cv-det .logo-tile { width: 40px; border-radius: 10px; font-size: 15px; }
.cv-det-text strong { display: block; font-size: 0.9375rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; }
.cv-det-text small { display: block; font-size: 0.8125rem; color: var(--text-2); line-height: 1.3; }

.cv-cursor {
  position: relative; display: inline-flex; align-items: center; padding: 11px 20px; border-radius: 999px;
  background: var(--orange); color: #1d1d1f; white-space: nowrap;
  font: 700 13px/1 var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase;
  rotate: -7deg; box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--orange) 80%, transparent);
  animation: drift 7s ease-in-out infinite;
}
.cv-cursor svg { position: absolute; left: -16px; top: -18px; width: 24px; height: 24px; }
.cv-cursor svg path { fill: var(--orange); stroke: #1d1d1f; stroke-width: 1.4; stroke-linejoin: round; }
@keyframes drift { 0%, 100% { transform: translate(0, 0); } 33% { transform: translate(6px, -5px); } 66% { transform: translate(-4px, 4px); } }

.cv-headline {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -0.04em; line-height: 1.1;
  font-size: clamp(1.75rem, 3.4vw, 2.75rem); margin-top: 44px;
}
.cv-sub { margin-top: 14px; max-width: 640px; color: var(--text-2); font-size: clamp(1rem, 1.5vw, 1.1875rem); line-height: 1.5; letter-spacing: -0.014em; }
.cv-ctas { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 30px; }

/* Visitor tracker */
.cv-track {
  --c: var(--pink);
  position: absolute; left: 0; top: 0; z-index: 5; width: 64px; height: 64px; margin: -32px 0 0 -32px;
  border: 1.5px solid var(--c); background: color-mix(in srgb, var(--c) 6%, transparent);
  pointer-events: none; opacity: 0; transition: opacity 0.25s; will-change: transform;
}
.cv-track::after { content: ""; position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px; border-radius: 50%; background: var(--c); }
.cv-track.on { opacity: 1; }
.cv-trail { position: absolute; inset: 0; z-index: 4; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.cv-trail polyline { fill: none; stroke: var(--pink); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 5; opacity: 0.7; }

/* Intro: scan → lock-on → detections */
.hero-canvas .cv-anim, .hero-canvas .cv-det, .hero-canvas .cv-box { opacity: 0; }
.hero-canvas.play .cv-anim { animation: cv-in 0.6s var(--ease-out) both; animation-delay: var(--d, 0s); }
.hero-canvas.play .cv-det { animation: cv-pop 0.55s var(--spring) both; animation-delay: var(--d, 0s); }
.hero-canvas.play .cv-box { animation: cv-lock 0.8s var(--spring) 0.55s both, cv-blink 0.24s steps(1) 1.35s 3; }
@keyframes cv-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes cv-pop { from { opacity: 0; transform: scale(0.86); } to { opacity: 1; transform: none; } }
@keyframes cv-lock { 0% { opacity: 0; transform: scale(1.22); } 55% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes cv-blink { 50% { border-color: transparent; } }

/* ---------- Variant 2: the whole site inside an unfolding device ---------- */
@property --g1 { syntax: "<color>"; inherits: true; initial-value: #f4a7c4; }
@property --g2 { syntax: "<color>"; inherits: true; initial-value: #ffb469; }
@property --g3 { syntax: "<color>"; inherits: true; initial-value: #ff9b5a; }

/* In device mode the regular page sections live inside the device instead */
body.device-mode main > section:not(#home), body.device-mode .footer { display: none; }

.hero-lock {
  /* driven from main.js: u = open, theta = leaf angle, k/h/call = phone (mobile) fades */
  --u: 0; --k: 0; --h: 1; --call: 0; --ip: 0; --tabs: 0; --dim: 0; --shade: 0;
  --cover: 1; --lockv: 1; --callv: 0; --theta: 180deg;
  /* min 440px so the phone still fits under the nav on ~600px-tall screens (14" laptops at 150% scaling) */
  --dh: clamp(440px, calc(100svh - var(--nav-h) - var(--nav-top) - 112px), 820px);
  --sh: calc(var(--dh) - 32px);
  --w0: calc(var(--dh) * 0.48);
  --w1: min(calc(var(--dh) * 1.45), 100vw - 80px, 1200px);
  --iw: calc(var(--w1) - 32px);
  --frame: #cfc9c1;
  --font-cond: "Archivo", "Inter", system-ui, sans-serif;
  position: relative; height: 400vh; background: var(--bg);
  transition: --g1 1.2s var(--ease), --g2 1.2s var(--ease), --g3 1.2s var(--ease);
}
.hero-lock[data-frame="black"] { --frame: #4b4b4f; }
.hero-lock[data-frame="desert"] { --frame: #d4ab97; }
.hero-lock[data-frame="sage"] { --frame: #a9b7a1; }

.hero-lock[data-glow="lock"], .hero-lock[data-glow="call"] { --g1: #f4a7c4; --g2: #ffb469; --g3: #ff9b5a; }
.hero-lock[data-glow="home"] { --g1: #8aa9ff; --g2: #7b9dff; --g3: #f6a4b0; }
.hero-lock[data-glow="about"] { --g1: #8fd0ff; --g2: #7fb2ff; --g3: #b9a8ff; }
.hero-lock[data-glow="work-cv"] { --g1: #9db8ff; --g2: #5b86ff; --g3: #ff9fb0; }
.hero-lock[data-glow="work-3d"] { --g1: #c4a8ff; --g2: #9a6bff; --g3: #ff9fd0; }
.hero-lock[data-glow="work-llm"] { --g1: #ffb0cc; --g2: #ff6b9a; --g3: #ffb36b; }
.hero-lock[data-glow="work-automation"] { --g1: #ffd08f; --g2: #ff9d3d; --g3: #ff8b8b; }
.hero-lock[data-glow="work-fullstack"] { --g1: #a8ecc0; --g2: #4fd18b; --g3: #8fd3ff; }
.hero-lock[data-glow="skills"] { --g1: #cfcfd6; --g2: #ff8f8f; --g3: #ff9db0; }
.hero-lock[data-glow="exp"] { --g1: #c7b8ff; --g2: #9d8cff; --g3: #ffb3c7; }
.hero-lock[data-glow="cta"] { --g1: #a8e6c1; --g2: #8fd3ff; --g3: #ffd18f; }

.lock-sticky {
  position: sticky; top: 0; height: 100svh; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  padding-top: calc(var(--nav-h) + var(--nav-top));
}
/* Book mode: while folded only the right half shows, so main.js slides it to the centre (transform only) */
.device-wrap { position: relative; perspective: 2400px; }
.hero-lock.book .device-wrap { will-change: transform; }
.device-glow {
  position: absolute; z-index: 0; inset: -90px -130px; border-radius: 50%; pointer-events: none;
  background:
    radial-gradient(50% 40% at 50% 6%, var(--g1), transparent 72%),
    radial-gradient(32% 50% at 5% 50%, var(--g2), transparent 72%),
    radial-gradient(32% 50% at 95% 50%, var(--g2), transparent 72%),
    radial-gradient(50% 40% at 50% 94%, var(--g3), transparent 72%);
  filter: blur(46px); opacity: calc(0.85 * var(--go, 1)); will-change: transform, opacity;
}
[data-theme="dark"] .device-glow { opacity: calc(0.5 * var(--go, 1)); }

/* Big name behind the closed phone; main.js slides the words apart as it opens */
.lock-name { position: absolute; inset: 0; z-index: 1; pointer-events: none; display: none; --overlap: calc(var(--name-size, 8vw) * 0.2); }
.hero-lock.book .lock-name { display: block; }
.lock-name span {
  position: absolute; top: 50%; translate: 0 -50%; white-space: nowrap; color: var(--text);
  font-family: var(--font-cond); font-stretch: 62%; font-weight: 800; text-transform: uppercase; line-height: 0.82;
  font-size: var(--name-size, 8vw); letter-spacing: -0.01em; will-change: transform, opacity;
}
.lock-name span { display: flex; flex-direction: column; gap: 0.06em; }
.lock-name b { display: block; font-weight: inherit; }
/* name on the left (right-aligned to the phone), discipline on the right in grey, like the site's two-tone headings */
#ln-l { right: calc(50% - var(--overlap)); align-items: flex-end; }
#ln-r { left: calc(100% - var(--overlap)); align-items: flex-start; color: var(--text-3); }
@media (max-width: 999px) { .hero-lock.book .lock-name { display: none; } }

/* Device: two hinged halves. The right half stays put, the left "leaf" swings open. */
.device { position: relative; z-index: 2; width: var(--w1); height: var(--dh); perspective: 2600px; }
.half, .leaf-face {
  position: absolute; top: 0; bottom: 0; background: var(--frame);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--frame) 60%, #000), 0 60px 110px -45px rgba(0, 0, 0, 0.45);
}
.bezel { height: 100%; background: #0b0b0d; }
/* hinge-side corners are round while closed and square up as the halves meet */
.half-right { left: 50%; right: 0; padding: 5px 5px 5px 0; border-radius: calc(52px * (1 - var(--u))) 52px 52px calc(52px * (1 - var(--u))); }
.half-right .bezel { border-radius: calc(47px * (1 - var(--u))) 47px 47px calc(47px * (1 - var(--u))); }
.half-right::before, .half-right::after { content: ""; position: absolute; right: -6px; width: 4px; border-radius: 0 3px 3px 0; background: var(--frame); }
.half-right::before { top: 17%; height: 8%; }
.half-right::after { top: 29%; height: 12%; }
.half-left { left: 0; right: 50%; padding: 5px 0 5px 5px; border-radius: 52px 0 0 52px; display: none; }
.half-left .bezel { border-radius: 47px 0 0 47px; }
.hero-lock.flat .half-left { display: block; }

.screen {
  position: absolute; inset: 16px; overflow: hidden; isolation: isolate; color: #fff;
  background: #0b0b0d; border-radius: 36px;
  clip-path: inset(0 0 0 50%);
}
.hero-lock.flat .screen { clip-path: none; }
.hinge-shade {
  position: absolute; z-index: 8; top: 0; bottom: 0; left: 50%; width: 40px; margin-left: -20px; pointer-events: none; display: none;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.07) 46%, rgba(255, 255, 255, 0.05) 54%, transparent);
}
.hero-lock.book .hinge-shade { display: block; }
.screen-dim { position: absolute; inset: 0; z-index: 9; background: #000; opacity: var(--dim); pointer-events: none; }

.leaf {
  position: absolute; z-index: 3; top: 0; bottom: 0; left: 0; width: 50%;
  transform-origin: 100% 50%; transform: rotateY(var(--theta)); transform-style: preserve-3d; will-change: transform;
}
.hero-lock.flat .leaf { visibility: hidden; }
/* Fully closed: drop the 3D transform so the cover display renders crisp */
.hero-lock.book.folded .device { perspective: none; }
.hero-lock.book.folded .leaf { left: 50%; transform: none; transform-style: flat; }
.hero-lock.book.folded .leaf-front, .hero-lock.book.folded .screen { visibility: hidden; }
.hero-lock.book.folded .leaf-back { transform: none; -webkit-backface-visibility: visible; backface-visibility: visible; }
.leaf-face { inset: 0; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.leaf-front { padding: 5px 0 5px 5px; border-radius: 52px 0 0 52px; }
.leaf-front .bezel { padding: 11px 0 11px 11px; border-radius: 47px 0 0 47px; }
.leaf-back { padding: 5px; border-radius: 52px; transform: rotateY(180deg); }
.leaf-back .bezel { padding: 11px; border-radius: 47px; }
.leaf-screen { position: relative; height: 100%; overflow: hidden; border-radius: 36px 0 0 36px; background: #0b0b0d; }
.leaf-back .leaf-screen { border-radius: 36px; }
.leaf-shade { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(90deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.08)); opacity: var(--shade); }
.hero-lock.leaf-off #leaf-front > * { visibility: hidden; }
.inner.leaf-inner { left: 0; margin-left: 0; height: var(--sh); background: none; }
.leaf-front .status-bar .sb-left { opacity: 1; color: var(--text); }

/* Cover display (front of the folded phone): lock screen, then the incoming call */
.cover {
  position: absolute; inset: 0; z-index: 5; overflow: hidden; color: #fff; border-radius: inherit; opacity: var(--cover);
  background: radial-gradient(130% 80% at 50% 0%, #3a3ea6 0%, #1b1d50 38%, #0a0b1e 72%, #05060f 100%);
}
#cover-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.cam { position: absolute; z-index: 7; top: 17px; left: 50%; width: 11px; height: 11px; margin-left: -5.5px; border-radius: 50%; background: #000; box-shadow: inset 0 0 0 2px #1c1c20, 0 0 0 1.5px rgba(255, 255, 255, 0.06); }
.status-bar {
  position: absolute; z-index: 6; top: 0; left: 0; right: 0; height: 54px; padding: 2px 30px 0;
  display: flex; align-items: center; justify-content: space-between; pointer-events: none;
  font-size: 0.9375rem; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums;
}
.sb-left { opacity: var(--h); transition: color 0.3s; }
.sb-right { display: flex; align-items: center; gap: 6px; font-size: 0.8125rem; }
.hero-lock.sb-split .sb-left { color: var(--text); }
.screen-progress { position: absolute; z-index: 6; top: 0; left: 0; height: 3px; width: 100%; transform: scaleX(var(--ip)); transform-origin: 0 50%; background: var(--g2); opacity: var(--tabs); }
.home-ind { position: absolute; z-index: 7; left: 50%; bottom: 8px; translate: -50% 0; width: 32%; max-width: 140px; height: 5px; border-radius: 3px; background: #fff; mix-blend-mode: difference; }
.hero-lock.book:not(.flat) .screen .home-ind { display: none; }

/* Phones: a book fold doesn't fit a portrait screen, so the phone simply grows to full width */
.hero-lock:not(.book) .device { width: calc(var(--w0) + (var(--w1) - var(--w0)) * var(--u)); perspective: none; }
.hero-lock:not(.book) .half-right { left: 0; padding: 5px; border-radius: 52px; }
.hero-lock:not(.book) .half-right .bezel { border-radius: 47px; }
.hero-lock:not(.book) .screen { clip-path: none; }
.hero-lock:not(.book) .leaf, .hero-lock:not(.book) .half-left, .hero-lock:not(.book) .cover-sb { display: none; }

/* Photos: lock-screen wallpaper (PROFILE.cover) and the grey studio headshot on the home screen */
.hero-lock.has-photo #morph-canvas, .hero-lock.has-photo #cover-canvas { display: none; }
/* object-position (from PROFILE.coverPosition) pins one point of the photo in place on any screen shape */
.hero-lock.has-photo .cover { container-type: size; background: #1b1b1e; }
/* Dark photo: soft top/bottom scrims (like iOS) keep the white text readable over bright parts of the image */
.hero-lock.has-photo:not(.cover-light) .cover::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.18) 28%, transparent 42%, transparent 68%, rgba(0, 0, 0, 0.35) 100%);
}
.hero-lock.has-photo:not(.cover-light) .lk-name,
.hero-lock.has-photo:not(.cover-light) .lk-time,
.hero-lock.has-photo:not(.cover-light) .lk-role { text-shadow: 0 1px 14px rgba(0, 0, 0, 0.45); }
.cover-photo { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 31%; }
/* Compact lock screen so the face stays visible between the clock and the notifications */
.hero-lock.has-photo .lk-time { font-size: calc(var(--dh) * 0.12); }
.hero-lock.has-photo .lk-notes { gap: 6px; }
.hero-lock.has-photo .note { padding: 8px 12px 8px 8px; border-radius: 16px; align-items: center; gap: 10px; }
.hero-lock.has-photo .note .logo-tile { width: 30px; border-radius: 8px; font-size: 12px; }
.hero-lock.has-photo .note-body { display: none; }
.hero-lock.has-photo .note-main { display: flex; align-items: baseline; gap: 7px; }
.hero-lock.has-photo .note-top { display: contents; }
.hero-lock.has-photo .note-top span:first-child { order: 1; white-space: nowrap; }
.hero-lock.has-photo .note-title { order: 2; flex: 1; min-width: 0; font-size: 0.8125rem; font-weight: 500; opacity: 0.75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-lock.has-photo .note-top span:last-child { order: 3; }
@container (max-width: 400px) {
  .hero-lock.has-photo .note-main { display: block; }
  .hero-lock.has-photo .note-top { display: flex; }
  .hero-lock.has-photo .note-title { opacity: 1; font-weight: 600; white-space: normal; }
}
/* Light lock-screen photo: dark text and light glass buttons */
.hero-lock.cover-light .cover { background: #e7e7ea; color: #1d1d1f; }
.hero-lock.cover-light .cover .lk-btn, .hero-lock.cover-light .cover .lk-pill {
  color: #111; background: rgba(255, 255, 255, 0.66);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 6px 16px -8px rgba(0, 0, 0, 0.25);
}
.hero-lock.cover-light .cover .lk-btn:hover { background: rgba(255, 255, 255, 0.88); }
.hero-lock.cover-light .cover .home-ind { background: #111; mix-blend-mode: normal; }
.hero-lock.cover-light.calling .cover .home-ind { background: #fff; }
.hero-lock.cover-light .cover-sb, .hero-lock.cover-light.sb-split .sb-right { color: #111; }
.hero-lock.has-photo .home-hud span { background: rgba(20, 20, 24, 0.55); }

.home-photo { position: relative; z-index: 0; grid-column: 2; grid-row: 1; overflow: hidden; background: #e4e4e7; }
.home-photo img, .home-photo .det { position: absolute; inset: 0; width: 100%; height: 100%; }
.home-photo img { object-fit: cover; object-position: 50% 50%; }
@container inner (max-width: 720px) { .hero-lock:not(.book) .home-photo { grid-column: 1; grid-row: 2; } }

/* Detection overlay: the box locks on, keypoints pop in and keep pulsing */
.det { pointer-events: none; }
.det path { fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.det-box { stroke: #0a84ff; stroke-width: 2.5; transform-box: fill-box; transform-origin: center; }
.det-bones { stroke: rgba(255, 255, 255, 0.9); stroke-width: 1.5; }
.det-label rect { fill: #0a84ff; }
.det-label text { fill: #fff; font-family: var(--font-mono); font-weight: 600; letter-spacing: 0; }
.det-person { stroke: #64d2ff; stroke-width: 2; }
.det-label-person rect { fill: #64d2ff; }
.det-label-person text { fill: #0b0b0d; }
.kp { stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; transform-box: fill-box; transform-origin: center; }
.kp-face { fill: #ff375f; }
.kp-body { fill: #0a84ff; }
.det > * { opacity: 0; }
.hero-lock.det-on .det-box { animation: det-lock 0.8s var(--spring) 0.35s both; }
.hero-lock.det-on .det-person { animation-delay: 0s; }
.hero-lock.det-on .det-label { animation: det-fade 0.4s var(--ease) 0.8s both; }
.hero-lock.det-on .det-label-person { animation-delay: 0.5s; }
.hero-lock.det-on .det-bones { animation: det-fade 0.6s var(--ease) 1s both; }
.hero-lock.det-on .kp {
  animation: kp-in 0.45s var(--spring) both, kp-pulse 2.4s ease-in-out infinite;
  animation-delay: calc(0.6s + var(--i) * 70ms), calc(1.5s + var(--i) * 140ms);
}
@keyframes det-lock { 0% { opacity: 0; transform: scale(1.25); } 60% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes det-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes kp-in { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: none; } }
@keyframes kp-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.35); } }

.avatar img, .call-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.call-avatar { overflow: hidden; }

/* Lock screen */
.screen-lock {
  position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 60px 14px 22px;
  opacity: var(--lockv); transform: translateY(calc(var(--k) * -70px)) scale(calc(1 - var(--k) * 0.04));
}
.hero-lock.unlocking .screen-lock { pointer-events: none; }
.lk-name { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.01em; opacity: 0.92; margin-top: 4px; }
.lk-time { font-family: var(--font-cond); font-stretch: 62%; font-weight: 800; line-height: 0.95; font-variant-numeric: tabular-nums; font-size: calc(var(--dh) * 0.15); margin-top: 2px; }
.lk-role { font-size: 0.875rem; font-weight: 500; opacity: 0.8; margin-top: 6px; }
.lk-notes { margin-top: auto; width: 100%; display: grid; gap: 8px; }
.note {
  display: flex; gap: 11px; align-items: flex-start; padding: 11px 13px 12px 11px; border-radius: 22px; text-align: left;
  color: #1d1d1f; background: rgba(246, 246, 248, 0.8);
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
[data-theme="dark"] .note { color: #fff; background: rgba(44, 44, 48, 0.64); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08); }
.note .logo-tile { width: 38px; border-radius: 10px; font-size: 14px; }
.note-main { flex: 1; min-width: 0; }
.note-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 0.8125rem; font-weight: 600; letter-spacing: -0.01em; }
.note-top span:last-child { font-size: 0.75rem; font-weight: 400; opacity: 0.55; white-space: nowrap; }
.note-title { font-size: 0.875rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.012em; }
.note-body { font-size: 0.8125rem; line-height: 1.32; opacity: 0.75; margin-top: 1px; }
.lk-bottom { width: 100%; display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding: 0 12px; }
.lk-btn, .lk-pill {
  color: #fff; background: rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.lk-btn { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; transition: background 0.2s, transform 0.2s var(--ease); }
.lk-btn:hover { background: rgba(255, 255, 255, 0.26); transform: scale(1.06); }
.lk-btn .i { width: 20px; height: 20px; }
.lk-pill { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 999px; font-size: 0.8125rem; font-weight: 500; white-space: nowrap; }
.lk-pill .i { width: 14px; height: 14px; animation: nudge 1.6s var(--ease-out) infinite; }
@keyframes nudge { 0%, 100% { transform: none; } 50% { transform: translateY(3px); } }

/* Incoming call (end of the page) */
.screen-call {
  position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 78px 22px 34px; background: #0b0b0d; color: #fff; opacity: var(--callv); pointer-events: none;
}
.hero-lock.calling .screen-call { pointer-events: auto; }
.call-name { font-family: var(--font-cond); font-stretch: 62%; font-weight: 800; text-transform: uppercase; line-height: 0.9; font-size: 3.4rem; }
.call-sub { margin-top: 12px; font-size: 0.9375rem; font-weight: 500; color: rgba(235, 235, 245, 0.85); }
.call-avatar {
  margin: auto 0; width: min(170px, 48%); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(180deg, #a6abb6, #80858f); color: #fff;
  font-family: var(--font-display); font-weight: 600; font-size: 3.4rem; letter-spacing: -0.02em;
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.05);
}
.call-slider { position: relative; width: 100%; max-width: 360px; height: 66px; border-radius: 999px; background: #2a2a2d; display: flex; align-items: center; justify-content: center; }
.call-hint {
  padding-left: 44px; font-size: 1rem; font-weight: 500; color: transparent;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.4) 0%, #fff 50%, rgba(255, 255, 255, 0.4) 100%) 0 0 / 200% 100%;
  -webkit-background-clip: text; background-clip: text; animation: shine 2.6s linear infinite;
}
@keyframes shine { to { background-position: -200% 0; } }
.call-knob {
  position: absolute; z-index: 1; left: 5px; top: 5px; width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; background: #30d158; color: #fff; cursor: grab; touch-action: none;
  box-shadow: 0 6px 16px -4px rgba(48, 209, 88, 0.55);
}
.call-knob.snap { transition: transform 0.45s var(--spring); }
.call-knob:active { cursor: grabbing; }
.call-knob .i { width: 24px; height: 24px; }
.call-mail { margin-top: 16px; font: 500 12px/1.4 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: #fff; opacity: 0.9; }
.call-mail:hover { text-decoration: underline; text-underline-offset: 3px; }

/* In-device tab bar */
.tabbar {
  position: absolute; z-index: 6; left: 50%; bottom: 24px; translate: -50% 0;
  display: flex; gap: 2px; padding: 4px; border-radius: 999px;
  background: rgba(36, 36, 40, 0.55);
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 10px 26px -10px rgba(0, 0, 0, 0.6);
  opacity: var(--tabs); pointer-events: none;
}
.hero-lock.tabs-on .tabbar { pointer-events: auto; }
.tabbar button { position: relative; z-index: 1; padding: 8px 15px; border-radius: 999px; font-size: 0.875rem; font-weight: 500; color: #fff; white-space: nowrap; transition: color 0.25s; }
.tabbar button.active { color: #111; }
.tab-thumb { position: absolute; left: 0; top: 4px; bottom: 4px; width: 0; border-radius: 999px; background: #fff; transition: transform 0.5s var(--spring), width 0.5s var(--spring); }

.frame-dots {
  position: relative; z-index: 2; display: flex; gap: 8px; padding: 6px 8px; border-radius: 999px;
  background: var(--glass-bg-strong); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 0 0 0.5px var(--glass-ring), 0 8px 20px -10px rgba(0, 0, 0, 0.25);
}
.frame-dots button { width: 20px; height: 20px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15); transition: box-shadow 0.2s; }
.frame-dots button.active { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15), 0 0 0 2px var(--bg), 0 0 0 3.5px var(--text); }
.frame-dots [data-frame="natural"] { --c: #cfc9c1; }
.frame-dots [data-frame="black"] { --c: #4b4b4f; }
.frame-dots [data-frame="desert"] { --c: #d4ab97; }
.frame-dots [data-frame="sage"] { --c: #a9b7a1; }

/* Scrolling content inside the device */
.inner {
  --ink: #f5f5f7; --ink-2: rgba(235, 235, 245, 0.66); --panel: #0b0b0d; --tile: #1b1b1e;
  position: absolute; top: 0; left: 50%; width: var(--iw); margin-left: calc(var(--iw) / -2);
  container: inner / inline-size; background: var(--panel); color: var(--ink); will-change: transform;
}
.inner strong { color: #fff; }
.ds { position: relative; padding: 64px clamp(22px, 4.4cqi, 56px); background: var(--panel); }
.d-eyebrow { font: 500 12px/1.4 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; }
.d-h2 { font-family: var(--font-cond); font-stretch: 62%; font-weight: 800; text-transform: uppercase; line-height: 0.9; font-size: clamp(2.6rem, 9cqi, 7rem); }
.d-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 13px 22px; border-radius: 999px; white-space: nowrap;
  font-size: 0.9375rem; font-weight: 600; background: #111; color: #fff; transition: transform 0.2s var(--ease), background 0.2s;
}
.d-btn:hover { transform: translateY(-1px); }
.d-btn .i { width: 15px; height: 15px; stroke-width: 2.4; }
.d-btn-2 { background: rgba(0, 0, 0, 0.06); color: #111; }
.d-btn-ghost { background: rgba(255, 255, 255, 0.1); color: #fff; }
[data-theme="dark"] .home-panel .d-btn { background: #fff; color: #111; }
[data-theme="dark"] .home-panel .d-btn-2 { background: rgba(255, 255, 255, 0.1); color: #fff; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { padding: 10px 18px; border-radius: 999px; background: var(--tile); color: #fff; font-size: 0.9375rem; font-weight: 500; }
.pill-sm { padding: 6px 12px; font-size: 0.8125rem; }

/* Home */
.ds-home {
  /* rows locked to the screen height so the panel and photo always end together (no overflow into About) */
  height: var(--sh); padding: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr);
  container: home / size;
  background: radial-gradient(130% 80% at 50% 0%, #3a3ea6 0%, #1b1d50 38%, #0a0b1e 72%, #05060f 100%);
}
.ds-home #morph-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.home-panel {
  position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: flex-end; justify-content: safe flex-end; text-align: left; color: var(--text);
  padding: 72px clamp(24px, 4cqi, 56px) 96px; background: var(--bg-elev); min-height: 0; overflow: hidden;
  transform: translateX(calc((var(--h) - 1) * 100%));
}
.home-panel > * { opacity: calc((var(--h) - 0.45) * 1.8); }
.home-panel .d-eyebrow { color: var(--text-2); }
.home-name { font-family: var(--font-cond); font-stretch: 62%; font-weight: 800; text-transform: uppercase; line-height: 0.88; font-size: min(8.4cqi, calc(var(--sh) * 0.17), 7rem); margin-top: 14px; }
.home-tag { margin-top: 18px; max-width: 460px; color: var(--text-2); font-size: 1rem; line-height: 1.5; }
.home-ctas { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.home-now { display: flex; flex-wrap: wrap; gap: 14px 22px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--hairline); }
.now-item { display: flex; align-items: center; gap: 10px; }
.now-item .logo-tile { width: 32px; border-radius: 8px; font-size: 12px; }
.now-item strong { display: block; font-size: 0.875rem; font-weight: 600; line-height: 1.25; color: var(--text); }
.now-item small { display: block; font-size: 0.75rem; color: var(--text-2); line-height: 1.25; }
.home-hud { position: absolute; z-index: 1; right: 22px; bottom: 80px; display: flex; gap: 8px; opacity: var(--h); }
.home-hud span {
  padding: 6px 12px; border-radius: 999px; color: #fff; background: rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  font: 600 11px/1.2 var(--font-mono); letter-spacing: 0.02em; font-variant-numeric: tabular-nums;
}

/* About */
.ds-about { padding-top: 76px; }
.d-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 26px; padding-bottom: 44px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.d-stat b { display: block; font-family: var(--font-cond); font-stretch: 62%; font-weight: 800; line-height: 0.95; font-size: clamp(2.8rem, 7.4cqi, 5.75rem); font-variant-numeric: tabular-nums; }
.d-stat span { display: block; margin-top: 12px; font: 500 12px/1.4 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.d-bio { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(28px, 4cqi, 56px); margin-top: 48px; }
.d-bio .d-h2 { font-size: clamp(2.4rem, 5.4cqi, 4.5rem); }
.d-bio-text p { color: var(--ink-2); font-size: 1.0625rem; line-height: 1.55; margin-bottom: 16px; }
.d-bio-text .pills { margin-top: 20px; }
.d-edu { margin-top: 24px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.1); font: 500 12px/1.7 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }

/* Work */
.ds-work-head { padding-top: 76px; padding-bottom: 44px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.ds-work-head .d-h2 { font-size: clamp(3rem, 12cqi, 9rem); margin-top: 10px; }
.d-pill-btn { display: inline-flex; align-items: center; gap: 6px; padding: 12px 18px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); color: #fff; font-size: 0.9375rem; font-weight: 600; transition: background 0.2s; }
.d-pill-btn:hover { background: rgba(255, 255, 255, 0.18); }
.d-pill-btn .i { width: 15px; height: 15px; }
.ds-slide { padding: 0; height: var(--sh); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--slide); }
.slide-media { position: relative; overflow: hidden; background: #000; }
.slide-media > img, .slide-media > video { display: block; width: 100%; height: 100%; object-fit: cover; }
.slide-media .ph { --ph-base: color-mix(in srgb, var(--slide) 22%, #0b0b0d); }
.slide-media .ph-icon { width: 36%; max-width: 170px; }
.slide-media .ph-tag { top: auto; bottom: 24px; left: 24px; }
.slide-info { display: flex; flex-direction: column; justify-content: space-between; gap: 16px; padding: clamp(26px, 3.4cqi, 44px) clamp(24px, 3.4cqi, 44px) 88px; color: #fff; overflow: hidden; }
.slide-num { font-family: var(--font-cond); font-stretch: 62%; font-weight: 800; line-height: 0.8; font-size: min(15cqi, calc(var(--sh) * 0.26)); }
.slide-copy .d-eyebrow { opacity: 0.85; }
.slide-title { font-family: var(--font-cond); font-stretch: 62%; font-weight: 800; text-transform: uppercase; line-height: 0.92; font-size: min(4.6cqi, calc(var(--sh) * 0.075)); margin-top: 10px; }
.slide-hook { margin-top: 12px; max-width: 46ch; font-size: 1rem; line-height: 1.45; color: rgba(255, 255, 255, 0.88); }
.slide-metrics { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 16px; }
.slide-metrics span { font: 500 11px/1.3 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255, 255, 255, 0.8); max-width: 16ch; }
.slide-metrics b { display: block; font-family: var(--font-cond); font-stretch: 62%; font-weight: 800; font-size: 1.75rem; line-height: 1; letter-spacing: 0; color: #fff; text-transform: none; margin-bottom: 4px; }
.slide-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; font: 600 12px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: #fff; }
.slide-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.slide-link .i { width: 14px; height: 14px; stroke-width: 2.4; }
.more-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.m-card { display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: 18px; text-align: left; background: var(--tile); color: #fff; transition: background 0.2s, transform 0.3s var(--ease-out); }
.m-card:hover { background: #26262a; transform: translateY(-2px); }
.m-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.m-card .app-icon { width: 40px; border-radius: 10px; }
.m-card .app-icon svg { width: 24px; height: 24px; stroke-width: 3.6; }
.m-metric { font: 500 12px/1.2 var(--font-mono); color: var(--ink-2); text-align: right; }
.m-card h4 { font-size: 1rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.012em; }
.m-card p { font-size: 0.875rem; line-height: 1.45; color: var(--ink-2); }

/* What I do */
.svc-list { display: grid; gap: 10px; margin-top: 22px; }
.svc { display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; gap: 18px; padding: 24px; border-radius: 16px; background: var(--tile); }
.svc-n { font: 500 12px/2 var(--font-mono); color: var(--ink-2); }
.svc-t { font-family: var(--font-cond); font-stretch: 62%; font-weight: 800; text-transform: uppercase; line-height: 1; font-size: clamp(1.6rem, 3.2cqi, 2.4rem); }
.svc-d { padding-top: 4px; font-size: 0.9375rem; line-height: 1.5; color: var(--ink-2); }

/* Experience + credentials */
.xp-list { display: grid; margin-top: 28px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.xp { display: grid; grid-template-columns: 170px minmax(0, 1fr) minmax(0, 0.9fr); gap: 20px; align-items: start; padding: 24px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.xp-when { font: 500 12px/1.6 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.xp-when em { display: block; font-style: normal; color: #30d158; }
.xp-role { font-family: var(--font-cond); font-stretch: 62%; font-weight: 800; text-transform: uppercase; line-height: 1; font-size: clamp(1.5rem, 3cqi, 2.25rem); }
.xp-co { margin-top: 6px; font-size: 0.9375rem; color: rgba(255, 255, 255, 0.9); }
.xp-side { font-size: 0.875rem; color: var(--ink-2); }
.xp-side .pills { margin-top: 10px; }
.ds-trusted { padding-top: 24px; }
.ds-trusted .pills { margin: 18px 0 44px; }

.ds-cta { padding-top: 8px; padding-bottom: 112px; }
.cta-card {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: clamp(24px, 3.6cqi, 40px) clamp(24px, 3cqi, 36px); border-radius: 22px; background: #fff; color: #111;
}
.cta-card h2 { font-family: var(--font-cond); font-stretch: 62%; font-weight: 800; text-transform: uppercase; line-height: 0.95; font-size: clamp(1.8rem, 4cqi, 3rem); }

@container inner (max-width: 720px) {
  /* stacked home (text over photo) only on real phones; an unfolded laptop device stays side by side */
  .hero-lock:not(.book) .ds-home { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .hero-lock:not(.book) .home-panel { justify-content: flex-start; padding: 64px 22px 22px; transform: translateY(calc((var(--h) - 1) * 100%)); }
  .hero-lock:not(.book) .home-name { font-size: 3rem; }
  .home-tag { display: none; }
  .home-ctas { flex-wrap: nowrap; margin-top: 20px; }
  .home-ctas .d-btn { padding: 12px 17px; font-size: 0.875rem; }
  .hero-lock.has-photo .home-now { display: none; } /* roles are already on the lock screen; give the photo room */
  .hero-lock:not(.book) .home-hud { left: 16px; right: auto; bottom: 74px; }
  .d-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
  .d-bio { grid-template-columns: 1fr; }
  /* stacked slides only on real phones; an unfolded laptop device is landscape, so it keeps them side by side */
  .hero-lock:not(.book) .ds-slide { grid-template-columns: 1fr; grid-template-rows: 38% 62%; }
  .hero-lock:not(.book) .slide-info { gap: 10px; padding-top: 22px; padding-bottom: 76px; }
  .hero-lock:not(.book) .slide-num { font-size: calc(var(--sh) * 0.085); }
  .hero-lock:not(.book) .slide-title { font-size: 1.6rem; margin-top: 8px; }
  .hero-lock:not(.book) .slide-hook { margin-top: 8px; font-size: 0.875rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .hero-lock:not(.book) .slide-metrics { display: none; }
  .hero-lock:not(.book) .slide-link { margin-top: 12px; }
  .more-cards { grid-template-columns: 1fr; }
  .svc { grid-template-columns: 1fr; gap: 6px; }
  .xp { grid-template-columns: 1fr; gap: 8px; }
}
@container inner (min-width: 721px) and (max-width: 980px) {
  .more-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Short laptop screens (e.g. 15.6" at 125% scaling, 14" at 150%): each slide is one screen tall,
   so compact its text block by the slide's own height. Laptop (book) layout only; phones stack slides. */
.ds-slide { container: slide / size; }
@container slide (max-height: 640px) {
  .book .slide-info { gap: 10px; padding-top: 24px; padding-bottom: 76px; }
  .book .slide-num { font-size: min(11cqi, 19cqh); }
  .book .slide-title { font-size: min(4cqi, 7cqh); margin-top: 8px; }
  .book .slide-hook { margin-top: 8px; font-size: 0.875rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .book .slide-metrics { margin-top: 12px; gap: 6px 18px; flex-wrap: nowrap; }
  .book .slide-metrics span { min-width: 0; }
  .book .slide-metrics span:nth-child(n + 3) { display: none; }
  .book .slide-metrics b { font-size: 1.4rem; }
  .book .slide-link { margin-top: 12px; }
}
@container slide (max-height: 500px) {
  .book .slide-info { gap: 8px; padding-top: 20px; padding-bottom: 70px; }
  .book .slide-num { font-size: 14cqh; }
  .book .slide-copy .d-eyebrow { display: none; }
  .book .slide-title { font-size: min(3.6cqi, 6.2cqh); }
  .book .slide-hook { -webkit-line-clamp: 2; }
  .book .slide-metrics span { font-size: 10px; }
  .book .slide-metrics b { font-size: 1.2rem; }
}
/* Lock screen on short laptop screens */
@media (min-width: 761px) and (max-height: 660px) {
  .screen-lock { padding-top: 52px; padding-bottom: 16px; }
  .lk-notes { gap: 6px; }
  .note { padding: 9px 12px 10px 10px; }
  .lk-bottom { margin-top: 10px; }
  .lk-btn { width: 40px; height: 40px; }
}
@media (max-height: 760px) { .note-body { display: none; } }
/* Home screen: show the tagline only when the screen is tall enough for it, and tighten on short screens */
@container home (max-height: 720px) { .home-tag { display: none; } }
@container home (max-height: 540px) {
  .home-panel { padding-top: 56px; padding-bottom: 84px; }
  .home-ctas { margin-top: 18px; }
  .home-now { margin-top: 18px; padding-top: 14px; gap: 10px 18px; }
}
@media (max-width: 900px) {
  .cv-stage { padding: 84px 20px 76px; }
  .cv-row { justify-content: center; flex-wrap: wrap; gap: 30px 16px; padding: 0; }
  .cv-row > * { translate: none !important; }
  .cv-row-top { margin-top: 40px; margin-bottom: 8px; }
  .cv-row-bottom { margin-top: 18px; row-gap: 44px; }
  .cv-headline { margin-top: 40px; }
}
@media (max-width: 760px) {
  .hero-lock {
    --dh: clamp(520px, calc(100svh - var(--nav-h) - var(--nav-top) - 40px), 760px);
    --w0: min(calc(var(--dh) * 0.48), 100vw - 76px);
    --w1: calc(100vw - 30px);
  }
  .device-glow { inset: -50px -40px; filter: blur(32px); }
  .frame-dots { display: none; }
  .note-body { display: none; }
  .lk-bottom { padding: 0 6px; }
  .lk-btn { width: 42px; height: 42px; }
  .lk-pill { padding: 9px 14px; }
  .tab-wide { display: none; }
  .call-name { font-size: 2.8rem; }
}
@media (max-width: 640px) {
  .hero-canvas { padding: calc(var(--nav-h) + var(--nav-top) + 10px) 8px 0; }
  .cv-board { --ruler: 18px; border-radius: var(--r-lg); background-size: 32px 32px; min-height: calc(100svh - var(--nav-h) - var(--nav-top) - 18px); }
  .cv-ruler span { display: none; }
  .cv-stats { display: none; }
  .cv-clock { font-size: 11px; }
  .cv-target { padding: 2px 14px 8px; }
  .cv-det { padding: 8px 14px 8px 8px; }
  .cv-cursor { font-size: 12px; padding: 10px 16px; }
  .variant-switch button { padding: 7px 11px; font-size: 0.8125rem; }
}

/* Theme switch: circular reveal (see main.js) */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) and (min-width: 901px) {
  .logo-text { display: none; }
  .nav-links a { padding: 8px 12px; }
}
@media (max-width: 1080px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .more-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-card { max-width: 480px; }
  .chip-a { right: -8px; }
  .chip-b { translate: -12px 0; top: auto; bottom: 28px; }
}
@media (max-width: 900px) {
  .nav-links {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 8px; border-radius: 24px;
    background: var(--glass-bg-strong);
    -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: inset 0 1px 0 var(--glass-hi), 0 0 0 0.5px var(--glass-ring), 0 24px 60px -16px rgba(0, 0, 0, 0.3);
    opacity: 0; transform: translateY(-8px) scale(0.98); transform-origin: top center; pointer-events: none;
    transition: opacity 0.22s var(--ease), transform 0.35s var(--spring);
  }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { padding: 13px 16px; font-size: 1.0625rem; border-radius: 16px; }
  .nav-links a.active { background: var(--fill); }
  .nav-indicator { display: none; }
  .nav-toggle { display: flex; }
  .projects-grid { grid-template-columns: 1fr; }
  .ach-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  :root { --nav-top: 8px; --nav-h: 52px; }
  .container { width: calc(100% - 32px); }
  .nav { padding: 0 8px; }
  .logo-text { display: none; }
  .section { padding: 88px 0; }
  .section-head { margin-bottom: 40px; }
  .hero { padding-top: calc(var(--nav-h) + var(--nav-top) + 56px); }
  .hero-ctas .btn { flex: 1 1 0; min-width: 0; }
  .hero-ctas { width: 100%; max-width: 360px; }
  .hero-visual { margin-top: 56px; }
  .window-title { display: none; }
  .terminal-body { font-size: 0.6875rem; min-height: 250px; padding: 16px 16px 20px; }
  .chip-b { display: none; }
  .chip-a { right: 4px; top: -18px; }
  .float-chip { font-size: 0.75rem; padding: 7px 12px 7px 10px; }
  .stats { padding: 72px 0 88px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); border-radius: var(--r-lg); }
  .stat { padding: 26px 12px 24px; }
  .skills-grid, .more-grid { grid-template-columns: 1fr; }
  .pc-body { padding: 22px 22px 24px; }
  .pc-title { font-size: 1.3125rem; }
  .tl-meta { text-align: left; }
  .tl-period { justify-content: flex-start; }
  .timeline { padding-left: 28px; }
  .timeline::before { left: 5px; }
  .tl-dot { left: -28px; width: 14px; height: 14px; }
  .tl-card { padding: 24px 22px; border-radius: var(--r-lg); }
  .contact-card { padding: 64px 22px; border-radius: var(--r-xl); }
  .contact-actions .btn { width: 100%; max-width: 320px; }
  .cert { padding: 16px 18px; }
  .cert + .cert::before { left: 74px; }
  .modal { padding: 0; align-items: end; }
  .modal-panel { max-height: calc(100dvh - 24px); height: calc(100dvh - 24px); border-radius: 24px 24px 0 0; }
  .modal-body { padding: 26px 22px 6px; }
  .modal-nav { padding: 18px 22px 26px; }
  .modal-count { font-size: 0.75rem; }
  .modal-metrics { grid-template-columns: repeat(2, 1fr); }
  .metric-val { font-size: 1.5rem; }
  .mm-caption { font-size: 0.75rem; left: 10px; bottom: 10px; max-width: calc(100% - 20px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
