:root {
  --bg: #070909;
  --bg-raised: #0b0f0f;
  --panel: #101515;
  --panel-light: #141b1b;
  --line: #2a3434;
  --line-strong: #455252;
  --text: #edf4f2;
  --muted: #8e9c99;
  --cyan: #4de8e1;
  --orange: #ff9b4a;
  --green: #8ee86f;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 0;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    var(--bg);
  background-size: 32px 32px;
  font-family: Inter, "Helvetica Neue", Arial, "Noto Sans JP", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  width: min(calc(100% - 48px), var(--max-width));
  margin-inline: auto;
}

.site-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 9, 9, 0.92);
}

.header-inner {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.main-nav {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.brand-mark {
  width: 10px;
  height: 10px;
  border: 2px solid var(--cyan);
  box-shadow: 0 0 12px rgba(77, 232, 225, 0.35);
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(18px, 4vw, 38px);
  color: var(--muted);
}

.main-nav a,
.button,
.card-link,
.link-card {
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--cyan);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
  min-height: 640px;
  align-items: center;
  gap: clamp(48px, 7vw, 88px);
  padding-block: 84px 96px;
}

.eyebrow,
.section-index {
  margin: 0 0 18px;
  color: var(--cyan);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

#hero-title {
  margin: 0;
  overflow-wrap: normal;
  word-break: keep-all;
  font-size: clamp(3.1rem, 6vw, 5.2rem);
  font-weight: 800;
  letter-spacing: -0.065em;
  line-height: 0.88;
}

.hero-description {
  max-width: 560px;
  margin: 32px 0 0;
  color: #b5c0be;
  font-size: clamp(0.96rem, 2vw, 1.08rem);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid var(--line-strong);
  background: var(--bg-raised);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.button-primary {
  border-color: var(--cyan);
  color: var(--bg);
  background: var(--cyan);
}

.button:hover,
.button:focus-visible {
  border-color: var(--cyan);
  transform: translateY(-2px);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: #78f4ee;
}

.synth-panel {
  position: relative;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background:
    radial-gradient(circle at 85% 10%, rgba(77, 232, 225, 0.08), transparent 30%),
    linear-gradient(145deg, var(--panel-light), var(--panel));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38), inset 0 0 0 3px #0b0e0e;
}

.synth-panel::before,
.synth-panel::after {
  position: absolute;
  width: 5px;
  height: 5px;
  border: 1px solid #596462;
  border-radius: 50%;
  content: "";
}

.synth-panel::before {
  top: 7px;
  left: 7px;
}

.synth-panel::after {
  right: 7px;
  bottom: 7px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 3px 14px;
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.signal-light {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--green);
}

.signal-light::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 9px rgba(142, 232, 111, 0.7);
  content: "";
}

.scope {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border: 1px solid #34403e;
  background: #080c0c;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8);
}

.scope-grid {
  position: absolute;
  inset: 0;
  opacity: 0.75;
  background:
    linear-gradient(rgba(77, 232, 225, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 232, 225, 0.08) 1px, transparent 1px);
  background-size: 10% 25%;
}

.scope-grid::before,
.scope-grid::after {
  position: absolute;
  background: rgba(77, 232, 225, 0.16);
  content: "";
}

.scope-grid::before {
  top: 50%;
  right: 0;
  left: 0;
  height: 1px;
}

.scope-grid::after {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
}

.waveform {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 88%;
  height: auto;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 5px rgba(77, 232, 225, 0.48));
}

