:root {
  --bg: #030303;
  --bg-soft: #101010;
  --text: #fcfcfc;
  --muted: #cecece;
  --line: rgba(255, 255, 255, 0.28);
  --panel: rgba(0, 0, 0, 0.62);
  --accent: #ffffff;
  --accent-contrast: #090909;
  --header-h: 74px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, #272727 0%, transparent 33%),
    radial-gradient(circle at 86% 75%, #161616 0%, transparent 36%),
    linear-gradient(180deg, #020202 0%, #0a0a0a 55%, #010101 100%);
  font-family: "Manrope", sans-serif;
  scroll-behavior: smooth;
  transition: background 350ms ease, color 300ms ease;
}

#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem clamp(1rem, 3vw, 2.7rem);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.24), rgba(0, 0, 0, 0.01));
}

.theme-toggle {
  width: auto;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  padding: 0.52rem 0.72rem;
  letter-spacing: 0.08rem;
  font-size: 0.64rem;
  text-transform: uppercase;
  font-weight: 700;
}

.theme-toggle:hover {
  background: #fff;
  color: #111;
}

.brand {
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.34rem;
  font-family: "Archivo Black", sans-serif;
  font-size: 1rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.95);
}

nav {
  display: flex;
  gap: clamp(0.7rem, 2vw, 1.5rem);
}

nav a {
  color: #f0f0f0;
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.14rem;
  text-transform: uppercase;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95);
}

nav a:hover {
  color: #fff;
}

main {
  position: relative;
  z-index: 1;
}

main::before {
  content: "";
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 22% 18%, rgba(0, 0, 0, 0.56), transparent 42%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.46), rgba(0, 0, 0, 0.38));
}

.panel {
  min-height: 100svh;
  padding: clamp(6.5rem, 10vh, 8.2rem) clamp(1rem, 6vw, 8rem) clamp(3rem, 8vh, 5rem);
  display: grid;
  align-content: center;
  gap: 1.35rem;
  max-width: 1120px;
  margin-inline: auto;
  opacity: 0.32;
  transform: translateY(36px);
  transition: opacity 420ms ease, transform 420ms ease;
  position: relative;
}

.panel.in-view {
  opacity: 1;
  transform: translateY(0);
}

.panel::before {
  display: none;
}

.hero {
  padding-top: clamp(8rem, 17vh, 11rem);
}

.eyebrow {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.28rem;
  text-transform: uppercase;
  color: #e2e2e2;
  font-weight: 700;
}

h1,
h2 {
  margin: 0;
  line-height: 0.88;
  text-transform: uppercase;
  letter-spacing: 0.035em;
}

h1 {
  font-family: "Archivo Black", sans-serif;
  font-size: clamp(2.3rem, 9.5vw, 8.3rem);
  max-width: 10ch;
  text-wrap: balance;
  text-shadow:
    0 6px 26px rgba(0, 0, 0, 0.92),
    0 0 28px rgba(0, 0, 0, 0.52);
  -webkit-text-stroke: 1px rgba(0, 0, 0, 0.4);
}

h2 {
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 6.6vw, 5rem);
  max-width: 13ch;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.86);
}

p {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
  line-height: 1.7;
  font-size: 1.03rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.88);
}

.credit {
  font-size: 0.76rem;
  letter-spacing: 0.08rem;
  color: #b8b8b8;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.stats,
.project-grid,
.quotes,
.model-grid {
  display: grid;
  gap: 0.9rem;
}

.stats {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.stats article,
.project-grid article,
.quotes blockquote,
.contact-form,
.model-card {
  border: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.stats article {
  padding: 1rem;
}

.stats span {
  display: block;
  font-size: 2.5rem;
  font-family: "Archivo Black", sans-serif;
  color: #fff;
  margin-bottom: 0.2rem;
}

.project-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.project-grid article {
  padding: 1.1rem;
}

.project-grid h3 {
  margin: 0 0 0.5rem;
  font-family: "Playfair Display", serif;
  font-size: 1.75rem;
  color: #fff;
}

.model-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: stretch;
  grid-auto-rows: 1fr;
}

.model-card {
  padding: 1rem;
  display: grid;
  gap: 0.7rem;
  grid-template-rows: auto auto auto auto;
  height: 100%;
}

.model-card h3 {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: 1.65rem;
  color: #fff;
}

.model-card > p {
  min-height: 3.6rem;
}

.embed-wrap {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.24);
  min-height: 260px;
}

.embed-wrap iframe {
  display: block;
  width: 100%;
  height: 300px;
  border: 0;
  background: #090909;
  pointer-events: none;
}

.open-model {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  width: 100%;
  border: 0;
  background: linear-gradient(180deg, transparent 62%, rgba(0, 0, 0, 0.62) 100%);
  color: #fff;
  padding: 0.62rem;
  letter-spacing: 0.08rem;
  font-size: 0.62rem;
  font-weight: 700;
}

.open-model:hover {
  background: linear-gradient(180deg, transparent 54%, rgba(255, 255, 255, 0.2) 100%);
  color: #fff;
}

.floor-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-height: 2.2rem;
}

.floor-links a {
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.07rem;
  font-size: 0.67rem;
  font-weight: 700;
  padding: 0.45rem 0.55rem;
}

.floor-links a:hover {
  background: #fff;
  color: #080808;
}

.model-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
}

.model-modal.is-open {
  display: block;
}

.model-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
}

.model-modal__dialog {
  position: absolute;
  inset: 3.5vh 2vw;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: #000;
}

.model-modal__close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: auto;
  z-index: 2;
  padding: 0.55rem 0.68rem;
  font-size: 0.66rem;
  letter-spacing: 0.09rem;
}

