:root {
  --paper: #f4f7fb;
  --paper-deep: #e8eff8;
  --surface: #ffffff;
  --ink: #12233a;
  --muted: #56677c;
  --accent: #075fd8;
  --accent-strong: #064ba9;
  --accent-soft: #e7f0ff;
  --navy: #071d35;
  --line: #cfdaea;
  --shadow: 0 24px 64px rgba(20, 55, 96, 0.13);
  --max-width: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 88% 4%, rgba(90, 164, 255, 0.12), transparent 24rem),
    var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: #cfe3fa;
  color: var(--navy);
}

a {
  color: inherit;
  text-decoration-color: rgba(22, 94, 168, 0.45);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
}

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

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(22, 94, 168, 0.28);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 10;
  padding: 0.65rem 0.9rem;
  background: var(--navy);
  color: #fff;
  border-radius: 6px;
}

.skip-link:focus {
  top: 1rem;
}

.site-shell {
  width: min(calc(100% - 48px), var(--max-width));
  margin-inline: auto;
}

.site-header {
  position: relative;
  z-index: 2;
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  color: var(--navy);
  font-size: 1.12rem;
  font-weight: 760;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.7vw, 2.25rem);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 640;
  letter-spacing: 0.01em;
}

.site-nav a {
  text-decoration: none;
}

.site-nav a:not(.external-link):hover {
  color: var(--navy);
}

.site-nav a[aria-current="page"] {
  color: var(--navy);
  box-shadow: inset 0 -2px var(--accent);
}

.site-nav .external-link {
  padding: 0.55rem 0.8rem;
  border: 1px solid #b9cee5;
  border-radius: 999px;
  color: var(--accent-strong);
  background: rgba(255, 255, 255, 0.7);
}

main {
  display: block;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.65fr);
  gap: clamp(3rem, 7vw, 7rem);
  align-items: end;
  padding: clamp(4.5rem, 7vw, 7rem) 0 clamp(4rem, 6vw, 6rem);
}

.hero-main,
.hero-context {
  min-width: 0;
}

.hero-main {
  max-width: 920px;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

h1,
h2,
h3 {
  font-family: inherit;
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.hero h1 {
  max-width: 900px;
  margin-bottom: 2.2rem;
  color: var(--navy);
  font-size: clamp(3.3rem, 6.2vw, 5.85rem);
  font-weight: 720;
  line-height: 0.98;
}

.hero h1 span {
  color: var(--accent);
}

.hero-intro {
  max-width: 760px;
  margin-bottom: 2.4rem;
  color: var(--muted);
  font-size: clamp(1.08rem, 1.7vw, 1.3rem);
  line-height: 1.65;
}

.hero-context {
  padding: 1.6rem 0 0;
  border-top: 3px solid var(--accent);
}

.hero-context-lede {
  margin-bottom: 2rem;
  color: var(--navy);
  font-size: 1.02rem;
  font-weight: 650;
  line-height: 1.5;
}

.hero-context ol {
  display: grid;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  list-style: none;
}

.hero-context li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.5rem;
}

.hero-context li span {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0.72rem 1.15rem;
  border: 1px solid #b9cee5;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--accent-strong);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 650;
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.button:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #fff;
}

.section {
  padding: clamp(4.5rem, 8vw, 7.5rem) 0;
  border-top: 1px solid var(--line);
}

.section-heading,
.page-heading {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(0, 1.55fr);
  gap: clamp(2rem, 7vw, 7rem);
}

.section-heading {
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.section-heading h2,
.page-heading h1 {
  margin-bottom: 0;
  color: var(--navy);
  font-size: clamp(2.4rem, 4.4vw, 4.25rem);
  line-height: 1.02;
}

.section-heading p:last-child,
.page-heading .lede {
  max-width: 650px;
  color: var(--muted);
  font-size: 1.2rem;
  align-content: end;
}

.identity-grid,
.work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
  gap: clamp(1rem, 2vw, 1.5rem);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}

.identity-card,
.work-card,
.project-card {
  min-height: 290px;
  padding: clamp(1.6rem, 4vw, 3rem);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(24, 59, 96, 0.03);
}

.identity-card.primary {
  border-color: var(--navy);
  background:
    radial-gradient(circle at 90% 10%, rgba(58, 149, 255, 0.3), transparent 15rem),
    linear-gradient(145deg, #071d35 0%, #103963 100%);
  color: #fff;
  box-shadow: var(--shadow);
}

.identity-card h2,
.work-card h3,
.project-card h2 {
  margin-bottom: 1.2rem;
  color: var(--navy);
  font-size: clamp(1.65rem, 2.7vw, 2.5rem);
}

.identity-card.primary h2 {
  color: #fff;
}

.identity-card p,
.work-card p,
.project-card p {
  max-width: 530px;
  color: var(--muted);
}

.identity-card.primary p {
  color: rgba(255, 255, 255, 0.76);
}

.identity-card.primary .eyebrow,
.identity-card.primary .text-link {
  color: #acd3ff;
}

.text-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.86rem;
  color: var(--accent-strong);
  font-weight: 680;
  text-decoration: none;
}

.text-link:hover,
.article-link:hover,
.section-link:hover {
  color: var(--accent);
}

.writing-section {
  position: relative;
}

.writing-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}

