/* ============================================================
   SRINIDHI BHAT — Portfolio
   Warm editorial · Fraunces serif · burnt-coral accent
   ============================================================ */

:root {
  /* ---- light theme (default) ---- */
  --ink: #f6f4ef;          /* warm porcelain body surface */
  --ink-2: #ffffff;
  --ink-3: #ece6d8;
  --bone: #171b28;         /* near-black navy text on light */
  --bone-dim: rgba(23, 27, 40, 0.6);
  --line: rgba(23, 27, 40, 0.12);
  --paper: #12172a;        /* inverted panel — dark navy on light theme */
  --paper-ink: #e9ecf5;
  --paper-dim: rgba(233, 236, 245, 0.62);
  --paper-line: rgba(233, 236, 245, 0.14);
  --accent: #3163e6;       /* deepened azure for AA contrast on light */
  --accent-2: #0891b2;
  --accent-soft: rgba(49, 99, 230, 0.12);
  --note-bg: #ffcf86;      /* sticky-note yellow (constant across themes) */
  --note-bg-2: #ffb37e;    /* sticky-note peach */
  --note-ink: #3a2210;     /* coffee-brown text on notes */
  --note-line: rgba(58, 34, 16, 0.28);
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Space Grotesk', system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pad: clamp(1.25rem, 4vw, 4.5rem);
}
:root[data-theme="dark"] {
  --ink: #0b1020;          /* deep midnight navy base */
  --ink-2: #10162a;
  --ink-3: #18213c;
  --bone: #dbe2f0;         /* cool off-white on dark */
  --bone-dim: rgba(219, 226, 240, 0.54);
  --line: rgba(219, 226, 240, 0.13);
  --paper: #e6e9f2;        /* cool porcelain panel */
  --paper-ink: #12172a;    /* navy text on porcelain */
  --paper-dim: rgba(18, 23, 42, 0.55);
  --paper-line: rgba(18, 23, 42, 0.14);
  --accent: #4d84ff;       /* azure */
  --accent-2: #38bdf8;     /* sky cyan (sparing) */
  --accent-soft: rgba(77, 132, 255, 0.16);
}
/* islands that intentionally stay dark regardless of site theme:
   the nav glass, terminal-style vibe cards, and full-bleed media viewers */
.vcard, .cv, .lightbox {
  --ink: #0b1020;
  --ink-2: #10162a;
  --ink-3: #18213c;
  --bone: #dbe2f0;
  --bone-dim: rgba(219, 226, 240, 0.54);
  --line: rgba(219, 226, 240, 0.13);
}

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

html { scroll-behavior: smooth; }
html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }

body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--ink-3); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
em { font-style: italic; }

/* ===== Grain ===== */
.grain {
  position: fixed; inset: -50%;
  width: 200%; height: 200%;
  pointer-events: none;
  z-index: 9990;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainShift 0.8s steps(4) infinite;
}
@keyframes grainShift {
  0% { transform: translate(0, 0); } 25% { transform: translate(-2%, 3%); }
  50% { transform: translate(3%, -2%); } 75% { transform: translate(-3%, -3%); }
  100% { transform: translate(2%, 2%); }
}

/* ===== Preloader ===== */
.preloader {
  position: fixed; inset: 0;
  background: var(--ink);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
}
html.js .preloader { display: flex; }
.preloader-inner { text-align: center; width: min(80vw, 460px); }
.preloader-name {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(2rem, 6vw, 3.6rem);
  letter-spacing: -0.01em;
  overflow: hidden;
}
.preloader-name .pl-w { display: inline-block; }
.preloader-bar {
  margin-top: 1.5rem;
  height: 1px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}
.preloader-bar span {
  position: absolute; inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}
.preloader-count {
  position: absolute;
  bottom: clamp(1.5rem, 5vh, 3.5rem);
  right: var(--pad);
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--accent);
}

