:root {
  --bg: #F4F5EF;
  --bg-soft: #ECEFE5;
  --ink: #202920;
  --ink-dim: #5B6455;
  --line: #D8DDCC;
  --moss: #3F6B4E;
  --moss-deep: #2C4C36;
  --sage: #AFC6A4;
  --sage-tint: #E3EADA;
  --clay: #9C8558;
  --maxw: 1040px;
}

[data-theme="dark"] {
  --bg: #141A15;
  --bg-soft: #1D261F;
  --ink: #E6EDE5;
  --ink-dim: #9FAEA0;
  --line: #2B382D;
  --moss: #5E9470;
  --moss-deep: #4D7D5D;
  --sage: #94BAA0;
  --sage-tint: #223126;
  --clay: #D5BF92;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Work Sans', sans-serif;
  font-weight: 300;
  line-height: 1.65;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--sage);
  color: var(--moss-deep);
}

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

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 30px;
}

h1,
h2,
h3,
h4 {
  font-family: 'Newsreader', serif;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--moss);
  display: flex;
  align-items: center;
  gap: 9px;
}

.eyebrow::before {
  content: "—";
  color: var(--sage);
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(244, 245, 239, 0.86);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] nav {
  background: rgba(20, 26, 21, 0.88);
}

[data-theme="dark"] .nav-links {
  background: rgba(20, 26, 21, 0.96);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.theme-toggle:hover {
  color: var(--moss);
  border-color: var(--moss);
  background: var(--sage-tint);
  transform: scale(1.05);
}

nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
  position: relative;
}

.nav-mark {
  font-family: 'Newsreader', serif;
  font-size: 16px;
  font-style: italic;
  color: var(--ink);
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--ink);
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.nav-toggle:hover {
  color: var(--moss);
  background: var(--sage-tint);
}

.nav-toggle .icon-close {
  display: none;
}

nav.open .nav-toggle .icon-menu {
  display: none;
}

nav.open .nav-toggle .icon-close {
  display: block;
}

.nav-links {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 62px;
  left: 0;
  right: 0;
  background: rgba(244, 245, 239, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 18px 30px;
  gap: 14px;
  font-size: 13.5px;
  font-family: 'IBM Plex Mono', monospace;
  color: var(--ink-dim);
  box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.06);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.nav-links a {
  transition: color .2s;
  padding: 4px 0;
  display: inline-block;
}

.nav-links a:hover {
  color: var(--moss);
}

@media(min-width:760px) {
  .nav-toggle {
    display: none;
  }

  .nav-links {
    position: static;
    flex-direction: row;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: none;
    padding: 0;
    gap: 26px;
    font-size: 13px;
    box-shadow: none;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .nav-links a {
    padding: 0;
  }
}

header.hero {
  padding: 110px 0 50px;
}

@media(min-width:760px) {
  header.hero {
    padding: 160px 0 100px;
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  align-items: center;
}

@media(min-width:840px) {
  .hero-grid {
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: end;
  }
}

.hero-copy h1 {
  font-size: clamp(2.3rem, 5.6vw, 3.4rem);
  line-height: 1.08;
  margin: 20px 0 26px;
  max-width: 16ch;
}

.hero-copy p.lede {
  font-size: 1.08rem;
  font-weight: 300;
  color: var(--ink-dim);
  max-width: 52ch;
  margin-bottom: 34px;
}

.hero-loc {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--ink-dim);
  margin-top: 30px;
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

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

.btn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  transition: .2s;
}

.btn-primary {
  background: var(--moss);
  color: #fff;
  border-color: var(--moss);
}

.btn-primary:hover {
  background: var(--moss-deep);
  border-color: var(--moss-deep);
}

.btn-ghost {
  color: var(--ink);
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: var(--moss);
  color: var(--moss);
}

.sprout {
  width: 100%;
  max-width: 180px;
  justify-self: center;
  margin-top: 10px;
}

@media(min-width:840px) {
  .sprout {
    max-width: 260px;
    justify-self: end;
    margin-top: 0;
  }
}

.sprout svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.sprout-stem {
  fill: none;
  stroke: var(--moss);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 500;
  stroke-dashoffset: 500;
  animation: draw 2.4s ease forwards 0.2s;
}

.sprout-leaf,
.sprout .leaf-fill {
  fill: var(--sage-tint);
  stroke: none;
  opacity: 0;
  animation: fadein 1s ease forwards 0.9s;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes fadein {
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sprout-stem {
    animation: none;
    stroke-dashoffset: 0;
  }

  .sprout-leaf {
    animation: none;
    opacity: 1;
  }

  html {
    scroll-behavior: auto;
  }
}

section {
  padding: 84px 0;
  border-top: 1px solid var(--line);
}

.sec-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 46px;
  max-width: 620px;
}

.sec-head h2 {
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  font-style: italic;
}

.sec-head p {
  color: var(--ink-dim);
  font-weight: 300;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

.about-grid {
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr;
  align-items: start;
}

@media(min-width:760px) {
  .about-grid {
    grid-template-columns: 1fr auto 1fr;
    gap: 48px;
  }
}

.about-grid p {
  color: var(--ink-dim);
  margin-bottom: 16px;
  font-weight: 300;
}

.about-grid p strong {
  color: var(--ink);
  font-weight: 500;
}

.about-col-left {
  display: flex;
  flex-direction: column;
}

.about-col-mid {
  display: flex;
  align-items: center;
  justify-content: center;
  order: 0;
}

@media(max-width:759px) {
  .about-col-mid {
    order: -1;
  }
}

.about-portrait {
  width: 200px;
  height: 230px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 1px solid var(--sage);
  box-shadow: 0 4px 20px rgba(63, 107, 78, 0.15);
  display: block;
  flex-shrink: 0;
}

.about-col-right {
  align-self: start;
}

.fact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.fact-list li {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 14px;
  font-size: 13.5px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.fact-list .k {
  font-family: 'IBM Plex Mono', monospace;
  color: var(--moss);
  font-size: 11.5px;
}

.pull {
  border-left: 2px solid var(--moss);
  padding: 4px 0 4px 20px;
  font-family: 'Newsreader', serif;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink);
  margin: 26px 0;
}

.xp-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
}

.xp-top h3 {
  font-size: 1.3rem;
  font-style: italic;
}

.xp-meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  color: var(--clay);
}

.xp-card ul {
  padding-left: 0;
  list-style: none;
  color: var(--ink-dim);
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-weight: 300;
}

.xp-card ul li {
  padding-left: 20px;
  position: relative;
}

.xp-card ul li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--moss);
  font-size: 1.4em;
  line-height: .6;
  top: .2em;
}

