/* =========================================================
   TOKENS
========================================================= */
:root{
  --accent: #FF5E0E;
  --accent-ink: #ffffff;
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-pill: 999px;
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --ease: cubic-bezier(.16,.8,.24,1);
}

[data-theme="dark"]{
  --bg: #2C2C2C;
  --bg-soft: #262626;
  --surface: #383838;
  --surface-2: #414141;
  --text: #FAFAF9;
  --text-dim: #B7B4B0;
  --border: rgba(255,255,255,0.08);
  --shadow: 0 20px 50px -20px rgba(0,0,0,0.55);
  --grain-opacity: 0.05;
}

[data-theme="light"]{
  --bg: #F8F9FA;
  --bg-soft: #F1F2F4;
  --surface: #FFFFFF;
  --surface-2: #FFFFFF;
  --text: #1C1B1A;
  --text-dim: #62605D;
  --border: rgba(28,27,26,0.08);
  --shadow: 0 24px 48px -24px rgba(28,27,26,0.16);
  --grain-opacity: 0.025;
}

*,*::before,*::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background .4s var(--ease), color .4s var(--ease);
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

a{ color: inherit; text-decoration: none; }
h1,h2,h3{ font-family: var(--font-display); margin: 0; letter-spacing: -0.02em; }
p{ margin: 0; }
ul{ list-style: none; margin: 0; padding: 0; }
button{ font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }
img{ max-width: 100%; display: block; }

