﻿:root {
  --bg: #f5f1e8;
  --surface: #fffdf8;
  --surface-2: #ebe4d6;
  --ink: #171717;
  --muted: #6b665d;
  --line: #ddd3c3;
  --accent: #0b7567;
  --accent-2: #ff7a1a;
  --accent-3: #263f71;
  --shadow: 0 28px 80px rgba(29, 26, 21, 0.14);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, Arial, sans-serif;
  line-height: 1.5;
  background:
    linear-gradient(90deg, rgba(23, 23, 23, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(23, 23, 23, 0.03) 1px, transparent 1px),
    radial-gradient(circle at 72% 8%, rgba(11, 117, 103, 0.13), transparent 30%),
    var(--bg);
  background-size: 42px 42px, 42px 42px, auto, auto;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(245, 241, 232, 0.2), rgba(245, 241, 232, 0.96) 72%);
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

img {
  max-width: 100%;
}

.site-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 16px 0 24px;
  padding: 10px;
  border: 1px solid rgba(23, 23, 23, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.86);
  box-shadow: 0 12px 34px rgba(29, 26, 21, 0.08);
  backdrop-filter: blur(18px);
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.topbar.is-scrolled {
  box-shadow: 0 16px 44px rgba(29, 26, 21, 0.15);
  transform: translateY(-2px);
}

.brand,
.nav-links,
.top-action,
.button,
.filter {
  min-height: 40px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand {
  gap: 10px;
  padding: 0 12px 0 4px;
  font-weight: 900;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  overflow: hidden;
  background: transparent;
}

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

.nav-links {
  gap: 4px;
}

.nav-links a,
.top-action {
  padding: 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 750;
}

.nav-links a:hover,
.top-action:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.top-action {
  border: 1px solid rgba(11, 117, 103, 0.18);
  background: #dff3ed;
  color: #075e55;
}

.hero-section {
  min-height: calc(100vh - 104px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(350px, 0.95fr);
  align-items: center;
  gap: 54px;
  padding: 30px 0 68px;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 860px;
  margin-bottom: 22px;
  font-size: clamp(3rem, 7.1vw, 6.4rem);
  line-height: 0.93;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4.4vw, 4.1rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.08rem;
  line-height: 1.2;
}

.hero-text {
  max-width: 710px;
  color: var(--muted);
  font-size: 1.12rem;
  text-align: justify;
  text-wrap: pretty;
}

.hero-note {
  max-width: 640px;
  margin: 18px 0 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  text-wrap: pretty;
}

.hero-summary {
  width: fit-content;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 0;
}

.hero-summary span {
  padding: 8px 12px;
  border: 1px solid rgba(11, 117, 103, 0.18);
  border-radius: 999px;
  background: rgba(223, 243, 237, 0.72);
  color: #075e55;
  font-size: 0.82rem;
  font-weight: 900;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.button {
  gap: 8px;
  padding: 0 16px;
  border: 1px solid var(--line);
  font-weight: 850;
}

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

.button.secondary {
  background: rgba(255, 253, 248, 0.72);
}

.profile-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 30px;
}

.profile-strip span,
.tech-list li,
.skill-tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 253, 248, 0.72);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.hero-panel {
  min-height: 580px;
  display: grid;
  place-items: center;
  overflow: visible;
}

.portfolio-stack {
  position: relative;
  width: min(100%, 560px);
  min-height: 560px;
  margin: 0;
  isolation: isolate;
  touch-action: none;
}

.portfolio-stack::before {
  content: "";
  position: absolute;
  inset: 14% 4% 8% 6%;
  z-index: -1;
  border-radius: 50%;
  background: rgba(23, 23, 23, 0.08);
  filter: blur(28px);
  transform: rotate(-8deg);
}

.stack-card {
  position: absolute;
  top: 62px;
  left: 50%;
  width: 46%;
  max-width: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  cursor: grab;
  user-select: none;
  will-change: transform;
  transition: filter 160ms ease, box-shadow 160ms ease;
}

.stack-card.is-primary {
  z-index: 5;
  width: 73%;
}

.stack-card:nth-child(2) {
  z-index: 3;
}

.stack-card:nth-child(3) {
  z-index: 2;
}

.stack-card:nth-child(4) {
  z-index: 1;
}

.stack-card:nth-child(5) {
  z-index: 4;
}

.stack-card:hover,
.stack-card.is-dragging {
  filter: saturate(1.04) contrast(1.04);
  box-shadow: 0 34px 90px rgba(29, 26, 21, 0.22);
}

.stack-card.is-dragging {
  cursor: grabbing;
  z-index: 12;
}

.section {
  padding: 78px 0;
}

.intro-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.intro-band p {
  max-width: 1040px;
  margin-bottom: 0;
  font-size: clamp(1.35rem, 3vw, 2.45rem);
  line-height: 1.16;
  font-weight: 800;
  text-align: justify;
  text-wrap: balance;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.section-note {
  max-width: 410px;
  margin: 0;
  color: var(--muted);
  font-weight: 650;
  text-wrap: pretty;
}

.case-list {
  display: grid;
  gap: 18px;
}

.case-card {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.78);
  box-shadow: 0 18px 54px rgba(29, 26, 21, 0.08);
}

.case-card.reverse .case-media {
  order: 2;
}

.case-media {
  min-height: 460px;
  display: block;
  overflow: hidden;
  background: #e8e0d1;
}

.case-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top center;
  filter: saturate(0.95) contrast(1.03);
  transition: transform 240ms ease, filter 240ms ease;
}

.case-media.cabin-render img {
  object-position: center;
}

.case-card:hover .case-media img,
.project-card:hover .project-preview img {
  transform: scale(1.035);
  filter: saturate(1.04) contrast(1.04);
}

.project-card:hover .project-preview .favrholm-preview-image {
  transform: scale(1.2);
}

.case-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 4vw, 54px);
}

