/* ---------- Design tokens ---------- */
:root {
  --bg: #faf8f4;
  --bg-alt: #f1ede4;
  --surface: #ffffff;
  --text: #17181a;
  --text-muted: #5b5d54;
  --border: #e4dfd2;
  --accent: #b5502f;
  --accent-soft: #f2e2da;
  --accent-2: #5f6f4e;
  --accent-2-soft: #e4e9dc;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(30, 25, 15, 0.05), 0 10px 30px rgba(30, 25, 15, 0.06);
  --max-width: 1160px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #121210;
  --bg-alt: #191917;
  --surface: #1c1c1a;
  --text: #f4f2ea;
  --text-muted: #ada99d;
  --border: #302f2a;
  --accent: #e2825c;
  --accent-soft: #2c2018;
  --accent-2: #a3b98c;
  --accent-2-soft: #202417;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121210;
    --bg-alt: #191917;
    --surface: #1c1c1a;
    --text: #f4f2ea;
    --text-muted: #ada99d;
    --border: #302f2a;
    --accent: #e2825c;
    --accent-soft: #2c2018;
    --accent-2: #a3b98c;
    --accent-2-soft: #202417;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
section[id] { scroll-margin-top: 90px; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; margin: 0; }
p { margin: 0; }

.wrap {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 24px;
  position: relative;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 200;
}
.skip-link:focus { left: 0; }

/* ---------- Grain overlay ---------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.16;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme="dark"] .grain { opacity: 0.22; }

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 110;
  background: transparent;
}
.scroll-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.08s linear;
}

/* ---------- Custom cursor (desktop, motion-enabled only) ---------- */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 120;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  transform: translate(-50%, -50%);
}
.cursor-ring {
  width: 34px;
  height: 34px;
  border: 1px solid var(--accent);
  transform: translate(-50%, -50%);
}
html.custom-cursor .cursor-dot,
html.custom-cursor .cursor-ring { opacity: 1; }
html.custom-cursor,
html.custom-cursor a,
html.custom-cursor button { cursor: none; }
.cursor-ring.is-active { width: 44px; height: 44px; border-width: 1.5px; mix-blend-mode: exclusion; }

/* ---------- Reveal-on-scroll ----------
   Hidden-until-revealed only applies once JS has confirmed it can run
   (html.has-js) and will finish the job (is-visible added by the
   IntersectionObserver in script.js). Without JS, or before it loads,
   content is visible by default so nothing is ever permanently hidden. */
.reveal { opacity: 1; transform: none; }
html.has-js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
html.has-js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  html.has-js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.logo-dot { color: var(--accent); }

.nav {
  display: flex;
  gap: 28px;
}
.nav a {
  font-size: 0.94rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.2s ease;
}
.nav a:hover { color: var(--text); }
.nav a { position: relative; }
.nav a.is-active { color: var(--text); }
.nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.header-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.icon-btn:hover { border-color: var(--accent); }
.icon-btn:active { transform: scale(0.94); }

.icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: block; }

