/* ==========================================================================
   Project Timeless Design System (project-timeless.css)
   Warm Timeless Editorial Aesthetics for Portfolio Project Child Pages
   Designed for Chen Nan (Lilllta) Portfolio
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Warm editorial palette */
  --bg-page: #fcfcfb;
  --bg-surface: #ffffff;
  --bg-subtle: #f5f5f3;
  --bg-pill: rgba(0, 0, 0, 0.04);
  --bg-pill-hover: rgba(0, 0, 0, 0.08);

  --text-primary: #101010;
  --text-secondary: rgba(16, 16, 16, 0.68);
  --text-tertiary: rgba(16, 16, 16, 0.44);

  --border-subtle: rgba(0, 0, 0, 0.07);
  --border-medium: rgba(0, 0, 0, 0.12);

  --font-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Segoe UI", Roboto, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, Menlo, Monaco, monospace;

  /* Timeless 800-byte linear spring curve */
  --spring-bouyant: linear(0, .0051, .0195, .0419, .071, .1058, .1451, .188, .2336, .2811, .3299, .3792, .4285, .4773, .5252, .5718, .6168, .66, .7012, .7402, .7768, .8111, .843, .8724, .8994, .924, .9463, .9663, .9841, .9999, 1.0136, 1.0255, 1.0357, 1.0442, 1.0512, 1.0568, 1.0612, 1.0643, 1.0665, 1.0677, 1.0681, 1.0677, 1.0667, 1.0652, 1.0632, 1.0609, 1.0582, 1.0553, 1.0522, 1.0489, 1.0456, 1.0423, 1.0389, 1.0356, 1.0323, 1.0291, 1.0261, 1.0231, 1.0203, 1.0177, 1.0152, 1.0129, 1.0107, 1.0087, 1.0068, 1.0052, 1.0037, 1.0023, 1.0011, 1, .9991, .9983, .9976, .997, .9965, .9961, .9958, .9956, .9955, .9954, .9954, .9954, .9955, .9956, .9957, .9959, .996, .9962, .9964, .9967, .9969, .9971, .9974, .9976, .9978, .998, .9982, .9984, .9986, .9988, 1);
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-pill: 9999px;

  --max-width: 1180px;
}

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

html {
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-page);
  color: var(--text-primary);
  overflow-x: hidden;
  min-height: 100vh;
  line-height: 1.6;
}

::selection {
  background: #101010;
  color: #ffffff;
}

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

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

/* ---------------- Floating Minimal Back Button (Smart Auto-Hide) ---------------- */
.floating-back-wrap {
  position: fixed;
  top: 24px;
  left: 32px;
  z-index: 100;
  transition: transform 0.45s var(--spring-bouyant), opacity 0.3s var(--ease-smooth);
  will-change: transform, opacity;
}

.floating-back-wrap.is-hidden {
  transform: translateY(-30px);
  opacity: 0;
  pointer-events: none;
}

.floating-back-btn,
.footer-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: rgba(252, 252, 251, 0.94);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  font-size: 13px;
  font-weight: 550;
  color: var(--text-primary);
  text-decoration: none;
  transition: transform 0.45s var(--spring-bouyant), box-shadow 0.3s var(--ease-smooth), background-color 0.2s, border-color 0.2s;
  will-change: transform;
}

.floating-back-btn:hover,
.footer-back-btn:hover {
  transform: scale(1.04) translateX(-2px);
  background: #ffffff;
  border-color: var(--border-medium);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.floating-back-btn:active,
.footer-back-btn:active {
  transform: scale(0.96);
}

.floating-back-btn svg,
.footer-back-btn svg {
  transition: transform 0.25s var(--ease-smooth);
}

.floating-back-btn:hover svg,
.footer-back-btn:hover svg {
  transform: translateX(-2px);
}

@media (max-width: 768px) {
  .floating-back-wrap {
    top: 18px;
    left: 20px;
  }
  .floating-back-btn,
  .footer-back-btn {
    padding: 7px 15px;
    font-size: 12.5px;
  }
}

/* ---------------- Layout Container ---------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------------- Hero Section ---------------- */
.hero-section {
  padding-top: 130px;
  padding-bottom: 60px;
}

.hero-content-wrap {
  max-width: 920px;
  margin: 0 auto 48px;
  text-align: center;
}

.hero-meta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  background: var(--bg-pill);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.pill-badge-accent {
  background: #101010;
  color: #ffffff;
  border-color: #101010;
}

.hero-meta-text {
  font-size: 12.5px;
  color: var(--text-tertiary);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(40px, 5.8vw, 64px);
  line-height: 1.08;
  font-weight: 400;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.hero-subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(20px, 3vw, 30px);
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 24px;
}

.hero-lead {
  font-size: 16.5px;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 800px;
  margin: 0 auto 36px;
}

.hero-labels-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.hero-label-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: 12.5px;
  color: var(--text-secondary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
}

.hero-label-pill::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-primary);
}

