/* ==========================================================================
   Portfolio Master Stylesheet — Apple-Crafted 36-Page Experience
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background-color: var(--bg-paper);
  color: var(--ink-primary);
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-paper);
  color: var(--ink-primary);
  overflow-x: hidden;
  max-width: 100%;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Top Apple-Style Glassmorphic Navigation Bar
   -------------------------------------------------------------------------- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 58px;
  padding: 0 clamp(16px, 3vw, 44px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(243, 240, 234, 0.78);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border-bottom: 1px solid rgba(37, 35, 33, 0.08);
  transition: background-color 0.45s var(--ease-apple), border-color 0.45s var(--ease-apple), color 0.45s var(--ease-apple);
}

body.is-dark-section .site-nav {
  background: rgba(17, 18, 21, 0.78);
  border-bottom-color: rgba(255, 255, 255, 0.10);
  color: #F3F0EA;
}

.nav-brand {
  font-size: 12px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  font-weight: 400;
  transition: opacity 0.25s var(--ease-apple);
}

.nav-brand:hover { opacity: 0.65; }

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px;
  border-radius: 999px;
  background: rgba(37, 35, 33, 0.05);
}

body.is-dark-section .nav-tabs {
  background: rgba(255, 255, 255, 0.08);
}

.nav-tabs::-webkit-scrollbar { display: none; }

.nav-tab {
  border: none;
  background: transparent;
  color: inherit;
  opacity: 0.65;
  font-family: var(--font-sans);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.28s var(--ease-apple), color 0.28s var(--ease-apple), opacity 0.28s var(--ease-apple);
}

.nav-tab:hover { opacity: 1; }

.nav-tab.is-active {
  background: var(--ink-primary);
  color: var(--bg-paper);
  opacity: 1;
}

body.is-dark-section .nav-tab.is-active {
  background: #F3F0EA;
  color: #111215;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.nav-page-pill {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.72;
  font-variant-numeric: tabular-nums;
}

.nav-grid-btn {
  border: 1px solid rgba(37, 35, 33, 0.14);
  background: rgba(255, 255, 255, 0.55);
  color: inherit;
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.25s var(--ease-apple), background-color 0.25s var(--ease-apple);
}

body.is-dark-section .nav-grid-btn {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.10);
}

.nav-grid-btn:hover { transform: scale(1.04); }

/* --------------------------------------------------------------------------
   Portfolio Page Section Shell (All 36 Pages)
   -------------------------------------------------------------------------- */
.portfolio-page {
  position: relative;
  width: 100%;
  padding: clamp(76px, 6vw, 96px) clamp(20px, 4vw, 68px) clamp(48px, 4.5vw, 72px);
  display: flex;
  flex-direction: column;
  background-color: var(--page-bg, var(--bg-paper));
  color: var(--page-ink, var(--ink-primary));
  border-bottom: 1px solid rgba(37, 35, 33, 0.06);
  overflow: hidden;
}

#page-01 {
  min-height: 100svh;
  justify-content: center;
  padding-bottom: 76px;
}

#page-36 {
  padding-bottom: 88px;
}

.portfolio-page.theme-dark {
  --page-bg: #111215;
  --page-ink: #F3F0EA;
  --page-muted: rgba(243, 240, 234, 0.65);
  --page-accent: #D6B06A;
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.portfolio-page.theme-espresso {
  --page-bg: #1D1611;
  --page-ink: #F3F0EA;
  --page-muted: rgba(243, 240, 234, 0.68);
  --page-accent: #D6B06A;
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.portfolio-page.theme-stone {
  --page-bg: #E8E2D7;
  --page-ink: #252321;
  --page-muted: rgba(37, 35, 33, 0.65);
  --page-accent: #792F33;
}

.portfolio-page.theme-ivory {
  --page-bg: #FBF8F0;
  --page-ink: #252321;
  --page-muted: rgba(37, 35, 33, 0.65);
  --page-accent: #792F33;
}

.page-inner {
  width: 100%;
  max-width: 1560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2vw, 28px);
}

/* Page Top Eyebrow */
.page-eyebrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: clamp(11px, 0.9vw, 13px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--page-muted, var(--ink-muted));
}

.page-eyebrow-accent {
  color: var(--page-accent, var(--accent-burgundy));
  font-weight: 700;
}

