:root {
  color-scheme: light;
  --bg: #fafaf9;
  --ink: #1c1917;
  --muted: #68635f;
  --line: #e7e5e4;
  --paper: #ffffff;
  --accent: #9f2d20;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #171615;
  --ink: #f5f5f4;
  --muted: #b8b3ae;
  --line: #393633;
  --paper: #22201e;
  --accent: #e27666;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

p {
  margin-top: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 14px max(24px, calc((100vw - 1120px) / 2));
  border-bottom: 1px solid transparent;
  background: rgba(250, 250, 249, 0.9);
  backdrop-filter: blur(16px);
  transition: border-color 180ms ease;
}

:root[data-theme="dark"] .site-header {
  background: rgba(23, 22, 21, 0.9);
}

.site-header.is-scrolled {
  border-color: var(--line);
}

.brand {
  font-size: 1rem;
  font-weight: 800;
  text-decoration: none;
}

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

.menu-wrap {
  position: relative;
}

.menu-button,
.theme-toggle {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.menu-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
}

.menu-chevron {
  width: 7px;
  height: 7px;
  margin-top: -3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 160ms ease, margin 160ms ease;
}

.menu-button[aria-expanded="true"] .menu-chevron {
  margin-top: 3px;
  transform: rotate(225deg);
}

.menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: grid;
  width: 210px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  box-shadow: 0 18px 38px rgba(28, 25, 23, 0.14);
}

.menu-panel[hidden] {
  display: none;
}

.menu-panel a {
  padding: 10px 11px;
  border-radius: 3px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.menu-panel a:hover,
.menu-panel a:focus-visible {
  background: var(--bg);
  color: var(--ink);
  outline: none;
}

.theme-toggle {
  display: inline-grid;
  width: 38px;
  place-items: center;
  padding: 0;
  font-size: 1.15rem;
  line-height: 1;
}

.menu-button:hover,
.theme-toggle:hover,
.menu-button:focus-visible,
.theme-toggle:focus-visible {
  border-color: var(--ink);
  outline: none;
}

.sun-icon,
.moon-icon {
  grid-area: 1 / 1;
}

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

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

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

.bio-hero {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  column-gap: clamp(28px, 5vw, 58px);
  row-gap: 28px;
  align-items: center;
  min-height: auto;
  padding: clamp(38px, 5vw, 58px) 0 clamp(48px, 7vw, 72px);
  border-bottom: 1px solid var(--line);
}

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

h1 {
  margin-bottom: 14px;
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 0.92;
}

.bio-heading h1 {
  margin-bottom: 14px;
  font-size: clamp(2.7rem, 5vw, 4.3rem);
}

.bio-heading p {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.45;
}

.bio-body {
  grid-column: 1 / -1;
}

.bio-text {
  max-width: 1040px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.65;
}

.bio-text p {
  margin-bottom: 16px;
}

.bio-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.section-link a {
  color: var(--accent);
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.bio-actions a {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--muted);
  text-decoration: none;
  transition: color 160ms ease, transform 160ms ease;
}

.bio-actions a:hover,
.bio-actions a:focus-visible {
  color: var(--accent);
  outline: none;
  transform: translateY(-2px);
}

.bio-actions svg {
  width: 25px;
  height: 25px;
  stroke-width: 2;
}

.linkedin-icon {
  display: inline-grid;
  width: 23px;
  height: 23px;
  border: 2px solid currentColor;
  border-radius: 3px;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
}

.headshot-wrap {
  margin: 0;
}

.headshot-wrap img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: 0 14px 30px rgba(28, 25, 23, 0.1);
}

.section {
  padding: clamp(54px, 8vw, 92px) 0;
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: start;
  margin-bottom: 30px;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.9rem, 3vw, 2.7rem);
  line-height: 1.05;
}

.section-heading p {
  max-width: 690px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.7;
}

#journalism .section-heading {
  row-gap: 10px;
}

.item-list {
  display: grid;
}

.item-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 28px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.item-list article:last-child {
  border-bottom: 1px solid var(--line);
}

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

