/* ═══════════════════════════════════════════════════════
   AWEN · 3D Artist Portfolio — Premium Stylesheet
   ═══════════════════════════════════════════════════════ */

/* ── Reset & Variables ─────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Palette — dark luxury */
  --bg:          #0a0a0b;
  --bg-card:     #111113;
  --bg-elevated: #18181b;
  --border:      rgba(255,255,255,.06);
  --border-hover:rgba(255,255,255,.12);

  --text:        #e4e4e7;
  --text-dim:    #a1a1aa;
  --text-muted:  #71717a;

  --accent:      #c8a86e;          /* warm gold */
  --accent-dim:  rgba(200,168,110,.15);
  --accent-glow: rgba(200,168,110,.25);

  --white:       #fafafa;

  /* Typography */
  --font-sans:  'Inter', 'Noto Sans SC', system-ui, sans-serif;
  --font-serif: 'Noto Serif SC', Georgia, serif;

  /* Spacing */
  --nav-h: 64px;
  --section-py: clamp(80px, 10vw, 140px);
  --container-w: 1120px;
  --container-px: clamp(20px, 4vw, 40px);

  /* Motion */
  --ease: cubic-bezier(.4,0,.2,1);
  --ease-out: cubic-bezier(0,0,.2,1);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul { list-style: none; }

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--container-px);
}


/* ── NAV ───────────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  transition: transform .35s var(--ease), background .35s var(--ease), box-shadow .35s var(--ease);
  background: transparent;
}

#nav.scrolled {
  background: rgba(10,10,11,.85);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 1px 0 var(--border);
}

#nav.hidden {
  transform: translateY(-100%);
}

.nav-inner {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--container-px);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-weight: 500;
  letter-spacing: .04em;
  transition: opacity .3s var(--ease);
}

.nav-logo:hover { opacity: .7; }

.logo-zh {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--accent);
}

.logo-en {
  font-size: .7rem;
  color: var(--text-muted);
  letter-spacing: .15em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 36px;
}

.nav-links a {
  font-size: .9rem;
  font-weight: 400;
  letter-spacing: .06em;
  color: var(--text-dim);
  transition: color .3s var(--ease);
  position: relative;
  padding-bottom: 2px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width .3s var(--ease);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Language toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .82rem;
  letter-spacing: .05em;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 100px;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}

.lang-toggle:hover {
  border-color: var(--border-hover);
  background: rgba(255,255,255,.03);
}

.lang-sep { color: var(--text-muted); }

.lang-opt {
  color: var(--text-muted);
  cursor: pointer;
  transition: color .25s var(--ease);
}

.lang-opt.active {
  color: var(--accent);
  font-weight: 500;
}

/* Burger */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 24px;
  padding: 4px 0;
}

.nav-burger span {
  display: block;
  height: 1.5px;
  background: var(--text-dim);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}

.nav-burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 768px) {
  .nav-burger { display: flex; }
  .lang-toggle { margin-right: 12px; }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    background: rgba(10,10,11,.96);
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s var(--ease);
  }

  .nav-links.open {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    font-size: 1.1rem;
    letter-spacing: .1em;
  }
}


/* ── HERO ──────────────────────────────────────────── */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Film grain overlay */
.hero-grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='.04'/%3E%3C/svg%3E");
  background-size: 256px;
  opacity: .5;
  pointer-events: none;
}

/* Ambient orbs */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
}

.hero-orb-1 {
  width: 500px;
  height: 500px;
  top: -10%;
  right: -5%;
  background: radial-gradient(circle, rgba(200,168,110,.12) 0%, transparent 70%);
  animation: float-orb 18s ease-in-out infinite alternate;
}

.hero-orb-2 {
  width: 400px;
  height: 400px;
  bottom: -10%;
  left: -5%;
  background: radial-gradient(circle, rgba(120,100,180,.08) 0%, transparent 70%);
  animation: float-orb 22s ease-in-out infinite alternate-reverse;
}

@keyframes float-orb {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, -30px) scale(1.15); }
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 0 var(--container-px);
}