/* ===== Cursor ===== */
.cursor {
  position: fixed; top: 0; left: 0;
  width: 12px; height: 12px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: center;
  transition: width 0.35s var(--ease), height 0.35s var(--ease), background-color 0.25s;
}
.cursor.is-hover { width: 52px; height: 52px; background: rgba(219,226,240,0.18); backdrop-filter: invert(0.05); }
.cursor.is-view { width: 92px; height: 92px; background: var(--accent); }
.cursor-label {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  color: #fff;
  opacity: 0;
  text-transform: uppercase;
}
.cursor.is-view .cursor-label { opacity: 1; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ===== Card hover preview (peek at first 3 case-study pages) ===== */
.card-preview {
  position: fixed; top: 0; left: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}
.card-preview.is-visible { opacity: 1; }
.card-preview-item {
  position: absolute; top: 0; left: 0;
  width: 132px; aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  border: 3px solid var(--bone);
  box-shadow: 0 18px 34px -12px rgba(0,0,0,0.6);
  background: var(--ink-2);
}
.card-preview-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-preview-item:nth-child(1) { transform: translate(-50%, -50%) rotate(-8deg) translate(-30px, -10px); z-index: 1; }
.card-preview-item:nth-child(2) { transform: translate(-50%, -50%) rotate(4deg) translate(6px, 2px); z-index: 2; }
.card-preview-item:nth-child(3) { transform: translate(-50%, -50%) rotate(-3deg) translate(34px, 20px); z-index: 3; }
@media (hover: none), (pointer: coarse) { .card-preview { display: none; } }

/* ===== Nav ===== */
.nav {
  position: fixed;
  top: clamp(0.85rem, 2vw, 1.35rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1.5rem, 4vw, 3rem);
  width: min(calc(100% - 2rem), 1180px);
  padding: 0.6rem 0.7rem 0.6rem 1.5rem;
  border-radius: 999px;
  background: rgba(11, 16, 32, 0.6);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(219, 226, 240, 0.12);
  box-shadow: 0 14px 34px -16px rgba(0, 0, 0, 0.55);
}
.nav-logo {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  color: #fff;
}
.nav-logo span { color: var(--accent); font-size: 0.7em; vertical-align: super; }
.nav-links {
  display: flex;
  gap: clamp(1.1rem, 2.6vw, 2.25rem);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
}
.nav-links a { position: relative; overflow: hidden; padding: 0.2rem 0; display: inline-block; }
.nav-links a span { display: inline-block; transition: transform 0.4s var(--ease); }
.nav-links a::after {
  content: attr(data-hover);
  position: absolute; left: 0; top: 100%;
}
.nav-links a::before {
  content: '';
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.nav-links a:hover::before { transform: scaleX(1); transform-origin: left; }
.nav-status {
  display: flex; align-items: center; gap: 0.55rem;
  font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 99px; padding: 0.5rem 1rem;
  transition: border-color 0.3s;
}
.nav-status:hover { border-color: #fff; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(77,132,255,0.5); }
  50% { box-shadow: 0 0 0 6px rgba(77,132,255,0); }
}
.nav-burger { display: none; flex-direction: column; gap: 6px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-burger span { width: 26px; height: 2px; background: #fff; transition: transform 0.35s var(--ease), opacity 0.3s; }

.theme-toggle {
  position: relative;
  flex-shrink: 0;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(219,226,240,0.25);
  background: rgba(219,226,240,0.06);
  color: #fff;
  display: grid; place-items: center;
  cursor: pointer;
  transition: background-color 0.3s, border-color 0.3s, transform 0.4s var(--ease);
}
.theme-toggle:hover { background: rgba(219,226,240,0.16); border-color: rgba(219,226,240,0.4); transform: rotate(-10deg); }
.theme-toggle svg { width: 18px; height: 18px; position: absolute; transition: opacity 0.3s, transform 0.4s var(--ease); }
.theme-toggle-sun { opacity: 0; transform: scale(0.5) rotate(-45deg); }
.theme-toggle-moon { opacity: 1; transform: scale(1) rotate(0deg); }
:root[data-theme="dark"] .theme-toggle-sun { opacity: 1; transform: scale(1) rotate(0deg); }
:root[data-theme="dark"] .theme-toggle-moon { opacity: 0; transform: scale(0.5) rotate(45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 0; background: var(--ink); z-index: 850;
  display: flex; flex-direction: column; justify-content: center; padding: var(--pad);
  clip-path: inset(0 0 100% 0); transition: clip-path 0.6s var(--ease);
}
.mobile-menu.is-open { clip-path: inset(0 0 0 0); }
.mobile-menu nav { display: flex; flex-direction: column; gap: 0.25rem; }
.mobile-menu nav a {
  font-family: var(--serif); font-weight: 400; font-size: clamp(2.6rem, 12vw, 4.5rem);
  line-height: 1.12; letter-spacing: -0.01em;
}
.mobile-menu nav a:nth-child(even) { font-style: italic; color: var(--accent); }
.mobile-menu-foot { margin-top: 3rem; color: var(--bone-dim); font-size: 0.9rem; }

/* ===== Shared bits ===== */
.kicker {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.kicker-ink { color: var(--accent); }

section { padding: clamp(5rem, 13vh, 9rem) var(--pad); position: relative; }

.section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 2rem; flex-wrap: wrap; margin-bottom: clamp(3rem, 7vh, 5rem);
}
.section-head .kicker { margin-bottom: 1.1rem; }
.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.8rem, 8vw, 7rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
}
.section-title em { font-style: italic; color: var(--accent); }
.section-note {
  color: var(--bone-dim);
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  max-width: 32ch; text-align: right;
  line-height: 1.6;
}

/* ===== Hero ===== */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: clamp(6rem, 13vh, 8rem) var(--pad) clamp(3.5rem, 8vh, 5rem);
  overflow: hidden;
}
.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
/* Cool aurora + blueprint mesh backdrop */
.hero-bg {
  position: absolute; inset: 0;
  z-index: 0; overflow: hidden;
  pointer-events: none;
}
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  will-change: transform;
}
.hero-orb-1 {
  width: 52vw; height: 52vw; max-width: 720px; max-height: 720px;
  right: -6%; top: 8%;
  background: radial-gradient(circle at 35% 35%, rgba(77,132,255,0.55), rgba(77,132,255,0) 68%);
  animation: orbFloat1 18s ease-in-out infinite;
}
.hero-orb-2 {
  width: 40vw; height: 40vw; max-width: 540px; max-height: 540px;
  left: -8%; bottom: -6%;
  background: radial-gradient(circle at 50% 50%, rgba(56,189,248,0.42), rgba(56,189,248,0) 66%);
  animation: orbFloat2 22s ease-in-out infinite;
}
@keyframes orbFloat1 {
  0%,100% { transform: translate(0,0) scale(1); }
  50%     { transform: translate(-5%, 6%) scale(1.08); }
}
@keyframes orbFloat2 {
  0%,100% { transform: translate(0,0) scale(1); }
  50%     { transform: translate(6%, -5%) scale(1.1); }
}
/* faint blueprint grid, faded out toward edges */
.hero-mesh {
  position: absolute; inset: -1px;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: clamp(48px, 6vw, 84px) clamp(48px, 6vw, 84px);
  -webkit-mask-image: radial-gradient(ellipse 70% 62% at 50% 44%, #000 0%, transparent 78%);
          mask-image: radial-gradient(ellipse 70% 62% at 50% 44%, #000 0%, transparent 78%);
  opacity: 0.6;
}
/* slow drifting scan sheen */
.hero-scan {
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 42%, rgba(219,226,240,0.05) 50%, transparent 58%);
  background-size: 220% 220%;
  animation: heroScan 12s linear infinite;
}
@keyframes heroScan {
  0%   { background-position: 120% 0; }
  100% { background-position: -60% 0; }
}
.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  grid-template-areas:
    "lead  figure"
    "bio   figure";
  align-items: start;
  column-gap: clamp(1rem, 3vw, 3rem);
  flex: 1;
  align-content: center;
}
.hero-lead { grid-area: lead; align-self: center; }
.hero-eyebrow {
  display: flex; gap: 1.25rem;
  font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--bone-dim); margin-bottom: 1.4rem;
}
.hero-eyebrow span { position: relative; padding-left: 1.4rem; }
.hero-eyebrow span::before {
  content: ''; position: absolute; left: 0; top: 50%; width: 0.9rem; height: 1px;
  background: var(--accent);
}
.hero-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.6rem, 12vw, 12rem);
  line-height: 0.9;
  letter-spacing: -0.035em;
}
.hero-name .hn-1 { display: block; animation: heroNameFloat 7.5s ease-in-out infinite; }
.hero-name .hn-2 { display: block; animation: heroNameFloat 8.5s ease-in-out infinite; animation-delay: -3.2s; }
.hero-name em { color: var(--accent); }
@keyframes heroNameFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
.hero-ast {
  display: inline-block;
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.22em;
  vertical-align: super;
  color: var(--accent-2);
  margin-left: 0.15em;
  animation: spin 9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.hero-role {
  margin-top: 1.6rem;
  font-family: var(--sans);
  font-size: clamp(0.95rem, 1.7vw, 1.25rem);
  letter-spacing: 0.02em;
  color: var(--bone);
}

.hero-figure {
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  right: 0;
  width: clamp(230px, 40%, 460px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}
.hero-figure img { height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.hero-cut {
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 30px 50px rgba(0,0,0,0.5));
}

.hero-bio {
  grid-area: bio;
  align-self: end;
  max-width: 38ch;
  padding-top: 2rem;
}
.hero-bio p {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  color: var(--bone-dim);
  line-height: 1.65;
}
.hero-bio p em { color: var(--bone); font-style: italic; }
.hero-bio-ctas { display: flex; align-items: center; gap: 1.5rem; margin-top: 1.6rem; }
.hero-cta {
  display: inline-flex; align-items: center; gap: 0.7rem;
  font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase;
  border-bottom: 1px solid var(--line); padding-bottom: 0.5rem;
  transition: border-color 0.3s, color 0.3s;
}
.hero-cta:hover { border-color: var(--accent); color: var(--accent); }
.hero-cta-ico { transition: transform 0.35s var(--ease); }
.hero-cta:hover .hero-cta-ico { transform: translateY(4px); }

.hero-seal {
  position: relative;
  z-index: 3;
  flex-shrink: 0;
  width: 86px; height: 86px;
  display: grid; place-items: center;
}
.hero-seal svg { position: absolute; inset: 0; animation: spin 16s linear infinite; }
.hero-seal text {
  font-family: var(--sans); font-size: 10.5px; font-weight: 400;
  letter-spacing: 0.13em; fill: var(--bone-dim); text-transform: uppercase;
}
.hero-seal:hover text { fill: var(--accent); }
.hero-seal-ico { font-size: 1.2rem; color: var(--accent); }

.hero-socials { display: flex; gap: 0.7rem; margin-top: 1.5rem; }
.hero-socials a {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--bone-dim);
  transition: border-color 0.3s, color 0.3s, transform 0.3s, background-color 0.3s;
}
.hero-socials a:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); transform: translateY(-3px); }
.hero-socials svg { width: 17px; height: 17px; }

