/* Theme: system default + manual override via data-theme on html */
:root {
  color-scheme: dark light;
  --font: "Outfit", system-ui, sans-serif;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --header-h: 72px;
  --transition: 0.25s ease;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #12101c;
  --bg-elevated: #1a1728;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --text: #f4f2ff;
  --text-muted: #b9b3cf;
  --accent: #c084fc;
  --accent-2: #f472b6;
  --accent-glow: rgba(192, 132, 252, 0.35);
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --hero-glow-a: rgba(124, 58, 237, 0.35);
  --hero-glow-b: rgba(236, 72, 153, 0.2);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f4fc;
  --bg-elevated: #ffffff;
  --surface: rgba(76, 29, 149, 0.06);
  --surface-strong: rgba(76, 29, 149, 0.1);
  --text: #1a1025;
  --text-muted: #5b5368;
  --accent: #7c3aed;
  --accent-2: #db2777;
  --accent-glow: rgba(124, 58, 237, 0.2);
  --border: rgba(26, 16, 37, 0.08);
  --shadow: 0 20px 60px rgba(76, 29, 149, 0.12);
  --hero-glow-a: rgba(124, 58, 237, 0.15);
  --hero-glow-b: rgba(236, 72, 153, 0.12);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #12101c;
    --bg-elevated: #1a1728;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-strong: rgba(255, 255, 255, 0.08);
    --text: #f4f2ff;
    --text-muted: #b9b3cf;
    --accent: #c084fc;
    --accent-2: #f472b6;
    --accent-glow: rgba(192, 132, 252, 0.35);
    --border: rgba(255, 255, 255, 0.08);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    --hero-glow-a: rgba(124, 58, 237, 0.35);
    --hero-glow-b: rgba(236, 72, 153, 0.2);
  }
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f6f4fc;
    --bg-elevated: #ffffff;
    --surface: rgba(76, 29, 149, 0.06);
    --surface-strong: rgba(76, 29, 149, 0.1);
    --text: #1a1025;
    --text-muted: #5b5368;
    --accent: #7c3aed;
    --accent-2: #db2777;
    --accent-glow: rgba(124, 58, 237, 0.2);
    --border: rgba(26, 16, 37, 0.08);
    --shadow: 0 20px 60px rgba(76, 29, 149, 0.12);
    --hero-glow-a: rgba(124, 58, 237, 0.15);
    --hero-glow-b: rgba(236, 72, 153, 0.12);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body.nav-open {
  overflow: hidden;
  touch-action: none;
}

#main {
  padding-top: var(--header-h);
}

.anchor-target {
  scroll-margin-top: calc(var(--header-h) + 12px);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-2);
}

.skip-link {
  position: fixed;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: var(--bg);
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@media (max-width: 767px) {
  .header-inner {
    padding: 0 1rem;
    justify-content: flex-start;
    gap: 0.6rem;
  }

  .brand {
    margin-right: auto;
  }

  .theme-toggle {
    position: static;
    transform: none;
    margin-right: 0.2rem;
    flex-shrink: 0;
  }

  .brand-name {
    font-size: 0.9rem;
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.06em;
}

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

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  color: var(--accent);
  box-shadow: 0 0 24px var(--accent-glow);
  overflow: hidden;
  flex-shrink: 0;
}

.brand-mark--photo {
  padding: 0;
}

.brand-mark--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-name {
  font-size: 0.95rem;
}

.nav {
  display: none;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color var(--transition);
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text);
}

.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  display: grid;
  place-items: center;
  position: relative;
  transition: background var(--transition), border-color var(--transition);
}

.theme-toggle:hover {
  background: var(--surface-strong);
}

.theme-icon {
  position: absolute;
  width: 20px;
  height: 20px;
  transition: opacity var(--transition), transform var(--transition);
}

