/* ============================================
   PORTFOLIO — Design System
   ============================================ */

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

:root {
  --color-bg:               #ffffff;
  --color-text:             #141210;
  --color-text-muted:       #756e68;
  --color-border:           #e5e5e5;
  --color-placeholder:      #f0f0f0;
  --color-placeholder-dark: #d8d8d8;
  --color-active-bg:        #141210;
  --color-active-text:      #ffffff;
  --color-accent:           #8b7355;
  --color-accent-2:         #8b7355;
  --font: system-ui, -apple-system, 'Hiragino Sans', sans-serif;
  --radius:       6px;
  --max-width:    1200px;
  --gap:          24px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

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

/* --- Layout Utilities --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  border-bottom: 1px solid var(--color-border);
  padding: 20px 0;
  position: sticky;
  top: 0;
  background: var(--color-bg);
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  gap: 32px;
  list-style: none;
}

.site-nav a {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.15s;
  color: var(--color-text-muted);
}

.site-nav a:hover {
  border-color: var(--color-text);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  border-bottom: 1px solid var(--color-border);
  padding: 64px 0 48px;
}

.hero-name {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.1;
}

.hero-role {
  margin-top: 12px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Placeholder bar for hero description */
.placeholder-text {
  background: var(--color-bg);
  border-radius: 2px;
  display: block;
}

.placeholder-text.sm { height: 10px; width: 200px; margin-top: 16px; }
.placeholder-text.md { height: 10px; width: 320px; margin-top: 16px; }

/* ============================================
   FILTER BAR
   ============================================ */
.filter-bar {
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--color-border);
}

.filter-bar .container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.filter-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-right: 8px;
}

.filter-btn {
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 6px 18px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.filter-btn:hover {
  border-color: var(--color-text);
  color: var(--color-text);
}

.filter-btn.active {
  background: var(--color-active-bg);
  color: var(--color-active-text);
  border-color: var(--color-active-bg);
}

/* ============================================
   WORKS GRID
   ============================================ */
.works-section {
  padding: 40px 0 80px;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  align-items: start;
}


/* --- Work Card Animation --- */
@keyframes cardFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes cardWipe {
  0%   { transform: translateX(-101%); }
  40%  { transform: translateX(0); }
  100% { transform: translateY(101%); }
}

.work-card.card-anim {
  opacity: 0;
}

.work-card.card-anim.card-visible {
  animation: cardFadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--card-delay, 0s) + 0.3s);
}

.work-card.card-anim::before {
  content: '';
  position: absolute;
  inset: 0;
  background: hsl(from color-mix(in srgb, var(--card-accent, var(--color-border)) 55%, #000 45%) h calc(s * 1.35) l);
  z-index: 10;
  transform: translateX(-101%);
  pointer-events: none;
  border-radius: inherit;
}

.work-card.card-anim.card-visible::before {
  animation: cardWipe 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--card-delay, 0s);
}

/* --- Work Card --- */
.work-card {
  position: relative;
  cursor: pointer;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s;
}


.work-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px var(--card-shadow, rgba(20, 18, 16, 0.1));
  border-color: var(--card-accent, var(--color-text-muted));
}

.work-card.hidden {
  display: none;
}

