:root {
  color-scheme: dark;
  --ink: #f3f7f8;
  --graphite: #d6dee2;
  --paper: #0a1726;
  --panel: #102235;
  --panel-bg: rgba(16, 34, 53, 0.86);
  --muted: #9aa8af;
  --line: rgba(232, 241, 244, 0.14);
  --cyan: #28d7e6;
  --lime: #b7e052;
  --coral: #ff7a55;
  --violet: #a99cff;
  --code-bg: rgba(255, 255, 255, 0.07);
  --deep: #061525;
  --grid-line: rgba(115, 224, 235, 0.04);
  --nav-bg: rgba(10, 23, 38, 0.9);
  --nav-scrolled-bg: rgba(10, 23, 38, 0.98);
  --nav-shadow: rgba(3, 10, 18, 0.38);
  --footer-text: rgba(255, 255, 255, 0.68);
}

html[data-theme="light"] {
  color-scheme: light;
  --ink: #101214;
  --graphite: #20252b;
  --paper: #f6f7f2;
  --panel: #ffffff;
  --panel-bg: rgba(255, 255, 255, 0.82);
  --muted: #626a70;
  --line: rgba(16, 18, 20, 0.13);
  --cyan: #00a7b5;
  --lime: #9fc131;
  --coral: #e05f3f;
  --violet: #6554c0;
  --code-bg: rgba(16, 18, 20, 0.06);
  --deep: #061525;
  --grid-line: rgba(16, 18, 20, 0.035);
  --nav-bg: rgba(246, 247, 242, 0.9);
  --nav-scrolled-bg: rgba(246, 247, 242, 0.98);
  --nav-shadow: rgba(16, 18, 20, 0.08);
  --footer-text: rgba(255, 255, 255, 0.68);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px;
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

main,
.site-nav,
.site-footer {
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
}

.container {
  max-width: none;
  width: min(100% - 32px, 1320px);
}

.site-nav .container {
  max-width: none;
  padding-left: clamp(1rem, 2.2vw, 2rem);
  padding-right: clamp(0.75rem, 1.4vw, 1.25rem);
  width: 100%;
}

.site-nav {
  background: var(--nav-bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  transition: background 180ms ease, box-shadow 180ms ease;
}

.site-nav.is-scrolled {
  background: var(--nav-scrolled-bg);
  box-shadow: 0 18px 50px var(--nav-shadow);
}

.navbar-brand {
  align-items: center;
  color: var(--cyan);
  display: inline-flex;
  gap: 0.72rem;
  font-weight: 900;
  margin-right: clamp(1.5rem, 4vw, 4rem);
  text-decoration: none;
}

.navbar-brand:hover,
.navbar-brand:focus {
  color: var(--cyan);
}

.brand-mark {
  align-items: center;
  background: transparent;
  color: var(--lime);
  display: inline-flex;
  height: 44px;
  justify-content: center;
  width: 72px;
}

.brand-mark svg {
  display: block;
  height: 44px;
  overflow: visible;
  width: 72px;
}

.logo-trace {
  fill: none;
  stroke: var(--cyan);
  stroke-linecap: square;
  stroke-linejoin: miter;
  stroke-width: 3;
}

.logo-trace-thin {
  opacity: 0.62;
  stroke-width: 1.5;
}

.navbar-collapse {
  justify-content: flex-end;
}

.nav-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 0.5rem;
  margin-left: clamp(0.65rem, 1.4vw, 1.1rem);
}

.navbar-toggler {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 0;
  height: 42px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 46px;
}

.navbar-toggler-icon {
  background-position: center;
  background-size: 1.35rem 1.35rem;
  filter: invert(1);
  height: 1.35rem;
  margin: 0;
  width: 1.35rem;
}

html[data-theme="light"] .navbar-toggler-icon {
  filter: none;
}

.nav-link {
  color: var(--graphite);
  font-size: 0.82rem;
  font-weight: 800;
  margin-left: 0.24rem;
  padding-left: 0.58rem !important;
  padding-right: 0.58rem !important;
  position: relative;
}

.nav-link:hover,
.nav-link:focus,
.nav-link.is-active {
  color: var(--cyan);
}

.nav-link.is-active::after {
  background: var(--cyan);
  bottom: 0.2rem;
  content: "";
  height: 2px;
  left: 0.58rem;
  position: absolute;
  right: 0.58rem;
}

.theme-toggle {
  align-items: center;
  background: var(--panel-bg);
  border: 1px solid var(--line);
  color: var(--ink);
  display: inline-flex;
  flex: 0 0 auto;
  height: 40px;
  justify-content: center;
  padding: 0;
  transition: border-color 180ms ease, color 180ms ease, transform 180ms ease;
  width: 44px;
}

.theme-toggle:hover,
.theme-toggle:focus {
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateY(-1px);
}

.theme-icon {
  fill: none;
  height: 19px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 19px;
}

.theme-icon-moon {
  display: none;
}

html[data-theme="light"] .theme-icon-sun {
  display: none;
}

html[data-theme="light"] .theme-icon-moon {
  display: block;
}

.eyebrow,
.kicker,
.card-label {
  color: var(--cyan);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: 0;
  hyphens: none;
  overflow-wrap: normal;
  word-break: normal;
}

.hero-full {
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    var(--deep);
  background-size: 32px 32px;
  isolation: isolate;
  min-height: clamp(700px, 88vh, 940px);
  overflow: hidden;
  position: relative;
}

.hero-image,
.hero-scrim {
  position: absolute;
  inset: 0;
}

.hero-image {
  --hero-image-x: 55%;
  background-image: url("../images/anna-hero.jpg");
  background-position: var(--hero-image-x) 35%;
  background-size: cover;
  filter: saturate(0.92) contrast(1.05);
  right: auto;
  width: min(58vw, 780px);
  -webkit-mask-image: linear-gradient(
    90deg,
    #000 0%,
    #000 42%,
    rgba(0, 0, 0, 0.82) 52%,
    rgba(0, 0, 0, 0.34) 66%,
    transparent 100%
  );
  mask-image: linear-gradient(
    90deg,
    #000 0%,
    #000 42%,
    rgba(0, 0, 0, 0.82) 52%,
    rgba(0, 0, 0, 0.34) 66%,
    transparent 100%
  );
  z-index: -3;
}

.hero-scrim {
  background:
    linear-gradient(90deg, rgba(6, 21, 37, 0.04) 0%, rgba(6, 21, 37, 0.16) 26%, rgba(6, 21, 37, 0.5) 43%, rgba(6, 21, 37, 0.88) 59%, var(--deep) 82%),
    linear-gradient(0deg, rgba(6, 21, 37, 0.12), transparent 42%);
  z-index: -2;
}

.hero-content {
  color: #fff;
  padding-bottom: clamp(3rem, 7vw, 6rem);
  padding-top: clamp(3.8rem, 7vw, 5.8rem);
  width: min(100% - 32px, 1320px);
}

.hero-content .min-vh-100 {
  min-height: calc(clamp(700px, 88vh, 940px) - 84px) !important;
}

.hero-panel {
  margin-left: auto;
  max-width: 880px;
}

.hero-title {
  color: #fff;
  font-size: clamp(3.4rem, 4.5vw, 6rem);
  line-height: 0.94;
  margin: 0;
  text-wrap: balance;
}

.hero-copy {
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(0.94rem, 1.02vw, 1.06rem);
  line-height: 1.62;
  max-width: none;
  width: 100%;
}

.hero-bio p {
  margin: 0 0 0.95rem;
}

.hero-bio p:last-child {
  margin-bottom: 0;
}

.terminal-strip {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: grid;
  gap: 0.6rem;
  margin-top: 2rem;
  padding: 1rem;
}

.terminal-strip span {
  color: var(--lime);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.76rem;
}

.terminal-strip p {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.9rem;
  line-height: 1.45;
  margin: 0;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.9rem;
}

.social-links a {
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  display: inline-flex;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.62rem 0.74rem;
  text-decoration: none;
  transition: border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.social-links a:hover,
.social-links a:focus {
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateY(-1px);
}

.social-links svg {
  fill: none;
  flex: 0 0 auto;
  height: 1.15rem;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
  width: 1.15rem;
}

.social-links span {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
  font-weight: 800;
}

.btn {
  border-radius: 0;
  font-weight: 900;
  letter-spacing: 0;
  padding: 0.82rem 1.08rem;
}

.btn-light {
  background: #fff;
  border-color: #fff;
  color: #101214;
}

.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.58);
  color: #fff;
}

