@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --text-primary: #171717;
  --text-secondary: #525252;
  --text-light: #707070;
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f5;
  --accent-red: #a31f34;
  --accent-red-light: #d62a3d;
  --border: #e0e0e0;
  --border-light: #f0f0f0;

  color: var(--text-primary);
  background: var(--bg-primary);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
a { color: var(--accent-red); text-underline-offset: 3px; text-decoration: none; }
a:hover { text-decoration: underline; }

.skip-link {
  position: fixed;
  top: -4rem;
  left: 1rem;
  padding: 0.5rem 0.75rem;
  background: var(--text-primary);
  color: #fff;
}
.skip-link:focus { top: 1rem; }

.site-header,
main,
footer {
  width: min(95vw, calc(100% - 2.5rem));
  margin-inline: auto;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 2.5rem 0;
  border-bottom: 2px solid var(--border-light);
  font-size: 1rem;
}

.name {
  font-weight: 700;
  text-decoration: none;
  font-size: 1.5rem;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

nav { display: flex; gap: 1.5rem; font-size: 0.95rem; font-weight: 500; }
nav a {
  text-decoration: none;
  color: var(--text-secondary);
  position: relative;
  transition: color 0.2s;
}
nav a:hover {
  color: var(--accent-red);
}

main { min-height: calc(100vh - 11rem); }

.intro {
  padding: 4rem 0 5rem;
}

.intro h1 {
  max-width: 65rem;
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.75rem, 7vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text-primary);
}

.intro p {
  max-width: 65rem;
  margin: 2rem 0 0;
  color: var(--text-secondary);
  font-size: 1.125rem;
  line-height: 1.7;
}

section { padding: 0 0 5rem; }

section h2 {
  margin: 0 0 2rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent-red);
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--accent-red);
  display: inline-block;
}

section h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 1.5rem 0 0.5rem;
}

.work-list,
.note-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
  list-style: none;
}

.work-list li { padding: 1.5rem 0 1.75rem; border-bottom: 1px solid var(--border-light); }
.work-list a { display: flex; justify-content: space-between; gap: 2rem; font-size: 1.25rem; text-decoration: none; color: var(--accent-red); }
.work-list a:hover span:first-child { text-decoration: underline; }
.work-list a span:last-child { color: var(--text-light); font-size: 0.875rem; white-space: nowrap; }
.work-list p { max-width: 540px; margin: 0.5rem 0 0; color: var(--text-secondary); }

.note-list li { display: flex; justify-content: space-between; gap: 2rem; padding: 1rem 0; border-bottom: 1px solid var(--border-light); }
.note-list time { color: var(--text-light); font-size: 0.875rem; white-space: nowrap; }

article { max-width: 75vw; margin: auto; padding: 3rem 0 1rem; }

.article-header { margin-bottom: 3rem; }
.article-header time { color: var(--text-light); font-size: 0.875rem; }
.article-header h1 {
  margin: 1rem 0 1.5rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text-primary);
}
.article-header p { max-width: 80vw; margin: 0; color: var(--text-secondary); font-size: 1.125rem; }

.prose {
  max-width: 65rem;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.prose h2 {
  margin: 3rem 0 1rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--accent-red);
  display: inline-block;
}

.prose h3 {
  margin: 2rem 0 0.75rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent-red);
}

.prose p { margin: 0 0 1.5rem; }

.prose ul,
.prose ol {
  margin: 0 0 1.5rem 2rem;
  padding: 0;
}

.prose li {
  margin: 0.5rem 0;
  color: var(--text-primary);
}

.prose strong {
  font-weight: 600;
}

footer {
  display: flex;
  justify-content: space-between;
  padding: 2rem 0 2.5rem;
  border-top: 2px solid var(--border-light);
  color: var(--text-light);
  font-size: 0.8rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.95rem;
}

table th {
  background: var(--text-primary);
  color: #ffffff;
  font-weight: 600;
  padding: 1rem;
  text-align: left;
  border: 1px solid var(--border);
}

table td {
  padding: 1rem;
  border: 1px solid var(--border-light);
  vertical-align: top;
}

table tbody tr:nth-child(odd) {
  background: var(--bg-secondary);
}

table tbody tr:nth-child(even) {
  background: var(--bg-primary);
}

table strong {
  font-weight: 600;
}

table em {
  font-style: italic;
}

.easter-egg { color: var(--accent-red); font-weight: 700; cursor: help; }

@media (max-width: 560px) {
  .site-header {
    padding: 1.5rem 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .name { font-size: 1.25rem; }
  nav {
    gap: 0.8rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
  }
  .intro { padding: 3rem 0 4rem; }
  .intro h1 { font-size: 2rem; }
  section { padding-bottom: 4rem; }
  .work-list a { display: block; }
  .work-list a span { display: block; }
  .work-list a span:last-child { margin-top: 0.2rem; }
  .note-list li { display: block; }
  .note-list time { display: block; margin-top: 0.25rem; }
  article { padding: 3rem 0 4rem; max-width: 100%; }
  .prose { font-size: 1rem; }
  footer { display: block; }
  footer span { display: block; margin-bottom: 0.5rem; }
}

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