.hero-foot {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; flex-wrap: wrap;
  padding-top: clamp(1.5rem, 4vh, 2.5rem);
  border-top: 1px solid var(--line);
  margin-top: clamp(1.5rem, 4vh, 2.5rem);
  font-size: 0.76rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--bone-dim);
}
.hero-scroll { display: flex; align-items: center; gap: 0.75rem; }
.hero-scroll-line {
  width: 46px; height: 1px; background: var(--bone-dim);
  animation: scrollLine 2s var(--ease) infinite;
}
@keyframes scrollLine {
  0% { transform: scaleX(0); transform-origin: left; }
  45% { transform: scaleX(1); transform-origin: left; }
  55% { transform: scaleX(1); transform-origin: right; }
  100% { transform: scaleX(0); transform-origin: right; }
}
.hero-clock { color: var(--accent); }

/* ===== Hero fun notes (sticky-note call-outs, desktop) ===== */
.hero-notes {
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
}
.note {
  position: absolute;
  pointer-events: auto;
  width: clamp(190px, 16vw, 232px);
  padding: 1rem 1.2rem 1.1rem;
  background: var(--note-bg);
  color: var(--note-ink);
  border-radius: 3px 18px 18px 18px;
  box-shadow: 0 2px 0 rgba(58,34,16,0.2), 0 20px 36px -16px rgba(0,0,0,0.6);
  font-family: var(--sans);
  font-weight: 500;
  transform: rotate(var(--r, 0deg));
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
  animation: noteFloat 6.5s ease-in-out infinite;
}
@keyframes noteFloat {
  0%, 100% { transform: rotate(var(--r, 0deg)) translateY(0); }
  50% { transform: rotate(calc(var(--r, 0deg) + 1.4deg)) translateY(-9px); }
}
.note::before {
  content: '';
  position: absolute; top: -9px; left: 24px;
  width: 36px; height: 15px;
  background: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.35);
  transform: rotate(-4deg);
}
.note:hover { transform: translateY(-4px) rotate(var(--r, 0deg)); box-shadow: 0 4px 0 rgba(58,34,16,0.2), 0 28px 46px -16px rgba(0,0,0,0.62); animation-play-state: paused; }
.note-label {
  display: block;
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(58,34,16,0.75);
  margin-bottom: 0.4rem;
}
.note-body { font-size: 0.94rem; line-height: 1.44; font-weight: 500; }
.note-body em { font-style: italic; font-weight: 700; }
.note-cta {
  display: inline-flex; align-items: center; gap: 0.35rem;
  margin-top: 0.75rem;
  font-size: 0.78rem; font-weight: 700;
  border-bottom: 1.5px solid var(--note-ink);
  padding-bottom: 0.15rem;
  transition: gap 0.25s var(--ease), border-color 0.25s;
}
.note-cta:hover { gap: 0.55rem; border-color: var(--note-ink); }
.note-social { display: flex; gap: 0.55rem; margin-top: 0.7rem; }
.note-social a {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(58,34,16,0.12); color: var(--note-ink);
  transition: background-color 0.3s, color 0.3s, transform 0.3s;
}
.note-social a:hover { background: var(--note-ink); color: var(--note-bg); transform: translateY(-2px) scale(1.06); }
.note-social svg { width: 15px; height: 15px; }
.note-social .li-icon rect { fill: currentColor; }
.note-social .li-icon text { fill: var(--note-bg); font-size: 11px; font-family: var(--sans); font-weight: 600; }
.note-1 { --r: -5deg; top: 11%; left: 53%; background: var(--note-bg); animation-duration: 6.8s; }
.note-2 { --r: 4deg; top: 38%; left: 46%; background: var(--note-bg-2); animation-duration: 7.6s; animation-delay: -2.4s; }
.note-3 { --r: -3deg; top: 64%; left: 52%; background: var(--note-bg); animation-duration: 7.2s; animation-delay: -4.6s; }
.note-arrow { position: absolute; overflow: visible; pointer-events: none; }
.note-arrow path { fill: none; stroke: var(--note-bg); stroke-width: 3; stroke-linecap: round; opacity: 0.95; }
.note-arrow-head { fill: var(--note-bg); opacity: 0.95; }
.arrow-1 { top: 9%; left: 72%; width: 118px; height: 76px; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.35)); }
.arrow-2 { top: 39%; left: 62%; width: 138px; height: 62px; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.35)); }
.arrow-3 { top: 65%; left: 71%; width: 118px; height: 90px; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.35)); }

