:root {
  --bg: #070709;
  --bg-elevated: rgba(14, 14, 21, 0.72);
  --surface: rgba(19, 19, 27, 0.84);
  --surface-soft: rgba(16, 16, 24, 0.68);
  --border: rgba(214, 177, 119, 0.18);
  --border-strong: rgba(214, 177, 119, 0.34);
  --text: #ececf1;
  --text-soft: #c6c6d2;
  --muted: #9191a1;
  --accent: #d6b177;
  --accent-2: #b88646;
  --accent-glow: rgba(214, 177, 119, 0.22);
  --mono: "IBM Plex Mono", "SFMono-Regular", ui-monospace, Menlo, monospace;
  --display: "Sora", "Avenir Next", "Segoe UI", sans-serif;
  --body: "Inter", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  --hand-a-pos: 20% 12%;
  --hand-b-pos: 80% 12%;
  --hand-c-pos: 50% 92%;
  --glow-c-pos: 50% 90%;
  --hand-size: min(46vw, 680px);
  font-family: var(--body);
  line-height: 1.62;
  color: var(--text);
  background: radial-gradient(circle at 78% 8%, rgba(214, 177, 119, 0.08), transparent 35%),
    radial-gradient(circle at 12% 72%, rgba(81, 122, 182, 0.12), transparent 40%),
    var(--bg);
  overflow-x: hidden;
  letter-spacing: 0.01em;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    radial-gradient(circle at var(--hand-a-pos), rgba(255, 126, 34, 0.19), rgba(255, 126, 34, 0) 44%),
    radial-gradient(circle at var(--hand-b-pos), rgba(255, 86, 24, 0.18), rgba(255, 86, 24, 0) 44%),
    radial-gradient(circle at var(--glow-c-pos), rgba(255, 168, 62, 0.17), rgba(255, 168, 62, 0) 46%);
  background-repeat: no-repeat;
  filter: blur(15px) saturate(1.08);
  opacity: 0.72;
  animation: fireGlowPulse 7.5s ease-in-out infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    url("/assets/logo/logo_transparent.webp"),
    url("/assets/logo/logo_transparent.webp"),
    url("/assets/logo/logo_transparent.webp");
  background-repeat: no-repeat;
  background-position:
    var(--hand-a-pos),
    var(--hand-b-pos),
    var(--hand-c-pos);
  background-size:
    var(--hand-size),
    var(--hand-size),
    var(--hand-size);
  opacity: 0.6;
  filter: saturate(1.12) contrast(1.24) brightness(0.88);
}

@keyframes fireGlowPulse {
  0% {
    opacity: 0.62;
    transform: scale(0.992);
  }
  50% {
    opacity: 0.82;
    transform: scale(1.008);
  }
  100% {
    opacity: 0.68;
    transform: scale(1);
  }
}

#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
  background: transparent;
}

#hand-fx-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.78;
  filter: saturate(1.06) contrast(1.08);
}

body.webgl-hands-active::after {
  opacity: 0;
}

nav,
.hero,
.page-hero,
.section,
footer {
  position: relative;
}

nav {
  z-index: 40;
  position: sticky;
  top: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(7, 7, 10, 0.68);
  backdrop-filter: blur(10px);
}

.hero,
.page-hero {
  z-index: 20;
  isolation: isolate;
}

.section,
footer {
  z-index: 10;
}

.nav-container {
  max-width: 1160px;
  margin: auto;
  padding: 15px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--display);
  font-size: 0.96rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #e9cb9d;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(214, 177, 119, 0.34);
  background: rgba(214, 177, 119, 0.08);
}

.logo:hover {
  border-color: rgba(214, 177, 119, 0.52);
  color: #f4dbae;
}

.logo-mark {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: block;
  object-fit: contain;
}

.logo-label {
  transform: translateY(0.5px);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 15px;
}