/* Editorial Typography */
.display-serif {
  font-family: var(--font-display-serif);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.display-italic {
  font-style: italic;
  color: var(--page-accent, var(--accent-burgundy));
}

.lead-copy {
  font-size: clamp(14px, 1.1vw, 17px);
  line-height: 1.65;
  color: var(--page-muted, var(--ink-muted));
  max-width: 64ch;
}

/* --------------------------------------------------------------------------
   Page 01 — Cover
   -------------------------------------------------------------------------- */
.cover-title {
  font-family: var(--font-sans);
  font-size: clamp(58px, 11.5vw, 200px);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: -0.03em;
  overflow: hidden;
}

.cover-title .word-folio {
  font-style: italic;
  color: var(--accent-burgundy);
}

.artwork-stage {
  perspective: 1400px;
  width: 100%;
}

.artwork-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1776 / 626;
  min-height: 200px;
  max-height: 44vh;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: var(--shadow-artwork);
  background: #E7DFD1;
  transform-style: preserve-3d;
  cursor: zoom-in;
}

.artwork-frame img {
  position: absolute;
  inset: -4%;
  width: 108%;
  height: 108%;
  object-fit: cover;
  object-position: 52% 45%;
  pointer-events: none;
  transition: transform 0.22s ease-out;
}

.artwork-sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle 500px at var(--mx, 60%) var(--my, 45%), rgba(255, 248, 232, 0.22), transparent 68%);
  opacity: 0;
  transition: opacity 0.4s var(--ease-apple);
  mix-blend-mode: soft-light;
}

.artwork-frame:hover .artwork-sheen { opacity: 1; }

.cover-footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
}

.hairline-rule {
  width: 100%;
  height: 1.3px;
  background: currentColor;
  opacity: 0.85;
  transform-origin: left center;
}

.accent-link {
  color: var(--page-accent, var(--accent-burgundy));
  font-style: italic;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease-apple), opacity 0.3s var(--ease-apple);
}

.accent-link:hover {
  border-bottom-color: currentColor;
}

/* --------------------------------------------------------------------------
   Page 02 — Profile (Editorial Collage Matching PDF Craft)
   -------------------------------------------------------------------------- */
.profile-editorial {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.15fr 0.95fr;
  gap: clamp(18px, 2.5vw, 36px);
  align-items: end;
}

.profile-col-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-self: stretch;
  justify-content: space-between;
}

.profile-tagline-block {
  font-family: var(--font-display-serif);
  font-style: italic;
  font-size: clamp(16px, 1.35vw, 22px);
  line-height: 1.35;
  padding-bottom: 12px;
  border-bottom: 1.5px solid var(--accent-burgundy);
  display: inline-block;
  width: fit-content;
}

.hand-note {
  font-family: 'PortfolioHand', cursive;
  font-size: clamp(18px, 1.5vw, 24px);
  color: var(--accent-burgundy);
  transform: rotate(-4deg);
  display: inline-block;
  margin-bottom: 4px;
}

.taped-card {
  position: relative;
  background: #FFFFFF;
  padding: 12px 12px 10px;
  box-shadow: 0 10px 28px rgba(37, 35, 33, 0.10), 0 2px 6px rgba(37, 35, 33, 0.05);
  border: 1px solid rgba(37, 35, 33, 0.06);
  transition: transform 0.45s var(--ease-apple), box-shadow 0.45s var(--ease-apple);
}

.taped-card::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 64px;
  height: 20px;
  background: rgba(216, 203, 180, 0.72);
  border: 1px solid rgba(37, 35, 33, 0.08);
  backdrop-filter: blur(2px);
}

.taped-card.tilt-left { transform: rotate(-2deg); }
.taped-card.tilt-right { transform: rotate(2deg); }

.taped-card:hover {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: 0 18px 40px rgba(37, 35, 33, 0.14);
}

.taped-card-imgs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: center;
}

.taped-card-imgs img {
  width: 100%;
  height: auto;
  max-height: 135px;
  object-fit: contain;
  cursor: zoom-in;
}

.taped-card-label {
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 8px;
}

.profile-center-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.profile-name-banner {
  font-family: var(--font-display-serif);
  font-size: clamp(44px, 5.2vw, 84px);
  line-height: 0.95;
  text-align: center;
  margin-bottom: -18px;
  z-index: 2;
  white-space: nowrap;
}