@media (max-width: 1200px) {
  .note-1, .note-2, .note-3 { width: clamp(170px, 22vw, 210px); }
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .hero-grid { order: 1; }
  .hero-notes {
    position: static;
    display: flex; flex-wrap: wrap; gap: 1rem;
    margin-top: 0.5rem;
    order: 2;
  }
  .hero-foot { order: 3; }
  .note { position: static; width: 100%; max-width: 320px; transform: none !important; }
  .note:hover { transform: none !important; }
  .note::before { display: none; }
  .note-arrow { display: none; }
}

/* ===== Ticker ===== */
.ticker {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden; white-space: nowrap;
  padding: 1.1rem 0;
}
.ticker-track { display: inline-flex; will-change: transform; animation: marquee 26s linear infinite; }
.ticker-track span {
  font-family: var(--serif); font-weight: 400; font-style: italic;
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  color: var(--bone); display: inline-flex; align-items: center;
}
.ticker-track i { color: var(--accent); font-style: normal; margin: 0 0.9rem; font-size: 0.6em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ===== About (cream panel) ===== */
.about {
  position: relative;
  overflow: hidden;
  background: var(--paper);
  color: var(--paper-ink);
  border-radius: clamp(20px, 3vw, 34px);
  margin: clamp(1rem, 3vw, 2.5rem);
  padding: clamp(3rem, 8vh, 6.5rem) clamp(1.5rem, 5vw, 5rem);
}
.about-inner { position: relative; z-index: 2; max-width: 1400px; margin: 0 auto; }
.about-top {
  position: relative; z-index: 2;
  min-height: clamp(360px, 48vh, 560px);
  display: flex; flex-direction: column; justify-content: center;
}
.about-portrait-wrap {
  position: absolute;
  z-index: 1;
  right: clamp(0.5rem, 4vw, 4.5rem);
  bottom: 0;
  top: clamp(0.5rem, 2vh, 1.5rem);
  width: clamp(260px, 29vw, 440px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}
.about-portrait-glow {
  position: absolute;
  z-index: -1;
  width: 150%; height: 68%;
  left: 50%; bottom: 4%;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  opacity: 0.4;
  filter: blur(46px);
  border-radius: 50%;
}
.about-portrait-ast {
  position: absolute;
  z-index: 2;
  top: 2%; right: 2%;
  font-family: var(--sans);
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  color: var(--accent);
  opacity: 0.75;
  animation: spin 9s linear infinite;
}
.about-portrait-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 55%, var(--paper) 96%);
}
.about-portrait {
  position: relative;
  max-height: 100%;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  filter: grayscale(1) contrast(1.03);
  opacity: 0.94;
}
.about-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; flex-wrap: wrap;
  padding-bottom: 2.5rem; border-bottom: 1px solid var(--paper-line);
}
.about-sign { font-family: var(--serif); font-style: italic; color: var(--paper-dim); font-size: 1rem; }
.about-statement {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.7rem, 4.4vw, 3.7rem);
  line-height: 1.16;
  letter-spacing: -0.015em;
  margin: clamp(2.5rem, 6vh, 4rem) 0;
  max-width: 20ch;
}
.about-statement .w { display: inline-block; }
.about-foot {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: end;
  border-top: 1px solid var(--paper-line);
  padding-top: clamp(2rem, 5vh, 3rem);
}
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.stat { display: block; }
.stat-num, .stat-plus {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.2rem, 5vw, 3.8rem); line-height: 1;
}
.stat-plus { color: var(--accent); }
.stat-inf { color: var(--accent); }
.stat-label {
  display: block; margin-top: 0.6rem;
  font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--paper-dim);
}
.about-note { color: var(--paper-dim); font-size: 0.98rem; line-height: 1.6; max-width: 34ch; }

