:root {
  --bg: #f4f2ee;
  --bg-elev: #faf8f5;
  --paper: #ffffff;
  --ink: #161616;
  --ink-muted: #53514c;
  --ink-faint: #8a8780;
  --rule: #dcd6cc;
  --accent: #234060;
  --accent-soft: rgba(35, 64, 96, 0.55);
  --accent-hover: #152a42;
  --accent-warm: #5c4a38;
  --accent-warm-soft: #7a6654;
  --accent-teal: #3d5c5a;
  --ink-venue: #4a5f6e;
  --ink-authors: #6e6a62;
  --measure: 43rem;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --gradient-accent: rgba(35, 64, 96, 0.055);
  --gradient-warm: rgba(110, 82, 55, 0.045);
  --photo-ring: rgba(255, 255, 255, 0.35);
  --photo-shadow: rgba(0, 0, 0, 0.06);
  --photo-inset: rgba(0, 0, 0, 0.05);
  --title-rule: rgba(35, 64, 96, 0.42);
  --surface-muted: rgba(255, 255, 255, 0.55);
  --pill-bg: rgba(255, 255, 255, 0.72);
  --pill-hover-border: #b9c2cc;
  --news-edge-default: rgba(61, 92, 90, 0.22);
  --news-edge-pending: rgba(122, 102, 84, 0.35);
  --news-edge-award: rgba(92, 74, 56, 0.3);
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #1b1a18;
  --bg-elev: #232220;
  --paper: #2c2a27;
  --ink: #eceae6;
  --ink-muted: #b8b5ae;
  --ink-faint: #8a8680;
  --rule: #3f3c38;
  --accent: #8eb4d4;
  --accent-soft: rgba(142, 180, 212, 0.7);
  --accent-hover: #b3d0ea;
  --accent-warm: #c9b08a;
  --accent-warm-soft: #a89474;
  --accent-teal: #7dada8;
  --ink-venue: #9eb0c0;
  --ink-authors: #9a9690;
  --gradient-accent: rgba(142, 180, 212, 0.08);
  --gradient-warm: rgba(201, 176, 138, 0.06);
  --photo-ring: rgba(255, 255, 255, 0.08);
  --photo-shadow: rgba(0, 0, 0, 0.35);
  --photo-inset: rgba(255, 255, 255, 0.06);
  --title-rule: rgba(142, 180, 212, 0.45);
  --surface-muted: rgba(44, 42, 39, 0.85);
  --pill-bg: rgba(44, 42, 39, 0.9);
  --pill-hover-border: #5a6d7d;
  --news-edge-default: rgba(125, 173, 168, 0.35);
  --news-edge-pending: rgba(168, 148, 116, 0.4);
  --news-edge-award: rgba(201, 176, 138, 0.38);
  color-scheme: dark;
}

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

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

html.theme-transition,
html.theme-transition * {
  transition:
    background-color 0.22s ease,
    color 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  padding: 0 1.35rem 4rem;
  font-family: "Source Sans 3", system-ui, -apple-system, sans-serif;
  font-weight: 400;
  line-height: 1.58;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 130% 70% at 100% -15%, var(--gradient-accent), transparent 52%),
    radial-gradient(ellipse 100% 55% at -5% 110%, var(--gradient-warm), transparent 48%),
    linear-gradient(180deg, var(--bg-elev) 0%, var(--bg) 28rem, var(--bg) 100%);
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 0.2em;
  transition: color 0.18s ease;
}

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

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.65rem 0 0 0.35rem;
}

header.site {
  position: relative;
  margin-bottom: 2.45rem;
  padding-bottom: 1.85rem;
  border-bottom: 1px solid var(--rule);
}

.theme-toggle {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--pill-bg);
  color: var(--ink-muted);
  cursor: pointer;
  font: inherit;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--pill-hover-border);
  background: var(--paper);
}

.theme-toggle svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: currentColor;
}

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

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

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

