
:root {
  --bg: #f8f8f5;
  --surface: #ffffff;
  --ink: #1d2329;
  --muted: #54606d;
  --accent: #1f6b5b;
  --accent-2: #d7663c;
  --line: #e3e7eb;
  --shadow: 0 16px 32px rgba(22, 37, 51, 0.08);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(circle at 10% 10%, #eef5f3, transparent 45%), radial-gradient(circle at 90% 30%, #fbeee8, transparent 40%), var(--bg);
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.6;
}
a { color: var(--accent); text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); }
a:hover { color: #174e43; text-decoration: none; }
.wrap { width: min(1080px, 92vw); margin: 0 auto; }
.site-header {
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, #f8f8f5 86%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav-row { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 1rem; }
.brand { color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: .02em; }
.site-nav { display: flex; gap: 1rem; align-items: center; }
.site-nav a { text-decoration: none; color: var(--ink); padding: .35rem .6rem; border-radius: 999px; }
.site-nav a:hover, .site-nav a[aria-current='page'] { background: #eaf2ef; color: var(--accent); }
.menu-toggle { display: none; }
.hero { padding: 4.5rem 0 2.5rem; }
.kicker { color: var(--accent); font-weight: 700; text-transform: uppercase; font-size: .8rem; letter-spacing: .08em; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .8rem; }
h1 { font-size: clamp(2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.4rem, 3.2vw, 2rem); }
.lead { font-size: clamp(1.05rem, 2vw, 1.3rem); color: #2d3a46; text-align: center; max-width: 740px; margin: 0 auto; }
.grid { display: grid; gap: 1rem; }
.cards-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 18px;
  padding: 1.2rem;
}
.card p { margin: .5rem 0 0; color: var(--muted); }
.btn {
  display: inline-block; text-decoration: none;
  padding: .65rem 1rem; border-radius: 999px;
  background: var(--accent); color: #fff; font-weight: 600;
}
.btn.alt { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.section { padding: 1.5rem 0 1.25rem; }
.section--intro { padding: 2.5rem 0 0; text-align: center; }
.timeline { display: grid; }
.timeline time { color: var(--accent); font-weight: 700; font-size: .9rem; }
.resume-block { margin-bottom: 1.5rem; }
.resume-block > h2 { margin-bottom: 1rem; }
.resume-block ul { margin: .3rem 0; padding-left: 1.1rem; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(240px,1fr)); gap: 1rem; }
.post-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--shadow); display: block; }
.post-card img { width: 100%; height: 170px; object-fit: cover; display: block; }
.post-card .meta { padding: .8rem 1rem 1rem; }
.post-card time { color: var(--accent); font-size: .82rem; font-weight: 700; }
.post-card h3 { font-size: 1.05rem; margin: .45rem 0; }
.post-card p { color: var(--muted); margin: 0; font-size: .94rem; }
.post-content {
  width: min(820px, 92vw);
  margin: 2rem auto 3.5rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 1.4rem;
}
.post-content p, .post-content li { font-family: "Literata", serif; }
.post-content img { max-width: 100%; border-radius: 10px; height: auto; }
.post-content a { color: var(--accent); }
.post-content hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }
.site-footer { margin-top: 3rem; border-top: 1px solid var(--line); padding: 1.5rem 0 1.2rem; }
.footer-grid { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-title { margin: 0; font-weight: 700; }
.footer-links { display: flex; flex-wrap: wrap; gap: .9rem; }
.footer-links a, .site-footer a { color: var(--accent); text-decoration: none; }
.footer-links a:hover, .site-footer a:hover { text-decoration: underline; }
.copyright { text-align: center; margin: 1rem 0 0; color: var(--muted); font-size: .88rem; }
.embed-wrap { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: #fff; }
/* Logo in header */
.site-logo { height: 44px; width: auto; display: block; filter: invert(0.88) sepia(0.2) saturate(0.5) hue-rotate(160deg) brightness(0.4); }
.logo-brand { display: flex; align-items: center; }
/* Hero banner photo */
.hero-banner {
  position: relative;
  width: 100%;
  min-height: clamp(420px, 56vw, 620px);
  display: flex;
  align-items: flex-end;
  overflow: clip;
  --hero-image: url('/assets/images/hero-banner.jpg');
  --hero-position: center 46%;
  --hero-overlay: linear-gradient(180deg, transparent 30%, rgba(10, 18, 28, 0.68) 100%);
  --hero-shift: 0px;
}
.hero-banner::before {
  content: '';
  position: absolute;
  inset: -3% 0;
  background-image: var(--hero-image);
  background-position: var(--hero-position);
  background-size: cover;
  background-repeat: no-repeat;
  transform: translate3d(0, var(--hero-shift), 0) scale(1.06);
  transform-origin: center;
  will-change: transform;
}
.hero-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--hero-overlay);
}
.hero-banner .hero-banner-content {
  position: relative;
  z-index: 1;
  color: #fff;
  padding: clamp(2.2rem, 4vw, 3.25rem) 2rem;
  width: 100%;
}
.hero-banner .hero-banner-content h1,
.hero-banner .hero-banner-content p { color: #fff; margin: 0; }
.hero-banner .hero-banner-content .hero-kicker {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.85;
  margin-bottom: 0.4rem;
  font-weight: 700;
}
.hero-banner .hero-banner-content .hero-title {
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
}
.hero-banner .hero-banner-content .hero-subtitle {
  opacity: 0.85;
  margin-top: 0.65rem;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  max-width: 34rem;
}
.hero-banner--home {
  --hero-image: url('/assets/images/hero-home.jpg');
  --hero-position: center 42%;
}
.hero-banner--resume {
  --hero-image: url('/assets/images/hero-resume.jpg');
  --hero-position: center 44%;
  --hero-overlay: linear-gradient(180deg, transparent 30%, rgba(12, 22, 34, 0.72) 100%);
}
.hero-banner--volunteer {
  --hero-image: url('/assets/images/hero-volunteer.jpg');
  --hero-position: center 54%;
  --hero-overlay: linear-gradient(180deg, rgba(6, 47, 92, 0.18) 0%, rgba(6, 47, 92, 0.35) 34%, rgba(244, 181, 42, 0.3) 56%, rgba(244, 181, 42, 0.42) 72%, rgba(30, 24, 12, 0.62) 100%);
}
.hero-banner.hero-banner--post {
  --hero-image: url('/assets/images/hero-volunteer.jpg');
  --hero-position: center top;
  --hero-overlay: linear-gradient(180deg, transparent 30%, rgba(6, 30, 58, 0.55) 100%);
  min-height: clamp(220px, 32vw, 340px);
}
.hero-banner--404 {
  --hero-image: url('/assets/images/hero-volunteer.jpg');
  --hero-position: center 24%;
  --hero-overlay: linear-gradient(180deg, transparent 30%, rgba(14, 30, 44, 0.78) 65%, rgba(17, 23, 31, 0.9) 100%);
}
.hero-banner--calendar {
  --hero-image: url('/assets/images/hero-calendar.jpg');
  --hero-position: center 38%;
  --hero-overlay: linear-gradient(180deg, transparent 30%, rgba(16, 30, 43, 0.7) 100%);
}
.hero-banner--contact {
  --hero-image: url('/assets/images/hero-contact.jpg');
  --hero-position: center 15%;
  --hero-overlay: linear-gradient(180deg, transparent 30%, rgba(22, 22, 30, 0.72) 100%);
}
.hero-banner--stats {
  --hero-image: url('/assets/images/hero-stats.jpg');
  --hero-position: center 40%;
  --hero-overlay: linear-gradient(180deg, transparent 30%, rgba(12, 28, 44, 0.74) 100%);
}

.lead--feature {
  margin: 0 auto;
  font-size: clamp(1.1rem, 2vw, 1.36rem);
  max-width: 740px;
}

.feature-grid {
  display: grid;
  gap: 1.25rem;
  align-items: stretch;
}
.feature-card,
.feature-card:hover {
  position: relative;
  display: block;
  min-height: 280px;
  color: #fff;
  text-decoration: none;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 22px 42px rgba(15, 26, 37, 0.18);
  background: #1f2f3c;
}
.feature-card-media,
.feature-card::after {
  position: absolute;
  inset: 0;
}
.feature-card-media {
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  transform: scale(1.02);
  transition: transform 180ms ease;
}
.feature-card::after {
  content: '';
  background: linear-gradient(180deg, rgba(10, 19, 28, 0.12) 0%, rgba(10, 19, 28, 0.78) 100%);
}
.feature-card:hover .feature-card-media,
.feature-card:focus-visible .feature-card-media {
  transform: scale(1.06);
}
.feature-card:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 50%, white);
  outline-offset: 4px;
}
.feature-card-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 280px;
  padding: 1.4rem;
}
.feature-card-title {
  display: block;
  font-size: clamp(1.45rem, 2.8vw, 2rem);
  font-weight: 700;
  line-height: 1.15;
}
.feature-card-text {
  display: block;
  margin-top: 0.65rem;
  max-width: 32ch;
  color: rgba(255, 255, 255, 0.9);
}
.feature-card--resume .feature-card-media { background-image: url('/assets/images/home-card-resume.jpeg'); }
.feature-card--youtube .feature-card-media { background-image: url('/assets/images/home-card-youtube.jpeg'); }

