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

:root {
  --bg: #E9E9E4;
  --card: #FFFFFF;
  --ink: #1A1A1A;
  --muted: #999999;
  --border: #D8D8D4;
  --border-dark: #C0C0BB;
  --accent: #FF4A1F;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --card-pad-v: 48px;
  --card-pad-h: 72px;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

/* =============================================
   FLOATING NAV TOGGLE
   ============================================= */
.nav-toggle {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 200;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--card);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  color: var(--ink);
  transition: box-shadow 0.2s;
}

.nav-toggle:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
}

/* =============================================
   SLIDE-IN NAV OVERLAY
   ============================================= */
.site-nav {
  position: fixed;
  inset: 0;
  z-index: 199;
  background: rgba(255, 255, 255, 0.97);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 64px 80px;
}

.site-nav[hidden] {
  display: none;
}

.nav-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
  padding: 8px;
}

.site-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-nav a {
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  display: inline-block;
  line-height: 1.2;
  transition: color 0.15s;
}

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

/* =============================================
   SCROLL ROOT — outer wrapper
   ============================================= */
.scroll-root {
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: 1480px;
  margin: 0 auto;
}

/* =============================================
   PAGE CARDS
   ============================================= */
.page {
  background: var(--card);
  padding: var(--card-pad-v) var(--card-pad-h);
  display: flex;
  flex-direction: column;
  min-height: 680px;
}

/* =============================================
   RUNNING HEAD
   ============================================= */
.running-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--muted);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
  flex-shrink: 0;
}

/* =============================================
   PAGE FOOTER (label + page number)
   ============================================= */
.page-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: auto;
  padding-top: 48px;
  flex-shrink: 0;
}

.page-label {
  border: 1px solid var(--ink);
  padding: 10px 7px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 10px;
  letter-spacing: 0.14em;
  line-height: 1.5;
  color: var(--ink);
  text-align: center;
}

.page-num {
  font-family: var(--serif);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

/* =============================================
   ACCENT COLOR
   ============================================= */
.accent {
  color: var(--accent);
}

/* =============================================
   PAGE 01: COVER
   ============================================= */
.cover-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.cover-eyebrow {
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-bottom: 20px;
}

.cover-title {
  font-family: var(--serif);
  font-size: clamp(52px, 7.2vw, 128px);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 48px;
}

.cover-title em {
  font-style: italic;
  font-weight: 700;
}

.cover-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 840px;
  margin-bottom: 40px;
}

.thumb-slot {
  aspect-ratio: 3 / 4;
  border: 1px dashed var(--border-dark);
  background: #F4F4F0;
  overflow: hidden;
}

.thumb-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.cta-link {
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

/* =============================================
   PAGE 02: INDEX
   ============================================= */
.page--index .index-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.index-title {
  font-family: var(--serif);
  font-size: clamp(80px, 10vw, 136px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.index-nav {
  display: flex;
  flex-direction: column;
  padding-top: 8px;
}

.index-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--ink);
  transition: opacity 0.15s;
}

.index-item:first-child {
  border-top: 1px solid var(--border);
}

.index-item:hover {
  opacity: 0.6;
}

.index-num {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.index-name {
  font-size: 17px;
  font-weight: 700;
}

.index-tag {
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
}

/* =============================================
   PAGE 03: ABOUT
   ============================================= */
.about-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  margin-bottom: 64px;
}

.section-eyebrow {
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 20px;
  display: block;
}

.about-left h2 {
  font-size: clamp(24px, 2.8vw, 36px);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.about-left p {
  font-size: 14px;
  color: #555;
  line-height: 1.85;
}

/* Horizontal career timeline */
.career-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  position: relative;
  padding-top: 32px;
}

.career-row::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 6px;
  right: 0;
  height: 1px;
  background: var(--ink);
}

.career-col {
  position: relative;
}

.career-col::before {
  content: '';
  position: absolute;
  top: -26px;
  left: 0;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent);
}

.career-col strong {
  font-size: 14px;
  display: block;
  margin-bottom: 6px;
}

.career-col p {
  font-size: 13px;
  color: #555;
  line-height: 1.6;
}

/* Services */
.services-section {
  border-top: 1px solid var(--border);
  padding-top: 40px;
}

.services-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 32px;
  margin-top: 24px;
}

.service-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 10px;
}

.service-item strong {
  font-size: 13px;
  font-weight: 700;
  display: block;
  margin-bottom: 8px;
}

.service-item p {
  font-size: 12px;
  color: #666;
  line-height: 1.75;
}

/* =============================================
   PAGE 04: SELECTED WORKS
   ============================================= */
.works-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 20px;
  flex-shrink: 0;
}

.works-head h2 {
  font-family: var(--serif);
  font-size: clamp(40px, 5.5vw, 72px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.015em;
}

.works-head h2 em {
  font-style: italic;
}

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-button {
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1.5px solid var(--border-dark);
  background: transparent;
  font-size: 12px;
  letter-spacing: 0.02em;
  cursor: pointer;
  color: var(--ink);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
  font-family: var(--sans);
}

.filter-button:hover {
  border-color: var(--ink);
}

.filter-button.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  flex: 1;
}

