:root {
  --bg-0: #070d12;
  --bg-1: #0d1620;
  --bg-2: #132232;
  --panel: rgba(255, 255, 255, 0.05);
  --line: rgba(173, 216, 255, 0.24);
  --text-0: #e8f1fa;
  --text-1: #bdd2e6;
  --text-2: #87a6c2;
  --accent: #7ed6ff;
  --accent-2: #66f5d8;
  --focus: #ffe89a;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  position: relative;
  font-family: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text-0);
  background:
    radial-gradient(circle at 20% 12%, #15314a 0%, transparent 42%),
    radial-gradient(circle at 88% 20%, #114032 0%, transparent 34%),
    linear-gradient(135deg, var(--bg-0), var(--bg-1) 52%, var(--bg-2));
  line-height: 1.5;
}

.bubble-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bubble {
  position: absolute;
  bottom: -22vh;
  border-radius: 50%;
  border: 1px solid rgba(188, 230, 255, 0.26);
  background: radial-gradient(circle at 30% 28%, rgba(196, 236, 255, 0.32), rgba(126, 214, 255, 0.05) 65%);
  box-shadow: inset -8px -10px 20px rgba(126, 214, 255, 0.1), 0 0 20px rgba(126, 214, 255, 0.08);
  animation-name: drift-up;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.bubble-1 { left: 6%; width: 90px; height: 90px; animation-duration: 42s; animation-delay: -10s; }
.bubble-2 { left: 18%; width: 44px; height: 44px; animation-duration: 30s; animation-delay: -18s; }
.bubble-3 { left: 31%; width: 64px; height: 64px; animation-duration: 36s; animation-delay: -6s; }
.bubble-4 { left: 48%; width: 108px; height: 108px; animation-duration: 48s; animation-delay: -24s; }
.bubble-5 { left: 63%; width: 56px; height: 56px; animation-duration: 34s; animation-delay: -14s; }
.bubble-6 { left: 76%; width: 128px; height: 128px; animation-duration: 54s; animation-delay: -30s; }
.bubble-7 { left: 86%; width: 52px; height: 52px; animation-duration: 32s; animation-delay: -20s; }
.bubble-8 { left: 94%; width: 78px; height: 78px; animation-duration: 45s; animation-delay: -3s; }

@keyframes drift-up {
  0% {
    transform: translate3d(0, 0, 0) scale(0.95);
    opacity: 0;
  }
  14% {
    opacity: 0.42;
  }
  52% {
    transform: translate3d(-14px, -55vh, 0) scale(1.03);
    opacity: 0.34;
  }
  100% {
    transform: translate3d(16px, -125vh, 0) scale(1.1);
    opacity: 0;
  }
}

a {
  color: inherit;
}

.page-enter {
  opacity: 0;
  transform: translateY(8px);
  animation: enter 0.5s ease-out forwards;
}

@keyframes enter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(7, 13, 18, 0.76);
  border-bottom: 1px solid rgba(173, 216, 255, 0.18);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.9rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.explore-wrap {
  position: relative;
}

.explore-trigger {
  border: 1px solid rgba(173, 216, 255, 0.28);
  background: rgba(173, 216, 255, 0.08);
  color: var(--text-0);
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

.explore-trigger:hover,
.explore-trigger[aria-expanded="true"] {
  background: rgba(126, 214, 255, 0.2);
}

.explore-menu {
  list-style: none;
  margin: 0;
  padding: 0.35rem;
  position: absolute;
  right: 0;
  top: 100%;
  min-width: 10rem;
  border-radius: 12px;
  border: 1px solid rgba(173, 216, 255, 0.28);
  background: #0c1721;
  box-shadow: var(--shadow);
  display: none;
}

.explore-menu[data-open="true"] {
  display: block;
}

.explore-menu a {
  display: block;
  text-decoration: none;
  color: var(--text-0);
  padding: 0.48rem 0.64rem;
  border-radius: 8px;
}

.explore-menu a:hover,
.explore-menu a:focus-visible {
  background: rgba(126, 214, 255, 0.16);
}

.home-main,
.domain-main {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.1rem 1.2rem 3.6rem;
}

.hero {
  max-width: 760px;
}

.eyebrow {
  margin: 0;
  font-size: 0.95rem;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.about-jump {
  text-decoration-line: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.about-sep {
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-weight: 300;
  letter-spacing: 0.03em;
  opacity: 0.82;
}

.about-jump:hover,
.about-jump:focus-visible {
  text-decoration-line: underline;
}

h1 {
  margin: 0.25rem 0 0;
  line-height: 1.16;
  font-size: clamp(1.6rem, 4.2vw, 2.6rem);
}

.hero-subtitle {
  margin-top: 0.7rem;
  color: var(--text-1);
  max-width: 68ch;
}

.domains-shell {
  margin-top: 1.8rem;
}

.domains-grid {
  position: relative;
  height: 430px;
  max-width: 980px;
  margin: 0 auto;
  overflow: hidden;
}

.domain-node {
  position: absolute;
  width: clamp(160px, 19vw, 230px);
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  border: 1px solid rgba(173, 216, 255, 0.24);
  background:
    radial-gradient(circle at 32% 28%, rgba(126, 214, 255, 0.3), rgba(126, 214, 255, 0.05));
  box-shadow: inset 0 0 18px rgba(126, 214, 255, 0.08), 0 8px 18px rgba(0, 0, 0, 0.24);
  color: var(--text-0);
  text-decoration: none;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
  animation-name: domain-drift-a;
  animation-duration: 3.4s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

.domain-node:hover,
.domain-node:focus-visible {
  animation-play-state: paused;
  transform: translate3d(var(--x, 0), var(--y, 0), 0) scale(1.04);
  border-color: rgba(126, 214, 255, 0.72);
  box-shadow: inset 0 0 20px rgba(126, 214, 255, 0.14), 0 10px 20px rgba(0, 0, 0, 0.28);
}

.domain-node:focus-visible,
.explore-trigger:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.domain-node.is-entering {
  animation-play-state: paused;
  transform: translate3d(var(--x, 0), var(--y, 0), 0) scale(1.08);
}

.domain-label {
  font-size: clamp(1rem, 2vw, 1.22rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: center;
  max-width: 90%;
}

.domain-hint {
  margin-top: 0.35rem;
  text-align: center;
  color: var(--text-2);
  font-size: 0.9rem;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.domain-node:hover .domain-hint,
.domain-node:focus-visible .domain-hint {
  opacity: 1;
  transform: translateY(0);
}

.domain-node:nth-child(1) {
  left: 3%;
  top: 4%;
  z-index: 2;
  animation-name: domain-drift-a;
  animation-duration: 6.8s;
  animation-delay: -1.4s;
}

.domain-node:nth-child(2) {
  left: 29%;
  top: 2%;
  z-index: 3;
  animation-name: domain-drift-b;
  animation-duration: 6.2s;
  animation-delay: -3.4s;
}

.domain-node:nth-child(3) {
  right: 6%;
  top: 8%;
  z-index: 2;
  animation-name: domain-drift-c;
  animation-duration: 6.5s;
  animation-delay: -2s;
}

.domain-node:nth-child(4) {
  left: 16%;
  top: 46%;
  z-index: 4;
  animation-name: domain-drift-d;
  animation-duration: 7.1s;
  animation-delay: -4.4s;
}

.domain-node:nth-child(5) {
  left: 45%;
  top: 44%;
  z-index: 1;
  animation-name: domain-drift-e;
  animation-duration: 6.0s;
  animation-delay: -2.8s;
}

.domain-node:nth-child(6) {
  right: 8%;
  top: 48%;
  z-index: 5;
  animation-name: domain-drift-f;
  animation-duration: 6.6s;
  animation-delay: -5.1s;
}

@keyframes domain-drift-a {
  0% {
    transform: translate3d(0, 0, 0);
  }
  60% {
    transform: translate3d(20px, -28px, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes domain-drift-b {
  0% {
    transform: translate3d(0, 0, 0);
  }
  58% {
    transform: translate3d(-22px, -24px, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes domain-drift-c {
  0% {
    transform: translate3d(0, 0, 0);
  }
  62% {
    transform: translate3d(26px, 18px, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes domain-drift-d {
  0% {
    transform: translate3d(0, 0, 0);
  }
  60% {
    transform: translate3d(-24px, 20px, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes domain-drift-e {
  0% {
    transform: translate3d(0, 0, 0);
  }
  57% {
    transform: translate3d(18px, -30px, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes domain-drift-f {
  0% {
    transform: translate3d(0, 0, 0);
  }
  61% {
    transform: translate3d(-20px, -22px, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

.domain-header {
  margin-bottom: 1.4rem;
}

.domain-intro {
  margin: 0.5rem 0 0;
  color: var(--text-1);
  max-width: 70ch;
}

.keyword-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1rem 0 2rem;
}

.keyword-strip span {
  padding: 0.22rem 0.58rem;
  border-radius: 999px;
  border: 1px solid rgba(173, 216, 255, 0.35);
  color: var(--text-1);
  font-size: 0.84rem;
  background: rgba(173, 216, 255, 0.08);
}

.section-title {
  margin: 0 0 0.8rem;
  font-size: 1.25rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.9rem;
}

.project-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 0.9rem;
}

.project-card h3 {
  margin: 0;
  font-size: 1.03rem;
}

.project-meta {
  margin: 0.4rem 0 0;
  color: var(--text-2);
  font-size: 0.9rem;
}

.project-summary {
  margin: 0.62rem 0;
  color: var(--text-1);
  font-size: 0.95rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.34rem;
}

.tags span {
  font-size: 0.77rem;
  color: var(--text-1);
  background: rgba(102, 245, 216, 0.14);
  border: 1px solid rgba(102, 245, 216, 0.35);
  border-radius: 999px;
  padding: 0.16rem 0.45rem;
}

.links {
  margin-top: 0.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.links a {
  font-size: 0.84rem;
  text-decoration: none;
  color: var(--accent);
}

.links a:hover,
.links a:focus-visible {
  color: #a7e8ff;
  text-decoration: underline;
}

.archive-section {
  margin-top: 2rem;
}

.archive-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.75rem;
}

.archive-list li {
  border: 1px solid rgba(173, 216, 255, 0.22);
  background: rgba(173, 216, 255, 0.06);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
}

.archive-list p {
  margin: 0.35rem 0 0;
  color: var(--text-1);
  font-size: 0.93rem;
}

.archive-list .tags {
  margin-top: 0.55rem;
}

@media (max-width: 900px) {
  .domains-grid {
    max-width: 760px;
    height: 380px;
  }

  .domain-node {
    width: clamp(145px, 24vw, 195px);
  }
}

@media (max-width: 560px) {
  .header-inner {
    padding: 0.8rem 0.9rem;
  }

  .home-main,
  .domain-main {
    padding: 1.4rem 0.9rem 3rem;
  }

  .domains-grid {
    display: block;
    position: relative;
    height: 420px;
    max-width: 100%;
    overflow: hidden;
  }

  .domain-node {
    position: absolute;
    aspect-ratio: 1 / 1;
    width: min(42vw, 150px);
    min-height: 0;
    border-radius: 999px;
    margin: 0;
    transform: none;
  }

  .domain-hint {
    display: none;
  }

  .domain-label {
    font-size: clamp(0.72rem, 3.2vw, 0.95rem);
    line-height: 1.05;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bubble {
    animation: none;
    opacity: 0.18;
  }

  .domain-node {
    animation: none;
  }
}
