:root {
  color-scheme: dark;
  --bg: #090a0b;
  --panel: #111315;
  --line: rgba(255, 255, 255, 0.13);
  --text: #f5f1e8;
  --muted: #aaa7a0;
  --gold: #d9ad63;
  --blue: #5ed0e6;
  --blue-soft: rgba(94, 208, 230, 0.18);
  --shadow: rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 72% -12%, rgba(217, 173, 99, 0.14), transparent 34%),
    linear-gradient(180deg, #0e0f11, var(--bg) 45%, #0b0d10);
  color: var(--text);
  font-family: Inter, Segoe UI, Arial, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, transparent, black 18%, black 76%, transparent);
}

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

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

.nav-shell {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 72px;
  padding: 0 clamp(18px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
  background: rgba(9, 10, 11, 0.78);
  backdrop-filter: blur(20px);
}

.brand-mark {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 34px);
  color: var(--muted);
  font-size: 14px;
}

.main-nav a {
  transition: color 180ms ease;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: var(--gold);
}

.language-switch {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.language-switch:hover {
  color: var(--gold);
  border-color: rgba(217, 173, 99, 0.58);
  background: rgba(217, 173, 99, 0.08);
}

.section-block {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(36px, 7vw, 88px) 0;
}

.hero-panel {
  min-height: min(680px, calc(100vh - 104px));
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: end;
  padding: clamp(28px, 6vw, 72px);
  background: #111315;
  box-shadow: 0 32px 90px var(--shadow);
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(9, 10, 11, 0.08), rgba(9, 10, 11, 0.84));
  pointer-events: none;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: inherit;
  z-index: 3;
  pointer-events: none;
}

.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-copy {
  max-width: 720px;
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(54px, 11vw, 128px);
  line-height: 0.86;
  font-weight: 650;
  letter-spacing: 0;
}

h2 {
  font-size: clamp(28px, 5vw, 54px);
  line-height: 1;
  font-weight: 600;
}

.hero-copy p:last-child,
.project-copy p,
.about-text,
.spec-block p {
  color: #d8d4ca;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.6;
}

.hero-copy p:last-child {
  max-width: 620px;
  margin-top: 24px;
}

.filter-bar {
  position: sticky;
  top: 72px;
  z-index: 15;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 16px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(9, 10, 11, 0.88);
  backdrop-filter: blur(18px);
}

.filter-bar button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  padding: 9px 14px;
  font: inherit;
  cursor: pointer;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.filter-bar button:hover,
.filter-bar button.is-active {
  color: var(--text);
  border-color: rgba(217, 173, 99, 0.58);
  background: rgba(217, 173, 99, 0.1);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: minmax(92px, 8vw);
  gap: 14px;
}

.work-tile {
  min-height: 260px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--line);
  background: #111315;
  box-shadow: 0 24px 68px rgba(0, 0, 0, 0.2);
}

.work-tile[hidden] {
  display: none;
}

.tile-small {
  grid-column: span 3;
  grid-row: span 3;
}

.tile-medium {
  grid-column: span 4;
  grid-row: span 4;
}

.tile-large {
  grid-column: span 6;
  grid-row: span 5;
}

.tile-hero {
  grid-column: span 8;
  grid-row: span 6;
}

.work-tile a,
.tile-cover,
.tile-blueprint {
  position: absolute;
  inset: 0;
}

.tile-cover,
.tile-blueprint {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tile-cover {
  transition: transform 700ms ease;
}

.tile-blueprint {
  opacity: 0;
  clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
  transition: opacity 520ms ease, clip-path 620ms ease;
  will-change: opacity, clip-path;
  filter: saturate(1.15) contrast(1.06);
}

.work-tile.has-blueprint-timeline .tile-blueprint {
  transition: none;
}

.work-tile a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 32%, rgba(0, 0, 0, 0.76));
  transition: background 260ms ease, box-shadow 260ms ease;
}

.work-tile:hover .tile-cover {
  transform: scale(1.045);
}

.work-tile.is-blueprint-active .tile-blueprint {
  opacity: 0.82;
  clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
}

.work-tile:hover a::after {
  background: linear-gradient(180deg, rgba(94, 208, 230, 0.08), rgba(0, 0, 0, 0.78));
  box-shadow: inset 0 0 0 1px rgba(94, 208, 230, 0.44);
}

