/* ============================================================
   TOKENS
   ============================================================ */
:root {
  --bg:          #f9f8f6;
  --surface:     #ffffff;
  --text:        #1a1a1a;
  --muted:       #6b6b6b;
  --accent:      #2a52a3;
  --accent-dim:  #d6e0f7;
  --border:      #e0ddd8;
  --tag-bg:      #eef2fb;
  --tag-text:    #2a52a3;

  --font-body:   "Georgia", "Times New Roman", serif;
  --font-mono:   "Courier New", "Courier", monospace;

  --measure:     62ch;
  --gap:         2rem;
}

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

html {
  font-size: 17px;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.7;
  padding: 3rem 1.5rem 4rem;
  max-width: var(--measure);
  margin: 0 auto;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1 {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: bold;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 0.3rem;
}

h2 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: bold;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.2rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: bold;
  color: var(--text);
  margin-bottom: 0.35rem;
}

h3 a {
  color: inherit;
}

p {
  margin-bottom: 0.85rem;
  max-width: var(--measure);
}

p:last-child {
  margin-bottom: 0;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--accent-dim);
  color: var(--accent);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

strong {
  font-weight: bold;
  color: var(--text);
}

/* ============================================================
   LINKS
   ============================================================ */
a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover,
a:focus {
  color: var(--text);
  text-decoration-thickness: 2px;
  outline: none;
}

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

/* ============================================================
   HEADER
   ============================================================ */
header {
  margin-bottom: calc(var(--gap) * 1.8);
  padding-bottom: var(--gap);
  border-bottom: 2px solid var(--text);
}

.tagline {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0.25rem 0 1.1rem;
}

header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

header nav a {
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.03em;
}

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

/* ============================================================
   MAIN SECTIONS
   ============================================================ */
main {
  display: flex;
  flex-direction: column;
  gap: calc(var(--gap) * 1.6);
}

section {
  /* intentionally no extra padding — whitespace via gap */
}

/* ============================================================
   ENTRIES (work + projects)
   ============================================================ */
article.entry {
  padding-left: 1rem;
  border-left: 3px solid var(--accent-dim);
  margin-bottom: 1.6rem;
}

article.entry:last-child {
  margin-bottom: 0;
}

.entry-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.entry-year {
  color: var(--muted);
}

.entry-tag {
  background: var(--tag-bg);
  color: var(--tag-text);
  padding: 0.05em 0.5em;
  border-radius: 2px;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: bold;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  margin-top: calc(var(--gap) * 2);
  padding-top: var(--gap);
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.8;
}

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

footer a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.footer-note {
  margin-top: 0.3rem;
  font-size: 0.72rem;
  opacity: 0.6;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 480px) {
  html {
    font-size: 16px;
  }

  body {
    padding: 2rem 1.1rem 3rem;
  }

  h1 {
    font-size: 1.35rem;
  }

  article.entry {
    padding-left: 0.75rem;
  }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