/* ===== Work cards ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 1.8vw, 1.5rem);
}
.card {
  position: relative;
  display: flex; flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--ink-2);
  transition: border-color 0.4s var(--ease), transform 0.5s var(--ease), background-color 0.4s;
}
.card:hover { border-color: var(--accent); transform: translateY(-6px) rotate(var(--tilt, 0deg)); background: var(--ink-3); }
.card:nth-child(odd) { --tilt: -0.6deg; }
.card:nth-child(even) { --tilt: 0.6deg; }
.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s var(--ease), filter 0.5s;
  filter: saturate(0.92) brightness(0.94);
}
.card:hover .card-media img { transform: scale(1.06); filter: saturate(1.05) brightness(1); }
.card-body {
  display: flex; flex-direction: column; gap: 0.55rem; align-items: flex-start;
  padding: 1rem 1.15rem 1.2rem;
}
.card-tags {
  display: inline-block;
  font-size: 0.66rem; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--bone-dim);
  border: 1px solid var(--line); border-radius: 99px;
  padding: 0.28rem 0.6rem;
  transition: border-color 0.35s, color 0.35s;
}
.card:hover .card-tags { border-color: var(--accent); color: var(--accent); }
.card-body h3 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.2rem, 1.6vw, 1.5rem); line-height: 1.08;
  letter-spacing: -0.01em;
}
.card:hover .card-body h3 { font-style: italic; }
.card-blurb {
  font-size: 0.86rem; line-height: 1.48; color: var(--bone-dim);
  transition: color 0.35s;
}
.card:hover .card-blurb { color: var(--bone); }
.card-cta {
  margin-top: 0.3rem;
  font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--bone-dim);
  border: 1px solid var(--line); border-radius: 99px;
  padding: 0.45rem 0.8rem;
  transition: background-color 0.35s, color 0.35s, border-color 0.35s;
}
.card:hover .card-cta { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ===== Work view switcher ===== */
.work-tabs {
  display: flex; gap: 0.6rem; flex-wrap: wrap;
  margin: -1.5rem 0 clamp(2.5rem, 5vh, 3.5rem);
}
.work-tab {
  font-family: var(--sans);
  font-size: 0.82rem; letter-spacing: 0.02em;
  padding: 0.65rem 1.2rem;
  border-radius: 99px;
  border: 1px solid var(--line);
  color: var(--bone-dim);
  background: transparent;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
.work-tab:hover { border-color: var(--bone-dim); color: var(--bone); }
.work-tab.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.work-tab[data-tab="vibe"].is-active { background: var(--note-bg); border-color: var(--note-bg); color: var(--note-ink); }
.work-panel { transition: opacity 0.35s ease, transform 0.35s ease; }
.work-panel.is-entering { opacity: 0; transform: translateY(8px); }

/* ===== Vibe-coded cards (terminal-window aesthetic) ===== */
.vcards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.25rem, 2.5vw, 2rem);
}
.cards[hidden], .vcards[hidden] { display: none; }
.vcard {
  position: relative;
  display: flex; flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  background: #0d1120;
  border: 1px solid var(--line);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.45s var(--ease), border-color 0.4s;
}
.vcard:hover { transform: translateY(-6px) rotate(var(--tilt, 0deg)); border-color: var(--note-bg); }
.vcard:nth-child(odd) { --tilt: -0.5deg; }
.vcard:nth-child(even) { --tilt: 0.5deg; }
.vcard-bar {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.7rem 0.9rem;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--line);
}
.vcard-dot { width: 9px; height: 9px; border-radius: 50%; }
.vcard-dot:nth-child(1) { background: #ff5f57; }
.vcard-dot:nth-child(2) { background: #febc2e; }
.vcard-dot:nth-child(3) { background: #28c840; }
.vcard-path {
  margin-left: 0.6rem; font-family: var(--sans);
  font-size: 0.72rem; color: var(--bone-dim); letter-spacing: 0.01em;
}
.vcard-status {
  margin-left: auto;
  font-family: var(--sans); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.22rem 0.55rem; border-radius: 99px;
  background: rgba(77,132,255,0.16); color: var(--accent-2);
}
.vcard-status.is-building { background: rgba(255,207,134,0.18); color: var(--note-bg); }
.vcard-body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: 0.85rem; flex: 1; }
.vcard-cmd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.76rem; color: var(--bone-dim);
}
.vcard-cmd .prompt { color: var(--note-bg); margin-right: 0.5rem; }
.vcard-name {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(1.5rem, 2.4vw, 1.9rem); color: var(--bone);
}
.vcard-desc { font-family: var(--sans); font-size: 0.9rem; line-height: 1.55; color: var(--bone-dim); }
.vcard-desc::before { content: '// '; color: rgba(219,226,240,0.32); }
.vcard-stack { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.15rem; }
.vcard-chip {
  font-family: var(--sans);
  font-size: 0.68rem; letter-spacing: 0.02em;
  padding: 0.28rem 0.6rem; border-radius: 6px;
  background: rgba(219,226,240,0.06); color: var(--bone-dim);
  border: 1px solid var(--line);
}
.vcard-cta {
  margin-top: auto; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.03em; text-transform: uppercase;
  color: var(--note-bg);
  border-bottom: 1px solid rgba(255,207,134,0.4);
  padding-bottom: 0.2rem;
  transition: gap 0.25s var(--ease), border-color 0.25s;
}
.vcard:hover .vcard-cta { gap: 0.7rem; border-color: var(--note-bg); }

/* ===== Experience ===== */
.xp-list { border-bottom: 1px solid var(--line); }
.xp-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) 1.4fr 1.6fr;
  gap: clamp(1rem, 3vw, 3rem);
  padding: clamp(1.5rem, 3.5vh, 2.25rem) 0.5rem;
  border-top: 1px solid var(--line);
  transition: background-color 0.3s, padding-left 0.35s var(--ease);
}
.xp-row:hover { background: var(--ink-2); padding-left: 1.25rem; }
.xp-when { font-size: 0.82rem; color: var(--accent); letter-spacing: 0.06em; text-transform: uppercase; padding-top: 0.4rem; }
.xp-what { display: flex; flex-direction: column; gap: 0.25rem; }
.xp-what strong {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.2rem, 2.4vw, 1.7rem); line-height: 1.12;
}
.xp-what em { color: var(--bone-dim); font-size: 0.95rem; }
.xp-note { color: var(--bone-dim); font-size: 0.95rem; align-self: center; line-height: 1.55; }

