@font-face {
  font-family: "Cormorant";
  src: url("/assets/fonts/CormorantGaramond-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant";
  src: url("/assets/fonts/CormorantGaramond-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant";
  src: url("/assets/fonts/CormorantGaramond-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #2A3042;
  --bg-deep: #1f2333;
  --surface-0: #353b50;
  --surface-1: #404661;
  --base: #2A3042;
  --fg: #FFFFFF;
  --muted: #D8DCE9;
  --dim: #9CA7CE;
  --accent: #B9C5EE;
  --accent-soft: rgba(185, 197, 238, 0.15);
  --accent-glow: rgba(185, 197, 238, 0.45);
  --ui-font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --display-font: "Cormorant", "EB Garamond", "Times New Roman", serif;
  --mono-font: ui-monospace, "JetBrains Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--ui-font);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  background:
    radial-gradient(ellipse 90% 50% at 50% 0%, rgba(185, 197, 238, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 80% 40% at 50% 100%, rgba(64, 70, 97, 0.5) 0%, transparent 70%),
    var(--bg);
}

/* CRT scanlines fixed overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.022) 0px,
    rgba(255, 255, 255, 0.022) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
}

/* Film grain fixed overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99;
  background-image: url("/assets/grain.png");
  background-size: 256px 256px;
  opacity: 0.4;
  mix-blend-mode: overlay;
  animation: grain-shift 1.2s steps(6) infinite;
}

@keyframes grain-shift {
  0%   { transform: translate(0, 0); }
  10%  { transform: translate(-2%, -1%); }
  20%  { transform: translate(1%, -3%); }
  30%  { transform: translate(-1%, 2%); }
  40%  { transform: translate(3%, 1%); }
  50%  { transform: translate(-3%, -2%); }
  60%  { transform: translate(2%, 3%); }
  70%  { transform: translate(-2%, 1%); }
  80%  { transform: translate(1%, -1%); }
  90%  { transform: translate(-1%, 2%); }
  100% { transform: translate(0, 0); }
}

/* --- nav (iOS 26 Liquid Glass) --- */
nav.top {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 10px 22px;
  width: calc(100% - 28px);
  max-width: 720px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0.03) 50%, rgba(255, 255, 255, 0.08) 100%),
    rgba(42, 48, 66, 0.22);
  backdrop-filter: url(#glass-distort) blur(22px) saturate(180%) brightness(112%);
  -webkit-backdrop-filter: blur(22px) saturate(180%) brightness(112%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.08),
    0 8px 32px rgba(0, 0, 0, 0.35),
    0 2px 8px rgba(0, 0, 0, 0.2);
}
nav.top::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.18) 0%, transparent 35%, transparent 65%, rgba(255, 255, 255, 0.10) 100%);
  mix-blend-mode: overlay;
  pointer-events: none;
}
body { padding-top: 78px; }
nav.top .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono-font);
  font-size: 14px;
  letter-spacing: 0.15em;
  color: var(--fg);
  text-transform: lowercase;
  text-decoration: none;
  font-weight: 700;
}
nav.top .logo svg {
  width: 18px;
  height: 22px;
  display: block;
}
nav.top .links {
  display: flex;
  gap: 24px;
  font-family: var(--mono-font);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: lowercase;
}
nav.top .links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.25s;
}
nav.top .links a:hover { color: var(--accent); }

/* --- hero --- */
.hero {
  position: relative;
  min-height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px 120px;
  overflow: hidden;
}

/* liquid-glass classical scene — fixed 16:9 frame, scales with viewport but never distorts */
.hero-scene {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  /* min: 1100px keeps the temple readable on small screens (horiz overflow center-crops on mobile)
     ideal: 100vw fills the viewport on normal landscape sizes
     max: aspect-derived height never exceeds the hero so pediment + stairs always show */
  width: clamp(1100px, 100vw, calc((100vh - 60px) * 16 / 9));
  aspect-ratio: 1600 / 900;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  mix-blend-mode: screen;
  filter:
    drop-shadow(0 14px 36px rgba(0, 0, 0, 0.45))
    drop-shadow(0 2px 6px rgba(185, 197, 238, 0.15))
    contrast(1.05) saturate(1.1);
}
.hero-scene svg {
  width: 100%;
  height: 100%;
  display: block;
}

