:root {
  --bg: #a8d0e1;
  --bg-deep: #94c2d6;
  --text: #334852;
  --muted: #45606d;
  --line: #f0745a;
  --panel: rgba(230, 244, 250, 0.58);
  --panel-strong: rgba(245, 251, 253, 0.78);
  --border: rgba(51, 72, 82, 0.28);
  --shadow: 0 20px 60px rgba(36, 64, 82, 0.12);
  --cube-fill: #b9dae7;
  --max: 1240px;
}

body[data-theme="illustration"] {
  --bg: #111111;
  --bg-deep: #1b1b1b;
  --text: #f2efe5;
  --muted: #beb8aa;
  --line: #d64b52;
  --panel: rgba(28, 28, 28, 0.88);
  --panel-strong: rgba(42, 42, 42, 0.94);
  --border: rgba(242, 239, 229, 0.16);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.34);
  --cube-fill: #1f1f1f;
}

body[data-theme="design"] {
  --bg: #474744;
  --bg-deep: #252525;
  --text: #e8e8c6;
  --muted: #cfcdaa;
  --line: #e8e8c6;
  --panel: rgba(37, 37, 37, 0.88);
  --panel-strong: rgba(52, 52, 49, 0.94);
  --border: rgba(232, 232, 198, 0.24);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  --cube-fill: #474744;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.08), transparent 20%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
}

body.timeline-body,
body.project-body {
  position: relative;
}

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

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

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px);
  background-size: 22px 22px;
}

.site-header,
.timeline-page,
.project-page {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
}

.header-bar,
.timeline-head,
.info-strip,
.contact-strip,
.project-nav,
.project-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.header-bar {
  padding: 26px 0 40px;
  align-items: stretch;
}

.mini-mark,
.top-nav a,
.section-label,
.card-index,
.project-tag,
.project-section h2,
.bullet-list li,
.back-link,
.footer-links a {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mini-mark {
  font-size: 1.1rem;
  font-weight: 700;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.top-nav a,
.contact-links a,
.footer-links a,
.back-link {
  border-bottom: 1px solid transparent;
}

.top-nav a:hover,
.contact-links a:hover,
.footer-links a:hover,
.back-link:hover {
  border-color: currentColor;
}

.intro-block {
  padding: 0 0 70px;
}

.section-label,
.section-side-note,
.project-tag {
  font-size: 0.84rem;
}

.intro-block h1,
.info-strip h2,
.project-hero h1 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.9;
}

.intro-block h1 {
  font-size: clamp(4rem, 12vw, 8.8rem);
}

.intro-copy,
.project-card p,
.info-copy p,
.project-intro,
.project-copy,
.placeholder-note,
.placeholder-item,
.contact-links a {
  font-size: 1rem;
  line-height: 1.8;
}

.intro-subtitle {
  margin: 26px 0 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(1.4rem, 2.7vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
}

.intro-copy {
  width: min(620px, 100%);
  margin: 16px 0 0;
}

.timeline-section {
  padding-bottom: 80px;
}

.timeline-head {
  align-items: start;
  padding: 10px 0 22px;
  flex-direction: column;
}

.skills-panel {
  width: min(100%, 880px);
  padding: 24px 26px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
}

.skills-block {
  width: 100%;
}

.skills-block + .skills-block {
  margin-top: 18px;
}

.skills-block .section-label {
  margin: 0 0 10px;
  font-family: "Manrope", sans-serif;
  font-size: 1rem;
  font-weight: 800;
}

.skills-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  line-height: 1.8;
}

.skills-line span::after {
  content: "/";
  margin-left: 14px;
}

.skills-line span:last-child::after {
  content: "";
  margin-left: 0;
}

.timeline-toolbar {
  display: flex;
  justify-content: flex-start;
  gap: 24px;
  align-items: start;
  padding: 0 0 26px;
}

.section-side-note {
  max-width: 330px;
  text-align: right;
}

.timeline-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.timeline-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--text);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  color: var(--text);
  font: inherit;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background-color 180ms ease, transform 180ms ease;
}

.timeline-switch:hover {
  transform: translateY(-2px);
}

.timeline-switch.is-active {
  background: rgba(255, 255, 255, 0.62);
}

.timeline-layout {
  position: relative;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 32px;
  align-items: stretch;
}

.timeline-center {
  position: relative;
  align-self: stretch;
  min-height: 100%;
  isolation: isolate;
}

