/* ivanmeduri.com
   Plain CSS. No framework, no build step.
   Edit colours and sizes here; everything else inherits. */

:root {
  --ink: #111111;
  --muted: #666666;
  --link: #1a3a5c;
  --link-underline: rgba(26, 58, 92, 0.4);
  --link-underline-hover: rgba(26, 58, 92, 1);
  --rule: #e2e2e2;
  --paper: #ffffff;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --measure: 65ch;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Layout ---------- */

.page {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  gap: 3rem;
  max-width: 68rem;
  margin: 0 auto;
  padding: 4.5rem 2rem 8rem;
}

.sidebar {
  font-size: 0.95em;
}

.content {
  min-width: 0;
  max-width: var(--measure);
}

/* ---------- Sidebar ---------- */

.wordmark {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 2.25rem;
  letter-spacing: -0.01em;
}

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

.wordmark a:hover {
  text-decoration: underline;
}

.nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav li {
  margin: 0 0 0.85rem;
}

.nav a {
  color: #000000;
  text-decoration: none;
  line-height: 1.35;
  display: inline-block;
}

.nav a:hover {
  text-decoration: underline;
}

.nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.nav-rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 1.25rem 0;
}

/* ---------- Content ---------- */

h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 2.5rem;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 3rem 0 0.75rem;
}

p {
  margin: 0 0 1.35rem;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--link-underline);
  text-underline-offset: 2px;
}

a:visited {
  color: var(--link);
}

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

.portrait {
  display: block;
  width: 136px;
  height: 136px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 0 1.5rem;
}

.dateline {
  color: var(--muted);
  font-size: 0.9rem;
  margin: -1.75rem 0 2.5rem;
}

/* Lists of things: writing, projects, books */

.entries {
  list-style: none;
  margin: 0;
  padding: 0;
}

.entries li {
  margin: 0 0 1.9rem;
}

.entries .title {
  display: block;
}

.entries .note {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 0.2rem;
}

/* Tight link lists: reading list, no notes */

.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.link-list li {
  margin: 0 0 0.5rem;
}

/* Body prose inside a post */

.post p:first-of-type {
  margin-top: 0;
}

blockquote {
  margin: 2rem 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--rule);
  color: var(--muted);
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 3rem 0;
}

.footer {
  margin-top: 4.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9rem;
}

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

/* ---------- Accessibility ---------- */

a:focus-visible,
:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
}

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

/* ---------- Mobile ---------- */

@media (max-width: 800px) {
  body {
    font-size: 18px;
  }

  .page {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 2.5rem 1.5rem 5rem;
  }

  .wordmark {
    margin-bottom: 1.5rem;
  }

  .sidebar {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--rule);
  }

  .nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
  }

  .nav li {
    margin: 0;
  }

  .nav-rule {
    margin: 1.25rem 0;
  }
}