.case-content h3 {
  max-width: 720px;
  font-size: clamp(1.7rem, 3.1vw, 3rem);
}

.case-content p {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.02rem;
  text-align: justify;
  text-wrap: pretty;
}

.card-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.project-facts {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.project-facts div {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.project-facts dt {
  color: var(--accent-2);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.project-facts dd {
  margin: 0;
  color: var(--ink);
  font-weight: 650;
}

.text-link {
  width: fit-content;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  margin-top: 18px;
  border-bottom: 2px solid var(--ink);
  color: var(--ink);
  font-weight: 900;
}

.project-content .text-link {
  margin-top: 16px;
}

.filter-bar {
  display: flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(255, 122, 26, 0.42);
  border-radius: var(--radius);
  background: rgba(255, 122, 26, 0.1);
}

.filter {
  border: 0;
  padding: 0 14px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 850;
}

.filter.is-active {
  color: #fff;
  background: var(--accent-2);
  box-shadow: 0 8px 22px rgba(255, 122, 26, 0.26);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.project-card,
.impact-card,
.timeline article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.76);
}

.project-card {
  display: flex;
  flex-direction: column;
  min-height: 430px;
  overflow: hidden;
  box-shadow: 0 12px 34px rgba(29, 26, 21, 0.06);
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 60px rgba(29, 26, 21, 0.12);
}

.project-card.is-hidden {
  display: none;
}

.project-preview {
  min-height: 300px;
  display: block;
  overflow: hidden;
  background: #e8e0d1;
}

.project-preview img {
  width: 100%;
  height: 100%;
  min-height: 300px;
  display: block;
  object-fit: cover;
  object-position: top center;
  filter: saturate(0.95) contrast(1.03);
  transition: transform 220ms ease, filter 220ms ease;
}

.favrholm-preview-image {
  object-position: center 38%;
  transform: scale(1.16);
}

.project-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.project-content p,
.impact-card p,
.timeline p,
.contact-section p {
  color: var(--muted);
}

.project-content p,
.timeline p,
.contact-section p {
  text-align: justify;
  text-wrap: pretty;
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: auto 0 0;
  padding: 0;
  list-style: none;
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.impact-card {
  min-height: 260px;
  padding: 22px;
  display: flex;
  flex-direction: column;
}

.impact-card span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: auto;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
}

.impact-card h3 {
  margin-top: 38px;
  font-size: 1.25rem;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline article {
  display: grid;
  grid-template-columns: 120px minmax(220px, 0.95fr) minmax(0, 1.35fr);
  gap: 20px;
  padding: 20px;
  align-items: start;
}

.timeline span {
  color: var(--accent-2);
  font-weight: 900;
}

.timeline-title {
  display: grid;
  gap: 8px;
}

.timeline-meta {
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.timeline h3,
.timeline p {
  margin-bottom: 0;
}

.contact-section {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
  margin-bottom: 42px;
  padding-top: 88px;
  padding-bottom: 88px;
  border-top: 1px solid var(--line);
}

.contact-section h2 {
  max-width: 820px;
}

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

.project-hero {
  min-height: calc(100vh - 122px);
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(340px, 0.72fr);
  gap: 46px;
  align-items: center;
  padding: 36px 0 70px;
}

.project-hero h1 {
  max-width: 760px;
  margin-bottom: 18px;
}

.project-hero-preview {
  width: min(100%, 480px);
  justify-self: end;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  object-fit: cover;
  box-shadow: var(--shadow);
}

.project-hero-figure {
  width: min(100%, 480px);
  justify-self: end;
  margin: 0;
  cursor: zoom-in;
  transition: transform 320ms cubic-bezier(0.22, 1.2, 0.36, 1);
}

.project-hero-figure img {
  width: 100%;
  transition: transform 320ms cubic-bezier(0.22, 1.08, 0.36, 1), filter 220ms ease;
}

.project-hero-figure:hover {
  transform: translateY(-6px) scale(1.01);
}

.project-hero-figure:hover img {
  transform: scale(1.015);
  filter: saturate(1.02) contrast(1.02);
}

.project-hero-figure figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 650;
  text-align: justify;
}

.project-hero-figure-wide {
  width: min(100%, 640px);
}

.project-hero-figure-round {
  width: min(100%, 540px);
}

.project-hero-figure-round img {
  aspect-ratio: 1 / 1;
  object-fit: contain;
  clip-path: circle(49.15% at 50% 50%);
}

.floating-board {
  position: relative;
  justify-self: end;
  width: min(100%, 680px);
  min-height: 680px;
  overflow: visible;
  touch-action: none;
}

.floating-board::before {
  content: "";
  position: absolute;
  inset: 18% 6% 2%;
  border-radius: 50%;
  background: rgba(23, 23, 23, 0.08);
  filter: blur(28px);
}

.floating-piece {
  position: absolute;
  top: 46px;
  left: 50%;
  z-index: 1;
  --hover-scale: 1;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 22px 58px rgba(29, 26, 21, 0.15);
  cursor: grab;
  user-select: none;
  will-change: transform;
  transition: box-shadow 180ms ease, filter 180ms ease;
}

.floating-piece.large {
  width: 76%;
}

.floating-piece.technical {
  width: 60%;
}

.floating-piece.material {
  width: 48%;
}

.floating-piece.frame {
  width: 44%;
}

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

.floating-piece:hover,
.floating-piece.is-dragging {
  z-index: 12;
  filter: saturate(1.05) contrast(1.04);
  box-shadow: 0 34px 86px rgba(29, 26, 21, 0.24);
}

.floating-piece:hover {
  --hover-scale: 1.12;
}

.floating-piece.is-dragging {
  cursor: grabbing;
  --hover-scale: 1;
}

.back-link {
  width: fit-content;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  margin-bottom: 22px;
  border-bottom: 2px solid var(--ink);
  color: var(--ink);
  font-weight: 850;
}

.scroll-cue {
  width: fit-content;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 850;
}

.scroll-cue::after {
  content: "↓";
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent-2);
  animation: cue-bounce 1.4s ease-in-out infinite;
}

@keyframes cue-bounce {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(5px);
  }
}

.project-detail-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.45fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.project-sidebar,
.project-body,
.project-next {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.78);
}