.tile-meta {
  position: absolute;
  left: clamp(16px, 3vw, 28px);
  right: clamp(16px, 3vw, 28px);
  bottom: clamp(16px, 3vw, 28px);
  z-index: 2;
  display: grid;
  gap: 8px;
}

.tile-meta strong {
  font-size: clamp(22px, 3vw, 44px);
  line-height: 1;
}

.tile-meta small,
.tile-category {
  color: var(--muted);
  line-height: 1.45;
}

.tile-category {
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.details-button {
  position: absolute;
  right: clamp(16px, 3vw, 28px);
  bottom: clamp(16px, 3vw, 28px);
  z-index: 3;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  padding: 10px 14px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.work-tile:hover .details-button {
  opacity: 1;
  transform: translateY(0);
}

.section-heading {
  margin-bottom: 26px;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

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

.about-images img,
.media-grid img,
.hero-render img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #111315;
}

.about-images img {
  aspect-ratio: 4 / 5;
}

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

.contact-grid a,
.contact-grid span,
.tool-list span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 16px;
  color: #ddd7cc;
}

.project-page {
  background:
    linear-gradient(rgba(94, 208, 230, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 208, 230, 0.052) 1px, transparent 1px),
    radial-gradient(circle at 70% 10%, rgba(94, 208, 230, 0.14), transparent 30%),
    #081018;
  background-size: 54px 54px, 54px 54px, auto, auto;
}

.blueprint-main {
  width: min(1360px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(34px, 7vw, 82px) 0 92px;
}

.project-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(24px, 5vw, 68px);
  align-items: center;
  min-height: calc(100vh - 128px);
}

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

.project-copy h1 {
  font-size: clamp(42px, 7vw, 92px);
  line-height: 0.95;
}

.tool-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tool-list span {
  border-color: rgba(94, 208, 230, 0.28);
  color: #d7f7ff;
  padding: 9px 12px;
}

.hero-render {
  display: block;
  min-height: 520px;
}

.hero-render img {
  aspect-ratio: 16 / 11;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.34);
}

.project-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0 72px;
}

.spec-block {
  border: 1px solid rgba(94, 208, 230, 0.22);
  border-radius: 8px;
  background: rgba(8, 16, 24, 0.72);
  padding: clamp(20px, 4vw, 36px);
}

.spec-block h2 {
  font-size: clamp(24px, 4vw, 38px);
  margin-bottom: 18px;
}

.media-section {
  margin-top: 72px;
}

.media-grid img {
  aspect-ratio: 4 / 3;
}

.process-grid img {
  border-color: rgba(94, 208, 230, 0.26);
}

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

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

.language-router {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.language-router main {
  display: grid;
  justify-items: center;
  gap: 24px;
}

.language-router strong {
  font-size: clamp(56px, 12vw, 120px);
}

.language-router nav {
  display: flex;
  gap: 10px;
}

.language-router a {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 14px;
}

@media (max-width: 980px) {
  .work-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-rows: 112px;
  }

  .tile-small,
  .tile-medium {
    grid-column: span 3;
    grid-row: span 3;
  }

  .tile-large,
  .tile-hero {
    grid-column: span 6;
    grid-row: span 4;
  }

  .about-layout,
  .project-hero,
  .project-specs {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 640px) {
  .nav-shell {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .language-switch {
    position: absolute;
    top: 12px;
    right: 16px;
  }

  .main-nav {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .hero-panel {
    min-height: 560px;
    padding: 24px;
  }

  .filter-bar {
    top: 96px;
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-right: -16px;
    margin-left: -16px;
    padding-right: 16px;
    padding-left: 16px;
    scrollbar-width: none;
  }

  .filter-bar::-webkit-scrollbar {
    display: none;
  }

  .filter-bar button {
    flex: 0 0 auto;
  }

  .work-grid,
  .about-images,
  .media-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .work-grid {
    grid-auto-rows: auto;
  }

  .tile-small,
  .tile-medium,
  .tile-large,
  .tile-hero {
    grid-column: span 1;
    grid-row: span 1;
    aspect-ratio: 1 / 1.18;
  }

  .details-button {
    opacity: 1;
    transform: none;
  }

  .tile-meta {
    padding-right: 88px;
  }

  .tile-meta small {
    display: none;
  }

  .hero-render {
    min-height: 0;
  }
}
