:root {
  --navy: #010161;
  --navy-2: #10106f;
  --ink: #11122f;
  --paper: #fffdfd;
  --paper-blue: #f3f5fa;
  --muted: #686b7e;
  --line: rgba(1, 1, 97, 0.18);
  --glass: rgba(255, 255, 255, 0.55);
  --glass-strong: rgba(255, 255, 255, 0.76);
  --blue: #315b9b;
  --yellow: #d7aa38;
  --green: #5b9077;
  --red: #b84643;
  --shadow: 0 28px 90px rgba(12, 19, 72, 0.14);
  --radius: 28px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
body.home-page { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, select { font: inherit; }
img { max-width: 100%; display: block; }

.cube-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.glass-scrim {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: rgba(255, 253, 253, 0.18);
  backdrop-filter: blur(5px) saturate(90%);
  -webkit-backdrop-filter: blur(5px) saturate(90%);
}
.site-layer { position: relative; z-index: 2; }

.site-nav {
  position: fixed;
  z-index: 20;
  top: 20px;
  left: 3vw;
  right: 3vw;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 15px 50px rgba(16, 23, 72, 0.09);
  backdrop-filter: blur(24px) saturate(125%);
  -webkit-backdrop-filter: blur(24px) saturate(125%);
}
.wordmark { color: var(--navy); font-weight: 700; letter-spacing: -0.045em; }
.wordmark span { color: #8a8ca0; font-weight: 400; }
.site-nav nav { display: flex; gap: 26px; }
.site-nav nav a {
  position: relative;
  color: #4f526d;
  font-size: 0.82rem;
}
.site-nav nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -6px;
  height: 1px;
  background: var(--navy);
  transition: right 220ms ease;
}
.site-nav nav a:hover::after,
.site-nav nav a[aria-current="page"]::after { right: 0; }

.home-shell {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 110px 6vw 52px;
}
.home-title {
  width: min(860px, 88vw);
  text-align: center;
  color: var(--navy);
  filter: drop-shadow(0 10px 30px rgba(255, 255, 255, 0.94));
}
.home-title h1 {
  margin: 0;
  font-size: clamp(4rem, 9vw, 9.5rem);
  font-weight: 650;
  line-height: 0.84;
  letter-spacing: -0.078em;
}
.home-title p {
  margin: 28px 0 0;
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.home-enter {
  position: absolute;
  left: 50%;
  bottom: 36px;
  transform: translateX(-50%);
  padding: 10px 18px;
  border: 1px solid rgba(1, 1, 97, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--navy);
  font-size: 0.78rem;
  backdrop-filter: blur(16px);
}

.page-shell { min-height: 100vh; padding: 126px 5vw 90px; }
.page-heading {
  max-width: 1120px;
  margin: 0 auto 56px;
}
.kicker {
  margin: 0 0 18px;
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.page-heading h1,
.section-heading h2 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(3rem, 7vw, 7.6rem);
  font-weight: 650;
  line-height: 0.9;
  letter-spacing: -0.07em;
}
.page-heading .intro {
  max-width: 620px;
  margin: 28px 0 0 auto;
  color: #4e526a;
  font-size: 1.08rem;
}

.work-page { background: linear-gradient(145deg, #fffdfd, #f1f4fa); }
.project-deck {
  width: min(1240px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}
.project-card {
  appearance: none;
  min-height: 420px;
  padding: 0;
  overflow: hidden;
  position: relative;
  text-align: left;
  color: var(--navy);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.46);
  box-shadow: 0 20px 58px rgba(18, 24, 72, 0.1);
  backdrop-filter: blur(22px) saturate(120%);
  -webkit-backdrop-filter: blur(22px) saturate(120%);
  cursor: pointer;
  transition: transform 280ms ease, box-shadow 280ms ease, grid-column 360ms ease;
}
.project-card:hover,
.project-card:focus-visible { transform: translateY(-7px); box-shadow: var(--shadow); outline: none; }
.project-card.active { grid-column: span 3; transform: none; }
.project-card-face {
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
}
.project-code {
  font-size: clamp(3.6rem, 6vw, 6.7rem);
  font-weight: 650;
  line-height: 0.86;
  letter-spacing: -0.08em;
}
.project-index { font-size: 0.68rem; letter-spacing: 0.16em; }
.project-expand { font-size: 0.78rem; }
.project-detail {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0 28px;
  transition: max-height 420ms ease, opacity 260ms ease, padding 420ms ease;
}
.project-card.active .project-detail { max-height: 400px; opacity: 1; padding: 0 28px 30px; }
.project-detail h2 { margin: 0 0 10px; font-size: 1.65rem; letter-spacing: -0.04em; }
.project-detail p { max-width: 560px; color: #555970; }
.project-link {
  display: inline-flex;
  margin-top: 8px;
  padding: 11px 16px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: 0.8rem;
}
.placeholder-tag { color: #85889a; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; }

.about-page { background: transparent; }
.about-content { width: min(1120px, 100%); margin: 0 auto; }
.glass-panel {
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: var(--radius);
  background: var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(28px) saturate(125%);
  -webkit-backdrop-filter: blur(28px) saturate(125%);
}
.about-intro {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.35fr);
  gap: 22px;
  min-height: 620px;
}
.portrait-panel { padding: 18px; }
.portrait-panel img { width: 100%; height: 100%; min-height: 580px; object-fit: cover; object-position: 50% 38%; border-radius: 19px; }
.bio-panel { padding: clamp(34px, 5.5vw, 78px); display: flex; flex-direction: column; justify-content: center; }
.bio-panel h1 { margin: 0 0 28px; color: var(--navy); font-size: clamp(3.2rem, 6vw, 6.7rem); line-height: 0.88; letter-spacing: -0.07em; }
.bio-panel p:not(.kicker) { max-width: 680px; color: #4f536b; font-size: 1.08rem; }
.contact-link { display: inline-flex; align-self: flex-start; margin-top: 18px; color: var(--navy); font-weight: 650; border-bottom: 1px solid var(--navy); }
.about-section { margin-top: 90px; }
.section-heading { margin-bottom: 38px; }
.section-heading h2 { font-size: clamp(2.7rem, 5.5vw, 5.8rem); }
.credentials-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.credential { min-height: 270px; padding: 32px; }
.credential span { color: var(--navy); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; }
.credential h3 { margin: 50px 0 14px; font-size: 1.5rem; letter-spacing: -0.04em; }
.credential p { margin: 0; color: #5d6177; }
.timeline { padding: 16px 34px; }
.timeline-row { display: grid; grid-template-columns: 115px 1fr; gap: 28px; padding: 25px 0; border-bottom: 1px solid var(--line); }
.timeline-row:last-child { border-bottom: 0; }
.timeline-row time { color: var(--navy); font-weight: 700; }
.timeline-row p { margin: 0; color: #565a71; }
.timeline-row strong { color: var(--ink); }
.quotes { display: grid; gap: 18px; }
.quote-card { padding: clamp(30px, 4vw, 58px); }
.quote-card blockquote { margin: 0; color: var(--navy); font-size: clamp(1.45rem, 2.5vw, 2.35rem); line-height: 1.25; letter-spacing: -0.035em; }
.quote-card footer { margin-top: 28px; color: #555a72; }
.quote-card footer a { color: var(--navy); border-bottom: 1px solid rgba(1, 1, 97, 0.35); }
.quote-card small { display: block; margin-top: 8px; color: #898c9e; }

.kti-page { background: var(--paper); }
.kti-hero {
  min-height: 92svh;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  margin: 16px 2vw 0;
  border-radius: 32px;
  box-shadow: var(--shadow);
}
.kti-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.kti-hero-copy { position: relative; z-index: 1; width: min(930px, calc(100% - 8vw)); margin: 95px 4vw 64px; padding: clamp(34px, 5vw, 66px); color: var(--navy); }
.kti-hero-copy h1 { margin: 0; font-size: clamp(4rem, 7.6vw, 8.5rem); line-height: 0.85; letter-spacing: -0.075em; }
.kti-hero-copy p { max-width: 650px; margin: 28px 0 0; font-size: 1.08rem; }
.stats { display: flex; flex-wrap: wrap; gap: 38px; margin-top: 40px; }
.stats b { display: block; font-size: 1.9rem; }.stats span { font-size: 0.76rem; }
.case-section { padding: 110px 5vw; }
.case-section.tint { margin: 0 2vw; border-radius: 28px; background: #f0f3f9; }
.case-head { display: grid; grid-template-columns: 1fr 0.8fr; gap: 8vw; align-items: end; margin-bottom: 48px; }
.case-head h2 { margin: 0; color: var(--navy); font-size: clamp(2.8rem, 5.2vw, 5.7rem); line-height: 0.92; letter-spacing: -0.06em; }
.case-head p { margin: 0; color: #5c6075; }
.parameter-grid { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.parameter { min-height: 210px; padding: 24px 18px; border-right: 1px solid var(--line); }.parameter:last-child { border: 0; }
.parameter span { color: #7d8197; font-size: 0.7rem; }.parameter h3 { margin: 70px 0 8px; }.parameter p { color: #65697e; font-size: 0.82rem; }
.controls { display: grid; grid-template-columns: repeat(5, minmax(130px, 1fr)) auto; gap: 12px; margin-bottom: 22px; align-items: start; }
.filter-group { color: #666a80; font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; }
.select-pair { display: flex; flex-direction: column; }.compare-label { margin: 5px 0 0; color: #888b9d; font-size: 0.65rem; letter-spacing: 0; text-transform: none; }
select, .reset-button { height: 40px; margin-top: 6px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.82); color: var(--ink); }
.reset-button { margin-top: 19px; background: var(--navy); color: #fff; cursor: pointer; }
.charts { display: grid; grid-template-columns: 1.55fr 1fr; gap: 18px; }
.chart-card { padding: 20px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 16px 46px rgba(13, 20, 67, 0.07); }
.chart-title { display: flex; justify-content: space-between; gap: 20px; }.chart-title strong { display: block; }.chart-title span { color: #7c8094; font-size: 0.72rem; }.count { color: var(--navy) !important; font-weight: 700; }
.chart { min-height: 430px; }
.selected-run { display: grid; grid-template-columns: 210px 1fr auto; gap: 30px; align-items: center; margin-top: 18px; padding: 26px; border-radius: 20px; background: #e9edf6; }
.selected-visual { width: 210px; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; border-radius: 14px; background: #fff; }.selected-visual img { width: 100%; height: 100%; object-fit: cover; }.selected-visual span { padding: 20px; color: #7b7f92; text-align: center; font-size: 0.75rem; }.selected-visual [hidden] { display: none; }
.selected-run h3 { margin: 0 0 8px; font-size: 1.5rem; }.selected-run p { margin: 0; color: #62667b; font-size: 0.78rem; }.metrics { display: flex; gap: 26px; }.metrics span { display: block; color: #777b8e; font-size: 0.65rem; text-transform: uppercase; }.metrics strong { color: var(--navy); font-size: 1.45rem; }
.case-copy { display: grid; grid-template-columns: 1fr 1fr; gap: 8vw; }.case-copy p { color: #555970; font-size: 1.05rem; }
.site-footer { position: relative; z-index: 2; display: flex; justify-content: space-between; gap: 20px; margin: 0 4vw; padding: 28px 0; border-top: 1px solid var(--line); color: #74778b; font-size: 0.75rem; }

@media (max-width: 1050px) {
  .project-deck { grid-template-columns: repeat(2, 1fr); }
  .project-card.active { grid-column: 1 / -1; }
  .project-card:last-child { grid-column: 1 / -1; }
  .controls { grid-template-columns: repeat(3, 1fr); }
  .charts { grid-template-columns: 1fr; }
  .parameter-grid { grid-template-columns: repeat(2, 1fr); }
  .parameter { border-bottom: 1px solid var(--line); }
  .parameter:nth-child(2n) { border-right: 0; }
  .selected-run { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .site-nav { top: 12px; left: 16px; right: 16px; }.site-nav nav { gap: 16px; }.site-nav nav a { font-size: 0.74rem; }
  .home-shell { padding-inline: 20px; }.home-title h1 { font-size: clamp(3.6rem, 18vw, 6rem); }.home-title p { letter-spacing: 0.15em; }
  .page-shell { padding: 110px 18px 65px; }.page-heading .intro { margin-left: 0; }
  .project-deck, .about-intro, .credentials-grid, .case-head, .case-copy { grid-template-columns: 1fr; }
  .project-card, .project-card-face { min-height: 300px; }.project-card.active { grid-column: auto; }.project-card:last-child { grid-column: auto; }
  .about-intro { min-height: 0; }.portrait-panel img { min-height: 430px; }.bio-panel { padding: 32px 24px; }
  .timeline { padding: 12px 22px; }.timeline-row { grid-template-columns: 82px 1fr; gap: 12px; }
  .kti-hero { margin: 10px 14px 0; min-height: 760px; }.kti-hero-copy { width: auto; margin: 78px 18px 48px; padding: 28px 22px; }
  .case-section { padding: 78px 20px; }.case-section.tint { margin-inline: 14px; }.parameter-grid, .controls { grid-template-columns: 1fr; }.parameter { border-right: 0; }.metrics { flex-wrap: wrap; }.chart-title { display: block; }.count { display: block; margin-top: 8px; }
  .site-footer { display: block; margin-inline: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
