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

:root {
  --bg: #ffffff;
  --text: #0a0a0a;
  --muted: #cccccc;
  --divider: #e0e0e0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;
    --text: #f0f0f0;
    --muted: #cccccc;
    --divider: #2a2a2a;
  }
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'EB Garamond', Georgia, serif;
  line-height: 1.6;
  transition: background-color 0.2s, color 0.2s;
  overflow-x: clip;
}

/* ── Layout ── */

.page {
  max-width: 728px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* ── Nav ── */

nav {
  display: flex;
  justify-content: flex-start;
  gap: 24px;
  padding: 32px 0 0;
}

nav a {
  font-size: 20px;
  font-weight: 400;
  font-family: 'EB Garamond', Georgia, serif;
  color: #888888;
  text-decoration: none;
  letter-spacing: 0;
  transition: color 0.15s;
}

nav a:hover { color: var(--text); }
nav a.active { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }

.nav-break { display: none; }
.nav-contact { display: none; }

@media (min-width: 1100px) {
  nav {
    position: fixed;
    top: 219px;
    right: 40px;
    flex-direction: column;
    align-items: flex-end;
    gap: 18px;
    padding: 0;
    z-index: 100;
  }

  .nav-break {
    display: block;
    height: 48px;
  }

  .nav-contact {
    display: block;
  }
}

/* ── Mobile contact footer ── */

.site-footer {
  display: block;
  padding: 32px 0 48px;
}

.site-footer a {
  font-size: 20px;
  font-weight: 400;
  font-family: 'EB Garamond', Georgia, serif;
  color: #888888;
  text-decoration: none;
  letter-spacing: 0;
  transition: color 0.15s;
}

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

.footer-sep {
  font-size: 20px;
  font-family: 'EB Garamond', Georgia, serif;
  color: #888888;
  letter-spacing: 0;
}

@media (min-width: 1100px) {
  .site-footer { display: none; }
}


/* ── Heading color spans ── */

.h1-name { color: #cccccc; }
.h1-sub  { color: #555555; }

/* ── Intro ── */

.intro {
  padding: 96px 0;
}

.intro h1 {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 36px;
  font-weight: normal;
  line-height: 1.15;
  text-wrap: balance;
  margin-bottom: 4px;
  color: var(--text);
}

.intro h1:last-of-type {
  margin-bottom: 40px;
  color: #555555;
}

.intro p {
  font-size: 22px;
  color: var(--muted);
  line-height: 32px;
  font-weight: 400;
}

.intro p + p {
  margin-top: 16px;
}

.intro a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.intro a:hover { color: var(--muted); }
.intro a.link-relay:hover    { color: #4461FF; }
.intro a.link-android:hover  { color: #3DDC84; }
.intro a.link-gmail:hover    { color: #EA4335; }
.intro a.link-calendar:hover { color: #4285F4; }
.intro a.link-chat:hover     { color: #34A853; }
.intro a.link-tasks:hover    { color: #1a73e8; }

/* ── Page header (notes, resume) ── */

.page-header {
  padding: 96px 0 40px;
}

.page-header h1 {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 36px;
  font-weight: normal;
  line-height: 1.15;
  text-wrap: balance;
  color: var(--text);
  margin-bottom: 0;
}

.page-intro {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 22px;
  color: var(--muted);
  line-height: 32px;
  margin-bottom: 48px;
}

/* ── Notes list ── */

.notes-year {
  margin-bottom: 56px;
}

.notes-year-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}

.notes-year-label {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 18px;
  color: var(--text);
}

.notes-month-label {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 18px;
  color: var(--muted);
}

.notes-list {
  list-style: none;
  padding: 0;
}

.notes-list li {
  display: flex;
  align-items: baseline;
  padding: 9px 0;
}

.notes-list a {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 22px;
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s;
  flex-shrink: 0;
}

.notes-list a:hover {
  color: var(--muted);
}

.note-leader {
  flex: 1;
  border-bottom: 1px dotted var(--muted);
  margin: 0 12px 5px;
  opacity: 0.4;
}

.note-day {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 22px;
  color: var(--muted);
  flex-shrink: 0;
}

/* ── Now page ── */

.now-body {
  padding-bottom: 96px;
}

.now-list {
  list-style: none;
  padding: 0;
  margin-bottom: 48px;
}

.now-list li {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 21px;
  color: var(--text);
  line-height: 32px;
  padding: 6px 0;
  padding-left: 28px;
  position: relative;
}

.now-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--muted);
}

.now-list a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s;
}

.now-list a:hover { color: var(--muted); }
.now-list a.link-relay:hover { color: #4461FF; }

.now-meta {
  font-size: 19px;
  font-family: 'EB Garamond', Georgia, serif;
  color: var(--muted);
  line-height: 1.6;
}

.now-meta a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s;
}

.now-meta a:hover {
  color: var(--text);
}

@media (max-width: 520px) {
  .now-body {
    padding-bottom: 48px;
  }
}

/* ── Breakout ── */

.breakout {
  width: min(1000px, 100vw - 48px);
  margin-left: calc(50% - min(500px, (100vw - 48px) / 2));
}

/* ── Image placeholder ── */

.img-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: var(--divider);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.video-embed {
  width: 100%;
  aspect-ratio: 16 / 9;
}

/* ── Footer ── */

footer {
  padding: 48px 0 64px;
  font-size: 0.8125rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

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

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

.footer-links {
  display: flex;
  gap: 20px;
}

/* ── Post ── */

.post {
  padding: 80px 0 96px;
}

.post-meta {
  font-size: 0.875rem;
  font-family: 'Red Hat Display', sans-serif;
  color: var(--muted);
  margin-bottom: 24px;
}

.post h1 {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 36px;
  font-weight: normal;
  line-height: 1.15;
  text-wrap: balance;
  color: var(--text);
  margin-bottom: 40px;
}

.post-body p {
  font-size: 21px;
  color: var(--muted);
  line-height: 32px;
}

.post-body p + p {
  margin-top: 20px;
}

.post-body a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-body a:hover {
  color: var(--muted);
}

.post-back {
  display: inline-block;
  margin-top: 64px;
  font-size: 0.875rem;
  font-family: 'Red Hat Display', sans-serif;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.post-back:hover {
  color: var(--text);
}

/* ── Responsive ── */

@media (max-width: 520px) {
  .intro {
    padding: 48px 0;
  }

  .notes-list li {
    flex-direction: column;
    gap: 4px;
  }

  .page-header {
    padding: 48px 0 24px;
  }
}