.writing-item {
  display: flex;
  min-height: 360px;
  flex-direction: column;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.writing-item:hover {
  border-color: #9ebce0;
  box-shadow: 0 18px 46px rgba(20, 55, 96, 0.11);
  transform: translateY(-4px);
}

.writing-item-featured {
  background:
    radial-gradient(circle at 92% 8%, rgba(67, 158, 255, 0.16), transparent 13rem),
    var(--surface);
}

.writing-number {
  margin-bottom: 2.5rem;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 760;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.writing-item h3 {
  margin: 0 0 1rem;
  color: var(--navy);
  font-size: clamp(1.55rem, 2.5vw, 2.25rem);
  line-height: 1.08;
}

.writing-item h3 a {
  text-decoration: none;
}

.writing-item > p:not(.writing-number) {
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.article-link {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 720;
  text-decoration: none;
}

.section-link {
  display: inline-block;
  margin-top: 2rem;
  color: var(--accent-strong);
  font-size: 0.88rem;
  font-weight: 720;
  text-decoration: none;
}

.status {
  white-space: nowrap;
  padding: 0.25rem 0.48rem;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.topics {
  max-width: 880px;
  margin: 0;
  color: var(--navy);
  font-family: inherit;
  font-size: clamp(1.75rem, 3.7vw, 3.3rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.topics span:not(:last-child)::after {
  content: " · ";
  color: var(--accent);
}

.page-header {
  padding: clamp(5rem, 10vw, 9rem) 0;
}

.category-section {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(0, 1.55fr);
  gap: clamp(2rem, 7vw, 7rem);
  padding: clamp(3rem, 6vw, 5rem) 0;
  border-top: 1px solid var(--line);
}

.category-section h2 {
  color: var(--navy);
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
}

.idea-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.idea {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--line);
}

.idea h3 {
  margin-bottom: 0.55rem;
  color: var(--navy);
  font-size: clamp(1.35rem, 2.3vw, 1.9rem);
}

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

.idea p {
  max-width: 650px;
  margin-bottom: 0.65rem;
  color: var(--muted);
}

.idea-meta {
  margin-bottom: 0.65rem !important;
  color: var(--accent-strong);
  font-size: 0.68rem;
  font-weight: 720;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-card {
  display: flex;
  flex-direction: column;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.project-card:hover {
  border-color: #adc6e0;
  box-shadow: 0 12px 32px rgba(24, 59, 96, 0.08);
  transform: translateY(-2px);
}

.project-card .project-links {
  margin-top: auto;
  padding-top: 2rem;
}

.project-card.experimental::before {
  content: "Experimental";
  display: block;
  margin-bottom: 1.5rem;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.other-projects {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 2rem;
}

.other-projects a {
  display: flex;
  min-width: 0;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 680;
  text-decoration: none;
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.other-projects a::after {
  content: "↗";
  flex: 0 0 auto;
  color: var(--accent);
}

.other-projects a:hover {
  border-color: #9ebce0;
  color: var(--accent-strong);
  transform: translateY(-2px);
}

.about-header {
  padding-bottom: clamp(3.5rem, 7vw, 6rem);
}

.about-header .page-heading h1 {
  max-width: 640px;
}

.about-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: clamp(1rem, 2vw, 1.5rem);
  padding: clamp(1.5rem, 3vw, 2.5rem) 0 clamp(4rem, 8vw, 7rem);
  border-top: 1px solid var(--line);
}

.about-card {
  display: flex;
  min-height: 410px;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1.75rem, 4vw, 3.25rem);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.about-card-primary {
  border-color: var(--navy);
  background: linear-gradient(145deg, #0b294d 0%, #123e70 100%);
  box-shadow: var(--shadow);
  color: #fff;
}

.about-card-wide {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 7vw, 7rem);
  min-height: 0;
  background: var(--paper-deep);
}

.about-card h2,
.about-connection h2,
.about-now h2 {
  margin-bottom: 1rem;
  color: var(--navy);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.about-card-primary h2 {
  color: #fff;
  font-size: clamp(2.2rem, 4vw, 3.5rem);
}

.about-card-primary .eyebrow,
.about-card-primary .text-link {
  color: #acd3ff;
}

.about-copy {
  max-width: 670px;
  color: var(--muted);
  font-size: 1.06rem;
}

.about-card-primary .about-copy {
  color: rgba(255, 255, 255, 0.78);
}

.about-copy p:last-child {
  margin-bottom: 0;
}

.about-connection {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 7vw, 7rem);
  margin-bottom: clamp(4rem, 8vw, 7rem);
  padding: clamp(2rem, 5vw, 4.5rem);
  border: 1px solid #c5d8ec;
  border-radius: 18px;
  background: var(--accent-soft);
}

.about-connection .about-copy {
  color: #405873;
}

.about-now {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 7vw, 7rem);
  align-items: start;
  padding: clamp(3.5rem, 7vw, 6rem) 0;
  border-top: 1px solid var(--line);
}

.about-now-heading h2 {
  margin-bottom: 0;
}

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

.topic-list li {
  padding: 0.72rem 0.9rem;
  border: 1px solid #c5d8ec;
  border-radius: 999px;
  background: var(--surface);
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 600;
}

.article {
  padding: clamp(4rem, 9vw, 8rem) 0;
}

.article-header,
.prose {
  max-width: 800px;
  margin-inline: auto;
}

.article-header {
  margin-bottom: clamp(3.5rem, 7vw, 6rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line);
}

.article-header h1 {
  color: var(--navy);
  max-width: 780px;
  font-size: clamp(3rem, 6vw, 5.5rem);
  line-height: 1;
}

.article-header .lede {
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  line-height: 1.6;
}

.article-meta {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.back-link {
  display: inline-block;
  text-decoration: none;
}

.prose h2 {
  margin: 2.5em 0 0.7em;
  color: var(--navy);
  font-size: clamp(1.65rem, 3vw, 2.25rem);
}

.prose a {
  color: var(--accent-strong);
}

.prose p,
.prose li {
  max-width: 68ch;
}

.prose p,
.prose li {
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  font-size: 1.08rem;
  line-height: 1.78;
}

.prose > p:first-child {
  color: var(--navy);
  font-size: 1.22rem;
  line-height: 1.7;
}

.prose blockquote {
  margin: 2.5rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  color: var(--navy);
}

.prose blockquote p {
  margin-bottom: 0;
}

.prose pre {
  overflow-x: auto;
  margin: 2rem 0;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--navy);
  color: #eaf3ff;
  font-size: 0.85rem;
  line-height: 1.65;
}

.prose :not(pre) > code {
  padding: 0.12em 0.35em;
  border-radius: 4px;
  background: var(--paper-deep);
  color: var(--accent-strong);
  font-size: 0.88em;
}

.site-footer {
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
}

.site-footer p {
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 1.4rem;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 3.5rem;
  }

  .hero-context {
    display: grid;
    grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
    gap: 2rem;
  }

  .hero-context ol {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .writing-list,
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .other-projects {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .writing-item-featured {
    grid-column: 1 / -1;
    min-height: 300px;
  }
}

@media (max-width: 760px) {
  .site-shell {
    width: min(calc(100% - 32px), var(--max-width));
  }

  .site-header {
    min-height: auto;
    padding: 1.25rem 0;
    align-items: stretch;
    flex-direction: column;
    gap: 1rem;
  }

  .site-nav {
    display: flex;
    width: 100%;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.74rem;
  }

  .site-nav .external-link {
    padding: 0.35rem 0.5rem;
  }

  .section-heading,
  .page-heading,
  .category-section,
  .about-card-wide,
  .about-connection,
  .about-now {
    grid-template-columns: 1fr;
  }

  .identity-grid,
  .work-grid,
  .project-grid,
  .about-overview,
  .writing-list {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 3.75rem 0 4.5rem;
  }

  .hero h1 {
    font-size: clamp(3rem, 15vw, 4.6rem);
  }

  .hero-context {
    display: block;
  }

  .hero-context ol {
    grid-template-columns: 1fr;
  }

  .writing-item,
  .writing-item-featured {
    grid-column: auto;
    min-height: 320px;
  }

  .about-overview {
    padding-top: 1rem;
  }

  .about-card {
    min-height: 0;
    gap: 2.5rem;
  }

  .about-card-wide {
    grid-column: auto;
  }

  .writing-item {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .identity-card,
  .work-card,
  .project-card {
    min-height: 0;
  }

  .site-footer {
    padding: 2.5rem 0;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 0.8rem;
  }
}

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

  .project-card {
    transition: none;
  }

  .writing-item {
    transition: none;
  }

  .other-projects a {
    transition: none;
  }
}

@media (max-width: 440px) {
  .other-projects {
    grid-template-columns: 1fr;
  }
}