.profile-name-banner .first {
  font-style: italic;
  color: var(--ink-primary);
}

.profile-name-banner .last {
  font-weight: 700;
  color: var(--accent-burgundy);
}

.profile-portrait-cutout {
  position: relative;
  width: 100%;
  max-width: 440px;
  aspect-ratio: 973 / 1098;
  z-index: 1;
  cursor: zoom-in;
  filter: drop-shadow(0 18px 34px rgba(37, 35, 33, 0.14));
}

.profile-portrait-cutout img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  -webkit-mask-image: url('../assets/images/extracted/img-104-mask.jpg');
  mask-image: url('../assets/images/extracted/img-104-mask.jpg');
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-mode: luminance;
  mask-mode: luminance;
  transition: transform 0.6s var(--ease-apple);
}

.profile-portrait-cutout:hover img {
  transform: scale(1.02);
}

.profile-col-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-self: stretch;
  justify-content: center;
}

.edu-block {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.edu-heading {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border-bottom: 1px solid rgba(37, 35, 33, 0.12);
  padding-bottom: 6px;
}

.edu-period {
  font-family: var(--font-display-serif);
  font-style: italic;
  font-size: clamp(19px, 1.6vw, 25px);
  color: var(--ink-primary);
}

.gpa-inline {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 4px 0;
}

.gpa-inline .num {
  font-family: var(--font-display-serif);
  font-size: clamp(40px, 3.8vw, 58px);
  color: var(--accent-burgundy);
  line-height: 0.95;
}

@media (max-width: 960px) {
  .profile-editorial {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .profile-name-banner {
    white-space: normal;
    margin-bottom: 6px;
  }

  .profile-portrait-cutout {
    max-width: 340px;
  }
}

/* --------------------------------------------------------------------------
   Page 03 — Creative Journey (Interactive Tabs + Timeline)
   -------------------------------------------------------------------------- */
.journey-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(37, 35, 33, 0.06);
  align-self: flex-start;
}

.journey-tab-btn {
  border: none;
  background: transparent;
  padding: 8px 18px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  color: var(--ink-muted);
  transition: all 0.3s var(--ease-apple);
}

.journey-tab-btn.is-active {
  background: var(--ink-primary);
  color: var(--bg-paper);
}

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

.timeline-card {
  padding: 24px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(37, 35, 33, 0.08);
  transition: transform 0.4s var(--ease-apple), box-shadow 0.4s var(--ease-apple);
}

.timeline-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(37, 35, 33, 0.09);
}

.timeline-year {
  font-family: var(--font-display-serif);
  font-size: 28px;
  color: var(--accent-burgundy);
  margin-bottom: 6px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.skill-chip {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(37, 35, 33, 0.06);
  border: 1px solid rgba(37, 35, 33, 0.08);
}

/* --------------------------------------------------------------------------
   Page 04 — Selected Works (6 Interactive Project Cards)
   -------------------------------------------------------------------------- */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 1.8vw, 24px);
}

.work-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(37, 35, 33, 0.09);
  cursor: pointer;
  text-align: left;
  transition: transform 0.45s var(--ease-apple), box-shadow 0.45s var(--ease-apple);
}

.work-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -12px rgba(37, 35, 33, 0.16);
}

.work-card-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #E6E0D4;
}

.work-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.65s var(--ease-apple);
}

.work-card:hover .work-card-img img { transform: scale(1.06); }

.work-card-body {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.work-num {
  font-family: var(--font-display-serif);
  font-size: 24px;
  color: var(--accent-burgundy);
}

/* --------------------------------------------------------------------------
   Project Opening & Editorial Board Pages (P05–P20, P32–P35)
   -------------------------------------------------------------------------- */
.opening-split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(24px, 4vw, 60px);
  align-items: center;
}

.opening-title {
  font-family: var(--font-display-serif);
  font-size: clamp(44px, 6.4vw, 98px);
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.board-showcase {
  position: relative;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-artwork);
  background: transparent;
  cursor: zoom-in;
}

.board-showcase img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  transition: transform 0.65s var(--ease-apple);
}

.board-showcase:hover img { transform: scale(1.015); }

.board-zoom-hint {
  position: absolute;
  right: 16px;
  bottom: 14px;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(243, 240, 234, 0.84);
  color: #252321;
  backdrop-filter: blur(12px);
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.35s var(--ease-apple);
}