.bust-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(640px, 88vw);
  height: auto;
  z-index: 1;
  pointer-events: none;
  transform: translate(calc(-50% + var(--px, 0px)), calc(-55% + var(--py, 0px)));
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.bust {
  width: 100%;
  height: auto;
  display: block;
  opacity: 0.85;
  filter: drop-shadow(0 0 80px rgba(185, 197, 238, 0.35));
  animation: bust-breath 60s ease-in-out infinite alternate;
  transform-origin: center;
}
@keyframes bust-breath {
  0%   { transform: scale(1); }
  100% { transform: scale(1.04) translateY(-1.5%); }
}

.hero h1 {
  position: relative;
  z-index: 2;
  font-family: var(--display-font);
  font-weight: 400;
  font-size: clamp(96px, 22vw, 220px);
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--fg);
  text-shadow: 0 0 60px rgba(185, 197, 238, 0.35);
}

.hero .tagline {
  position: relative;
  z-index: 2;
  margin-top: 18px;
  font-family: var(--display-font);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(16px, 2.4vw, 22px);
  color: var(--muted);
  letter-spacing: 0.01em;
  text-align: center;
  max-width: 540px;
}

/* --- manifesto --- */
.manifesto {
  position: relative;
  z-index: 2;
  padding: 120px 24px;
  text-align: center;
}
.manifesto blockquote {
  font-family: var(--display-font);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(20px, 3vw, 30px);
  line-height: 1.5;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto;
}
.manifesto blockquote::before {
  content: "—";
  display: block;
  color: var(--accent);
  margin-bottom: 24px;
  font-style: normal;
}
.manifesto cite {
  display: block;
  margin-top: 28px;
  font-family: var(--mono-font);
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--dim);
}

/* --- grid / projects --- */
.section-head {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 100px 24px 32px;
}
.section-head h2 {
  font-family: var(--display-font);
  font-weight: 400;
  font-size: clamp(48px, 8vw, 84px);
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--fg);
  text-shadow: 0 0 40px rgba(185, 197, 238, 0.3);
}
.section-head p {
  margin-top: 14px;
  font-family: var(--display-font);
  font-style: italic;
  font-size: 17px;
  color: var(--muted);
}

.grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  padding: 24px 24px 120px;
  max-width: 980px;
  margin: 0 auto;
}
.card {
  position: relative;
  display: block;
  padding: 32px 28px 40px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 50%, rgba(255, 255, 255, 0.06) 100%),
    rgba(42, 48, 66, 0.28);
  backdrop-filter: blur(18px) saturate(170%) brightness(108%);
  -webkit-backdrop-filter: blur(18px) saturate(170%) brightness(108%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  color: var(--fg);
  text-decoration: none;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(255, 255, 255, 0.05),
    0 10px 30px rgba(0, 0, 0, 0.28),
    0 2px 8px rgba(0, 0, 0, 0.18);
  transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.3, 1), border-color 0.35s, box-shadow 0.4s;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0%, transparent 40%, transparent 60%, rgba(255, 255, 255, 0.08) 100%);
  mix-blend-mode: overlay;
  pointer-events: none;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(185, 197, 238, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06),
    0 0 50px var(--accent-glow),
    0 18px 50px rgba(0, 0, 0, 0.4);
}
.card .label {
  font-family: var(--mono-font);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--dim);
}
.card .title {
  margin-top: 12px;
  font-family: var(--display-font);
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--fg);
}
.card .desc {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}
.card .arrow {
  position: absolute;
  bottom: 18px;
  right: 22px;
  font-family: var(--mono-font);
  font-size: 18px;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.3s, transform 0.3s;
}
.card:hover .arrow {
  opacity: 1;
  transform: translateX(0);
}

/* project cards: 4 small mirror buttons in the top-right corner */
.card-mirrors {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 6px;
  z-index: 2;
}
.card-mirror {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--dim);
  text-decoration: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(42, 48, 66, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 2px 6px rgba(0, 0, 0, 0.22);
  transition: color 0.2s, transform 0.2s, background 0.25s, box-shadow 0.25s;
}
.card-mirror svg {
  width: 16px;
  height: 16px;
  display: block;
  color: inherit;
}
.card-mirror:hover {
  color: var(--accent);
  transform: translateY(-1px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)),
    rgba(185, 197, 238, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    0 0 18px rgba(185, 197, 238, 0.4);
}
/* the card itself is no longer a link on the projects page */
div.card { cursor: default; }
div.card .arrow { display: none; }

