:root {
  color-scheme: dark;
  --bg: #181818;
  --bg-deep: #111;
  --ink: #d7d7d2;
  --muted: #7f7f7b;
  --dim: #555551;
  --line: rgba(255, 255, 255, 0.08);
  --line-bright: rgba(255, 255, 255, 0.18);
  --green: #ffb12f;
  --font:
    "SFMono-Regular", "Cascadia Code", "Roboto Mono", "IBM Plex Mono", Consolas,
    "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: 8rem;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #efeee8;
  --bg-deep: #d8d7ce;
  --ink: #1d1d1b;
  --muted: #5e5d58;
  --dim: #87847a;
  --line: rgba(0, 0, 0, 0.1);
}

body {
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.06), transparent 18rem),
    radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.035), transparent 26rem),
    linear-gradient(180deg, #1a1a1a 0%, var(--bg-deep) 100%);
  color: var(--ink);
  font-family: var(--font);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

html[data-theme="light"] body {
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.72), transparent 18rem),
    radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.6), transparent 28rem),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
}

a,
button {
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-decoration: none;
}

button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.mecha-bg,
.grain,
.scanline {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.mecha-bg {
  z-index: 0;
  opacity: 1;
  background-image:
    radial-gradient(ellipse at center, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.46) 42%, rgba(0, 0, 0, 0.2) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.34)),
    url("/assets/akusa-evangelion-tech-nature.gif?v=3");
  background-position: center;
  background-size: cover;
  filter: saturate(1.34) contrast(1.16) brightness(1.05);
  image-rendering: pixelated;
  mix-blend-mode: normal;
}

.grain {
  z-index: 1;
  opacity: 0.16;
  background-image:
    radial-gradient(circle at 18% 18%, rgba(255, 186, 54, 0.18), transparent 22rem),
    radial-gradient(circle at 82% 70%, rgba(218, 22, 28, 0.16), transparent 19rem),
    repeating-linear-gradient(90deg, rgba(255, 120, 28, 0.04) 0 1px, transparent 1px 34px);
  background-size: cover, cover, auto;
  mix-blend-mode: screen;
}

html[data-theme="light"] .mecha-bg {
  opacity: 0.92;
  background-image:
    radial-gradient(ellipse at center, rgba(244, 238, 224, 0.68) 0%, rgba(244, 238, 224, 0.42) 42%, rgba(244, 238, 224, 0.08) 100%),
    linear-gradient(180deg, rgba(255, 246, 224, 0.08), rgba(232, 223, 204, 0.18)),
    url("/assets/akusa-evangelion-tech-nature-light.gif?v=4");
  filter: saturate(1.16) contrast(1.08) brightness(1.02);
  mix-blend-mode: normal;
}

html[data-theme="light"] .grain {
  opacity: 0.16;
  mix-blend-mode: normal;
}

.scanline {
  z-index: 2;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.018) 0,
    rgba(255, 255, 255, 0.018) 1px,
    transparent 1px,
    transparent 6px
  );
}

.site-header,
.utility-nav,
.system-footer,
.about-panel,
.shell {
  position: relative;
  z-index: 3;
}

.site-header,
.utility-nav {
  z-index: 10;
}

.site-header,
.utility-nav,
.system-footer {
  position: fixed;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
  font-size: clamp(0.68rem, 0.85vw, 0.86rem);
  line-height: 1.8;
}

.site-header {
  top: clamp(1.3rem, 3vw, 2.6rem);
  left: clamp(1.2rem, 4vw, 3rem);
  flex-direction: column;
  align-items: flex-start;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--ink);
}

.brand-icon {
  width: 1.1rem;
  height: 1.1rem;
  object-fit: contain;
  filter: brightness(1.18) contrast(1.06);
  mix-blend-mode: screen;
  opacity: 0.95;
}

html[data-theme="light"] .brand-icon {
  filter: invert(1) brightness(0.72) contrast(1.2);
  mix-blend-mode: multiply;
}

.tagline {
  display: flex;
  gap: 0.66rem;
  align-items: center;
  margin: 0;
  color: var(--dim);
}

.outline-dot {
  width: 0.42rem;
  height: 0.42rem;
  border: 1px solid currentColor;
}

.utility-nav {
  top: clamp(1.3rem, 3vw, 2.6rem);
  right: clamp(1.2rem, 4vw, 3rem);
}

.utility-nav a,
.utility-nav button,
.footer-links a,
.project-link {
  transition:
    color 160ms ease,
    opacity 160ms ease;
}

.utility-nav a:hover,
.utility-nav button:hover,
.footer-links a:hover,
.project-link:hover {
  color: var(--ink);
}

.half-dot {
  display: inline-block;
  width: 0.62rem;
  height: 0.62rem;
  margin-right: 0.45rem;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--muted) 0 50%, transparent 50% 100%);
  border: 1px solid var(--muted);
  vertical-align: -0.06rem;
}

.shell {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: clamp(6.2rem, 11vh, 8rem) clamp(1rem, 4vw, 4rem) clamp(5.8rem, 10vh, 7rem);
}

.hero {
  width: min(66rem, 100%);
  display: grid;
  justify-items: center;
  text-align: center;
}

.ascii-logo {
  width: 100%;
  margin: 0 0 clamp(1.25rem, 3vh, 2rem);
  overflow: hidden;
  color: var(--ink);
  font-family: var(--font);
  font-size: clamp(0.38rem, 0.72vw, 0.72rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: 0;
  text-align: center;
  text-transform: none;
  white-space: pre;
  text-shadow:
    0 0 18px rgba(255, 255, 255, 0.1),
    0 0 1px rgba(255, 255, 255, 0.34);
}

.hero-copy {
  max-width: 52rem;
  margin-bottom: clamp(1.35rem, 3vh, 2rem);
}

h1,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0.82rem;
  color: var(--ink);
  font-size: clamp(1.05rem, 1.85vw, 1.42rem);
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: 0.08em;
  text-transform: none;
}

