﻿*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #0c0c0d;
  --bg-soft: #111113;
  --line: #232325;
  --line-soft: #1a1a1c;
  --text: #d6d4ce;
  --head: #f2f0ea;
  --muted: #7a7872;
  --faint: #56544f;
  --accent: #5b9dff;
  --accent-dim: #6f86c4;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --sans: "Space Grotesk", system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* faint top glow + grain instead of rainbow gradients */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(60% 40% at 50% -8%, rgba(91, 157, 255, 0.06), transparent 70%);
}

a {
  color: inherit;
}

::selection {
  background: var(--accent);
  color: #0c0c0d;
}

.nav,
.main,
.footer {
  position: relative;
  z-index: 1;
}

/* ---- nav ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 clamp(18px, 5vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(12, 12, 13, 0.86);
  backdrop-filter: blur(8px);
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--head);
  text-decoration: none;
}

.brand img,
.footer-brand img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  border-radius: 4px;
}

.brand span,
.footer-brand span {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.brand span::before {
  content: "~/";
  color: var(--faint);
}

.nav-links,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(10px, 2.4vw, 26px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a,
.footer-links a {
  position: relative;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
  text-decoration: none;
  padding: 4px 0;
  transition: color 120ms ease;
}

.nav-links a::before {
  content: "";
  color: var(--accent);
}

.nav-links a:hover,
.footer-links a:hover {
  color: var(--head);
}

.nav-links a.active {
  color: var(--accent);
}

.nav-links a.active::before {
  content: "> ";
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  margin: 0 auto;
  background: var(--text);
  transition: transform 160ms ease, opacity 160ms ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ---- layout ---- */
.main {
  min-height: 100vh;
}

.wrap,
.page-head,
.hero,
.footer {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
}

/* ---- hero ---- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
  padding: clamp(64px, 11vw, 112px) 0 clamp(56px, 8vw, 88px);
  border-bottom: 1px solid var(--line);
}

.hero-left {
  display: grid;
  gap: 24px;
  align-content: center;
}

.kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--muted);
}

.kicker span {
  position: relative;
  padding: 0 14px;
}

.kicker span:first-child {
  padding-left: 0;
}

.kicker span + span::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--faint);
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--head);
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.hero h1 {
  font-size: clamp(3.6rem, 9vw, 7.5rem);
  line-height: 0.86;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.hero h1::after {
  content: "_";
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
  animation: blink 1.2s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.intro {
  max-width: 54ch;
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #0c0c0d;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  padding: 10px 16px;
  transition: background 120ms ease, color 120ms ease;
}

.btn::before {
  content: "→ ";
}

.btn:hover {
  background: transparent;
  color: var(--accent);
}

.btn.secondary {
  border-color: var(--line);
  background: transparent;
  color: var(--text);
}

.btn.secondary:hover {
  border-color: var(--text);
  color: var(--head);
}

/* ---- stat strip ---- */
.stat-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 8px;
  border: 1px solid var(--line);
}

.stat {
  flex: 1 1 130px;
  padding: 16px 18px;
  border-right: 1px solid var(--line);
}

.stat:last-child {
  border-right: 0;
}

.stat b {
  display: block;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 1.7rem;
  font-weight: 500;
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
}

/* ---- terminal ---- */
.section-head h2 code {
  font-family: var(--mono);
  font-size: 0.7em;
  color: var(--accent);
  border: 1px solid var(--line);
  padding: 1px 7px;
}

.terminal {
  border: 1px solid var(--line);
  background: #0a0a0b;
  font-family: var(--mono);
  font-size: 0.85rem;
  overflow: hidden;
  box-shadow: 0 18px 50px -28px rgba(0, 0, 0, 0.9);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}

.terminal-bar .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--faint);
}