.hero-eyebrow {
  font-size: .88rem;
  font-weight: 400;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  opacity: 0;
  animation: fade-in-up .8s var(--ease-out) .2s forwards;
}

.hero-title {
  margin-bottom: 20px;
  opacity: 0;
  animation: fade-in-up .8s var(--ease-out) .4s forwards;
}

.hero-name-zh {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 300;
  letter-spacing: .12em;
  color: var(--white);
  display: block;
}

.hero-name-en {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 200;
  letter-spacing: .35em;
  color: var(--white);
  display: none;
}

.hero-sub {
  font-size: clamp(.95rem, 1.8vw, 1.15rem);
  font-weight: 300;
  letter-spacing: .12em;
  color: var(--text-dim);
  margin-bottom: 40px;
  opacity: 0;
  animation: fade-in-up .8s var(--ease-out) .6s forwards;
}

/* CTA */
.btn-primary {
  display: inline-block;
  padding: 14px 42px;
  font-size: .9rem;
  font-weight: 400;
  letter-spacing: .12em;
  color: var(--bg);
  background: var(--accent);
  border-radius: 2px;
  transition: background .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
  opacity: 0;
  animation: fade-in-up .8s var(--ease-out) .8s forwards;
}

.btn-primary:hover {
  background: #d4b97a;
  transform: translateY(-1px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.hero-scroll span {
  display: block;
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scroll-line 2s var(--ease) infinite;
}

@keyframes scroll-line {
  0%   { opacity: 1; transform: scaleY(0); transform-origin: top; }
  50%  { opacity: 1; transform: scaleY(1); transform-origin: top; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { opacity: 0; transform: scaleY(0); transform-origin: bottom; }
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ── SECTION COMMONS ──────────────────────────────── */
.section-label {
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  /* reveal */
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
}

.section-label.revealed {
  opacity: 1;
  transform: translateY(0);
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  font-weight: 300;
  letter-spacing: .04em;
  color: var(--white);
  margin-bottom: 48px;
  /* reveal */
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s var(--ease-out) .1s, transform .6s var(--ease-out) .1s;
}

.section-title.revealed {
  opacity: 1;
  transform: translateY(0);
}


/* ── ABOUT ─────────────────────────────────────────── */
#about {
  padding: var(--section-py) 0;
  border-bottom: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 60px;
  align-items: start;
  /* reveal */
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}

.about-grid.revealed {
  opacity: 1;
  transform: translateY(0);
}

.about-text h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 300;
  color: var(--white);
  margin-bottom: 20px;
  letter-spacing: .03em;
}

.about-text p {
  color: var(--text-dim);
  font-size: 1rem;
  margin-bottom: 16px;
  line-height: 1.8;
}

.about-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.about-skills span {
  padding: 6px 16px;
  font-size: .84rem;
  font-weight: 400;
  letter-spacing: .04em;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 100px;
  transition: border-color .3s var(--ease), color .3s var(--ease), background .3s var(--ease);
}

.about-skills span:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  /* reveal */
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s var(--ease-out) .15s, transform .7s var(--ease-out) .15s;
}

.about-stats.revealed {
  opacity: 1;
  transform: translateY(0);
}

.stat {
  text-align: center;
  /* reveal */
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out);
}

.stat.revealed {
  opacity: 1;
  transform: translateY(0);
}

.stat-num {
  font-size: 2.2rem;
  font-weight: 200;
  color: var(--accent);
  letter-spacing: .02em;
  line-height: 1.2;
}

.stat-label {
  font-size: .84rem;
  color: var(--text-muted);
  letter-spacing: .08em;
  margin-top: 4px;
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-stats {
    flex-direction: row;
    justify-content: space-around;
  }
}


/* ── WORKS ─────────────────────────────────────────── */
#works {
  padding: var(--section-py) 0;
}

/* Filter tabs */
.filter-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 48px;
  padding: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: fit-content;
}