.timeline-sticky {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.timeline-center::before {
  content: "";
  position: absolute;
  top: 110px;
  bottom: 40px;
  left: 36px;
  width: 4px;
  background: var(--line);
  z-index: 1;
}

.timeline-line {
  display: none;
}

.timeline-cube {
  position: absolute;
  top: 0;
  left: 2px;
  width: 72px;
  height: 72px;
  color: var(--text);
  border: 3px solid var(--text);
  background: var(--cube-fill);
  box-shadow: 10px 10px 0 rgba(51, 72, 82, 0.24);
  z-index: 2;
}

.timeline-cube::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid currentColor;
  opacity: 0.45;
}

.timeline-cube::before {
  content: "";
  position: absolute;
  inset: 20px;
  border: 1px solid currentColor;
  opacity: 0.34;
}

.timeline-cards {
  display: grid;
  gap: 110px;
}

.timeline-cards[hidden] {
  display: none;
}

.timeline-row {
  display: block;
  min-height: 340px;
}

.project-card,
.project-preview,
.project-copy-block,
.contact-strip,
.info-strip {
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 24px;
}

.project-card {
  padding: 24px;
  min-height: 260px;
}

.illustration-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}

.illustration-card .card-index,
.illustration-card h2,
.illustration-card > p {
  grid-column: 1 / -1;
}

.illustration-gallery {
  grid-column: 1 / -1;
  grid-row: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}

.illustration-thumb {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  width: 100%;
  aspect-ratio: 3 / 4;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 1px dashed var(--border);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 52%),
    rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  cursor: zoom-in;
}

.illustration-thumb.has-image {
  border-style: solid;
  background: rgba(255, 255, 255, 0.04);
}

.illustration-thumb.has-image::before,
.illustration-thumb.has-image::after {
  display: none;
}

.illustration-thumb::before,
.lightbox-placeholder::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid currentColor;
  opacity: 0.18;
}

.illustration-thumb::after,
.lightbox-placeholder::after {
  content: "";
  position: absolute;
  inset: 28px;
  border: 1px solid currentColor;
  opacity: 0.14;
}

.illustration-thumb:hover {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent 52%),
    rgba(255, 255, 255, 0.08);
}

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

.illustration-thumb span {
  position: relative;
  z-index: 1;
  padding: 8px;
  font-size: 0.82rem;
  line-height: 1.4;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.project-card-preview {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background-size: cover;
  background-position: center center;
}

.project-card-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(20, 22, 22, 0.62);
  z-index: -1;
}

.project-card-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(20, 22, 22, 0.78) 0%, rgba(20, 22, 22, 0.42) 58%, rgba(20, 22, 22, 0.62) 100%),
    linear-gradient(180deg, rgba(20, 22, 22, 0.32) 0%, rgba(20, 22, 22, 0.76) 100%);
  z-index: -1;
}

.project-card-metro {
  background-image: url("images/metro-preview.png");
}

.project-card-serp {
  background-image: url("images/serp-title.png");
}

.project-card-temple {
  background-image: url("images/temple-preview-web.jpg");
}

.project-card h2 {
  margin: 16px 0 14px;
  font-family: "Manrope", sans-serif;
  font-size: clamp(1.9rem, 3vw, 2.7rem);
  line-height: 0.98;
}

.card-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  margin-top: 18px;
  border: 1px solid var(--text);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  text-align: center;
  transition: transform 180ms ease, background-color 180ms ease;
}

.card-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.52);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(5, 5, 5, 0.82);
}

.lightbox.is-open {
  display: flex;
}

.lightbox [hidden] {
  display: none;
}

.lightbox-panel {
  position: relative;
  width: auto;
  max-width: min(980px, 100%);
  max-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-image {
  display: block;
  width: auto;
  height: auto;
  max-width: min(980px, calc(100vw - 64px));
  max-height: calc(100vh - 132px);
  border: 1px solid rgba(242, 239, 229, 0.22);
  border-radius: 18px;
  object-fit: contain;
  background: transparent;
}

.lightbox-placeholder {
  width: min(980px, calc(100vw - 64px));
  max-height: calc(100vh - 132px);
  border: 1px solid rgba(242, 239, 229, 0.22);
  border-radius: 18px;
  background: rgba(28, 28, 28, 0.96);
}

.lightbox-placeholder {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: min(68vh, 620px);
  color: #f2efe5;
  font: 1rem/1.6 "IBM Plex Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.lightbox-caption {
  margin: 12px 0 0;
  width: 100%;
  color: #f2efe5;
  font-size: 0.9rem;
  line-height: 1.5;
}

.lightbox-close {
  position: absolute;
  top: -18px;
  right: -18px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(242, 239, 229, 0.42);
  border-radius: 999px;
  background: rgba(28, 28, 28, 0.94);
  color: #f2efe5;
  font: 1.4rem/1 "IBM Plex Mono", monospace;
  cursor: pointer;
}

.reveal-card {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 600ms ease, transform 600ms ease;
}

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

.info-strip,
.contact-strip {
  padding: 26px;
  margin-bottom: 28px;
}

.info-strip h2 {
  max-width: 11ch;
  font-size: clamp(2rem, 5vw, 4rem);
}

.info-copy {
  max-width: 540px;
}

.info-detail + .info-detail {
  margin-top: 22px;
}

.info-detail h3 {
  margin: 0 0 8px;
  font-family: "Manrope", sans-serif;
  font-size: 1rem;
  font-weight: 800;
}

.info-detail p {
  margin: 0;
}

.contact-strip {
  display: grid;
  gap: 18px;
  margin-bottom: 80px;
}

.contact-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px;
}