.work-card__thumb {
  width: 100%;
  aspect-ratio: 3 / 2;
  background: var(--color-placeholder);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.work-card__thumb-label {
  font-size: 11px;
  color: var(--color-placeholder-dark);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Hover overlay */
.work-card__thumb::after {
  content: "VIEW";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.16em;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
}

.work-card:hover .work-card__thumb::after {
  opacity: 1;
}

.work-card__body {
  padding: 16px 16px 6px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.work-card__category {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  display: inline-block;
  padding: 2px 8px;
  align-self: flex-start;
}

.work-card__title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.work-card__number {
  color: var(--card-accent, var(--color-text-muted));
  font-weight: 500;
}

.work-card__tools {
  font-size: 11px;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}

.work-card__tagline {
  font-size: 12px;
  color: hsl(from color-mix(in srgb, var(--card-accent, var(--color-text-muted)) 55%, #000 45%) h calc(s * 1.35) l);
  line-height: 1.5;
  letter-spacing: 0.03em;
  margin-top: 6px;
  margin-bottom: 2px;
}

/* ============================================
   WORK DETAIL PAGE
   ============================================ */

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.15s;
}

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

body[data-page="detail"] {
  cursor: none;
}

.detail-nav {
  padding: 24px 0;
  border-bottom: 1px solid var(--color-border);
}

/* Hero image */
.detail-hero {
  width: 100%;
  aspect-ratio: 16 / 7;
  background: var(--color-placeholder);
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-hero-label {
  font-size: 12px;
  color: var(--color-placeholder-dark);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Work info section */
.detail-info {
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--color-border);
}

.detail-info .container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 48px;
}

.detail-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.detail-category {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
  border-radius: 4px;
  display: inline-block;
  padding: 4px 12px;
  opacity: 0.85;
}

.detail-title {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--color-text);
}

.detail-description p {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: 12px;
}

/* Sidebar meta */
.detail-meta {
  border-left: 1px solid var(--color-border);
  padding-left: 40px;
}

.meta-group {
  margin-bottom: 32px;
}

.meta-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.meta-value {
  font-size: 13px;
  line-height: 1.7;
}

.tool-tag {
  display: inline-block;
  font-size: 11px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 3px 10px;
  margin: 3px 3px 3px 0;
  color: var(--color-text-muted);
}

/* Sub-images gallery */
.detail-gallery {
  padding: 48px 0;
  border-bottom: 1px solid var(--color-border);
}

.detail-gallery h2 {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

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

.gallery-item {
  aspect-ratio: 4 / 3;
  background: var(--color-placeholder);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-item-label {
  font-size: 10px;
  color: var(--color-placeholder-dark);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Prev / Next navigation */
.work-pagination {
  padding: 40px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pagination-btn {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pagination-btn.next {
  text-align: right;
  align-items: flex-end;
}

.pagination-direction {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.pagination-title {
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.15s;
}

.pagination-btn a:hover .pagination-title {
  border-color: var(--color-text);
}

.pagination-thumb {
  display: block;
  width: 180px;
  height: 90px;
  object-fit: cover;
  object-position: center;
  margin-top: 10px;
  border-radius: var(--radius);
  box-shadow: 0 0 0 0.5px transparent;
  opacity: 1;
  transition: opacity 0.2s, filter 0.2s;
}

.pagination-btn a:hover .pagination-thumb {
  opacity: 0.8;
  filter: brightness(1.1);
}

/* ============================================
   ABOUT SECTION (on index)
   ============================================ */
.about-section {
  border-top: 1px solid var(--color-border);
  padding: 64px 0;
}

.about-section .container {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.about-photo {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 3 / 4;
  background: var(--color-placeholder);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.about-photo__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  padding-top: 100;
}

.about-photo__img.photo-visible {
  animation: photoReveal 1.0s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes photoReveal {
  from { opacity: 0; transform: scale(1.06); }
  to   { opacity: 1; transform: scale(1); }
}

.about-photo-label {
  font-size: 11px;
  color: var(--color-placeholder-dark);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.about-heading {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

.about-name {
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  line-height: 1.2;
}

.about-tagline {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

.tagline {
  white-space: pre-line;
}

.about-body p {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: 12px;
}

.skills-grid {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.skill-group-label {
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.skill-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.skill-tag {
  font-size: 11px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 4px 10px;
  color: var(--color-text-muted);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 32px 0;
}

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

.footer-name {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-copy {
  font-size: 11px;
  color: var(--color-text-muted);
}

/* ============================================
   IMAGE DISPLAY
   ============================================ */
.work-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

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

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

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .works-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail-info .container {
    grid-template-columns: 1fr;
  }

  .detail-meta {
    border-left: none;
    border-top: 1px solid var(--color-border);
    padding-left: 0;
    padding-top: 32px;
  }

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

  body[data-page="top"] .about-section .container {
    flex-direction: column;
    align-items: center;
    gap: 32px;
  }

  body[data-page="top"] .about-section .about-photo {
    width: 200px;
    margin-top: 0;
  }

  body[data-page="top"] .about-section .about-body {
    text-align: center;
    width: 100%;
  }

  body[data-page="top"] .about-section .about-tagline {
    text-align: center;
  }

  body[data-page="top"] .about-section .skills-grid {
    justify-content: center;
  }

}

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

  .site-nav {
    gap: 16px;
  }

  .detail-hero {
    aspect-ratio: 16 / 9;
  }

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

  .work-pagination {
    flex-direction: column;
    gap: 24px;
    align-items: flex-start;
  }

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

/* ============================================
   TOP PAGE (index.html)
   ============================================ */

body[data-page="top"] {
  background: #000;
}

/* ---- Header: fixed, transparent → dark on scroll (JS-driven) ---- */
body[data-page="top"] .site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0);
  border-bottom: 1px solid rgba(255, 255, 255, 0);
  transition: background 0.4s ease, border-color 0.4s ease;
}

body[data-page="top"] .site-logo,
body[data-page="top"] .site-nav a {
  color: rgba(255, 255, 255, 0.85);
}

body[data-page="top"] .site-nav a:hover {
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}

/* ---- First-view: full-screen video (100vh) ---- */
.top-first-view {
  position: relative;
  height: 100vh;
  overflow: hidden;
  cursor: none;
}

/* Parallax depth layers */
.parallax-layer {
  will-change: transform;
}

/* Cursor trail canvas */
#heroTrail {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

#detailTrail {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9998;
  pointer-events: none;
}

/* Full-screen video container — absolute inside .top-first-view */
.top-video-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #000;
}

/* YouTube iframe — scale to cover viewport at any aspect ratio */
.top-video-bg #ytPlayer,
.top-video-bg #ytPlayer iframe {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: max(100vw, 177.78vh) !important;
  height: max(100vh, 56.25vw) !important;
  transform: translate(-50%, -50%) !important;
  pointer-events: none !important;
  border: none !important;
}

/* Dark overlay */
.top-video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.30) 0%,
    rgba(0, 0, 0, 0.30) 60%,
    rgba(0, 0, 0, 0.30) 100%
  );
  z-index: 1;
}

/* ---- Hero entrance animation ---- */
@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-anim {
  opacity: 0;
  animation: heroFadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--anim-delay, 0s);
}

/* Hero text overlay — absolute inside .top-first-view */
.top-hero-content {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  color: #fff;
  pointer-events: none;
  margin-left: 5%;
  justify-content: flex-end;
  padding-bottom: 80px;

  
}

.top-hero-name {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: 12px;
}

.top-hero-role-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 52px;
}

.top-hero-role {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

.top-hero-role-sep {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.30);
  letter-spacing: 0;
}

.top-hero-nav {
  display: flex;
  gap: 16px;
}

.top-hero-btn {
  pointer-events: auto;
}

.top-hero-btn {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.55);
  padding: 12px 36px;
  transition: background 0.2s, border-color 0.2s;
}

.top-hero-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
}

.top-hero-btn--ghost {
  border-color: rgba(255, 255, 255, 0.35);
}

/* ---- About section on TOP page: black bg, white text, side-by-side layout ---- */
body[data-page="top"] .about-section {
  background: #0a0a0a;
  border-top-color: rgba(255, 255, 255, 0.1);
  padding-top: 100px;
}

body[data-page="top"] .about-section .container {
  flex-direction: row;
  align-items: flex-start;
  gap: 56px;
}

body[data-page="top"] .about-section .about-photo {
  flex-shrink: 0;
  width: 280px;
  background: #1a1a1a;
}

body[data-page="top"] .about-section .about-photo-label {
  color: #555;
}

body[data-page="top"] .about-section .about-heading {
  color: rgba(255, 255, 255, 0.4);
}

body[data-page="top"] .about-section .about-name {
  color: #fff;
}

body[data-page="top"] .about-section .about-tagline {
  color: rgba(255, 255, 255, 0.55);
}

body[data-page="top"] .about-section p {
  color: rgba(255, 255, 255, 0.6);
}

body[data-page="top"] .about-section .skill-group-label {
  color: rgba(255, 255, 255, 0.35);
}

body[data-page="top"] .about-section .skill-tag {
  color: rgba(255, 255, 255, 0.55);
  border-color: rgba(255, 255, 255, 0.15);
}

/* About section text entrance animation */
.about-text-anim {
  opacity: 0;
  animation: cardFadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--about-delay, 0s);
}

/* ---- TOP page ABOUT responsive override (must be after flex-direction: row declaration) ---- */
@media (max-width: 900px) {
  body[data-page="top"] .about-section .container {
    flex-direction: column;
    align-items: center;
    gap: 32px;
  }
  body[data-page="top"] .about-section .about-photo {
    width: 200px;
    margin-top: 0;
  }
  body[data-page="top"] .about-section .about-body {
    text-align: center;
    width: 100%;
  }
  body[data-page="top"] .about-section .skills-grid {
    justify-content: center;
  }
}

/* ---- Works section on TOP page ---- */
.top-works-section {
  background: var(--color-bg);
  padding: 80px 0 80px;
  border-top: 1px solid var(--color-border);
}

.top-section-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 40px;
}

.top-works-more {
  margin-top: 48px;
  text-align: center;
}

.top-works-link {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--color-text);
  padding-bottom: 3px;
  transition: opacity 0.15s;
}

.top-works-link:hover {
  opacity: 0.6;
}

/* ============================================
   ABOUT PAGE LAYOUT OVERRIDES (about.html only)
   ============================================ */
body[data-page="about"] .about-section .container {
  flex-direction: column;
  align-items: center;
  max-width: 720px;
}

body[data-page="about"] .about-photo {
  width: 240px;
  max-width: 240px;
  aspect-ratio: 3 / 4;
  margin: 0 auto;
}

body[data-page="about"] .about-body {
  width: 100%;
  text-align: center;
}

body[data-page="about"] .about-name {
  font-size: 22px;
  margin-bottom: 10px;
}

body[data-page="about"] .about-body > p.about-tagline {
  font-size: 12px;
  line-height: 1.8;
  text-align: center;
  color: var(--color-text-muted);
  margin-top: 20px;
  margin-bottom: 20px;
}

body[data-page="about"] .about-body > p {
  text-align: left;
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.9;
  margin-bottom: 12px;
}

body[data-page="about"] .about-heading {
  text-align: center;
}

body[data-page="about"] .skills-grid {
  text-align: left;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
}

/* ============================================
   CONTACT SECTION (about.html)
   ============================================ */
.contact-section {
  border-top: 1px solid var(--color-border);
  padding: 64px 0;
}

.contact-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

.contact-heading {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.contact-email {
  font-size: 14px;
  color: var(--color-text-muted);
}

.contact-email a:hover {
  text-decoration: underline;
}

/* ============================================
   WORK DETAIL — Tagline
   ============================================ */
.detail-number {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  opacity: 0.6;
}

@keyframes taglineBar {
  0%   { transform: translateX(-101%); }
  42%  { transform: translateX(0%); }
  58%  { transform: translateX(0%); }
  100% { transform: translateX(101%); }
}

@keyframes taglineReveal {
  0%, 48% { opacity: 0; }
  50%, 100% { opacity: 1; }
}

.detail-tagline {
  font-size: 34px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.3;
  color: var(--color-accent-2);
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

.detail-tagline::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-accent-2);
  transform: translateX(-101%);
  z-index: 1;
  pointer-events: none;
}

.detail-tagline.tagline-animated::before {
  animation: taglineBar 1.1s cubic-bezier(0.77, 0, 0.18, 1) forwards;
  animation-delay: 0.2s;
}

.tagline-text {
  display: block;
  opacity: 0;
  white-space: pre-line;
}

.tagline-animated .tagline-text {
  animation: taglineReveal 1.1s ease forwards;
  animation-delay: 0.2s;
}

/* ============================================
   WORK DETAIL — Video Embed
   ============================================ */
.detail-video__wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  margin-top: 32px;
}