.contact-shell {
  padding-top: 1.5rem;
}
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 1.25rem;
  align-items: stretch;
}
.contact-primary {
  position: relative;
  padding: 1.6rem;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(31, 107, 91, 0.12), rgba(215, 102, 60, 0.08)), var(--surface);
}
.contact-primary .lead {
  text-align: left;
  max-width: none;
  margin: 0;
}
.contact-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(31, 107, 91, 0.12);
  pointer-events: none;
}
.contact-eyebrow {
  margin: 0 0 0.45rem;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}
.contact-email {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  line-height: 1.2;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  word-break: break-word;
}
.contact-note {
  margin-top: 1rem;
  max-width: 42ch;
  color: var(--muted);
}
.contact-secondary {
  display: grid;
  gap: 1rem;
}
.contact-secondary-copy {
  padding: 0.2rem 0;
}
.contact-secondary-copy p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}
.contact-links-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.contact-link-card {
  display: block;
  text-decoration: none;
  color: inherit;
  min-height: 0;
  border-radius: 20px;
  padding: 1.2rem;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.contact-link-card:hover,
.contact-link-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(31, 107, 91, 0.28);
  box-shadow: 0 20px 36px rgba(18, 31, 44, 0.12);
}
.contact-link-icon {
  display: block;
  font-size: 1.5rem;
  margin-bottom: 0.6rem;
  color: var(--muted);
  transition: color 180ms ease;
}
.contact-link-card:hover .contact-link-icon,
.contact-link-card:focus-visible .contact-link-icon {
  color: var(--accent, #1f6b5b);
}
.contact-link-label {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
}
.contact-link-meta {
  display: block;
  margin-top: 0.45rem;
  color: var(--muted);
}
.calendar-embed--mobile {
  display: none;
}
@media (max-width: 900px) {
  .cards-2 { grid-template-columns: 1fr; }
  .contact-grid,
  .contact-links-grid { grid-template-columns: 1fr; }
  .contact-link-card {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    align-items: center;
    min-height: auto;
  }
  .contact-link-icon {
    grid-column: 2;
    grid-row: 1 / -1;
    margin-bottom: 0;
    font-size: 2.2rem;
    opacity: 0.3;
  }
}
@media (max-width: 760px) {
  .menu-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: .45rem .7rem; }
  .site-nav { display: none; position: absolute; right: 4vw; top: 62px; flex-direction: column; align-items: stretch; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .5rem; box-shadow: var(--shadow); }
  .site-nav.open { display: flex; }
  .hero-banner {
    min-height: 400px;
  }
  .hero-banner.hero-banner--post {
    min-height: auto;
  }
  .hero-banner.hero-banner--post::before {
    background-size: 180% auto;
    background-position: center top;
  }
  .hero-banner::before {
    transform: scale(1.03);
  }
  .hero-banner .hero-banner-content {
    padding: 2rem 1.2rem 1.6rem;
  }
  .feature-card,
  .feature-card-content {
    min-height: 244px;
  }
  .contact-primary,
  .contact-link-card {
    padding: 1.05rem;
  }
  .timeline article {
    grid-template-columns: 56px 1fr;
    padding: 1rem;
    gap: 0.2rem 0.8rem;
  }
  .timeline-logo img { width: 48px; }
  .calendar-embed--desktop {
    display: none;
  }
  .calendar-embed--mobile {
    display: block;
  }
}
/* Timeline with logo */
.timeline { gap: 0; }
.timeline article {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 0.2rem 1.2rem;
  border-left: none;
  padding: 1.4rem 1.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(22, 37, 51, 0.04);
}
.timeline-logo { grid-column: 1; grid-row: 1 / span 10; padding-top: 0.2rem; }
.timeline-logo img { width: 72px; height: auto; border-radius: 8px; }
.timeline time { grid-column: 2; font-size: 0.85rem; }
.timeline h3 { grid-column: 2; font-size: 1.05rem; margin-bottom: 0.3rem; }
.timeline p, .timeline ul { grid-column: 2; margin: 0.2rem 0; font-size: 0.95rem; line-height: 1.55; color: var(--muted); }
.timeline ul { padding-left: 1.1rem; margin: 0.15rem 0; }
.timeline li { margin-bottom: 0.1rem; }
.timeline a { color: var(--accent); }
/* 3-column cards grid */
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .cards-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cards-3 { grid-template-columns: 1fr; } }
/* Post image gallery */
.post-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
}
.post-gallery-item {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
}
.post-gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}
.post-gallery-item:hover { box-shadow: 0 20px 36px rgba(18, 31, 44, 0.14); }
.post-gallery-item figcaption {
  padding: 0.4rem 0.6rem;
  font-size: 0.82rem;
  color: var(--muted);
}