.project-page {
  padding-bottom: 80px;
}

.project-nav {
  align-items: center;
  padding: 26px 0 24px;
}

.project-hero {
  position: relative;
  overflow: hidden;
  border-radius: 0 0 28px 28px;
}

.project-hero h1 {
  font-size: clamp(2.8rem, 8vw, 6rem);
  position: relative;
  z-index: 1;
}

.project-title-spaced {
  line-height: 0.98;
}

.project-title-spaced span {
  display: inline-block;
  white-space: nowrap;
}

.project-intro {
  width: min(680px, 100%);
  position: relative;
  z-index: 1;
}

.project-hero-inner {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
}

.project-hero-copy {
  display: grid;
  gap: 18px;
  padding: 28px 32px 34px;
}

.metro-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("images/metro-preview.png");
  background-size: cover;
  background-position: center center;
  filter: blur(4px);
  transform: scale(1.05);
}

.metro-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(37, 37, 37, 0.52) 0%, rgba(37, 37, 37, 0.42) 34%, rgba(37, 37, 37, 0.64) 100%),
    linear-gradient(90deg, rgba(37, 37, 37, 0.72) 0%, rgba(37, 37, 37, 0.24) 55%, rgba(37, 37, 37, 0.56) 100%);
}

.metro-hero {
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

.serp-hero {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  background: #c92904;
}

.serp-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("images/serp-title.png");
  background-size: cover;
  background-position: center center;
  filter: blur(9px);
  transform: scale(1.05);
}

.serp-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.68) 0%, rgba(0, 0, 0, 0.18) 46%, rgba(0, 0, 0, 0.08) 100%),
    linear-gradient(180deg, rgba(37, 37, 37, 0.12) 0%, rgba(37, 37, 37, 0.54) 100%);
}

.serp-hero .project-title-spaced,
.serp-hero .project-intro,
.serp-hero .project-nav {
  color: #ffe2bd;
}

.serp-hero .project-title-spaced {
  text-shadow: 10px 10px 0 rgba(55, 18, 8, 0.72);
}

.temple-hero {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  background:
    linear-gradient(135deg, rgba(232, 232, 198, 0.12), transparent 44%),
    linear-gradient(180deg, #31312f 0%, #252525 100%);
}

.temple-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("images/temple-preview-web.jpg");
  background-size: cover;
  background-position: center center;
  opacity: 0.82;
  filter: blur(4px);
  transform: scale(1.03);
}

.temple-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(37, 37, 37, 0.34) 0%, rgba(37, 37, 37, 0.02) 55%, rgba(37, 37, 37, 0.42) 100%),
    linear-gradient(180deg, rgba(37, 37, 37, 0.06) 0%, rgba(37, 37, 37, 0.58) 100%);
}

.temple-hero .project-title-spaced {
  line-height: 1.14;
}

.meta-panel {
  margin-top: 22px;
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 24px;
}

.project-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.meta-card {
  min-height: 150px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: space-between;
  align-items: center;
  text-align: center;
}

.meta-icon {
  width: 18px;
  height: 18px;
  margin-bottom: 8px;
  background:
    linear-gradient(90deg, var(--text) 50%, transparent 50%),
    linear-gradient(var(--text) 50%, transparent 50%);
  background-size: 6px 6px;
}

.meta-label,
.meta-value,
.process-heading,
.process-text,
.figure-caption {
  margin: 0;
}

.meta-label {
  font-family: "Manrope", sans-serif;
  font-weight: 800;
}

.meta-value {
  margin-top: 4px;
  line-height: 1.7;
}