.detail-video__wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ============================================
   WORK DETAIL — Large Gallery Section
   ============================================ */
.detail-gallery-section {
  padding: 56px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.gallery-grid--large {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.gallery-item--large {
  aspect-ratio: 16 / 9;
  background: var(--color-placeholder);
  overflow: hidden;
}

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

/* split-left: image[0] portrait left spanning rows, rest stacked right */
.gallery-grid--large[data-layout="split-left"] {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  align-items: start;
}

.gallery-grid--large[data-layout="split-left"] .gallery-item--large {
  aspect-ratio: unset;
}

.gallery-grid--large[data-layout="split-left"] .gallery-item--large img {
  height: auto;
}

.gallery-grid--large[data-layout="split-left"] .gallery-item--large:nth-child(1) {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.gallery-grid--large[data-layout="split-left"] .gallery-item--large:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
}

.gallery-grid--large[data-layout="split-left"] .gallery-item--large:nth-child(3) {
  grid-column: 2;
  grid-row: 2;
}

/* row-then-pair: image[0] full-width top, images[1][2] side by side below */
.gallery-grid--large[data-layout="row-then-pair"] {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  align-items: start;
}

.gallery-grid--large[data-layout="row-then-pair"] .gallery-item--large {
  aspect-ratio: unset;
}

.gallery-grid--large[data-layout="row-then-pair"] .gallery-item--large img {
  height: auto;
}

.gallery-grid--large[data-layout="row-then-pair"] .gallery-item--large:nth-child(1) {
  grid-column: 1 / span 2;
  grid-row: 1;
}

.gallery-grid--large[data-layout="row-then-pair"] .gallery-item--large:nth-child(2) {
  grid-column: 1;
  grid-row: 2;
}

.gallery-grid--large[data-layout="row-then-pair"] .gallery-item--large:nth-child(3) {
  grid-column: 2;
  grid-row: 2;
}

/* ============================================
   PRODUCTION OVERVIEW — 画像と交互レイアウト
   ============================================ */
.detail-process {
  padding: 56px 0;
  border-bottom: 1px solid var(--color-border);
}

.detail-process-title {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent-2);
  margin-bottom: 40px;
}

/* 各制作概要ブロック：テキスト上・画像下 */
.process-block {
  padding-bottom: 56px;
  margin-bottom: 56px;
  border-bottom: 1px solid var(--color-border);
}

.process-block:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

/* 画像ラッパー */
.process-block__img-wrap {
  display: block;
  opacity: 1;
  margin-top: 24px;
}

.process-block__img-wrap > .process-block__img-inner {
  overflow: hidden;
}

/* 画像グリッド */
.process-block__img-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.process-block__img-grid--single {
  grid-template-columns: 1fr;
  max-width: 720px;
}

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

.process-img-item {
  aspect-ratio: 4 / 3;
  background: var(--color-placeholder);
  overflow: hidden;
}

/* Natural height variant — no forced aspect ratio */
.process-block__img-grid--natural .process-img-item {
  aspect-ratio: unset;
  background: none;
}

.process-block__img-grid--natural .process-img-item img {
  height: auto;
}

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

/* テキスト側 */
.process-block__heading {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.5;
  margin-bottom: 16px;
  cursor: default;
}

.process-block__body {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.9;
  max-width: 680px;
}

/* レスポンシブ */
@media (max-width: 800px) {
  .process-block__img-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 600px) {
  .process-block__img-grid {
    grid-template-columns: 1fr;
  }
}
