/* ---------- Theme tokens (shadcn-style, light pastel, blue/green metal accent) ---------- */
:root {
  --background: #f7f9fb;
  --foreground: #12181f;
  --card: #ffffff;
  --card-foreground: #12181f;
  --muted: #eef2f4;
  --muted-foreground: #5b6672;
  --border: #dde3e8;
  --input: #dde3e8;
  --accent: #eef6f2;
  --accent-foreground: #145a43;
  --primary: #12181f;
  --primary-foreground: #fafcfd;
  --ring: #3b7ce0;

  --blue: #3b7ce0;
  --blue-soft: #e7f0fd;
  --green: #2f9e6e;
  --green-soft: #e5f6ee;
  --metal-gradient: linear-gradient(160deg, #4f8ce6 0%, #3b7ce0 38%, #2f9e6e 100%);
  --metal-highlight: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 40%);

  --radius: 0.85rem;
  --shadow-sm: 0 1px 2px rgba(18, 24, 31, 0.05);
  --shadow-md: 0 6px 20px rgba(18, 24, 31, 0.07);
  --shadow-lg: 0 16px 40px rgba(18, 24, 31, 0.09);
  --card-inset: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  --scrim: rgba(10, 14, 19, 0.82);
}

[data-theme="dark"] {
  --background: #0d1117;
  --foreground: #e7edf3;
  --card: #151c25;
  --card-foreground: #e7edf3;
  --muted: #1b232e;
  --muted-foreground: #97a4b2;
  --border: #26313d;
  --input: #26313d;
  --accent: #13241d;
  --accent-foreground: #6fd9a6;
  --primary: #e7edf3;
  --primary-foreground: #0d1117;
  --ring: #5b9bff;

  --blue: #5b9bff;
  --blue-soft: #141f2e;
  --green: #46c78d;
  --green-soft: #12231c;
  --metal-gradient: linear-gradient(160deg, #6ba4ff 0%, #4f8ce6 38%, #46c78d 100%);
  --metal-highlight: linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 40%);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.55);
  --card-inset: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --scrim: rgba(3, 6, 10, 0.88);
}

html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

body,
.site-header,
.card,
.btn-outline {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--background);
  color: var(--foreground);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.logo { font-family: 'Fraunces', Georgia, serif; font-weight: 600; }

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

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

.pos-top { object-position: 50% 22%; }

/* Accessible focus ring, shown only for keyboard navigation */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .project-media img, .photo-grid-item img, .community-media img, .build-shot img {
    transition: none !important;
    transition-delay: 0ms !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .btn { translate: none !important; }
  .card::after { display: none !important; }
  .lightbox-panel { transform: none !important; transition: none !important; }
  .eyebrow::before,
  .hero::before,
  .hero::after,
  .hero-photo img,
  .btn-primary::after {
    animation: none !important;
  }
  .timeline::before {
    transition: none !important;
    transform: scaleY(1) !important;
  }
}

.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

.muted-inline { color: var(--muted-foreground); font-weight: 400; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--background) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.scroll-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--metal-gradient);
  transition: width 0.1s linear;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  position: relative;
  padding-left: 14px;
}

.logo::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--metal-gradient);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-right a {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  transition: color 0.15s ease;
}

.nav-right a:hover { color: var(--foreground); }

/* Scrollspy: current section's nav link */
.nav-links a {
  position: relative;
  padding-bottom: 2px;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--metal-gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-links a.active {
  color: var(--foreground);
}

.nav-links a.active::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--foreground);
}

/* ---------- Theme toggle ---------- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--foreground);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
}

.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

.theme-toggle:active svg { transform: rotate(45deg) scale(0.85); }

/* Buttons — shadcn-style, with restrained metal finish on primary */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 9px 18px;
  border-radius: calc(var(--radius) - 4px);
  border: 1px solid transparent;
  cursor: pointer;
  transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.1s ease, background 0.15s ease, translate 0.18s ease;
  white-space: nowrap;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  position: relative;
  background: var(--metal-gradient);
  color: #fdfeff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), var(--shadow-sm);
  overflow: hidden;
}
.btn-primary:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), var(--shadow-md); }

.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
  animation: shimmer-sweep 5s ease-in-out infinite;
}

@keyframes shimmer-sweep {
  0%, 20% { left: -60%; }
  60%, 100% { left: 130%; }
}