.menu-btn {
  display: none;
  flex-direction: column;
  gap: 4px;
  border-radius: 10px;
}
.menu-btn span {
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  padding-top: clamp(64px, 11vw, 140px);
  padding-bottom: clamp(48px, 7vw, 88px);
  overflow: visible;
}
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  z-index: -1;
  opacity: 0.55;
  pointer-events: none;
}
.hero-blob-1 {
  width: 480px;
  height: 480px;
  top: -160px;
  right: -120px;
  background: radial-gradient(circle at 30% 30%, var(--accent-soft), transparent 70%);
}
.hero-blob-2 {
  width: 360px;
  height: 360px;
  top: 120px;
  left: -160px;
  background: radial-gradient(circle at 60% 40%, var(--accent-2-soft), transparent 70%);
}
.hero-blob-3 {
  width: 420px;
  height: 420px;
  top: -80px;
  right: -100px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  z-index: -1;
  background: radial-gradient(circle at 40% 40%, var(--accent-soft), transparent 70%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}
.hero-visual { position: relative; display: flex; justify-content: center; }
.hero-chip {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}
.hero-chip-1 { top: 8%; right: -6%; }
.hero-chip-2 { bottom: 10%; left: -8%; }
html.has-js .hero-visual .mock-window-hero { animation: float 5s ease-in-out infinite; }
html.has-js .hero-chip-1 { animation: float 5s ease-in-out infinite 0.3s; }
html.has-js .hero-chip-2 { animation: float 5.5s ease-in-out infinite 0.6s; }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(var(--tilt, -2deg)); }
  50% { transform: translateY(-10px) rotate(var(--tilt, -2deg)); }
}
@media (prefers-reduced-motion: reduce) {
  html.has-js .hero-visual .mock-window-hero,
  html.has-js .hero-chip-1,
  html.has-js .hero-chip-2 { animation: none; }
}

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 7px 14px 7px 10px;
  border-radius: 999px;
  margin-bottom: 26px;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 3px var(--accent-2-soft);
}
html.has-js .status-dot { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--accent-2-soft); }
  50% { box-shadow: 0 0 0 6px var(--accent-2-soft); }
}

.hero-title {
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 600;
  max-width: 18ch;
}
.hero-title .line { display: block; }
.hero-title em {
  font-style: italic;
  font-weight: 340;
  color: var(--accent);
}

.hero-sub {
  margin-top: 26px;
  max-width: 52ch;
  font-size: 1.1rem;
  color: var(--text-muted);
}
.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.trust-strip {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.trust-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--text-muted);
}
.trust-marks { display: flex; flex-wrap: wrap; gap: 14px 30px; }
.trust-marks span {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text-muted);
  opacity: 0.8;
  letter-spacing: -0.01em;
}

/* ---------- Philosophy + process ---------- */
.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 40px;
  margin-bottom: 52px;
}
.philosophy-num {
  display: block;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 10px;
}
.philosophy-item h3 { font-size: 1.1rem; margin-bottom: 10px; }
.philosophy-item p { color: var(--text-muted); font-size: 0.96rem; }

.process-label {
  border-top: 1px solid var(--border);
  padding-top: 28px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.process-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 4px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
}
.process-strip li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  transition: background 0.2s ease;
}
.process-strip li:hover { background: var(--accent-soft); }
.process-strip li:not(:last-child)::after {
  content: "→";
  margin-left: 14px;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--border);
}
.process-step {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--surface);
  background: var(--accent);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

