:root {
  color-scheme: dark;
  --bg: #050b12;
  --bg-2: #0d1720;
  --panel: rgba(14, 20, 28, 0.88);
  --panel-strong: rgba(18, 26, 34, 0.96);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.15);
  --ink: #edf6ff;
  --muted: #a8bac8;
  --muted-2: #7f8ea5;
  --accent: #74f0d4;
  --accent-soft: rgba(116, 240, 212, 0.12);
  --shadow: rgba(0, 0, 0, 0.28);
  --page-gradient: linear-gradient(180deg, var(--bg), #0a1119 32%, #0a1118 100%);
  --grid-line: rgba(255, 255, 255, 0.025);
  --header-surface: rgba(8, 14, 19, 0.72);
  --menu-surface: rgba(8, 14, 19, 0.97);
  --dialog-surface: #101a25;
  --dialog-backdrop: rgba(2, 7, 12, 0.78);
  --soft-surface: rgba(255, 255, 255, 0.025);
  --accent-ink: #072118;
  --accent-text: #b7eade;
  --portal-coordinate: rgba(181, 225, 223, 0.6);
  --portal-coordinate-soft: rgba(181, 225, 223, 0.4);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f7f6;
  --bg-2: #e8f0ef;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-strong: rgba(255, 255, 255, 0.97);
  --line: rgba(20, 48, 52, 0.11);
  --line-strong: rgba(20, 48, 52, 0.2);
  --ink: #142b30;
  --muted: #526b70;
  --muted-2: #71868a;
  --accent: #087f70;
  --accent-soft: rgba(8, 127, 112, 0.11);
  --shadow: rgba(24, 58, 59, 0.12);
  --page-gradient: linear-gradient(180deg, #f7fbfa, #edf4f2 45%, #e8f0ef 100%);
  --grid-line: rgba(20, 48, 52, 0.045);
  --header-surface: rgba(247, 251, 250, 0.82);
  --menu-surface: rgba(247, 251, 250, 0.98);
  --dialog-surface: #fbfdfc;
  --dialog-backdrop: rgba(17, 38, 40, 0.42);
  --soft-surface: rgba(20, 48, 52, 0.035);
  --accent-ink: #ffffff;
  --accent-text: #17685e;
  --portal-coordinate: #526b70;
  --portal-coordinate-soft: #71868a;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  background:
    radial-gradient(circle at top, rgba(80, 135, 255, 0.08), transparent 28%),
    var(--page-gradient);
  color: var(--ink);
  line-height: 1.6;
  transition: background-color 220ms ease, color 220ms ease;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { max-width: 100%; display: block; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at center, rgba(0,0,0,0.8) 25%, transparent 100%);
  opacity: 0.8;
}

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

.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-surface);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 1rem;
}

