/* ===== tokens / theme ===== */
:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --text: #050505;
  --muted: #6b6b6b;
  --line: #d8d8d8;
  --soft: #f5f5f5;
  --grid: rgba(0, 0, 0, 0.035);
  --frame-bg: rgba(255, 255, 255, 0.92);
  --panel-bg: rgba(255, 255, 255, 0.82);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #050505;
    --text: #f3f3f3;
    --muted: #a6a6a6;
    --line: #2d2d2d;
    --soft: #101010;
    --grid: rgba(255, 255, 255, 0.06);
    --frame-bg: rgba(8, 8, 8, 0.92);
    --panel-bg: rgba(12, 12, 12, 0.84);
  }
}

/* ===== base ===== */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--text);
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
}

a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

a:hover,
a:focus-visible {
  opacity: 0.65;
}

/* ===== layout: page / frame ===== */
.page {
  width: min(100%, 1080px);
  margin: 0 auto;
  padding: 40px 20px 80px;
}

.frame {
  border: 1px solid var(--text);
  background: var(--frame-bg);
  box-shadow: 10px 10px 0 var(--text);
}

.terminal-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--text);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ===== hero ===== */
.hero {
  display: grid;
  gap: 28px;
  padding: 24px 20px 28px;
}

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

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 5vw, 4.6rem);
  line-height: 0.98;
  text-transform: lowercase;
}

.cursor {
  display: inline-block;
  animation: blink 0.9s steps(1, end) infinite;
}

.hero-copy {
  max-width: 44rem;
  font-size: 1rem;
  line-height: 1.8;
}

.hero-copy strong {
  font-weight: 700;
}

.links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  padding-top: 4px;
  font-size: 0.95rem;
}

.links-row span {
  color: var(--muted);
}

/* ===== section / headings ===== */
.section {
  padding: 22px 20px 28px;
  border-top: 1px solid var(--text);
}

.section-head {
  margin-bottom: 18px;
}

.section-head h2 {
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.section-head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ===== stats grid ===== */
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.stat-card {
  border: 1px solid var(--text);
  padding: 16px 14px;
  background: var(--soft);
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-value {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
}

.stat-label {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

/* ===== panels (two-column blocks) ===== */
.grid-two {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 18px;
}

.panel {
  border: 1px solid var(--line);
  padding: 16px;
  background: var(--panel-bg);
}

.panel-title {
  margin-bottom: 14px;
  font-size: 0.9rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ===== language affinity / signal rows ===== */
.stack-list,
.signal-list,
.interest-list {
  display: grid;
  gap: 12px;
}

.stack-row,
.signal-row {
  display: grid;
  grid-template-columns: 120px minmax(120px, 200px) auto 1fr;
  align-items: center;
  gap: 12px;
}

/* language affinity rows: bar stretches full width, project links drop to their own line under it */
.stack-row--lang {
  grid-template-columns: 120px 1fr auto;
  row-gap: 6px;
}

.stack-row--lang > .stack-links,
.stack-row--lang > .stack-link {
  grid-column: 1 / -1;
  padding-left: 132px;
}

.stack-subtitle {
  margin-top: 20px;
  padding-top: 16px;
  margin-bottom: 12px;
  border-top: 1px solid var(--line);
}

.stack-tags {
  color: var(--muted);
  font-size: 0.85rem;
}

.stack-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  justify-content: flex-start;
}

.stack-link {
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}

.stack-link:hover,
.stack-link:focus-visible {
  color: var(--text);
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.track {
  position: relative;
  height: 14px;
  border: 1px solid var(--text);
  overflow: hidden;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 10px,
      var(--grid) 10px,
      var(--grid) 11px
    );
}

.fill {
  height: 100%;
  background: var(--text);
}

.signal-row {
  grid-template-columns: 132px 1fr;
  align-items: start;
}

.signal-row strong {
  display: inline-block;
  margin-bottom: 2px;
}

.signal-row p,
.interest-list p {
  color: var(--muted);
  line-height: 1.65;
}

/* ===== interests ===== */
.interest-list article {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.interest-list article:first-child {
  padding-top: 0;
  border-top: 0;
}

.interest-list strong {
  display: block;
  margin-bottom: 6px;
}

/* ===== footer ===== */
.footer {
  padding: 20px;
  border-top: 1px solid var(--text);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ===== animations ===== */
@keyframes blink {
  0%,
  49% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0;
  }
}

/* ===== responsive ===== */
@media (max-width: 860px) {
  .stats,
  .grid-two {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 20px 14px 48px;
  }

  .frame {
    box-shadow: 6px 6px 0 var(--text);
  }

  .hero,
  .section,
  .footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .stats,
  .grid-two,
  .stack-row,
  .stack-row--lang,
  .signal-row {
    grid-template-columns: 1fr;
  }

  .stack-row--lang > .stack-links,
  .stack-row--lang > .stack-link {
    padding-left: 0;
  }

  .stat-card {
    min-height: auto;
    gap: 12px;
  }

  .track {
    height: 12px;
  }
}