.theme-dark .board-zoom-hint,
.theme-espresso .board-zoom-hint {
  background: rgba(17, 18, 21, 0.78);
  color: #F3F0EA;
}

.board-showcase:hover .board-zoom-hint {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Monolith & Echo Interactive Layouts (P21–P31)
   -------------------------------------------------------------------------- */
.swatch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.swatch-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(37, 35, 33, 0.10);
  cursor: pointer;
  font-size: 12px;
  transition: transform 0.25s var(--ease-apple), box-shadow 0.25s var(--ease-apple);
}

.swatch-pill:hover, .swatch-pill.is-active {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 35, 33, 0.10);
  border-color: var(--accent-burgundy);
}

.swatch-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.multi-gallery {
  column-count: 3;
  column-gap: clamp(12px, 1.5vw, 20px);
}

.multi-gallery .gallery-tile {
  break-inside: avoid;
  margin-bottom: clamp(12px, 1.5vw, 20px);
}

.multi-gallery.cols-2 {
  column-count: initial;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(12px, 1.5vw, 20px);
  align-items: start;
}

.multi-gallery.cols-echo-vert {
  column-count: initial;
  display: grid;
  grid-template-columns: 1.75fr 0.75fr;
  gap: clamp(12px, 1.5vw, 20px);
  align-items: start;
}

.multi-gallery.cols-2 .gallery-tile,
.multi-gallery.cols-echo-vert .gallery-tile {
  margin-bottom: 0;
}

.gallery-tile {
  border-radius: 10px;
  overflow: hidden;
  background: transparent;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.10);
  cursor: zoom-in;
  transition: transform 0.45s var(--ease-apple), box-shadow 0.45s var(--ease-apple);
}

.theme-dark .gallery-tile,
.theme-espresso .gallery-tile {
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
}

.gallery-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.gallery-tile img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* --------------------------------------------------------------------------
   Page 27 — Echo Organized-Chaos Editorial Moodboard
   -------------------------------------------------------------------------- */
.moodboard-canvas {
  position: relative;
  width: 100%;
  min-height: 600px;
  padding: 24px 0 12px;
}

.moodboard-backdrop {
  position: absolute;
  inset: 6% 4% 4% 4%;
  background: rgba(255, 255, 255, 0.035);
  clip-path: polygon(2% 4%, 97% 0%, 100% 94%, 0% 98%);
  pointer-events: none;
}

.moodboard-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  align-items: center;
}

.mb-item {
  position: relative;
  cursor: zoom-in;
  transition: transform 0.45s var(--ease-apple), box-shadow 0.45s var(--ease-apple), z-index 0s;
}

.mb-item:hover {
  z-index: 10;
  transform: rotate(0deg) scale(1.03) !important;
}

.mb-photo {
  background: #1A1B1E;
  padding: 7px 7px 22px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.mb-photo img {
  width: 100%;
  height: auto;
  display: block;
}

.mb-caption {
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(243, 240, 234, 0.65);
  margin-top: 7px;
}

.mb-circle {
  border-radius: 50%;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(214, 176, 106, 0.35);
}

.mb-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mb-sticky {
  background: #DFD2B0;
  color: #252321;
  font-family: 'PortfolioHand', cursive;
  font-size: clamp(14px, 1.2vw, 18px);
  line-height: 1.35;
  padding: 14px 18px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.38);
  cursor: default;
}

.mb-diagram {
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: default;
}

.mb-diagram.is-circle {
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  justify-content: center;
  border: 1px solid rgba(214, 176, 106, 0.45);
  background: rgba(17, 18, 21, 0.85);
}

.mb-diagram.is-ivory {
  background: #EDE7DA;
  color: #252321;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.42);
}

