:root {
  --bg: #f3f1ea;
  --bg-2: #fbfaf6;
  --panel: #fbfaf6;
  --panel-strong: #ffffff;
  --ink: #171713;
  --muted: #68675f;
  --line: rgba(23, 23, 19, 0.14);
  --cyan: #4c60ff;
  --green: #c8ff32;
  --violet: #8b45ff;
  --amber: #ff6b35;
  --red: #ff66b3;
  --shadow: 0 20px 60px rgba(25, 25, 15, 0.12);
  --radius: 18px;
  --page-pad: clamp(32px, 4.8vw, 84px);
  --content-width: min(1440px, calc(100vw - (var(--page-pad) * 2)));
}

body.dark-theme {
  --bg: #11120e;
  --bg-2: #191a15;
  --panel: #191a15;
  --panel-strong: #24251f;
  --ink: #f3f1e8;
  --muted: #a5a69d;
  --line: rgba(255, 255, 255, 0.14);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(76, 96, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(76, 96, 255, 0.045) 1px, transparent 1px),
    linear-gradient(135deg, transparent 0 48%, rgba(139, 69, 255, 0.035) 49% 51%, transparent 52% 100%),
    radial-gradient(860px circle at 76% 28%, rgba(76, 96, 255, 0.12), transparent 55%),
    linear-gradient(135deg, color-mix(in srgb, var(--cyan) 6%, transparent), transparent 28%),
    linear-gradient(225deg, color-mix(in srgb, var(--green) 9%, transparent), transparent 34%),
    var(--bg);
  background-size: 76px 76px, 76px 76px, 280px 280px, auto, auto, auto, auto;
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  transition: background 0.3s ease, color 0.3s ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(520px circle at var(--pointer-x, 50%) var(--pointer-y, 22%), color-mix(in srgb, var(--cyan) 10%, transparent), transparent 68%),
    radial-gradient(420px circle at calc(var(--pointer-x, 50%) + 9vw) calc(var(--pointer-y, 22%) + 12vh), color-mix(in srgb, var(--red) 8%, transparent), transparent 70%);
  opacity: 0.9;
}

body.dark-theme {
  background:
    linear-gradient(rgba(87, 112, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(87, 112, 255, 0.075) 1px, transparent 1px),
    linear-gradient(135deg, transparent 0 48%, rgba(255, 102, 179, 0.05) 49% 51%, transparent 52% 100%),
    radial-gradient(920px circle at 72% 28%, rgba(76, 96, 255, 0.38), transparent 58%),
    radial-gradient(760px circle at 16% 78%, rgba(139, 69, 255, 0.16), transparent 58%),
    linear-gradient(110deg, #050710 0%, #080b18 46%, #0a1025 100%);
  background-size: 82px 82px, 82px 82px, 300px 300px, auto, auto, auto;
}

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

button {
  font: inherit;
}

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

#networkCanvas {
  display: none;
}

.scanline {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.75'/%3E%3C/svg%3E");
  opacity: 0.035;
}

.progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 80;
  width: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--green), var(--cyan), var(--red));
}