.item-list p,
.paper-list p,
.contact-section p {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.item-list span {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
  text-align: right;
}

.energy-experience {
  border-top: 1px solid var(--line);
}

.energy-experience article {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.experience-logo {
  display: flex;
  width: 112px;
  height: 92px;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
}

.experience-logo img {
  display: block;
  max-width: 100%;
  max-height: 76px;
  object-fit: contain;
}

.experience-logo.wide-logo img {
  max-width: 96%;
}

.energy-experience details {
  min-width: 0;
}

.energy-experience summary {
  position: relative;
  padding-right: 34px;
  cursor: pointer;
  list-style: none;
}

.energy-experience summary::-webkit-details-marker {
  display: none;
}

.energy-experience summary::after {
  position: absolute;
  top: 8px;
  right: 5px;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  content: "";
  transform: rotate(45deg);
  transition: transform 160ms ease, top 160ms ease;
}

.energy-experience details[open] summary::after {
  top: 13px;
  transform: rotate(225deg);
}

.energy-experience summary:hover h3,
.energy-experience summary:focus-visible h3 {
  color: var(--accent);
}

.energy-experience summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}

.experience-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 28px;
  align-items: start;
  margin-bottom: 0;
}

.experience-heading h3 {
  margin-bottom: 5px;
}

.experience-role {
  display: block;
  color: var(--accent);
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.4;
}

.experience-meta {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: right;
}

.experience-description {
  padding-top: 8px;
}

.energy-experience p {
  max-width: 860px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.logo-vat {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(159, 45, 32, 0.04), transparent 36%),
    var(--paper);
}

.logo-tile {
  display: flex;
  min-height: 124px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--bg);
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.logo-tile:hover {
  border-color: rgba(159, 45, 32, 0.45);
  box-shadow: 0 12px 24px rgba(28, 25, 23, 0.08);
  transform: translateY(-2px);
}

.logo-tile.planet-forward {
  background: var(--bg);
}

.logo-tile.planet-forward img {
  filter: brightness(0);
}

:root[data-theme="dark"] .logo-tile.planet-forward img {
  filter: brightness(0) invert(1);
}

.logo-tile img {
  display: block;
  max-width: 92%;
  max-height: 86px;
  object-fit: contain;
}

.logo-tile.nation img,
.logo-tile.saada img,
.logo-tile.htr img,
.logo-tile.falcon img,
.logo-tile.film img {
  max-width: 96%;
  max-height: 74px;
}