.brand {
  font-family: "Archivo", sans-serif;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

.brand span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-links a {
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-links a span { color: var(--muted-2); margin-right: 0.4rem; }
.nav-links a.active, .nav-links a:hover { color: var(--accent); }

.nav-tools {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle,
.menu-toggle {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border: 1px solid var(--line);
  background: var(--soft-surface);
  color: var(--ink);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.theme-toggle:hover,
.menu-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}

.theme-toggle {
  flex: 0 0 auto;
}

.theme-icon {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.theme-icon-moon,
:root[data-theme="light"] .theme-icon-sun {
  display: none;
}

:root[data-theme="light"] .theme-icon-moon {
  display: block;
}

.menu-toggle {
  display: none;
  position: relative;
}

.menu-toggle span {
  position: absolute;
  left: 12px; right: 12px;
  height: 1.5px;
  background: var(--ink);
  border-radius: 999px;
  transition: transform 0.2s ease;
}
.menu-toggle span:first-child { top: 14px; }
.menu-toggle span:last-child { bottom: 14px; }

.mobile-menu {
  position: fixed;
  inset: 72px 0 auto 0;
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1.1rem 1.4rem;
  background: var(--menu-surface);
  border-bottom: 1px solid var(--line);
  z-index: 40;
}

.mobile-menu a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 0.35rem;
  border-bottom: 1px solid var(--line);
  font-family: "Archivo", sans-serif;
  font-size: clamp(2.2rem, 9vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}
.mobile-menu a span {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--muted-2);
}

main {
  position: relative;
  z-index: 1;
  padding-bottom: 4rem;
}

.hero {
  min-height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 5rem;
  padding-bottom: 2.4rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  width: fit-content;
  margin-bottom: 1.6rem;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.pulse {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(116, 240, 212, 0.7);
  animation: pulse 1.7s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(116, 240, 212, 0.7); }
  70% { box-shadow: 0 0 0 12px rgba(116, 240, 212, 0); }
  100% { box-shadow: 0 0 0 0 rgba(116, 240, 212, 0); }
}

.monogram-wrap {
  display: grid;
  justify-items: center;
  width: 100%;
  margin: 0 auto 1.4rem;
  perspective: 1000px;
}

.monogram-stage {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 660px);
  height: clamp(220px, 35vh, 340px);
  isolation: isolate;
  transform-style: preserve-3d;
  transform: rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transition: transform 450ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.monogram-halo {
  position: absolute;
  width: 42%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(116, 240, 212, 0.22), rgba(72, 145, 255, 0.08) 38%, transparent 72%);
  filter: blur(14px);
  transform: translateZ(-45px);
}

.monogram {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  margin: 0;
  padding: 0 0.14em 0.16em 0;
  color: transparent;
  font-family: "Archivo", sans-serif;
  font-size: clamp(11rem, 31vw, 21rem);
  font-weight: 900;
  line-height: 0.76;
  letter-spacing: -0.105em;
  background: linear-gradient(145deg, #ffffff 7%, #e3f4f5 29%, #91abb5 48%, #fbffff 62%, #526e7b 83%, #d0fbf3 100%);
  background-clip: text;
  -webkit-background-clip: text;
  filter: drop-shadow(0 4px 0 rgba(194, 225, 232, 0.8))
    drop-shadow(0 9px 0 rgba(73, 104, 118, 0.8))
    drop-shadow(0 19px 14px rgba(0, 0, 0, 0.55))
    drop-shadow(0 0 30px rgba(116, 240, 212, 0.22));
  transform: translateZ(32px);
  animation: monogram-float 7s ease-in-out infinite;
}

.monogram-g {
  display: inline-block;
}

.monogram sup {
  display: inline-block;
  margin: 0.1em 0 0 -0.02em;
  color: transparent;
  font-size: 0.42em;
  line-height: 1;
  letter-spacing: -0.08em;
  background: linear-gradient(145deg, #eafffb, #74f0d4 45%, #348f91 78%, #d9fff8);
  background-clip: text;
  -webkit-background-clip: text;
  filter: drop-shadow(0 3px 0 rgba(38, 126, 122, 0.9))
    drop-shadow(0 8px 0 rgba(24, 66, 76, 0.75))
    drop-shadow(0 13px 12px rgba(0, 0, 0, 0.5));
}

.monogram-reflection {
  position: absolute;
  z-index: 1;
  bottom: 9%;
  width: 38%;
  height: 17%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(116, 240, 212, 0.22), rgba(116, 240, 212, 0.04) 45%, transparent 75%);
  filter: blur(11px);
  transform: rotateX(68deg) translateZ(-10px);
}

.orbit {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 65%;
  height: 38%;
  border: 1px solid rgba(139, 231, 225, 0.34);
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(116, 240, 212, 0.08), inset 0 0 12px rgba(116, 240, 212, 0.035);
  pointer-events: none;
}

.orbit-one {
  transform: translate(-50%, -50%) rotate(-18deg) rotateX(65deg);
  animation: orbit-turn 19s linear infinite;
}

.orbit-two {
  width: 76%;
  height: 29%;
  border-color: rgba(138, 180, 255, 0.27);
  transform: translate(-50%, -50%) rotate(26deg) rotateX(66deg);
  animation: orbit-turn-reverse 25s linear infinite;
}

.orbit-three {
  width: 54%;
  height: 48%;
  border-color: rgba(116, 240, 212, 0.18);
  transform: translate(-50%, -50%) rotate(68deg) rotateX(72deg);
  animation: orbit-turn 31s linear infinite;
}

.orbit-node {
  position: absolute;
  z-index: 4;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #bbfff5;
  box-shadow: 0 0 8px 3px rgba(116, 240, 212, 0.56), 0 0 24px rgba(116, 240, 212, 0.5);
}

.node-one {
  top: 25%;
  left: 22%;
  animation: node-drift 6s ease-in-out infinite;
}

.node-two {
  right: 19%;
  bottom: 25%;
  width: 5px;
  height: 5px;
  animation: node-drift 8s ease-in-out -2s infinite reverse;
}

.monogram-caption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin: -0.25rem 0 1.8rem;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.caption-rule {
  width: clamp(20px, 5vw, 52px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(116, 240, 212, 0.65));
}

.caption-rule:last-child {
  transform: rotate(180deg);
}

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

.portal-hero + .hero {
  display: none;
}

.portal-hero {
  min-height: calc(100vh - 72px);
  display: grid;
  justify-content: stretch;
  grid-template-rows: 1fr auto;
  gap: 1.4rem;
  padding-top: clamp(1.5rem, 4vh, 3rem);
  padding-bottom: 2rem;
}

.portal-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.78fr) minmax(0, 1.22fr);
  grid-template-areas: "copy art";
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4rem);
  min-height: 0;
}