.project-sidebar {
  position: sticky;
  top: 92px;
  padding: 22px;
}

.project-sidebar dl {
  display: grid;
  gap: 18px;
  margin: 0;
}

.project-sidebar dt {
  margin-bottom: 4px;
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.project-sidebar dd {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
}

.project-location-link {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 650;
  text-decoration: none;
  border-bottom: 1px solid rgba(23, 23, 23, 0.2);
  transition: color 180ms ease, border-color 180ms ease;
}

.project-location-link:hover {
  color: var(--ink);
  border-color: rgba(23, 23, 23, 0.45);
}

.project-body {
  padding: clamp(24px, 5vw, 64px);
}

.project-body h2 {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 2.7vw, 2.45rem);
}

.project-body p {
  max-width: 820px;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: 1.06rem;
  text-align: justify;
  text-wrap: pretty;
}

.project-body p:last-child {
  margin-bottom: 0;
}

.diagram-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 8px 0 34px;
}

.diagram-card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: 0 12px 34px rgba(29, 26, 21, 0.08);
  will-change: transform, box-shadow;
  transition: transform 320ms cubic-bezier(0.22, 1.2, 0.36, 1), box-shadow 240ms ease, border-color 240ms ease;
}

.diagram-card:hover {
  transform: translateY(-8px) scale(1.012);
  border-color: rgba(23, 23, 23, 0.18);
  box-shadow: 0 24px 56px rgba(29, 26, 21, 0.14);
}