.btn:hover {
  transform: translateY(-1px);
}

.home-index,
.page-section,
.page-hero {
  padding: clamp(2.8rem, 5vw, 4.4rem) 0;
}

.page-hero {
  padding-bottom: clamp(1.2rem, 2.2vw, 1.8rem);
  padding-top: clamp(1.8rem, 3.2vw, 2.8rem);
}

.page-section {
  padding-top: clamp(2rem, 4vw, 3rem);
}

.home-index {
  background: var(--paper);
}

.home-index .container {
  width: min(100% - 32px, 1320px);
}

.index-card,
.data-card,
.feed-item {
  background: var(--panel-bg);
  border: 1px solid var(--line);
  height: 100%;
  padding: clamp(1.2rem, 2.4vw, 1.8rem);
}

.index-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 180px;
}

.index-card h2,
.data-card h2,
.feed-item h2 {
  font-size: clamp(1.2rem, 1.65vw, 1.55rem);
  line-height: 1.15;
  margin: 0;
}

.index-card p,
.data-card p,
.feed-item p,
.section-lead {
  color: var(--muted);
  line-height: 1.75;
}

.text-link {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9rem;
  font-weight: 700;
  gap: 0.45rem;
  margin-top: auto;
  text-decoration: none;
}

.text-link::before {
  color: var(--coral);
  content: "->";
}