.nav-links a {
  text-decoration: none;
  color: #ababba;
  font-size: 13px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.hero,
.page-hero,
.section,
footer {
  max-width: 1160px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 22px;
  padding-right: 22px;
}

.hero,
.page-hero {
  padding-top: 96px;
}

.page-hero {
  padding-bottom: 28px;
}

.page-hero h1,
.hero h1,
h2,
h3 {
  font-family: var(--display);
  letter-spacing: -0.01em;
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.9fr);
  gap: 24px;
  align-items: stretch;
}

.hero-core,
.proof-panel,
.card,
.project,
.metric,
.repo,
.timeline-item,
.case-card,
.cap-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(165deg, rgba(22, 22, 31, 0.9), rgba(11, 11, 18, 0.84));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.03), 0 18px 45px rgba(0, 0, 0, 0.35);
}

.hero-core {
  padding: clamp(24px, 4vw, 42px);
  position: relative;
  overflow: hidden;
}

.hero-core::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 8% 20%, rgba(214, 177, 119, 0.12), transparent 42%);
  pointer-events: none;
}

.hero-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  border-radius: 12px;
  border: 1px solid rgba(214, 177, 119, 0.24);
  background: rgba(214, 177, 119, 0.04);
  margin-bottom: 14px;
}

.hero-tab {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: #bfab88;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.hero-tab:hover {
  color: #e2c89d;
}

.hero-tab.active {
  color: #f2dcb7;
  border-color: rgba(214, 177, 119, 0.38);
  background: rgba(214, 177, 119, 0.16);
}

.hero-panel,
.proof-panel-view {
  display: none;
}

.hero-panel.active,
.proof-panel-view.active {
  display: block;
  animation: swapFade 0.3s ease;
}

.eyebrow {
  font-family: var(--mono);
  color: var(--accent);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.16em;
  margin-bottom: 10px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.45rem);
  line-height: 1.1;
  color: #f4ecde;
  max-width: 16ch;
  text-wrap: balance;
}

.hero-meta {
  margin: 16px 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-family: var(--mono);
}

.tagline {
  color: #d6d6e0;
  font-size: clamp(1rem, 1.8vw, 1.22rem);
  margin: 0;
  max-width: 48ch;
}

.intro,
.page-intro {
  color: var(--text-soft);
  font-size: clamp(1rem, 1.32vw, 1.08rem);
  max-width: 64ch;
}

.intro {
  margin-top: 16px;
  max-width: 58ch;
}

.signal {
  margin-top: 14px;
  font-size: 0.93rem;
  color: #a8a8b8;
}

.hero-buttons,
.row-actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
}

.btn,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
  text-decoration: none;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn {
  color: #18130d;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: 600;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px var(--accent-glow);
}

.btn-outline {
  color: #ddc396;
  border: 1px solid rgba(214, 177, 119, 0.42);
  background: rgba(214, 177, 119, 0.05);
}

.btn-outline:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.proof-panel {
  padding: 22px;
  display: grid;
  gap: 12px;
  align-content: start;
  background: linear-gradient(180deg, rgba(24, 21, 20, 0.95), rgba(12, 13, 18, 0.88));
}

.proof-panel h2 {
  margin: 0;
  font-size: 1.06rem;
  color: #ebd1aa;
}

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

.proof-item {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(214, 177, 119, 0.2);
  background: rgba(255, 255, 255, 0.02);
}

.proof-item strong {
  display: block;
  font-family: var(--display);
  color: #f0dbbc;
  font-size: 1.1rem;
  margin-bottom: 2px;
}

