:root {
  color-scheme: dark;
  --bg: #101414;
  --bg-soft: #171d1c;
  --panel: rgba(246, 244, 236, 0.065);
  --ink: #f6f4ec;
  --muted: #b9c0b8;
  --line: rgba(246, 244, 236, 0.16);
  --line-strong: rgba(246, 244, 236, 0.3);
  --copper: #d87943;
  --fern: #86a86c;
  --sky: #9bc5d4;
  --violet: #9983bd;
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.36);
  --shell: min(1160px, calc(100vw - 40px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(16, 20, 20, 0.2), var(--bg) 720px),
    radial-gradient(circle at 16% 8%, rgba(216, 121, 67, 0.22), transparent 31rem),
    radial-gradient(circle at 84% 12%, rgba(134, 168, 108, 0.2), transparent 27rem),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body.nav-open {
  overflow: hidden;
}

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

button {
  font: inherit;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 50;
  transform: translateY(-140%);
  border-radius: 999px;
  background: var(--ink);
  color: #101414;
  padding: 10px 14px;
  font-weight: 800;
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

img {
  display: block;
  max-width: 100%;
}

.site-visual {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0.58;
  pointer-events: none;
}

.section-shell {
  width: var(--shell);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: var(--shell);
  margin: 0 auto;
  padding: 18px 0;
  transition: padding 180ms ease, background 180ms ease, border-color 180ms ease;
}

.site-header.is-scrolled {
  background: rgba(16, 20, 20, 0.76);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand,
.site-nav,
.button,
.profile-card,
.work-card,
.capability-list article,
.cv-list article,
.publication-list article,
.contact-card {
  border: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  background: rgba(16, 20, 20, 0.52);
  font-weight: 800;
}

.brand-mark {
  display: block;
  width: 42px;
  height: 32px;
  background: url("assets/site-logo/osimulon_onlylogo_transparent.png") center / contain no-repeat;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(16, 20, 20, 0.54);
  backdrop-filter: blur(16px);
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  transition: background 180ms ease, color 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.is-active {
  background: rgba(246, 244, 236, 0.1);
  color: var(--ink);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(16, 20, 20, 0.52);
  color: var(--ink);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: currentColor;
  transition: transform 180ms ease;
}

.nav-open .nav-toggle span:first-child {
  transform: translateY(3px) rotate(45deg);
}

.nav-open .nav-toggle span:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 430px);
  align-items: end;
  gap: 54px;
  min-height: clamp(650px, 92vh, 880px);
  padding: 82px 0 96px;
}

.hero-copy {
  max-width: 780px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--sky);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

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

h1 {
  margin: 0;
  font-size: clamp(2.35rem, 5.2vw, 4.8rem);
  line-height: 0.9;
  font-weight: 800;
}

h2 {
  margin: 0;
  max-width: 900px;
  font-size: clamp(2.05rem, 5vw, 4.35rem);
  line-height: 1;
  font-weight: 800;
}

h3 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.24;
}

.hero-lede {
  max-width: 690px;
  margin: 28px 0 0;
  color: rgba(246, 244, 236, 0.88);
  font-size: clamp(1.08rem, 2.1vw, 1.5rem);
  line-height: 1.4;
}

.hero-actions,
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  border-color: rgba(216, 121, 67, 0.92);
  background: var(--copper);
  color: #171410;
}

.button-secondary {
  background: rgba(246, 244, 236, 0.08);
  color: var(--ink);
}

.profile-card {
  overflow: hidden;
  border-radius: 8px;
  background: rgba(16, 20, 20, 0.58);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.portrait-wrap {
  display: grid;
  place-items: end center;
  min-height: 380px;
  background:
    linear-gradient(180deg, rgba(155, 197, 212, 0.15), rgba(134, 168, 108, 0.16)),
    rgba(246, 244, 236, 0.055);
}

.portrait-wrap img {
  width: min(82%, 330px);
  max-height: 370px;
  object-fit: contain;
}

.profile-summary {
  padding: 18px;
}

.signal-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 0 18px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.signal-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--fern);
  box-shadow: 0 0 0 8px rgba(134, 168, 108, 0.13);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  margin: 0;
  border-radius: 6px;
  background: var(--line);
}

.metric-grid div {
  min-width: 0;
  padding: 14px;
  background: rgba(246, 244, 236, 0.06);
}

.metric-grid dt {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.metric-grid dd {
  margin: 5px 0 0;
  font-size: 0.9rem;
  font-weight: 800;
}

.intro {
  max-width: 930px;
  margin-top: -40px;
  padding: 0 0 112px;
}

.intro h2 {
  margin-bottom: 22px;
}

.intro p:last-child {
  margin: 0;
  color: rgba(246, 244, 236, 0.76);
  font-size: clamp(1.18rem, 2.5vw, 1.75rem);
  line-height: 1.35;
}

.skills-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 76px;
}

.skills-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(246, 244, 236, 0.07);
  color: rgba(246, 244, 236, 0.86);
  font-size: 0.82rem;
  font-weight: 800;
}

.section-block {
  padding: 96px 0;
}