.proj-grid {
  display: flex;
  flex-direction: column;
}

.proj-card {
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media(min-width:760px) {
  .proj-card {
    grid-template-columns: 210px 1fr;
    gap: 34px;
  }
}

.proj-top h3 {
  font-size: 1.15rem;
  font-style: italic;
}

.proj-date {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--ink-dim);
  margin-top: 6px;
}

.proj-org {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--clay);
  margin-top: 4px;
}

.proj-body p {
  color: var(--ink-dim);
  font-size: 14.5px;
  font-weight: 300;
  margin-bottom: 12px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  color: var(--moss);
  border: 1px solid var(--sage);
  background: var(--sage-tint);
  padding: 4px 10px;
  border-radius: 999px;
}

.proj-link {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--ink);
  display: inline-block;
  margin-top: 10px;
  margin-right: 18px;
  border-bottom: 1px solid var(--ink);
}

.proj-link:hover {
  color: var(--moss);
  border-color: var(--moss);
}

.proj-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.proj-more-btn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  background: none;
  border: none;
  padding: 0;
  color: var(--moss);
  cursor: pointer;
  display: inline-block;
  margin-top: 10px;
  margin-right: 18px;
  border-bottom: 1px solid var(--moss);
  transition: color .2s, border-color .2s;
}

.proj-more-btn:hover {
  color: var(--moss-deep);
  border-color: var(--moss-deep);
}

.gh-icon {
  display: inline-block;
  vertical-align: middle;
  transition: fill 0.2s ease, transform 0.2s ease;
}

.proj-link.gh-link,
.foot-gh-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none !important;
  border-bottom: none !important;
  text-decoration: none !important;
  padding: 2px;
}

.proj-link.gh-link:hover,
.proj-link.gh-link:focus,
.foot-gh-link:hover,
.foot-gh-link:focus {
  border: none !important;
  border-bottom: none !important;
  text-decoration: none !important;
  color: var(--moss);
}

.proj-link.gh-link:hover .gh-icon,
.foot-gh-link:hover .gh-icon {
  transform: scale(1.15);
  fill: var(--moss);
}

.blog-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0 0 30px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

@media(min-width:640px) {
  .blog-card {
    grid-template-columns: 220px 1fr;
    gap: 28px;
    padding: 30px 0;
  }
}

