@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --surface: #ffffff;
  --ink: #101418;
  --muted: #3c4a53;
  --link: #0b6e68;
  --visited: #08564f;
  --accent: #0f766e;
  --accent-ink: #ffffff;
  --line: #7d8b96;
  --hairline: #d7e0e6;
  --dark-bg: #0c1014;
  --dark-surface: #161c22;
  --dark-ink: #f4f7f8;
  --dark-muted: #c3cdd4;
  --dark-link: #8ee6de;
  --dark-visited: #6ecfc6;
  --dark-line: #8a98a3;
  --dark-hairline: #2c3844;
  --shadow: 0 1px 1px rgba(16, 24, 32, 0.04), 0 10px 28px rgba(16, 24, 32, 0.05);
  --shadow-hover: 0 14px 34px rgba(16, 24, 32, 0.08);
  --nav-h: 9rem;
}

@media (min-width: 25.5rem) {
  :root {
    --nav-h: 6.25rem;
  }
}

@media (min-width: 35rem) {
  :root {
    --nav-h: 4.75rem;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: var(--dark-bg);
  --surface: var(--dark-surface);
  --ink: var(--dark-ink);
  --muted: var(--dark-muted);
  --link: var(--dark-link);
  --visited: var(--dark-visited);
  --line: var(--dark-line);
  --hairline: var(--dark-hairline);
  --shadow: 0 1px 1px rgba(0, 0, 0, 0.35), 0 16px 40px rgba(0, 0, 0, 0.32);
  --shadow-hover: 0 16px 36px rgba(0, 0, 0, 0.45);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: var(--dark-bg);
    --surface: var(--dark-surface);
    --ink: var(--dark-ink);
    --muted: var(--dark-muted);
    --link: var(--dark-link);
    --visited: var(--dark-visited);
    --line: var(--dark-line);
    --hairline: var(--dark-hairline);
    --shadow: 0 1px 1px rgba(0, 0, 0, 0.35), 0 16px 40px rgba(0, 0, 0, 0.32);
    --shadow-hover: 0 16px 36px rgba(0, 0, 0, 0.45);
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 42% at -8% -12%, color-mix(in srgb, var(--link) 16%, transparent), transparent 58%),
    radial-gradient(ellipse 55% 36% at 108% -8%, color-mix(in srgb, var(--link) 9%, transparent), transparent 52%);
  font-family: Inter, system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.5;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3 {
  font-weight: 600;
  letter-spacing: -0.034em;
  line-height: 1.12;
}

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

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

a:hover {
  text-decoration-thickness: 2px;
}

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

.skip {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  transform: translateY(-160%);
  background: var(--ink);
  color: var(--bg);
  padding: 0.55rem 0.8rem;
  border-radius: 0.6rem;
  z-index: 40;
  text-decoration: none;
}

.skip:focus {
  transform: none;
}

.shell {
  width: min(72rem, calc(100% - 2rem));
  margin-inline: auto;
}

.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--hairline);
}

.masthead-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  min-height: 4.25rem;
  padding-block: 0.45rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 620;
  letter-spacing: -0.03em;
}

.brand:visited {
  color: var(--ink);
}

.mark {
  width: 1.35rem;
  height: 1.35rem;
  display: block;
}

.masthead-actions {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  margin-left: auto;
}

.sitenav ul,
.footernav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.sitenav a,
.footernav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 560;
}

.sitenav a:visited,
.footernav a:visited {
  color: var(--muted);
}

.sitenav a[aria-current="page"] {
  color: var(--ink);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--hairline);
}