.theme-icon--sun {
  background: radial-gradient(circle, #facc15 0 42%, transparent 44%);
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px #f59e0b, 0 0 16px rgba(245, 158, 11, 0.4);
  opacity: 0;
  transform: scale(0.6) rotate(-45deg);
}

.theme-icon--moon {
  background: radial-gradient(circle at 70% 32%, rgba(255, 255, 255, 0.22) 0 14%, transparent 16%),
    radial-gradient(circle at 35% 40%, #d6d3e8 0 52%, transparent 54%);
  border-radius: 50%;
  box-shadow: inset -6px -2px 0 0 color-mix(in srgb, var(--bg) 78%, transparent);
  opacity: 1;
  transform: scale(1);
}

[data-theme="light"] .theme-icon--sun {
  opacity: 1;
  transform: scale(1) rotate(0);
}

[data-theme="light"] .theme-icon--moon {
  opacity: 0;
  transform: scale(0.6);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-icon--sun {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
  :root:not([data-theme="dark"]) .theme-icon--moon {
    opacity: 0;
    transform: scale(0.6);
  }
}

[data-theme="dark"] .theme-icon--sun {
  opacity: 0;
  transform: scale(0.6) rotate(-45deg);
}

[data-theme="dark"] .theme-icon--moon {
  opacity: 1;
  transform: scale(1);
}

.nav-burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  padding: 0;
  transition: background var(--transition), border-color var(--transition);
}

.nav-burger:hover {
  background: var(--surface-strong);
}

.nav-burger span {
  display: block;
  height: 2px;
  width: 22px;
  background: var(--text);
  margin: 0 auto;
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-overlay {
  position: fixed;
  inset: 0;
  top: var(--header-h);
  z-index: 44;
  background: rgba(8, 6, 16, 0.55);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

[data-theme="light"] .nav-overlay {
  background: rgba(26, 16, 37, 0.35);
}

.nav-overlay:not([hidden]) {
  opacity: 1;
  pointer-events: auto;
}

.nav-overlay[hidden] {
  display: none;
}

.mobile-nav {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  max-height: min(420px, calc(100dvh - var(--header-h)));
  background: color-mix(in srgb, var(--bg-elevated) 96%, transparent);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 1.5rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  z-index: 45;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 1rem 0.25rem;
  border-radius: var(--radius-sm);
  border-bottom: 1px solid var(--border);
  transition: color var(--transition), background var(--transition);
}

.mobile-nav-link:hover,
.mobile-nav-link:focus-visible {
  color: var(--accent);
  outline: none;
}

@media (min-width: 768px) {
  .nav {
    display: flex;
  }
  .nav-burger {
    display: none;
  }
  .mobile-nav {
    display: none !important;
  }
}

/* Stacking scroll:
   Each section uses position: sticky with a calculated top so that:
   - Short panels (≤ viewport) stick immediately (top: header-h)
   - Tall panels (> viewport) scroll through naturally first, then stick
     when their bottom reaches the viewport bottom — at which point the
     next panel rises up over it.
   --panel-height is set per-panel by JS = panel.offsetHeight. */
.stack-panel {
  --panel-height: calc(100dvh - var(--header-h));
  background: var(--bg);
  position: sticky;
  top: min(var(--header-h), calc(100dvh - var(--panel-height)));
  min-height: calc(100dvh - var(--header-h));
  will-change: transform;
}

.stack-panel--hero {
  z-index: 10;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
}

.stack-panel--portfolio {
  z-index: 20;
  box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.32);
}

.stack-panel--resume {
  position: relative;
  top: auto;
  z-index: 30;
  background: var(--bg-elevated);
  box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.32);
}

[data-theme="light"] .stack-panel--hero {
  box-shadow: 0 16px 48px rgba(76, 29, 149, 0.1);
}

[data-theme="light"] .stack-panel--portfolio,
[data-theme="light"] .stack-panel--resume {
  box-shadow: 0 -16px 48px rgba(76, 29, 149, 0.08);
}

.stack-panel__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.25rem 1.25rem 2.75rem;
}

.portfolio-inner {
  padding-bottom: 2rem;
}

.layer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  height: 100%;
  box-sizing: border-box;
}