.blog-card:first-child {
  padding-top: 0;
}

.blog-img {
  width: 100%;
  aspect-ratio: 16/10;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  background-color: var(--sage-tint);
  border: 1px solid var(--line);
  margin-bottom: 16px;
}

@media(min-width:640px) {
  .blog-img {
    margin-bottom: 0;
  }
}

.blog-meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--clay);
  margin-bottom: 8px;
}

.blog-body h3 {
  font-size: 1.1rem;
  font-style: italic;
  margin-bottom: 10px;
  line-height: 1.3;
}

.blog-body p {
  color: var(--ink-dim);
  font-size: 14px;
  font-weight: 300;
  margin-bottom: 12px;
}

.blog-card:hover .blog-body h3 {
  color: var(--moss);
}

.blog-card:hover .blog-img {
  opacity: 0.92;
}

.edu-card {
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.edu-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.edu-top h3 {
  font-size: 1.15rem;
  font-style: italic;
}

.edu-degree {
  color: var(--ink-dim);
  font-size: 14px;
  margin-top: 4px;
  font-weight: 300;
}

.edu-meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  color: var(--clay);
  white-space: nowrap;
}

.edu-note {
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--ink-dim);
  font-weight: 300;
}

.edu-note b {
  color: var(--ink);
  font-weight: 500;
}

.cert-grid {
  display: grid;
  grid-template-columns: 1fr;
}

@media(min-width:700px) {
  .cert-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.cert-card {
  border-bottom: 1px solid var(--line);
  padding: 16px 20px 16px 0;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

@media(min-width:700px) {
  .cert-card:nth-child(odd) {
    border-right: 1px solid var(--line);
    padding-right: 24px;
  }

  .cert-card:nth-child(even) {
    padding-left: 24px;
  }
}

.cert-card h4 {
  font-family: 'Newsreader', serif;
  font-weight: 500;
  font-size: 15px;
  margin-bottom: 4px;
}

.cert-card h4 a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  transition: color .2s;
}

.cert-card h4 a .link-icon {
  font-size: 11px;
  color: var(--moss);
  opacity: 0;
  transform: translateX(-3px);
  transition: opacity .2s, transform .2s;
}

.cert-card h4 a:hover {
  color: var(--moss);
}

.cert-card h4 a:hover .link-icon {
  opacity: 1;
  transform: translateX(0);
}

.cert-card .issuer {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--ink-dim);
}

.cert-date {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--moss);
  white-space: nowrap;
}

.cert-badge {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9.5px;
  color: var(--clay);
  border: 1px solid var(--clay);
  padding: 2px 8px;
  border-radius: 999px;
  margin-top: 6px;
  display: inline-block;
}

.skill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-pill {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-dim);
  transition: .2s;
}

.skill-pill:hover {
  border-color: var(--moss);
  color: var(--moss);
  background: var(--sage-tint);
}

.hi-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media(min-width:700px) {
  .hi-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.hi-card {
  padding: 22px 24px 22px 0;
  border-bottom: 1px solid var(--line);
}

@media(min-width:700px) {
  .hi-card:nth-child(odd) {
    border-right: 1px solid var(--line);
    padding-right: 28px;
  }

  .hi-card:nth-child(even) {
    padding-left: 28px;
  }
}

.hi-card .eyebrow {
  font-size: 10.5px;
  margin-bottom: 10px;
}

.hi-card p {
  font-size: 13.5px;
  color: var(--ink-dim);
  font-weight: 300;
}

.hi-card strong {
  color: var(--ink);
  font-weight: 500;
}

.hi-card {
  display: block;
  transition: .2s;
}

.hi-card:hover {
  background: var(--sage-tint);
}

.hi-card:hover .eyebrow {
  color: var(--moss-deep);
}

.hi-card:hover p strong {
  color: var(--moss);
}

.tl {
  display: flex;
  flex-direction: column;
}

.tl-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}

@media(min-width:700px) {
  .tl-item {
    grid-template-columns: 260px 1fr;
    gap: 20px;
  }
}

.tl-item h4 {
  font-size: 1rem;
  font-weight: 500;
  font-family: 'Newsreader', serif;
  font-style: italic;
}

.tl-meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--clay);
  margin-top: 4px;
}

.tl-item p {
  color: var(--ink-dim);
  font-size: 13.5px;
  font-weight: 300;
}

.tl-item h4 a,
.tl-item p a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  transition: color .2s;
}

