:root {
  color-scheme: light dark;
  --bg: #fbfaf7;
  --text: #181716;
  --muted: #6b6760;
  --faint: #9a948a;
  --line: #e5dfd5;
  --accent: #c3482f;
  --accent-soft: #f4dfd9;
  --link-decoration: rgba(195, 72, 47, 0.35);
  --focus-ring: rgba(195, 72, 47, 0.24);
  --toggle-track: #eee7dc;
  --toggle-track-active: #3b332f;
  --toggle-thumb: #fffdfa;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #151413;
    --text: #f4efe7;
    --muted: #b8afa3;
    --faint: #81796f;
    --line: #38332e;
    --accent: #ff8a68;
    --accent-soft: #472820;
    --link-decoration: rgba(255, 138, 104, 0.42);
    --focus-ring: rgba(255, 138, 104, 0.35);
    --toggle-track: #2c2824;
    --toggle-track-active: #ff8a68;
    --toggle-thumb: #151413;
  }
}

:root[data-theme="light"] {
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #151413;
  --text: #f4efe7;
  --muted: #b8afa3;
  --faint: #81796f;
  --line: #38332e;
  --accent: #ff8a68;
  --accent-soft: #472820;
  --link-decoration: rgba(255, 138, 104, 0.42);
  --focus-ring: rgba(255, 138, 104, 0.35);
  --toggle-track: #2c2824;
  --toggle-track-active: #ff8a68;
  --toggle-thumb: #151413;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 17px;
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration-color: var(--link-decoration);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

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

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 20;
  transform: translateY(-140%);
  background: var(--text);
  color: var(--bg);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
main,
.footer {
  width: min(100% - 2.5rem, 920px);
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem 0 1rem;
}

.brand {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

.header-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.7rem 1rem;
}

.nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.nav a {
  text-decoration: none;
}

.theme-toggle {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.35rem;
  height: 1.85rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  padding: 0;
}

.theme-toggle__track {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: inherit;
  background: var(--toggle-track);
  transition:
    background-color 160ms ease,
    border-color 160ms ease;
}

.theme-toggle__thumb {
  position: absolute;
  top: 0.2rem;
  left: 0.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  background: var(--toggle-thumb);
  color: var(--accent);
  box-shadow: 0 1px 3px rgba(24, 23, 22, 0.22);
  transition: transform 160ms ease;
}

.theme-toggle:hover .theme-toggle__track {
  border-color: var(--accent);
}

.theme-toggle[aria-checked="true"] .theme-toggle__track {
  border-color: var(--toggle-track-active);
  background: var(--toggle-track-active);
}

.theme-toggle[aria-checked="true"] .theme-toggle__thumb {
  transform: translateX(1.5rem);
}

.theme-icon {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.hero {
  min-height: calc(100vh - 88px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 250px);
  align-items: center;
  gap: 3.5rem;
  padding: 5rem 0 4rem;
}

.hero-copy {
  max-width: 650px;
}

.avatar {
  display: block;
  width: min(100%, 250px);
  height: auto;
  aspect-ratio: 430 / 512;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 16px 16px 0 var(--accent-soft);
  transform: rotate(2deg);
}

.eyebrow,
.section-kicker,
.entry-meta,
time {
  margin: 0 0 0.65rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 11ch;
  margin-bottom: 1rem;
  font-size: 4.25rem;
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 1rem;
  font-size: 1.65rem;
  line-height: 1.18;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0.45rem;
  font-size: 1.08rem;
  line-height: 1.3;
  letter-spacing: 0;
}

.lede {
  max-width: 610px;
  color: var(--muted);
  font-size: 1.15rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  margin-top: 1.9rem;
  font-weight: 800;
}

.section {
  padding: 3.5rem 0;
  border-top: 1px solid var(--line);
}

.section-inner {
  max-width: 760px;
}

.section p {
  color: var(--muted);
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 0.6rem;
}

.text-link {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 800;
}

.entry-list {
  display: grid;
}

.entry {
  padding: 1.35rem 0;
  border-top: 1px solid var(--line);
}

.entry:first-child {
  border-top: 0;
}

.entry p:last-child,
.entry-links {
  margin-bottom: 0;
}

.entry-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 0.75rem;
  font-weight: 800;
}

.post h3 a {
  text-decoration: none;
}

.contact-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 1rem;
}

.contact-list a {
  width: fit-content;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--text);
  font-weight: 700;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 2.25rem 0 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.footer p {
  margin: 0;
}

.footer a {
  font-weight: 800;
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }

  .site-header,
  main,
  .footer {
    width: min(100% - 2rem, 920px);
  }

  .site-header {
    align-items: flex-start;
    padding-top: 1.4rem;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 1.8rem;
    padding: 3.5rem 0;
  }

  .avatar {
    width: 132px;
    border-radius: 14px;
    box-shadow: 10px 10px 0 var(--accent-soft);
    transform: rotate(1deg);
  }

  h1 {
    font-size: 3.05rem;
  }

  h2 {
    font-size: 1.42rem;
  }

  .lede {
    font-size: 1.05rem;
  }

  .section {
    padding: 3rem 0;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.2rem;
  }
}

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

  .nav {
    justify-content: flex-start;
  }

  .header-controls {
    justify-content: flex-start;
  }

  h1 {
    font-size: 2.55rem;
  }
}
