/* ===== RESET & TOKENS ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #FAFAF9;
  --bg-card: #FFFFFF;
  --bg-accent: #F3F3F1;
  --text: #1A1A1A;
  --text-secondary: #6B6B6B;
  --text-muted: #9A9A9A;
  --border: #E5E5E3;
  --border-hover: #D0D0CE;
  --accent: #1A1A1A;
  --accent-soft: #F0F0EE;
  --success: #2D8A4E;
  --radius: 10px;
  --radius-sm: 6px;
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

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

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

/* ===== NAVBAR ===== */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(250, 250, 249, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}

#navbar.scrolled {
  border-bottom-color: var(--border);
  background: rgba(250, 250, 249, 0.95);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--text);
}

.logo-dot {
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 4px;
}

.nav-links a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--accent-soft);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav-toggle.active span:first-child {
  transform: rotate(45deg) translate(3px, 3px);
}

.nav-toggle.active span:last-child {
  transform: rotate(-45deg) translate(3px, -3px);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(250, 250, 249, 0.98);
  backdrop-filter: blur(20px);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s var(--ease);
}

.mobile-menu.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu a {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
  padding: 12px 24px;
  border-radius: var(--radius);
  transition: color 0.2s ease;
}

.mobile-menu a:hover {
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .mobile-menu { display: flex; }
  .nav-inner { padding: 0 20px; }
}

/* ===== HERO ===== */
#hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: 100px 40px 60px;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 80px;
  align-items: center;
  width: 100%;
}

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.hero-name {
  font-size: clamp(2.8rem, 5vw, 4.2rem);
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 1.05;
  color: var(--text);
  margin-bottom: 24px;
}

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

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 500px;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.btn-solid {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  text-decoration: none;
}

.btn-solid:hover {
  background: #333;
  transform: translateY(-1px);
}

.btn-solid:active {
  transform: translateY(0);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
  text-decoration: none;
}