.tl-item h4 a .link-icon,
.tl-item p a .link-icon {
  font-size: 11px;
  color: var(--moss);
  opacity: 0;
  transform: translateX(-3px);
  transition: opacity .2s, transform .2s;
}

.tl-item h4 a:hover,
.tl-item p a:hover {
  color: var(--moss);
}

.tl-item h4 a:hover .link-icon,
.tl-item p a:hover .link-icon {
  opacity: 1;
  transform: translateX(0);
}

/* @media (max-width: 759px) {
  #volunteer a:not([href*="instagram.com"]) {
    pointer-events: none;
    cursor: default;
    color: inherit;
    text-decoration: none;
  }
  #volunteer a:not([href*="instagram.com"]) .link-icon {
    display: none !important;
  }
} */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.gallery-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.gallery-card:hover {
  transform: translateY(-4px);
  border-color: var(--moss);
  box-shadow: 0 12px 24px -6px rgba(44, 76, 54, 0.12);
}

.gallery-img-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--line);
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-card:hover .gallery-img {
  transform: scale(1.06);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(32, 41, 32, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.gallery-card:hover .gallery-overlay {
  opacity: 1;
}

.gallery-zoom-icon {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  color: #fff;
  background: rgba(44, 76, 54, 0.9);
  padding: 6px 14px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.gallery-info {
  padding: 12px 14px;
}

.gallery-info h4 {
  font-size: 0.98rem;
  font-style: italic;
  margin-bottom: 3px;
}

.gallery-info p {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--ink-dim);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(32, 41, 32, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 20px;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  max-width: 880px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.lightbox-video-wrap {
  width: 100%;
  max-width: 820px;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  position: relative;
}

.lightbox-video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 8px;
}

.lightbox-caption {
  margin-top: 14px;
  color: #fff;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 26px;
  font-size: 34px;
  color: #fff;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.lightbox-close:hover {
  opacity: 1;
}

footer {
  padding: 80px 0 50px;
  border-top: 1px solid var(--line);
}

.foot-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media(min-width:700px) {
  .foot-grid {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
  }
}

footer h2 {
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  max-width: 16ch;
  font-style: italic;
}

.foot-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
}

.foot-socials {
  display: flex;
  align-items: center;
  gap: 12px;
}

.foot-links a {
  color: var(--ink-dim);
}

.foot-links a:hover {
  color: var(--moss);
}

.foot-bottom {
  margin-top: 60px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--ink-dim);
}

/* ── Project detail modal ── */
.proj-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(32, 41, 32, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.proj-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.proj-modal-panel {
  position: relative;
  width: min(740px, 94vw);
  max-height: 86vh;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow-y: auto;
  transform: scale(0.95) translateY(16px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 24px 64px -12px rgba(32, 41, 32, 0.3);
}

.proj-modal.active .proj-modal-panel {
  transform: scale(1) translateY(0);
}

.proj-modal-close {
  position: sticky;
  top: 0;
  float: right;
  margin: 18px 20px 0 0;
  font-size: 26px;
  line-height: 1;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-dim);
  font-family: 'Work Sans', sans-serif;
  transition: color .2s, transform .2s;
  z-index: 10;
}

.proj-modal-close:hover {
  color: var(--moss);
  transform: scale(1.1);
}

.proj-modal-inner {
  padding: 28px 36px 50px;
  clear: both;
}

@media(max-width:600px) {
  .proj-modal {
    padding: 12px;
  }

  .proj-modal-panel {
    width: 100%;
    max-height: 90vh;
    border-radius: 10px;
  }

  .proj-modal-inner {
    padding: 20px 20px 40px;
  }
}

/* Modal content elements */
.pm-eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 10px;
}

.pm-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-style: italic;
  line-height: 1.15;
  margin-bottom: 16px;
}

.pm-section {
  margin-bottom: 34px;
}

.pm-section-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--moss);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.pm-body {
  color: var(--ink-dim);
  font-size: 14.5px;
  font-weight: 300;
  line-height: 1.7;
}

.pm-approach-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pm-approach-item {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px 20px;
  transition: border-color .2s;
}

.pm-approach-item:hover {
  border-color: var(--sage);
}

.pm-approach-head {
  font-family: 'Newsreader', serif;
  font-size: 1rem;
  font-style: italic;
  color: var(--ink);
  margin-bottom: 6px;
}

.pm-approach-item p {
  color: var(--ink-dim);
  font-size: 13.5px;
  font-weight: 300;
  line-height: 1.65;
}