/* About / bio section */
.about-section { padding: 1.5rem 0 2.5rem; text-align: center; width: min(740px, 92vw); }
.about-heading { font-family: 'Fira Code', 'JetBrains Mono', monospace; font-size: 1.4rem; color: var(--accent); margin-bottom: 1rem; }
.about-brace { opacity: 0.5; }
.about-body { font-size: 1.05rem; line-height: 1.75; color: var(--muted); }
.about-close { font-family: 'Fira Code', 'JetBrains Mono', monospace; font-size: 1.4rem; color: var(--accent); opacity: 0.5; }

/* Stats page */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}
.stat-card {
  text-align: center;
  padding: 1.4rem;
  overflow-x: auto;
}
.stat-card + .stats-grid {
  margin-top: 1.25rem;
}
.stat-img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}
.stat-card--zoomable { overflow: hidden; }
.stat-card embed.stat-img {
  width: 100%;
  height: auto;
}
.stat-label {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 0 0 0.8rem;
}
.stat-placeholder {
  color: var(--muted);
  padding: 2rem 1rem;
  text-align: center;
  margin: 0;
}
.stat-card--zoomable { cursor: zoom-in; transition: box-shadow 180ms ease; position: relative; }
.stat-card--zoomable::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}
.stat-card--zoomable:hover { box-shadow: 0 20px 36px rgba(18, 31, 44, 0.14); }

/* Lightbox */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
}
.lightbox-overlay.active { display: flex; }
.lightbox-content {
  width: min(92vw, 960px);
  max-height: 90vh;
  background: #fff;
  border-radius: 18px;
  padding: 1.5rem;
  overflow: auto;
}
.lightbox-content embed,
.lightbox-content img {
  width: 100%;
  height: auto;
  display: block;
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.8;
}
.lightbox-close:hover { opacity: 1; }

@media (max-width: 900px) {
  .stats-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .stat-card { padding: 0.8rem; }
  .stat-card img.stat-img { min-width: 540px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-banner::before,
  .feature-card-media,
  .contact-link-card {
    transition: none;
    transform: none;
  }
}