:focus-visible{
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.accent-text{ color: var(--accent); }

.grain{
  position: fixed; inset: 0; pointer-events: none; z-index: 999;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.wrap{ max-width: 1240px; margin: 0 auto; padding: 0 32px; }

/* =========================================================
   BUTTONS & PILLS
========================================================= */
.btn{
  display: inline-flex; align-items: center; gap: 8px;
  padding: 15px 26px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
}
.btn svg{ width: 18px; height: 18px; transition: transform .25s var(--ease); }
.btn:hover svg{ transform: translateX(3px); }
.btn-accent{
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 12px 28px -10px rgba(255,94,14,0.55);
}
.btn-accent:hover{ transform: translateY(-2px); box-shadow: 0 16px 34px -10px rgba(255,94,14,0.65); }
.btn-ghost{
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover{ border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-lg{ padding: 18px 32px; font-size: 1.05rem; }

.pill{
  display: inline-flex; align-items: center;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
}
.pill-level{
  background: rgba(255,94,14,0.12);
  color: var(--accent);
}
.pill-learning{
  background: var(--accent);
  color: var(--accent-ink);
  margin-left: 10px;
}
.pill-tag{
  background: var(--bg-soft);
  color: var(--text-dim);
  border: 1px solid var(--border);
}

/* =========================================================
   NAV
========================================================= */
.nav-wrap{
  position: sticky; top: 0; z-index: 100;
  padding: 20px 32px 0;
}
.nav{
  max-width: 1240px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 10px 12px 10px 22px;
  box-shadow: var(--shadow);
}
.nav-brand{
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
}
.nav-brand .dot{ color: var(--accent); }
.nav-links{
  display: flex; gap: 30px;
  font-weight: 600; font-size: 0.92rem;
}
.nav-links a{ color: var(--text-dim); transition: color .2s var(--ease); position: relative; }
.nav-links a:hover{ color: var(--text); }
.nav-actions{ display: flex; align-items: center; gap: 10px; }
.nav-cta{ padding: 11px 20px; font-size: 0.88rem; }
.nav-burger{ display: none; flex-direction: column; gap: 4px; padding: 10px; }
.nav-burger span{ width: 20px; height: 2px; background: var(--text); border-radius: 2px; }
.nav-links-mobile{
  display: none;
  flex-direction: column;
  max-width: 1240px; margin: 8px auto 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.nav-links-mobile a{
  display: block; padding: 16px 24px;
  font-weight: 600; border-bottom: 1px solid var(--border);
}
.nav-links-mobile.open{ display: flex; }

/* theme toggle */
.theme-toggle-track{
  width: 54px; height: 30px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  display: flex; align-items: center;
  padding: 3px;
  transition: background .3s var(--ease);
}
.theme-toggle-thumb{
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  transition: transform .35s var(--ease);
}
[data-theme="light"] .theme-toggle-thumb{ transform: translateX(24px); }
.theme-toggle-thumb svg{ width: 14px; height: 14px; }
.icon-moon{ display: none; }
[data-theme="light"] .icon-sun{ display: none; }
[data-theme="light"] .icon-moon{ display: block; }

/* =========================================================
   BENTO GRID
========================================================= */
.bento{
  display: grid;
  gap: 20px;
}
.card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 32px;
  position: relative;
  overflow: hidden;
}

/* =========================================================
   HERO
========================================================= */
.hero{ padding: 56px 32px 0; }
.hero-bento{
  max-width: 1240px; margin: 0 auto;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: auto auto;
}
.card-hero-main{
  grid-column: span 8; grid-row: span 2;
  border-radius: var(--radius-xl);
  padding: 56px;
  display: flex; flex-direction: column; gap: 26px;
  justify-content: center;
  min-height: 480px;
}
.card-hero-photo{
  grid-column: span 4; grid-row: span 1;
  border-radius: var(--radius-xl);
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(155deg, var(--accent) 0%, #ff8a4c 100%);
  min-height: 230px;
}
.card-hero-focus{
  grid-column: span 4; grid-row: span 1;
  border-radius: var(--radius-xl);
  display: flex; flex-direction: column; justify-content: center; gap: 12px;
}

.eyebrow{
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.eyebrow-alone{ margin-bottom: 14px; }
.status-dot{
  width: 8px; height: 8px; border-radius: 50%;
  background: #21C55D;
  box-shadow: 0 0 0 4px rgba(33,197,93,0.18);
}

.hero-headline{
  font-size: clamp(2.6rem, 5.4vw, 4.5rem);
  font-weight: 800;
  line-height: 0.98;
}
.headline-scribble-wrap{ position: relative; display: inline-block; color: var(--accent); }
.scribble-underline{
  position: absolute; left: -2%; bottom: -0.28em; width: 104%; height: 0.5em;
  overflow: visible;
}
.hero-sub{
  font-size: 1.08rem;
  color: var(--text-dim);
  max-width: 46ch;
}
.hero-actions{ display: flex; gap: 14px; flex-wrap: wrap; margin-top: 4px; }

.hero-arrow{
  position: absolute; right: 40px; bottom: 30px;
  width: 100px; height: 90px;
  opacity: 0.9;
  transform: rotate(4deg);
}

.photo-frame{
  width: 168px; height: 168px;
  border-radius: 50%;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 2;
  border: 4px solid color-mix(in srgb, #fff 40%, transparent);
}
.photo-placeholder{
  width: 152px; height: 152px; border-radius: 50%;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 800; font-size: 2.6rem;
  color: var(--accent);
}
.photo-placeholder img{
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  border-radius: 50%;
}
.scribble-circle{
  position: absolute; inset: -10px;
  width: calc(100% + 20px); height: calc(100% + 20px);
  opacity: 0.5;
}

.mini-label{
  font-family: var(--font-mono); font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-dim);
}
.focus-word{ font-family: var(--font-display); font-weight: 800; font-size: 2rem; }
.focus-bar-track{
  width: 100%; height: 8px; border-radius: var(--radius-pill);
  background: var(--bg-soft); overflow: hidden; border: 1px solid var(--border);
}
.focus-bar-fill{
  width: 42%; height: 100%; border-radius: var(--radius-pill);
  background: var(--accent);
}
.focus-note{ font-size: 0.88rem; color: var(--text-dim); }

.card-hero-stats{
  grid-column: span 6;
  border-radius: var(--radius-xl);
  display: flex; align-items: center; justify-content: space-around;
  padding: 24px 16px;
}
.stat{ text-align: center; }
.stat-num{ font-family: var(--font-display); font-size: 1.9rem; font-weight: 800; color: var(--accent); }
.stat-label{ font-size: 0.74rem; color: var(--text-dim); font-weight: 600; max-width: 8ch; margin: 0 auto; }
.stat-divider{ width: 1px; align-self: stretch; background: var(--border); }

.card-hero-location{
  grid-column: span 6;
  border-radius: var(--radius-xl);
  display: flex; align-items: center; gap: 14px;
}
.card-hero-location svg{ width: 26px; height: 26px; color: var(--accent); flex-shrink: 0; }
.location-text{ font-size: 0.88rem; font-weight: 600; }

/* =========================================================
   MARQUEE
========================================================= */
.marquee{
  margin: 64px 0;
  padding: 18px 0;
  background: var(--accent);
  color: #fff;
  overflow: hidden;
  transform: rotate(-1.4deg);
}
.marquee-track{
  display: flex; gap: 28px; white-space: nowrap;
  width: max-content;
  animation: scroll-left 26s linear infinite;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 0.01em;
}
.marquee-dot{ font-size: 0.7rem; opacity: 0.7; align-self: center; }
@keyframes scroll-left{
  from{ transform: translateX(0); }
  to{ transform: translateX(-50%); }
}

/* =========================================================
   SECTION SHARED
========================================================= */
.section{
  max-width: 1240px; margin: 0 auto;
  padding: 40px 32px 100px;
}
.section-head{ margin-bottom: 44px; max-width: 640px; }
.section-title{
  font-size: clamp(2rem, 3.6vw, 3rem);
  font-weight: 800;
  line-height: 1.02;
  margin-bottom: 14px;
}
.section-sub{ color: var(--text-dim); font-size: 1.05rem; }

/* =========================================================
   STACK
========================================================= */
.stack-bento{
  grid-template-columns: repeat(4, 1fr);
}
.stack-card{
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column; gap: 12px;
  transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.stack-card:hover{ transform: translateY(-4px); border-color: var(--accent); }
.stack-icon{
  width: 52px; height: 52px; border-radius: var(--radius-md);
  background: var(--icon-bg, var(--bg-soft));
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
}
.stack-icon svg{ width: 26px; height: 26px; }
.stack-card h3{ font-size: 1.25rem; font-weight: 700; display: flex; align-items: center; flex-wrap: wrap; }
.stack-card p{ color: var(--text-dim); font-size: 0.94rem; flex-grow: 1; }
.stack-card-wide{
  grid-column: span 4;
  flex-direction: row;
  align-items: center;
  gap: 24px;
  background: linear-gradient(120deg, var(--surface) 60%, color-mix(in srgb, var(--accent) 8%, var(--surface)) 100%);
}
.stack-card-learning h3{ font-size: 1.4rem; }
.stack-card-learning p{ max-width: 46ch; }
.learning-scribble{
  position: absolute; right: 0; top: 0; width: 220px; height: auto; opacity: 0.35;
}

/* =========================================================
   PROJECTS
========================================================= */
.projects-bento{
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
}
.project-card{
  border-radius: var(--radius-xl);
  padding: 0;
  display: flex; flex-direction: column;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.project-card:hover{ transform: translateY(-6px); }
.project-card-tall{ grid-row: span 2; }
.project-card-wide{ grid-column: span 2; }
.project-card-wide .project-media{ min-height: 160px; }
.project-media{
  position: relative;
  min-height: 190px;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  background-size: 220% 220%;
  animation: gradient-shift 9s ease infinite;
  flex-shrink: 0;
}
@keyframes gradient-shift{
  0%,100%{ background-position: 0% 30%; }
  50%{ background-position: 100% 70%; }
}
.project-media-tag{
  position: absolute; top: 18px; left: 20px;
  font-family: var(--font-mono);
  font-weight: 600; font-size: 0.85rem;
  color: rgba(255,255,255,0.85);
  background: rgba(0,0,0,0.2);
  padding: 4px 10px; border-radius: var(--radius-pill);
}
.project-body{
  padding: 26px 26px 28px;
  display: flex; flex-direction: column; gap: 12px; flex-grow: 1;
}
.project-tags{ display: flex; gap: 8px; flex-wrap: wrap; }
.project-body h3{ font-size: 1.35rem; font-weight: 700; }
.project-body p{ color: var(--text-dim); font-size: 0.95rem; flex-grow: 1; }
.project-links{ display: flex; gap: 20px; margin-top: 6px; }
.project-link{
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 700; font-size: 0.9rem;
  border-bottom: 2px solid transparent;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.project-link svg{ width: 15px; height: 15px; }
.project-link:hover{ color: var(--accent); border-color: var(--accent); }

/* =========================================================
   ABOUT
========================================================= */
.about-bento{
  grid-template-columns: 1fr 2fr;
  grid-template-rows: auto auto;
}
.about-card-main, .about-card-side, .about-card-photo{
  border-radius: var(--radius-xl);
}
.about-card-photo{
  padding: 0;
  min-height: 320px;
}
.about-card-photo img{
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
.about-card-side{
  grid-column: span 2;
}
.about-title{ margin-bottom: 20px; }
.about-text{ color: var(--text-dim); font-size: 1.02rem; margin-bottom: 16px; max-width: 60ch; }
.about-text:last-child{ margin-bottom: 0; }
.about-arrow{
  position: absolute; top: 34px; right: 40px;
  width: 84px; height: 84px;
  transform: scaleX(-1) rotate(-8deg);
  opacity: 0.85;
}
.about-card-side{
  display: flex; flex-direction: column; justify-content: center; gap: 18px;
  background: var(--bg-soft);
}
.chip-row{ display: flex; flex-wrap: wrap; gap: 10px; }

/* =========================================================
   CONTACT
========================================================= */
.contact-card{
  border-radius: var(--radius-xl);
  padding: 72px 48px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-soft) 100%);
}
.contact-title{ margin-bottom: 0; }
.contact-sub{ max-width: 46ch; margin-bottom: 6px; }
.contact-actions{ margin: 12px 0 4px; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.social-row{ display: flex; gap: 28px; margin-top: 8px; }
.social-link{
  font-weight: 700; font-size: 0.92rem; color: var(--text-dim);
  border-bottom: 2px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.social-link:hover{ color: var(--accent); border-color: var(--accent); }
.contact-scribble{
  position: absolute; left: 50%; top: -10px; transform: translateX(-50%);
  width: 260px; height: auto; opacity: 0.5;
}

/* =========================================================
   FOOTER
========================================================= */
.footer{
  max-width: 1240px; margin: 0 auto;
  padding: 0 32px 48px;
  display: flex; align-items: center; justify-content: space-between;
  color: var(--text-dim); font-size: 0.9rem;
}
.back-to-top{
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  transition: transform .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}
.back-to-top svg{ width: 18px; height: 18px; }
.back-to-top:hover{ transform: translateY(-3px); border-color: var(--accent); color: var(--accent); }

/* =========================================================
   SCROLL REVEAL
========================================================= */
.reveal{ opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in{ opacity: 1; transform: translateY(0); }

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 980px){
  .nav-links{ display: none; }
  .nav-burger{ display: flex; }
  .card-hero-main{ grid-column: span 12; padding: 40px; }
  .card-hero-photo{ grid-column: span 6; }
  .card-hero-focus{ grid-column: span 6; }
  .card-hero-stats{ grid-column: span 6; }
  .card-hero-location{ grid-column: span 6; }
  .stack-bento{ grid-template-columns: repeat(2, 1fr); }
  .stack-card-wide{ grid-column: span 2; }
  .projects-bento{ grid-template-columns: repeat(2, 1fr); }
  .project-card-wide{ grid-column: span 2; }
  .project-card-tall{ grid-row: span 1; }
  .about-bento{ grid-template-columns: 1fr; }
  .about-card-side{ grid-column: auto; }
  .about-card-photo{ min-height: 300px; }
}

@media (max-width: 640px){
  .wrap, .section, .footer{ padding-left: 20px; padding-right: 20px; }
  .nav-wrap{ padding: 14px 16px 0; }
  .nav{ padding: 8px 8px 8px 18px; }
  .nav-cta{ display: none; }
  .hero{ padding: 36px 16px 0; }
  .card-hero-main{ padding: 30px 26px; min-height: auto; }
  .hero-headline{ font-size: clamp(2rem, 9vw, 2.8rem); }
  .hero-arrow{ display: none; }
  .card-hero-photo, .card-hero-focus, .card-hero-stats, .card-hero-location{ grid-column: span 12; }
  .stack-bento{ grid-template-columns: 1fr; }
  .stack-card-wide{ grid-column: span 1; flex-direction: column; align-items: flex-start; }
  .projects-bento{ grid-template-columns: 1fr; }
  .project-card-wide{ grid-column: span 1; }
  .contact-card{ padding: 48px 26px; }
  .btn-lg{ font-size: 0.92rem; padding: 15px 22px; }
  .footer{ flex-direction: column; gap: 16px; text-align: center; }
}

/* =========================================================
   PHOTOGRAPHY
========================================================= */
.photos-bento{
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 190px;
}
.photo-card{
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg);
  display: flex; align-items: flex-end; padding: 18px;
  isolation: isolate;
  border: none; cursor: pointer; color: #fff; text-align: left;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.photo-card img{
  position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
.photo-card::after{
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.02) 40%, rgba(0,0,0,.55));
}
.photo-cat{
  position: relative;
  font-family: var(--font-body); font-weight: 700;
  font-size: 0.9rem; color: #fff;
  border: 1px solid rgba(255,255,255,.4);
  background: rgba(0,0,0,.35);
  padding: 6px 12px; border-radius: var(--radius-pill);
}
.photos-cta{ margin-top: 18px; text-align: center; font-weight: 600; color: var(--text-dim); }
.photos-link{ color: var(--text); border-bottom: 2px solid transparent; transition: color .2s var(--ease), border-color .2s var(--ease); font-weight: 700; }
.photos-link:hover{ color: var(--accent); border-color: var(--accent); }
@media (hover: hover) and (prefers-reduced-motion: no-preference){
  .photo-card:hover{ transform: translateY(-4px); box-shadow: 0 18px 34px -18px rgba(0,0,0,.5); }
}
@media (max-width: 980px){
  .photos-bento{ grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
}
@media (max-width: 640px){
  .photos-bento{ grid-template-columns: 1fr; grid-auto-rows: 200px; }
}

/* =========================================================
   LIGHTBOX
========================================================= */
.lightbox{
  position: fixed; inset: 0; z-index: 1000;
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
.lightbox.open{ display: flex; }
.lightbox-backdrop{
  position: absolute; inset: 0;
  background: rgba(10,10,12,.9);
  backdrop-filter: blur(6px);
}
.lightbox-panel{
  position: relative; z-index: 1;
  max-width: 92vw; max-height: 88vh;
  margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.lightbox-img{
  max-width: 92vw; max-height: 78vh;
  width: auto; height: auto;
  object-fit: contain;
  border-radius: 12px;
  background: #000;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.7);
}
.lightbox-caption{
  color: var(--text-dim); font-size: 0.9rem; font-weight: 600;
}
.lightbox-close, .lightbox-nav{
  position: absolute; z-index: 2;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.5); color: #fff;
  font-size: 1.2rem; display: flex; align-items: center; justify-content: center;
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.lightbox-close:hover, .lightbox-nav:hover{ background: var(--accent); color: #fff; }
.lightbox-close{
  top: 8px; right: 8px;
  border-radius: 50%;
}
.lightbox-prev, .lightbox-next{
  top: 50%; transform: translateY(-50%);
}
.lightbox-prev{ left: -64px; }
.lightbox-next{ right: -64px; }
.lightbox-prev:hover{ transform: translateY(-50%) scale(1.08); }
.lightbox-next:hover{ transform: translateY(-50%) scale(1.08); }
@media (max-width: 640px){
  .lightbox-prev, .lightbox-next{ position: static; transform: none; width: 40px; height: 40px; }
  .lightbox-prev:hover, .lightbox-next:hover{ transform: scale(1.08); }
  .lightbox-panel{ flex-direction: row; }
}

/* =========================================================
   MOTION PACK (dark-gated, mobile-safe)
   Animate transform/opacity only; heavy FX gated to dark mode
   and reduced/disabled on low-end touch devices.
========================================================= */

/* Hero load-in (one-time, GPU-friendly) */
@keyframes heroRise{ from{ opacity: 0; transform: translateY(26px); } to{ opacity: 1; transform: none; } }
.hero-bento .card{ animation: heroRise .7s var(--ease) both; }
.card-hero-main{ animation-delay: .05s; }
.card-hero-photo{ animation-delay: .22s; }
.card-hero-focus{ animation-delay: .35s; }
.card-hero-stats{ animation-delay: .5s; }
.card-hero-location{ animation-delay: .62s; }

/* Scribble underline draws itself in */
@keyframes drawLine{ to{ stroke-dashoffset: 0; } }
.scribble-underline path{
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: drawLine 1.6s var(--ease) .5s forwards;
}
@media (prefers-reduced-motion: reduce){
  .scribble-underline path{ stroke-dashoffset: 0; animation: none; }
}

/* Photo ring reveal */
@keyframes photoIn{ from{ opacity: 0; transform: scale(.82); } to{ opacity: 1; transform: scale(1); } }
.photo-frame{ animation: photoIn .7s var(--ease) .35s both; }
@keyframes fadeIn{ from{ opacity: 0; } to{ opacity: 1; } }
.scribble-circle{ animation: fadeIn .8s var(--ease) .9s both; }
.hero-arrow{ animation: fadeIn .8s var(--ease) 1s both; }

/* Hero headline word-rotator (pure CSS, no JS) */
.headline-scribble-wrap{ color: var(--accent); }
.headline-rotator{
  display: inline-block; overflow: hidden; vertical-align: bottom;
  height: 1.08em; max-width: 100%;
}
.headline-rotor{
  display: flex; flex-direction: column;
  animation: rotateWords 12s var(--ease) infinite;
}
.headline-word{ display: block; padding: 0 .08em; }
@keyframes rotateWords{
  0%,22%{ transform: translateY(0); }
  28%,50%{ transform: translateY(-25%); }
  56%,78%{ transform: translateY(-50%); }
  84%,100%{ transform: translateY(-75%); }
}
@media (prefers-reduced-motion: reduce){ .headline-rotor{ animation: none; } }

/* Stats & focus bar (JS animates; keep numbers tabular + smooth width) */
.stat-num{ font-variant-numeric: tabular-nums; }
.focus-bar-fill{ transition: width 1.2s var(--ease); }

/* Marquee: pulsing dots + pause on hover (desktop only) */
@keyframes dotPulse{ 0%,100%{ transform: scale(1); opacity: .6; } 50%{ transform: scale(1.5); opacity: 1; } }
.marquee-dot{ animation: dotPulse 1.5s ease-in-out infinite; }
@media (max-width: 640px){ .marquee-dot{ animation: none; } }
@media (hover: hover){ .marquee:hover .marquee-track{ animation-play-state: paused; } }

/* Card spotlight + tag pop (hover devices, motion allowed) */
@media (hover: hover) and (prefers-reduced-motion: no-preference){
  .stack-card, .project-card{ position: relative; }
  .stack-card::after, .project-card::after{
    content: ""; position: absolute; inset: 0; border-radius: inherit;
    pointer-events: none; opacity: 0; transition: opacity .3s var(--ease);
    background: radial-gradient(240px circle at var(--mx,50%) var(--my,50%), rgba(255,94,14,.18), transparent 65%);
  }
  .stack-card:hover::after, .project-card:hover::after{ opacity: 1; }
  .pill-tag{ transition: transform .2s var(--ease), background .2s var(--ease), color .2s var(--ease); }
  .pill-tag:hover{ transform: translateY(-2px) scale(1.06); background: var(--accent); color: var(--accent-ink); }
}
/* Subtle tilt on project cards (JS writes transform; hover devices only) */
@media (hover: hover) and (prefers-reduced-motion: no-preference){
  .project-card{ transition: transform .25s var(--ease), border-color .3s var(--ease); }
}

/* Flicker/blobs removed for performance: mix-blend full-page compositing
   and blurred infinite layers caused lag on low-end devices. Grain stays static. */
