/* ===========================
   Reset & Root Variables
   =========================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0a0f1a;
  --bg-secondary: #0d1520;
  --bg-card: rgba(255, 255, 255, 0.02);
  --text-primary: #e8e6e1;
  --text-secondary: #8a8880;
  --text-tertiary: #6b6860;
  --text-bright: #ffffff;
  --border-color: rgba(255, 255, 255, 0.06);
  --border-light: rgba(255, 255, 255, 0.04);
  --current-accent: #a855f7;
  --current-accent-rgb: 168, 85, 247;
  --wash-color-rgb: 168, 85, 247;
  --section-padding-x: 40px;
  --section-max-width: 1400px;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-cubic: cubic-bezier(0.33, 1, 0.68, 1);
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===========================
   Fixed Background Layer
   =========================== */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.grid-texture {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0;
  animation: gridFadeIn 1.5s ease forwards;
}

.color-wash {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 80% 60% at 70% 30%,
    rgba(var(--wash-color-rgb), 0.07) 0%,
    rgba(var(--wash-color-rgb), 0.03) 40%,
    transparent 70%
  );
  transition: all 0.8s ease;
}

/* ===========================
   Scroll Progress Bar
   =========================== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 200;
  background: rgba(255, 255, 255, 0.03);
}

.scroll-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--current-accent);
  transition: background-color 0.5s ease;
}

/* ===========================
   Sticky Side Navigation
   =========================== */
.project-nav {
  position: fixed;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-end;
}

.nav-dot {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  cursor: pointer;
  padding: 4px 0;
  flex-direction: row-reverse;
}

.nav-dot-pip {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--text-tertiary);
  background: transparent;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.nav-dot-label {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-tertiary);
  opacity: 0;
  transform: translateX(8px);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.nav-dot:hover .nav-dot-label {
  opacity: 0.7;
  transform: translateX(0);
}

.nav-dot.active .nav-dot-pip {
  border-color: var(--nav-color);
  background: var(--nav-color);
  box-shadow: 0 0 10px rgba(var(--nav-color-rgb), 0.5);
}

.nav-dot.active .nav-dot-label {
  opacity: 1;
  transform: translateX(0);
  color: var(--nav-color);
}

.nav-dot:focus-visible {
  outline: none;
}

.nav-dot:focus-visible .nav-dot-pip {
  outline: 2px solid var(--nav-color, var(--text-secondary));
  outline-offset: 3px;
}

/* ===========================
   Mobile Hamburger Menu
   =========================== */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 150;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(var(--current-accent-rgb), 0.3);
  background: rgba(10, 15, 26, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--current-accent);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(var(--current-accent-rgb), 0.15);
  transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
  border-color: rgba(var(--current-accent-rgb), 0.6);
  box-shadow:
    0 4px 32px rgba(0, 0, 0, 0.6),
    0 0 30px rgba(var(--current-accent-rgb), 0.25);
}