.project-preview {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.placeholder-gradient {
  width: 100%;
  height: 100%;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 40%),
    linear-gradient(180deg, rgba(65, 99, 112, 0.15), rgba(65, 99, 112, 0.42)),
    linear-gradient(135deg, #8ec5dc, #d4ebf4 55%, #7cabbe);
}

.project-sections {
  display: grid;
  gap: 22px;
  padding-top: 26px;
}

.project-copy-block {
  padding: 26px;
}

.project-copy-block,
.result-box,
.overview-copy,
.temple-process-copy {
  min-width: 0;
}

.result-box {
  padding: 22px 26px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
  border-radius: 24px;
}

.temple-result-figure {
  margin: 20px 0 0;
  overflow: hidden;
  border-radius: 18px;
}

.temple-result-image {
  width: 100%;
  height: auto;
}

.project-section h2 {
  margin: 0 0 18px;
  font-size: 0.92rem;
}

.overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
  gap: 22px;
  align-items: stretch;
}

.overview-copy {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.overview-copy-full {
  max-width: 940px;
}

.overview-copy-full .problem-block {
  margin: 22px 0;
}

.overview-copy-full .project-copy:last-child {
  margin-bottom: 0;
}

.side-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.figure-caption {
  margin-top: 10px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.project-copy {
  margin: 0 0 18px;
}

.problem-block {
  margin-top: auto;
  margin-bottom: auto;
  padding: 18px 0;
  border-top: 1px dashed var(--muted);
  border-bottom: 1px dashed var(--muted);
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 24px 0;
  align-items: center;
}

.temple-process-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.58fr);
  gap: 24px;
  align-items: start;
}

.temple-associations .process-heading {
  margin-top: 0;
  margin-bottom: 10px;
}

.temple-process-copy {
  display: grid;
  gap: 22px;
}

.temple-process-copy .project-copy {
  margin: 0;
}

.temple-association-grid {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 12px;
  height: 430px;
  min-height: 0;
  max-width: 390px;
}

.temple-association-grid .gallery-item {
  aspect-ratio: auto;
  height: 100%;
  min-height: 0;
}

.temple-association-grid .process-visual {
  min-height: 0;
  gap: 6px;
  grid-template-rows: minmax(0, 1fr) auto;
}

.temple-association-grid .process-image {
  height: 100%;
}

.temple-river-image {
  object-position: center center;
}

.temple-process-image {
  object-fit: cover;
  object-position: center top;
}

.process-heading {
  margin-top: 24px;
}

.process-divider-heading {
  margin-top: 46px;
  padding-top: 26px;
  border-top: 1px dashed var(--muted);
}

.process-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  height: 100%;
  min-width: 0;
  text-align: center;
}

.process-text {
  line-height: 1.55;
  font-size: 0.92rem;
}

.serp-symbol-grid {
  align-items: stretch;
}

.serp-symbol-card {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(255, 226, 189, 0.08), transparent 58%),
    rgba(0, 0, 0, 0.68);
}

.serp-symbol-image {
  width: auto;
  height: 76%;
  object-fit: contain;
}

.serp-process-card {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(255, 226, 189, 0.06), transparent 58%),
    rgba(0, 0, 0, 0.42);
}

.serp-process-image {
  object-fit: contain;
  padding: 10px;
}

.serp-process-card .serp-process-image {
  width: 100%;
  height: 100%;
  max-height: 100%;
}

.serp-process-card img[src$="serp-result.png"] {
  width: auto;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
}

.serp-develop-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.serp-develop-card {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1.2;
  min-height: 0;
  background:
    linear-gradient(135deg, rgba(255, 226, 189, 0.06), transparent 58%),
    rgba(0, 0, 0, 0.5);
}

.serp-develop-image {
  width: 100%;
  height: 100%;
  padding: 10px;
  object-fit: contain;
}

