:root {
  --bg: #090a0d;
  --bg-soft: #0f1116;
  --card: rgba(18, 20, 27, 0.78);
  --card-hover: rgba(25, 28, 37, 0.95);
  --text: #f2f3f5;
  --muted: #9b9faa;
  --line: rgba(255, 255, 255, 0.09);
  --accent: #b6a0ff;
  --accent-soft: rgba(182, 160, 255, 0.13);
  --max: 1050px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 50% -10%, rgba(182, 160, 255, 0.08), transparent 38%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
}

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

.bg-glow {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  opacity: .09;
  z-index: -1;
}

.glow-one {
  top: 10%;
  left: -250px;
  background: #8f78ff;
}

.glow-two {
  top: 55%;
  right: -280px;
  background: #596cff;
}

.topbar {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
  padding: 25px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  letter-spacing: -.02em;
}

.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 18px rgba(182, 160, 255, .7);
}

.date {
  color: var(--muted);
  font-size: .82rem;
  font-variant-numeric: tabular-nums;
}

main {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
}

.hero {
  min-height: 82vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 90px 0 110px;
}

.eyebrow,
.mini-label {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .18em;
}

.hero h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(3.3rem, 8vw, 6.9rem);
  line-height: .94;
  letter-spacing: -.065em;
}

.hero h1 span {
  color: var(--muted);
}

.intro {
  max-width: 700px;
  margin: 28px 0 0;
  color: #c4c6ce;
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 34px;
}

.button {
  padding: 11px 17px;
  border: 1px solid var(--line);
  border-radius: 9px;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
  font-size: .9rem;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  color: #0d0c12;
  background: var(--text);
  border-color: var(--text);
}

.button.ghost {
  color: var(--muted);
  background: rgba(255,255,255,.025);
}

.button.ghost:hover {
  color: var(--text);
  border-color: rgba(255,255,255,.18);
}

.section {
  padding: 105px 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  align-items: baseline;
  margin-bottom: 38px;
}

.section-heading > span {
  color: var(--accent);
  font-size: .75rem;
  font-weight: 700;
}

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

.story {
  max-width: 790px;
  margin-left: 56px;
  color: #b7bac3;
  font-size: 1.04rem;
}

.story p {
  margin: 0 0 22px;
}

.highlight {
  color: var(--text);
  border-left: 2px solid var(--accent);
  padding-left: 18px;
}

.section-lead {
  max-width: 720px;
  margin: -12px 0 30px 56px;
  color: var(--muted);
}

.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-left: 56px;
}

.project {
  min-height: 145px;
  display: grid;
  grid-template-columns: 36px 1fr 20px;
  gap: 14px;
  align-items: start;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 13px;
  transition: transform .25s ease, background .25s ease, border-color .25s ease;
  backdrop-filter: blur(12px);
}

.project:hover {
  transform: translateY(-3px);
  background: var(--card-hover);
  border-color: rgba(182, 160, 255, .28);
}

.project-number {
  color: var(--accent);
  font-size: .7rem;
  font-weight: 700;
  padding-top: 3px;
}

.project h3 {
  margin: 0 0 5px;
  font-size: 1.02rem;
}

.project p {
  margin: 0;
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.5;
}

.arrow {
  color: var(--muted);
  transition: transform .2s ease, color .2s ease;
}

.project:hover .arrow {
  color: var(--text);
  transform: translate(2px, -2px);
}

.chibi-showcase {
  display: grid;
  grid-template-columns: minmax(300px, .9fr) 1.1fr;
  gap: 55px;
  align-items: center;
}

.chibi-main {
  min-height: 500px;
  display: grid;
  place-items: center;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 30%, rgba(182,160,255,.09), transparent 48%),
    var(--card);
  overflow: hidden;
}

.chibi-main img {
  width: min(100%, 440px);
  max-height: 560px;
  object-fit: contain;
  filter: drop-shadow(0 22px 35px rgba(0,0,0,.38));
  transition: opacity .2s ease, transform .3s ease;
}

.chibi-main img.changing {
  opacity: .2;
  transform: scale(.98);
}

.chibi-text h3 {
  margin: 0 0 12px;
  font-size: 2rem;
  line-height: 1.05;
  letter-spacing: -.035em;
}

.chibi-text > p:not(.mini-label) {
  color: var(--muted);
}

.chibi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 25px;
}

.chibi-thumb {
  height: 105px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0c0d11;
  cursor: pointer;
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease;
}

.chibi-thumb:hover,
.chibi-thumb.active {
  transform: translateY(-2px);
  border-color: rgba(182,160,255,.5);
}

.chibi-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.socials {
  margin-left: 56px;
  border-top: 1px solid var(--line);
}

.socials a {
  display: grid;
  grid-template-columns: 1fr 1fr 25px;
  gap: 15px;
  align-items: center;
  padding: 19px 5px;
  border-bottom: 1px solid var(--line);
  transition: padding .2s ease, color .2s ease;
}

.socials a:hover {
  padding-left: 12px;
  color: var(--text);
}

.socials span {
  font-weight: 600;
}

.socials small {
  color: var(--muted);
}

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

.footer {
  padding: 65px 0 45px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  color: var(--muted);
}

.footer strong {
  color: var(--text);
}

.footer p {
  margin: 4px 0 0;
  font-size: .86rem;
}

.footer > span {
  font-size: .78rem;
  white-space: nowrap;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease, transform .7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 760px) {
  .hero {
    min-height: 75vh;
    padding: 70px 0 90px;
  }

  .section {
    padding: 75px 0;
  }

  .projects,
  .story,
  .section-lead,
  .socials {
    margin-left: 0;
  }

  .projects {
    grid-template-columns: 1fr;
  }

  .chibi-showcase {
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .chibi-main {
    min-height: 390px;
  }

  .footer {
    align-items: start;
    flex-direction: column;
  }

  .footer > span {
    white-space: normal;
  }
}

@media (max-width: 500px) {
  main,
  .topbar {
    width: min(calc(100% - 28px), var(--max));
  }

  .hero h1 {
    font-size: 3.25rem;
  }

  .socials a {
    grid-template-columns: 1fr 25px;
  }

  .socials small {
    display: none;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }

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

.chibi-credit {
  display: flex;
  gap: 10px;
  margin-top: 25px;
  flex-wrap: wrap;
}

.chibi-credit a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  font-size: .88rem;
  transition: .2s ease;
}

.chibi-credit a:hover {
  color: var(--text);
  border-color: rgba(182, 160, 255, .35);
  transform: translateY(-2px);
}

.chibi-credit span {
  color: var(--accent);
}