.mobile-menu-toggle .hamburger-icon,
.mobile-menu-toggle .close-icon {
  position: absolute;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.mobile-menu-toggle .close-icon {
  opacity: 0;
  transform: rotate(-90deg);
}

.mobile-menu-toggle.active .hamburger-icon {
  opacity: 0;
  transform: rotate(90deg);
}

.mobile-menu-toggle.active .close-icon {
  opacity: 1;
  transform: rotate(0);
}

.mobile-flyout {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 140;
  background: rgba(10, 15, 26, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 80px 24px 100px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-flyout.open {
  opacity: 1;
  visibility: visible;
}

.mobile-flyout-label {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-tertiary);
  margin-bottom: 24px;
  padding-left: 4px;
}

.mobile-flyout-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-flyout-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 16px;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.25s ease;
  border: 1px solid transparent;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease, border-color 0.2s ease;
}

.mobile-flyout.open .mobile-flyout-item {
  opacity: 1;
  transform: translateY(0);
}

.mobile-flyout-item:active {
  background: rgba(var(--flyout-accent-rgb), 0.12);
  border-color: rgba(var(--flyout-accent-rgb), 0.2);
}

.mobile-flyout-num {
  font-family: 'Orbitron', monospace;
  font-size: 16px;
  font-weight: 700;
  color: var(--flyout-accent);
  opacity: 0.5;
  flex-shrink: 0;
  width: 32px;
}

.mobile-flyout-name {
  font-family: 'Space Mono', monospace;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.mobile-flyout-item:active .mobile-flyout-name {
  color: var(--flyout-accent);
}

.mobile-flyout-arrow {
  margin-left: auto;
  color: var(--text-tertiary);
  opacity: 0.4;
  flex-shrink: 0;
}

.mobile-flyout-item--top {
  margin-bottom: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  border-radius: 12px 12px 0 0;
}

.mobile-flyout-item--top .mobile-flyout-num {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
}

/* ===========================
   Hero Section
   =========================== */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: 0 var(--section-padding-x);
}

.hero-content {
  max-width: var(--section-max-width);
  margin: 0 auto;
  width: 100%;
  opacity: 0;
  animation: fadeInUp 1s ease 0.3s forwards;
}

.hero-label {
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  color: var(--text-tertiary);
  margin-bottom: 20px;
  font-weight: 700;
  letter-spacing: 1px;
  text-decoration: none;
  display: inline-block;
  transition: color 0.2s ease;
}
.hero-label:hover {
  color: var(--text-primary);
}

.hero-title {
  font-family: 'Orbitron', 'Space Mono', monospace;
  font-size: clamp(52px, 9vw, 100px);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  text-transform: uppercase;
  background: linear-gradient(135deg, #fff 0%, #a8a49c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-line {
  display: block;
}

.hero-sub {
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 36px;
}

.hero-scroll-cue {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 1px;
  animation: bobDown 2s ease-in-out infinite;
}

@keyframes bobDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ===========================
   Project Directory
   =========================== */
.project-directory {
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease-out-expo),
              transform 0.7s var(--ease-out-expo);
}

.project-directory.revealed {
  opacity: 1;
  transform: translateY(0);
}

.directory-inner {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 28px 36px 24px;
}

.directory-label {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-tertiary);
  display: block;
  margin-bottom: 20px;
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.directory-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  opacity: 0;
  transform: translateY(8px);
}

.project-directory.revealed .directory-item {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s ease calc(var(--item-index, 0) * 0.035s),
              transform 0.4s ease calc(var(--item-index, 0) * 0.035s),
              background 0.2s ease,
              border-color 0.2s ease;
}

.directory-item:hover {
  background: rgba(var(--item-accent-rgb), 0.06);
  border-color: rgba(var(--item-accent-rgb), 0.15);
}

.directory-num {
  font-family: 'Orbitron', monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--item-accent);
  opacity: 0.35;
  flex-shrink: 0;
  width: 28px;
  transition: opacity 0.2s ease;
}

.directory-item:hover .directory-num {
  opacity: 0.8;
}

.directory-name {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
  transition: color 0.2s ease;
}

.directory-item:hover .directory-name {
  color: var(--item-accent);
}

.directory-arrow {
  margin-left: auto;
  color: var(--item-accent);
  opacity: 0;
  flex-shrink: 0;
  transition: all 0.2s ease;
  transform: translateY(-2px);
}

.directory-item:hover .directory-arrow {
  opacity: 0.6;
  transform: translateY(2px);
}

/* ===========================
   Project Section Layout
   =========================== */
.project-section {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 0;
}

.section-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(var(--accent-rgb), 0.06) 0%,
    transparent 70%
  );
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  top: 15%;
}

.project-section:nth-child(odd) .section-glow {
  right: -5%;
}

.project-section:nth-child(even) .section-glow {
  left: -5%;
}

.section-inner {
  position: relative;
  z-index: 1;
  max-width: var(--section-max-width);
  margin: 0 auto;
  padding: 0 var(--section-padding-x);
  width: 100%;
}

/* ===========================
   Section Header
   =========================== */
.section-header {
  position: relative;
  margin-bottom: 52px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out-expo),
              transform 0.7s var(--ease-out-expo);
}

.section-header.revealed {
  opacity: 1;
  transform: translateY(0);
}