.section-heading {
  display: grid;
  gap: 2px;
  margin-bottom: 34px;
}

.section-heading-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
}

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

.work-card {
  display: grid;
  min-width: 0;
  overflow: hidden;
  border-radius: 8px;
  background: var(--panel);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.work-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  background: rgba(246, 244, 236, 0.09);
}

.work-card img {
  width: 100%;
  height: 250px;
  object-fit: contain;
  padding: 14px;
  background: rgba(246, 244, 236, 0.9);
}

.featured-work {
  grid-column: span 2;
  grid-template-columns: minmax(260px, 0.95fr) minmax(280px, 1fr);
}

.featured-work img {
  height: 100%;
  min-height: 320px;
}

.work-content {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 20px;
}

.work-kicker {
  margin: 0;
  color: var(--fern);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.work-content p:last-child,
.capability-list p,
.cv-list p,
.publication-list p {
  margin: 0;
  color: var(--muted);
}

.project-details {
  display: grid;
  gap: 10px;
  margin: 0;
}

.project-details div {
  display: grid;
  gap: 3px;
}

.project-details dt {
  color: rgba(246, 244, 236, 0.86);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-details dd {
  margin: 0;
  color: var(--muted);
}

.project-link {
  margin-top: 4px;
  color: var(--sky);
  font-weight: 800;
}

.project-link-muted {
  color: rgba(185, 192, 184, 0.74);
}

.capability-list {
  display: grid;
  gap: 12px;
}

.capability-list article {
  display: grid;
  grid-template-columns: 72px minmax(190px, 0.38fr) minmax(240px, 1fr);
  align-items: center;
  gap: 22px;
  min-height: 112px;
  padding: 18px 22px;
  border-radius: 8px;
  background: var(--panel);
}

.capability-list span {
  color: var(--copper);
  font-weight: 800;
}

.publication-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.publication-list article {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  padding: 20px;
  border-radius: 8px;
  background: var(--panel);
}

.publication-list span {
  width: max-content;
  border-radius: 999px;
  background: rgba(216, 121, 67, 0.16);
  color: var(--copper);
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 800;
}

.publication-list h3 {
  font-size: 1rem;
  line-height: 1.28;
}

.cv-band {
  margin: 70px 0;
  padding: 96px 0;
  background:
    linear-gradient(90deg, rgba(216, 121, 67, 0.14), rgba(134, 168, 108, 0.12)),
    rgba(246, 244, 236, 0.04);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.cv-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 0.78fr);
  gap: 44px;
  align-items: start;
}

.cv-layout .button {
  justify-self: start;
  margin-top: 22px;
}

.cv-list {
  display: grid;
  gap: 12px;
}

.cv-list article {
  display: grid;
  gap: 8px;
  padding: 20px;
  border-radius: 8px;
  background: rgba(16, 20, 20, 0.4);
}

.cv-list span {
  color: var(--ink);
  font-weight: 800;
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: 32px;
  align-items: start;
  padding: 80px 0 96px;
}

.contact-card {
  display: grid;
  gap: 14px;
  padding: 20px;
  border-radius: 8px;
  background: rgba(16, 20, 20, 0.45);
}

.contact-card .button {
  width: 100%;
}

.contact-card p {
  margin: 0;
  color: var(--muted);
}

.contact-kicker {
  color: var(--sky) !important;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.text-link,
.social-links a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  color: var(--muted);
  font-weight: 800;
}

.text-link:hover,
.text-link:focus-visible,
.social-links a:hover,
.social-links a:focus-visible {
  color: var(--ink);
}

.social-links {
  margin-top: 2px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer p {
  margin: 0;
}

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

.cv-page {
  background:
    linear-gradient(180deg, rgba(16, 20, 20, 0.1), var(--bg) 520px),
    radial-gradient(circle at 20% 2%, rgba(155, 197, 212, 0.18), transparent 25rem),
    radial-gradient(circle at 80% 12%, rgba(216, 121, 67, 0.16), transparent 27rem),
    var(--bg);
}

.cv-main {
  padding-bottom: 64px;
}

.cv-hero-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 32px;
  padding: 82px 0 38px;
}

.cv-hero-page h1 {
  font-size: clamp(2.25rem, 4.8vw, 4.2rem);
}

.cv-subtitle {
  max-width: 760px;
  margin: 24px 0 0;
  color: rgba(246, 244, 236, 0.82);
  font-size: clamp(1.02rem, 1.8vw, 1.22rem);
}

.cv-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.cv-anchor-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 0 34px;
}

.cv-anchor-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(246, 244, 236, 0.06);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.cv-document {
  margin-bottom: 16px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(246, 244, 236, 0.055);
}

.cv-document h2 {
  max-width: none;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: clamp(1.55rem, 2.7vw, 2.35rem);
  line-height: 1.08;
}

.cv-document p {
  color: var(--muted);
}

.cv-lede {
  color: rgba(246, 244, 236, 0.86) !important;
  font-size: 1.08rem;
}

.cv-contact-grid,
.cv-skill-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.cv-contact-grid div,
.cv-skill-grid article,
.cv-project-group,
.cv-timeline article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 20, 20, 0.35);
}