@media (max-width: 860px) {
  .philosophy-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .process-strip { flex-direction: column; align-items: flex-start; }
  .process-strip li:not(:last-child)::after { display: none; }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn span { display: inline-block; transition: transform 0.25s ease; }
.btn:hover span { transform: translateY(-1px); }
.btn-primary { background: var(--text); color: var(--bg); }
:root[data-theme="dark"] .btn-primary { background: var(--accent); color: #1c1c1a; }
.btn-ghost { border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); }

.magnetic { will-change: transform; }

/* ---------- Mock UI components (decorative abstract interface previews) ---------- */
.mock-window {
  --tilt: -2deg;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 20px 44px rgba(20, 15, 5, 0.16);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: rotate(var(--tilt));
}
.mock-window-hero { max-width: 320px; --tilt: -3deg; }
.mock-bar {
  flex-shrink: 0;
  height: 22px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
}
.mock-bar span { width: 6px; height: 6px; border-radius: 50%; background: var(--border); }
.mock-content { flex: 1; padding: 14px; display: flex; flex-direction: column; gap: 10px; justify-content: center; }

.mock-line { height: 8px; border-radius: 4px; background: var(--border); width: 100%; }
.mock-line.short { width: 50%; }

.mock-chart { display: flex; align-items: flex-end; gap: 6px; height: 54px; }
.mock-chart i { flex: 1; height: var(--h); background: var(--accent); opacity: 0.85; border-radius: 3px 3px 0 0; }

.mock-row { display: flex; gap: 8px; }
.mock-card { flex: 1; aspect-ratio: 3 / 2; border-radius: 8px; background: var(--accent-2-soft); }

.mock-swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.mock-swatches span { aspect-ratio: 1; border-radius: 6px; }
.mock-swatches .sw-1 { background: var(--accent); }
.mock-swatches .sw-2 { background: var(--accent-2); }
.mock-swatches .sw-3 { background: var(--accent-soft); }
.mock-swatches .sw-4 { background: var(--accent-2-soft); }
.mock-chip-row { display: flex; gap: 6px; }
.mock-chip { flex: 1; height: 16px; border-radius: 999px; background: var(--border); }

.mock-form .mock-line { margin-bottom: 8px; }
.mock-summary {
  margin-top: auto;
  border-top: 1px dashed var(--border);
  padding-top: 8px;
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
}

.mock-phone {
  --tilt: -2deg;
  width: 46%;
  aspect-ratio: 9 / 16;
  background: var(--surface);
  border: 3px solid var(--border);
  border-radius: 16px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 20px 44px rgba(20, 15, 5, 0.16);
  transform: rotate(var(--tilt));
}
.mock-phone .mock-line { background: var(--border); }
.mock-phone-btn { margin-top: auto; height: 18px; border-radius: 999px; background: var(--accent-2); }

/* ---------- Marquee ---------- */
.marquee {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  padding-block: 16px;
  background: var(--bg-alt);
}
.marquee-track {
  display: flex;
  gap: 14px;
  width: max-content;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--text-muted);
  white-space: nowrap;
  animation: marquee 32s linear infinite;
}
.marquee-track .dot { color: var(--accent); }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; overflow-x: auto; }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(56px, 9vw, 104px); position: relative; }
.section-head { margin-bottom: 44px; max-width: 60ch; }
.section-tag {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
}
.section-head h2 {
  font-size: clamp(1.8rem, 3.8vw, 2.6rem);
  letter-spacing: -0.01em;
}
.contact-sub { margin-top: 14px; color: var(--text-muted); }
.section-head-link { margin-top: 12px; }
.section-head-link a {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.section-head-link a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- About page: hero ---------- */
.about-hero {
  display: grid;
  grid-template-columns: 0.62fr 1fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
}

/* ---------- Contact page: hero (mirrors about-hero, photo on the right) ---------- */
.contact-hero {
  display: grid;
  grid-template-columns: 1fr 0.55fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
}
.contact-hero .about-photo { order: 2; }
@media (max-width: 860px) {
  .contact-hero { grid-template-columns: 1fr; }
  .contact-hero .about-photo { order: 0; max-width: 280px; }
}

.resume-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(28px, 4vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.resume-card h2 { font-size: 1.4rem; margin: 10px 0 8px; }
.resume-card p { color: var(--text-muted); max-width: 46ch; }

.cta-actions { margin-top: 32px; display: flex; justify-content: center; }
.cta-socials { justify-content: center; margin-top: 28px; }
.about-photo {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  display: block;
}

.about-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
  display: block;
}
.about-name {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.about-pronounce {
  margin-top: 8px;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--text-muted);
  font-size: 1.05rem;
}
.about-bio {
  margin-top: 20px;
  max-width: 62ch;
  font-size: 1.05rem;
  color: var(--text-muted);
}
.about-bio strong { color: var(--text); font-weight: 600; }

.about-meta-grid {
  margin-top: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.about-meta h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 10px;
}
.about-meta p { color: var(--text-muted); font-size: 0.96rem; }

.about-socials {
  margin-top: 28px;
  display: flex;
  gap: 10px;
}

/* ---------- Superpowers ---------- */
.power-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 40px;
}
.power-item h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}
.power-item p { color: var(--text-muted); font-size: 0.96rem; }