.stack-panel--hero .layer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.stack-panel--hero .layer-inner.hero {
  flex: 1;
  min-height: 0;
  width: 100%;
}

.hero {
  position: relative;
  overflow: hidden;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: clamp(0.75rem, 2vw, 1.25rem);
  padding-bottom: clamp(0.75rem, 3vw, 1.5rem);
}

.hero-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  gap: clamp(1.25rem, 4vw, 2.5rem);
  align-items: center;
  position: relative;
  z-index: 1;
  width: 100%;
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 2rem 2.5rem;
    align-items: center;
    padding-top: 0.25rem;
    padding-left: 0;
  }
}

.hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.hero-glow--1 {
  width: 320px;
  height: 320px;
  background: var(--hero-glow-a);
  top: -80px;
  left: -100px;
}

.hero-glow--2 {
  width: 280px;
  height: 280px;
  background: var(--hero-glow-b);
  bottom: 10%;
  right: -60px;
}

.eyebrow {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
  letter-spacing: 0.04em;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.hero-name {
  color: var(--text);
}

.hero-role {
  display: inline-block;
  background: linear-gradient(102deg, #f472b6 0%, #e879f9 38%, #a78bfa 88%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

@supports not (background-clip: text) {
  .hero-role {
    color: var(--accent-2);
    -webkit-text-fill-color: unset;
  }
}

.hero-sub {
  color: var(--text-muted);
  font-size: clamp(0.95rem, 2.8vw, 1.05rem);
  margin: 0 0 1.35rem;
  max-width: 38ch;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.75rem;
  margin-bottom: 1.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow var(--transition), background var(--transition), color var(--transition),
    border-color var(--transition);
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 8px 32px var(--accent-glow);
}

.btn--primary:hover {
  color: var(--bg);
  filter: brightness(1.08);
}

.btn--ghost {
  background: transparent;
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
}

.btn--ghost:hover {
  color: var(--accent-2);
  border-color: var(--accent-2);
}

.scroll-hint {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin: 0;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  max-width: 100%;
}

.scroll-hint__text {
  line-height: 1.35;
}

.scroll-hint__line {
  flex-shrink: 0;
  width: 36px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: 2px;
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: min(52vw, 280px);
  isolation: isolate;
}

@media (min-width: 960px) {
  .hero-visual {
    min-height: 320px;
    justify-content: flex-end;
  }
}

.hero-photo-stage {
  position: absolute;
  inset: -4% -8% -8% -8%;
  pointer-events: none;
  z-index: 0;
}

.shape {
  position: absolute;
  border-radius: var(--radius-sm);
  opacity: 0.55;
}

.shape--cube {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--surface-strong), transparent);
  border: 1px solid var(--border);
  top: 8%;
  right: 6%;
  transform: rotate(12deg);
}

.shape--sphere {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--accent), #4c1d95);
  bottom: 12%;
  left: 2%;
}

.shape--pyramid {
  width: 0;
  height: 0;
  border-left: 24px solid transparent;
  border-right: 24px solid transparent;
  border-bottom: 42px solid color-mix(in srgb, var(--accent) 35%, #1e1b2e);
  background: none;
  border-radius: 0;
  top: 28%;
  left: 12%;
  opacity: 0.55;
}

.hero-photo-frame {
  position: relative;
  z-index: 2;
  margin: 0;
  width: min(300px, 82vw);
  max-width: 100%;
  border-radius: 22px;
  padding: 3px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 55%, transparent), color-mix(in srgb, var(--accent-2) 40%, transparent));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35), 0 0 0 1px var(--border), 0 0 60px var(--accent-glow);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] .hero-photo-frame {
  box-shadow: 0 20px 50px rgba(76, 29, 149, 0.12), 0 0 0 1px var(--border);
}

.hero-photo {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  border-radius: 19px;
}

@media (min-width: 960px) {
  .hero-photo-frame {
    width: min(340px, 100%);
    transform: rotate(-3deg);
  }

  .hero-photo-frame:hover {
    transform: rotate(-2deg) translateY(-3px);
  }
}

