:root {
  --bg: #0a0a0a;
  --fg: #e8e8e3;
  --muted: #8a8a85;
  --border: #2a2a27;
  --accent: #6ee7a8;
  --font: "Space Mono", "JetBrains Mono", ui-monospace, monospace;
  --measure: 68ch;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: inherit;
}

h1, h2, h3 {
  font-weight: 700;
  margin: 0;
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  font-size: 0.85rem;
  text-transform: lowercase;
  letter-spacing: 0.02em;
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.logo {
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--muted);
  transition: color 200ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--accent);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

#ascii-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 2rem 1.5rem 4rem;
}

.hero-content h1 {
  font-size: clamp(2rem, 6vw, 4.5rem);
  line-height: 1;
}

.hero-content p {
  margin: 0.5rem 0 0;
  color: var(--muted);
}

.hero-tagline {
  max-width: var(--measure);
}

.hero-content p.hero-status {
  color: var(--accent);
  font-size: 0.85rem;
  margin-top: 1rem;
}

/* ---------- Sections ---------- */

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-label {
  font-size: 0.85rem;
  color: var(--accent);
  text-transform: lowercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}

.about,
.projects {
  padding: 6rem 0;
  border-top: 1px solid var(--border);
}

.about-text {
  max-width: var(--measure);
}

.about-text p {
  margin: 0 0 1rem;
  color: var(--fg);
}

.about-text p:last-child {
  margin-bottom: 0;
}

/* ---------- Projects ---------- */

.project-list {
  display: flex;
  flex-direction: column;
}

.project-card {
  display: grid;
  grid-template-columns: 5rem 1fr auto;
  gap: 1.5rem;
  align-items: baseline;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: opacity 200ms ease;
}

a.project-card:hover,
a.project-card:focus-visible {
  opacity: 0.7;
}

.project-year {
  color: var(--muted);
  font-size: 0.85rem;
}

.project-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
}

.project-description {
  color: var(--muted);
  margin: 0;
  font-size: 0.95rem;
}

.project-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: var(--accent);
  align-self: start;
}

@media (max-width: 640px) {
  .project-card {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 4rem 1.5rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
  font-size: 1.1rem;
}

#footer-email {
  text-decoration: none;
  color: var(--accent);
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-group h3 {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: lowercase;
  margin-bottom: 0.75rem;
  font-weight: 400;
}

.footer-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-group a {
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--fg);
  transition: color 200ms ease;
}

.footer-group a:hover,
.footer-group a:focus-visible {
  color: var(--accent);
}

.footer-bottom {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