.proof-item span {
  color: #b5b5c3;
  font-size: 12px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.chip {
  border: 1px solid rgba(214, 177, 119, 0.32);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  color: #e2cb9f;
  font-family: var(--mono);
  background: rgba(214, 177, 119, 0.07);
}

.section {
  margin-top: 58px;
}

.section h2 {
  margin: 0;
  font-size: clamp(1.3rem, 2.2vw, 1.95rem);
  color: #f0e2cc;
  line-height: 1.18;
  text-wrap: balance;
}

.section-heading {
  margin-bottom: 18px;
  display: grid;
  gap: 8px;
}

.section-heading p,
.section-lead {
  margin: 0;
  max-width: 70ch;
  color: #bbbccc;
}

.stat-strip,
.grid {
  display: grid;
  gap: 14px;
}

.stat-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric {
  padding: 14px;
}

.metric strong {
  display: block;
  margin-bottom: 4px;
  color: #f0d7ac;
  font-size: 1rem;
}

.metric p,
.metric {
  color: #c2c2ce;
  font-size: 0.93rem;
}

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

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

.project,
.card,
.case-card,
.cap-card {
  padding: 20px;
}

.project,
.case-card,
.cap-card,
.repo,
.timeline-item {
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.project:hover,
.case-card:hover,
.cap-card:hover,
.repo:hover,
.timeline-item:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04), 0 24px 55px rgba(0, 0, 0, 0.43);
}

h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  color: #ebd3ac;
  line-height: 1.24;
  text-wrap: balance;
}

p,
li {
  color: #cfd0da;
}

p {
  margin: 0 0 0.9rem;
}

p:last-child {
  margin-bottom: 0;
}

ul,
ol {
  margin: 0;
  padding-left: 19px;
}

li + li {
  margin-top: 7px;
}

a {
  color: #d8bd92;
}

a:hover {
  color: #f2d6a7;
}

.kicker {
  margin-bottom: 8px;
  font-size: 11px;
  font-family: var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #947f5f;
}

.case-grid {
  display: grid;
  gap: 16px;
}

.portfolio-catalog {
  display: grid;
  gap: 12px;
}

.focus-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 7px;
  border-radius: 13px;
  border: 1px solid rgba(214, 177, 119, 0.22);
  background: rgba(17, 17, 25, 0.7);
}

.focus-tab {
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.02);
  color: #b7b7c4;
  border-radius: 10px;
  padding: 8px 13px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.focus-tab:hover {
  border-color: rgba(214, 177, 119, 0.26);
  color: #e5cb9f;
}

.focus-tab.active {
  background: rgba(214, 177, 119, 0.14);
  border-color: rgba(214, 177, 119, 0.46);
  color: #f0d4a6;
}

.portfolio-focus-description {
  margin: 4px 0 0;
  color: #c3c3cf;
}

.portfolio-focus-count {
  margin: -2px 0 0;
}

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

.portfolio-card {
  display: grid;
  gap: 10px;
}

.portfolio-headline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.portfolio-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.portfolio-link-sep {
  color: #7f7f90;
  font-size: 12px;
}

.portfolio-related {
  margin-top: -2px;
  color: #b8b8c6;
  font-size: 13px;
}

.portfolio-empty {
  padding: 18px;
}

.arch-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0 14px;
}

.arch-node {
  border-radius: 999px;
  border: 1px solid rgba(214, 177, 119, 0.32);
  padding: 4px 10px;
  font-size: 11px;
  font-family: var(--mono);
  color: #e3c596;
  background: rgba(214, 177, 119, 0.06);
}

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

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag {
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(126, 159, 215, 0.13);
  border: 1px solid rgba(126, 159, 215, 0.26);
  font-size: 11px;
  color: #b7ccf2;
  font-family: var(--mono);
}

.github-feed,
#github-feed {
  display: grid;
  gap: 13px;
}

.repo {
  padding: 16px;
}

.repo-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.repo-name {
  text-decoration: none;
  font-weight: 600;
  color: #edd0a2;
}

.repo-stars,
.repo-meta,
.muted {
  color: #9f9faf;
  font-size: 12px;
}

.repo-meta-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.repo-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.repo-badge.tool {
  color: #f0d5ac;
  border: 1px solid rgba(237, 177, 103, 0.42);
  background: rgba(237, 177, 103, 0.14);
}

.repo-badge.project {
  color: #bcd4f2;
  border: 1px solid rgba(126, 159, 215, 0.42);
  background: rgba(126, 159, 215, 0.14);
}