/* ===== Gallery collage ===== */
.gallery { overflow: hidden; }
.collage {
  display: flex; flex-direction: column;
  gap: clamp(0.9rem, 1.8vw, 1.4rem);
  margin: 0 calc(var(--pad) * -1);
}
.collage-row { overflow: hidden; }
.collage-set {
  display: flex;
  gap: clamp(0.9rem, 1.8vw, 1.4rem);
  width: max-content;
  will-change: transform;
}
.gi {
  height: clamp(150px, 22vw, 260px);
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--ink-2);
  cursor: pointer;
}
.gi img {
  height: 100%; width: auto; object-fit: cover;
  transition: transform 0.6s var(--ease), filter 0.4s;
  filter: saturate(0.9) brightness(0.9);
}
.gi:hover img { transform: scale(1.05); filter: saturate(1.05) brightness(1); }

/* ===== Services ===== */
.svc-list { border-bottom: 1px solid var(--line); }
.svc-row {
  display: grid; grid-template-columns: 5rem 1fr 1fr;
  align-items: center; gap: clamp(1rem, 3vw, 3rem);
  padding: clamp(1.3rem, 3vh, 2rem) 0.5rem;
  border-top: 1px solid var(--line);
  transition: padding-left 0.35s var(--ease);
}
.svc-row:hover { padding-left: 1.25rem; }
.svc-idx { font-size: 0.8rem; color: var(--bone-dim); letter-spacing: 0.08em; }
.svc-name {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.5rem, 3.4vw, 2.7rem); line-height: 1.05;
  transition: color 0.3s, font-style 0.3s;
}
.svc-row:hover .svc-name { color: var(--accent); font-style: italic; }
.svc-desc { color: var(--bone-dim); font-size: 0.95rem; text-align: right; }

/* ===== Testimonials (section itself is commented out in index.html until
   real quotes are added — styles kept live so uncommenting just works) ===== */
.test-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 1.8vw, 1.5rem);
}
.test-card {
  display: flex; flex-direction: column; justify-content: space-between; gap: 1.5rem;
  border: 1px solid var(--line); border-radius: 14px;
  padding: 1.75rem;
  background: var(--ink-2);
  transition: border-color 0.4s var(--ease), transform 0.5s var(--ease), background-color 0.4s;
}
.test-card:hover { border-color: var(--accent); transform: translateY(-6px); background: var(--ink-3); }
.test-quote {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.45;
  color: var(--bone);
}
.test-person { display: flex; align-items: center; gap: 0.85rem; }
.test-avatar {
  flex-shrink: 0; width: 2.6rem; height: 2.6rem; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--serif); font-style: italic; font-size: 0.95rem;
  background: var(--accent-soft); color: var(--accent);
}
.test-who { display: flex; flex-direction: column; gap: 0.15rem; }
.test-name { font-size: 0.92rem; color: var(--bone); }
.test-role { font-size: 0.8rem; color: var(--bone-dim); }
@media (max-width: 900px) {
  .test-grid { grid-template-columns: 1fr; }
}