/* Desktop Organized-Chaos Placement (Non-overlapping text, faithful to PDF) */
.mb-obs { grid-column: 1 / 4; grid-row: 1; transform: rotate(-2deg); z-index: 3; }
.mb-refract { grid-column: 2 / 5; grid-row: 2; transform: rotate(0.8deg) translateY(-16px); z-index: 2; }
.mb-macro { grid-column: 5 / 8; grid-row: 1 / 3; transform: translateY(4px); z-index: 1; }
.mb-facet { grid-column: 8 / 10; grid-row: 1; transform: rotate(-1.5deg); z-index: 2; }
.mb-arch { grid-column: 10 / 13; grid-row: 1; transform: rotate(1.2deg); z-index: 2; }
.mb-sticky-1 { grid-column: 7 / 9; grid-row: 2; transform: rotate(-2.5deg) translateY(-10px); z-index: 4; }
.mb-ripple { grid-column: 1 / 4; grid-row: 3; transform: translateY(-6px); z-index: 2; }
.mb-contour { grid-column: 4 / 7; grid-row: 3; transform: rotate(1.5deg); z-index: 2; }
.mb-gold { grid-column: 7 / 10; grid-row: 3; transform: rotate(-1deg); z-index: 2; }
.mb-goal { grid-column: 10 / 13; grid-row: 2; transform: rotate(1.5deg); z-index: 3; }
.mb-sticky-2 { grid-column: 10 / 13; grid-row: 3; transform: rotate(-1.8deg); z-index: 3; }

@media (max-width: 960px) {
  .moodboard-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .mb-obs, .mb-refract, .mb-macro, .mb-facet, .mb-arch,
  .mb-sticky-1, .mb-ripple, .mb-contour, .mb-gold, .mb-goal, .mb-sticky-2 {
    grid-column: auto;
    grid-row: auto;
    transform: none;
  }
}

@media (max-width: 560px) {
  .moodboard-grid {
    grid-template-columns: 1fr;
  }
}
/* Page 30 — Echo Vertical Composition (Full-width Hero + Detail) */
.echo-vert-hero {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  cursor: zoom-in;
}

.echo-vert-hero img {
  width: 100%;
  height: auto;
  display: block;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 10%, #000 90%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 10%, #000 90%, transparent 100%);
}

.echo-vert-bottom {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 24px;
  align-items: center;
}

.echo-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.echo-pillar {
  padding-top: 12px;
  border-top: 1px solid rgba(214, 176, 106, 0.35);
}

.echo-pillar h4 {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--page-accent);
  margin-bottom: 6px;
}

.echo-pillar p {
  font-size: 13px;
  opacity: 0.78;
  line-height: 1.5;
}

.echo-detail-thumb {
  max-width: 220px;
  width: 100%;
  margin-left: auto;
  border-radius: 10px;
  overflow: hidden;
  cursor: zoom-in;
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.echo-detail-thumb img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 960px) {
  .echo-vert-bottom,
  .echo-pillars {
    grid-template-columns: 1fr;
  }

  .echo-detail-thumb {
    margin: 0 auto;
  }
}

.outro-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(24px, 3.5vw, 56px);
  align-items: center;
}

.outro-title {
  font-family: var(--font-display-serif);
  font-size: clamp(56px, 7.5vw, 124px);
  line-height: 0.92;
  letter-spacing: -0.025em;
}

.outro-title .italic {
  font-style: italic;
  color: var(--accent-burgundy);
}

@media (max-width: 960px) {
  .multi-gallery {
    column-count: 2;
  }

  .multi-gallery.cols-echo-vert,
  /* Page 30 — Echo Vertical Composition (Full-width Hero + Detail) */
.echo-vert-hero {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  cursor: zoom-in;
}

.echo-vert-hero img {
  width: 100%;
  height: auto;
  display: block;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 10%, #000 90%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 10%, #000 90%, transparent 100%);
}

.echo-vert-bottom {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 24px;
  align-items: center;
}

.echo-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.echo-pillar {
  padding-top: 12px;
  border-top: 1px solid rgba(214, 176, 106, 0.35);
}

.echo-pillar h4 {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--page-accent);
  margin-bottom: 6px;
}

.echo-pillar p {
  font-size: 13px;
  opacity: 0.78;
  line-height: 1.5;
}

.echo-detail-thumb {
  max-width: 220px;
  width: 100%;
  margin-left: auto;
  border-radius: 10px;
  overflow: hidden;
  cursor: zoom-in;
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.echo-detail-thumb img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 960px) {
  .echo-vert-bottom,
  .echo-pillars {
    grid-template-columns: 1fr;
  }

  .echo-detail-thumb {
    margin: 0 auto;
  }
}

.outro-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .multi-gallery {
    column-count: 1;
  }

  .multi-gallery.cols-2 {
    grid-template-columns: 1fr;
  }
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.specs-table th, .specs-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(37, 35, 33, 0.10);
}