.terminal-bar .dot:nth-child(1) { background: #ff5f56; }
.terminal-bar .dot:nth-child(2) { background: #ffbd2e; }
.terminal-bar .dot:nth-child(3) { background: #27c93f; }

.terminal-title {
  margin-left: 8px;
  color: var(--muted);
  font-size: 0.72rem;
}

.terminal-body {
  padding: 16px;
  min-height: 280px;
  max-height: 420px;
  overflow-y: auto;
  cursor: text;
  line-height: 1.7;
}

.terminal-body::-webkit-scrollbar {
  width: 8px;
}

.terminal-body::-webkit-scrollbar-thumb {
  background: var(--line);
}

.terminal-log p,
.terminal-input-line {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal-log .cmd-echo {
  color: var(--head);
}

.tprompt {
  color: var(--accent);
}

.tpath {
  color: var(--muted);
  margin-right: 8px;
}

.tout {
  color: var(--text);
}

.tout.muted {
  color: var(--muted);
}

.tout.err {
  color: #ff6b6b;
}

.tout a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.tout a:hover {
  border-bottom-color: var(--accent);
}

.terminal-input-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
}

.terminal-input {
  flex: 1;
  min-width: 60px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--head);
  font-family: var(--mono);
  font-size: 0.85rem;
  padding: 0;
  caret-color: var(--accent);
}

/* ---- sections ---- */
.section {
  padding: clamp(48px, 8vw, 80px) 0;
}

.section-head {
  margin-bottom: 32px;
}

.label,
.page-head .kicker {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--accent-dim);
}

.label::before {
  content: "// ";
  color: var(--faint);
}

.section-head h2 {
  margin-top: 10px;
  font-size: clamp(1.5rem, 3.4vw, 2.2rem);
}

/* ---- page head ---- */
.page-head {
  padding: clamp(64px, 10vw, 104px) 0 clamp(28px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
}

.page-head .kicker {
  margin-bottom: 18px;
}

.page-head h1 {
  font-size: clamp(2.6rem, 8vw, 5rem);
  line-height: 0.95;
  font-weight: 700;
}

.page-head p {
  max-width: 60ch;
  margin: 16px 0 0;
  color: var(--muted);
}

/* ---- stack ---- */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
}

.stack-item {
  display: grid;
  gap: 6px;
  padding: 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stack-item:nth-child(4n) {
  border-right: 0;
}

.stack-item img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  margin-bottom: 8px;
  filter: grayscale(1) brightness(1.4);
  opacity: 0.8;
  transition: filter 160ms ease, opacity 160ms ease;
}

.stack-item:hover img {
  filter: none;
  opacity: 1;
}

.stack-item h3 {
  font-family: var(--mono);
  font-size: 0.92rem;
  font-weight: 500;
}

.stack-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

/* ---- project list (changelog rows) ---- */
.project-grid {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
  counter-reset: row;
}

.project-card {
  counter-increment: row;
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1.1fr) minmax(0, 1.3fr) auto;
  gap: 20px;
  align-items: baseline;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
  transition: background 120ms ease;
}

.project-card::before {
  content: counter(row, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--faint);
}

.project-card:hover {
  background: var(--bg-soft);
}

.project-name {
  display: grid;
  gap: 4px;
}

.project-name h3 {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  font-weight: 500;
}

.project-name .meta {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
}

.project-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.project-side {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-self: end;
}

.tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  padding: 3px 8px;
  border: 1px solid var(--line);
  white-space: nowrap;
}

.project-card[data-status="active"] .tag,
.project-card[data-status="upcoming"] .tag {
  color: var(--accent);
  border-color: var(--accent-dim);
}

.project-link {
  font-family: var(--mono);
  font-size: 0.74rem;
  text-decoration: none;
  color: var(--faint);
  white-space: nowrap;
}

a.project-link {
  color: var(--text);
  border-bottom: 1px solid var(--line);
}

a.project-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---- footer ---- */
.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 30px 0 44px;
  margin-top: 20px;
  border-top: 1px solid var(--line);
}

/* ---- reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 480ms ease, transform 480ms ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 32px;
  }

  .stack-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stack-item:nth-child(4n) {
    border-right: 1px solid var(--line);
  }

  .stack-item:nth-child(2n) {
    border-right: 0;
  }

  .project-card {
    grid-template-columns: 32px 1fr;
    gap: 6px 14px;
    align-items: start;
  }

  .project-card p {
    grid-column: 2;
  }

  .project-side {
    grid-column: 2;
    justify-self: start;
    margin-top: 4px;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 14px;
  }

  .nav {
    height: 56px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 56px;
    right: 0;
    left: 0;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(12, 12, 13, 0.97);
    backdrop-filter: blur(8px);
    overflow: hidden;
    max-height: 0;
    transition: max-height 220ms ease;
  }

  .nav-links.open {
    max-height: 60vh;
  }

  .nav-links li {
    width: 100%;
    border-top: 1px solid var(--line-soft);
  }

  .nav-links li:first-child {
    border-top: 0;
  }

  .nav-links a {
    display: block;
    padding: 14px clamp(18px, 5vw, 56px);
    font-size: 0.9rem;
  }

  .stat-strip {
    flex-direction: column;
  }

  .stat {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stat:last-child {
    border-bottom: 0;
  }
}

.empty {
  padding: 28px 0;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--muted);
}