/* ===== Contact ===== */
.contact { text-align: center; padding-top: clamp(6rem, 16vh, 11rem); padding-bottom: clamp(4rem, 9vh, 6rem); }
.contact-kicker { margin-bottom: 2rem; }
.contact-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 8.5vw, 8rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  max-width: 14ch; margin: 0 auto;
}
.contact-title em { font-style: italic; color: var(--accent); }
/* ===== Contact form ===== */
.contact-form {
  max-width: 760px;
  margin: clamp(2.5rem, 6vh, 4rem) auto 0;
  text-align: left;
}
.cf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 2.5vw, 1.6rem);
}
.cf-field { display: flex; flex-direction: column; gap: 0.55rem; }
.cf-full { grid-column: 1 / -1; }
.cf-field label {
  font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--bone-dim);
}
.cf-field label span { text-transform: none; letter-spacing: 0; opacity: 0.7; }
.cf-field input,
.cf-field select,
.cf-field textarea {
  width: 100%;
  font-family: var(--sans); font-size: 1rem; font-weight: 300;
  color: var(--bone);
  background: rgba(219,226,240,0.03);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  transition: border-color 0.3s, background-color 0.3s, box-shadow 0.3s;
  -webkit-appearance: none; appearance: none;
}
.cf-field textarea { resize: vertical; min-height: 120px; line-height: 1.55; }
.cf-field select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234d84ff' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}
.cf-field option { background: var(--ink-2); color: var(--bone); }
.cf-field input::placeholder,
.cf-field textarea::placeholder { color: rgba(219,226,240,0.32); }
.cf-field input:focus,
.cf-field select:focus,
.cf-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(77,132,255,0.06);
  box-shadow: 0 0 0 3px rgba(77,132,255,0.14);
}
.cf-actions {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1.25rem;
  margin-top: clamp(1.5rem, 3.5vh, 2.25rem);
}
.cf-submit {
  display: inline-flex; align-items: center; gap: 0.7rem;
  font-family: var(--sans); font-size: 0.9rem; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: #fff; cursor: pointer;
  background: var(--accent); border: 1px solid var(--accent);
  border-radius: 99px;
  padding: 0.95rem 1.9rem;
  transition: background-color 0.3s, transform 0.3s var(--ease), box-shadow 0.3s;
  box-shadow: 0 10px 30px rgba(77,132,255,0.28);
}
.cf-submit:hover { background: #3f79ff; box-shadow: 0 14px 40px rgba(77,132,255,0.4); }
.cf-submit:disabled { opacity: 0.55; cursor: default; box-shadow: none; }
.cf-submit-ico { transition: transform 0.35s var(--ease); }
.cf-submit:hover .cf-submit-ico { transform: translate(3px,-3px); }
.cf-alt { font-size: 0.9rem; color: var(--bone-dim); }
.cf-alt a { color: var(--bone); border-bottom: 1px solid var(--line); transition: color 0.3s, border-color 0.3s; }
.cf-alt a:hover { color: var(--accent); border-color: var(--accent); }
.cf-status {
  margin-top: 1.25rem; font-size: 0.9rem; min-height: 1.2em;
  transition: color 0.3s;
}
.cf-status.is-ok { color: var(--accent-2); }
.cf-status.is-err { color: #ff7a6b; }
.contact-form.is-sent .cf-grid,
.contact-form.is-sent .cf-actions { display: none; }
.contact-form.is-sent .cf-status {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.3rem, 3vw, 2rem); color: var(--bone);
  text-align: center; margin-top: 0;
}
.contact-links {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: clamp(1.25rem, 3.5vw, 2.75rem);
  margin-top: clamp(2.5rem, 6vh, 4rem);
  font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase;
}
.contact-links a { color: var(--bone-dim); position: relative; padding-bottom: 0.25rem; transition: color 0.3s; }
.contact-links a::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: right;
  transition: transform 0.35s var(--ease);
}
.contact-links a:hover { color: var(--accent); }
.contact-links a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ===== Footer ===== */
.footer {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; flex-wrap: wrap;
  padding: 1.75rem var(--pad);
  border-top: 1px solid var(--line);
  color: var(--bone-dim); font-size: 0.78rem; letter-spacing: 0.04em;
}
.footer-time { color: var(--accent); }
.footer-left { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.footer-status {
  display: inline-flex; align-items: center; gap: 0.5rem;
  border: 1px solid var(--line); border-radius: 99px;
  padding: 0.4rem 0.85rem;
  color: var(--bone-dim);
  transition: border-color 0.3s, color 0.3s;
}
.footer-status:hover { border-color: var(--accent); color: var(--accent); }

/* ===== Lightbox ===== */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(8,12,24,0.94);
  z-index: 9500; display: grid; place-items: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s var(--ease);
  padding: clamp(1rem, 5vw, 4rem);
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: 100%; max-height: 88vh; border-radius: 10px;
  box-shadow: 0 30px 100px rgba(0,0,0,0.7);
  transform: scale(0.94); transition: transform 0.4s var(--ease);
}
.lightbox.is-open img { transform: scale(1); }
.lightbox-close {
  position: absolute; top: clamp(1rem,3vw,2rem); right: clamp(1rem,3vw,2rem);
  background: var(--accent); color: #fff; border: 0;
  width: 48px; height: 48px; border-radius: 50%; font-size: 1.1rem; cursor: pointer;
  transition: transform 0.3s var(--ease);
}
.lightbox-close:hover { transform: rotate(90deg); }