.social-rail {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
  margin: 0.25rem 0 1.25rem;
  padding-top: 0;
  flex-shrink: 0;
}

.social-rail::before {
  content: "";
  width: min(200px, 55vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 70%, transparent), transparent);
  border-radius: 2px;
}

.social-rail::after {
  content: "";
  width: min(200px, 55vw);
  height: 1px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 70%, transparent), transparent);
  border-radius: 2px;
}

@media (min-width: 960px) {
  .social-rail {
    position: relative;
    left: auto;
    bottom: auto;
    margin-top: 0.5rem;
    padding-top: 0;
    align-items: center;
    gap: 0.6rem;
    flex-direction: row;
    justify-content: flex-start;
  }

  .social-rail::before {
    width: 60px;
    flex: 0 0 60px;
    height: 1px;
    background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 85%, transparent), transparent);
  }

  .social-rail::after {
    content: none;
  }
}

.social-link {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  background: color-mix(in srgb, var(--bg-elevated) 70%, transparent);
  border: 1px solid var(--border);
  transition: color var(--transition), transform 0.18s ease, box-shadow var(--transition), border-color var(--transition),
    background var(--transition);
}

.social-link:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  transform: translateY(-2px);
  box-shadow: 0 10px 28px var(--accent-glow);
  background: var(--surface-strong);
}

@media (max-width: 959px) {
  .social-rail {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding-top: 0;
    margin-top: 0.3rem;
    margin-bottom: 0.85rem;
    gap: 0.6rem;
    align-items: center;
  }

  .social-rail::before,
  .social-rail::after {
    content: none;
  }
}

.section-head {
  max-width: 720px;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.section-lead {
  margin: 0;
  color: var(--text-muted);
}

.project-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 700px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .project-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.project-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color var(--transition);
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

.project-thumb-wrap {
  display: block;
  height: 180px;
  overflow: hidden;
  background: var(--surface);
}

.project-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.35s ease;
}

.project-card:hover .project-thumb {
  transform: scale(1.03);
}

.project-body {
  padding: 1.25rem 1.35rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.project-desc {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  flex: 1;
}

.project-link {
  font-weight: 600;
  font-size: 0.9rem;
}

.section-cta {
  text-align: center;
  margin-top: 2.5rem;
}

/* Resume — lean, interactive */
.resume-lean {
  max-width: 560px;
  margin: 0 auto;
  padding: 1.5rem 0 2.5rem;
}

.resume-intro {
  text-align: center;
  margin-bottom: 1.75rem;
}

.resume-intro__title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.resume-intro__name {
  margin: 0 0 0.5rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--accent);
}

.resume-intro__line {
  margin: 0 0 1.25rem;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.resume-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.resume-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  transition: border-color var(--transition), color var(--transition), transform 0.15s ease,
    box-shadow var(--transition);
}

.resume-chip:hover {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow: 0 6px 20px var(--accent-glow);
}

.resume-fold {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 0.6rem;
  background: color-mix(in srgb, var(--bg) 92%, var(--bg-elevated));
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

[data-theme="light"] .resume-fold {
  background: var(--bg);
}

.resume-fold[open] {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}

.resume-fold summary {
  cursor: pointer;
  list-style: none;
  padding: 0.95rem 1.15rem;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  user-select: none;
}

.resume-fold summary::-webkit-details-marker {
  display: none;
}

.resume-fold summary::after {
  content: "+";
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
  line-height: 1;
  transition: transform 0.2s ease;
}

.resume-fold[open] summary::after {
  content: "–";
  transform: rotate(180deg);
}

.resume-fold__body {
  padding: 0 1.15rem 1.1rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
  border-top: 1px solid var(--border);
}

.resume-fold__body p {
  margin: 0.75rem 0 0;
}

.resume-fold__body p:first-child {
  margin-top: 0.65rem;
}

.resume-fold__meta {
  margin: 0.65rem 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-2);
}

