:root {
  --bg: #0d0f12;
  --bg-soft: #13171c;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.14);
  --text: #f4f5f7;
  --muted: #9ea6b0;
  --accent: #d9dde3;
  --shadow: 0 28px 60px rgba(0, 0, 0, 0.42);
  --radius: 20px;
  --nav-bg: rgba(13, 15, 18, 0.5);
}

html[data-theme="light"] {
  --bg: #f1f2f4;
  --bg-soft: #e7eaee;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.9);
  --line: rgba(10, 12, 16, 0.12);
  --text: #101217;
  --muted: #59616c;
  --accent: #101217;
  --shadow: 0 26px 50px rgba(15, 20, 28, 0.14);
  --nav-bg: rgba(241, 242, 244, 0.56);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  background: radial-gradient(circle at 20% 12%, #20252f 0%, transparent 40%),
    radial-gradient(circle at 80% 20%, #1a232f 0%, transparent 42%), var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Helvetica Neue", "PingFang SC", sans-serif;
  overflow: hidden;
  transition: background 400ms ease, color 280ms ease;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 0.5px, transparent 0.5px);
  background-size: 3px 3px;
  opacity: 0.1;
}

.top-nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  width: min(1140px, calc(100% - 26px));
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  transition: box-shadow 320ms ease, border-color 260ms ease;
}

.top-nav.scrolled {
  box-shadow: var(--shadow);
}

.brand {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
}

.menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu-link {
  color: var(--muted);
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 240ms ease, background 240ms ease;
}

.menu-link.active,
.menu-link:hover {
  color: var(--text);
  background: var(--surface-strong);
}

.theme-toggle {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  padding: 8px 14px;
  cursor: pointer;
  font-size: 12px;
}

.side-dots {
  position: fixed;
  z-index: 28;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  gap: 10px;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: transform 240ms ease, background 240ms ease;
}

.dot.active {
  transform: scale(1.4);
  background: var(--accent);
}

.page {
  height: 100dvh;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  position: relative;
  z-index: 2;
}

.panel {
  min-height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  padding: 106px clamp(18px, 4vw, 72px) 56px;
  position: relative;
  display: flex;
  align-items: center;
}

.hero {
  justify-content: center;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(30px);
  pointer-events: none;
}

.glow-a {
  width: 36vw;
  aspect-ratio: 1 / 1;
  left: -6vw;
  top: 12vh;
  background: radial-gradient(circle, rgba(154, 170, 194, 0.24) 0%, transparent 70%);
}

.glow-b {
  width: 28vw;
  aspect-ratio: 1 / 1;
  right: -4vw;
  bottom: 12vh;
  background: radial-gradient(circle, rgba(102, 141, 187, 0.22) 0%, transparent 70%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at center, #000 12%, transparent 80%);
  opacity: 0.22;
}

.hero-content {
  width: min(1140px, 100%);
}

.kicker {
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--muted);
}

.title {
  margin: 0;
  font-weight: 700;
  line-height: 0.98;
  font-size: clamp(54px, 12vw, 172px);
}

.line {
  display: block;
}

.subtitle {
  margin: 30px 0 0;
  width: min(680px, 100%);
  color: var(--muted);
  font-size: clamp(15px, 2vw, 22px);
  line-height: 1.8;
}

.hero-avatar {
  margin-top: 28px;
}

.hero-avatar img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow: var(--shadow);
}

.scroll-tip {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.section-wrap {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(38px, 6vw, 90px);
  line-height: 1.04;
}

.section-head p {
  color: var(--muted);
  line-height: 1.8;
  margin: 14px 0 0;
}

.search-box {
  margin: 28px 0;
}

.search-input {
  width: min(450px, 100%);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  padding: 12px 16px;
  outline: none;
}

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

.blog-item,
.work-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 24px;
}

.meta {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.blog-item h3,
.work-card h3 {
  margin: 0 0 12px;
  font-size: clamp(22px, 2.5vw, 33px);
  line-height: 1.22;
}

.blog-item p,
.work-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.empty {
  margin-top: 16px;
  color: var(--muted);
}

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

.work-card {
  min-height: 200px;
  transition: transform 300ms ease, border-color 240ms ease;
}

.work-card.large {
  grid-column: span 2;
  min-height: 250px;
}

.work-card.wide {
  grid-column: span 2;
}

.work-card:hover {
  transform: translateY(-7px);
  border-color: rgba(255, 255, 255, 0.36);
}

.link-card {
  color: var(--text);
  text-decoration: none;
}

.about-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 34px;
  align-items: end;
}

.about-main h2 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5.6vw, 78px);
  line-height: 1.08;
}

.about-main p {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}

.about-side {
  display: grid;
  gap: 10px;
}

.about-side a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 16px;
  background: var(--surface);
  color: var(--text);
}

.footer {
  position: absolute;
  left: 0;
  bottom: 20px;
  width: 100%;
  text-align: center;
}

.footer p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.footer a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 800ms cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 800ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

@media (max-width: 980px) {
  .blog-list {
    grid-template-columns: 1fr;
  }

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

  .work-card.large,
  .work-card.wide {
    grid-column: span 2;
  }

  .about-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .top-nav {
    width: calc(100% - 12px);
    top: 8px;
  }

  .brand {
    display: none;
  }

  .menu {
    overflow-x: auto;
    width: 100%;
  }

  .menu::-webkit-scrollbar {
    display: none;
  }

  .side-dots {
    right: 8px;
  }

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

  .work-card.large,
  .work-card.wide {
    grid-column: auto;
  }

  .panel {
    padding-top: 96px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
