:root {
  --bg: #0a0b0d;
  --panel: #111317;
  --panel-2: #15181d;
  --text: #f2f2f3;
  --muted: #8f949d;
  --line: #23262d;
  --accent: #a8332f;
  --accent-bright: #c34742;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Geist', system-ui, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .025;
  z-index: 20;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

.grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: .32;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

.wrap { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }

.site-header {
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 10;
}
.logo {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  letter-spacing: -.04em;
  cursor: pointer;
}
.cursor { color: var(--accent-bright); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
nav { display: flex; gap: 24px; align-items: center; font-size: .92rem; color: #c8cbd0; }
nav a:hover { color: white; }
.terminal-button {
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255,255,255,.015);
  border-radius: 8px;
  padding: 6px 9px;
  cursor: pointer;
}
.terminal-button:hover { color: white; border-color: #3a3f48; }

.hero {
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 0 120px;
}
.hero-kicker, .section-label, .mono, .tiny-projects-head, .mini-index {
  font-family: 'JetBrains Mono', monospace;
}
.hero-kicker { color: var(--muted); font-size: .8rem; margin-bottom: 24px; }
h1 {
  font-size: clamp(4rem, 10vw, 8.6rem);
  line-height: .92;
  letter-spacing: -.065em;
  margin: 0;
  font-weight: 600;
}
.hero-line {
  font-size: clamp(1.8rem, 4vw, 3.7rem);
  letter-spacing: -.04em;
  margin: 18px 0 26px;
  color: #b6bac1;
}
.accent { color: var(--accent-bright); }
.hero-copy { max-width: 620px; color: var(--muted); font-size: 1.06rem; margin: 0; }
.hero-actions { display: flex; gap: 12px; margin-top: 36px; }
.button { border-radius: 9px; padding: 11px 16px; font-size: .92rem; border: 1px solid var(--line); }
.button.primary { background: var(--text); color: #111; border-color: var(--text); }
.button.primary:hover { transform: translateY(-1px); }
.button.ghost:hover { border-color: #444952; }
.status-line { margin-top: 54px; font-family: 'JetBrains Mono', monospace; font-size: .76rem; color: #727780; display: flex; align-items: center; gap: 8px; }
.status-dot { width: 7px; height: 7px; background: #5e9f64; border-radius: 50%; box-shadow: 0 0 14px rgba(94,159,100,.7); }

.section {
  border-top: 1px solid var(--line);
  padding: 92px 0;
}
.split { display: grid; grid-template-columns: 180px 1fr; gap: 48px; }
.section-label { font-size: .76rem; color: #6f747d; text-transform: uppercase; letter-spacing: .05em; }
.large-copy { max-width: 760px; }
.large-copy p { font-size: clamp(1.45rem, 3vw, 2.35rem); letter-spacing: -.035em; margin: 0 0 22px; color: #d9dadd; }

.mini-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.mini-card { background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.01)); border: 1px solid var(--line); border-radius: 14px; padding: 24px; min-height: 220px; transition: transform .2s ease, border-color .2s ease; }
.mini-card:hover { transform: translateY(-3px); border-color: #3a3e46; }
.mini-index { color: var(--accent-bright); font-size: .74rem; }
.mini-card h3 { margin: 64px 0 10px; font-size: 1.25rem; }
.mini-card p { margin: 0; color: var(--muted); font-size: .94rem; }

.side-quests-intro { margin: 46px 0 16px; font-size: clamp(1.25rem, 2.4vw, 1.8rem); letter-spacing: -.025em; color: #d9dadd; }
.tiny-projects { margin-top: 0; border-top: 1px solid var(--line); }
.tiny-projects-head, .project-row { display: grid; grid-template-columns: 1fr auto; gap: 24px; }
.tiny-projects-head { padding: 18px 0; font-size: .72rem; color: #7b8089; }
.project-row { padding: 18px 0; border-top: 1px solid rgba(255,255,255,.045); font-size: .94rem; }
.project-row span:last-child { color: #747983; font-family: 'JetBrains Mono', monospace; font-size: .76rem; }
.project-row:hover span:first-child { color: var(--accent-bright); }
.muted { color: var(--muted); }

.now-card { border: 1px solid var(--line); border-radius: 16px; padding: 34px; background: rgba(255,255,255,.015); display: grid; grid-template-columns: 1.3fr .7fr; gap: 30px; }
.now-card h2 { font-size: clamp(2rem, 4vw, 3.3rem); line-height: 1; letter-spacing: -.045em; max-width: 650px; margin: 14px 0 0; }
.now-card ul { list-style: none; padding: 0; margin: 0; align-self: end; color: #b3b7bd; }
.now-card li { margin-top: 10px; }
.now-card li span { color: var(--accent-bright); margin-right: 7px; }

.link-stack { display: grid; }
.link-stack a { display: flex; justify-content: space-between; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); font-size: 1.1rem; }
.link-stack a:hover span:first-child { color: var(--accent-bright); }

.footer { border-top: 1px solid var(--line); padding: 28px 0 40px; display: flex; justify-content: space-between; color: #6f747d; font-size: .78rem; font-family: 'JetBrains Mono', monospace; }

.terminal {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  background: rgba(0,0,0,.66);
  backdrop-filter: blur(10px);
  opacity: 0; visibility: hidden; transition: .18s ease;
}
.terminal.open { opacity: 1; visibility: visible; }
.terminal-window { width: min(760px, calc(100% - 30px)); background: #090a0c; border: 1px solid #2b3038; border-radius: 12px; box-shadow: 0 30px 100px rgba(0,0,0,.45); overflow: hidden; font-family: 'JetBrains Mono', monospace; }
.terminal-topbar { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: #12151a; color: #777d87; font-size: .76rem; border-bottom: 1px solid #242831; }
.terminal-topbar button { border: 0; background: none; color: #878d96; cursor: pointer; font-size: 1.2rem; }
.terminal-body { min-height: 290px; max-height: 54vh; overflow-y: auto; padding: 20px; font-size: .84rem; color: #b9bec6; }
.terminal-body p { margin: 0 0 10px; }
.prompt { color: #c54a45; }
.cmd { color: #e2e3e5; }
.terminal-input-row { display: flex; gap: 9px; padding: 14px 20px 18px; border-top: 1px solid #1b1f25; font-size: .84rem; }
.terminal-input-row input { flex: 1; background: transparent; border: 0; outline: 0; color: white; font-family: inherit; }

.toast { position: fixed; right: 20px; bottom: 20px; z-index: 60; background: #14171c; border: 1px solid #2d323b; border-radius: 10px; padding: 12px 14px; font-family: 'JetBrains Mono', monospace; font-size: .76rem; color: #c8ccd2; transform: translateY(20px); opacity: 0; pointer-events: none; transition: .2s ease; }
.toast.show { transform: translateY(0); opacity: 1; }

.party { animation: party .5s linear infinite alternate; }
@keyframes party { from { filter: hue-rotate(0deg); } to { filter: hue-rotate(140deg); } }

@media (max-width: 760px) {
  nav a { display: none; }
  .hero { min-height: 78vh; padding-top: 50px; }
  h1 { font-size: clamp(3.5rem, 18vw, 5.8rem); }
  .split { grid-template-columns: 1fr; gap: 26px; }
  .mini-grid { grid-template-columns: 1fr; }
  .mini-card { min-height: 170px; }
  .mini-card h3 { margin-top: 40px; }
  .now-card { grid-template-columns: 1fr; }
  .footer { flex-direction: column; gap: 10px; }
}