.btn-outline {
  background: var(--card);
  border-color: var(--border);
  color: var(--foreground);
}
.btn-outline:hover { border-color: var(--blue); background: var(--blue-soft); }

.btn-ghost {
  background: transparent;
  color: var(--foreground);
}
.btn-ghost:hover { background: var(--muted); }

.btn-sm { padding: 6px 12px; font-size: 0.8rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  padding: 96px 24px 72px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
  overflow: hidden;
}

/* Hero and sections span the full page width so their backgrounds run edge to edge.
   The side padding keeps the content in the same centred column as .container. */
.hero.container,
.section.container {
  max-width: none;
  padding-left: max(24px, calc((100% - 992px) / 2));
  padding-right: max(24px, calc((100% - 992px) / 2));
}

/* Ambient drifting gradient blobs, passive background motion */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  pointer-events: none;
}

.hero::before {
  width: 380px;
  height: 380px;
  top: -140px;
  left: 8%;
  background: radial-gradient(circle, var(--blue) 0%, transparent 72%);
  animation: drift-a 22s ease-in-out infinite;
}

.hero::after {
  width: 320px;
  height: 320px;
  bottom: -120px;
  right: 6%;
  background: radial-gradient(circle, var(--green) 0%, transparent 72%);
  animation: drift-b 26s ease-in-out infinite;
}

@keyframes drift-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 30px) scale(1.12); }
}

@keyframes drift-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, -25px) scale(1.1); }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--accent-foreground);
  background: var(--green-soft);
  border: 1px solid color-mix(in srgb, var(--green) 25%, var(--border));
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--metal-gradient);
  flex-shrink: 0;
  animation: pulse-dot 2.4s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.8); }
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 2.85rem);
  margin-bottom: 18px;
}

.hero-sub {
  color: var(--muted-foreground);
  font-size: 1.05rem;
  max-width: 46ch;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-photo {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 1 / 1;
  position: relative;
}

.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--metal-highlight);
  pointer-events: none;
  mix-blend-mode: soft-light;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: ken-burns 16s ease-in-out infinite alternate;
}

@keyframes ken-burns {
  0% { transform: scale(1); }
  100% { transform: scale(1.06); }
}

/* ---------- Sections ---------- */
main { counter-reset: section-count; }

.section {
  position: relative;
  isolation: isolate;
  padding: 72px 24px;
  border-top: 1px solid var(--border);
  counter-increment: section-count;
  overflow: hidden;
}

/* Alternating tile backgrounds */
.tint-blue { background: var(--blue-soft); }
.tint-green { background: var(--green-soft); }

.section-head {
  margin-bottom: 40px;
  max-width: 640px;
  position: relative;
}

.section-head::after {
  content: counter(section-count, decimal-leading-zero);
  position: absolute;
  top: -18px;
  right: 0;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 3.4rem;
  line-height: 1;
  color: color-mix(in srgb, var(--foreground) 7%, transparent);
  pointer-events: none;
  user-select: none;
}

@media (max-width: 640px) {
  .section-head::after { display: none; }
}

.section-head .eyebrow { margin-bottom: 14px; }

.section-head h2 {
  font-size: clamp(1.5rem, 2.5vw, 1.9rem);
  margin-bottom: 10px;
  position: relative;
  padding-left: 16px;
}

.section-head h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  border-radius: 3px;
  background: var(--metal-gradient);
}

.section-head p {
  color: var(--muted-foreground);
  font-size: 1rem;
}

/* ---------- Card primitive ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--card-inset), var(--shadow-sm);
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 44px;
  align-items: start;
}

.about-photo {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 5;
}

.about-photo img { width: 100%; height: 100%; object-fit: cover; }

.about-text p {
  color: var(--foreground);
  margin-bottom: 16px;
  font-size: 1rem;
  max-width: 62ch;
}

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

.about-text strong { font-weight: 600; color: var(--accent-foreground); }

/* ---------- Badge / tag ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--muted);
  color: var(--foreground);
}

.badge-accent {
  background: var(--blue-soft);
  border-color: color-mix(in srgb, var(--blue) 30%, var(--border));
  color: var(--blue);
}

/* ---------- Projects ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.project-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-top: 3px solid var(--blue);
}

.project-card:nth-child(even) { border-top-color: var(--green); }

.project-card:hover {
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--blue) 35%, var(--border));
  transform: translateY(-2px);
}

.project-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

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

.project-card:hover .project-media img { transform: scale(1.03); }

.project-media { position: relative; }

/* Drawings and renders: show the whole image instead of cropping it */
.project-media img.fit-contain {
  object-fit: contain;
  background: #fff;
}