.portal-copy {
  position: relative;
  z-index: 1;
  grid-area: copy;
}

.portal-copy .status-pill {
  margin-bottom: 1.7rem;
}

.portal-copy .hero-meta {
  flex-direction: column;
  align-items: flex-start;
  gap: 1.6rem;
  padding: 0;
  border: 0;
}

.portal-copy .hero-meta p {
  max-width: 23rem;
  font-size: clamp(1.45rem, 2.6vw, 2.2rem);
  line-height: 1.3;
  letter-spacing: -0.035em;
}

.portal-composition {
  grid-area: art;
  display: grid;
  justify-items: center;
  width: 100%;
  margin: 0;
  perspective: 1100px;
}

.portal-art {
  --portal-x: 0deg;
  --portal-y: 0deg;
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 680px);
  height: clamp(420px, 65vh, 590px);
  transform: rotateX(var(--portal-x)) rotateY(var(--portal-y));
  transform-style: preserve-3d;
  transition: transform 500ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.portal-aura {
  position: absolute;
  inset: 13% 18%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(44, 184, 169, 0.18), rgba(72, 145, 255, 0.06) 42%, transparent 72%);
  filter: blur(20px);
  animation: portal-aura-breathe 6s ease-in-out infinite;
}

.portal-orbit {
  position: absolute;
  width: 72%;
  height: 33%;
  border: 1px solid rgba(116, 240, 212, 0.14);
  border-radius: 50%;
  transform: rotate(-14deg) rotateX(69deg);
}

.portal-orbit-a {
  animation: portal-orbit-pulse 7s ease-in-out infinite;
}

.portal-orbit-b {
  width: 56%;
  height: 58%;
  border-color: rgba(138, 180, 255, 0.12);
  transform: rotate(58deg) rotateX(70deg);
  animation: portal-orbit-pulse 9s ease-in-out -2s infinite reverse;
}

.portal-symbol {
  position: relative;
  z-index: 1;
  width: min(100%, 510px);
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 26px 22px rgba(0, 0, 0, 0.3));
}

.portal-floor-glow {
  fill: rgba(116, 240, 212, 0.16);
  filter: blur(14px);
}

.portal-ring-back {
  fill: none;
  stroke: rgba(116, 240, 212, 0.1);
  stroke-width: 36;
  transform-origin: 328px 261px;
  animation: portal-ring-breathe 5s ease-in-out infinite;
}