@media (max-width: 1100px) {
  .logo-vat {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.paper-list,
.award-list {
  display: grid;
}

.writing-room {
  border-top: 1px solid var(--line);
}

.topic-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.topic-filter button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  background: var(--bg);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
}

.topic-filter button.is-active,
.topic-filter button:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.paper-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 24px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.paper-season-group + .paper-season-group {
  margin-top: 8px;
}

.paper-list .paper-season {
  margin: 0;
  padding: 22px 0 9px;
  border-bottom: 1px solid var(--line);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.paper-season-group article:first-of-type {
  border-top: 0;
}

.paper-list h3 {
  max-width: 850px;
  margin-bottom: 5px;
  font-size: 1.02rem;
  line-height: 1.35;
}

.paper-list article:first-child,
.award-list article:first-child {
  border-top: 0;
}

.paper-list article:last-child,
.award-list article:last-child {
  border-bottom: 0;
}

.paper-list article.is-hidden {
  display: none;
}

.paper-list span,
.award-list span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-align: right;
}

.paper-list .paper-meta {
  display: block;
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: left;
}

.award-list .award-source {
  display: inline-flex;
  margin-left: 4px;
  color: var(--accent);
  font-size: 0.9rem;
  line-height: 1;
  text-decoration: none;
  transform: translateY(-1px);
}

.award-list .award-source:hover,
.award-list .award-source:focus-visible {
  color: var(--ink);
  outline: none;
}

.paper-list p {
  max-width: 820px;
  font-size: 0.82rem;
  line-height: 1.52;
}

.paper-list .paper-action {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  margin: 9px 0 0;
  border: 1px solid var(--ink);
  border-radius: 4px;
  padding: 0 10px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.76rem;
  font-weight: 800;
  text-decoration: none;
}

.paper-controls {
  margin-top: 10px;
}

.paper-list .paper-action.paper-action-below {
  margin-top: 9px;
}

.paper-list .paper-action:hover,
.paper-list .paper-action:focus-visible {
  background: transparent;
  color: var(--ink);
  outline: none;
}

.paper-abstract {
  max-width: 820px;
}

.paper-abstract summary {
  position: relative;
  width: max-content;
  padding-right: 18px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
  list-style: none;
}

.paper-abstract summary::-webkit-details-marker {
  display: none;
}

.paper-abstract summary::after {
  position: absolute;
  top: 3px;
  right: 2px;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  content: "";
  transform: rotate(45deg);
}

.paper-abstract[open] summary::after {
  top: 7px;
  transform: rotate(225deg);
}

.paper-abstract p {
  margin: 9px 0 0;
}

.paper-abstract p a {
  display: inline;
  margin: 0;
  font-size: inherit;
  font-weight: 700;
}

.award-list {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
}

.award-list article {
  border-top: 1px solid var(--line);
}

.award-list details {
  min-width: 0;
}

.award-list summary {
  position: relative;
  padding: 24px 56px 24px 22px;
  cursor: pointer;
  list-style: none;
}

.award-list summary::-webkit-details-marker {
  display: none;
}

.award-list summary::after {
  position: absolute;
  top: 31px;
  right: 26px;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  content: "";
  transform: rotate(45deg);
  transition: transform 160ms ease, top 160ms ease;
}

.award-list details[open] summary::after {
  top: 36px;
  transform: rotate(225deg);
}

.award-list details[open] summary {
  padding-bottom: 9px;
}

.award-list summary:hover h3,
.award-list summary:focus-visible h3 {
  color: var(--accent);
}

.award-list summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.award-list span {
  display: block;
  margin: -2px 0 0;
  color: var(--accent);
  font-size: 0.94rem;
  font-weight: 800;
  text-align: left;
}

.award-description {
  padding: 0 56px 24px 22px;
}

.award-list p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.paper-list > article > div > a:not(.paper-action) {
  display: inline-flex;
  margin-top: 8px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  text-underline-offset: 4px;
}

.conference-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.conference-grid article {
  min-height: 320px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
}

.conference-grid span {
  display: block;
  margin: -2px 0 8px;
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.35;
}

.conference-grid p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.conference-grid a {
  color: var(--accent);
  font-weight: 800;
  text-underline-offset: 4px;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 14px;
  font-weight: 800;
  text-decoration: none;
}

.button.primary {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.button.secondary {
  background: transparent;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.94rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 880px) {
  .site-header {
    padding-right: 24px;
    padding-left: 24px;
  }

  .section-heading {
    grid-template-columns: 1fr;
  }

  .bio-hero {
    grid-template-columns: 140px minmax(0, 1fr);
    padding-top: 34px;
  }

  .headshot-wrap {
    max-width: 140px;
  }

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

  .experience-heading {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .experience-meta {
    text-align: left;
  }

}

@media (max-width: 620px) {
  main,
  .site-footer {
    width: min(100% - 32px, 1120px);
  }

  h1 {
    font-size: clamp(2.9rem, 15vw, 4rem);
  }

  .dek {
    font-size: 1.2rem;
  }

  .bio-text {
    font-size: 0.92rem;
  }

  .bio-hero {
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 18px;
  }

  .bio-heading h1 {
    font-size: clamp(2.25rem, 11vw, 3.4rem);
  }

  .bio-heading p {
    font-size: 0.98rem;
  }

  .headshot-wrap {
    max-width: 108px;
  }

  .logo-vat {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 14px;
  }

  .logo-tile {
    min-height: 92px;
    padding: 12px;
  }

  .logo-tile img {
    max-height: 66px;
  }

  .logo-tile.nation img,
  .logo-tile.saada img,
  .logo-tile.htr img,
  .logo-tile.film img {
    max-height: 66px;
  }

  .item-list article {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .experience-heading {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .experience-meta {
    text-align: left;
  }

  .energy-experience article {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 16px;
  }

  .experience-logo {
    width: 82px;
    height: 76px;
    padding: 6px;
  }

  .experience-logo img {
    max-height: 62px;
  }

  .item-list span {
    text-align: left;
  }

  .paper-list article,
  .award-list article {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .paper-list span,
  .award-list span {
    text-align: left;
  }

  .conference-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
  }
}