@supports (color: color-mix(in srgb, white, black)) {
  header.site {
    border-bottom-color: color-mix(in srgb, var(--rule) 88%, var(--accent) 12%);
  }
}

.hero {
  display: grid;
  grid-template-columns: minmax(7.5rem, 9.25rem) 1fr;
  gap: 1.5rem 1.85rem;
  align-items: start;
}

.hero-photo {
  margin: 0;
  position: relative;
  aspect-ratio: 4 / 5;
  max-width: 9.25rem;
  border: 1px solid var(--rule);
  background: var(--paper);
  overflow: hidden;
  transform: rotate(-0.65deg);
  box-shadow:
    0 0 0 1px var(--photo-ring),
    0.35rem 0.45rem 0 var(--photo-shadow);
}

@media (prefers-reduced-motion: reduce) {
  .hero-photo {
    transform: none;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
  }
}

.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px var(--photo-inset);
}

.hero-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-main h1 {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: clamp(2.05rem, 4.5vw, 2.65rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  color: var(--ink);
}

.hero-main h1::after {
  content: "";
  display: block;
  width: 2.75rem;
  height: 2px;
  margin-top: 0.55rem;
  background: linear-gradient(90deg, var(--title-rule), transparent);
  border-radius: 1px;
}

.tagline {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.18rem;
  font-style: italic;
  font-weight: 500;
  color: var(--ink-muted);
  margin: 0 0 0.8rem;
  line-height: 1.38;
  max-width: 26em;
}

.title-line {
  font-size: 0.98rem;
  color: var(--ink-muted);
  font-weight: 450;
  margin: 0 0 1.05rem;
  line-height: 1.45;
}

.title-line-detail {
  display: block;
  margin-top: 0.38rem;
  font-size: 0.86rem;
  color: var(--ink-faint);
  font-weight: 400;
  line-height: 1.45;
  max-width: 32em;
}

.contact-email {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
}

.contact-email a {
  color: var(--ink-muted);
}

.contact-email a:hover {
  color: var(--accent);
}

.social-icons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.social-icons li {
  display: flex;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  color: var(--ink-muted);
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--surface-muted);
  transition:
    color 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.social-icons a:hover {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--rule));
  background: var(--paper);
  text-decoration: none;
}

.social-icons .icon {
  width: 1.05rem;
  height: 1.05rem;
}

.cv-pill {
  display: inline-block;
  margin-top: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--rule);
  background: var(--pill-bg);
  color: var(--ink-muted);
  border-radius: 2px;
}

.cv-pill:hover {
  border-color: var(--pill-hover-border);
  color: var(--accent);
  text-decoration: none;
}

section {
  margin-bottom: 2.35rem;
}

section:last-of-type {
  margin-bottom: 0;
}

h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: 1.34rem;
  margin: 0 0 0.85rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.65rem;
}

h2::before {
  content: "/";
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--accent-soft);
  letter-spacing: 0;
  transform: translateY(-0.05em);
}

.lede {
  font-size: 1.04rem;
  color: var(--ink-muted);
  margin: 0 0 1rem;
}

.lede:last-child {
  margin-bottom: 0;
}

.section-kicker {
  margin-top: -0.35rem;
}

.interests {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.98rem;
  color: var(--ink-muted);
  line-height: 1.55;
}

.interests li::marker {
  color: var(--accent-teal);
}

.interests li {
  margin-bottom: 0.45rem;
}

.interests li:last-child {
  margin-bottom: 0;
}

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

.news-feed > li {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.5rem 1.25rem;
  padding: 0.85rem 0 0.85rem 0.65rem;
  border-bottom: 1px solid var(--rule);
  border-left: 2px solid transparent;
  font-size: 0.97rem;
  color: var(--ink-muted);
}

.news-feed > li:has(.news-kind--pending) {
  border-left-color: var(--news-edge-pending);
}

.news-feed > li:has(.news-kind--award) {
  border-left-color: var(--news-edge-award);
}