.portal-ring-edge {
  fill: none;
  stroke: url(#portalEdge);
  stroke-width: 17;
  stroke-linecap: round;
  filter: drop-shadow(0 7px 4px rgba(0, 0, 0, 0.6));
}

.portal-ring-face {
  fill: none;
  stroke: url(#portalMetal);
  stroke-width: 10;
  stroke-linecap: round;
}

.portal-ring-light {
  fill: none;
  stroke: rgba(116, 240, 212, 0.74);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 110 850;
  filter: url(#portalGlow);
  animation: portal-light-travel 8s linear infinite;
}

.portal-g,
.portal-g-shadow {
  font-family: "Archivo", sans-serif;
  font-size: 348px;
  font-weight: 900;
  letter-spacing: -28px;
}

.portal-g-shadow {
  fill: #243d49;
  stroke: #243d49;
  stroke-width: 14px;
  transform: translate(0, 16px);
}

.portal-g {
  fill: url(#portalMetal);
  stroke: url(#portalEdge);
  stroke-width: 2px;
  paint-order: stroke fill;
}

.portal-trail-glow,
.portal-trail {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.portal-trail-glow {
  stroke: rgba(116, 240, 212, 0.7);
  stroke-width: 21;
  filter: url(#portalGlow);
}

.portal-trail {
  stroke: url(#portalTrace);
  stroke-width: 8;
  stroke-dasharray: 26 14;
  animation: portal-trail-flow 4s linear infinite;
}

.portal-spark {
  fill: #effffb;
  filter: url(#portalGlow);
  animation: portal-spark-pulse 2.6s ease-in-out infinite;
}

.portal-spark-b {
  animation-delay: -1.3s;
}

.portal-coordinate {
  position: absolute;
  color: var(--portal-coordinate);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.16em;
}

.coordinate-top {
  top: 10%;
  right: 14%;
  color: var(--portal-coordinate-soft);
}

.coordinate-bottom {
  bottom: 10%;
  left: 10%;
  font-size: 0.54rem;
}

.portal-caption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

@keyframes portal-aura-breathe {
  0%, 100% { opacity: 0.58; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.08); }
}

@keyframes portal-orbit-pulse {
  0%, 100% { opacity: 0.45; scale: 0.96; }
  50% { opacity: 1; scale: 1.04; }
}

@keyframes portal-ring-breathe {
  0%, 100% { opacity: 0.45; stroke-width: 28; }
  50% { opacity: 0.9; stroke-width: 41; }
}

@keyframes portal-light-travel {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -960; }
}

@keyframes portal-trail-flow {
  to { stroke-dashoffset: -80; }
}

@keyframes portal-spark-pulse {
  0%, 100% { opacity: 0.55; scale: 0.75; }
  50% { opacity: 1; scale: 1.3; }
}

@keyframes monogram-float {
  0%, 100% { transform: translate3d(0, 2px, 32px) rotateZ(-1deg); }
  50% { transform: translate3d(0, -8px, 42px) rotateZ(1deg); }
}

@keyframes orbit-turn {
  from { rotate: 0deg; }
  to { rotate: 360deg; }
}

@keyframes orbit-turn-reverse {
  from { rotate: 360deg; }
  to { rotate: 0deg; }
}

@keyframes node-drift {
  0%, 100% { translate: 0 0; opacity: 0.65; }
  50% { translate: 0 -8px; opacity: 1; }
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.2rem 2rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}

.hero-meta p {
  max-width: 28rem;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.45rem);
}
.hero-meta strong { color: var(--ink); }

.portal-socials {
  justify-content: flex-start;
  gap: clamp(1.5rem, 5vw, 4rem);
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-fill {
  background: linear-gradient(180deg, #8be7d5, var(--accent));
  color: var(--accent-ink);
  border-color: transparent;
  box-shadow: 0 14px 30px rgba(116, 240, 212, 0.25);
}
.btn-line { background: transparent; color: var(--ink); }

.social-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.4rem;
  width: 100%;
}
.social-row a {
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.ticker {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.01);
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-scroll 26s linear infinite;
  white-space: nowrap;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1.25rem;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.ticker-item::after {
  content: "";
  width: 0.33rem;
  height: 0.33rem;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.content-section { padding-top: 6rem; }
.section-heading { margin-bottom: 2rem; }
.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: lowercase;
}
.section-heading h2 {
  margin: 0;
  font-family: "Archivo", sans-serif;
  font-size: clamp(2.3rem, 5vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 1rem;
}

.about-card, .project-card, .contact-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  box-shadow: 0 16px 35px rgba(0,0,0,0.15);
}

.about-card {
  min-height: 220px;
  padding: 1.5rem;
}
.about-card.large { display: flex; align-items: center; }
.about-card p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.mini-label {
  margin-bottom: 0.8rem;
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.project-card {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  padding: 1.4rem 1.3rem 1.2rem;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.project-card:hover {
  transform: translateY(-5px);
  border-color: rgba(116, 240, 212, 0.32);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.25);
}
.project-card::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  right: -70px;
  bottom: -95px;
  border: 1px solid rgba(116, 240, 212, 0.13);
  border-radius: 50%;
  box-shadow: 0 0 0 16px rgba(116, 240, 212, 0.025), 0 0 0 32px rgba(116, 240, 212, 0.02);
  pointer-events: none;
}
.project-card.featured {
  background: linear-gradient(180deg, rgba(116, 240, 212, 0.08), rgba(18,22,31,0.9));
}

:root[data-theme="light"] .project-card.featured {
  background: linear-gradient(180deg, rgba(8, 127, 112, 0.08), var(--panel-strong));
}

:root[data-theme="light"] .portal-ring-back {
  stroke: rgba(8, 127, 112, 0.13);
}

:root[data-theme="light"] .portal-ring-edge {
  stroke: #718b90;
}

:root[data-theme="light"] .portal-ring-face {
  stroke: #c0d0d1;
}

:root[data-theme="light"] .portal-g {
  fill: #849da1;
  stroke: #637d82;
}

:root[data-theme="light"] .portal-g-shadow {
  fill: #d5e1e0;
  stroke: #d5e1e0;
}

.project-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.project-badge {
  display: inline-block;
  margin-bottom: 0.8rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-number {
  margin-bottom: 0.8rem;
  color: var(--muted-2);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
}

.project-card h3 {
  margin: 0 0 0.75rem;
  font-family: "Archivo", sans-serif;
  font-size: clamp(1.55rem, 3vw, 2rem);
  letter-spacing: -0.05em;
}
.project-card p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.project-detail {
  margin-top: 1.15rem;
}

.project-detail h4,
.project-tech h4 {
  margin: 0 0 0.45rem;
  color: var(--ink);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-detail p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.65;
}

.project-detail ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.project-detail li::before {
  content: "▹";
  color: var(--accent);
  margin-right: 0.45rem;
}

.project-tech {
  margin-top: 1.2rem;
}

.project-tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.project-tech-list span {
  padding: 0.32rem 0.58rem;
  border: 1px solid rgba(116, 240, 212, 0.19);
  border-radius: 999px;
  background: rgba(116, 240, 212, 0.045);
  color: var(--accent-text);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
}

.project-outcome {
  margin: 1.1rem 0 0 !important;
  padding: 0.8rem 0 0;
  border-top: 1px solid var(--line);
  color: var(--ink) !important;
  font-size: 0.85rem;
}

.project-quote {
  margin: 1.2rem 0 0;
  padding: 1rem;
  border-left: 2px solid var(--accent);
  border-radius: 0 0.7rem 0.7rem 0;
  background: rgba(116, 240, 212, 0.045);
  position: relative;
  z-index: 1;
}

.project-quote p {
  margin: 0 0 0.65rem;
  color: var(--ink);
  font-size: 0.88rem;
  font-style: italic;
}

.project-quote cite {
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  font-style: normal;
  letter-spacing: 0.05em;
}

.project-snippet {
  margin: 0 0 1rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(116, 240, 212, 0.16);
  border-radius: 0.7rem;
  background:
    linear-gradient(90deg, rgba(116, 240, 212, 0.08), transparent 80%),
    rgba(255,255,255,0.015);
  color: var(--accent-text);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  position: relative;
  z-index: 1;
}

.project-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  color: var(--ink);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}
.project-card li::before {
  content: "▹";
  color: var(--accent);
  margin-right: 0.4rem;
}

.project-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.project-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 1.25rem;
}
.project-actions .project-link {
  margin-top: 0;
}
.project-link[type="button"] {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.project-link span {
  transition: transform 0.2s ease;
}
.project-link:hover span {
  transform: translate(2px, -2px);
}

.case-dialog {
  width: min(700px, calc(100% - 2rem));
  max-width: none;
  max-height: min(85vh, 900px);
  padding: clamp(1.25rem, 4vw, 2.5rem);
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 1.25rem;
  background: var(--dialog-surface);
  color: var(--ink);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55);
}
.case-dialog::backdrop {
  background: var(--dialog-backdrop);
  backdrop-filter: blur(5px);
}
.case-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}
.case-dialog-header .eyebrow {
  margin-bottom: 0.5rem;
}
.case-dialog-header h2 {
  margin: 0;
  font-family: "Archivo", sans-serif;
  font-size: clamp(1.7rem, 5vw, 2.5rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}
.case-dialog-close {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  font-size: 1.5rem;
  cursor: pointer;
}
.case-dialog-body {
  padding: 0.3rem 0 1.25rem;
}
.case-dialog-body .project-detail:first-child {
  margin-top: 0.9rem;
}
.case-dialog-visit {
  width: fit-content;
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}
.links-grid a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 86px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--soft-surface);
  color: var(--ink);
  font-family: "Archivo", sans-serif;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

.contact-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 1.2rem;
}
.contact-box p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding: 1.2rem 0 2rem;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
}

@media (max-width: 920px) {
  .about-grid, .project-grid { grid-template-columns: 1fr 1fr; }
  .links-grid { grid-template-columns: 1fr 1fr; }
  .social-row { justify-content: flex-start; }
  .contact-box { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 860px) {
  .portal-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "status" "art" "copy";
    gap: 0.25rem;
  }
  .portal-copy {
    display: contents;
  }
  .portal-copy .status-pill {
    grid-area: status;
    margin: 0 0 0.7rem;
  }
  .portal-copy .hero-meta {
    grid-area: copy;
  }
  .portal-copy .hero-meta {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .portal-copy .hero-meta p {
    font-size: clamp(1.25rem, 3.2vw, 1.8rem);
  }
  .portal-art { height: min(54vw, 460px); }
  .portal-symbol { width: min(100%, 430px); }
}

@media (max-width: 720px) {
  .desktop-nav { display: none !important; }
  .menu-toggle { display: block; }
  .hero { min-height: auto; padding-top: 4rem; padding-bottom: 1.8rem; }
  .monogram-stage { height: clamp(195px, 62vw, 280px); }
  .monogram { font-size: clamp(9rem, 43vw, 14rem); }
  .portal-hero {
    min-height: auto;
    grid-template-rows: auto auto;
    gap: 1.1rem;
    padding-top: 1.5rem;
  }
  .portal-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "status" "art" "copy";
    gap: 0.2rem;
  }
  .portal-copy .status-pill { margin-bottom: 0.35rem; }
  .portal-copy .hero-meta { gap: 1.2rem; }
  .portal-copy .hero-meta p {
    max-width: 32rem;
    font-size: clamp(1.2rem, 5vw, 1.55rem);
  }
  .portal-art { height: min(88vw, 350px); }
  .portal-symbol { width: min(100%, 390px); }
  .coordinate-top { right: 4%; }
  .coordinate-bottom { left: 3%; }
  .portal-caption { font-size: 0.58rem; gap: 0.5rem; letter-spacing: 0.1em; }
  .about-grid, .project-grid, .links-grid { grid-template-columns: 1fr; }
  .hero-meta { align-items: flex-start; min-width: 0; }
  .hero-meta > p {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .status-pill { font-size: 0.66rem; letter-spacing: 0.04em; }
  .btn { width: 100%; }
  .cta-row {
    width: 100%;
    min-width: 0;
    flex-direction: column;
  }
  .cta-row .btn { min-width: 0; }
  .social-row { min-width: 0; }
  .portal-socials { justify-content: space-between; gap: 0.7rem; }
  .portal-socials a { font-size: 0.66rem; }
  .project-actions { gap: 1rem; }
  .case-dialog {
    width: calc(100% - 1rem);
    max-height: 90dvh;
    padding: 1.1rem;
  }
  .case-dialog-header > div { min-width: 0; }
  .case-dialog-visit { width: 100%; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
}

@media (max-width: 360px) {
  .monogram-stage { height: 190px; }
  .monogram { font-size: 8.5rem; }
}

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