.waveform polyline {
  fill: none;
  stroke: var(--cyan);
  stroke-linecap: square;
  stroke-linejoin: miter;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.scope-readout {
  position: absolute;
  right: 12px;
  bottom: 9px;
  left: 12px;
  display: flex;
  justify-content: space-between;
  color: rgba(77, 232, 225, 0.7);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
}

.controls {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 24px 12px 8px;
}

.control {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-direction: column;
  gap: 10px;
  color: var(--muted);
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.knob {
  position: relative;
  width: 52px;
  height: 52px;
  border: 2px solid #596260;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 35%, #394240, #111616 63%);
  box-shadow: 0 5px 10px #050707, inset 0 0 0 3px #202827;
}

.knob::after {
  position: absolute;
  top: 5px;
  left: 50%;
  width: 2px;
  height: 15px;
  background: currentColor;
  box-shadow: 0 0 5px currentColor;
  content: "";
  transform: translateX(-50%) rotate(28deg);
  transform-origin: 50% 21px;
}

.knob-cyan {
  color: var(--cyan);
}

.knob-orange {
  color: var(--orange);
}

.slider {
  position: relative;
  display: block;
  width: 6px;
  height: 52px;
  border: 1px solid #414a48;
  background: #080b0b;
}

.slider span {
  position: absolute;
  top: 17px;
  left: 50%;
  width: 20px;
  height: 10px;
  border: 1px solid #68726f;
  background: #252d2c;
  transform: translateX(-50%);
}

.jack {
  width: 42px;
  height: 42px;
  border: 8px solid #3c4543;
  border-radius: 50%;
  background: #030404;
  box-shadow: 0 4px 10px #050707, inset 0 0 0 2px #141919;
}

.project-section,
.links-section {
  padding-block: 52px 86px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.section-heading .section-index {
  margin-bottom: 4px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  letter-spacing: -0.035em;
  line-height: 1;
}

.section-heading > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

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

.project-card {
  --accent: var(--cyan);
  position: relative;
  display: flex;
  min-height: 310px;
  min-width: 0;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 2px solid var(--accent);
  border-radius: 3px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.018), transparent 45%), var(--panel);
}

.project-card::after {
  position: absolute;
  right: -30px;
  bottom: -30px;
  width: 105px;
  height: 105px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: 50%;
  box-shadow: inset 0 0 0 12px var(--panel), inset 0 0 0 13px color-mix(in srgb, var(--accent) 15%, transparent);
  content: "";
  pointer-events: none;
}

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

.accent-orange {
  --accent: var(--orange);
}

.accent-green {
  --accent: var(--green);
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 62%, transparent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.status-live::before,
.status-public::before {
  width: 5px;
  height: 5px;
  margin-right: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 7px currentColor;
  content: "";
}

.card-number {
  color: #66716f;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
}

.project-card h3 {
  margin: 44px 0 12px;
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.project-card p {
  margin: 0;
  color: #9eaaa7;
  font-size: 0.88rem;
  line-height: 1.75;
}

.card-link {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 36px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: var(--accent);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

a.card-link:hover,
a.card-link:focus-visible {
  color: var(--text);
  border-color: var(--accent);
}

.card-link-muted {
  color: #65706e;
}

.links-section {
  padding-bottom: 120px;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.link-card {
  display: grid;
  min-width: 0;
  min-height: 100px;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 13px;
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--panel);
  font-size: 0.9rem;
  font-weight: 700;
}

.link-card span {
  color: var(--cyan);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.58rem;
}

.link-card b {
  color: var(--muted);
  font-weight: 400;
}

.link-card:hover,
.link-card:focus-visible {
  border-color: var(--cyan);
  background: var(--panel-light);
  transform: translateY(-2px);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #050707;
}

.footer-inner {
  display: flex;
  min-height: 210px;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  padding-block: 42px;
}

.footer-brand {
  margin: 0 0 7px;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.footer-inner p:not(.footer-brand) {
  max-width: 510px;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.footer-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  color: #68726f;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 64px;
    padding-block: 76px 88px;
  }

  .hero-copy {
    max-width: 680px;
  }

  .synth-panel {
    width: min(100%, 680px);
  }

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

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

@media (max-width: 620px) {
  .container {
    width: min(calc(100% - 32px), var(--max-width));
  }

  .header-inner {
    min-height: 82px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding-block: 14px;
  }

  .main-nav {
    gap: 20px;
    font-size: 0.66rem;
  }

  .hero {
    gap: 52px;
    padding-block: 60px 72px;
  }

  #hero-title {
    font-size: clamp(3rem, 16vw, 4.5rem);
  }

  .hero-description br {
    display: none;
  }

  .button {
    flex: 1 1 150px;
  }

  .synth-panel {
    padding: 14px;
  }

  .scope {
    min-height: 180px;
  }

  .controls {
    gap: 8px;
    padding-inline: 0;
  }

  .knob {
    width: 42px;
    height: 42px;
  }

  .knob::after {
    height: 12px;
    transform-origin: 50% 17px;
  }

  .slider {
    height: 42px;
  }

  .slider span {
    top: 14px;
  }

  .jack {
    width: 36px;
    height: 36px;
    border-width: 7px;
  }

  .project-section,
  .links-section {
    padding-block: 42px 66px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .card-grid,
  .card-grid-two,
  .link-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    min-height: 290px;
  }

  .links-section {
    padding-bottom: 88px;
  }

  .link-card {
    min-height: 78px;
  }

  .footer-inner {
    min-height: 240px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 34px;
  }

  .footer-meta {
    align-items: flex-start;
    white-space: normal;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