.section-number {
  font-family: 'Orbitron', monospace;
  font-size: clamp(80px, 12vw, 140px);
  font-weight: 900;
  color: rgba(var(--accent-rgb), 0.06);
  line-height: 1;
  position: absolute;
  top: -30px;
  left: -8px;
  z-index: 0;
  user-select: none;
  pointer-events: none;
  transform: scale(0.92);
  transition: transform 1.2s var(--ease-out-expo);
}

.section-header.revealed .section-number {
  transform: scale(1);
}

.section-identity {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.section-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  border-radius: 10px;
  color: var(--accent);
  flex-shrink: 0;
}

.section-name {
  font-family: 'Space Mono', monospace;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.5px;
  margin: 0;
}

.section-status {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  padding: 4px 10px;
  border-radius: 4px;
  white-space: nowrap;
}

.section-description {
  position: relative;
  z-index: 1;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-top: 12px;
  max-width: 700px;
  font-weight: 300;
}

/* ===========================
   Two-Column Layout (Problem / Solution)
   =========================== */
.section-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

/* ===========================
   Narrative Blocks
   =========================== */
.narrative-block {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease-out-expo),
              transform 0.6s var(--ease-out-expo);
}

.narrative-block.revealed {
  opacity: 1;
  transform: translateY(0);
}

.narrative-problem.revealed { transition-delay: 0.1s; }
.narrative-solution.revealed { transition-delay: 0.2s; }

.narrative-label {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  display: inline-block;
  margin-bottom: 14px;
  padding-left: 22px;
  position: relative;
}

.narrative-label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 2px;
  background: var(--accent);
}

.narrative-title {
  font-family: 'Space Mono', monospace;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1.3;
  margin: 0 0 18px 0;
  letter-spacing: -0.3px;
}

.narrative-text {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.75;
  color: #c4c0b8;
  font-weight: 300;
}

.narrative-highlight {
  border-left: 3px solid var(--accent);
  padding-left: 20px;
  margin: 24px 0 0 0;
}

.narrative-highlight p {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  line-height: 1.65;
  color: var(--accent);
  font-weight: 500;
  font-style: normal;
  margin: 0;
}

/* ===========================
   Screenshot Carousel
   =========================== */
.screenshot-carousel {
  position: relative;
  margin-top: 56px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-out-expo),
              transform 0.6s var(--ease-out-expo);
}

.screenshot-carousel.revealed {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.3s;
}

.carousel-viewport {
  overflow: hidden;
  border-radius: 12px;
}

.carousel-track {
  display: flex;
  gap: 16px;
  transition: transform 0.45s var(--ease-out-expo);
}

.carousel-slide {
  flex: 0 0 calc((100% - 32px) / 3);
  min-width: 0;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), 0.12);
  background: rgba(0, 0, 0, 0.3);
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.carousel-slide:hover {
  border-color: rgba(var(--accent-rgb), 0.35);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.carousel-slide img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.carousel-slide:hover img {
  transform: scale(1.03);
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  background: rgba(10, 15, 26, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  z-index: 2;
  padding: 0;
}

.carousel-prev { left: -22px; }
.carousel-next { right: -22px; }

.carousel-arrow:hover:not(:disabled) {
  background: rgba(var(--accent-rgb), 0.15);
  border-color: rgba(var(--accent-rgb), 0.5);
  box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.2);
}

.carousel-arrow:disabled {
  opacity: 0.25;
  cursor: default;
}

/* ===========================
   CTA Button
   =========================== */
.section-cta-wrap {
  display: flex;
  justify-content: center;
  margin-top: 52px;
}

.section-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  border-radius: 8px;
  color: var(--accent);
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
}

.section-cta.revealed {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.35s;
}

.section-cta:hover {
  background: rgba(var(--accent-rgb), 0.15);
  border-color: rgba(var(--accent-rgb), 0.5);
  box-shadow: 0 4px 24px rgba(var(--accent-rgb), 0.2);
  transform: translateY(-2px);
}

.section-cta:active {
  transform: translateY(0);
}

.section-cta svg {
  transition: transform 0.3s ease;
}

.section-cta:hover svg {
  transform: translateX(4px);
}

.section-cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ===========================
   Lightbox Modal
   =========================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(5, 8, 14, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 80px;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  transition: opacity 0.2s ease;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  padding: 0;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  padding: 0;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 2px;
}

