@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400&family=Source+Serif+4:ital,wght@0,300;0,400;0,600;1,300&display=swap');

:root {
  --mint: #99ffcc;
  --neon: #00ff41;
  --ink: #001e3c;
  --ink-deep: #00152b;
  --ink-soft: #032a4b;
  --line: rgba(153, 255, 204, 0.26);
  --line-soft: rgba(153, 255, 204, 0.14);
  --paper: #eafff4;
  --dim: rgba(224, 255, 240, 0.74);
  --mute: rgba(234, 255, 244, 0.55);
  --serif: 'Playfair Display', 'Songti SC', 'Noto Serif SC', Georgia, serif;
  --body: 'Source Serif 4', 'Songti SC', Georgia, 'Times New Roman', serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --radius: 18px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 17px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--paper);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.78;
  background:
    radial-gradient(70vw 62vh at 84% -8%, rgba(0, 255, 65, 0.17), transparent 68%),
    radial-gradient(58vw 54vh at -12% 28%, rgba(153, 255, 204, 0.14), transparent 70%),
    linear-gradient(180deg, var(--ink-deep) 0%, var(--ink) 44%, #002a49 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: -12% -10% auto -10%;
  height: 72vh;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle at 32% 42%, rgba(0, 255, 65, 0.16), transparent 56%);
  filter: blur(44px);
  animation: breathe 13s ease-in-out infinite;
}

.site-head,
main,
.site-foot {
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 3px;
  border-radius: 6px;
}

img {
  max-width: 100%;
  height: auto;
}

.cell {
  display: block;
  width: 40px;
  height: 40px;
  background: radial-gradient(circle at 32% 30%, var(--mint), var(--neon) 82%);
  border-radius: 58% 42% 47% 53% / 52% 55% 45% 48%;
  animation: breathe 8s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.55; }
  50% { transform: scale(1.09); opacity: 0.9; }
}

@keyframes drift {
  0%, 100% { border-radius: 58% 42% 47% 53% / 52% 55% 45% 48%; }
  50% { border-radius: 44% 56% 62% 38% / 41% 47% 53% 59%; }
}

/* ------ header ------ */

.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(0, 24, 44, 0.84);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.7rem 1.2rem 0.45rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  text-decoration: none;
  color: var(--mint);
}

.brand .mark {
  width: 32px;
  height: 32px;
  border-radius: 50% 46% 52% 48% / 48% 52% 48% 52%;
  object-fit: cover;
  border: 1px solid var(--line);
}

.brand-cell {
  width: 22px;
  height: 22px;
  animation-duration: 6s;
}

.brand-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: 0.07em;
  color: var(--paper);
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.5rem 1.15rem;
  border-radius: 999px;
  background: linear-gradient(118deg, var(--mint), var(--neon));
  color: #00220f;
  font-family: var(--mono);
  font-size: 0.94rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 1px solid rgba(0, 255, 65, 0.55);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 5px rgba(0, 255, 65, 0.16);
}

.menu {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 0.5rem 0.55rem;
}

.menu p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.1rem;
  margin: 0;
}

.menu a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.35rem 0.72rem;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: color 0.24s ease, background 0.24s ease, border-color 0.24s ease;
}

.menu a:hover {
  color: #00220f;
  background: var(--mint);
  border-color: var(--mint);
}

/* ------ hero ------ */

.hero {
  display: flex;
  align-items: center;
  min-height: 45vh;
}

.hero-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.6rem;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.2rem 1.2rem 1.6rem;
}