/* Hero Metrics Strip (Golden Ratio Data Row) */
.hero-metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px 32px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
  margin-top: 10px;
}

.hero-metrics-strip.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.metric-card {
  text-align: center;
  padding: 8px 12px;
  border-right: 1px solid var(--border-subtle);
}

.metric-card:last-child {
  border-right: none;
}

.metric-val {
  font-family: var(--font-serif);
  font-size: clamp(32px, 3.8vw, 44px);
  line-height: 1.05;
  color: var(--text-primary);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.metric-val-unit {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  margin-left: 2px;
  color: var(--text-secondary);
}

.metric-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 4px;
}

.metric-desc {
  font-size: 11.5px;
  color: var(--text-tertiary);
  margin-top: 3px;
}

@media (max-width: 860px) {
  .hero-metrics-strip {
    grid-template-columns: repeat(2, 1fr);
    padding: 20px;
  }
  .metric-card:nth-child(2) {
    border-right: none;
  }
  .metric-card:nth-child(3) {
    border-top: 1px solid var(--border-subtle);
    padding-top: 16px;
  }
  .metric-card:nth-child(4) {
    border-top: 1px solid var(--border-subtle);
    padding-top: 16px;
  }
}

@media (max-width: 520px) {
  .hero-metrics-strip {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .metric-card {
    border-right: none !important;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 12px;
  }
  .metric-card:last-child {
    border-bottom: none;
  }
}

/* ---------------- Section Standard Block ---------------- */
.section-wrap {
  padding: 80px 0;
  border-top: 1px solid var(--border-subtle);
}

.section-header {
  margin-bottom: 40px;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}

.section-tag::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-primary);
}

.section-heading {
  font-family: var(--font-serif);
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.15;
  color: var(--text-primary);
  font-weight: 400;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
}

.section-desc {
  font-size: 15.5px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 720px;
}

/* ---------------- Pain Points / Challenge Cards ---------------- */
.pain-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.pain-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.pain-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px 22px;
  transition: transform 0.4s var(--spring-bouyant), box-shadow 0.3s var(--ease-smooth), border-color 0.2s;
}

.pain-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-medium);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.04);
}

.pain-num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 20px;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}

.pain-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.pain-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.65;
}

@media (max-width: 860px) {
  .pain-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .pain-grid, .pain-grid.cols-2 {
    grid-template-columns: 1fr;
  }
}

/* ---------------- Process Pipeline (Step Cards) ---------------- */
.pipeline-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.pipeline-grid.cols-5 {
  grid-template-columns: repeat(5, 1fr);
}

.pipeline-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.step-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.45s var(--spring-bouyant), box-shadow 0.45s var(--ease-smooth), border-color 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.step-card:hover {
  transform: translateY(-4px) scale(1.015);
  box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.06);
  border-color: var(--border-medium);
}

.step-header {
  margin-bottom: 14px;
}

.step-number {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.step-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.step-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 16px;
}

.step-meta {
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 1024px) {
  .pipeline-grid.cols-5 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .pipeline-grid, .pipeline-grid.cols-5, .pipeline-grid.cols-3 {
    grid-template-columns: 1fr;
  }
}

/* ---------------- Gallery & Media Showcase ---------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.gallery-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.gallery-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* ---------------- Theme Sets & Multi-Page Showcase ---------------- */
.theme-showcase-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 30px;
  margin-bottom: 36px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.theme-showcase-card:hover {
  border-color: var(--border-medium);
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.05);
}

.theme-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.theme-header-left {
  flex: 1;
  min-width: 260px;
}

.theme-meta-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.theme-title {
  font-size: 19px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.theme-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.theme-pages-grid {
  display: grid;
  gap: 14px;
}

.theme-pages-grid.cols-6 {
  grid-template-columns: repeat(6, 1fr);
}

.theme-pages-grid.cols-5 {
  grid-template-columns: repeat(5, 1fr);
}

.theme-pages-grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.theme-pages-grid .gallery-tile {
  border-radius: var(--radius-md);
}

.gallery-page-label {
  padding: 8px 6px 10px;
  text-align: center;
  background: var(--bg-surface);
}

.gallery-page-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-pill);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}

.gallery-page-desc {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 4px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 4px;
}

@media (max-width: 1024px) {
  .theme-pages-grid.cols-6,
  .theme-pages-grid.cols-5,
  .theme-pages-grid.cols-4 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .theme-showcase-card {
    padding: 18px;
    margin-bottom: 24px;
  }
  .theme-pages-grid.cols-6,
  .theme-pages-grid.cols-5,
  .theme-pages-grid.cols-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

.gallery-tile {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  transition: transform 0.5s var(--spring-bouyant), box-shadow 0.4s var(--ease-smooth), border-color 0.2s;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.gallery-tile:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--border-medium);
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.1);
}