/* --- footer (glass strip) --- */
footer {
  position: relative;
  z-index: 2;
  padding: 28px;
  text-align: center;
  font-family: var(--mono-font);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01)),
    rgba(42, 48, 66, 0.18);
  backdrop-filter: blur(14px) saturate(160%) brightness(108%);
  -webkit-backdrop-filter: blur(14px) saturate(160%) brightness(108%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(255, 255, 255, 0.03);
}

/* --- project detail page --- */
.project-hero {
  position: relative;
  z-index: 2;
  padding: 120px 24px 36px;
  text-align: center;
}
.project-hero .label {
  font-family: var(--mono-font);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 14px;
}
.project-hero h1 {
  font-family: var(--display-font);
  font-weight: 400;
  font-size: clamp(56px, 10vw, 108px);
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--fg);
  text-shadow: 0 0 50px rgba(185, 197, 238, 0.3);
}
.project-hero .subtitle {
  margin-top: 14px;
  font-family: var(--display-font);
  font-style: italic;
  font-size: clamp(16px, 2.4vw, 22px);
  color: var(--muted);
}
.project-preview {
  position: relative;
  z-index: 2;
  max-width: 880px;
  margin: 0 auto;
  padding: 24px;
}
.project-preview .frame {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02) 50%, rgba(255, 255, 255, 0.06)),
    rgba(42, 48, 66, 0.3);
  backdrop-filter: blur(18px) saturate(170%) brightness(108%);
  -webkit-backdrop-filter: blur(18px) saturate(170%) brightness(108%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(255, 255, 255, 0.05),
    0 18px 50px rgba(0, 0, 0, 0.4),
    0 4px 14px rgba(0, 0, 0, 0.25);
  aspect-ratio: 2 / 1;
}
.project-preview .frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.92;
}
.project-preview .frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 60%, rgba(31,35,51,0.45));
}
.project-body {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
  padding: 36px 24px 0;
}
.project-body p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
  margin-bottom: 18px;
}
.project-body p + p { margin-top: -6px; }
.project-tags {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 28px 24px 0;
}
.project-tags span {
  font-family: var(--mono-font);
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(42, 48, 66, 0.3);
  backdrop-filter: blur(14px) saturate(160%) brightness(108%);
  -webkit-backdrop-filter: blur(14px) saturate(160%) brightness(108%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 14px;
  border-radius: 999px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04),
    0 4px 12px rgba(0, 0, 0, 0.22);
}
.project-actions {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 36px 24px 120px;
}
.project-actions a {
  position: relative;
  font-family: var(--mono-font);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--fg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04)),
    rgba(185, 197, 238, 0.18);
  backdrop-filter: blur(18px) saturate(180%) brightness(115%);
  -webkit-backdrop-filter: blur(18px) saturate(180%) brightness(115%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 12px 26px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 -1px 0 rgba(255, 255, 255, 0.05),
    0 8px 22px rgba(0, 0, 0, 0.3);
  transition: transform 0.25s, background 0.3s, box-shadow 0.3s;
}
.project-actions a:hover {
  transform: translateY(-1px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.08)),
    rgba(185, 197, 238, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 0 38px var(--accent-glow),
    0 12px 28px rgba(0, 0, 0, 0.4);
}
.project-actions a.secondary {
  color: var(--muted);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(42, 48, 66, 0.28);
  border-color: rgba(255, 255, 255, 0.12);
}
.project-actions a.secondary:hover {
  color: var(--fg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04)),
    rgba(42, 48, 66, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 10px 26px rgba(0, 0, 0, 0.35);
}

/* fade-in on scroll (added by JS) */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  .bust, body::after { animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* mobile */
@media (max-width: 600px) {
  nav.top { padding: 9px 16px; gap: 14px; top: 10px; max-width: none; width: calc(100% - 20px); }
  nav.top .links { gap: 14px; }
  body { padding-top: 66px; }
  .hero { padding: 40px 20px 100px; min-height: calc(100vh - 50px); }
  .bust-wrap { width: 108vw; }
  .bust { opacity: 0.75; }
  .manifesto { padding: 80px 20px; }
  .section-head { padding: 80px 20px 24px; }
  .grid { padding: 20px 20px 100px; gap: 14px; }
  .card-mirrors { top: 10px; right: 10px; gap: 4px; }
  .card-mirror { width: 22px; height: 22px; border-radius: 6px; }
  .card-mirror svg { width: 13px; height: 13px; }
}
