*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --t-bg: #0c0c0c;
  --t-accent: #4af;
  --t-dim: #555;
  --t-text: #c8c8c8;
  --t-text-bright: #e8e8e8;
  --t-border: #1a1a1a;
  --t-border-hover: #2a2a2a;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'JetBrains Mono', monospace;
  background: var(--t-bg);
  color: var(--t-text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-size: 13px;
}

.wrap { max-width: 720px; margin: 0 auto; padding: 0 24px; }

/* ASCII */
.ascii-logo-wrap { padding-top: 60px; }
.ascii-logo {
  color: var(--t-accent);
  font-size: 10px;
  line-height: 1.3;
  white-space: pre;
  overflow: visible;
  position: relative;
  clip-path: inset(0 0 100% 0);
  animation: revealLines 1.2s ease-out 0.3s forwards, logoGlow 0.6s ease-in-out 1.3s forwards;
}
.ascii-logo::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--t-accent), transparent);
  opacity: 0;
  animation: scanLine 1.2s ease-out 0.3s forwards;
  pointer-events: none;
}
@keyframes revealLines {
  0%   { clip-path: inset(0 0 100% 0); }
  100% { clip-path: inset(0 0 0% 0); }
}
@keyframes logoGlow {
  0%   { text-shadow: none; }
  50%  { text-shadow: 0 0 10px var(--t-accent), 0 0 20px var(--t-accent); }
  100% { text-shadow: none; }
}
@keyframes scanLine {
  0%   { top: 0; opacity: 0.8; }
  50%  { opacity: 1; }
  85%  { opacity: 0.5; }
  100% { top: 100%; opacity: 0; }
}
@media (max-width: 480px) {
  .ascii-logo { transform: scale(0.85); transform-origin: top left; margin-bottom: -10px; }
  .section { padding: 24px 0; }
  .mini-shell { padding: 24px 0; margin-bottom: 24px; }
}

/* Prompt */
.prompt { color: var(--t-dim); font-size: 13px; }
.prompt span, .hl { color: var(--t-accent); }

/* Sections */
.section { padding: 36px 0; border-bottom: 1px solid var(--t-border); }
.section:last-of-type { border-bottom: none; }
.section-head { font-size: 11px; color: var(--t-dim); margin-bottom: 20px; }
.section-head span { color: var(--t-accent); }

/* Bio */
.bio { font-size: 13px; color: var(--t-dim); font-weight: 300; line-height: 1.7; }
.bio a { color: var(--t-accent); text-decoration: none; }
.bio a:hover { text-decoration: underline; }