.gallery-screen {
  position: relative;
  width: 100%;
  background: #f0f0ed;
  overflow: hidden;
}

.gallery-screen.aspect-vertical {
  aspect-ratio: 1280 / 1706;
}

.gallery-screen.aspect-video {
  aspect-ratio: 16 / 9;
}

.gallery-screen.aspect-ui {
  aspect-ratio: 16 / 10;
}

.gallery-screen img,
.gallery-screen video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-smooth);
}

.gallery-tile:hover .gallery-screen img,
.gallery-tile:hover .gallery-screen video {
  transform: scale(1.03);
}

.gallery-expand-hint {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.25s var(--ease-smooth);
  pointer-events: none;
}

.gallery-tile:hover .gallery-expand-hint {
  opacity: 1;
  transform: translateY(0);
}

.gallery-info {
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg-surface);
  flex: 1;
}

.gallery-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.gallery-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
}

.gallery-tag {
  font-size: 11px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  white-space: nowrap;
}

.gallery-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}

@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .gallery-grid, .gallery-grid.cols-2, .gallery-grid.cols-3 {
    grid-template-columns: 1fr;
  }
}

/* ---------------- Interactive Demo / Video Box ---------------- */
.demo-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.04);
  margin-top: 24px;
}

.demo-screen {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
  position: relative;
}

.demo-screen video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.demo-caption {
  padding: 18px 24px;
  font-size: 13.5px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------------- Tools Matrix ---------------- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.tools-grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.tool-tile {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 22px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  transition: transform 0.45s var(--spring-bouyant), box-shadow 0.45s var(--ease-smooth), border-color 0.2s;
}

.tool-tile:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 16px 24px -8px rgba(0, 0, 0, 0.08);
  border-color: var(--border-medium);
}

.tool-tile img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 12px;
  background: var(--bg-subtle);
  padding: 6px;
}

.tool-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.tool-role {
  font-size: 11.5px;
  color: var(--text-tertiary);
  line-height: 1.45;
}

@media (max-width: 860px) {
  .tools-grid, .tools-grid.cols-4 {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 520px) {
  .tools-grid, .tools-grid.cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------------- Philosophy Quote Block ---------------- */
.quote-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  text-align: center;
  margin: 60px 0 80px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.quote-text {
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.6;
  color: var(--text-primary);
  max-width: 820px;
  margin: 0 auto 20px;
  font-weight: 400;
}

/* ---------------- Project Navigation Footer ---------------- */
.project-nav-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 48px 0 60px;
  margin-top: 60px;
}

.project-nav-row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 48px;
}

.next-project-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 560px;
  gap: 20px;
  padding: 20px 28px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  text-decoration: none;
  text-align: left;
  transition: transform 0.45s var(--spring-bouyant), border-color 0.2s, box-shadow 0.3s;
}

.next-project-link:hover {
  transform: translateY(-3px) scale(1.015);
  border-color: var(--border-medium);
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.08);
}

.next-project-label {
  font-size: 11.5px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 550;
  margin-bottom: 4px;
}

.next-project-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.next-project-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  font-size: 18px;
  color: var(--text-primary);
  transition: transform 0.3s var(--ease-smooth), background-color 0.2s, color 0.2s;
  flex-shrink: 0;
}

.next-project-link:hover .next-project-arrow {
  transform: translate(3px, -3px);
  background: var(--text-primary);
  color: #ffffff;
}

.site-footer,
.project-nav-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 36px 0 48px;
  margin-top: 60px;
}

.site-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-tertiary);
}

.site-footer-right {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.site-footer-bottom a,
.site-footer-bottom button {
  color: inherit;
  font: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-decoration: none;
  background: none;
  border: none;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  transition: color 0.2s ease;
}

.site-footer-bottom a:hover,
.site-footer-bottom button:hover {
  color: var(--text-primary);
}

@media (max-width: 640px) {
  .site-footer-bottom {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  .site-footer-right { gap: 10px; }
}

/* ---------------- Universal Lightbox Modal ---------------- */
.timeless-lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(16, 16, 16, 0.88);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease-smooth);
}

.timeless-lightbox-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-modal {
  position: relative;
  width: 100%;
  max-width: 880px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
  transform: scale(0.95);
  transition: transform 0.4s var(--spring-bouyant);
}

.timeless-lightbox-overlay.is-active .lightbox-modal {
  transform: scale(1);
}

.lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lightbox-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lightbox-title {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
}

.lightbox-counter {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  font-family: var(--font-mono);
}

.lightbox-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #ffffff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, transform 0.2s;
}

.lightbox-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.08);
}

.lightbox-body {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: #0d0d0d;
  flex: 1;
  min-height: 320px;
}

.lightbox-body img,
.lightbox-body video {
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.2s, transform 0.25s var(--spring-bouyant);
  z-index: 10;
}

.lightbox-nav-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-footer {
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}