.news-feed > li:not(:has(.news-kind--pending)):not(:has(.news-kind--award)) {
  border-left-color: var(--news-edge-default);
}

.news-feed > li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.news-feed > li:first-child {
  padding-top: 0;
}

.news-date {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--accent-teal);
  white-space: nowrap;
  padding-top: 0.12rem;
}

.news-line {
  margin: 0;
  line-height: 1.52;
}

.news-kind {
  color: var(--accent);
  font-weight: 500;
}

.news-kind--pending {
  color: var(--accent-warm-soft);
}

.news-kind--award {
  color: var(--accent-warm);
}

.news-line cite {
  font-style: normal;
  color: var(--ink);
}

.news-line em {
  font-style: italic;
  color: var(--ink-venue);
}

.news-authors {
  color: var(--ink-authors);
}

.news-line a {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  margin-left: 0.15rem;
  white-space: nowrap;
  color: var(--accent);
}

.news-line a:hover {
  color: var(--accent-hover);
}

.section-kicker a {
  color: var(--accent);
}

.news-thumb {
  grid-column: 2;
  margin: 0.5rem 0 0;
}

.news-thumb img {
  display: block;
  max-width: 10rem;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--paper);
}

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

.experience-list > li {
  margin-bottom: 1.55rem;
  padding-bottom: 1.45rem;
  border-bottom: 1px solid var(--rule);
}

.experience-list > li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.exp-when {
  float: right;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--accent-teal);
  letter-spacing: 0.04em;
  margin-left: 1rem;
}

.exp-role {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  color: var(--ink);
}

.exp-meta {
  margin: 0 0 0.45rem;
  font-size: 0.92rem;
  color: var(--ink-muted);
}

.exp-bullets {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.94rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

.exp-bullets li {
  margin-bottom: 0.32rem;
}

.glance {
  border-top: 1px solid var(--rule);
  padding-top: 1.75rem;
}

@supports (color: color-mix(in srgb, white, black)) {
  .glance {
    border-top-color: color-mix(in srgb, var(--rule) 88%, var(--accent) 10%);
  }
}

.glance h3 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-teal);
  margin: 1.35rem 0 0.4rem;
}

.glance h3:first-child {
  margin-top: 0;
}

.glance p {
  margin: 0;
  font-size: 0.98rem;
  color: var(--ink-muted);
  line-height: 1.55;
}

footer.site {
  margin-top: 2.65rem;
  padding-top: 1.45rem;
  border-top: 1px solid var(--rule);
  font-size: 0.82rem;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  color: var(--ink-faint);
}

@media (max-width: 560px) {
  .wrap {
    padding-left: 0;
  }

  .hero {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .hero-photo {
    max-width: 10rem;
  }

  .hero-main {
    width: 100%;
  }

  .hero-main h1::after {
    margin-left: auto;
    margin-right: auto;
  }

  .tagline {
    margin-left: auto;
    margin-right: auto;
  }

  .title-line-detail {
    margin-left: auto;
    margin-right: auto;
  }

  .contact-email {
    text-align: center;
  }

  .social-icons {
    justify-content: center;
  }

  .cv-pill {
    margin-left: auto;
    margin-right: auto;
  }

  h2 {
    justify-content: center;
  }

  .news-feed > li {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .exp-when {
    float: none;
    display: block;
    margin: 0 0 0.35rem;
  }
}

@supports not (color: color-mix(in srgb, white, black)) {
  header.site {
    border-bottom-color: var(--rule);
  }

  .glance {
    border-top-color: var(--rule);
  }
}

@media print {
  .theme-toggle {
    display: none;
  }

  body {
    background: #fff;
    padding: 0;
    font-size: 11pt;
  }

  .cv-pill {
    display: none;
  }

  .hero {
    grid-template-columns: 7rem 1fr;
  }

  .hero-photo {
    transform: none;
  }
}