/* Projects */
.project {
  display: block; padding: 16px 18px; margin-bottom: 6px;
  border: 1px solid var(--t-border); border-radius: 3px;
  text-decoration: none; color: inherit;
  transition: border-color 0.2s, background 0.2s;
}
.project:hover { border-color: var(--t-border-hover); background: #111; }
.project-name { font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.project-name .arrow { color: var(--t-dim); transition: color 0.2s; }
.project:hover .arrow { color: var(--t-accent); }
.project-desc { font-size: 12px; color: var(--t-dim); font-weight: 300; }
.project-tags { margin-top: 6px; display: flex; gap: 8px; flex-wrap: wrap; }
.tag { font-size: 10px; color: var(--t-accent); opacity: 0.6; }
.tag::before { content: '#'; }

/* Cursor */
.cursor {
  display: inline-block; width: 8px; height: 15px;
  background: var(--t-accent); margin-left: 2px;
  animation: blink 1s step-end infinite; vertical-align: text-bottom;
}
@keyframes blink { 50% { opacity: 0; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Bio line reveal */
.bio-line { opacity: 0; }
@keyframes fadeInLine {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Shell */
.mini-shell { padding: 36px 0; margin-bottom: 60px; }
.shell-row { display: flex; align-items: center; gap: 8px; }
.shell-prompt { font-size: 13px; color: var(--t-dim); white-space: nowrap; }
.shell-prompt span { color: var(--t-accent); }
.shell-input {
  flex: 1; background: none; border: none; outline: none;
  font-family: 'JetBrains Mono', monospace; font-size: 13px;
  color: var(--t-text); caret-color: var(--t-accent);
}
.shell-output { margin-bottom: 12px; font-size: 12px; color: var(--t-dim); line-height: 1.7; white-space: pre-wrap; }
.shell-output .c { color: var(--t-accent); }
.shell-output .t { color: var(--t-text); }

/* Nav (subpages) */
.nav { padding: 24px 0; opacity: 0; animation: fadeIn 0.4s ease-out 0.1s forwards; }
.nav a { font-size: 12px; color: var(--t-dim); text-decoration: none; transition: color 0.2s; }
.nav a:hover { color: var(--t-text); }
.nav a .ch { color: var(--t-accent); }

/* Page header (subpages) */
.page-header { padding: 40px 0 32px; border-bottom: 1px solid var(--t-border); }
.page-title { font-size: 20px; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 6px; }
.page-sub { font-size: 12px; color: var(--t-dim); font-weight: 300; line-height: 1.6; }
.page-badge {
  display: inline-block; font-size: 9px; font-weight: 600; letter-spacing: 2px;
  text-transform: uppercase; color: var(--t-accent); border: 1px solid var(--t-border);
  padding: 3px 8px; border-radius: 3px; margin-top: 10px;
}

/* Features */
.feature { padding: 18px 0; border-bottom: 1px solid var(--t-border); }
.feature:last-child { border-bottom: none; }
.feature-name { font-size: 13px; font-weight: 500; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.feature-icon { width: 16px; height: 16px; color: var(--t-accent); flex-shrink: 0; }
.feature-desc { font-size: 12px; color: var(--t-dim); font-weight: 300; }

/* Screenshots */
.screenshots { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-top: 16px; }
.screenshot {
  aspect-ratio: 9/16; max-height: 280px; border: 1px dashed var(--t-border); border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  color: var(--t-dim); font-size: 10px; letter-spacing: 1px; text-transform: uppercase;
  overflow: hidden;
}
.screenshot.has-image { padding: 0; border: none; max-height: none; aspect-ratio: auto; }
.screenshot.has-image img { width: 100%; height: auto; display: block; border-radius: 3px; }

/* Tech tags */
.tech-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tech-tag { font-size: 11px; color: var(--t-text); padding: 4px 10px; border: 1px solid var(--t-border); border-radius: 3px; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gallery-item {
  aspect-ratio: 5/7; border: 1px solid var(--t-border); border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  color: var(--t-dim); font-size: 10px; letter-spacing: 1px; text-transform: uppercase;
  transition: border-color 0.2s; overflow: hidden; position: relative;
}
.gallery-item:hover { border-color: var(--t-border-hover); }
.gallery-item.has-image { padding: 0; }
.gallery-item.has-image img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 2px; }
.gallery-playmats { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 480px) { .gallery-playmats { grid-template-columns: 1fr; } }
.gallery-item.playmat { aspect-ratio: 5/3; }

/* Prose (legal, privacy) */
.prose { font-size: 12px; color: var(--t-dim); line-height: 1.8; }
.prose h2 { font-size: 14px; font-weight: 600; color: var(--t-text); margin: 28px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin-bottom: 12px; }
.prose a { color: var(--t-accent); text-decoration: none; }
.prose a:hover { text-decoration: underline; }
.prose ul { padding-left: 20px; margin-bottom: 12px; }
.prose li { margin-bottom: 4px; }
.prose .updated { font-size: 11px; color: var(--t-dim); margin-bottom: 24px; }

/* Footer */
.footer { padding: 32px 0; font-size: 11px; color: var(--t-dim); }
.footer a { color: var(--t-text); text-decoration: none; }
.footer a:hover { color: var(--t-accent); }

@media (min-width: 640px) {
  .ascii-logo-wrap { padding-top: 80px; }
  .section { padding: 44px 0; }
  .page-header { padding: 48px 0 36px; }
}