/* ===== Case viewer (native screens) ===== */
.cv {
  position: fixed; inset: 0; z-index: 9600;
  background: var(--ink);
  display: flex; flex-direction: column;
  opacity: 0; visibility: hidden;
  transform: translateY(2%);
  transition: opacity 0.45s var(--ease), transform 0.55s var(--ease), visibility 0.45s;
}
.cv.is-open { opacity: 1; visibility: visible; transform: none; }
.cv-bar {
  position: relative; z-index: 2; flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(1rem, 2.4vw, 1.5rem) var(--pad);
  background: rgba(11,16,32,0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.cv-meta { display: flex; align-items: baseline; gap: 0.6rem 1rem; flex-wrap: wrap; min-width: 0; }
.cv-eyebrow {
  font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent);
}
.cv-title {
  font-family: var(--serif); font-weight: 400; font-style: italic;
  font-size: clamp(1.3rem, 3vw, 2rem); line-height: 1; letter-spacing: -0.01em;
}
.cv-tags { font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--bone-dim); }
.cv-actions { display: flex; align-items: center; gap: clamp(0.75rem, 2vw, 1.5rem); flex-shrink: 0; }
.cv-progress { font-size: 0.78rem; letter-spacing: 0.08em; color: var(--bone-dim); font-variant-numeric: tabular-nums; }
.cv-pdf, .cv-proto {
  font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--bone-dim);
  border: 1px solid var(--line); border-radius: 99px;
  padding: 0.5rem 0.9rem; transition: color 0.3s, border-color 0.3s;
}
.cv-pdf:hover, .cv-proto:hover { color: var(--accent); border-color: var(--accent); }
.cv-proto { color: var(--accent); border-color: var(--accent-soft); }
.cv-proto[hidden] { display: none; }
.cv-close {
  background: var(--accent); color: #fff; border: 0;
  width: 42px; height: 42px; border-radius: 50%; font-size: 1rem; cursor: pointer;
  display: grid; place-items: center;
  transition: transform 0.3s var(--ease), background-color 0.3s;
}
.cv-close:hover { transform: rotate(90deg); background: #3f79ff; }
.cv-bar-fill {
  position: relative; z-index: 2; flex-shrink: 0;
  height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.1s linear;
}
.cv-scroll {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: clamp(1.5rem, 4vw, 3.5rem) var(--pad) clamp(3rem, 8vh, 6rem);
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.cv-stage { max-width: 1180px; margin: 0 auto; }
/* Deck: framed slides */
.cv-stage.is-deck { display: flex; flex-direction: column; gap: clamp(1rem, 2.5vw, 2rem); }
.cv-slide {
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  background: var(--ink-2);
  box-shadow: 0 30px 60px rgba(0,0,0,0.35);
}
.cv-slide img { width: 100%; height: auto; display: block; }
/* Page: seamless tall webpage */
.cv-stage.is-page {
  max-width: 940px;
  border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px rgba(0,0,0,0.4);
  background: var(--ink-2);
  font-size: 0; /* kill inline-img gaps */
}
.cv-stage.is-page img { width: 100%; height: auto; display: block; }
.cv-scroll::-webkit-scrollbar { width: 10px; }
.cv-scroll::-webkit-scrollbar-thumb { background: var(--ink-3); border-radius: 5px; }
.cv-scroll::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }

  .hero { padding-top: 5.5rem; }
  .hero-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "name" "figure" "eyebrow" "role" "bio";
    row-gap: 0.6rem;
  }
  /* unwrap .hero-lead so eyebrow/name/role can each claim their own area,
     letting the photo overlap just the tail of the name (behind the head) */
  .hero-lead { display: contents; }
  .hero-eyebrow { grid-area: eyebrow; justify-content: center; margin: 0.6rem 0 0; }
  .hero-name {
    grid-area: name;
    position: relative;
    z-index: 1;
    justify-self: center;
    font-size: clamp(3.2rem, 19vw, 7rem);
    text-align: center;
  }
  .hero-role { grid-area: role; text-align: center; }
  .hero-figure {
    grid-area: figure;
    position: relative;
    z-index: 2;
    top: auto; bottom: auto; right: auto; left: auto;
    height: min(50vh, 400px);
    width: auto;
    justify-self: center;
    margin-top: clamp(-1.6rem, -1.4vw - 1rem, -1rem);
    pointer-events: none;
  }
  .hero-bio { grid-area: bio; max-width: none; }
  .hero-bio-ctas { flex-wrap: wrap; gap: 1.25rem; justify-content: center; }
  .hero-socials { justify-content: center; }
  .hero-seal { width: 72px; height: 72px; }
  .hero-foot { font-size: 0.68rem; }
  .hero-notes { justify-content: center; }
  .note { margin-inline: auto; }

  .section-note { text-align: left; }

  .about-foot { grid-template-columns: 1fr; gap: 2rem; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 1.5rem 1rem; }
  .about-top { min-height: 0; }
  .about-portrait-wrap {
    position: relative;
    width: 68vw;
    max-width: 280px;
    height: auto;
    margin: 0 auto clamp(1.5rem, 5vh, 2.5rem);
  }
  .about-portrait { max-height: none; width: 100%; }
  .about-portrait-wrap::after { background: linear-gradient(to bottom, transparent 70%, var(--paper) 98%); }

  .cards, .vcards { grid-template-columns: 1fr; }
  .work-tabs { margin-top: 0; }

  .xp-row { grid-template-columns: 1fr; gap: 0.4rem; }
  .xp-note { margin-top: 0.25rem; }

  .svc-row { grid-template-columns: 3rem 1fr; }
  .svc-desc { grid-column: 2; text-align: left; }

  .gi { height: clamp(120px, 34vw, 190px); }

  .footer { justify-content: center; text-align: center; }

  .cf-grid { grid-template-columns: 1fr; }
  .cf-actions { flex-direction: column; align-items: stretch; text-align: center; }
  .cf-submit { justify-content: center; }

  .cv-bar { gap: 0.75rem; padding-top: 0.85rem; padding-bottom: 0.85rem; }
  .cv-progress, .cv-eyebrow { display: none; }
  .cv-meta { gap: 0.2rem 0.75rem; }
  .cv-tags { width: 100%; font-size: 0.68rem; }
}

@media (max-width: 560px) {
  .hero-eyebrow { flex-direction: column; gap: 0.4rem; }
  .contact-title { font-size: clamp(2.4rem, 12vw, 5rem); }
}

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