/* ==========================================================================
   vibhawshrivastava.info — design tokens, base, layout, components
   Theme: environmental microbiology (moss, sage, cyan). Change colours HERE only.
   ========================================================================== */

:root {
  /* --- Core palette --- */
  --alabaster: #f8faf9;     /* primary background */
  --sage-tint: #edf2f0;     /* cards & abstract surfaces */
  --charcoal: #1c2522;      /* body text */
  --forest-moss: #1e5631;   /* headings, buttons, active nav pill */
  --cyan-microbe: #0d7377;  /* links, hover states, topic tags */

  /* --- Semantic roles (components use these) --- */
  --bg: var(--alabaster);
  --bg-alt: var(--sage-tint);
  --surface: var(--sage-tint);
  --text: var(--charcoal);
  --heading: var(--forest-moss);
  --muted: #4f5d58;
  --line: #d3dfd9;
  --primary: var(--cyan-microbe);
  --accent: var(--forest-moss);
  --on-accent: #ffffff;
  --tag-bg: rgba(13, 115, 119, .1);

  /* dark bands (hero, footer, highlight sections) */
  --dark: #12351f;
  --dark-text: #d3e4da;
  --dark-accent: #8fe3c8;
  --hero: linear-gradient(125deg, #0f2e1b 0%, #1e5631 52%, #0d7377 100%);
  --glow-1: rgba(143, 227, 200, .30);
  --glow-2: rgba(13, 115, 119, .55);

  /* three supporting accents for cards, timeline dots, icons */
  --c1: var(--forest-moss); --c2: var(--cyan-microbe); --c3: #557f2a;

  /* --- Typography --- */
  --font-heading: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

  --step--1: clamp(0.84rem, 0.82rem + 0.1vw, 0.9rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.08rem);
  --step-1: clamp(1.2rem, 1.12rem + 0.4vw, 1.42rem);
  --step-2: clamp(1.5rem, 1.3rem + 0.9vw, 2rem);
  --step-3: clamp(1.9rem, 1.5rem + 1.8vw, 2.9rem);
  --step-4: clamp(2.3rem, 1.6rem + 3vw, 4rem);

  --radius: 14px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section: clamp(4rem, 9vw, 7rem);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 32px -12px rgba(16, 24, 40, .14);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: var(--step-0); line-height: 1.7;
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--primary); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 600; color: var(--heading); line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: var(--step-4); letter-spacing: -.025em; line-height: 1.1; }
h2 { font-size: var(--step-3); letter-spacing: -.02em; }
h3 { font-size: var(--step-1); }
p { margin: 0 0 1em; }
ul, ol { padding: 0; margin: 0; list-style: none; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--dark); color: #fff; padding: .6rem 1rem; border-radius: 8px; }
.skip-link:focus { top: 1rem; color: #fff; }

.container { width: min(100% - 2 * var(--gutter), 1160px); margin-inline: auto; }
.narrow { max-width: 46rem; }
.section { padding-block: var(--section); }
.section--alt, .section--tint { background: var(--bg-alt); --surface: var(--bg); } /* cards flip to alabaster on sage bands */
.section--dark, .section--navy { background: var(--dark); color: var(--dark-text); position: relative; overflow: hidden; }
.section--dark::before, .section--navy::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(40rem 22rem at 100% 0%, var(--glow-2), transparent 70%), radial-gradient(34rem 20rem at 0% 100%, var(--glow-1), transparent 70%);
  opacity: .6;
}
.section--dark > .container, .section--navy > .container { position: relative; }
.section--dark h2, .section--dark h3, .section--navy h2, .section--navy h3 { color: #fff; }
.muted { color: var(--muted); }
.lead { font-family: var(--sans); font-size: var(--step-1); line-height: 1.6; color: var(--text); }

.eyebrow { display: inline-flex; align-items: center; gap: .6rem; font-size: var(--step--1); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--primary); margin-bottom: 1rem; }
.eyebrow::before { content: ""; width: 1.8rem; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--c1), var(--c2)); }
.section--dark .eyebrow, .section--navy .eyebrow { color: var(--dark-accent); }