/* ---------- Photo carousel (decorative placeholders, auto-scrolling, full-bleed) ---------- */
.photo-carousel {
  overflow: hidden;
}
.photo-carousel-track {
  display: flex;
  width: max-content;
  animation: photo-scroll 28s linear infinite;
}
.photo-carousel:hover .photo-carousel-track { animation-play-state: paused; }
@keyframes photo-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .photo-carousel-track { animation: none; overflow-x: auto; }
}
.photo-strip-tile {
  flex: 0 0 clamp(220px, 26vw, 420px);
  height: clamp(260px, 34vw, 480px);
  position: relative;
  overflow: hidden;
}
.photo-strip-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.35), transparent 55%);
}

/* ---------- Stacked list (Featured in / Writing) ---------- */
.stacked-list { display: flex; flex-direction: column; }
.stacked-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 24px;
  padding-block: 20px;
  border-top: 1px solid var(--border);
}
.stacked-list .stacked-row:first-child { border-top: none; }
.stacked-year {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  padding-top: 3px;
  font-variant-numeric: tabular-nums;
}
.stacked-title {
  font-size: 1.02rem;
  font-weight: 600;
  transition: color 0.2s ease;
}
.stacked-row a.stacked-title:hover { color: var(--accent); }
.stacked-source {
  margin-top: 4px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ---------- Education ---------- */
.education-list { display: flex; flex-direction: column; gap: 24px; }
.education-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 24px;
}
.education-year { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); padding-top: 3px; }
.education-item h3 { font-size: 1.02rem; margin-bottom: 4px; }
.education-item p { color: var(--text-muted); font-size: 0.9rem; }

@media (max-width: 860px) {
  .about-hero { grid-template-columns: 1fr; }
  .about-photo { max-width: 280px; }
  .about-meta-grid { grid-template-columns: 1fr; gap: 20px; }
  .power-grid { grid-template-columns: 1fr; }
  .stacked-row, .education-item { grid-template-columns: 70px 1fr; gap: 16px; }
}

/* ---------- About: bento ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(120px, auto);
  gap: 18px;
}
.bento-cell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px;
  box-shadow: var(--shadow);
}
.bento-bio { grid-column: span 2; grid-row: span 2; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.bento-bio p { color: var(--text-muted); font-size: 1.02rem; }

.bento-stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.bento-num { font-family: var(--font-display); font-size: 2.6rem; font-weight: 600; letter-spacing: -0.02em; }
.bento-label { font-size: 0.85rem; color: var(--text-muted); }
.bento-accent { background: var(--accent-soft); border-color: transparent; }
.bento-accent .bento-num { color: var(--accent); }

.bento-now {
  grid-column: span 2;
  background: var(--accent-2-soft);
  border-color: transparent;
}
.bento-now h3 { font-size: 1.05rem; margin-bottom: 8px; }
.bento-now p { color: var(--text-muted); font-size: 0.95rem; }

.bento-list h3 { font-size: 0.95rem; color: var(--text-muted); font-weight: 600; margin-bottom: 14px; }
.bento-list ul { display: flex; flex-direction: column; gap: 10px; }
.bento-list li {
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 9px;
}
.bento-list li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  flex-shrink: 0;
}

/* ---------- Projects ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
  transform-style: preserve-3d;
  perspective: 900px;
}
.project-thumb {
  height: 240px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 34px;
  overflow: hidden;
}
.project-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(0,0,0,0.06) 0, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(0,0,0,0.05) 0, transparent 45%);
}
.thumb-1 { background: linear-gradient(135deg, #f2e2da, #e7c9b8); }
.thumb-2 { background: linear-gradient(135deg, #dde7e2, #b9d0c4); }
.thumb-3 { background: linear-gradient(135deg, #e4e0f5, #c6bfe8); }
.thumb-4 { background: linear-gradient(135deg, #fbe8d3, #f2c48a); }

.project-thumb .mock-window,
.project-thumb .mock-phone {
  position: relative;
  z-index: 1;
  width: auto;
  height: 168px;
}

.project-metric {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: #241c14;
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 3px;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(6px);
  padding: 7px 13px;
  border-radius: 999px;
}
.project-metric small { font-size: 0.85rem; }
.project-metric em {
  font-style: normal;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.68rem;
  color: rgba(36, 28, 20, 0.7);
  align-self: center;
  margin-left: 3px;
}

.project-body { padding: 24px 26px 28px; }
.project-tags { display: flex; gap: 8px; margin-bottom: 12px; }
.project-tags span {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
}
.project-body h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  line-height: 1.3;
}
.project-body p {
  color: var(--text-muted);
  font-size: 0.94rem;
  margin-bottom: 16px;
}
.project-link {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.project-link:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding-left: 32px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--border);
}
.timeline::after {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 2px;
  height: var(--line-progress, 0%);
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  transition: height 0.15s linear;
}
.timeline-item { position: relative; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -38px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}
.timeline-date {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.timeline-content h3 { font-size: 1.1rem; margin-bottom: 8px; }
.timeline-content p { color: var(--text-muted); font-size: 0.95rem; max-width: 60ch; }

/* ---------- Testimonials ---------- */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  gap: 24px;
}
.testimonial {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}
.testimonial-featured {
  grid-column: span 2;
  grid-row: span 2;
  background: var(--accent-soft);
  border-color: transparent;
  justify-content: center;
}
.testimonial-featured p { font-size: 1.5rem; line-height: 1.35; }
.testimonial p {
  font-family: var(--font-display);
  font-size: 1.08rem;
  line-height: 1.5;
}
.testimonial footer {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: normal;
}