.repo-desc {
  font-size: 14px;
  color: #c4c4d0;
}

.repo-topic-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 0;
}

.repo-topic {
  border: 1px solid rgba(214, 177, 119, 0.3);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 10px;
  color: #d8c6a4;
  font-family: var(--mono);
  background: rgba(214, 177, 119, 0.08);
}

.page-intro {
  margin-top: 10px;
}

body.boot-active {
  overflow: hidden;
}

.boot-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: 22px;
  background: radial-gradient(circle at 18% 20%, rgba(126, 159, 215, 0.12), transparent 38%),
    radial-gradient(circle at 78% 12%, rgba(214, 177, 119, 0.13), transparent 42%),
    #05060a;
  transition: opacity 0.38s ease, visibility 0.38s ease;
}

.boot-overlay--exit {
  opacity: 0;
  visibility: hidden;
}

.boot-terminal {
  width: min(760px, 96vw);
  border: 1px solid rgba(214, 177, 119, 0.34);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(16, 17, 23, 0.96), rgba(8, 9, 14, 0.96));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04), 0 26px 56px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.boot-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(214, 177, 119, 0.2);
  background: rgba(214, 177, 119, 0.06);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #dfc79f;
}

.boot-lights {
  display: flex;
  gap: 6px;
}

.boot-lights span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: block;
  background: rgba(255, 255, 255, 0.24);
}

.boot-lights span:nth-child(1) { background: #cd6f6f; }
.boot-lights span:nth-child(2) { background: #d3ab66; }
.boot-lights span:nth-child(3) { background: #72b07b; }

.boot-body {
  padding: 16px 16px 12px;
}

.boot-lines {
  min-height: 130px;
}

.boot-line {
  font-family: var(--mono);
  font-size: 12px;
  color: #bfc8d9;
  margin: 0 0 7px;
  white-space: pre-wrap;
}

.boot-cursor {
  display: inline-block;
  margin-left: 3px;
  color: #f2d3a2;
  animation: blink 0.9s steps(1, end) infinite;
}

.boot-progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(214, 177, 119, 0.24);
  overflow: hidden;
  margin-top: 8px;
}

.boot-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #8dc0f0, #d6b177);
  transition: width 0.22s ease;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  padding: 16px;
}

footer {
  margin-top: 70px;
  padding-top: 36px;
  padding-bottom: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

footer p {
  margin: 0 0 10px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 11px 18px;
}

.footer-links a {
  color: #b6b6c4;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 12px;
}

.footer-links a:hover {
  color: #e5c594;
}

.reveal {
  opacity: 0;
  transform: translateY(8px);
  animation: fadeUp 0.7s ease forwards;
}

.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.16s; }
.delay-3 { animation-delay: 0.24s; }
.delay-4 { animation-delay: 0.32s; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes swapFade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1050px) {
  .hero-shell {
    grid-template-columns: 1fr;
  }

  .proof-grid,
  .stat-strip,
  .grid-3,
  .capability-deck,
  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body {
    --hand-a-pos: 14% 16%;
    --hand-b-pos: 86% 16%;
    --hand-c-pos: 50% 90%;
    --glow-c-pos: 50% 88%;
    --hand-size: min(80vw, 460px);
  }

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

  .nav-links {
    justify-content: flex-start;
  }

  .hero,
  .page-hero {
    padding-top: 78px;
  }

  .proof-grid,
  .stat-strip,
  .grid-2,
  .grid-3,
  .capability-deck,
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .focus-tabs {
    width: 100%;
  }

  .focus-tab {
    flex: 1 1 auto;
    min-width: 130px;
    text-align: center;
  }

  .hero-core,
  .proof-panel,
  .project,
  .card,
  .case-card,
  .cap-card {
    padding: 18px;
  }

  body::after {
    opacity: 0.6;
  }

  #hand-fx-canvas {
    opacity: 0.74;
  }

  body::before {
    filter: blur(13px) saturate(1.06);
    opacity: 0.76;
  }
}