.tab {
  padding: 8px 20px;
  font-size: .88rem;
  font-weight: 400;
  letter-spacing: .04em;
  color: var(--text-muted);
  border-radius: 6px;
  transition: color .3s var(--ease), background .3s var(--ease);
}

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

.tab.active {
  color: var(--white);
  background: var(--bg-elevated);
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
}

/* Project card */
.project {
  margin-bottom: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color .4s var(--ease), box-shadow .4s var(--ease);
  /* reveal */
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out), border-color .4s var(--ease), box-shadow .4s var(--ease);
}

.project.revealed {
  opacity: 1;
  transform: translateY(0);
}

.project:hover {
  border-color: var(--border-hover);
  box-shadow: 0 8px 40px rgba(0,0,0,.25);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 32px 32px 24px;
}

.project-tag {
  display: inline-block;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.project-title {
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 2.8vw, 1.9rem);
  font-weight: 300;
  color: var(--white);
  margin-bottom: 12px;
  letter-spacing: .03em;
}

.project-desc {
  font-size: .98rem;
  color: var(--text-dim);
  line-height: 1.75;
  max-width: 680px;
}

/* Expand button — hidden, galleries always open */
.project-expand {
  display: none;
}

/* ── Project Showcase (multi-image hero) ──────────── */
.project-showcase {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 12px;
  padding: 0 32px 12px;
  min-height: 420px;
}

.showcase-main {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
}

.showcase-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}

.showcase-main:hover img {
  transform: scale(1.03);
}

.showcase-main:hover .img-overlay {
  opacity: 1;
}

.showcase-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.showcase-side-item {
  position: relative;
  flex: 1;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
}

.showcase-side-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
}

.showcase-side-item:hover img {
  transform: scale(1.05);
}

.showcase-side-item:hover .img-overlay {
  opacity: 1;
}

@media (max-width: 768px) {
  .project-showcase {
    grid-template-columns: 1fr;
    padding: 0 16px 8px;
    min-height: auto;
    gap: 8px;
  }

  .showcase-main {
    aspect-ratio: auto;
    border-radius: 6px;
  }

  .showcase-main img {
    height: auto;
    object-fit: contain;
  }

  .showcase-side {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .showcase-side-item {
    aspect-ratio: auto;
  }

  .showcase-side-item img {
    height: auto;
    object-fit: contain;
  }
}

/* Hero image (fallback single image) */
.project-hero-img {
  position: relative;
  margin: 0 32px;
  border-radius: 8px;
  overflow: hidden;
}

.project-hero-img img {
  width: 100%;
  height: auto;
  transition: transform .6s var(--ease);
}

.project-hero-img:hover img {
  transform: scale(1.02);
}

.img-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10,10,11,.5);
  opacity: 0;
  transition: opacity .35s var(--ease);
}

.img-overlay span {
  font-size: .88rem;
  letter-spacing: .1em;
  color: var(--white);
  padding: 8px 20px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 100px;
}

.project-hero-img:hover .img-overlay,
.gallery-item:hover .img-overlay {
  opacity: 1;
}

/* Gallery — always visible, no expand needed */
.project-gallery {
  /* always open by default */
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  padding: 20px 32px 32px;
}

.gallery-item {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1;
  background: var(--bg-elevated);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* Scroll reveal for individual gallery items */
.gallery-item {
  opacity: 0;
  transform: translateY(24px) scale(.97);
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out);
}

.gallery-item.revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Stagger animation for gallery items */
.gallery-item:nth-child(1) { transition-delay: 0s; }
.gallery-item:nth-child(2) { transition-delay: .06s; }
.gallery-item:nth-child(3) { transition-delay: .12s; }
.gallery-item:nth-child(4) { transition-delay: .18s; }
.gallery-item:nth-child(5) { transition-delay: .24s; }
.gallery-item:nth-child(6) { transition-delay: .30s; }
.gallery-item:nth-child(7) { transition-delay: .36s; }
.gallery-item:nth-child(8) { transition-delay: .42s; }
.gallery-item:nth-child(9) { transition-delay: .48s; }
.gallery-item:nth-child(10) { transition-delay: .54s; }
.gallery-item:nth-child(11) { transition-delay: .60s; }