.hero-copy p,
.about-panel p {
  margin-bottom: 0;
  color: #a9a9a4;
  font-size: clamp(0.72rem, 0.95vw, 0.9rem);
  line-height: 1.68;
  letter-spacing: 0.03em;
  text-transform: none;
}

html[data-theme="light"] .hero-copy p,
html[data-theme="light"] .about-panel p {
  color: #3f3c37;
}

html[data-theme="light"] .project-link,
html[data-theme="light"] .footer-links,
html[data-theme="light"] .about-actions,
html[data-theme="light"] .system-footer {
  color: #4f4a42;
}

.hero-copy p + p {
  margin-top: 0.85rem;
}

.project-strip {
  display: grid;
  width: min(68rem, 100%);
  gap: 0;
  margin-bottom: clamp(1.1rem, 2.5vh, 1.7rem);
}

.project-link {
  display: grid;
  grid-template-columns: 0.5rem 9rem minmax(0, 1fr) 9.5rem;
  align-items: baseline;
  gap: 0.75rem;
  max-width: 100%;
  padding: 0.48rem 0;
  border-top: 1px solid var(--line);
  color: #9a9a95;
  font-size: clamp(0.68rem, 0.82vw, 0.82rem);
  line-height: 1.5;
  text-align: left;
  white-space: normal;
}

.project-link:last-child {
  border-bottom: 1px solid var(--line);
}

.project-link strong {
  color: var(--ink);
  font-weight: 500;
  letter-spacing: 0.22em;
}

.project-link span:not(.diamond) {
  letter-spacing: 0.04em;
  text-transform: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-link em {
  color: var(--dim);
  font-style: normal;
  letter-spacing: 0.04em;
  text-transform: none;
  text-align: right;
}

.diamond {
  width: 0.46rem;
  height: 0.46rem;
  border: 1px solid var(--ink);
  transform: rotate(45deg);
  flex: 0 0 auto;
}

.primary-project .diamond {
  border-color: var(--green);
  box-shadow: 0 0 16px rgba(255, 177, 47, 0.32);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(1.2rem, 2.5vw, 2.5rem);
  color: var(--dim);
  font-size: clamp(0.68rem, 0.78vw, 0.78rem);
}

.about-panel {
  width: min(42rem, calc(100vw - 2.4rem));
  margin: -1.35rem auto 0;
  color: var(--muted);
  text-align: center;
}

.about-panel p {
  font-size: clamp(0.66rem, 0.74vw, 0.74rem);
  color: var(--dim);
}

.about-page {
  position: relative;
  z-index: 3;
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: clamp(7rem, 14vh, 9rem) clamp(1rem, 4vw, 4rem) clamp(5rem, 10vh, 7rem);
}

.about-card {
  width: min(48rem, 100%);
  text-align: left;
}

.about-card .kicker {
  margin-bottom: 0.8rem;
  color: var(--green);
  font-size: clamp(0.68rem, 0.78vw, 0.8rem);
  letter-spacing: 0.28em;
}

.about-card h1 {
  margin-bottom: 1rem;
}

.about-card p {
  color: #a9a9a4;
  font-size: clamp(0.78rem, 1vw, 0.94rem);
  line-height: 1.72;
  letter-spacing: 0.03em;
  text-transform: none;
}

html[data-theme="light"] .about-card p {
  color: #47423b;
}

.about-actions {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1rem, 2.5vw, 2rem);
  margin-top: 1.6rem;
  color: var(--dim);
  font-size: clamp(0.68rem, 0.78vw, 0.78rem);
}

.about-actions a:hover {
  color: var(--ink);
}

.system-footer {
  position: relative;
  justify-content: center;
  padding: 1.2rem;
  color: var(--dim);
}

@media (min-width: 901px) {
  html,
  body {
    height: 100%;
    overflow: hidden;
  }

  .shell {
    height: 100svh;
    min-height: 0;
  }

  .about-page {
    height: 100svh;
    min-height: 0;
  }

  .about-panel {
    position: fixed;
    left: 50%;
    bottom: 3rem;
    transform: translateX(-50%);
    margin: 0;
  }

  .system-footer {
    position: fixed;
    left: 1.2rem;
    right: 1.2rem;
    bottom: 1.2rem;
    padding: 0;
  }
}

@media (max-width: 900px) {
  body {
    letter-spacing: 0.13em;
  }

  .utility-nav {
    top: auto;
    bottom: clamp(1.2rem, 3vw, 2rem);
    right: clamp(1.2rem, 4vw, 3rem);
  }

  .system-footer {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    padding: 0 1.2rem 1.2rem;
  }
}

@media (max-width: 680px) {
  .site-header {
    right: 1.2rem;
  }

  .tagline {
    max-width: 19rem;
  }

  .shell {
    align-items: center;
    padding-top: 9.5rem;
    padding-bottom: 4rem;
  }

  .ascii-logo {
    font-size: clamp(0.35rem, 2.2vw, 0.58rem);
  }

  .footer-links,
  .system-footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .project-link {
    grid-template-columns: 0.5rem 1fr;
    text-align: left;
  }

  .project-link span:not(.diamond),
  .project-link em {
    grid-column: 2;
    text-align: left;
  }
}