.text-link:hover {
  color: var(--cyan);
}

.page-hero {
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  font-size: clamp(1.75rem, 2.3vw, 2.65rem);
  line-height: 1.08;
  margin: 0;
  max-width: 760px;
}

.about-lead,
.section-lead {
  color: var(--muted);
  font-size: clamp(0.94rem, 1vw, 1.04rem);
  line-height: 1.75;
  max-width: none;
  text-wrap: wrap !important;
  text-wrap-mode: wrap;
  text-wrap-style: auto;
  white-space: normal;
  word-break: normal !important;
}

.about-lead {
  max-width: none;
}

.about-lead p,
.section-lead p {
  margin: 0 0 0.65rem;
  text-wrap: wrap !important;
  text-wrap-mode: wrap;
  text-wrap-style: auto;
  white-space: normal;
  word-break: normal !important;
}

.about-lead p:last-child,
.section-lead p:last-child {
  margin-bottom: 0;
}

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

.cv-section {
  border-top: 1px solid var(--line);
}

.cv-download {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(255, 122, 85, 0.12), transparent 34%),
    var(--panel-bg);
  border: 1px solid var(--line);
  color: var(--ink);
  display: inline-flex;
  gap: 1rem;
  padding: clamp(1rem, 2vw, 1.35rem);
  text-decoration: none;
  transition: border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.cv-download:hover,
.cv-download:focus {
  border-color: var(--coral);
  color: var(--ink);
  transform: translateY(-2px);
}

.cv-download svg {
  fill: none;
  flex: 0 0 auto;
  height: 2.8rem;
  stroke: var(--coral);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 2.8rem;
}

.cv-download span {
  display: grid;
  gap: 0.2rem;
}

.cv-download strong {
  font-size: clamp(1.02rem, 1.2vw, 1.22rem);
}