.diagram-card.wide {
  grid-column: 1 / -1;
}

.masterplan-media {
  position: relative;
}

.masterplan-hint {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(23, 23, 23, 0.08);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: 0 12px 28px rgba(29, 26, 21, 0.1);
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 800;
}

.masterplan-hint-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(255, 122, 26, 0.16);
}

.diagram-card img {
  width: 100%;
  display: block;
  background: #f2efe7;
  cursor: zoom-in;
  transition: transform 320ms cubic-bezier(0.22, 1.08, 0.36, 1), filter 220ms ease;
}

.diagram-card:hover img {
  transform: scale(1.02);
  filter: saturate(1.02) contrast(1.02);
}

.diagram-card.monochrome img {
  filter: grayscale(1) contrast(1.08) brightness(1.02);
}

.diagram-card.monochrome:hover img {
  filter: grayscale(1) contrast(1.12) brightness(1.03);
}

.diagram-card figcaption {
  padding: 12px 14px 14px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
  text-align: justify;
}

.plan-hotspot {
  position: absolute;
  top: var(--y);
  left: var(--x);
  z-index: 3;
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--accent-2);
  box-shadow: 0 0 0 6px rgba(255, 122, 26, 0.2);
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.plan-hotspot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: inherit;
}

.plan-hotspot-ring {
  position: absolute;
  inset: -9px;
  border: 1px solid rgba(255, 122, 26, 0.68);
  border-radius: 999px;
  animation: hotspot-pulse 1.8s ease-out infinite;
}

.plan-hotspot-preview {
  position: absolute;
  left: 24px;
  bottom: 14px;
  width: 220px;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(23, 23, 23, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.96);
  box-shadow: 0 20px 48px rgba(29, 26, 21, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.98);
  transition: opacity 180ms ease, transform 180ms ease;
}

.plan-hotspot-preview img {
  width: 100%;
  display: block;
  border-radius: 6px;
  background: #f2efe7;
}

.plan-hotspot-preview span {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.3;
  text-align: left;
}

.plan-hotspot.is-wide-preview .plan-hotspot-preview {
  width: 280px;
}

.masterplan-card:hover .plan-hotspot,
.plan-hotspot:hover,
.plan-hotspot:focus-visible {
  transform: translate(-50%, -50%) scale(1.08);
}

.plan-hotspot:hover .plan-hotspot-preview,
.plan-hotspot:focus-visible .plan-hotspot-preview {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@keyframes hotspot-pulse {
  0% {
    opacity: 0.7;
    transform: scale(0.72);
  }

  80% {
    opacity: 0;
    transform: scale(1.55);
  }

  100% {
    opacity: 0;
    transform: scale(1.55);
  }
}

.media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(12, 12, 12, 0.72);
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.media-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.media-lightbox-dialog {
  position: relative;
  width: min(1120px, 100%);
  max-height: calc(100vh - 56px);
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.96);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
  transform: translateY(12px) scale(0.985);
  transition: transform 220ms cubic-bezier(0.22, 1.08, 0.36, 1);
}

.media-lightbox.is-open .media-lightbox-dialog {
  transform: translateY(0) scale(1);
}