.cv-contact-grid div,
.cv-skill-grid article {
  padding: 18px;
}

.cv-contact-grid span {
  display: block;
  margin-bottom: 8px;
  color: var(--sky);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cv-contact-grid p,
.cv-skill-grid p,
.cv-project-group p,
.cv-timeline p {
  margin: 0;
}

.cv-contact-grid a {
  color: var(--ink);
  font-weight: 700;
}

.cv-contact-grid div:last-child p {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cv-skill-grid h3,
.cv-project-group h3,
.cv-timeline h3 {
  margin-bottom: 8px;
}

.cv-timeline {
  display: grid;
  gap: 12px;
}

.cv-timeline article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 20px;
  padding: 18px;
}

.cv-timeline article > span,
.cv-dated-list time {
  color: var(--sky);
  font-size: 0.84rem;
  font-weight: 800;
  white-space: nowrap;
}

.cv-publications {
  display: grid;
  gap: 14px;
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
}

.cv-publications li::marker {
  color: var(--copper);
  font-weight: 800;
}

.cv-publications strong {
  color: var(--ink);
}

.cv-project-group {
  margin-top: 12px;
  padding: 18px;
}

.cv-project-group:first-of-type {
  margin-top: 0;
}

.cv-project-group ul {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.cv-project-group strong {
  color: var(--ink);
}

.cv-dated-list {
  padding-left: 0 !important;
  list-style: none;
}

.cv-dated-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 18px;
  align-items: start;
}

:focus-visible {
  outline: 3px solid rgba(155, 197, 212, 0.72);
  outline-offset: 4px;
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 30px;
    min-height: auto;
    padding: 76px 0 88px;
  }

  .profile-card {
    max-width: 560px;
  }

  .intro {
    margin-top: 0;
    padding-bottom: 72px;
  }

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

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

  .featured-work {
    grid-column: span 2;
  }

  .capability-list article {
    grid-template-columns: 52px minmax(0, 1fr);
    align-items: start;
  }

  .capability-list p {
    grid-column: 2;
  }

  .cv-layout,
  .cv-hero-page,
  .contact {
    grid-template-columns: 1fr;
  }

  .cv-hero-actions {
    justify-content: flex-start;
  }

  .cv-contact-grid,
  .cv-skill-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  :root {
    --shell: min(100vw - 28px, 720px);
  }

  .site-header {
    padding: 12px 0;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    inset: 68px 14px auto;
    display: grid;
    gap: 4px;
    padding: 8px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 180ms ease, transform 180ms ease;
  }

  .nav-open .site-nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .site-nav a {
    justify-content: center;
    border-radius: 6px;
  }

  h1 {
    font-size: clamp(2.15rem, 10.5vw, 4rem);
  }

  .section-block {
    padding: 72px 0;
  }

  .cv-hero-page {
    padding-top: 62px;
  }

  .cv-document {
    padding: 20px;
  }

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

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

  .publication-list {
    grid-template-columns: 1fr;
  }

  .featured-work {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .featured-work img {
    min-height: 0;
    height: 240px;
  }
}

@media (max-width: 560px) {
  .brand {
    min-height: 42px;
    padding-right: 12px;
  }

  .hero {
    padding-top: 48px;
    padding-bottom: 58px;
  }

  .hero-actions,
  .social-links {
    display: grid;
    grid-template-columns: 1fr;
  }

  .button,
  .text-link,
  .social-links a {
    width: 100%;
    justify-content: center;
  }

  .portrait-wrap {
    min-height: 330px;
  }

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

  .work-card img,
  .featured-work img {
    height: 210px;
  }

  .skills-strip {
    padding-bottom: 54px;
  }

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

  .capability-list p {
    grid-column: auto;
  }

  .cv-band {
    margin: 36px 0;
    padding: 68px 0;
  }

  .site-footer {
    display: grid;
  }

  .cv-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .cv-timeline article,
  .cv-dated-list li {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .cv-timeline article > span,
  .cv-dated-list time {
    white-space: normal;
  }
}

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

@media print {
  :root {
    color-scheme: light;
    --bg: #ffffff;
    --ink: #111111;
    --muted: #333333;
    --line: #c9c9c9;
    --copper: #111111;
    --sky: #111111;
  }

  body,
  .cv-page {
    background: #ffffff !important;
    color: #111111;
  }

  .site-header,
  .site-footer,
  .site-visual,
  .skip-link,
  .cv-anchor-nav,
  .cv-hero-actions {
    display: none !important;
  }

  .section-shell {
    width: 100%;
  }

  .cv-main {
    padding: 0;
  }

  .cv-hero-page {
    display: block;
    padding: 0 0 18px;
  }

  .cv-hero-page h1 {
    font-size: 28pt;
  }

  .cv-document {
    break-inside: avoid;
    margin: 0 0 12px;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .cv-document h2 {
    font-size: 14pt;
  }

  .cv-contact-grid div,
  .cv-skill-grid article,
  .cv-project-group,
  .cv-timeline article {
    border: 0;
    background: transparent;
    padding: 0;
  }
}