.pm-highlights {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pm-highlights li {
  padding-left: 18px;
  position: relative;
  color: var(--ink-dim);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.6;
}

.pm-highlights li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--moss);
  font-size: 1.4em;
  line-height: .6;
  top: .22em;
}

.pm-stack-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media(max-width:500px) {
  .pm-stack-cols {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.pm-header-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 42px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.pm-stack-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--ink-dim);
  margin-bottom: 8px;
}

.pm-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pm-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.pm-gallery-wrapper {
  margin-bottom: 34px;
}

.pm-gallery-strip {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 12px;
  -webkit-overflow-scrolling: touch;
}

.pm-gallery-strip::-webkit-scrollbar {
  height: 5px;
}

.pm-gallery-strip::-webkit-scrollbar-track {
  background: var(--bg-soft);
  border-radius: 999px;
}

.pm-gallery-strip::-webkit-scrollbar-thumb {
  background: var(--sage);
  border-radius: 999px;
}

.pm-gallery-strip::-webkit-scrollbar-thumb:hover {
  background: var(--moss);
}

.pm-gallery-card {
  flex: 0 0 240px;
  scroll-snap-align: start;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.pm-gallery-card:hover {
  border-color: var(--moss);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(44, 76, 54, 0.12);
}

.pm-gallery-embed-card {
  flex: 0 0 240px;
  cursor: pointer;
}

.pm-gallery-embed-card:hover {
  border-color: var(--moss);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(44, 76, 54, 0.12);
}

.pm-gallery-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--line);
}

.pm-gallery-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.pm-gallery-card:hover .pm-gallery-img-wrap img {
  transform: scale(1.05);
}

.pm-gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(32, 41, 32, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.pm-gallery-card:hover .pm-gallery-overlay {
  opacity: 1;
}

.pm-gallery-overlay span {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: #fff;
  background: rgba(44, 76, 54, 0.9);
  padding: 4px 12px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.pm-gallery-cap {
  padding: 8px 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  color: var(--ink-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-top: 1px solid var(--line);
}

.pm-gallery-video-thumb {
  position: relative;
  background-color: #1a2419;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.pm-gallery-video-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 30, 20, 0.28);
  transition: background 0.25s ease;
}

.pm-gallery-embed-card:hover .pm-gallery-video-overlay {
  background: rgba(20, 30, 20, 0.08);
}

.pm-gallery-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
}

.pm-gallery-play-btn svg {
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6));
  opacity: 0.95;
  transition: transform 0.25s ease;
}

.pm-gallery-embed-card:hover .pm-gallery-play-btn svg {
  transform: scale(1.12);
}

/* SDG Goal Badges & Modal Section */
.sdg-square-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  margin-bottom: 4px;
}

.sdg-square {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}

.sdg-square-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.sdg-square-placeholder {
  width: 100%;
  height: 100%;
  background: var(--sage-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--moss-deep);
}

.pm-sdgs-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pm-sdg-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 16px;
  transition: border-color 0.2s ease;
}

.pm-sdg-card:hover {
  border-color: var(--sage);
}

.pm-sdg-img-wrap {
  position: relative;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
}

.pm-sdg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.pm-sdg-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sage-tint);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--moss-deep);
}

.pm-sdg-info {
  flex: 1;
  min-width: 0;
}

.pm-sdg-title {
  font-family: 'Newsreader', serif;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 2px;
}

.pm-sdg-desc {
  font-size: 13.5px;
  color: var(--ink-dim);
  font-weight: 300;
  line-height: 1.5;
  margin: 0;
}

#blog .sec-head {
  margin-bottom: 0;
}

.writing-tabs-bar {
  display: flex;
  align-items: center;
  gap: 32px;
  border-bottom: 1px solid var(--line);
  margin-top: 22px;
  margin-bottom: 20px;
}

.writing-tab-item {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13.5px;
  font-weight: 400;
  color: var(--ink-dim);
  background: transparent;
  border: none;
  padding: 8px 0 10px;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
}

.writing-tab-item::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--moss);
  opacity: 0;
  transform: scaleX(0.5);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.writing-tab-item:hover {
  color: var(--moss);
}

.writing-tab-item.active {
  color: var(--moss-deep);
  font-weight: 500;
}

.writing-tab-item.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.empty-writing-state {
  grid-column: 1 / -1;
  margin-top: 24px;
  padding: 36px 24px;
  text-align: center;
  background: var(--bg-soft);
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--ink-dim);
  font-size: 0.95rem;
}