:root {
  color-scheme: light;
  --bg: #dce8f5;
  --panel: rgba(233, 241, 250, 0.78);
  --panel-strong: rgba(225, 236, 248, 0.96);
  --line: rgba(41, 78, 121, 0.12);
  --line-strong: rgba(45, 86, 137, 0.22);
  --text: #132742;
  --muted: #425a78;
  --soft: #637b9a;
  --accent: #2f6fbe;
  --accent-soft: #427fc9;
  --accent-pale: #c6daf1;
  --shadow: 0 28px 80px rgba(24, 46, 76, 0.16);
  --radius: 0;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", "Cascadia Code", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--sans);
  background:
    linear-gradient(rgba(220, 232, 245, 0.9), rgba(220, 232, 245, 0.96)),
    radial-gradient(circle at 84% 14%, rgba(95, 168, 255, 0.2), transparent 20%),
    radial-gradient(circle at 14% 82%, rgba(80, 137, 197, 0.16), transparent 22%),
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    var(--bg);
  background-size: auto, auto, auto, 48px 48px, 48px 48px, auto;
}

.progress-line {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 40;
  background: rgba(17, 37, 61, 0.05);
}

.progress-line span {
  display: block;
  width: var(--scroll-progress, 0%);
  height: 100%;
  background: linear-gradient(90deg, #5fa8ff, #a7d7ff);
  box-shadow: 0 0 18px rgba(95, 168, 255, 0.45);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -40px;
  z-index: 20;
  padding: 10px 12px;
  background: #10233a;
  color: #eef5fd;
  font: 600 0.84rem/1 var(--mono);
}

.skip-link:focus {
  top: 12px;
}

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

img {
  max-width: 100%;
  height: auto;
}

.site-shell {
  width: min(1140px, calc(100vw - 28px));
  margin: 14px auto 42px;
}

.stack {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), transparent),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 0, rgba(78, 143, 219, 0.035) 50%, transparent 100%);
  pointer-events: none;
}

.topbar {
  position: sticky;
  top: 10px;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  background:
    linear-gradient(135deg, rgba(16, 32, 52, 0.94), rgba(29, 63, 101, 0.94)),
    rgba(22, 28, 72, 0.88);
}

.brand,
.toplinks,
.eyebrow,
.tag-row,
.summary__label,
.timeline__year,
.post-card__index,
.post-card__meta,
.footer {
  font-family: var(--mono);
}

.brand {
  color: #f0f6ff;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.toplinks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.82rem;
}

.toplinks a,
.footer__links a {
  color: var(--accent-soft);
}

.toplinks a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(203, 226, 251, 0.4);
  border-radius: 999px;
  background: rgba(240, 247, 255, 0.16);
  color: #f7fbff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 0 0 1px rgba(138, 188, 243, 0.08);
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.toplinks a:hover,
.toplinks a:focus-visible {
  color: #ffffff;
  border-color: rgba(200, 225, 255, 0.62);
  background: rgba(240, 247, 255, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 0 1px rgba(122, 181, 247, 0.18);
  transform: translateY(-1px);
  outline: none;
}

.toplinks a.is-active {
  color: #0f2338;
  border-color: rgba(223, 238, 255, 0.85);
  background: linear-gradient(180deg, rgba(236, 246, 255, 0.96), rgba(196, 223, 249, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 8px 20px rgba(13, 26, 40, 0.18);
}

.hero {
  display: block;
  padding: 28px;
}

.hero__intro {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}

.avatar {
  position: relative;
  align-self: start;
  justify-self: start;
  width: 124px;
  height: 124px;
  min-height: 0;
  aspect-ratio: 1 / 1;
  margin-top: 6px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(63, 111, 170, 0.2);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 18%, rgba(78, 143, 219, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.06)),
    #ddebf8;
}

.avatar__photo {
  position: absolute;
  inset: 4px;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  object-fit: cover;
  border-radius: 50%;
  object-position: center 26%;
  filter: saturate(1.02) contrast(1.02);
}

.avatar::before,
.avatar::after {
  content: "";
  position: absolute;
  inset: 0;
}

.avatar::before {
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(149, 196, 255, 0.05), rgba(47, 111, 190, 0.03));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.55),
    0 10px 18px rgba(47, 111, 190, 0.1);
}

.avatar::after {
  inset: auto 10px -10px 10px;
  border-radius: 999px;
  background: rgba(47, 111, 190, 0.08);
  filter: blur(5px);
}

.hero__heading {
  display: flex;
  align-items: center;
  gap: 32px;
}

