/* ============================================================
   Design tokens
   ============================================================ */
:root {
  --bg: #0b0b0b;
  --bg-panel: #111111;
  --bg-panel-soft: #151515;
  --text-primary: #f5f5f5;
  --text-secondary: #b8b8b8;
  --text-muted: #777777;
  --border: #2a2a2a;
  --accent: #d72638;
  --accent-bright: #ff3b4d;
  --accent-dark: #5a1a21;
  --terminal-green: #7bd88f;
  --warning-amber: #ffb347;
  --link-blue-gray: #8fbcd4;
  --max-width: 920px;
  --reading-width: 760px;
}

/* ============================================================
   Reset & base
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: radial-gradient(circle at top left, rgba(215, 38, 56, 0.12), transparent 32rem), var(--bg);
  color: var(--text-primary);
  font-family: Inter, Geist, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 75%);
}

a {
  color: var(--accent-bright);
  text-decoration: none;
  transition: color 160ms ease;
}

a:hover,
a:focus {
  color: var(--accent-bright);
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ============================================================
   Typography helpers
   ============================================================ */
.mono,
.site-nav,
.site-brand,
.hero-kicker,
.hero-name,
.tag,
.meta-label,
.section-label,
.post-date,
.back-link {
  font-family: "JetBrains Mono", "IBM Plex Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* ============================================================
   Layout utilities
   ============================================================ */
.page-shell {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

.reading-width {
  max-width: var(--reading-width);
}

.section {
  padding: 5rem 0;
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 11, 11, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  min-height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.site-brand {
  color: var(--text-primary);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.site-brand:hover,
.site-brand:focus {
  color: var(--text-primary);
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
}

.site-nav a {
  color: var(--text-secondary);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus {
  color: var(--accent-bright);
  text-decoration: none;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  min-height: calc(100vh - 4rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-kicker {
  color: var(--accent-bright);
  font-size: 0.9rem;
  text-transform: lowercase;
  letter-spacing: 0.08em;
  margin: 0 0 1rem;
}

.hero-name {
  font-size: clamp(3rem, 10vw, 7rem);
  line-height: 0.95;
  letter-spacing: -0.08em;
  margin: 0.25rem 0 1rem;
}

.typewriter {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  max-width: 0;
  animation: type-name 1.25s steps(15, end) forwards;
}

.cursor {
  color: var(--accent);
  animation: blink 1s steps(1) infinite;
}

@keyframes type-name {
  to {
    max-width: 15ch;
  }
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
.hero-subtitle {
  color: var(--text-primary);
  font-size: clamp(1.25rem, 3vw, 2rem);
  line-height: 1.25;
  margin: 0 0 1.5rem;
}

.hero-copy {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.hero-copy p + p {
  margin-top: 1rem;
}

/* ============================================================
   Tags
   ============================================================ */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(215, 38, 56, 0.6);
  background: rgba(215, 38, 56, 0.08);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
}

/* ============================================================
   Section headings & panels
   ============================================================ */
.section h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
  margin: 0 0 1.5rem;
  letter-spacing: -0.05em;
}

.section-label {
  color: var(--accent-bright);
  font-size: 0.85rem;
  margin: 0 0 0.9rem;
}

.section-panel {
  background: linear-gradient(180deg, var(--bg-panel), var(--bg-panel-soft));
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 1rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  box-shadow: 0 1rem 4rem rgba(0, 0, 0, 0.28);
}

.section-panel p + p {
  margin-top: 1rem;
}

.section-intro {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* ============================================================
   Blog post list
   ============================================================ */
.post-list {
  display: grid;
  gap: 1rem;
}

.post-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 1.25rem;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.post-card:hover {
  border-color: rgba(215, 38, 56, 0.75);
  background: var(--bg-panel-soft);
  transform: translateY(-2px);
}

.post-date {
  color: var(--text-muted);
  font-size: 0.78rem;
  margin: 0 0 0.5rem;
}

.post-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

.post-card h3 a {
  color: var(--text-primary);
  text-decoration: none;
}

.post-card h3 a:hover {
  color: var(--accent-bright);
}

.post-card p {
  color: var(--text-secondary);
  margin: 0;
}

.empty-state {
  color: var(--text-muted);
}

/* ============================================================
   Tag filter (blog page)
   ============================================================ */
.tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.tag-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.78rem;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.tag-btn:hover,
.tag-btn:focus-visible {
  border-color: var(--accent);
  color: var(--text-secondary);
}

.tag-btn.active {
  border-color: var(--accent);
  background: rgba(215, 38, 56, 0.1);
  color: var(--accent-bright);
}

/* ============================================================
   Year groups (blog page)
   ============================================================ */
.year-group {
  margin-bottom: 3rem;
}

.year-heading {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.post-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.blog-overflow {
  margin-top: 1.5rem;
}

.btn-outline {
  display: inline-block;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: border-color 160ms ease, color 160ms ease;
}

.btn-outline:hover,
.btn-outline:focus {
  border-color: var(--accent);
  color: var(--accent-bright);
  text-decoration: none;
}

.post-card-title {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

.post-card-title a {
  color: var(--text-primary);
  text-decoration: none;
}

.post-card-title a:hover {
  color: var(--accent-bright);
}

/* ============================================================
   Contact list
   ============================================================ */
.contact-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  gap: 0.85rem;
}

.contact-list li {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 1rem;
  align-items: baseline;
}

.meta-label {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.contact-list a {
  color: var(--text-primary);
  word-break: break-word;
  text-decoration: none;
}

.contact-list a:hover {
  color: var(--accent-bright);
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  padding: 2rem 0;
  position: relative;
  z-index: 1;
}

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

.site-footer a {
  color: var(--text-muted);
}

.site-footer a:hover {
  color: var(--accent-bright);
}

/* ============================================================
   Post page
   ============================================================ */
.post-page {
  padding: 4rem 0 6rem;
}

.post-article {
  max-width: var(--reading-width);
}

.post-header {
  margin-bottom: 2.5rem;
}

.post-header h1 {
  font-size: clamp(1.75rem, 5vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-top: 0.5rem;
}

.post-content {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.75;
}

.post-content h2,
.post-content h3,
.post-content h4 {
  color: var(--text-primary);
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.03em;
}

.post-content h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.post-content h3 {
  font-size: 1.25rem;
}

.post-content p {
  margin-bottom: 1.25rem;
}

.post-content a {
  color: var(--link-blue-gray);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-content a:hover {
  color: var(--accent-bright);
}

.post-content ul,
.post-content ol {
  margin: 0 0 1.25rem 1.5rem;
}

.post-content li + li {
  margin-top: 0.4rem;
}

.post-content pre,
.post-content code {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.post-content code {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.15em 0.4em;
  font-size: 0.88em;
  color: var(--terminal-green);
}

.post-content pre {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.post-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.9rem;
}

.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1.25rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 1.5rem 0;
}

.post-content img {
  max-width: 100%;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  margin: 1.5rem 0;
}

.post-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

.post-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.back-link {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: none;
}

.back-link:hover {
  color: var(--accent-bright);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 720px) {
  .site-header__inner {
    align-items: flex-start;
    flex-direction: column;
    padding-block: 0.9rem;
    min-height: unset;
  }
  .site-nav {
    flex-wrap: wrap;
  }
  .hero {
    min-height: auto;
    padding-top: 5rem;
  }
  .hero-name {
    font-size: clamp(2.5rem, 14vw, 4rem);
  }
  .section {
    padding: 3.5rem 0;
  }
}
@media (max-width: 520px) {
  .contact-list li {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
}
/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .typewriter {
    max-width: none;
  }
  .cursor {
    animation: none !important;
  }
}

/*# sourceMappingURL=main.css.map */