.specs-table tr:hover td {
  background: rgba(121, 47, 51, 0.04);
}

/* --------------------------------------------------------------------------
   Floating Bottom Prev / Next Control Bar
   -------------------------------------------------------------------------- */
.floating-pager {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 90;
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  width: max-content;
  max-width: calc(100vw - 24px);
  gap: 8px;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(243, 240, 234, 0.78);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(37, 35, 33, 0.10);
  box-shadow: var(--shadow-dock);
  transition: background-color 0.4s var(--ease-apple), border-color 0.4s var(--ease-apple);
}

body.is-dark-section .floating-pager {
  background: rgba(24, 25, 29, 0.78);
  border-color: rgba(255, 255, 255, 0.14);
  color: #F3F0EA;
}

.pager-btn {
  border: none;
  background: transparent;
  color: inherit;
  font-family: var(--font-sans);
  font-size: 12px;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.25s var(--ease-apple), transform 0.2s var(--ease-apple);
}

.pager-btn:hover:not(:disabled) {
  background: rgba(121, 47, 51, 0.12);
}

.pager-btn:disabled { opacity: 0.3; cursor: default; }

.pager-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0 8px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   36-Page Index Drawer & Fullscreen Lightbox
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(17, 18, 21, 0.84);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3vw, 40px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease-apple);
}

.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.index-panel {
  width: 100%;
  max-width: 1240px;
  max-height: 86vh;
  overflow-y: auto;
  border-radius: 20px;
  background: var(--bg-paper);
  color: var(--ink-primary);
  padding: 28px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.4);
}

.index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.index-item {
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(37, 35, 33, 0.08);
  cursor: pointer;
  text-align: left;
  transition: transform 0.25s var(--ease-apple), border-color 0.25s var(--ease-apple);
}

.index-item:hover {
  transform: translateY(-2px);
  border-color: var(--accent-burgundy);
}

.lightbox-img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 10px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  object-fit: contain;
}

.modal-close-btn {
  position: fixed;
  top: 20px;
  right: 24px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(20, 20, 22, 0.65);
  color: #FFF;
  font-size: 20px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

/* --------------------------------------------------------------------------
   Sequential Reveal Animations (Text first -> Images after)
   -------------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease-apple), transform 0.85s var(--ease-apple);
}

[data-reveal="mask"] {
  opacity: 0;
  transform: translateY(105%);
  transition: opacity 0.9s var(--ease-apple), transform 1s var(--ease-apple);
}

[data-reveal="media"] {
  opacity: 0;
  transform: scale(1.02) translateY(22px);
  transition: opacity 1s var(--ease-apple), transform 1.1s var(--ease-apple);
}

[data-reveal="rule"] {
  opacity: 1;
  transform: scaleX(0);
  transition: transform 1s var(--ease-apple);
}

.is-visible[data-reveal] {
  opacity: 1;
  transform: translateY(0);
}

.is-visible[data-reveal="media"] {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.is-visible[data-reveal="rule"] {
  transform: scaleX(1);
}

/* --------------------------------------------------------------------------
   Responsive (Tablet, Half-Screen, Mobile)
   -------------------------------------------------------------------------- */
@media (max-width: 1380px) {
  .site-nav {
    height: auto;
    flex-wrap: wrap;
    padding: 10px 16px 8px;
    gap: 8px;
  }

  .nav-tabs {
    order: 3;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: center;
  }

  .portfolio-page {
    padding-top: 108px;
    padding-bottom: 48px;
  }

  #page-01 {
    padding-top: 120px;
  }
}

@media (max-width: 960px) {
  .nav-tabs {
    justify-content: flex-start;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
  }
}

@media (max-width: 960px) {
  .profile-grid,
  .opening-split {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 600px) {
  .portfolio-page {
    padding: 108px 16px 84px;
  }

  .works-grid {
    grid-template-columns: 1fr;
  }

  .artwork-frame {
    aspect-ratio: 16 / 9;
    min-height: 190px;
  }

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

  .multi-gallery {
    grid-template-columns: 1fr;
  }

  .floating-pager {
    bottom: 12px;
    padding: 4px 6px;
    gap: 4px;
  }

  .pager-btn {
    padding: 6px 10px;
    font-size: 11px;
  }

  .nav-grid-btn {
    padding: 5px 10px;
    font-size: 10px;
  }
}