.hero h1,
.section h2,
.post-page__header h1 {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.hero h1 {
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  line-height: 1.04;
}

.hero__role {
  margin: 0 0 10px;
  color: var(--accent);
  font: 500 0.78rem/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero__gif {
  width: 342px;
  max-width: 34vw;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid rgba(63, 111, 170, 0.16);
  border-radius: 10px;
  background: rgba(223, 235, 247, 0.96);
  flex: 0 0 auto;
}

.lede,
.copy,
.post-page__content {
  color: var(--muted);
}

.lede {
  max-width: 54rem;
  margin: 12px 0 0;
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  line-height: 1.68;
}

.hero__details {
  margin-top: 18px;
}

.summary {
  display: grid;
  gap: 1px;
  background: rgba(63, 111, 170, 0.12);
  margin-top: 16px;
}

.summary__row {
  display: grid;
  grid-template-columns: 140px 1fr;
  background: rgba(229, 238, 248, 0.92);
}

.summary__label {
  padding: 14px 16px;
  color: var(--soft);
  font-size: 0.84rem;
  border-right: 1px solid rgba(145, 183, 238, 0.12);
}

.summary__value {
  padding: 14px 18px;
  font-size: 0.98rem;
  color: #1f3d5b;
}

.summary__value a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.summary__list {
  margin: 0;
  padding-left: 1.1rem;
}

.summary__list li + li {
  margin-top: 0.2rem;
}

.role-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.role-entry {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.role-title {
  font-weight: 600;
  color: #1a3453;
  font-size: 0.93rem;
}

.role-sep {
  color: var(--accent-pale);
  font-size: 0.8rem;
  line-height: 1;
}

.role-company {
  color: var(--muted);
  font-size: 0.9rem;
}

.role-badge {
  padding: 2px 8px;
  border: 1px solid rgba(47, 111, 190, 0.22);
  background: rgba(47, 111, 190, 0.07);
  color: var(--accent);
  font: 500 0.67rem/1.5 var(--mono);
  letter-spacing: 0.05em;
}

.section {
  padding: 24px;
}

.section__label {
  margin: 0 0 5px;
  color: var(--soft);
  font: 500 0.7rem/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.section h2 {
  font-size: clamp(1.4rem, 2vw, 1.9rem);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-strong);
  margin-bottom: 0;
}

.copy {
  max-width: 62ch;
  margin: 10px 0 0;
  font-size: 0.97rem;
  line-height: 1.62;
}

.ideas__intro {
  margin-top: 14px;
  max-width: 52ch;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.ideas__intro .copy {
  margin: 0;
}

.ideas__intro .copy a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(47, 111, 190, 0.35);
  text-underline-offset: 0.18em;
}

.post-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.idea-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

details.idea-card {
  border: 1px solid rgba(145, 183, 238, 0.14);
  background: rgba(227, 237, 248, 0.86);
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

details.idea-card:hover {
  transform: translateY(-2px);
  border-color: rgba(63, 111, 170, 0.3);
  background: rgba(239, 246, 253, 0.96);
}

details.idea-card[open] {
  background: rgba(239, 246, 253, 0.96);
  border-color: rgba(63, 111, 170, 0.3);
}

details.idea-card[open]:hover {
  border-color: rgba(63, 111, 170, 0.38);
}

.idea-card__summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  width: 100%;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  border: 0;
  background: transparent;
  text-align: left;
  font: inherit;
}

.idea-card__summary::-webkit-details-marker {
  display: none;
}

.idea-card__summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.idea-card__summary::after {
  content: "+";
  color: var(--accent);
  font: 500 1.1rem/1 var(--mono);
}

details.idea-card[open] .idea-card__summary::after {
  content: "-";
}

.idea-card__title {
  color: #163452;
  font-family: var(--serif);
  font-size: clamp(1.02rem, 1.6vw, 1.3rem);
  line-height: 1.28;
}

.idea-card__body {
  padding: 0 16px 16px;
  border-top: 1px solid rgba(145, 183, 238, 0.12);
}

.idea-card__body p {
  max-width: 72ch;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.62;
}

.post-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(145, 183, 238, 0.14);
  background: rgba(227, 237, 248, 0.86);
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

.post-card:hover {
  transform: translateY(-2px);
  border-color: rgba(63, 111, 170, 0.3);
  background: rgba(239, 246, 253, 0.96);
}

.post-card--text {
  grid-template-columns: 1fr;
}

.post-card__index {
  color: var(--soft);
  font-size: 0.84rem;
}

.post-card__copy {
  min-width: 0;
}

.post-card h3 {
  margin: 0;
  color: #163452;
  font-family: var(--serif);
  font-size: clamp(1.08rem, 1.7vw, 1.42rem);
  line-height: 1.28;
}

.post-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.58;
}

.post-card__meta {
  margin-top: 10px;
  color: var(--soft);
  font-size: 0.78rem;
}

.post-card__thumb,
.post-page__hero-image {
  width: 100%;
  height: auto;
  border: 1px solid rgba(63, 111, 170, 0.16);
  background: rgba(223, 235, 247, 0.96);
}

.post-card__thumb {
  align-self: stretch;
  min-height: 128px;
  object-fit: cover;
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px 24px;
  color: #2f4d6d;
  font-size: 0.86rem;
}

.footer__copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.footer__heading {
  margin: 0;
  color: var(--soft);
  font: 500 0.7rem/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.footer__tagline {
  margin: 0;
  color: #2f4d6d;
  font-size: 0.88rem;
  line-height: 1.5;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.site-note {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 4px;
  color: var(--soft);
  font: 0.78rem/1.4 var(--mono);
}

.post-page {
  display: grid;
  gap: 16px;
}

.post-page__header,
.post-page__content,
.post-page__footer {
  padding: 18px;
}

.post-page__header h1 {
  font-size: clamp(2rem, 3.5vw, 3.1rem);
}

.post-page__subtitle {
  max-width: 760px;
  margin: 10px 0 0;
  color: #2f4d6d;
  font-size: 1.08rem;
  line-height: 1.5;
}

.post-page__meta {
  margin-top: 10px;
  color: var(--soft);
  font-family: var(--mono);
  font-size: 0.82rem;
}

.post-page__hero-image {
  display: block;
  margin-top: 18px;
}

.post-page__inline-image {
  display: block;
  margin: 1.25rem 0;
  width: 100%;
  border: 1px solid rgba(63, 111, 170, 0.16);
  background: rgba(223, 235, 247, 0.96);
}

.post-page__content {
  font-size: 1rem;
  line-height: 1.78;
}

.post-page__content h2 {
  margin: 2rem 0 0.75rem;
  color: #17314e;
  font-family: var(--serif);
}

.post-page__content > p:first-child {
  font-size: 1.08rem;
  line-height: 1.84;
}

.post-page__content p,
.post-page__content li {
  color: var(--muted);
}

.post-page__content a {
  color: var(--accent-soft);
  text-decoration: underline;
  text-decoration-color: rgba(167, 215, 255, 0.3);
  text-underline-offset: 0.18em;
}

.post-page__content ul,
.post-page__content ol {
  padding-left: 1.25rem;
}

.post-note {
  margin: 1.5rem 0;
  padding: 14px 16px;
  border-left: 2px solid rgba(47, 111, 190, 0.45);
  background: rgba(203, 222, 244, 0.68);
  color: #21405f;
  font-family: var(--serif);
  font-size: 1.08rem;
  line-height: 1.6;
}

.post-code {
  margin: 1.25rem 0;
  padding: 14px 16px;
  overflow-x: auto;
  background: rgba(13, 31, 51, 0.96);
  border: 1px solid rgba(63, 111, 170, 0.22);
}

.post-code code {
  font: 0.88rem/1.7 var(--mono);
  color: #a7d7ff;
  white-space: pre;
}

.post-page__footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font: 0.84rem/1.45 var(--mono);
}

.post-page__footer a {
  color: var(--accent-soft);
}

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

  .post-card,
  details.idea-card {
    transition: none;
  }

  .toplinks a {
    transition: none;
  }

  details.idea-card:hover {
    transform: none;
  }

  .hero__gif {
    display: none;
  }
}

@media (max-width: 860px) {
  .hero__intro {
    grid-template-columns: 1fr;
  }

  .hero__heading {
    align-items: flex-start;
  }

  .avatar {
    width: 92px;
    height: 92px;
  }
}

@media (max-width: 640px) {
  .site-shell {
    width: min(100vw - 18px, 1140px);
  }

  .topbar,
  .footer,
  .post-page__footer {
    align-items: flex-start;
  }

  .summary__row,
  .post-card,
  .idea-card__summary {
    grid-template-columns: 1fr;
  }

  .summary__label {
    border-right: 0;
    padding-bottom: 0;
  }

  .hero__heading {
    gap: 10px;
  }

  .hero__gif {
    width: 198px;
  }
}