.media-lightbox-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-right: 52px;
}

.media-lightbox-tool {
  min-width: 38px;
  height: 38px;
  border: 1px solid rgba(23, 23, 23, 0.1);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.94);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  font-weight: 900;
}

.media-lightbox-tool:hover {
  background: #fff;
}

.media-lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(23, 23, 23, 0.1);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.92);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 1.1rem;
  font-weight: 900;
}

.media-lightbox-close:hover {
  background: #fff;
}

.media-lightbox-viewport {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) - 2px);
  background: #f3efe5;
}

.media-lightbox img {
  width: 100%;
  max-height: calc(100vh - 196px);
  display: block;
  object-fit: contain;
  transform-origin: center center;
  transition: transform 180ms ease;
  cursor: zoom-in;
  user-select: none;
}

.media-lightbox.is-zoomed img {
  cursor: grab;
}

.media-lightbox.is-panning img {
  cursor: grabbing;
}

.media-lightbox-caption {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 650;
  text-align: justify;
}

.project-next {
  margin-top: 18px;
  overflow: hidden;
}

.project-next a {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px;
  font-size: 1.12rem;
  font-weight: 900;
}

.project-next a::after {
  content: "→";
  font-size: 1.4rem;
}

.site-observations {
  margin-top: 18px;
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.78);
}

.site-observations-header {
  margin-bottom: 18px;
}

.site-observations-header h2 {
  margin-top: 2px;
  font-size: clamp(1.5rem, 2.7vw, 2.45rem);
}

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

.site-gallery-card {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.9);
  box-shadow: 0 12px 34px rgba(29, 26, 21, 0.08);
  transition: transform 260ms cubic-bezier(0.22, 1.08, 0.36, 1), box-shadow 220ms ease;
}

.site-gallery-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 54px rgba(29, 26, 21, 0.14);
}

.site-gallery-card img {
  width: 100%;
  height: 100%;
  display: block;
  cursor: zoom-in;
  object-fit: cover;
}

.site-gallery-video {
  grid-column: 1 / -1;
}

.site-gallery-video video {
  width: 100%;
  display: block;
  background: #111;
}

.illustration-section {
  margin-top: 42px;
}

.illustration-section-header {
  margin-bottom: 18px;
}

.illustration-section-header h2 {
  margin-top: 2px;
  font-size: clamp(1.5rem, 2.7vw, 2.45rem);
}

.illustration-showcase {
  display: grid;
  grid-template-columns: minmax(240px, 0.62fr) minmax(0, 1.08fr) minmax(220px, 0.56fr);
  gap: 14px;
  align-items: start;
}

.illustration-card {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.9);
  box-shadow: 0 12px 34px rgba(29, 26, 21, 0.08);
  transition: transform 260ms cubic-bezier(0.22, 1.08, 0.36, 1), box-shadow 220ms ease;
}

.illustration-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 54px rgba(29, 26, 21, 0.14);
}

.illustration-card img {
  width: 100%;
  display: block;
  cursor: zoom-in;
}

.illustration-card figcaption {
  padding: 12px 14px 14px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
  text-align: justify;
}

.illustration-card-shower-inline {
  align-self: start;
}

.illustration-card-shower-inline img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  object-position: center;
}

.illustration-card-large img {
  min-height: 520px;
  object-fit: cover;
  object-position: center;
}

.illustration-card-accent {
  align-self: end;
  background: linear-gradient(180deg, rgba(255, 122, 26, 0.12), rgba(255, 253, 248, 0.96));
}

.illustration-card-accent img {
  width: min(100%, 440px);
  margin: 22px auto 0;
  object-fit: contain;
}

.editorial-section {
  margin-top: 28px;
}

