:root {
  color-scheme: dark;
  --bg: #070711;
  --bg-soft: #0c0b18;
  --text: #eeeaff;
  --muted: #aaa1c4;
  --dim: #746b8a;
  --line: rgba(238, 234, 255, 0.15);
  --panel: rgba(255, 255, 255, 0.045);
  --blue: #3856f4;
  --violet: #8a4cff;
  --pink: #d95cff;
  --lime: #c8ec48;
  --max: 1040px;
  font-family: "JetBrains Mono", "JetBrainsMono Nerd Font", "Cascadia Mono", Consolas, monospace;
  background: var(--bg);
  color: var(--text);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 10% 12%, rgba(200, 236, 72, 0.11), transparent 18rem),
    radial-gradient(circle at 85% 18%, rgba(56, 86, 244, 0.18), transparent 24rem),
    linear-gradient(135deg, #080812, #05050b 62%, #0e0814);
  font-size: 15px;
}

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

.bg-noise {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 36px 36px;
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 18px;
  left: 50%;
  width: min(var(--max), calc(100vw - 28px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 7, 17, 0.94);
  transform: translateX(-50%);
}

.brand {
  font-size: 0.95rem;
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 28px);
  color: var(--muted);
  font-size: 0.78rem;
}

.nav-links a,
.lang-switch,
.plain-link {
  transition:
    color 140ms ease,
    opacity 140ms ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"],
.plain-link:hover {
  color: var(--text);
}

.lang-switch {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--lime);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
}

.landing {
  position: relative;
  width: 100%;
  max-width: 100vw;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 120px 20px 64px;
  overflow: hidden;
}

.landing-copy {
  position: relative;
  z-index: 2;
  width: min(620px, 100%);
  padding: 18px;
  text-align: center;
}

.tiny-label {
  margin: 0 0 14px;
  color: var(--lime);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1.2;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

.landing-copy p:not(.tiny-label),
.page-hero p:not(.tiny-label),
.project-row p,
.note p {
  color: var(--muted);
  line-height: 1.8;
}

.manga-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0.26;
}

.manga-panel {
  position: absolute;
  width: clamp(120px, 18vw, 230px);
  aspect-ratio: 2 / 3;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  transform: translate3d(0, var(--panel-y, 0), 0) rotate(var(--panel-r, 0deg));
}

.manga-panel img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  opacity: 0.78;
}

.panel-a {
  top: 22%;
  left: 6%;
  --panel-r: -8deg;
}

.panel-b {
  right: 8%;
  top: 17%;
  --panel-r: 7deg;
}

.panel-c {
  left: 58%;
  bottom: 8%;
  --panel-r: -3deg;
}

.page-shell {
  width: min(var(--max), calc(100vw - 32px));
  margin: 0 auto;
  padding: 150px 0 76px;
}

.page-hero {
  max-width: 700px;
  margin-bottom: 42px;
}

.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3.8rem);
}

.project-list {
  display: grid;
  gap: 12px;
}

.project-row,
.note,
.skill-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.project-row {
  display: grid;
  grid-template-columns: 0.7fr 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 18px;
}

.project-row h2,
.note h2,
.skill-card h3 {
  margin-bottom: 0;
  font-size: 1rem;
}

.project-row p {
  margin-bottom: 0;
  font-size: 0.88rem;
}

.status {
  color: var(--lime);
  font-size: 0.75rem;
}

.note-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.content-section {
  margin-top: 46px;
}

.section-title {
  margin-bottom: 16px;
}

.section-title h2 {
  margin-bottom: 0;
  font-size: 1.2rem;
}

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

.skill-card {
  padding: 16px;
}

.skill-card h3 {
  margin-top: 0;
  margin-bottom: 12px;
}

.skill-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.7;
}

.note {
  padding: 18px;
}

.note h2 {
  margin-bottom: 14px;
}

.plain-link {
  color: var(--lime);
  font-size: 0.9rem;
}

.contact-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  margin-top: 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.contact-card h2 {
  margin-bottom: 10px;
  font-size: 1.05rem;
}

.contact-card p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

.discord-cta {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: rgba(88, 101, 242, 0.12);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
}

.discord-cta:hover,
.discord-cta.copied {
  color: var(--lime);
}

.discord-cta svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.site-footer {
  width: min(var(--max), calc(100vw - 32px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto;
  padding: 0 0 26px;
  color: var(--dim);
  font-size: 0.78rem;
}

.site-footer a {
  color: var(--muted);
}

.social-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  cursor: pointer;
}

.social-icon:hover {
  color: var(--lime);
}

.social-icon svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.discord-copy.copied {
  color: var(--lime);
}

.copy-toast {
  position: fixed;
  z-index: 40;
  right: 18px;
  bottom: 18px;
  max-width: min(320px, calc(100vw - 36px));
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 7, 17, 0.96);
  color: var(--text);
  font-size: 0.78rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 140ms ease,
    transform 140ms ease;
}

.copy-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 760px) {
  body {
    font-size: 14px;
  }

  .site-header {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: flex-start;
    width: min(320px, calc(100vw - 24px));
    padding: 12px;
  }

  .brand {
    flex: 1 0 auto;
  }

  .nav-links {
    grid-column: 1 / -1;
    order: 3;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    font-size: 0.66rem;
  }

  .nav-links a {
    text-align: center;
  }

  .landing {
    place-items: start center;
    padding-top: 190px;
  }

  .landing-copy {
    width: 100%;
    max-width: 260px;
    text-align: center;
  }

  h1 {
    font-size: clamp(1.25rem, 6vw, 1.55rem);
    line-height: 1.25;
  }

  .manga-layer {
    opacity: 0.18;
  }

  .panel-a {
    left: -14%;
  }

  .panel-b {
    right: -12%;
  }

  .panel-c {
    left: 44%;
  }

  .project-row,
  .note-grid,
  .skill-grid,
  .contact-card {
    grid-template-columns: 1fr;
  }

  .project-row {
    gap: 12px;
  }

  .site-footer {
    flex-direction: column;
  }
}

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