.topbar {
  position: fixed;
  top: 30px;
  left: 50%;
  z-index: 70;
  display: flex;
  width: var(--content-width);
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 68px;
  padding: 0 18px 0 22px;
  background:
    linear-gradient(135deg, color-mix(in srgb, #fff 54%, transparent), transparent 58%),
    color-mix(in srgb, var(--panel) 74%, transparent);
  border: 1px solid color-mix(in srgb, #fff 48%, var(--line));
  border-radius: 999px;
  box-shadow: 0 24px 70px rgba(25, 25, 15, 0.12), inset 0 1px 0 color-mix(in srgb, #fff 68%, transparent);
  transform: translateX(-50%);
  backdrop-filter: blur(24px) saturate(1.18);
  overflow: hidden;
}

.topbar::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  background: linear-gradient(100deg, rgba(139, 69, 255, 0.22), rgba(76, 96, 255, 0.08), rgba(255, 102, 179, 0.18), rgba(200, 255, 50, 0.12));
  opacity: 0.78;
  animation: header-color-flow 9s linear infinite;
  background-size: 220% 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 22px;
  font-weight: 700;
}

.brand-logo {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: var(--bg);
  background: linear-gradient(135deg, var(--ink), var(--violet), var(--cyan));
  border-radius: 50%;
  font-family: "Space Grotesk", sans-serif;
}

.accent-dot {
  color: var(--cyan);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
  padding: 8px;
  background: color-mix(in srgb, var(--bg) 76%, transparent);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.nav a {
  display: inline-grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 24px;
  color: var(--muted);
  border-radius: 999px;
  font-size: 16px;
  font-weight: 800;
}

.nav a span {
  color: var(--cyan);
  font-family: "Space Grotesk", sans-serif;
  font-size: 14px;
  font-weight: 800;
}

.nav a:hover,
.nav a.active {
  color: var(--ink);
  background: var(--panel);
  box-shadow: 0 10px 28px rgba(25, 25, 15, 0.08);
}

.nav a.active span {
  background: linear-gradient(100deg, var(--cyan), var(--violet), var(--red));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.theme-toggle {
  display: inline-flex;
  width: 54px;
  height: 54px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0;
  color: var(--ink);
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  font-weight: 900;
}

.theme-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.theme-icon {
  line-height: 1;
}

.section {
  width: var(--content-width);
  margin: 0 auto;
  padding: 96px 0;
}

.hero {
  display: grid;
  min-height: 94vh;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 0.82fr);
  align-items: center;
  gap: clamp(34px, 5vw, 74px);
  padding-top: 136px;
  padding-bottom: 44px;
}

.kicker {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  background: #51d873;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(81, 216, 115, 0.13);
}

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

h1,
h2,
h3,
.summary-card blockquote {
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
  font-weight: 900;
}

.brand,
.hero-meta strong {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}

h1 {
  max-width: 860px;
  margin-bottom: 24px;
  font-size: clamp(42px, 4.5vw, 72px);
  line-height: 1.12;
  letter-spacing: 0;
}

.hero-title span {
  display: block;
  padding-top: 0.08em;
  padding-bottom: 0.08em;
  text-wrap: balance;
}

h2 {
  max-width: 920px;
  margin-bottom: 16px;
  font-size: clamp(40px, 5vw, 70px);
  line-height: 1;
  letter-spacing: 0;
}

h2 span {
  color: transparent;
  background: linear-gradient(100deg, var(--cyan), var(--violet), var(--red), var(--green));
  background-size: 220% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  animation: headline-color-flow 8s ease-in-out infinite alternate;
}

.section-title h2,
.projects .section-title h2,
.summary-card > h2 {
  position: relative;
}

.section-title h2::after,
.projects .section-title h2::after,
.summary-card > h2::after {
  content: "";
  display: block;
  width: 82px;
  height: 5px;
  margin-top: 22px;
  background: linear-gradient(90deg, var(--cyan), var(--violet), var(--red), var(--green));
  background-size: 240% 100%;
  border-radius: 999px;
  animation: headline-color-flow 7s ease-in-out infinite alternate;
}

h3 {
  margin-bottom: 10px;
  font-size: 22px;
  line-height: 1.25;
}

.hero-lead,
.section-note,
.glass-panel p,
.mission-card p,
.summary-card p {
  color: var(--muted);
}

.hero-lead {
  max-width: 590px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.72;
}

.hero-lead strong {
  color: var(--ink);
}

.gradient-text {
  color: transparent;
  background: linear-gradient(100deg, var(--cyan), var(--violet) 55%, var(--red));
  background-size: 180% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  animation: headline-color-flow 7s ease-in-out infinite alternate;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.btn,
.report-link,
.drive-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.btn:hover,
.report-link:hover,
.drive-link:hover {
  border-color: rgba(67, 255, 175, 0.8);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.primary {
  color: #fff;
  background: linear-gradient(100deg, var(--violet), #16c8ee);
  border-color: transparent;
}

.secondary {
  background: transparent;
}

.light {
  color: #f7f4e8;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
}

.hero-meta {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: -18px;
  padding: 20px 24px;
  background:
    linear-gradient(135deg, color-mix(in srgb, #fff 62%, transparent), transparent 58%),
    color-mix(in srgb, var(--panel) 76%, transparent);
  border: 1px solid color-mix(in srgb, #fff 46%, var(--line));
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(25, 25, 15, 0.1);
  backdrop-filter: blur(24px) saturate(1.14);
}

.hero-meta div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0 28px;
  border-right: 1px solid var(--line);
}

.hero-meta div:first-child {
  padding-left: 0;
}

.hero-meta div:last-child {
  padding-right: 0;
  border-right: 0;
}

.hero-meta strong {
  color: var(--cyan);
  font-size: 23px;
  font-weight: 700;
}

.hero-meta span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.terminal-card,
.glass-panel,
.mission-card,
.summary-card,
 .document-card-grid article {
  background:
    linear-gradient(135deg, color-mix(in srgb, #fff 42%, transparent), transparent 52%),
    color-mix(in srgb, var(--panel) 76%, transparent);
  border: 1px solid color-mix(in srgb, #fff 42%, var(--line));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(1.16);
}

.hero-visual {
  position: relative;
  min-height: 540px;
}

.portrait-frame {
  position: absolute;
  left: clamp(34px, 8vw, 78px);
  bottom: 18px;
  width: min(360px, 56%);
  aspect-ratio: 0.76;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 25%, rgba(255, 255, 255, 0.32), transparent 44%),
    linear-gradient(135deg, #2568f4, #0a4fe0);
  border: 2px solid color-mix(in srgb, var(--cyan) 58%, #fff);
  border-radius: 46% 46% 34px 34px;
  box-shadow:
    0 28px 90px rgba(76, 96, 255, 0.26),
    0 0 0 12px rgba(76, 96, 255, 0.06);
}

.portrait-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 15%;
}

.orbit-line {
  position: absolute;
  inset: 10%;
  border: 1px solid rgba(139, 69, 255, 0.38);
  border-radius: 50%;
  transform: rotate(-18deg);
}

.orbit-two {
  inset: 22% -10% 20% -26%;
  transform: rotate(-31deg);
}

.floating-code,
.skill-chip {
  position: absolute;
  z-index: 2;
  background: #111723;
  color: #f6f7ff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 70px rgba(38, 31, 112, 0.22);
  backdrop-filter: blur(22px) saturate(1.2);
}

.floating-code {
  right: -2%;
  top: 42px;
  display: grid;
  gap: 10px;
  width: min(224px, 36vw);
  padding: 20px 18px;
  border-radius: 20px;
  font-family: "Space Grotesk", monospace;
  font-size: 12px;
  line-height: 1.25;
}

.floating-code code {
  color: #dde6ff;
}

.floating-code code:nth-child(2),
.floating-code code:nth-child(6) {
  color: #e366ff;
}

.floating-code code:nth-child(4) {
  color: #7aa4ff;
}

.skill-chip {
  display: inline-grid;
  place-items: center;
  min-width: 64px;
  min-height: 64px;
  padding: 10px 16px;
  border-radius: 20px;
  color: #b988ff;
  font-family: "Space Grotesk", sans-serif;
  font-size: 25px;
  font-weight: 700;
}

.chip-code {
  left: 0;
  top: 43%;
}

.chip-brace {
  left: 7%;
  bottom: 17%;
}

.chip-ai {
  right: -1%;
  bottom: 19%;
  grid-template-columns: auto 1fr;
  gap: 12px;
  min-width: 184px;
  justify-items: start;
  color: #7c5cff;
  background: #101720;
  font-size: 24px;
}

.chip-ai small {
  color: #fff;
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.section-title {
  margin-bottom: 42px;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(330px, 1.14fr);
  gap: 20px;
}

.glass-panel,
.mission-card,
.summary-card {
  padding: 26px;
}

.fact-grid,
.mission-grid,
.intro-details {
  display: grid;
  gap: 14px;
}

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

.fact-grid div {
  min-height: 130px;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.fact-grid span,
.mission-card span {
  display: block;
  margin-bottom: 10px;
  color: var(--cyan);
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.fact-grid strong {
  font-size: 19px;
}

.mission {
  padding-top: 0;
}

.intro-details {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 20px;
}

.intro-details article {
  min-height: 260px;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.intro-details span {
  display: block;
  margin-bottom: 28px;
  color: var(--cyan);
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.intro-details p {
  color: var(--muted);
}

.mission-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 22px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 58px 0 32px;
}

.filter {
  min-height: 42px;
  padding: 8px 14px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.filter:hover,
.filter.active {
  color: var(--bg);
  background: var(--ink);
}

.filter span {
  margin-left: 6px;
  color: inherit;
  opacity: 0.7;
  font-family: "Space Grotesk", sans-serif;
}

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

.projects {
  position: relative;
  width: min(1340px, calc(100vw - (var(--page-pad) * 2.4)));
  padding-top: 130px;
}

.projects::before {
  content: "";
  position: absolute;
  inset: 34px max(-72px, -5vw) 20px;
  z-index: -1;
  background:
    linear-gradient(rgba(76, 96, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(76, 96, 255, 0.06) 1px, transparent 1px),
    radial-gradient(520px circle at 18% 22%, rgba(139, 69, 255, 0.16), transparent 62%),
    radial-gradient(620px circle at 86% 58%, rgba(200, 255, 50, 0.14), transparent 64%);
  background-size: 72px 72px, 72px 72px, auto, auto;
  border-radius: 34px;
  opacity: 0.72;
  pointer-events: none;
}

.projects .section-title {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.62fr);
  align-items: end;
  gap: 72px;
  margin-bottom: 0;
}

.projects .section-title .kicker,
.projects .section-title h2 {
  grid-column: 1;
}

.projects .section-title h2 {
  max-width: 720px;
  margin-bottom: 0;
  font-size: 82px;
  line-height: 1.02;
}

.projects .section-title .section-note {
  grid-column: 2;
  align-self: center;
  max-width: 520px;
  margin: 0;
  font-size: 18px;
  line-height: 1.8;
}

.project-card {
  --mx: 50%;
  --my: 50%;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  display: flex;
  min-height: 460px;
  flex-direction: column;
  overflow: hidden;
  background:
    linear-gradient(135deg, color-mix(in srgb, #fff 52%, transparent), transparent 60%),
    color-mix(in srgb, var(--panel) 82%, transparent);
  border: 1px solid color-mix(in srgb, #fff 42%, var(--line));
  border-radius: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(1.15);
  transform: perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transition: transform 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
  position: relative;
}

.project-ambient {
  position: absolute;
  inset: 38% -18% -24%;
  z-index: 0;
  background:
    linear-gradient(180deg, transparent, color-mix(in srgb, var(--panel) 68%, transparent) 50%, color-mix(in srgb, var(--panel) 88%, transparent)),
    var(--project-cover) center / cover no-repeat;
  filter: blur(34px) saturate(1.24);
  opacity: 0.46;
  transform: scale(1.08);
  pointer-events: none;
}

.project-card:nth-child(2n) .project-ambient {
  opacity: 0.4;
  filter: blur(38px) saturate(1.08) hue-rotate(8deg);
}

.project-card:nth-child(3n) .project-ambient {
  opacity: 0.5;
  filter: blur(36px) saturate(1.16) hue-rotate(-12deg);
}

.project-card::before,
.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 220ms ease;
}

.project-card::before {
  background:
    radial-gradient(360px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.52), transparent 48%),
    radial-gradient(260px circle at var(--mx) var(--my), color-mix(in srgb, var(--cyan) 18%, transparent), transparent 62%);
  mix-blend-mode: screen;
}

.project-card::after {
  inset: 1px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 21px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -18px 38px rgba(255, 255, 255, 0.12);
}

.project-card:hover {
  border-color: color-mix(in srgb, var(--cyan) 34%, var(--line));
  box-shadow: 0 32px 80px rgba(25, 25, 15, 0.18);
  transform: perspective(900px) translateY(-8px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
}

.project-card:hover::before,
.project-card:hover::after {
  opacity: 1;
}

.liquid-reactive {
  --mx: 50%;
  --my: 50%;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  position: relative;
  overflow: hidden;
  transform: perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.liquid-reactive::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(340px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.42), transparent 55%),
    radial-gradient(220px circle at var(--mx) var(--my), color-mix(in srgb, var(--green) 18%, transparent), transparent 64%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.liquid-reactive:hover::before {
  opacity: 1;
}

.liquid-reactive > * {
  position: relative;
  z-index: 1;
}

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

.project-card.filter-enter {
  animation: card-filter-in 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.project-open {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 250px;
  flex: 0 0 250px;
  padding: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.project-open img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.96) contrast(1.02);
  transition: transform 280ms ease;
}

.project-card:hover .project-open img {
  transform: scale(1.04);
}

.project-pill,
.arrow-pill {
  position: absolute;
  top: 22px;
  display: inline-grid;
  min-height: 48px;
  place-items: center;
  color: #171713;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.project-pill {
  left: 22px;
  padding: 0 18px;
  background: var(--panel);
}

.arrow-pill {
  right: 22px;
  width: 64px;
  background: var(--green);
  font-size: 24px;
}

.project-card-body {
  position: relative;
  z-index: 3;
  display: flex;
  min-height: 176px;
  flex: 1;
  flex-direction: column;
  padding: 26px 30px 30px;
  background: color-mix(in srgb, var(--panel) 84%, transparent);
  transition: transform 220ms ease;
}

.project-card:hover .project-card-body {
  transform: translate3d(
    calc(var(--mx-num, 0) * 8px),
    calc(var(--my-num, 0) * 5px - 4px),
    0
  );
}

.project-card-body h3 {
  margin-bottom: 10px;
  font-size: clamp(21px, 1.8vw, 27px);
  line-height: 1.18;
}

.project-card-body p {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.65;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 18px;
}

.tag-row span {
  padding: 6px 10px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.detail-link {
  margin-top: auto;
  align-self: flex-start;
  min-height: 38px;
  padding: 0 14px;
  color: var(--cyan);
  background: color-mix(in srgb, var(--cyan) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--cyan) 28%, var(--line));
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transform: translateY(6px);
  opacity: 0.88;
  transition: transform 180ms ease, opacity 180ms ease, background 180ms ease;
}

.project-card:hover .detail-link {
  background: var(--green);
  color: #171713;
  opacity: 1;
  transform: translateY(0);
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.drive-link {
  color: #171713;
  background: var(--amber);
}

.report-link {
  color: #171713;
  background: var(--cyan);
}

.ai-principles {
  display: grid;
  width: var(--content-width);
  max-width: none;
  grid-template-columns: 0.82fr 1.18fr;
  gap: clamp(28px, 7vw, 90px);
  margin: 24px auto 118px;
  padding: clamp(54px, 8vw, 96px);
  color: #f7f4e8;
  background:
    linear-gradient(135deg, rgba(76, 96, 255, 0.16), transparent 36%),
    linear-gradient(150deg, #173426 0%, #1f3d2b 58%, #243a30 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.ai-principles .kicker {
  color: rgba(255, 255, 255, 0.72);
}

.ai-principles h2 {
  max-width: 680px;
  font-size: clamp(38px, 5vw, 68px);
}

.ai-principles h2 span {
  color: var(--green);
}

.ai-principles-copy p:not(.kicker) {
  max-width: 520px;
  color: rgba(255, 255, 255, 0.76);
}

.ai-principles-list {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.ai-principles-list div {
  display: grid;
  grid-template-columns: 46px minmax(160px, 0.8fr) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.ai-principles-list span {
  color: var(--green);
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.ai-principles-list strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 17px;
}

.ai-principles-list small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.summary-card {
  max-width: none;
  margin: 0 auto;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.summary-card > .kicker,
.summary-card > h2 {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
}

.summary-card > h2 {
  max-width: 1050px;
  margin-bottom: 64px;
  font-size: 76px;
  line-height: 1.05;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 0;
  text-align: left;
}

.summary-grid article {
  min-height: 300px;
  padding: 30px;
  background:
    linear-gradient(135deg, color-mix(in srgb, #fff 46%, transparent), transparent 58%),
    color-mix(in srgb, var(--panel) 78%, transparent);
  border: 1px solid color-mix(in srgb, #fff 40%, var(--line));
  border-radius: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(1.15);
}

.summary-grid article:nth-child(4) {
  color: #171713;
  background: var(--green);
  border-color: color-mix(in srgb, var(--green) 68%, var(--line));
}

.summary-grid p {
  margin-bottom: 0;
}

.summary-card blockquote {
  max-width: 1050px;
  margin: 68px 0 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 34px;
  line-height: 1.25;
  font-weight: 800;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px max(16px, calc((100vw - 1180px) / 2));
  color: color-mix(in srgb, var(--ink) 72%, var(--muted));
  background:
    linear-gradient(135deg, color-mix(in srgb, #fff 38%, transparent), transparent 60%),
    color-mix(in srgb, var(--panel) 62%, transparent);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.footer p {
  margin: 0;
}

.footer a {
  color: var(--cyan);
  font-weight: 900;
}

body.dark-theme .footer a {
  color: #9fb0ff;
}

.project-dialog {
  width: min(1840px, calc(100vw - 24px));
  max-width: none;
  max-height: calc(100vh - 24px);
  padding: 0;
  color: #f8fbff;
  background: #59428d;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  box-shadow: 0 34px 110px rgba(3, 6, 20, 0.46);
  overflow: auto;
  scroll-behavior: smooth;
}

body.dark-theme .project-dialog {
  background: #21193f;
}

.project-dialog::backdrop {
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(8px);
}

.dialog-close {
  position: sticky;
  top: 18px;
  left: calc(100% - 92px);
  z-index: 12;
  display: grid;
  width: 70px;
  height: 70px;
  margin: 18px 22px -88px auto;
  place-items: center;
  color: #ffffff;
  background: radial-gradient(circle at 36% 28%, #8b45ff, #6932c8);
  border: 4px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  cursor: pointer;
  font-size: 34px;
  font-weight: 900;
  box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.18), 0 24px 54px rgba(21, 15, 51, 0.42);
}

.dialog-content {
  padding: 0;
}

.source-document {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: calc(100vh - 24px);
  --theme-a: #573f8d;
  --theme-b: #719d95;
  --theme-c: #8b45ff;
  --theme-soft: rgba(143, 92, 255, 0.38);
  background:
    linear-gradient(rgba(255, 255, 255, 0.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.075) 1px, transparent 1px),
    linear-gradient(180deg, rgba(12, 14, 34, 0.18), rgba(8, 19, 24, 0.14)),
    radial-gradient(920px circle at 70% 24%, var(--theme-soft), transparent 56%),
    linear-gradient(180deg, var(--theme-a) 0%, var(--theme-b) 100%);
  background-size: 86px 86px, 86px 86px, auto, auto, auto;
}

.source-document[data-project-theme="01"] {
  --theme-a: #314b63;
  --theme-b: #6e918d;
  --theme-c: #7ed8ff;
  --theme-soft: rgba(126, 216, 255, 0.24);
}

.source-document[data-project-theme="02"] {
  --theme-a: #4a3d68;
  --theme-b: #927b68;
  --theme-c: #ffdc78;
  --theme-soft: rgba(255, 220, 120, 0.22);
}

.source-document[data-project-theme="03"] {
  --theme-a: #182767;
  --theme-b: #386f9f;
  --theme-c: #76e8ff;
  --theme-soft: rgba(118, 232, 255, 0.24);
}

.source-document[data-project-theme="04"] {
  --theme-a: #315947;
  --theme-b: #887965;
  --theme-c: #d7ff7a;
  --theme-soft: rgba(215, 255, 122, 0.2);
}

.source-document[data-project-theme="05"] {
  --theme-a: #561d61;
  --theme-b: #9d4b86;
  --theme-c: #ff92d1;
  --theme-soft: rgba(255, 146, 209, 0.24);
}

.source-document[data-project-theme="06"] {
  --theme-a: #3f403a;
  --theme-b: #7b755f;
  --theme-c: #ffe08a;
  --theme-soft: rgba(255, 224, 138, 0.2);
}

.document-side-nav {
  position: sticky;
  top: 0;
  z-index: 8;
  display: grid;
  align-content: start;
  gap: 12px;
  max-height: calc(100vh - 24px);
  padding: 154px 16px 28px 28px;
  overflow-y: auto;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(17, 23, 35, 0.42), rgba(17, 23, 35, 0.12)),
    rgba(245, 248, 255, 0.06);
  backdrop-filter: blur(18px) saturate(1.1);
}

.document-side-nav a {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 74px;
  padding: 14px 16px;
  color: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.document-side-nav a.active {
  color: #ffffff;
  background: rgba(80, 53, 151, 0.78);
  border-color: var(--theme-c);
  box-shadow: 0 18px 46px rgba(21, 15, 51, 0.24);
  transform: translateX(6px);
}

.document-side-nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
}

.document-side-nav a:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.82);
  outline-offset: 3px;
}

.document-side-nav span {
  color: var(--theme-c);
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  font-weight: 900;
}

.document-side-nav strong {
  overflow-wrap: anywhere;
}

.source-document-body {
  display: grid;
  gap: 28px;
  padding: 104px clamp(30px, 5vw, 80px) 70px;
}

.document-cover,
.document-section {
  scroll-margin-top: 34px;
  background:
    radial-gradient(620px circle at var(--mx, 50%) var(--my, 18%), rgba(255, 255, 255, 0.18), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.1));
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 34px;
  box-shadow: 0 28px 80px rgba(18, 18, 46, 0.22);
  backdrop-filter: blur(22px) saturate(1.12);
}

.document-cover {
  position: relative;
  display: grid;
  max-width: 1100px;
  min-height: 560px;
  align-items: center;
  justify-self: center;
  overflow: hidden;
  padding: clamp(42px, 6vw, 78px);
  text-align: center;
}

.document-cover img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.1;
  filter: saturate(0.95) blur(1px);
}

.document-cover > div {
  position: relative;
  z-index: 1;
}

.document-cover h2 {
  max-width: 920px;
  margin: 22px auto 20px;
  color: #ffffff;
  background: none;
  font-size: clamp(46px, 5.3vw, 88px);
  line-height: 0.98;
  text-wrap: balance;
}

.document-cover .kicker {
  display: inline-flex;
  width: auto;
  margin: 0 auto;
  padding: 11px 22px;
  color: #171713;
  background: var(--theme-c);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.document-cover p:not(.kicker) {
  max-width: 780px;
  margin: 0 auto 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
  line-height: 1.7;
}

.document-cover .tag-row {
  justify-content: center;
}

.document-cover .tag-row span {
  color: #ffffff;
  background: rgba(139, 69, 255, 0.62);
  border-color: rgba(255, 255, 255, 0.28);
}

.document-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.document-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.document-facts div,
.document-overview-grid article {
  min-height: 104px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  backdrop-filter: blur(16px);
}

.document-facts span,
.document-overview-grid span,
.document-section-index {
  display: block;
  margin-bottom: 10px;
  color: var(--theme-c);
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.document-facts strong,
.document-overview-grid p {
  display: block;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  line-height: 1.55;
}

.document-overview-grid p {
  color: rgba(255, 255, 255, 0.82);
}

.document-section {
  position: relative;
  padding: clamp(22px, 3.4vw, 36px);
}

.document-section::before {
  content: "";
  display: block;
  width: 74px;
  height: 5px;
  margin-bottom: 22px;
  background: linear-gradient(90deg, var(--theme-c), #ffffff, #8b45ff);
  border-radius: 999px;
}

.document-section h3 {
  max-width: 900px;
  margin-bottom: 14px;
  color: transparent;
  background: linear-gradient(100deg, #ffffff, var(--theme-c) 42%, #d8ccff 74%, #ffffff);
  background-clip: text;
  -webkit-background-clip: text;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.1;
}

.document-intro {
  max-width: 980px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 16px;
}

.document-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.document-card-grid article {
  min-height: 132px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  transition: transform 180ms ease, border-color 180ms ease;
}

.document-card-grid article:hover {
  border-color: color-mix(in srgb, var(--cyan) 42%, var(--line));
  transform: translateY(-3px);
}

.document-card-grid h4 {
  margin: 0 0 10px;
  font-family: "Space Grotesk", sans-serif;
  color: #ffffff;
  font-size: 19px;
}

.document-card-grid p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
}

.document-bullets,
.document-steps {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  color: var(--muted);
}

.document-bullets {
  list-style: none;
}

.document-bullets li {
  position: relative;
  padding: 13px 15px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
}

.document-steps {
  gap: 18px;
  padding: 0;
  list-style: none;
}

.document-steps li {
  --mx: 50%;
  --my: 50%;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(260px, 1.14fr);
  gap: 18px;
  align-items: stretch;
  padding: 16px;
  overflow: hidden;
  background:
    radial-gradient(420px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.22), transparent 54%),
    rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  box-shadow: 0 18px 44px rgba(25, 25, 15, 0.08);
  backdrop-filter: blur(18px) saturate(1.1);
}

.document-steps li:not(.has-evidence) {
  grid-template-columns: 1fr;
}

.step-copy {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 4px 2px;
}

.step-copy span {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 34px;
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 13px;
  font-weight: 900;
}

.step-copy h4 {
  margin: 0;
  color: #ffffff;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(19px, 2vw, 26px);
  line-height: 1.12;
  letter-spacing: 0;
}

.step-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 15px;
  line-height: 1.7;
}

.step-evidence {
  margin: 0;
  padding: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid color-mix(in srgb, #fff 68%, var(--line));
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.document-links-section .project-links {
  justify-content: flex-start;
}

.project-dialog .drive-link,
.project-dialog .report-link {
  color: #171713;
  border-color: transparent;
}

.project-dialog .drive-link {
  background: var(--theme-c);
}

.project-dialog .report-link {
  color: #ffffff;
  background: linear-gradient(100deg, #8b45ff, #4c60ff);
}

.step-evidence img {
  display: block;
  width: 100%;
  height: clamp(240px, 24vw, 360px);
  max-height: 360px;
  object-fit: contain;
  background: #fff;
  border-radius: 11px;
}

.step-evidence figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.document-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.document-gallery figure {
  margin: 0;
  padding: 12px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.document-gallery img {
  width: 100%;
  max-height: 560px;
  object-fit: contain;
  background: #fff;
  border-radius: 10px;
}

.document-gallery figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.document-links-section {
  margin-bottom: 0;
}

.embed-stack {
  display: grid;
  gap: 18px;
  margin-top: 26px;
}

.pdf-embed,
.local-pdf-embed {
  margin: 0;
  padding: 12px;
  overflow: hidden;
  background:
    linear-gradient(135deg, color-mix(in srgb, #fff 54%, transparent), transparent 58%),
    color-mix(in srgb, var(--panel) 84%, transparent);
  border: 1px solid color-mix(in srgb, #fff 48%, var(--line));
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(25, 25, 15, 0.09);
}

.pdf-embed iframe,
.local-pdf-embed iframe {
  width: 100%;
  height: min(72vh, 760px);
  min-height: 520px;
  background: #fff;
  border: 0;
  border-radius: 12px;
}

.pdf-embed figcaption {
  margin: 10px 2px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.local-pdf-embed summary {
  padding: 8px 4px 14px;
  color: var(--ink);
  cursor: pointer;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}

.local-pdf-embed:not([open]) {
  padding-bottom: 0;
}

.document-links-section .project-links {
  margin-top: 20px;
}

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

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

@keyframes card-filter-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes header-color-flow {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 100% 50%;
  }
}

@keyframes headline-color-flow {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 100% 50%;
  }
}

@media (max-width: 1280px) {
  .projects {
    width: min(1120px, calc(100vw - 64px));
  }

  .project-open {
    height: 225px;
    flex-basis: 225px;
  }
}

@media (max-width: 980px) {
  .topbar {
    position: sticky;
    top: 0;
    left: 0;
    width: calc(100vw - 24px);
    margin: 12px auto 0;
    border-radius: 999px;
    transform: none;
  }

  .hero,
  .about-grid,
  .ai-principles,
  .document-cover {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 58px;
    line-height: 1.14;
  }

  .hero-visual {
    min-height: 560px;
  }

  .portrait-frame {
    left: 50%;
    right: auto;
    width: min(390px, 72vw);
    transform: translateX(-50%);
  }

  .floating-code {
    right: 4%;
    top: 46px;
    width: min(230px, 40vw);
  }

  .chip-code {
    left: 5%;
  }

  .chip-ai {
    right: 4%;
  }

  .hero-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 10px;
  }

  .hero-meta div:nth-child(2) {
    border-right: 0;
  }

  .hero-meta div:nth-child(n + 3) {
    padding-top: 18px;
    margin-top: 18px;
    border-top: 1px solid var(--line);
  }

  h2 {
    font-size: 38px;
  }

  .projects .section-title {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .projects .section-title .section-note {
    grid-column: 1;
    max-width: 680px;
  }

  .projects .section-title h2,
  .summary-card > h2 {
    font-size: 58px;
  }

  .mission-grid,
  .intro-details,
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .projects {
    width: min(720px, calc(100vw - 36px));
  }

  .ai-principles {
    margin-bottom: 80px;
  }

  .source-document {
    grid-template-columns: 1fr;
  }

  .document-side-nav {
    top: 0;
    display: flex;
    max-height: none;
    padding: 88px 12px 12px;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  }

  .document-side-nav a {
    flex: 0 0 142px;
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 62px;
    padding: 9px 8px;
    border: 1px solid transparent;
    border-radius: 14px;
    text-align: center;
  }

  .source-document-body {
    padding: 22px 18px 44px;
  }

  .document-cover,
  .document-section {
    scroll-margin-top: 176px;
  }

  .document-cover {
    min-height: 420px;
    padding: 34px 22px;
  }

  .document-cover h2 {
    font-size: clamp(36px, 8vw, 58px);
  }

  .document-card-grid,
  .document-gallery,
  .document-facts,
  .document-overview-grid,
  .document-steps li {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .section {
    width: calc(100vw - 28px);
    padding: 72px 0;
  }

  .hero {
    min-height: auto;
    padding-top: 48px;
  }

  h1 {
    font-size: 42px;
    line-height: 1.16;
  }

  h2 {
    font-size: 30px;
  }

  .hero-lead {
    font-size: 16px;
  }

  .hero-visual {
    min-height: 470px;
  }

  .portrait-frame {
    width: min(330px, 86vw);
  }

  .floating-code {
    display: none;
  }

  .skill-chip {
    min-width: 58px;
    min-height: 58px;
    font-size: 22px;
  }

  .chip-code {
    left: 2%;
    top: 48%;
  }

  .chip-brace {
    left: 8%;
    bottom: 14%;
  }

  .chip-ai {
    right: 0;
    bottom: 18%;
    min-width: 150px;
    font-size: 21px;
  }

  .chip-ai small {
    font-size: 11px;
  }

  .hero-meta {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .hero-meta div,
  .hero-meta div:first-child,
  .hero-meta div:last-child {
    padding: 14px 0;
    border-right: 0;
    border-top: 1px solid var(--line);
  }

  .hero-meta div:first-child {
    padding-top: 0;
    border-top: 0;
  }

  .hero-meta div:nth-child(n + 3) {
    margin-top: 0;
  }

  .projects {
    width: calc(100vw - 28px);
    padding-top: 80px;
  }

  .projects .section-title h2,
  .summary-card > h2 {
    font-size: 40px;
    line-height: 1.08;
  }

  .projects .section-title .section-note {
    font-size: 16px;
  }

  .hero-actions,
  .footer {
    align-items: stretch;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .theme-toggle {
    flex: 0 0 42px;
    width: 42px;
  }

  .fact-grid,
  .mission-grid,
  .project-list,
  .intro-details,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .source-document-body {
    padding: 14px 12px 42px;
  }

  .document-cover,
  .document-section {
    border-radius: 16px;
  }

  .document-cover {
    padding: 14px;
  }

  .document-cover,
  .document-section {
    scroll-margin-top: 164px;
  }

  .document-cover img {
    height: 260px;
  }

  .step-evidence img {
    height: 260px;
  }

  .document-side-nav a {
    flex-basis: 118px;
    font-size: 10px;
  }

  .document-section {
    padding: 20px 14px;
  }

  .document-intro {
    font-size: 15px;
  }

  .pdf-embed iframe,
  .local-pdf-embed iframe {
    height: 68vh;
    min-height: 420px;
  }

  .ai-principles {
    width: calc(100vw - 16px);
    margin: 8px auto 72px;
    padding: 44px 18px;
    border-radius: 18px;
  }

  .ai-principles-list div {
    grid-template-columns: 34px 1fr;
    gap: 10px;
  }

  .ai-principles-list small {
    grid-column: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

@media print {
  :root {
    --bg: #ffffff;
    --bg-2: #ffffff;
    --panel: #ffffff;
    --panel-strong: #ffffff;
    --ink: #111111;
    --muted: #444444;
    --line: rgba(0, 0, 0, 0.18);
    --shadow: none;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    box-shadow: none !important;
  }

  body {
    background: #ffffff;
    color: #111111;
  }

  .topbar,
  .scanline,
  .progress,
  .terminal-card,
  .filter-bar,
  .project-dialog {
    display: none !important;
  }

  .section,
  .ai-principles,
  .footer {
    width: auto;
    max-width: none;
    margin: 0;
    padding: 16mm 12mm;
    color: #111111;
    background: #ffffff;
    border: 0;
    border-radius: 0;
  }

  .hero {
    display: block;
    min-height: auto;
    padding-top: 12mm;
  }

  .hero-actions {
    display: none;
  }

  .project-list,
  .mission-grid,
  .intro-details,
  .summary-grid,
  .ai-principles {
    grid-template-columns: 1fr;
  }

  .project-card,
  .mission-card,
  .intro-details article,
  .summary-grid article {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}