@media (max-width: 768px) {
  .project-header { padding: 24px 20px 16px; }
  .project-hero-img { margin: 0 16px; }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 12px 16px 24px;
  }

  .gallery-item {
    aspect-ratio: auto;
  }

  .gallery-item img {
    height: auto;
    object-fit: contain;
  }
}

@media (max-width: 480px) {
  .filter-tabs {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tab { white-space: nowrap; }
}


/* ── CONTACT ──────────────────────────────────────── */
#contact {
  padding: var(--section-py) 0;
  border-top: 1px solid var(--border);
}

.contact-sub {
  font-size: 1rem;
  color: var(--text-dim);
  margin-top: -32px;
  margin-bottom: 48px;
  line-height: 1.7;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease), transform .3s var(--ease);
  cursor: pointer;
  /* reveal */
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out), border-color .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease);
}

.contact-card.revealed {
  opacity: 1;
  transform: translateY(0);
}

.contact-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-elevated);
  box-shadow: 0 4px 24px rgba(0,0,0,.2);
  transform: translateY(-2px);
}

.contact-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border-radius: 12px;
}

.contact-icon svg {
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.contact-info { flex: 1; }

.contact-type {
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.contact-val {
  font-size: 1rem;
  color: var(--text);
  font-weight: 400;
}

.contact-arrow {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  transition: transform .3s var(--ease), color .3s var(--ease);
}

.contact-card:hover .contact-arrow {
  transform: translateX(4px);
  color: var(--accent);
}

/* Copy button */
.contact-copy {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: .84rem;
  letter-spacing: .04em;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 100px;
  cursor: pointer;
  transition: border-color .3s var(--ease), color .3s var(--ease), background .3s var(--ease);
}

.contact-copy svg {
  width: 14px;
  height: 14px;
}

.contact-copy:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.contact-copy.copied {
  border-color: #4ade80;
  color: #4ade80;
}


/* ── FOOTER ───────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-logo {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.footer-copy {
  font-size: .84rem;
  color: var(--text-muted);
  letter-spacing: .04em;
}

@media (max-width: 600px) {
  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}


/* ── LIGHTBOX ─────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,.92);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s var(--ease);
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-img-wrap {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img-wrap img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 80px rgba(0,0,0,.6);
  transition: transform .3s var(--ease);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.05);
  transition: background .3s var(--ease), border-color .3s var(--ease);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.3);
}

.lightbox-close svg,
.lightbox-prev svg,
.lightbox-next svg {
  width: 20px;
  height: 20px;
  stroke: var(--white);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
}

.lightbox-close { top: 24px; right: 24px; }
.lightbox-prev  { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 24px; top: 50%; transform: translateY(-50%); }

.lightbox-caption {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  font-size: .95rem;
  color: var(--text-dim);
  text-align: center;
  max-width: 80vw;
  letter-spacing: .03em;
}

.lightbox-counter {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  font-size: .82rem;
  color: var(--text-muted);
  letter-spacing: .1em;
}

@media (max-width: 768px) {
  .lightbox-prev,
  .lightbox-next {
    width: 40px;
    height: 40px;
  }

  .lightbox-prev { left: 12px; }
  .lightbox-next { right: 12px; }
  .lightbox-close { top: 16px; right: 16px; }
}


/* ── SCROLL REVEAL (generic) ─────────────────────── */
.project:not(.revealed),
.about-grid:not(.revealed),
.about-stats:not(.revealed),
.stat:not(.revealed),
.contact-card:not(.revealed),
.section-label:not(.revealed),
.section-title:not(.revealed),
.gallery-item:not(.revealed) {
  will-change: transform, opacity;
}


/* ── SELECTION ────────────────────────────────────── */
::selection {
  background: var(--accent);
  color: var(--bg);
}

::-moz-selection {
  background: var(--accent);
  color: var(--bg);
}


/* ── SCROLLBAR ────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}