.hero h1 {
  margin: 0;
  text-align: left;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 900;
  font-size: clamp(1.95rem, 7.2vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.012em;
  color: var(--paper);
  background: linear-gradient(102deg, var(--paper) 12%, var(--mint) 76%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-fig {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
}

.hero-art {
  width: 84px;
  height: 84px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(0, 255, 65, 0.45));
}

.hero-cell {
  position: absolute;
  width: 32px;
  height: 32px;
  opacity: 0.5;
  animation: drift 9s ease-in-out infinite;
}

.hero-cell.a {
  left: -4px;
  bottom: 0;
  filter: blur(0.4px);
}

.hero-cell.b {
  right: -2px;
  top: 2px;
  width: 19px;
  height: 19px;
  animation-delay: -3.5s;
}

/* ------ layout grid ------ */

.wrap {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 2.3rem;
  max-width: 1120px;
  margin: 0 auto;
  padding: 1rem 1.2rem 4.5rem;
}

hr {
  border: 0;
  width: 74px;
  height: 2px;
  margin: 0.6rem 0 1.3rem;
  background: linear-gradient(90deg, var(--neon), rgba(0, 255, 65, 0));
}

/* ------ aside ------ */

.rail {
  position: sticky;
  top: 138px;
  align-self: start;
  padding: 1.05rem 0.95rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(0, 30, 60, 0.52);
  animation: drift 16s ease-in-out infinite;
}

.rail h2 {
  margin: 0 0 0.45rem;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.04rem;
  letter-spacing: 0.1em;
  color: var(--mint);
}

.rail hr {
  width: 46px;
  margin: 0 0 0.7rem;
}

.rail ul {
  display: grid;
  gap: 0.12rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rail a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0.3rem 0.55rem;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--dim);
  font-size: 0.98rem;
  text-decoration: none;
  transition: color 0.22s ease, background 0.22s ease;
}

.rail a:hover {
  color: #00220f;
  background: var(--mint);
}

/* ------ content ------ */

.content {
  padding: 1.5rem 1.35rem 2.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(0, 22, 44, 0.42);
  min-width: 0;
}

.prose {
  max-width: 68ch;
}

.prose section {
  scroll-margin-top: 152px;
}

.prose section + section {
  margin-top: 3rem;
  padding-top: 2.2rem;
  border-top: 1px dashed var(--line-soft);
}

.prose h2 {
  margin: 2.9rem 0 0.35rem;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.55rem, 4.4vw, 2.1rem);
  line-height: 1.22;
  letter-spacing: -0.008em;
  color: var(--mint);
  text-wrap: balance;
}

.prose h2:first-child,
.prose section > h2:first-child {
  margin-top: 0.4rem;
}

.prose h3 {
  margin: 2rem 0 0.35rem;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.26rem;
  line-height: 1.35;
  color: var(--paper);
}

.prose p {
  margin: 0 0 1.15rem;
  text-wrap: pretty;
}

.prose a {
  color: var(--neon);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.prose a:hover {
  color: var(--mint);
}

.prose strong {
  color: var(--mint);
  font-weight: 600;
}

.prose ul,
.prose ol {
  margin: 0 0 1.3rem;
  padding-left: 1.25rem;
}

.prose li {
  margin: 0.35rem 0;
}

.prose li::marker {
  color: var(--neon);
}

.prose blockquote {
  margin: 1.5rem 0;
  padding: 0.9rem 1.2rem;
  border-left: 3px solid var(--neon);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: rgba(0, 255, 65, 0.06);
  font-style: italic;
  color: var(--dim);
}

.prose img {
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.prose code {
  font-family: var(--mono);
  font-size: 0.92em;
  color: var(--mint);
}

/* ------ footer ------ */

.site-foot {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  background: rgba(0, 20, 38, 0.72);
}

.foot-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.1rem 1.2rem 1rem;
}

.foot-cols dl {
  margin: 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.foot-cols dt {
  margin-bottom: 0.4rem;
  font-family: var(--mono);
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  color: var(--neon);
}

.foot-cols dd {
  margin: 0;
  color: var(--dim);
}

.foot-cols a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--dim);
  text-decoration: none;
}

.foot-cols a:hover {
  color: var(--mint);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.foot-base {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.7rem 1.2rem 2.2rem;
  text-align: center;
  border-top: 1px dashed var(--line-soft);
}

.foot-base p {
  margin: 0.25rem 0;
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--mute);
}

/* ------ reveal ------ */

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

/* ------ responsive ------ */

@media (max-width: 900px) {
  .wrap {
    grid-template-columns: 1fr;
    gap: 1.3rem;
    padding-bottom: 3.2rem;
  }

  .rail {
    position: static;
    order: 2;
    animation: none;
  }

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

  .content {
    order: 1;
  }

  .rail hr {
    width: 60px;
  }
}

@media (max-width: 760px) {
  .foot-cols {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  html {
    font-size: 16.5px;
  }

  .head-top {
    padding: 0.6rem 0.9rem 0.35rem;
  }

  .menu {
    padding: 0 0.35rem 0.5rem;
  }

  .menu a {
    padding: 0.3rem 0.55rem;
  }

  .hero-in {
    gap: 0.9rem;
    padding: 1.6rem 0.9rem 1.1rem;
  }

  .hero-fig {
    width: 78px;
    height: 78px;
  }

  .hero-art {
    width: 62px;
    height: 62px;
  }

  .hero-cell {
    width: 24px;
    height: 24px;
  }

  .wrap {
    padding: 0.8rem 0.9rem 2.8rem;
  }

  .content {
    padding: 1.15rem 0.95rem 1.7rem;
  }

  .prose section {
    scroll-margin-top: 138px;
  }

  .foot-cols {
    padding: 1.6rem 0.9rem 0.9rem;
  }

  .foot-base {
    padding: 0.6rem 0.9rem 1.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

button[aria-expanded]{min-width:44px;min-height:44px}