/* ---------- Contact ---------- */
.contact-heading { font-size: clamp(2rem, 4.4vw, 3rem); }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.contact-card:hover { border-color: var(--accent); }
.contact-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--accent);
}
.contact-value { font-size: 1.05rem; font-weight: 500; }

/* ---------- Footer ----------
   Deliberately always dark, independent of the light/dark toggle — a
   follows the light/dark toggle like the rest of the site. */
.site-footer {
  background: var(--bg-alt);
  color: var(--text);
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding-block: clamp(36px, 6vw, 56px);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.footer-tagline { transition: opacity 0.4s ease; }
@media (prefers-reduced-motion: reduce) {
  .footer-tagline { transition: none; }
}
.footer-socials { display: flex; gap: 10px; }
.footer-socials a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.footer-socials a:hover { border-color: var(--accent); color: var(--accent); }
/* ---------- Back-to-top floating button ---------- */
.back-to-top-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: var(--shadow);
  transition: opacity 0.25s ease, transform 0.25s ease, border-color 0.2s ease;
}
/* Without JS there's no scroll listener to reveal it on cue, so it stays
   visible by default — same has-js gating pattern used for .reveal. */
html.has-js .back-to-top-fab {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}
html.has-js .back-to-top-fab.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.back-to-top-fab:hover { border-color: var(--accent); color: var(--accent); }
@media (prefers-reduced-motion: reduce) {
  .back-to-top-fab { transition: opacity 0.25s ease; }
}
@media (max-width: 640px) {
  .back-to-top-fab { right: 16px; bottom: 16px; width: 42px; height: 42px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav {
    position: fixed;
    inset: 72px 0 auto 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 20px 24px 28px;
    gap: 18px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .nav.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .menu-btn { display: inline-flex; }

  .project-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-bio { grid-column: span 2; grid-row: auto; }
  .bento-now { grid-column: span 2; }
  .testimonial-grid { grid-template-columns: 1fr; }
  .testimonial-featured { grid-column: auto; grid-row: auto; }
}

@media (max-width: 480px) {
  .bento { grid-template-columns: 1fr; }
  .bento-bio, .bento-now { grid-column: span 1; }
}

@media (hover: none) and (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}