.cv-download small {
  color: var(--muted);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.data-card {
  min-height: 190px;
}

.data-card.accent-cyan {
  border-top: 5px solid var(--cyan);
}

.data-card.accent-lime {
  border-top: 5px solid var(--lime);
}

.data-card.accent-coral {
  border-top: 5px solid var(--coral);
}

.travel-section {
  border-top: 1px solid var(--line);
}

.travel-heading {
  align-items: end;
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.travel-heading h2 {
  font-size: clamp(1.45rem, 2vw, 2.1rem);
  line-height: 1.1;
  margin: 0;
}

.travel-intro {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1.35rem;
  max-width: none;
  text-wrap: wrap;
  word-break: normal;
}

.travel-intro p {
  margin: 0 0 0.9rem;
  text-wrap: wrap;
  word-break: normal;
}

.travel-intro p:last-child {
  margin-bottom: 0;
}

.travel-summary {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.travel-filter {
  align-items: center;
  background: var(--code-bg);
  border: 1px solid var(--line);
  color: var(--graphite);
  display: inline-flex;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  gap: 0.42rem;
  padding: 0.34rem 0.48rem;
}

.travel-filter {
  cursor: pointer;
  transition: border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.travel-filter span {
  color: var(--muted);
}

.travel-filter:hover,
.travel-filter:focus,
.travel-filter.is-active {
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateY(-1px);
}

.travel-filter.is-active span {
  color: var(--cyan);
}

.travel-dot {
  display: inline-block;
  height: 0.72rem;
  width: 0.72rem;
}

.travel-dot-private {
  background: var(--lime);
}

.travel-dot-business {
  background: var(--cyan);
}

.travel-map {
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    var(--panel-bg);
  background-size: 28px 28px;
  border: 1px solid var(--line);
  min-height: clamp(300px, 48vw, 560px);
  overflow: hidden;
  position: relative;
}

.travel-map.is-loaded .travel-map-placeholder {
  display: none;
}

.travel-map-placeholder {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.86rem;
  inset: 0;
  justify-content: center;
  position: absolute;
  text-transform: uppercase;
  z-index: 500;
}

.travel-map .leaflet-container {
  background: var(--panel-bg);
}

.travel-map .leaflet-tile {
  filter: saturate(0.7) contrast(0.95) brightness(0.82);
}

html[data-theme="light"] .travel-map .leaflet-tile {
  filter: saturate(0.82) contrast(0.98) brightness(1.02);
}

.travel-map .leaflet-control-zoom a,
.travel-map .leaflet-control-attribution {
  background: var(--panel-bg);
  border-color: var(--line);
  color: var(--graphite);
}

.travel-map .leaflet-control-attribution a {
  color: var(--cyan);
}

.travel-marker {
  background: transparent;
  border: 0;
}

.travel-marker span {
  background: var(--marker-color);
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5), 0 8px 18px rgba(0, 0, 0, 0.28);
  display: block;
  height: 0.86rem;
  transform: rotate(45deg);
  width: 0.86rem;
}

.travel-map .leaflet-popup-content-wrapper,
.travel-map .leaflet-popup-tip {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
}

.travel-map .leaflet-popup-content {
  margin: 0;
}

.travel-popup {
  min-width: 220px;
  padding: 0.85rem;
}

.travel-popup img {
  aspect-ratio: 4 / 3;
  display: block;
  margin: -0.85rem -0.85rem 0.75rem;
  object-fit: cover;
  width: calc(100% + 1.7rem);
}

.travel-popup span {
  color: var(--cyan);
  display: block;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.travel-popup-private span {
  color: var(--lime);
}

.travel-popup h3 {
  font-size: 1.05rem;
  line-height: 1.15;
  margin: 0 0 0.45rem;
}

.travel-popup p {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
  margin: 0.35rem 0 0;
}

.life-section {
  border-top: 1px solid var(--line);
}

.life-stack,
.life-story {
  display: grid;
  gap: clamp(1.25rem, 2.4vw, 1.8rem);
}

.life-story {
  align-items: start;
  grid-template-columns: minmax(0, 1fr);
}

.life-heading {
  display: grid;
  gap: 0.65rem;
  max-width: none;
}

.life-heading h2,
.dog-copy h2 {
  font-size: clamp(1.45rem, 2vw, 2.1rem);
  line-height: 1.1;
  margin: 0;
}

.life-heading p:not(.eyebrow),
.dog-copy p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.75;
  margin: 0;
}

.photo-strip {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: 0.85fr 1fr 1fr;
}

.photo-strip-small {
  gap: 0.7rem;
  max-width: none;
}

.photo-tile {
  background: var(--panel-bg);
  border: 1px solid var(--line);
  display: block;
  margin: 0;
  min-height: 0;
  overflow: hidden;
}

.photo-tile img {
  aspect-ratio: 4 / 3;
  display: block;
  height: 100%;
  max-height: 350px;
  object-fit: cover;
  width: 100%;
}

.photo-strip-small .photo-tile img {
  max-height: 350px;
}

.dog-photos .photo-tile img {
  height: 300px;
  max-height: none;
}

.photo-tile-tall img {
  aspect-ratio: 3 / 4;
}

.photo-tile figcaption {
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.5;
  margin: 0;
  min-height: 3.45rem;
  padding: 0.7rem 0.78rem 0.76rem;
}

.life-section-dog {
  background:
    linear-gradient(135deg, rgba(183, 224, 82, 0.08), transparent 28%),
    linear-gradient(315deg, rgba(255, 122, 85, 0.07), transparent 30%);
}

.dog-feature {
  align-items: center;
  display: grid;
  gap: clamp(1.2rem, 3vw, 2.2rem);
  grid-template-columns: minmax(0, 1fr) minmax(320px, 560px);
}

.dog-copy {
  display: grid;
  gap: 0.75rem;
}

.dog-photos {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feed-list {
  display: grid;
  gap: 1rem;
}

.feed-item {
  display: grid;
  gap: 1rem;
  grid-template-columns: 160px 1fr;
}

.feed-date {
  color: var(--violet);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9rem;
  font-weight: 700;
}

.talk-year .feed-date {
  color: var(--cyan);
  font-size: clamp(1.02rem, 1.1vw, 1.18rem);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-row span {
  background: var(--code-bg);
  border: 1px solid var(--line);
  color: var(--graphite);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  padding: 0.34rem 0.48rem;
}

.repo-card code {
  background: var(--code-bg);
  color: var(--coral);
  display: inline-block;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  margin-bottom: 1rem;
  padding: 0.28rem 0.42rem;
}

.repo-timeline {
  display: grid;
  gap: clamp(1.1rem, 2.4vw, 1.8rem);
  max-width: none;
  position: relative;
  width: min(100% - 24px, 1400px);
}

.repo-timeline::before {
  background: linear-gradient(180deg, var(--cyan), var(--lime) 52%, var(--coral));
  content: "";
  bottom: 0;
  left: clamp(132px, 12vw, 184px);
  opacity: 0.72;
  position: absolute;
  top: 0;
  width: 2px;
}

.repo-era {
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
  grid-template-columns: clamp(112px, 12vw, 164px) minmax(0, 1fr);
  position: relative;
}

.repo-era-marker {
  align-self: start;
  position: sticky;
  top: 6rem;
}

.repo-era-marker::after {
  background: var(--paper);
  border: 2px solid var(--cyan);
  border-radius: 50%;
  content: "";
  height: 14px;
  left: clamp(132px, 12vw, 184px);
  position: absolute;
  top: 0.42rem;
  transform: translateX(-6px);
  width: 14px;
}

.repo-era-phd .repo-era-marker::after {
  border-color: var(--lime);
}

.repo-era-master .repo-era-marker::after {
  border-color: var(--coral);
}

.repo-era-marker p {
  color: var(--cyan);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 0 0.45rem;
}

.repo-era-phd .repo-era-marker p {
  color: var(--lime);
}

.repo-era-master .repo-era-marker p {
  color: var(--coral);
}

.repo-era-marker h2 {
  color: var(--ink);
  font-size: clamp(0.98rem, 1.1vw, 1.16rem);
  line-height: 1.18;
  margin: 0;
}

.repo-stack {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: minmax(0, 1fr);
}

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

.repo-stack-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.repo-project {
  background:
    linear-gradient(135deg, rgba(40, 215, 230, 0.1), transparent 34%),
    var(--panel-bg);
  border: 1px solid var(--line);
  color: var(--graphite);
  display: grid;
  min-height: 200px;
  padding: clamp(1rem, 2vw, 1.35rem);
  text-decoration: none;
  transition: border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.repo-project:hover,
.repo-project:focus {
  border-color: var(--cyan);
  color: var(--graphite);
  transform: translateY(-2px);
}

.repo-era-phd .repo-project {
  background:
    linear-gradient(135deg, rgba(183, 224, 82, 0.1), transparent 34%),
    var(--panel-bg);
}

.repo-era-phd .repo-project:hover,
.repo-era-phd .repo-project:focus {
  border-color: var(--lime);
}

.repo-era-master .repo-project {
  background:
    linear-gradient(135deg, rgba(255, 122, 85, 0.11), transparent 34%),
    var(--panel-bg);
}

.repo-era-master .repo-project:hover,
.repo-era-master .repo-project:focus {
  border-color: var(--coral);
}

.repo-project-featured {
  min-height: 215px;
}

.repo-kind,
.repo-open,
.repo-project code {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

.repo-kind {
  color: var(--cyan);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 0.85rem;
  text-transform: uppercase;
}

.repo-card-top {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.repo-card-top .repo-kind {
  margin-bottom: 0;
}

.repo-logo {
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.24));
  flex: 0 0 auto;
  margin-top: -0.35rem;
  max-height: 82px;
  object-fit: contain;
  width: clamp(64px, 7vw, 92px);
}

.repo-era-phd .repo-kind {
  color: var(--lime);
}

.repo-era-master .repo-kind {
  color: var(--coral);
}

.repo-project code {
  background: var(--code-bg);
  color: var(--muted);
  display: block;
  font-size: 0.74rem;
  line-height: 1.45;
  margin-bottom: 1.1rem;
  overflow-wrap: anywhere;
  padding: 0.42rem 0.5rem;
  width: fit-content;
}

.repo-project h3 {
  color: var(--ink);
  font-size: clamp(1.05rem, 1.18vw, 1.28rem);
  line-height: 1.18;
  margin: 0 0 0.7rem;
}

.repo-project p {
  color: var(--muted);
  line-height: 1.65;
  margin: 0 0 1.35rem;
}

.repo-open {
  align-self: end;
  color: var(--cyan);
  font-size: 0.82rem;
  font-weight: 800;
  margin-top: auto;
}

.repo-open::before {
  content: "-> ";
}

.repo-era-phd .repo-open {
  color: var(--lime);
}

.repo-era-master .repo-open {
  color: var(--coral);
}

.teaching-timeline {
  display: grid;
  gap: 0.85rem;
  max-width: none;
  position: relative;
  width: min(100% - 24px, 1180px);
}

.teaching-timeline::before {
  display: none;
}

.teaching-era {
  background: var(--panel-bg);
  border: 1px solid var(--line);
  display: grid;
  gap: clamp(0.95rem, 2vw, 1.35rem);
  grid-template-columns: clamp(140px, 16vw, 210px) minmax(0, 1fr);
  padding: clamp(0.85rem, 1.6vw, 1.15rem);
  position: relative;
}

.teaching-marker {
  align-self: start;
  min-width: 0;
  position: relative;
  top: auto;
}

.teaching-marker::after {
  display: none;
}

.teaching-era-hpc .teaching-marker::after,
.teaching-era-core .teaching-marker::after {
  border-color: var(--muted);
}

.teaching-era-foundation .teaching-marker::after {
  border-color: var(--muted);
}

.teaching-marker p {
  color: var(--cyan);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 0 0.35rem;
}

.teaching-era-hpc .teaching-marker p,
.teaching-era-core .teaching-marker p {
  color: var(--cyan);
}

.teaching-era-foundation .teaching-marker p {
  color: var(--cyan);
}

.teaching-marker h2 {
  color: var(--ink);
  font-size: clamp(0.95rem, 1.05vw, 1.1rem);
  line-height: 1.18;
  margin: 0 0 0.55rem;
  max-width: 100%;
}

.teaching-legend {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 0.4rem;
  padding-left: 0;
}

.teaching-role {
  border: 1px solid var(--line);
  color: var(--graphite);
  display: inline-flex;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.32rem 0.42rem;
  width: fit-content;
}

.role-postdoc {
  border-color: rgba(40, 215, 230, 0.46);
  color: var(--cyan);
}

.role-doctoral {
  border-color: rgba(183, 224, 82, 0.46);
  color: var(--lime);
}

.role-lecturer {
  border-color: rgba(169, 156, 255, 0.5);
  color: var(--violet);
}

.role-tutor {
  border-color: rgba(255, 122, 85, 0.5);
  color: var(--coral);
}

.teaching-stack {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: minmax(0, 1fr);
}

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

.teaching-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  color: var(--graphite);
  min-height: 0;
  padding: 0.75rem 0.9rem;
}

.teaching-era-hpc .teaching-card,
.teaching-era-core .teaching-card {
  background: rgba(255, 255, 255, 0.025);
}

.teaching-era-foundation .teaching-card {
  background: rgba(255, 255, 255, 0.025);
}

.teaching-card-featured {
  min-height: 0;
}

.teaching-card-top {
  align-items: flex-start;
  display: flex;
  gap: 0.55rem;
  justify-content: flex-start;
  margin-bottom: 0.45rem;
}

.teaching-kind {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.35;
}

.teaching-kind {
  color: var(--cyan);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.teaching-era-hpc .teaching-kind,
.teaching-era-core .teaching-kind {
  color: var(--cyan);
}

.teaching-era-foundation .teaching-kind {
  color: var(--cyan);
}

.teaching-card h3 {
  color: var(--ink);
  font-size: clamp(0.98rem, 1.05vw, 1.12rem);
  line-height: 1.18;
  margin: 0;
}

.teaching-card p {
  color: var(--muted);
  display: none;
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0;
}

.publications-section .container {
  max-width: none;
  width: min(100% - 24px, 1400px);
}

.publication-block {
  border-top: 1px solid var(--line);
  padding: clamp(1.5rem, 3vw, 2.3rem) 0;
}

.publication-block:first-child {
  border-top: 0;
  padding-top: 0;
}

.publication-block h2 {
  color: var(--ink);
  font-size: clamp(1.22rem, 1.55vw, 1.65rem);
  line-height: 1.18;
  margin-bottom: 0.85rem;
}

.publication-year {
  display: grid;
  gap: clamp(0.75rem, 1.8vw, 1.75rem);
  grid-template-columns: clamp(96px, 9vw, 136px) minmax(0, 1fr);
  padding: 1.2rem 0;
}

.publication-year + .publication-year {
  border-top: 1px solid var(--line);
}

.publication-year-label {
  color: var(--cyan);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: clamp(0.98rem, 1.1vw, 1.18rem);
  font-weight: 600;
  margin: 0;
}

.publication-item {
  background: var(--panel-bg);
  border: 1px solid var(--line);
  padding: clamp(1rem, 2vw, 1.35rem);
}

.publication-item + .publication-item {
  margin-top: 0.85rem;
}

.publication-item h3 {
  font-size: clamp(1.02rem, 1vw, 1.2rem);
  line-height: 1.28;
  margin-bottom: 0.6rem;
}

.talk-year .feed-item h2 {
  font-size: clamp(1.02rem, 1vw, 1.2rem);
  line-height: 1.28;
  margin-bottom: 0.6rem;
}

.talk-note {
  color: var(--muted);
  font-style: italic;
  line-height: 1.6;
  margin: -0.2rem 0 0.65rem;
}

.publication-item p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

.publication-actions {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: max-content max-content minmax(0, 1fr);
  margin-top: 1rem;
  max-width: 100%;
  min-width: 0;
}

.publication-toggle {
  background: var(--code-bg);
  border: 1px solid var(--line);
  color: var(--graphite);
  cursor: pointer;
  display: inline-flex;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  font-weight: 600;
  justify-self: start;
  line-height: 1.2;
  padding: 0.34rem 0.48rem;
  text-decoration: none;
  transition: border-color 180ms ease, color 180ms ease;
  width: fit-content;
}

.publication-toggle:hover,
.publication-toggle:focus,
.publication-toggle.is-active {
  border-color: var(--cyan);
  color: var(--cyan);
}

.publication-panel {
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid var(--line);
  grid-column: 1 / -1;
  margin-top: 0.6rem;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 0.9rem;
  width: 100%;
}

.publication-panel p {
  color: var(--muted);
  margin: 0;
}

.publication-panel pre {
  color: var(--graphite);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  line-height: 1.6;
  margin: 0;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 0.2rem;
  white-space: pre;
}

.publication-panel code {
  display: block;
  min-width: 0;
}

.publication-item a {
  color: var(--cyan);
  overflow-wrap: anywhere;
  text-decoration-color: rgba(40, 215, 230, 0.45);
  text-underline-offset: 0.18em;
}

.author-highlight {
  color: var(--cyan);
  /* font-weight: 900; */
}

.site-footer {
  background: var(--deep);
  color: #fff;
}

.footer-line,
.footer-meta {
  color: var(--footer-text);
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  gap: 1rem;
}

.footer-meta a {
  color: #fff;
  text-decoration: none;
}

@media (min-width: 1440px) {
  .container {
    width: min(100% - 48px, 1500px);
  }

  .hero-image {
    background-position: var(--hero-image-x) 35%;
    width: min(50vw, 940px);
  }

  .hero-content {
    width: min(100% - 48px, 1540px);
  }

  .hero-panel {
    max-width: 980px;
  }

  .home-index .container {
    width: min(100% - 48px, 1500px);
  }

  .index-card {
    min-height: 230px;
  }

  .publications-section .container {
    max-width: none;
    width: min(100% - 48px, 1600px);
  }

  .publication-year {
    grid-template-columns: 136px minmax(0, 1fr);
  }
}

@media (min-width: 1800px) {
  .container {
    width: min(100% - 72px, 1640px);
  }

  .hero-full {
    min-height: clamp(760px, 84vh, 980px);
  }

  .hero-image {
    background-position: var(--hero-image-x) 34%;
    width: min(48vw, 1160px);
  }

  .hero-content {
    padding-bottom: clamp(4rem, 5vw, 6.5rem);
    padding-top: clamp(4.5rem, 5vw, 6.5rem);
    width: min(100% - 72px, 1720px);
  }

  .hero-content .min-vh-100 {
    min-height: calc(clamp(760px, 84vh, 980px) - 84px) !important;
  }

  .hero-panel {
    max-width: 1060px;
  }

  .hero-title {
    font-size: clamp(4.1rem, 3.4vw, 5rem);
  }

  .hero-copy {
    font-size: 1.05rem;
  }

  .home-index .container {
    width: min(100% - 72px, 1720px);
  }

  .publications-section .container {
    width: min(100% - 72px, 1720px);
  }

  .home-index,
  .page-section,
  .page-hero {
    padding-bottom: clamp(3.2rem, 4.5vw, 5rem);
    padding-top: clamp(3.2rem, 4.5vw, 5rem);
  }

  .page-hero {
    padding-bottom: clamp(1.4rem, 2vw, 2rem);
    padding-top: clamp(2.2rem, 3vw, 3.4rem);
  }

  .page-section {
    padding-top: clamp(2.4rem, 3vw, 3.4rem);
  }

  .about-lead,
  .travel-intro {
    max-width: 1520px;
  }
}

@media (max-width: 1199.98px) {
  .hero-full {
    min-height: max(1120px, 126vh);
    --hero-mobile-image-height: clamp(520px, 64vh, 660px);
  }

  .hero-content .min-vh-100 {
    min-height: calc(max(1120px, 126vh) - 84px) !important;
  }

  .hero-content .row {
    align-items: flex-start !important;
  }

  .hero-content .row > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
  }

  .hero-image {
    background-position: center top;
    background-repeat: no-repeat;
    background-size: auto var(--hero-mobile-image-height);
    -webkit-mask-image: linear-gradient(
      180deg,
      #000 0%,
      #000 calc(var(--hero-mobile-image-height) - 130px),
      rgba(0, 0, 0, 0.62) calc(var(--hero-mobile-image-height) - 70px),
      transparent var(--hero-mobile-image-height)
    );
    mask-image: linear-gradient(
      180deg,
      #000 0%,
      #000 calc(var(--hero-mobile-image-height) - 130px),
      rgba(0, 0, 0, 0.62) calc(var(--hero-mobile-image-height) - 70px),
      transparent var(--hero-mobile-image-height)
    );
    width: 100%;
  }

  .hero-scrim {
    background:
      linear-gradient(0deg, rgba(6, 21, 37, 0.94) 0%, rgba(6, 21, 37, 0.78) 42%, rgba(6, 21, 37, 0.18) 68%, rgba(6, 21, 37, 0.02) 100%),
      linear-gradient(90deg, rgba(6, 21, 37, 0.04), rgba(6, 21, 37, 0.16));
  }

  .hero-panel {
    background: rgba(6, 21, 37, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
    margin-bottom: clamp(1rem, 3vh, 2.25rem);
    margin-left: auto;
    margin-right: auto;
    margin-top: clamp(21rem, 48vh, 31rem);
    max-width: 1040px;
    padding: clamp(1rem, 2.4vw, 1.6rem);
    width: 100%;
  }

  .navbar-collapse {
    flex-basis: 100%;
    order: 3;
    padding-top: 1rem;
  }

  .navbar-toggler {
    display: inline-flex;
  }

  .nav-actions {
    margin-left: auto;
    order: 2;
  }

  .nav-link {
    margin-left: 0;
    padding: 0.72rem 0 !important;
  }

  .nav-link.is-active::after {
    left: 0;
    right: auto;
    width: 2.6rem;
  }

  .teaching-timeline::before {
    display: none;
  }

  .teaching-legend {
    padding-left: 0;
  }

  .teaching-era {
    grid-template-columns: 1fr;
    padding-left: clamp(0.85rem, 1.6vw, 1.15rem);
  }

  .teaching-marker {
    position: relative;
    top: auto;
  }

  .teaching-marker::after {
    display: none;
  }
}

@media (max-width: 991.98px) {
  .hero-full {
    min-height: max(1100px, 126vh);
    --hero-mobile-image-height: clamp(500px, 62vh, 620px);
  }

  .hero-content .min-vh-100 {
    min-height: calc(max(1100px, 126vh) - 84px) !important;
  }

  .hero-panel {
    max-width: none;
  }

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

  .travel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .life-story,
  .dog-feature {
    grid-template-columns: 1fr;
  }

  .photo-strip-party {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .repo-timeline::before {
    left: 0.45rem;
  }

  .repo-era {
    grid-template-columns: 1fr;
    padding-left: 2rem;
  }

  .repo-era-marker {
    position: relative;
    top: auto;
  }

  .repo-era-marker::after {
    left: -2rem;
    right: auto;
    transform: none;
  }

  .repo-stack-two,
  .repo-stack-three {
    grid-template-columns: 1fr;
  }

  .teaching-stack-two {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .brand-mark {
    height: 38px;
    width: 62px;
  }

  .brand-mark svg {
    height: 38px;
    width: 62px;
  }

  .navbar-brand {
    font-size: 1rem;
    gap: 0.55rem;
    margin-right: auto;
  }

  .hero-full {
    min-height: max(1040px, 122vh);
    --hero-mobile-image-height: clamp(450px, 55vh, 520px);
  }

  .hero-content .min-vh-100 {
    min-height: calc(max(1040px, 122vh) - 82px) !important;
  }

  .hero-panel {
    margin-top: clamp(17rem, 40vh, 22rem);
  }

  .hero-title {
    font-size: clamp(2.4rem, 12vw, 3.4rem);
  }

  .btn {
    width: 100%;
  }

  .feed-item {
    grid-template-columns: 1fr;
  }

  .photo-strip-party,
  .dog-photos {
    grid-template-columns: 1fr;
  }

  .photo-strip-small .photo-tile img,
  .dog-photos .photo-tile img {
    max-height: 230px;
  }

  .dog-photos .photo-tile img {
    height: 230px;
  }

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