.section-head { display: flex; justify-content: space-between; align-items: end; gap: 2rem; flex-wrap: wrap; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.section-head h2 { margin: 0; max-width: 22ch; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: .55rem; padding: .85rem 1.45rem; border-radius: 999px;
  border: 1.5px solid var(--heading); font: 600 var(--step--1)/1 var(--sans); letter-spacing: .01em; text-decoration: none;
  color: var(--heading); background: transparent; transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease), box-shadow .25s;
}
.btn:hover { background: var(--primary); border-color: var(--primary); color: #fff; transform: translateY(-1px); }
.btn--solid { background: var(--heading); color: #fff; }
.btn--solid:hover { background: var(--primary); border-color: var(--primary); }
.btn--accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: 0 10px 24px -10px var(--accent); }
.btn--accent:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
/* On dark bands the moss button would disappear, so it turns white there. */
.hero .btn--accent, .section--dark .btn--accent { background: #fff; border-color: #fff; color: var(--heading); box-shadow: 0 10px 24px -12px rgba(0,0,0,.5); }
.hero .btn--accent:hover, .section--dark .btn--accent:hover { background: var(--dark-accent); border-color: var(--dark-accent); color: var(--dark); }
.btn--light { border-color: rgba(255,255,255,.55); color: #fff; }
.btn--light:hover { background: #fff; color: var(--heading); }
.text-link { font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--accent); padding-bottom: 2px; color: var(--heading); }
.text-link:hover { color: var(--primary); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.88); backdrop-filter: saturate(1.6) blur(12px); border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s; }
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 20px -16px rgba(16,24,40,.4); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4.5rem; }
.brand { text-decoration: none; display: grid; line-height: 1.2; }
.brand__name { font-family: var(--font-heading); font-size: 1.22rem; color: var(--heading); font-weight: 600; }
.brand__role { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; background: linear-gradient(90deg, var(--c1), var(--c3)); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 600; }
.site-nav ul { display: flex; gap: clamp(.4rem, 1vw, .8rem); }
.site-nav a { display: block; text-decoration: none; color: var(--text); font-size: .93rem; font-weight: 500; padding: .45rem .8rem; border-radius: 999px; transition: background .2s, color .2s; }
.site-nav a:hover { background: var(--tag-bg); color: var(--primary); }
.site-nav a[aria-current="page"] { background: var(--heading); color: #fff; }

.nav-toggle { display: none; }
@media (max-width: 960px) {
  .nav-toggle { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 0; background: none; cursor: pointer; margin-right: -.5rem; }
  .nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 1.4rem; height: 2px; border-radius: 2px; background: var(--heading); transition: transform .3s var(--ease); }
  .nav-toggle__bars { position: relative; }
  .nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle__bars::before { top: -6px; } .nav-toggle__bars::after { top: 6px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }
  .site-nav { position: absolute; inset: 100% 0 auto 0; background: #fff; border-bottom: 1px solid var(--line); display: none; box-shadow: var(--shadow); }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: .25rem; padding: .75rem var(--gutter) 1.25rem; }
  .site-nav a { padding: .75rem 1rem; font-size: 1.05rem; }
  html:not(.js) .site-nav { position: static; display: block; }
}

/* hero */
.hero { position: relative; overflow: hidden; background: var(--hero); color: rgba(255,255,255,.86); }
.hero__glow { position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(36rem 28rem at 88% 18%, var(--glow-1), transparent 65%),
    radial-gradient(30rem 24rem at 10% 110%, var(--glow-2), transparent 65%); }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(255,255,255,.14) 1px, transparent 1.2px); background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000); mask-image: linear-gradient(90deg, transparent 30%, #000); }
.hero__inner { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .6fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; padding-block: clamp(4rem, 9vw, 7.5rem); position: relative; z-index: 1; }
.hero__name { font-family: var(--sans); font-size: var(--step--1); letter-spacing: .16em; text-transform: uppercase; color: #fff; margin-bottom: 1.4rem; font-weight: 700; line-height: 1.5; }
.hero__sub { display: block; color: var(--dark-accent); font-weight: 600; }
.hero__statement { font-family: var(--font-heading); color: #fff; font-size: clamp(1.75rem, 1.2rem + 1.9vw, 2.85rem); line-height: 1.2; letter-spacing: -.015em; max-width: 25ch; margin-bottom: 1.5rem; }
.hero__statement em { font-style: normal; background: linear-gradient(90deg, var(--dark-accent), #c8f169); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__role { max-width: 40rem; color: rgba(255,255,255,.8); }
.hero__portrait { justify-self: end; width: min(100%, 330px); margin: 0; position: relative; }
.hero__portrait::before { content: ""; position: absolute; inset: -10px; border-radius: 999px 999px 26px 26px; background: linear-gradient(160deg, var(--dark-accent), var(--accent)); opacity: .9; }
.hero__portrait img { position: relative; border-radius: 999px 999px 20px 20px; aspect-ratio: 5 / 6; object-fit: cover; object-position: center 25%; box-shadow: 0 30px 60px -25px rgba(0,0,0,.6); }
@media (max-width: 760px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__portrait { justify-self: start; width: 180px; order: -1; margin-left: 10px; }
}

.page-hero { position: relative; overflow: hidden; padding-block: clamp(3.5rem, 8vw, 6rem) clamp(2.5rem, 5vw, 4rem); background:
  radial-gradient(40rem 18rem at 100% 0%, color-mix(in srgb, var(--c1) 16%, transparent), transparent 70%),
  radial-gradient(30rem 16rem at 70% 100%, color-mix(in srgb, var(--c2) 12%, transparent), transparent 70%), var(--bg); border-bottom: 1px solid var(--line); }
.page-hero h1 { max-width: 18ch; margin-bottom: .4em; }
.page-hero .lead { max-width: 44rem; color: var(--muted); margin: 0; }

/* grids */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.split--even { grid-template-columns: 1fr 1fr; align-items: center; }
@media (max-width: 860px) { .split, .split--even { grid-template-columns: 1fr; } }
.sticky { position: sticky; top: 6.5rem; }
@media (max-width: 860px) { .sticky { position: static; } }

.prose p { max-width: 42rem; }
.prose h2 { margin-top: 2.5rem; font-size: var(--step-2); }
.figure { margin: 0; }
.figure img { border-radius: var(--radius); width: 100%; box-shadow: var(--shadow); }
.figure figcaption, .gallery figcaption { font-size: var(--step--1); color: var(--muted); margin-top: .7rem; line-height: 1.5; }

/* tags */
.tags { display: flex; flex-wrap: wrap; gap: .6rem; }
.tags li { border: 1px solid var(--line); background: var(--surface); padding: .5rem 1rem; border-radius: 999px; font-size: var(--step--1); font-weight: 500; color: var(--heading); }
.section--dark .tags li, .section--navy .tags li { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.2); color: #fff; }
.section--dark .tags li:nth-child(3n+1) { border-color: var(--dark-accent); }
.section--dark .tags li:nth-child(3n+2) { border-color: var(--accent); }

/* facts */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-top: 2.5rem; }
.facts div { padding: 1.1rem 1.2rem; border-radius: var(--radius); background: var(--bg-alt); border-top: 3px solid var(--c1); }
.facts div:nth-child(2) { border-top-color: var(--c2); }
.facts div:nth-child(3) { border-top-color: var(--c3); }
.facts dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.facts dd { margin: .2rem 0 0; font-family: var(--font-heading); font-size: 1.12rem; line-height: 1.35; color: var(--heading); overflow-wrap: anywhere; }

/* research theme cards */
.themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 900px) { .themes { grid-template-columns: 1fr; } }
.theme-card { position: relative; background: var(--surface); border-radius: var(--radius); padding: 2rem 1.75rem 1.75rem; box-shadow: var(--shadow); overflow: hidden; transition: transform .35s var(--ease); }
.theme-card:hover { transform: translateY(-4px); }
.theme-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--c1); }
.theme-card:nth-child(2)::before { background: var(--c2); }
.theme-card:nth-child(3)::before { background: var(--c3); }
.theme-card__num { display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; font-weight: 700; font-size: .85rem; color: #fff; background: var(--c1); margin-bottom: 1.1rem; }
.theme-card:nth-child(2) .theme-card__num { background: var(--c2); }
.theme-card:nth-child(3) .theme-card__num { background: var(--c3); }
.theme-card p { color: var(--muted); margin: 0; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.cards--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 700px) { .cards--two { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2rem); display: flex; flex-direction: column; box-shadow: var(--shadow); border-left: 4px solid var(--c1); }
.card:nth-child(4n+2) { border-left-color: var(--c2); }
.card:nth-child(4n+3) { border-left-color: var(--c3); }
.card h3 { margin-bottom: .5rem; overflow-wrap: break-word; hyphens: auto; }
.card__meta { font-size: var(--step--1); color: var(--primary); font-weight: 600; letter-spacing: .04em; margin-bottom: .75rem; }
.card p:last-child { margin-bottom: 0; }
.card__foot { margin-top: auto; padding-top: 1rem; font-size: var(--step--1); color: var(--muted); border-top: 1px solid var(--line); }

/* timeline */
.timeline { position: relative; }
.timeline::before { content: ""; position: absolute; left: 10.5rem; top: .6rem; bottom: .6rem; width: 2px; background: linear-gradient(var(--c1), var(--c2), var(--c3)); border-radius: 2px; }
.timeline__item { display: grid; grid-template-columns: 10.5rem 1fr; gap: 0 2.5rem; padding-bottom: 2.4rem; position: relative; }
.timeline__item::before { content: ""; position: absolute; left: calc(10.5rem - 6px); top: .5rem; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 3px solid var(--c1); }
.timeline__item:nth-child(3n+2)::before { border-color: var(--c2); }
.timeline__item:nth-child(3n)::before { border-color: var(--c3); }
.timeline__when { display: grid; text-align: right; padding-right: 1.5rem; }
.timeline__year { font-family: var(--font-heading); font-size: var(--step-1); color: var(--heading); font-weight: 600; }
.timeline__place { font-size: var(--step--1); color: var(--muted); }
.timeline__what { padding-left: 1rem; }
.timeline__what h3 { margin-bottom: .3rem; }
.timeline__what p { color: var(--muted); margin: 0; max-width: 40rem; }
@media (max-width: 640px) {
  .timeline::before { left: 6px; }
  .timeline__item { grid-template-columns: 1fr; padding-left: 2rem; }
  .timeline__item::before { left: 0; }
  .timeline__when { text-align: left; padding: 0 0 .3rem; grid-auto-flow: column; justify-content: start; gap: .75rem; align-items: baseline; }
  .timeline__what { padding-left: 0; }
}

/* publications */
/* Full-width card grid: 2–3 per row on desktop, 1 on mobile; rows share equal height. */
.pubs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 1.25rem; align-items: stretch; }
.pub {
  display: flex; flex-direction: column; padding: 1.5rem 1.6rem 1.35rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: opacity .25s var(--ease), transform .25s var(--ease), border-color .25s;
}
.pub:hover { border-color: var(--primary); }
.pub.is-filtered-out { opacity: 0; transform: scale(.97); }
.pub[hidden] { display: none; }
.pub__tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .9rem; }
.pub__tags li, .pub__topic {
  font-family: var(--mono); font-size: .72rem; font-weight: 500; letter-spacing: .02em; color: var(--primary);
  background: var(--tag-bg); padding: .2rem .6rem; border-radius: 999px;
}
.pub__topic { display: inline-block; align-self: flex-start; margin-bottom: .9rem; }
.pub__title { font-size: 1.12rem; line-height: 1.4; margin-bottom: .6rem; }
.pub__authors { font-size: .92rem; color: var(--muted); margin-bottom: .5rem; }
.pub__authors .me { color: var(--heading); font-weight: 600; }
.pub__meta { font-family: var(--mono); font-size: .78rem; line-height: 1.55; color: var(--text); margin-bottom: 0; }
.pub__meta em { font-style: normal; }
.pub__foot { margin-top: auto; padding-top: 1.1rem; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.pub__doi, .badge {
  font-family: var(--mono); font-size: .74rem; font-weight: 500; text-decoration: none; display: inline-flex; gap: .4rem; align-items: center;
  padding: .32rem .75rem; border-radius: 999px; line-height: 1.3;
}
.pub__doi { border: 1px solid var(--line); background: var(--bg); color: var(--primary); overflow-wrap: anywhere; }
.pub__doi::after { content: "↗"; }
.pub__doi:hover { background: var(--primary); border-color: var(--primary); color: #fff; text-decoration: none; }
.badge { background: var(--heading); color: #fff; letter-spacing: .04em; }
.badge--year { background: transparent; color: var(--muted); border: 1px solid var(--line); }

/* filter bar (built by main.js from the cards' tags and years) */
.filters { display: grid; gap: .9rem; margin-bottom: 1.75rem; padding: 1.1rem 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.filters[hidden] { display: none; }
.filters__row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.filters__label { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); min-width: 4.5rem; }
.pill {
  font: 500 .86rem/1 var(--sans); padding: .55rem .95rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg); color: var(--text); transition: background .2s, color .2s, border-color .2s;
}
.pill:hover { border-color: var(--primary); color: var(--primary); }
.pill[aria-pressed="true"] { background: var(--heading); border-color: var(--heading); color: #fff; }
.filters__status { font-family: var(--mono); font-size: .78rem; color: var(--muted); margin: 0; }
.pubs-empty { padding: 2rem; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }

/* CV entries */
.entries { display: grid; }
.entry { display: grid; grid-template-columns: 11rem 1fr; gap: .25rem 2rem; padding: 1.4rem 0; border-top: 1px solid var(--line); }
.entry:last-child { border-bottom: 1px solid var(--line); }
.entry__when { font-size: var(--step--1); color: var(--primary); font-weight: 700; padding-top: .25rem; }
.entry__title { font-size: var(--step-1); margin-bottom: .25rem; }
.entry p { margin: 0 0 .2rem; }
.entry__project { font-style: italic; color: var(--text); }
.entry--compact { padding: 1rem 0; }
.entry--compact .entry__title { font-size: 1.05rem; font-family: var(--sans); font-weight: 600; }
.entry .muted { font-size: .93rem; }
@media (max-width: 640px) { .entry { grid-template-columns: 1fr; } }

/* skills */
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin: 0; }
.skill { padding: 1.2rem 1.3rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.skill dt { font-weight: 700; color: var(--heading); margin-bottom: .25rem; }
.skill dd { margin: 0; color: var(--muted); font-size: .95rem; }

/* gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: clamp(1rem, 2.5vw, 1.75rem); }
.gallery__item { margin: 0; }
.gallery__link { display: block; overflow: hidden; border-radius: var(--radius); background: var(--bg-alt); cursor: zoom-in; box-shadow: var(--shadow); }
.gallery__link img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .9s var(--ease); }
.gallery__link:hover img { transform: scale(1.04); }

.lightbox { border: 0; padding: 0; background: transparent; max-width: min(94vw, 1400px); max-height: 94vh; overflow: visible; }
.lightbox::backdrop { background: rgba(8, 12, 30, .92); }
.lightbox figure { margin: 0; }
.lightbox img { max-height: 84vh; width: auto; margin-inline: auto; border-radius: 10px; }
.lightbox figcaption { color: #e6ebf5; text-align: center; margin-top: .8rem; font-size: var(--step--1); }
.lightbox__close { position: absolute; top: -2.8rem; right: 0; background: none; border: 0; color: #fff; font-size: 2.2rem; line-height: 1; cursor: pointer; padding: .25rem .5rem; }

/* contact */
.link-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 1rem; }
.link-card { display: flex; gap: 1rem; align-items: center; padding: 1.2rem 1.3rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; color: var(--text); box-shadow: var(--shadow); transition: transform .25s var(--ease), border-color .25s; }
.link-card:hover { transform: translateY(-3px); border-color: var(--primary); color: var(--text); }
.link-card .icon { width: 2.6rem; height: 2.6rem; padding: .6rem; flex: none; fill: #fff; border-radius: 12px; background: var(--c1); }
.link-cards li:nth-child(3n+2) .icon { background: var(--c2); }
.link-cards li:nth-child(3n) .icon { background: var(--c3); }
.link-card span { display: grid; min-width: 0; }
.link-card strong { color: var(--heading); }
.link-card span span { font-size: .88rem; color: var(--muted); overflow-wrap: anywhere; }

.callout { border-left: 4px solid var(--accent); background: var(--bg-alt); border-radius: 0 var(--radius) var(--radius) 0; padding: 1rem 1.25rem; color: var(--text); max-width: 42rem; }

/* footer */
.site-footer { background: var(--dark); color: var(--dark-text); padding-block: 3.5rem 2.5rem; font-size: var(--step--1); border-top: 4px solid transparent; border-image: linear-gradient(90deg, var(--c1), var(--c2), var(--c3)) 1; }
.site-footer a { color: #fff; }
.site-footer__inner { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.site-footer__name { font-family: var(--font-heading); font-size: 1.3rem; color: #fff; margin-bottom: .4rem; }
.site-footer__meta { display: grid; gap: 1rem; justify-items: end; align-content: end; }
@media (max-width: 640px) { .site-footer__meta { justify-items: start; } }
.icon-links { display: flex; gap: .5rem; }
.icon-links a { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: rgba(255,255,255,.08); transition: background .25s; }
.icon-links a:hover { background: var(--accent); }
.icon-links a:hover .icon { fill: var(--on-accent); }
.icon-links .icon { width: 1.1rem; height: 1.1rem; fill: #fff; }

/* reveal on scroll */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
@media print {
  .site-header, .site-footer, .btn-row, .lightbox { display: none !important; }
  .section { padding-block: 1.5rem; }
}