/* ===========================
   Footer
   =========================== */
.site-footer {
  position: relative;
  z-index: 1;
  max-width: var(--section-max-width);
  margin: 0 auto;
  padding: 0 var(--section-padding-x) 60px;
}

.footer-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--border-color) 10%,
    var(--border-color) 90%,
    transparent 100%
  );
  margin-bottom: 24px;
}

.site-footer p {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--text-tertiary);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-align: center;
}

.site-footer a {
  color: var(--text-secondary);
  text-decoration: underline;
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: var(--text-primary);
}

/* ===========================
   Animations
   =========================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gridFadeIn {
  to { opacity: 1; }
}

/* ===========================
   Responsive: Large Tablet (1024px)
   =========================== */
@media (max-width: 1024px) {
  :root {
    --section-padding-x: 32px;
  }

  .section-columns {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .project-nav {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .mobile-flyout {
    display: block;
  }

  .directory-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .carousel-slide {
    flex: 0 0 calc((100% - 16px) / 2);
  }

  .carousel-prev { left: 8px; }
  .carousel-next { right: 8px; }
}

/* ===========================
   Responsive: Tablet (768px)
   =========================== */
@media (max-width: 768px) {
  :root {
    --section-padding-x: 24px;
  }

  .hero {
    min-height: 80vh;
    min-height: 80dvh;
  }

  .project-section {
    min-height: auto;
    padding: 60px 0;
  }

  .section-number {
    font-size: 64px;
  }

  .section-name {
    font-size: 28px;
  }

  .section-identity {
    gap: 12px;
  }

  .narrative-title {
    font-size: 20px;
  }

  .narrative-text {
    font-size: 14px;
  }

  .section-columns {
    gap: 36px;
  }

  .screenshot-carousel {
    margin-top: 40px;
  }

  .section-cta-wrap {
    margin-top: 40px;
  }

  .hero-count-num {
    font-size: 40px;
  }

  .directory-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .directory-inner {
    padding: 24px 20px 20px;
  }
}

/* ===========================
   Responsive: Mobile (640px)
   =========================== */
@media (max-width: 640px) {
  .carousel-slide {
    flex: 0 0 100%;
  }

  .carousel-prev { left: 8px; }
  .carousel-next { right: 8px; }

  .carousel-arrow {
    width: 38px;
    height: 38px;
  }
}

/* ===========================
   Responsive: Small Mobile (480px)
   =========================== */
@media (max-width: 480px) {
  :root {
    --section-padding-x: 20px;
  }

  .hero-title {
    font-size: 44px;
  }

  .hero-count-num {
    font-size: 36px;
  }

  .section-number {
    font-size: 52px;
    top: -20px;
  }

  .section-identity {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .section-header {
    margin-bottom: 36px;
  }

  .section-icon {
    width: 40px;
    height: 40px;
  }

  .section-icon svg {
    width: 24px;
    height: 24px;
  }

  .narrative-text {
    font-size: 14px;
  }

  .section-cta {
    width: 100%;
    justify-content: center;
    padding: 16px 24px;
  }

  .directory-grid {
    grid-template-columns: 1fr;
  }

  .directory-inner {
    padding: 20px 16px 16px;
    border-radius: 12px;
  }

  .mobile-menu-toggle {
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
  }

  .lightbox-prev { left: 12px; }
  .lightbox-next { right: 12px; }
  .lightbox-close { top: 12px; right: 12px; }

  .lightbox-content {
    padding: 48px 16px;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 44px;
    height: 44px;
  }
}

/* ===========================
   Accessibility
   =========================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .section-header,
  .narrative-block,
  .screenshot-carousel,
  .section-cta,
  .project-directory,
  .directory-item {
    opacity: 1 !important;
    transform: none !important;
  }

  .section-number {
    transform: scale(1) !important;
  }

  .hero-scroll-cue {
    animation: none;
  }

  .hero-content {
    opacity: 1 !important;
    transform: none !important;
  }

  .color-wash {
    transition: none;
  }

  .mobile-flyout-item {
    opacity: 1 !important;
    transform: none !important;
  }
}

:focus-visible {
  outline: 2px solid var(--current-accent, var(--text-secondary));
  outline-offset: 3px;
}