/* Small brand mark pinned to the corner of a project image */
.project-media .media-logo {
  position: absolute;
  left: 14px;
  bottom: 14px;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow-md);
}

.project-card:hover .project-media .media-logo { transform: none; }

/* ---------- Build photo strip ---------- */
.build-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.build-shot {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

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

.build-shot:hover img { transform: scale(1.04); }

.build-shot figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 12px 10px;
  font-size: 0.78rem;
  font-weight: 500;
  color: #f4f7fa;
  background: linear-gradient(180deg, transparent 0%, rgba(8, 12, 17, 0.78) 100%);
  pointer-events: none;
}

/* ---------- Education ---------- */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.edu-card {
  padding: 22px 24px;
  border-left: 3px solid var(--green);
}

.edu-card:nth-child(even) { border-left-color: var(--blue); }

.edu-card h3 {
  font-size: 1.02rem;
  margin-bottom: 6px;
}

.edu-meta {
  display: block;
  font-size: 0.8rem;
  color: var(--muted-foreground);
  margin-bottom: 14px;
}

.edu-card p {
  color: var(--muted-foreground);
  font-size: 0.9rem;
}

.edu-row + .edu-row { margin-top: 12px; }

.edu-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
  margin-bottom: 6px;
}

.edu-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.edu-tags .badge { font-weight: 500; gap: 6px; }
.edu-tags .badge b { font-weight: 700; color: var(--accent-foreground); }

.edu-card .edu-stat {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 2.4rem;
  font-weight: 600;
  line-height: 1;
  color: var(--foreground);
  margin-bottom: 8px;
}

.project-body {
  padding: 22px 24px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 10px;
}

.project-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.project-date {
  font-size: 0.78rem;
  color: var(--muted-foreground);
  white-space: nowrap;
}

.project-card h3 {
  font-size: 1.08rem;
  margin-bottom: 8px;
}

.project-card p {
  color: var(--muted-foreground);
  font-size: 0.92rem;
  flex: 1;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 14px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--blue);
  border-bottom: 1px solid color-mix(in srgb, var(--blue) 35%, transparent);
  width: fit-content;
  padding-bottom: 2px;
}

/* ---------- Timeline (experience / community) ---------- */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 170px;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: 12px;
  background: var(--metal-gradient);
  transform-origin: top;
  transform: scaleY(0);
  opacity: 0.5;
  transition: transform 1.1s ease;
}

.timeline.is-visible::before { transform: scaleY(1); }

@media (max-width: 860px) {
  .timeline::before { display: none; }
}

.timeline-item {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid var(--border);
}

.timeline-item:first-child { border-top: none; }

.timeline-date {
  font-size: 0.82rem;
  color: var(--muted-foreground);
  padding-top: 3px;
}

.timeline-content h3 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.timeline-role {
  font-size: 0.85rem;
  color: var(--muted-foreground);
  margin-bottom: 8px;
  display: block;
}

.timeline-content p {
  color: var(--muted-foreground);
  font-size: 0.92rem;
}

.timeline-content ul {
  list-style: none;
  color: var(--muted-foreground);
  font-size: 0.92rem;
}

.timeline-content ul li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 6px;
}

.timeline-content ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--green);
}

/* ---------- Awards grid ---------- */
.awards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.award-card {
  padding: 22px;
  border-left: 3px solid var(--blue);
}

.award-card:nth-child(even) { border-left-color: var(--green); }

.award-card h3 {
  font-size: 0.98rem;
  margin-bottom: 6px;
}

.award-card .award-year {
  font-size: 0.78rem;
  color: var(--muted-foreground);
  margin-bottom: 10px;
  display: block;
}

.award-card p {
  color: var(--muted-foreground);
  font-size: 0.88rem;
}

/* ---------- Athletics ---------- */
.athletics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.athletics-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.athletics-media img { width: 100%; height: 100%; object-fit: cover; }

.athletics-col .card {
  padding: 22px 24px;
  margin-bottom: 14px;
}

.athletics-col h3 {
  font-size: 1rem;
  margin-bottom: 10px;
}

.athletics-col ul {
  list-style: none;
  font-size: 0.9rem;
  color: var(--muted-foreground);
}

.athletics-col ul li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 7px;
}

.athletics-col ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--blue);
}