.editorial-showcase {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.editorial-card-main img {
  width: 100%;
  min-height: 0;
  object-fit: contain;
  object-position: center top;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 520ms ease, transform 520ms ease;
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .case-media img,
  .project-preview img,
  .project-card,
  .topbar,
  .diagram-card,
  .diagram-card img,
  .media-lightbox,
  .media-lightbox-dialog {
    transition: none;
  }
}

@media (max-width: 980px) {
  .topbar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }

  .hero-section,
  .case-card,
  .project-hero,
  .project-detail-grid,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .hero-section {
    min-height: auto;
    gap: 34px;
  }

  .hero-panel {
    min-height: 500px;
  }

  .case-card.reverse .case-media {
    order: 0;
  }

  .case-media {
    min-height: 420px;
  }

  .project-hero {
    min-height: auto;
  }

  .project-hero-preview,
  .project-hero-figure {
    justify-self: start;
    width: min(100%, 430px);
  }

  .floating-board {
    justify-self: start;
    width: 100%;
    min-height: 620px;
  }

  .project-sidebar {
    position: static;
  }

  .project-grid,
  .impact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .timeline article {
    grid-template-columns: 90px 1fr;
  }

  .timeline-title,
  .timeline p {
    grid-column: 2;
  }
}

@media (max-width: 640px) {
  .site-shell {
    width: min(100% - 20px, 1200px);
  }

  .topbar {
    top: 8px;
    margin-top: 8px;
    gap: 12px;
    padding: 8px;
  }

  .brand {
    width: 100%;
    justify-content: flex-start;
    padding: 0 8px 0 2px;
    font-size: 0.98rem;
  }

  .nav-links {
    gap: 6px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .nav-links a {
    min-height: 34px;
    padding: 0 6px;
    font-size: 0.72rem;
    line-height: 1.1;
    text-align: center;
  }

  .top-action {
    width: 100%;
    min-height: 38px;
    padding: 0 10px;
    font-size: 0.82rem;
  }

  h1 {
    font-size: clamp(2.65rem, 14vw, 4.3rem);
    line-height: 0.95;
  }

  .hero-section {
    gap: 24px;
    padding-top: 6px;
  }

  .hero-text,
  .hero-note {
    font-size: 1rem;
  }

  .hero-summary {
    gap: 8px;
  }

  .hero-panel {
    min-height: 350px;
  }

  .portfolio-stack {
    min-height: 360px;
  }

  .stack-card {
    top: 34px;
    width: 42%;
  }

  .stack-card.is-primary {
    width: 70%;
  }

  .section {
    padding: 58px 0;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-bar {
    width: 100%;
    overflow-x: auto;
  }

  .contact-section {
    padding-top: 58px;
    padding-bottom: 58px;
  }

  .case-media {
    min-height: 330px;
  }

  .case-content {
    padding: 22px;
  }

  .project-hero {
    padding: 28px 0 52px;
  }

  .project-hero-preview,
  .project-hero-figure {
    width: 100%;
  }

  .floating-board {
    min-height: 520px;
  }

  .floating-piece.large {
    width: 80%;
  }

  .floating-piece.technical {
    width: 64%;
  }

  .floating-piece.material {
    width: 54%;
  }

  .floating-piece.frame {
    width: 50%;
  }

  .project-facts div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .project-body {
    padding: 22px;
  }

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

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

  .illustration-showcase {
    grid-template-columns: 1fr;
  }

  .editorial-showcase {
    grid-template-columns: 1fr;
  }

  .illustration-card-shower-inline img,
  .illustration-card-large img {
    min-height: 0;
    height: auto;
    max-height: none;
  }

  .media-lightbox {
    padding: 12px;
  }

  .media-lightbox-dialog {
    padding: 12px;
  }

  .plan-hotspot-preview {
    left: 50%;
    bottom: 26px;
    width: min(220px, calc(100vw - 64px));
    transform: translate(-50%, 8px) scale(0.98);
  }

  .masterplan-hint {
    left: 10px;
    right: 10px;
    bottom: 10px;
    justify-content: center;
    border-radius: var(--radius);
    text-align: center;
  }

  .plan-hotspot:hover .plan-hotspot-preview,
  .plan-hotspot:focus-visible .plan-hotspot-preview {
    transform: translate(-50%, 0) scale(1);
  }

  .hero-text,
  .intro-band p,
  .case-content p,
  .project-content p,
  .timeline p,
  .contact-section p,
  .project-body p {
    text-align: left;
  }

  .project-grid,
  .impact-grid {
    grid-template-columns: 1fr;
  }

  .timeline article {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .timeline-title,
  .timeline p {
    grid-column: auto;
  }

  .timeline-meta {
    font-size: 0.78rem;
  }
}