.theme-toggle:not([hidden]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-left: 0.15rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.theme-toggle .icon {
  width: 1.1rem;
  height: 1.1rem;
  display: block;
}

.theme-toggle .icon-sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

main {
  padding-bottom: 3.5rem;
}

.hero {
  padding: 3.25rem 0 1.5rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 580;
  letter-spacing: -0.045em;
  line-height: 1.02;
  text-wrap: balance;
}

.hero-home h1 {
  font-size: clamp(3.15rem, 8vw, 5.5rem);
  letter-spacing: -0.048em;
  line-height: 0.96;
}

.hero-resume h1 {
  max-width: 11em;
  font-size: clamp(2.15rem, 4.2vw, 3.2rem);
  letter-spacing: -0.042em;
  line-height: 1.02;
}

.intro-name,
.resume-headline,
.footer-id {
  color: var(--ink);
  font-weight: 580;
  letter-spacing: -0.02em;
}

.intro-name {
  margin-top: 1.35rem;
  font-size: 1.2rem;
}

.intro-headline,
.resume-location,
.footer-role,
.footer-updated {
  color: var(--muted);
}

.intro-headline,
.resume-headline {
  margin-top: 0.3rem;
  font-size: 1.05rem;
}

.resume-headline {
  font-weight: 500;
  color: var(--muted);
}

.resume-location {
  margin-top: 0.45rem;
}

.lede {
  max-width: 34rem;
  margin-top: 1.35rem;
  font-size: 1.2rem;
  line-height: 1.45;
  letter-spacing: -0.02em;
}

.updated,
.hint {
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.hint {
  margin-top: 0.25rem;
}

.filters {
  position: sticky;
  top: var(--nav-h);
  z-index: 15;
  margin: 0 0 1.75rem;
  padding: 0.75rem 0 0.85rem;
  border: 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px);
}

.filters legend {
  padding: 0;
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.chip-row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.filter-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0.3rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 560;
  cursor: pointer;
}

.chip .count {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.filter-input:checked + .chip {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.filter-input:checked + .chip .count {
  color: var(--accent-ink);
}

.filter-input:focus-visible + .chip {
  outline: 3px solid var(--link);
  outline-offset: 3px;
}

.page:has(#filter-news:checked) .resource-section:not(#news),
.page:has(#filter-news:checked) .featured,
.page:has(#filter-tools:checked) .resource-section:not(#tools),
.page:has(#filter-tools:checked) .featured,
.page:has(#filter-guides:checked) .resource-section:not(#guides),
.page:has(#filter-guides:checked) .featured,
.page:has(#filter-courses:checked) .resource-section:not(#courses),
.page:has(#filter-courses:checked) .featured {
  display: none;
}

.resource-section {
  margin-top: 2.75rem;
  scroll-margin-top: 12rem;
}

.featured {
  scroll-margin-top: 12rem;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  margin-bottom: 0.9rem;
}

.section-head h2 {
  font-size: 1.35rem;
}

.section-head p {
  color: var(--muted);
  font-size: 0.92rem;
}

.entries {
  display: grid;
  gap: 0.8rem;
}

.entry {
  padding: 1.15rem 1.2rem 1.2rem;
  border: 1px solid var(--hairline);
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.featured .entry {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 7%, var(--surface)), var(--surface) 3.2rem);
}

.entry-title {
  font-size: 1.125rem;
  line-height: 1.35;
}

.featured .entry-title {
  font-size: clamp(1.3rem, 2vw, 1.55rem);
  line-height: 1.25;
}

.entry-title a {
  color: var(--link);
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 1px;
}

.entry-title a:visited {
  color: var(--visited);
}

.entry-title a:hover {
  background-size: 100% 1px;
}

.ext {
  width: 0.8em;
  height: 0.8em;
  margin-left: 0.28em;
  vertical-align: -0.05em;
}

.newtab {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.meta,
.note,
.place,
.dates {
  color: var(--muted);
}

.meta {
  margin-top: 0.4rem;
  font-size: 0.92rem;
}

.note {
  margin-top: 0.55rem;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.45;
}

.dot {
  color: var(--muted);
}

.resume {
  max-width: 42rem;
  padding-bottom: 1rem;
}

.resume section {
  margin-top: 2.75rem;
}

.summary {
  max-width: 40rem;
  font-size: 1.125rem;
  line-height: 1.55;
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.skill-list li {
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-weight: 550;
}

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

.timeline > li {
  position: relative;
  padding: 0 0 1.85rem 1.45rem;
}

.timeline > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  bottom: 0;
  width: 1px;
  background: var(--line);
}

.timeline > li:last-child {
  padding-bottom: 0;
}

.timeline > li:last-child::before {
  bottom: auto;
  height: 0.15rem;
}

.timeline > li::after {
  content: "";
  position: absolute;
  left: -4px;
  top: 0.28rem;
  width: 9px;
  height: 9px;
  border: 2px solid var(--link);
  border-radius: 50%;
  background: var(--bg);
}

.job h3,
.school h3 {
  font-size: 1.15rem;
}

.place {
  margin-top: 0.2rem;
  font-size: 0.95rem;
}

.role-block {
  display: grid;
  gap: 0.1rem;
  margin-top: 0.85rem;
}

.role-title {
  font-weight: 560;
}

.dates {
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.site-footer {
  padding: 1.75rem 0 2.75rem;
  border-top: 1px solid var(--hairline);
}

.footer-id {
  margin-top: 0.9rem;
}

.footer-role,
.footer-updated {
  margin-top: 0.2rem;
  font-size: 0.95rem;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .entry,
  .chip,
  .sitenav a,
  .theme-toggle,
  .entry-title a {
    transition:
      transform 180ms ease,
      box-shadow 180ms ease,
      border-color 180ms ease,
      background-color 180ms ease,
      background-size 180ms ease,
      color 180ms ease;
  }

  .entry:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--link) 45%, var(--hairline));
    box-shadow: var(--shadow-hover);
  }

  .chip:hover {
    border-color: var(--link);
  }
}

@media (min-width: 40rem) {
  .role-block {
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 1.5rem;
    align-items: baseline;
  }

  .role-block .dates {
    text-align: right;
  }
}

@media (min-width: 48rem) {
  .shell {
    width: min(72rem, calc(100% - 4rem));
  }

  .hero {
    padding: 5rem 0 2rem;
  }
}

@media (min-width: 64rem) {
  .entries {
    grid-template-columns: 1fr 1fr;
  }

  .featured .entries {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .entry,
  .chip,
  .sitenav a,
  .theme-toggle,
  .entry-title a {
    transition: none;
  }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-moon {
    display: none;
  }

  :root:not([data-theme="light"]) .theme-toggle .icon-sun {
    display: block;
  }
}

.ask-entry {
  margin-top: 1.15rem;
}

.ask-entry a {
  font-weight: 600;
}

.hero-chat {
  padding-bottom: 0.75rem;
}

.hero-chat h1 {
  font-size: clamp(2.1rem, 5vw, 3.2rem);
}

.phi-banner {
  position: sticky;
  top: var(--nav-h);
  z-index: 15;
  margin: 0;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
}

.chat-page,
.admin-page {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding-bottom: 1rem;
}

.transcript {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 14rem;
  max-height: min(34rem, calc(100vh - var(--nav-h) - 16rem));
  overflow: auto;
  padding: 0.2rem;
}

.empty-chat {
  color: var(--muted);
}

.turn {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  max-width: 40rem;
}

.turn:has(.bubble-user) {
  align-self: flex-end;
  align-items: flex-end;
}

.turn-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.bubble {
  margin: 0;
  padding: 0.8rem 1rem;
  border: 1px solid var(--hairline);
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.bubble p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.bubble-user {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
}

.composer {
  display: grid;
  gap: 0.45rem;
}

.composer-label {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.composer textarea,
.chat-page button,
.admin-page button {
  font: inherit;
}

.composer textarea {
  width: 100%;
  min-height: 6.5rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: var(--surface);
  color: var(--ink);
  resize: vertical;
}

.composer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.chat-status {
  flex: 1;
  min-height: 1.5rem;
  margin: 0;
  color: var(--muted);
}

.chat-page button,
.admin-page button,
.votes button {
  min-height: 2.75rem;
  padding: 0.4rem 1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  cursor: pointer;
}

.chat-page button:disabled,
.admin-page button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.secondary,
.admin-page .secondary,
.votes .secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}

.votes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.admin-page .chip {
  font: inherit;
}

.admin-page .chip[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.review-list {
  display: grid;
  gap: 0.85rem;
}

.review-card {
  display: grid;
  gap: 0.55rem;
  padding: 1rem;
  border: 1px solid var(--hairline);
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.review-card h2 {
  font-size: 1.15rem;
}

.review-answer,
.review-meta {
  overflow-wrap: anywhere;
}

.review-meta {
  color: var(--muted);
  font-size: 0.95rem;
}

@media (min-width: 40rem) {
  .composer-actions {
    justify-content: flex-end;
  }

  .chat-status {
    margin-right: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .transcript {
    scroll-behavior: auto;
  }
}