/* ---------- Photography ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.photo-grid-item {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

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

.photo-grid-item:hover img { transform: scale(1.04); }

.photo-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 28px;
  gap: 16px;
}

.photo-card:hover { box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--green) 30%, var(--border)); }

.photo-card h3 { font-size: 1.02rem; margin-bottom: 4px; }
.photo-card p { color: var(--muted-foreground); font-size: 0.9rem; }
.photo-card-arrow { font-size: 1.2rem; color: var(--green); flex-shrink: 0; }

/* ---------- Contact ---------- */
.contact-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.contact-link {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-link:hover { box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--blue) 30%, var(--border)); }

.contact-label {
  font-size: 0.78rem;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-value {
  font-size: 0.95rem;
  font-weight: 500;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted-foreground);
}

.footer-inner a:hover { color: var(--foreground); }

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--i, 0) * 80ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Community feature card ---------- */
.community-feature {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 0;
  overflow: hidden;
  padding: 0;
  margin-bottom: 28px;
  border-left: 3px solid var(--green);
}

.community-feature:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.community-media {
  overflow: hidden;
  min-height: 220px;
  border-right: 1px solid var(--border);
}

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

.community-feature:hover .community-media img { transform: scale(1.03); }

.community-body {
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
}

.community-body h3 {
  font-size: 1.08rem;
  margin-bottom: 8px;
}

.community-body p {
  color: var(--muted-foreground);
  font-size: 0.92rem;
  flex: 1;
}

/* ---------- Lightbox ---------- */
img[data-lightbox] { cursor: zoom-in; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px 24px;
  background: var(--scrim);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: min(1100px, 100%);
  transform: scale(0.94) translateY(10px);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.lightbox.open .lightbox-panel { transform: none; }

.lightbox-img {
  max-width: 100%;
  max-height: 76vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  background: var(--card);
}

.lightbox-caption {
  color: #e7edf3;
  font-size: 0.875rem;
  text-align: center;
  max-width: 60ch;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.lightbox-ctrl {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: #f2f6fa;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, scale 0.15s ease;
}

.lightbox-ctrl:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  scale: 1.06;
}

.lightbox-ctrl svg { width: 20px; height: 20px; }

.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; top: 50%; margin-top: -21px; }
.lightbox-next { right: 20px; top: 50%; margin-top: -21px; }

.lightbox-count {
  position: absolute;
  top: 28px;
  left: 24px;
  color: rgba(242, 246, 250, 0.75);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
  .lightbox { padding: 64px 12px; }
  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
  .lightbox-img { max-height: 68vh; }
}

/* Parallax images sit slightly taller than their frame so the scroll shift never exposes an edge */
img[data-parallax] {
  position: relative;
  height: 112%;
  top: -6%;
}

/* ---------- Cursor spotlight on cards ---------- */
.card {
  position: relative;
  overflow: hidden;
}

.card > * {
  position: relative;
  z-index: 1;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(
    380px circle at var(--mx, 50%) var(--my, 50%),
    color-mix(in srgb, var(--blue) 12%, transparent) 0%,
    transparent 65%
  );
}

.card:hover::after { opacity: 1; }

/* ---------- Responsive: new components ---------- */
@media (max-width: 860px) {
  .community-feature { grid-template-columns: 1fr; }
  .community-media {
    aspect-ratio: 16 / 10;
    min-height: 0;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 48px; }
  .hero-photo { max-width: 260px; margin: 0 auto; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 220px; }
  .project-grid { grid-template-columns: 1fr; }
  .awards-grid { grid-template-columns: 1fr; }
  .edu-grid { grid-template-columns: 1fr; }
  .build-strip { grid-template-columns: repeat(2, 1fr); }
  .athletics-grid { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-links { grid-template-columns: 1fr; }
  .timeline-item { grid-template-columns: 1fr; gap: 6px; }
}

/* The nav has nine links, so it collapses to the menu button earlier than the rest of the layout */
@media (max-width: 1060px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-right { gap: 12px; }

  .site-header.nav-open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--background);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px 24px;
    gap: 16px;
  }
}

@media (max-width: 520px) {
  .photo-grid { grid-template-columns: 1fr; }
}

/* ---------- Small photo inside a timeline entry ---------- */
.timeline-thumb {
  margin-top: 14px;
  max-width: 260px;
  aspect-ratio: 16 / 9;
  border-radius: calc(var(--radius) - 4px);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

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

.timeline-thumb:hover img { transform: scale(1.04); }
