:root {
  color-scheme: light;
  --bg: #f7f4ee;
  --paper: #fffaf2;
  --ink: #1d211f;
  --muted: #656b67;
  --line: #dad2c4;
  --accent: #176b87;
  --accent-strong: #0f4c5c;
  --rust: #a34f35;
  --green: #567568;
  --shadow: 0 18px 50px rgba(40, 36, 27, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 250, 242, 0.9), rgba(247, 244, 238, 0.72)),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.55);
  padding: 0.1rem 0.35rem;
  font-size: 0.92em;
}

.site-header,
.site-footer {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0 18px;
}

.brand {
  font-weight: 760;
  letter-spacing: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav a {
  min-width: 64px;
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--muted);
  text-align: center;
  transition: background 160ms ease, color 160ms ease;
}

.nav a:hover,
.nav a[aria-current="page"] {
  background: rgba(23, 107, 135, 0.12);
  color: var(--accent-strong);
}

main {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  display: grid;
  align-content: center;
  min-height: 68vh;
  padding: 74px 0 96px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--rust);
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.13;
  letter-spacing: 0;
}

h1 {
  max-width: 860px;
  margin-bottom: 22px;
  font-size: clamp(2.6rem, 7vw, 5.9rem);
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(1.8rem, 3.6vw, 3.1rem);
}

h3 {
  margin-bottom: 8px;
  font-size: 1.08rem;
}

.hero-copy,
.page-title p {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.45);
  color: var(--ink);
  font-weight: 700;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  border-color: rgba(23, 107, 135, 0.35);
  background: rgba(255, 255, 255, 0.75);
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.section {
  padding: 72px 0;
  border-bottom: 1px solid var(--line);
}

.two-column,
.resume-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 56px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.note-list,
.timeline,
.post-grid,
.post-list,
.resume-main {
  display: grid;
  gap: 14px;
}

.note-list article,
.timeline article,
.post-card,
.resume-aside,
.resume-main section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 242, 0.76);
  box-shadow: var(--shadow);
}

.note-list article,
.timeline article,
.post-card,
.resume-aside,
.resume-main section {
  padding: 22px;
}

.note-list p,
.timeline p,
.post-card p,
.resume-layout p {
  margin-bottom: 0;
  color: var(--muted);
}

.timeline article {
  display: grid;
  grid-template-columns: 44px 1fr;
  column-gap: 14px;
}

.timeline span {
  grid-row: span 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(86, 117, 104, 0.14);
  color: var(--green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.post-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.post-card {
  min-height: 184px;
}

.post-card time,
.article time {
  color: var(--muted);
  font-size: 0.9rem;
}

.post-card a {
  display: grid;
  height: 100%;
}

.post-list .post-card {
  min-height: auto;
}

.page-title {
  padding: 76px 0 36px;
  border-bottom: 1px solid var(--line);
}

.article {
  max-width: 760px;
  margin: 0 auto;
  padding: 76px 0;
}

.article h1 {
  font-size: clamp(2.3rem, 5vw, 4.6rem);
}

.article h2 {
  margin-top: 44px;
  font-size: 1.8rem;
}

.article p,
.article li {
  color: #3f4541;
  font-size: 1.05rem;
}

.article blockquote {
  margin: 28px 0;
  border-left: 4px solid var(--accent);
  padding-left: 18px;
  color: var(--muted);
}

.resume-layout {
  padding: 60px 0 76px;
  align-items: start;
}

.resume-aside {
  position: sticky;
  top: 24px;
}

.resume-aside h2 {
  font-size: 2rem;
}

.resume-main section + section {
  margin-top: 0;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 0 44px;
  color: var(--muted);
  font-size: 0.94rem;
}

.error {
  border: 1px solid rgba(163, 79, 53, 0.35);
  border-radius: 8px;
  padding: 18px;
  background: rgba(163, 79, 53, 0.08);
  color: var(--rust);
}

@media (max-width: 800px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
  }

  .nav a {
    min-width: 0;
    flex: 1;
  }

  .hero {
    min-height: 58vh;
    padding: 54px 0 70px;
  }

  .two-column,
  .resume-layout,
  .post-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 52px 0;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .resume-aside {
    position: static;
  }
}