.resume-fold__list {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
}

.resume-fold__list li + li {
  margin-top: 0.4rem;
}

.resume-fold__list--tight {
  margin-top: 0.35rem;
}

.resume-fold__note {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  opacity: 0.95;
}

.resume-pills {
  list-style: none;
  margin: 0.65rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.resume-pills li {
  display: inline-block;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  color: var(--text);
}

.resume-foot {
  margin: 1.75rem 0 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

@media (max-width: 767px) {
  .stack-panel--resume .stack-panel__inner {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .resume-lean {
    padding-left: 0.2rem;
    padding-right: 0.2rem;
  }
}

@media (max-width: 767px) {
  .stack-panel--hero .layer-inner {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero {
    justify-content: flex-start;
    overflow: visible;
    padding-top: 0.65rem;
    padding-bottom: 0.9rem;
  }

  .hero-grid {
    gap: 1rem;
    align-items: start;
  }

  .hero-copy,
  .hero-visual {
    width: 100%;
    max-width: 100%;
  }

  .hero-title {
    font-size: clamp(2rem, 10vw, 2.7rem);
  }

  .hero-sub {
    margin-bottom: 1rem;
    max-width: none;
  }

  .hero-actions {
    margin-bottom: 0.7rem;
  }

  .hero-visual {
    min-height: 0;
    margin-top: 0.1rem;
    justify-content: center;
  }

  .hero-photo-stage .shape {
    display: none;
  }

  .hero-photo-frame {
    width: min(320px, 88vw);
    max-width: 100%;
    margin-inline: auto;
    transform: none;
  }

  .hero-photo-frame:hover {
    transform: none;
  }

  .scroll-hint {
    margin-top: 0.25rem;
    justify-content: flex-start;
  }
}

.site-footer {
  position: relative;
  z-index: 40;
  padding: 2rem 1.25rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.site-footer p {
  margin: 0;
}

.hero-stack {
  margin: -0.5rem 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

:where(a, button, summary):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 5px;
}

.mobile-nav-link.is-active {
  color: var(--accent);
}

@media (max-width: 959px) {
  .stack-panel--hero .layer-inner {
    padding-inline: 1rem;
  }
}

/* Expanded project stories and profile */
.project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem; }
.project-thumb-wrap { height: auto; aspect-ratio: 16 / 9; }
.project-body { padding: clamp(1.25rem, 3vw, 2rem); }
.project-title { font-size: 1.4rem; line-height: 1.3; }
.project-desc { flex: none; }
.project-category, .card-number { color: var(--accent); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; }
.project-category { margin: 0 0 0.65rem; }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.45rem; list-style: none; padding: 0; margin: 0 0 1.2rem; }
.project-tags li { background: var(--surface-strong); color: var(--text-muted); border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 0.25rem 0.65rem; font-size: 0.75rem; }
.project-detail { border-top: 1px solid var(--border); padding-top: 1rem; margin-top: 0.25rem; }
.project-detail h4 { margin: 0 0 0.4rem; font-size: 0.9rem; }
.project-detail p, .project-detail ul { margin: 0 0 1rem; font-size: 0.9rem; color: var(--text-muted); }
.project-detail ul { padding-left: 1.15rem; }
.project-detail li + li { margin-top: 0.3rem; }
.project-note { margin: auto 0 1rem; padding-top: 0.6rem; color: var(--text-muted); font-size: 0.78rem; }
.project-link { align-self: flex-start; }
.portfolio-cover { aspect-ratio: 16 / 9; padding: 2rem; display: flex; flex-direction: column; justify-content: center; gap: 0.6rem; background: radial-gradient(ellipse at top right, var(--accent-glow), transparent 70%), var(--bg); color: var(--text-muted); overflow: hidden; }
.portfolio-cover strong { font-size: clamp(2.4rem, 5vw, 4.6rem); line-height: 1.1; letter-spacing: -0.06em; color: var(--text); }
.portfolio-cover strong span { color: var(--accent); }
.portfolio-cover__label { font-size: 0.65rem; letter-spacing: 0.16em; }
.portfolio-cover > span:last-child { font-size: 0.85rem; }
.section-cta p { color: var(--text-muted); }
.portfolio-inner, .resume-expanded { padding-block: clamp(3rem, 7vw, 5.5rem); }
.resume-expanded { max-width: 1100px; }
.resume-intro { margin-bottom: 2.5rem; }
.about-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1.5rem; }
.info-card { min-width: 0; border: 1px solid var(--border); background: var(--bg); border-radius: var(--radius-lg); padding: clamp(1.25rem, 3vw, 2rem); }
.info-card h3 { margin: 0 0 1rem; font-size: clamp(1.3rem, 2.5vw, 1.7rem); line-height: 1.3; letter-spacing: -0.025em; }
.info-card h4 { margin: 0.6rem 0; font-size: 1.1rem; }
.info-card p, .content-heading > p:last-child, .services-grid p, .timeline-item p, .timeline-item ul, .contact-panel p { color: var(--text-muted); }
.info-card p { font-size: 0.95rem; }
.profile-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; border-top: 1px solid var(--border); margin: 1.75rem 0 0; padding-top: 1.5rem; }
.profile-facts dt { color: var(--text-muted); font-size: 0.75rem; margin-bottom: 0.2rem; }
.profile-facts dd { margin: 0; font-size: 0.88rem; font-weight: 600; }
.focus-card { background: linear-gradient(150deg, var(--surface-strong), transparent), var(--bg); }
.focus-list { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.focus-list li { padding: 1.2rem 0; border-top: 1px solid var(--border); }
.focus-list strong, .focus-list span { display: block; }
.focus-list span { margin-top: 0.4rem; color: var(--text-muted); font-size: 0.9rem; }
.content-block { margin-top: clamp(3rem, 6vw, 5rem); }
.content-heading { max-width: 680px; margin-bottom: 1.75rem; }
.content-heading h3 { margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.25; letter-spacing: -0.03em; }
.timeline { border-top: 1px solid var(--border); }
.timeline-item { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 2rem; padding: 2rem 0; border-bottom: 1px solid var(--border); }
.timeline-item h4 { font-size: 1.2rem; margin: 0; }
.timeline-item p { margin: 0.6rem 0; }
.timeline-item .timeline-date { color: var(--accent); font-size: 0.85rem; font-weight: 600; }
.timeline-item .timeline-place { font-size: 0.85rem; }
.timeline-item ul { padding-left: 1.2rem; margin-bottom: 0; }
.skills-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.services-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.services-grid article { border-top: 2px solid var(--accent); padding-top: 1rem; }
.services-grid h4 { font-size: 1.1rem; margin: 0.5rem 0; }
.services-grid p { font-size: 0.92rem; }
.contact-panel { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: center; gap: 2rem; margin-top: 4rem; padding: clamp(1.5rem, 4vw, 3rem); border: 1px solid var(--border); border-radius: var(--radius-lg); background: radial-gradient(ellipse at bottom right, var(--accent-glow), transparent 80%), var(--bg); }
.contact-panel h3 { margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.2; }
.contact-email { font-size: clamp(0.9rem, 2.5vw, 1.15rem); overflow-wrap: anywhere; }
.contact-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; }
@media (max-width: 767px) {
  .project-grid, .about-layout, .skills-grid, .services-grid, .contact-panel { grid-template-columns: minmax(0, 1fr); }
  .timeline-item { grid-template-columns: minmax(0, 1fr); gap: 0.5rem; }
  .project-title { font-size: 1.25rem; }
  .contact-actions .btn { width: 100%; }
}
@media (max-width: 359px) { .profile-facts { grid-template-columns: minmax(0, 1fr); } }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }

  .stack-panel {
    position: relative;
    top: auto;
  }

  .hero-photo-frame:hover, .project-card:hover, .social-link:hover, .project-card:hover .project-thumb {
    transform: none;
  }
}
