:root {
  --bg: #f8f8f6;
  --surface: #ffffff;
  --text: #161615;
  --muted: #555550;
  --line: #d8d8d2;
  --accent: #2a9fa6;
}

:root.dark {
  --bg: #10100f;
  --surface: #171715;
  --text: #f3f2ef;
  --muted: #aaa9a2;
  --line: #2b2b27;
  --accent: #8fd7db;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Manrope, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(0, 0, 0, 0.03) 0.45px, transparent 0.45px);
  background-size: 3px 3px;
  opacity: 0.4;
}

.container {
  width: min(860px, 92vw);
  margin: 0 auto;
}

.row,
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topline {
  border-bottom: 1px solid var(--line);
}

.row {
  min-height: 62px;
}

.mono {
  margin: 0;
  font-size: 0.76rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: "Courier New", monospace;
}

.theme-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-size: 0.8rem;
  padding: 0.45rem 0.8rem;
  cursor: pointer;
}

main {
  padding: 3.2rem 0 2.4rem;
}

.intro {
  border-bottom: 1px solid var(--line);
  padding-bottom: 2.6rem;
}

h1,
h2 {
  font-family: Newsreader, Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 {
  margin: 0.45rem 0 0.75rem;
  font-size: clamp(2.1rem, 7vw, 4rem);
  line-height: 1.05;
  max-width: 13ch;
}

.lede {
  margin: 0;
  max-width: 54ch;
  color: var(--muted);
  line-height: 1.6;
}

.work,
.about {
  margin-top: 2.5rem;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.65rem;
}

h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3.4vw, 2rem);
}

.tiny-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
}

.project-list {
  border-top: 1px solid var(--line);
}

.project-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding: 1.05rem 0;
}

.project-row h3 {
  margin: 0 0 0.15rem;
  font-size: 1rem;
}

.project-row p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
}

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

.about p {
  max-width: 58ch;
  color: var(--muted);
  margin: 0;
  line-height: 1.7;
}

.mail {
  display: inline-block;
  margin-top: 1rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.footer {
  border-top: 1px solid var(--line);
  min-height: 58px;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer a {
  color: var(--text);
  text-decoration: none;
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  animation: fade-up 0.8s ease forwards;
}

.work {
  animation-delay: 0.12s;
}

.about {
  animation-delay: 0.24s;
}

@keyframes fade-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 620px) {
  .project-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 0.8rem 0;
    gap: 0.2rem;
  }
}