.work-card button {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  padding: 0;
  display: block;
}

.work-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top center;
  border: 1px dashed var(--border-dark);
  background: #F4F4F0;
  display: block;
}

.work-caption {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 2px 4px;
}

.work-meta {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.work-caption strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.empty-message {
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  padding: 56px 0;
}

/* =============================================
   PAGES 05–07: PROJECT DETAIL
   ============================================= */
.project-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  flex: 1;
}

.project-title {
  font-family: var(--serif);
  font-size: clamp(48px, 6vw, 80px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 20px;
}

.project-num {
  display: block;
  font-style: normal;
}

.project-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 32px;
  line-height: 1.4;
}

.project-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}

.project-table tr {
  border-top: 1px solid var(--border);
}

.project-table tr:last-child {
  border-bottom: 1px solid var(--border);
}

.project-table td {
  padding: 15px 0;
  vertical-align: top;
  line-height: 1.75;
}

.project-table td:first-child {
  color: var(--muted);
  width: 76px;
  font-size: 11px;
  letter-spacing: 0.04em;
  padding-right: 16px;
  white-space: nowrap;
}

.project-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-img {
  flex: 1;
  border: 1px dashed var(--border-dark);
  background: #F4F4F0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* =============================================
   PAGE 08: PROCESS
   ============================================= */
.process-body {
  flex: 1;
}

.process-body h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 3.2vw, 44px);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 56px;
}

.process-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 48px;
}

.process-list li {
  border-top: 2px solid var(--ink);
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step-num {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
}

.step-body strong {
  font-size: 15px;
  font-weight: 700;
  display: block;
  margin-bottom: 8px;
}

.step-body p {
  font-size: 13px;
  color: #555;
  line-height: 1.75;
}

/* =============================================
   PAGE 09: CONTACT
   ============================================= */
.contact-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
}

.contact-body h2 {
  font-family: var(--serif);
  font-size: clamp(40px, 5.5vw, 72px);
  font-weight: 700;
  font-style: italic;
  line-height: 1;
  letter-spacing: -0.015em;
}

.contact-email {
  font-size: clamp(16px, 2vw, 24px);
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  display: inline-block;
  align-self: flex-start;
  border-bottom: 1.5px solid var(--accent);
  padding-bottom: 2px;
  letter-spacing: 0.01em;
}

.contact-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.contact-tags span {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 999px;
}

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

/* =============================================
   DIALOG / LIGHTBOX
   ============================================= */
.work-dialog {
  border: none;
  padding: 0;
  max-width: min(90vw, 900px);
  max-height: 90vh;
  overflow: auto;
  background: var(--card);
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.22);
}

.work-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.close-dialog {
  position: sticky;
  top: 0;
  float: right;
  background: rgba(255, 255, 255, 0.92);
  border: none;
  font-size: 30px;
  line-height: 1;
  padding: 10px 16px;
  cursor: pointer;
  z-index: 10;
  color: var(--ink);
}

.dialog-body {
  padding: 24px;
  clear: both;
}

.detail-figure img {
  width: 100%;
  display: block;
}

.detail-figure figcaption {
  padding: 16px 0 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-figure figcaption strong {
  font-size: 16px;
  font-weight: 700;
}

/* =============================================
   RESPONSIVE — 1024px
   ============================================= */
@media (max-width: 1024px) {
  :root {
    --card-pad-v: 40px;
    --card-pad-h: 48px;
  }

  .scroll-root {
    padding: 24px;
    gap: 24px;
  }

  .page {
    min-height: 560px;
  }

  .page--index .index-body {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .index-title {
    font-size: 80px;
  }

  .about-body {
    grid-template-columns: 1fr;
    gap: 48px;
    margin-bottom: 48px;
  }

  .services-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  .project-body {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .project-right {
    flex-direction: row;
  }

  .process-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }

  .site-nav a {
    font-size: 36px;
  }
}

/* =============================================
   RESPONSIVE — 640px
   ============================================= */
@media (max-width: 640px) {
  :root {
    --card-pad-v: 28px;
    --card-pad-h: 24px;
  }

  .scroll-root {
    padding: 12px;
    gap: 12px;
  }

  .page {
    min-height: 0;
  }

  .running-head {
    margin-bottom: 28px;
    font-size: 10px;
  }

  .cover-thumbs {
    grid-template-columns: 1fr;
    max-width: 320px;
  }

  .cover-thumbs .thumb-slot:not(:first-child) {
    display: none;
  }

  .index-title {
    font-size: 56px;
  }

  .index-item {
    padding: 14px 0;
  }

  .index-name {
    font-size: 15px;
  }

  .career-row {
    grid-template-columns: 1fr;
    padding-top: 0;
  }

  .career-row::before {
    display: none;
  }

  .career-col {
    padding-top: 0;
    padding-left: 24px;
    margin-bottom: 16px;
  }

  .career-col::before {
    top: 2px;
    left: 0;
  }

  .services-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .works-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .work-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .project-right {
    flex-direction: column;
  }

  .process-list {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .site-nav {
    padding: 48px 32px;
  }

  .site-nav a {
    font-size: 32px;
  }

  .nav-toggle {
    top: 12px;
    right: 12px;
  }
}