.btn-ghost:hover {
  border-color: var(--text);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.meta-item i {
  font-size: 0.75rem;
}

.meta-item.available {
  color: var(--success);
  font-weight: 500;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  display: inline-block;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.hero-photo-wrap {
  position: relative;
  width: 320px;
}

.hero-photo {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 8px 40px rgba(0,0,0,0.06);
  position: relative;
  z-index: 2;
}

.photo-accent {
  position: absolute;
  top: 16px;
  left: 16px;
  right: -16px;
  bottom: -16px;
  background: var(--accent-soft);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  z-index: 1;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .hero-sub { max-width: 100%; }
  .hero-actions { justify-content: center; }
  .hero-meta { justify-content: center; }
  .hero-visual { order: -1; }
  .hero-photo-wrap { width: 240px; }
  #hero { padding: 100px 20px 40px; }
}

/* ===== SECTIONS ===== */
.section {
  padding: 100px 0;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 48px;
}

.label-num {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.label-text {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .section { padding: 60px 0; }
  .section-inner { padding: 0 20px; }
}

/* ===== ABOUT ===== */
.about-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.about-headline {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.2;
  color: var(--text);
}

.about-headline em {
  font-style: italic;
  font-weight: 400;
  color: var(--text-secondary);
}

.about-body {
  display: grid;
  gap: 16px;
  max-width: 720px;
}

.about-body p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.75;
}

.about-stats {
  display: flex;
  gap: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-value {
  font-family: var(--mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -1px;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (max-width: 600px) {
  .about-stats {
    flex-direction: column;
    gap: 20px;
  }
}

/* ===== PROJECTS — FEATURED ===== */
.project-featured {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.3s ease;
  margin-bottom: 32px;
}

.project-featured:hover {
  border-color: var(--border-hover);
  box-shadow: 0 4px 24px rgba(0,0,0,0.04);
}

.featured-image {
  position: relative;
  overflow: hidden;
}

.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 320px;
}

.featured-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--bg-card);
  color: var(--text-secondary);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.featured-info {
  padding: 36px 36px 36px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.featured-info h3 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.25;
}

.featured-info p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.featured-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.fs-val {
  display: block;
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}

.fs-lbl {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 2px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.featured-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.link-external {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: none;
  cursor: pointer;
  font-family: var(--font);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.link-external:hover {
  color: var(--text);
  border-color: var(--text);
}

@media (max-width: 800px) {
  .project-featured {
    grid-template-columns: 1fr;
  }
  .featured-info {
    padding: 24px;
  }
  .featured-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== PROJECT GRID ===== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

.project-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
  transform: translateY(-2px);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.card-tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-ext {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: color 0.2s ease, background 0.2s ease;
  font-size: 0.75rem;
}

.card-ext:hover {
  color: var(--text);
  background: var(--accent-soft);
}

.project-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
  line-height: 1.3;
}

.project-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 14px;
}

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

/* ===== SKILLS BENTO ===== */
.skills-bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.skill-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.skill-block:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.skill-large {
  grid-column: span 1;
}

.skill-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.skill-block h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.skill-block p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.interests-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  padding: 20px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.interest-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.interest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.interest-tags span {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

@media (max-width: 900px) {
  .skills-bento {
    grid-template-columns: repeat(2, 1fr);
  }
  .interests-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 500px) {
  .skills-bento {
    grid-template-columns: 1fr;
  }
}

/* ===== TIMELINE SPLIT ===== */
.timeline-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.timeline-heading {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 28px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.tl-item {
  display: flex;
  gap: 20px;
  position: relative;
}

.tl-marker {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  margin-top: 7px;
  flex-shrink: 0;
  position: relative;
}

.tl-item:not(:last-child) .tl-marker::after {
  content: '';
  position: absolute;
  top: 12px;
  left: 3px;
  width: 2px;
  height: calc(100% + 24px);
  background: var(--border);
}

.tl-date {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.tl-content h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 2px;
  letter-spacing: -0.3px;
}

.tl-company {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 1px;
}

.tl-content > p:last-child {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-top: 6px;
}

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

/* ===== CONTACT ===== */
.section-contact {
  border-top: 1px solid var(--border);
}

.contact-layout {
  max-width: 560px;
}

.contact-headline {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 16px;
}

.contact-sub {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 32px;
}

.c-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.c-link:hover {
  background: var(--accent-soft);
  color: var(--text);
}

.c-link i {
  width: 20px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.btn-cv {
  margin-top: 8px;
}

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 40px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-sep {
  color: var(--border);
}

@media (max-width: 768px) {
  .footer { padding: 20px; }
  .footer-inner { justify-content: center; }
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 26, 26, 0.6);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: none;
  overflow-y: auto;
  padding: 40px 16px;
}

.modal-overlay.active {
  display: block;
}

.modal-content {
  background: var(--bg-card);
  border-radius: var(--radius);
  max-width: 800px;
  margin: 0 auto;
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0,0,0,0.1);
  position: relative;
  transform: translateY(12px);
  opacity: 0;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
  opacity: 1;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.modal-close:hover {
  background: var(--border);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 28px 28px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.modal-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.modal-header p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.modal-body {
  padding: 24px 28px 28px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.75;
}

.modal-body h4 {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
  margin: 20px 0 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.modal-body h4:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.modal-body ul {
  padding-left: 18px;
  margin-bottom: 10px;
}

.modal-body li {
  margin-bottom: 5px;
}

.modal-body li strong {
  color: var(--text);
}

.modal-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 14px 0;
}

.modal-stat {
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  text-align: center;
}

.modal-stat-value {
  font-family: var(--mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}

.modal-stat-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.modal-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

.modal-tool {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--accent-soft);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.modal-tool i {
  color: var(--text-muted);
  font-size: 0.72rem;
}

.modal-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.gallery-item {
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.gallery-item:hover {
  border-color: var(--text-muted);
  transform: scale(1.02);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: #fff;
  font-size: 0.65rem;
  padding: 12px 6px 5px;
  text-align: center;
}

@media (max-width: 600px) {
  .modal-stats { grid-template-columns: repeat(2, 1fr); }
  .modal-header { flex-direction: column; text-align: center; }
  .modal-body { padding: 20px 18px; }
  .modal-header { padding: 20px 18px 16px; }
}

/* ===== LIGHTBOX ===== */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(8px);
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  cursor: zoom-out;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-overlay img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.lightbox-caption {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 14px;
}

.lightbox-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
}

.lightbox-overlay img {
  cursor: default;
}

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

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* stagger children */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.reveal-stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.06s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.12s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.18s; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.24s; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 0.3s; }