.bullet-list {
  margin: 0;
  padding-left: 18px;
  line-height: 1.9;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.gallery-item {
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 220px;
  padding: 0;
  border: 1px dashed var(--border);
  background: transparent;
  border-radius: 18px;
  overflow: hidden;
}

.square-placeholder {
  aspect-ratio: 1 / 1;
  min-height: 0;
}

.old-design-preview {
  height: 100%;
  min-height: 360px;
  background: transparent;
}

.old-design-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.process-item .gallery-item {
  min-height: 0;
  width: 100%;
  max-width: none;
}

.process-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.process-visuals-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.process-visual {
  margin: 0;
  display: grid;
  gap: 10px;
}

.process-visual-placeholder {
  aspect-ratio: 1 / 1.35;
  min-height: 0;
}

.process-visual-placeholder,
.process-preview,
.old-design-preview {
  border-radius: 18px;
}

.process-visual-caption {
  margin: 0;
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.5;
}

.process-preview {
  margin-top: 8px;
}

.final-preview-block {
  margin: 12px 0 0;
  width: 100%;
  aspect-ratio: auto;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.final-preview-placeholder {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  aspect-ratio: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}

.final-preview-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  object-fit: contain;
  object-position: center top;
}

.placeholder-note {
  display: inline-block;
  margin-top: 16px;
  padding: 8px 12px;
  border: 1px dashed var(--border);
  background: rgba(37, 37, 37, 0.46);
}

.placeholder-item {
  margin: 0;
}

.placeholder-box {
  display: grid;
  place-items: center;
  padding: 18px;
  min-height: 220px;
  background:
    linear-gradient(135deg, rgba(232, 232, 198, 0.08), transparent 54%),
    rgba(37, 37, 37, 0.34);
  text-align: center;
}

.project-footer {
  align-items: center;
  padding-top: 30px;
  justify-content: flex-start;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

@media (max-width: 980px) {
  .timeline-layout {
    grid-template-columns: 92px 1fr;
  }

  .timeline-center {
    grid-column: 1;
  }

  .timeline-center::before {
    left: 44px;
  }

  .timeline-cube {
    left: 15px;
    width: 58px;
    height: 58px;
  }

  .timeline-sticky {
    height: 100%;
  }

  .timeline-head,
  .timeline-toolbar,
  .info-strip,
  .project-nav,
  .project-footer {
    flex-direction: column;
  }

  .section-side-note {
    max-width: none;
    text-align: left;
  }

  .project-meta-grid,
  .overview-layout,
  .temple-process-layout,
  .process-grid,
  .process-visuals-grid,
  .serp-develop-grid {
    grid-template-columns: 1fr 1fr;
  }

}

@media (max-width: 700px) {
  .site-header,
  .timeline-page,
  .project-page {
    width: min(calc(100% - 24px), var(--max));
  }

  .project-page,
  .project-sections,
  .project-copy-block,
  .result-box,
  .overview-layout,
  .overview-copy,
  .temple-process-layout,
  .temple-process-copy {
    min-width: 0;
    max-width: 100%;
  }

  .header-bar {
    flex-direction: column;
    align-items: start;
    padding-bottom: 28px;
  }

  .intro-block {
    padding-bottom: 42px;
  }

  .timeline-layout {
    grid-template-columns: 56px 1fr;
    gap: 12px;
  }

  .project-hero-inner {
    width: min(calc(100% - 24px), var(--max));
    min-width: 0;
  }

  .project-hero-copy {
    min-width: 0;
    padding: 18px 14px 24px;
  }

  .project-hero h1 {
    max-width: 100%;
    font-size: clamp(2.2rem, 11vw, 3.8rem);
    line-height: 0.98;
    letter-spacing: 0;
    overflow-wrap: anywhere;
  }

  .project-title-spaced,
  .project-title-spaced span {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .serp-hero .project-title-spaced {
    text-shadow: 5px 5px 0 rgba(55, 18, 8, 0.72);
  }

  .project-intro,
  .project-copy,
  .result-copy,
  .problem-block,
  .project-section h2 {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .metro-hero,
  .serp-hero,
  .temple-hero {
    width: 100%;
    margin-left: 0;
  }

  .timeline-switcher {
    width: 100%;
  }

  .timeline-switch {
    width: 100%;
    justify-content: center;
  }

  .timeline-center::before {
    left: 28px;
  }

  .timeline-cube {
    left: 7px;
    width: 42px;
    height: 42px;
    box-shadow: 6px 6px 0 rgba(51, 72, 82, 0.24);
  }

  .timeline-sticky {
    height: 100%;
  }

  .timeline-center::before {
    top: 74px;
  }

  .timeline-row {
    min-height: 260px;
  }

  .contact-links,
  .gallery-grid,
  .illustration-card,
  .illustration-gallery,
  .project-meta-grid,
  .overview-layout,
  .temple-process-layout,
  .process-grid,
  .process-visuals-grid,
  .serp-develop-grid {
    grid-template-columns: 1fr;
  }

  .illustration-gallery {
    min-height: 0;
  }

  .illustration-thumb {
    min-height: 170px;
  }

  .lightbox {
    padding: 18px;
  }

  .lightbox-panel {
    max-height: calc(100vh - 36px);
  }

  .lightbox-close {
    top: 8px;
    right: 8px;
  }

  .problem-block {
    padding: 14px 0;
  }

  .project-card,
  .project-copy-block,
  .contact-strip,
  .info-strip {
    padding: 20px;
  }
}