.model-modal__dialog iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

body.light-theme {
  --text: #18140f;
  --muted: #4a3d2d;
  --line: rgba(176, 137, 68, 0.45);
  --panel: rgba(255, 248, 236, 0.83);
  --accent: #b78b34;
  --accent-contrast: #fffaf0;
  background:
    radial-gradient(circle at 14% 12%, #fff4d9 0%, transparent 32%),
    radial-gradient(circle at 86% 78%, #f5e6c1 0%, transparent 36%),
    linear-gradient(180deg, #fffdf8 0%, #f9f1de 54%, #fffaf0 100%);
}

body.light-theme #bg-canvas {
  opacity: 0.94;
  filter: sepia(0.18) saturate(1.05) contrast(1.08) brightness(0.96);
}

body.light-theme .site-header {
  border-bottom: 1px solid rgba(176, 137, 68, 0.22);
  background: rgba(20, 14, 6, 0.06) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.light-theme .brand,
body.light-theme nav a,
body.light-theme h1,
body.light-theme h2,
body.light-theme .project-grid h3,
body.light-theme .model-card h3 {
  color: #221a10;
  text-shadow: 0 2px 10px rgba(255, 245, 220, 0.6);
}

body.light-theme .eyebrow {
  color: #9d7a3a;
}

body.light-theme p,
body.light-theme .credit,
body.light-theme .quotes cite {
  color: #4b3e2f;
}

body.light-theme main::before {
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 245, 220, 0.42), transparent 42%),
    linear-gradient(180deg, rgba(255, 252, 247, 0.45), rgba(255, 249, 238, 0.38));
}

body.light-theme .panel::before {
  display: none;
}

body.light-theme .quotes blockquote {
  border-left: 0;
}

body.light-theme .theme-toggle,
body.light-theme button,
body.light-theme .floor-links a,
body.light-theme .model-modal__close {
  border-color: #b78b34;
  background: #b78b34;
  color: #fff9ee;
}

body.light-theme .theme-toggle:hover,
body.light-theme button:hover,
body.light-theme .floor-links a:hover,
body.light-theme .model-modal__close:hover {
  background: #a27623;
  color: #fff9ee;
}

body.light-theme input,
body.light-theme textarea {
  border: 1px solid rgba(176, 137, 68, 0.5);
  background: #fff9ef;
  color: #1f160d;
}

body.light-theme .open-model {
  background: linear-gradient(180deg, transparent 60%, rgba(183, 139, 52, 0.54) 100%);
  color: #fff9ef;
}

.quotes {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.quotes blockquote {
  margin: 0;
  padding: 1.2rem;
  font-size: 1.08rem;
  line-height: 1.6;
  color: #ededed;
  border-left: 0;
}

.quotes cite {
  display: block;
  margin-top: 0.8rem;
  font-size: 0.88rem;
  color: #bcbcbc;
}

.contact-form {
  padding: 1rem;
  display: grid;
  gap: 0.8rem;
  max-width: 620px;
}

.contact-form label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.76rem;
  letter-spacing: 0.09rem;
  text-transform: uppercase;
  font-weight: 700;
  color: #ddd;
}

input,
textarea,
button {
  width: 100%;
  border-radius: 9px;
  font-family: inherit;
}

input,
textarea {
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: #070707;
  color: #fff;
  padding: 0.8rem 0.9rem;
}

button {
  border: 2px solid #fff;
  background: #fff;
  color: #090909;
  padding: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.16rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: transparent;
  color: #fff;
}

/* Keep all text readable in Light Luxe even after later base rules. */
body.light-theme .stats span,
body.light-theme .quotes blockquote,
body.light-theme .quotes cite,
body.light-theme .contact-form label,
body.light-theme .project-grid h3,
body.light-theme .model-card h3 {
  color: #241b11;
}

body.light-theme .quotes blockquote {
  border-left: 0;
}

body.light-theme .floor-links a,
body.light-theme .open-model {
  color: #fff8ee;
}

.stats span,
.project-grid h3,
.model-card h3,
.quotes blockquote,
.contact-form label,
.floor-links a {
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.9);
}

body.light-theme .stats span,
body.light-theme .project-grid h3,
body.light-theme .model-card h3,
body.light-theme .quotes blockquote,
body.light-theme .contact-form label,
body.light-theme .floor-links a {
  text-shadow: 0 2px 12px rgba(103, 70, 20, 0.25);
}

body.light-theme input,
body.light-theme textarea {
  color: #1f160d;
}

/* Final override: prevent header theme button from turning white. */
body.light-theme .site-header .theme-toggle {
  background: rgba(183, 139, 52, 0.18) !important;
  color: #6d4f1d !important;
  border: 1px solid rgba(176, 137, 68, 0.55) !important;
}

body.light-theme .site-header .theme-toggle:hover {
  background: rgba(183, 139, 52, 0.32) !important;
  color: #5d4317 !important;
}

/* Avoid global white button style leaking into header toggle in any theme. */
.site-header .theme-toggle {
  border-width: 1px;
  padding: 0.52rem 0.72rem;
}

@media (max-width: 680px) {
  nav {
    gap: 0.65rem;
  }

  nav a {
    font-size: 0.66rem;
    letter-spacing: 0.08rem;
  }

  .panel {
    padding-inline: 1rem;
  }

  h1 {
    font-size: clamp(2.05rem, 12vw, 4.8rem);
  }

  .embed-wrap iframe {
    height: 260px;
  }

  .model-modal__dialog {
    inset: 0;
    border: 0;
  }
}
