/* =========================================================
   Studio — minimal technopreneur theme
   ========================================================= */

:root {
  --bg: #fbfbf9;
  --surface: #ffffff;
  --surface-2: #f4f3ef;
  --ink: #15151a;
  --ink-soft: #3c3c44;
  --muted: #6c6c75;
  --line: #e8e7e1;
  --line-strong: #dcdbd4;
  --accent: #2f4bdc;
  --accent-hover: #2237b8;
  --accent-tint: rgba(47, 75, 220, 0.08);
  --on-accent: #ffffff;

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1080px;
  --wrap-narrow: 720px;
  --wrap-wide: 1180px;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;

  --shadow-sm: 0 1px 2px rgba(20, 20, 26, 0.04);
  --shadow: 0 12px 40px -16px rgba(20, 20, 26, 0.18);

  --step: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e10;
    --surface: #161618;
    --surface-2: #1c1c1f;
    --ink: #f3f2ee;
    --ink-soft: #c9c8c3;
    --muted: #9a9a a2;
    --muted: #9a9aa2;
    --line: #26262a;
    --line-strong: #303036;
    --accent: #8aa0ff;
    --accent-hover: #a8b8ff;
    --accent-tint: rgba(138, 160, 255, 0.12);
    --on-accent: #0e0e10;
    --shadow: 0 12px 40px -16px rgba(0, 0, 0, 0.6);
  }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; font-weight: 600; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--accent-tint); }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap--narrow { max-width: var(--wrap-narrow); }
.wrap--wide { max-width: var(--wrap-wide); }
.site { display: flex; flex-direction: column; min-height: 100vh; }
.site-main { flex: 1 0 auto; }
.dot { color: var(--line-strong); margin: 0 .5em; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand__name { font-weight: 600; font-size: 1.05rem; letter-spacing: -0.02em; }
.brand__logo { max-height: 30px; width: auto; }

.nav { display: flex; align-items: center; }
.nav__list { display: flex; align-items: center; gap: 28px; }
.nav__list a {
  font-size: .95rem; color: var(--ink-soft); font-weight: 500;
  position: relative; transition: color .18s ease;
}
.nav__list a:hover { color: var(--ink); }
.nav__list a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--accent); transition: width .22s ease;
}
.nav__list a:hover::after { width: 100%; }
.nav__toggle { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .72em 1.25em; border-radius: 999px; font-weight: 500; font-size: .95rem;
  border: 1px solid transparent; cursor: pointer; transition: all .2s ease; white-space: nowrap;
}
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--ink); transform: translateY(-1px); }

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 9vw, 120px) 0 clamp(40px, 6vw, 80px); }
.hero__eyebrow {
  font-family: var(--mono); font-size: .8rem; letter-spacing: .02em; text-transform: none;
  color: var(--muted); margin: 0 0 24px;
}
.hero__title {
  font-family: var(--serif); font-weight: 500; letter-spacing: -0.025em;
  font-size: clamp(2.6rem, 1.4rem + 5vw, 5rem); line-height: 1.02; margin: 0 0 28px;
  max-width: 16ch;
}
.hero__lede {
  font-size: clamp(1.1rem, 1rem + 0.6vw, 1.4rem); color: var(--ink-soft);
  max-width: 46ch; margin: 0 0 36px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 40px; }
.hero__chips { display: flex; flex-wrap: wrap; gap: 10px; }
.hero__chips li {
  font-family: var(--mono); font-size: .76rem; color: var(--ink-soft);
  padding: .4em .8em; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
}

/* ---------- Sections ---------- */
.section { padding: clamp(48px, 7vw, 96px) 0; }
.section--alt { background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 36px; }
.section__title { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); letter-spacing: -0.025em; }
.section__more { font-size: .95rem; color: var(--accent); font-weight: 500; white-space: nowrap; }
.section__more:hover { color: var(--accent-hover); }
.empty { color: var(--muted); font-size: .98rem; }
.empty code { font-family: var(--mono); font-size: .85em; background: var(--surface-2); padding: .15em .45em; border-radius: 6px; }

/* ---------- Work grid ---------- */
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.work-card {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.work-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.work-card__media { aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; }
.work-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.work-card:hover .work-card__media img { transform: scale(1.03); }
.work-card__placeholder {
  display: flex; align-items: center; justify-content: center; height: 100%;
  font-family: var(--serif); font-size: 1.4rem; color: var(--muted); padding: 24px; text-align: center;
}
.work-card__body { padding: 24px 26px 28px; }
.work-card__title { font-size: 1.3rem; letter-spacing: -0.02em; margin-bottom: 8px; }
.work-card__excerpt { color: var(--muted); font-size: .98rem; margin-bottom: 16px; }
.work-card__link { font-size: .9rem; font-weight: 500; color: var(--accent); }

/* ---------- Post list ---------- */
.post-list { display: flex; flex-direction: column; }
.post-row { border-top: 1px solid var(--line); }
.post-row:last-child { border-bottom: 1px solid var(--line); }
.post-row__link {
  display: flex; align-items: center; gap: 24px; padding: 28px 8px;
  transition: padding .25s ease, background .2s ease; border-radius: var(--r);
}
.post-row__link:hover { padding-left: 20px; padding-right: 16px; background: var(--surface); }
.post-row__main { flex: 1; min-width: 0; }
.post-row__title { font-size: 1.35rem; letter-spacing: -0.02em; margin-bottom: 6px; transition: color .2s ease; }
.post-row__link:hover .post-row__title { color: var(--accent); }
.post-row__excerpt { color: var(--muted); font-size: .98rem; margin-bottom: 12px; max-width: 62ch; }
.post-row__meta { font-family: var(--mono); font-size: .76rem; color: var(--muted); display: flex; align-items: center; flex-wrap: wrap; }
.post-row__tag { color: var(--ink-soft); }
.post-row__arrow { font-size: 1.3rem; color: var(--line-strong); transition: transform .25s ease, color .25s ease; }
.post-row__link:hover .post-row__arrow { transform: translateX(4px); color: var(--accent); }

/* ---------- About ---------- */
.about__inner { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; }
.about__body p { color: var(--ink-soft); font-size: 1.1rem; }
.about__cta { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }

/* ---------- Archive head ---------- */
.archive-head { padding: clamp(56px, 8vw, 100px) 0 8px; }
.archive-head__eyebrow { font-family: var(--mono); font-size: .8rem; color: var(--muted); margin: 0 0 14px; }
.archive-head__title { font-family: var(--serif); font-weight: 500; font-size: clamp(2.2rem, 1.6rem + 3vw, 3.6rem); letter-spacing: -0.025em; }
.archive-head__desc { color: var(--ink-soft); max-width: 52ch; margin-top: 16px; font-size: 1.1rem; }

/* ---------- Post / Page ---------- */
.post { padding-bottom: 80px; }
.post__header { padding: clamp(48px, 7vw, 90px) 0 28px; text-align: center; }
.post__meta { font-family: var(--mono); font-size: .78rem; color: var(--muted); display: flex; justify-content: center; align-items: center; flex-wrap: wrap; margin-bottom: 22px; }
.post__tag { color: var(--accent); }
.post__title { font-family: var(--serif); font-weight: 500; font-size: clamp(2.1rem, 1.4rem + 3.4vw, 3.8rem); letter-spacing: -0.025em; line-height: 1.05; max-width: 18ch; margin: 0 auto; }
.post__lede { color: var(--ink-soft); font-size: 1.25rem; max-width: 46ch; margin: 22px auto 0; text-align: center; }
.post__feature { margin: clamp(32px, 5vw, 56px) auto; }
.post__feature img { width: 100%; border-radius: var(--r-lg); }
.post__feature figcaption { text-align: center; color: var(--muted); font-size: .85rem; margin-top: 12px; font-family: var(--mono); }

/* Content typography */
.gh-content { font-size: 1.15rem; line-height: 1.75; color: var(--ink-soft); }
.gh-content > * { margin-bottom: 1.5em; }
.gh-content h2 { font-family: var(--serif); font-weight: 500; font-size: 1.9rem; color: var(--ink); margin-top: 1.8em; letter-spacing: -0.02em; }
.gh-content h3 { font-size: 1.4rem; color: var(--ink); margin-top: 1.6em; }
.gh-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.gh-content a:hover { color: var(--accent-hover); }
.gh-content strong { color: var(--ink); }
.gh-content img, .gh-content video { border-radius: var(--r); width: 100%; }
.gh-content figcaption { text-align: center; color: var(--muted); font-size: .85rem; margin-top: 10px; }
.gh-content blockquote {
  margin: 1.8em 0; padding: .2em 0 .2em 1.4em; border-left: 3px solid var(--accent);
  font-family: var(--serif); font-size: 1.4rem; font-style: italic; color: var(--ink);
}
.gh-content pre { background: var(--ink); color: #f5f5f5; padding: 1.2em 1.4em; border-radius: var(--r); overflow-x: auto; font-family: var(--mono); font-size: .9rem; line-height: 1.6; }
.gh-content code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); padding: .15em .4em; border-radius: 6px; }
.gh-content pre code { background: none; padding: 0; }
.gh-content hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
.gh-content .kg-width-wide { width: min(120%, var(--wrap)); margin-left: 50%; transform: translateX(-50%); }
.gh-content .kg-width-full { width: 100vw; margin-left: 50%; transform: translateX(-50%); border-radius: 0; }

/* Byline / footer */
.post__footer { margin-top: 56px; padding-top: 36px; border-top: 1px solid var(--line); }
.byline { display: flex; gap: 16px; align-items: center; margin-bottom: 28px; }
.byline__avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.byline__name { font-weight: 600; }
.byline__bio { color: var(--muted); font-size: .95rem; margin: 4px 0 0; }
.post__back { font-size: .95rem; color: var(--accent); font-weight: 500; }

/* ---------- Pagination ---------- */
.pagination { display: flex; justify-content: space-between; align-items: center; margin-top: 48px; font-size: .95rem; }
.pagination a { color: var(--accent); font-weight: 500; }
.pagination .page-number { color: var(--muted); font-family: var(--mono); font-size: .8rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 56px 0; }
.site-footer__inner { display: flex; flex-wrap: wrap; gap: 24px 40px; align-items: flex-start; justify-content: space-between; }
.site-footer__name { font-weight: 600; font-size: 1.05rem; }
.site-footer__desc { color: var(--muted); font-size: .95rem; margin: 8px 0 0; max-width: 36ch; }
.site-footer__social { display: flex; gap: 22px; }
.site-footer__social a { color: var(--ink-soft); font-size: .95rem; font-weight: 500; position: relative; }
.site-footer__social a:hover { color: var(--accent); }
.site-footer__legal { width: 100%; display: flex; align-items: center; color: var(--muted); font-size: .82rem; font-family: var(--mono); padding-top: 20px; border-top: 1px solid var(--line); }
.site-footer__legal a:hover { color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .work-grid { grid-template-columns: 1fr; gap: 20px; }
  .about__inner { grid-template-columns: 1fr; gap: 12px; }
  .post-row__arrow { display: none; }
}

@media (max-width: 680px) {
  .nav__toggle {
    display: inline-flex; flex-direction: column; gap: 5px; background: none; border: 0;
    padding: 10px; cursor: pointer; margin: -10px;
  }
  .nav__toggle span { width: 22px; height: 2px; background: var(--ink); transition: transform .25s ease, opacity .2s ease; }
  body.nav-open .nav__toggle span:first-child { transform: translateY(7px) rotate(45deg); }
  body.nav-open .nav__toggle span:last-child { transform: translateY(-7px) rotate(-45deg); }
  .nav__list {
    position: fixed; inset: 68px 0 auto 0; flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px 24px 24px; transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
  }
  body.nav-open .nav__list { opacity: 1; transform: none; pointer-events: auto; }
  .nav__list a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); width: 100%; font-size: 1.05rem; }
  .nav__list a::after { display: none; }
  .post-row__link { gap: 0; }
  .site-footer__inner { flex-direction: column; }
}

/* =========================================================
   Refinements: hero image, post thumbnails, nav, mobile
   ========================================================= */

/* Hero two-column with image */
.hero__inner { display: grid; grid-template-columns: 1.35fr 0.9fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero__title { font-size: clamp(2.3rem, 1.2rem + 4vw, 4.2rem); max-width: 15ch; }
.hero__lede { max-width: 40ch; }
.hero__media { display: flex; justify-content: center; }
.hero__photo,
.hero__monogram {
  width: 100%; max-width: 340px; aspect-ratio: 4 / 5; border-radius: var(--r-lg);
}
.hero__photo { object-fit: cover; box-shadow: var(--shadow); }
.hero__monogram {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 5rem; font-weight: 500; color: var(--accent);
  background: linear-gradient(150deg, var(--surface-2), var(--accent-tint));
  border: 1px solid var(--line);
}
.hero__monogram img { max-width: 62%; height: auto; border-radius: 0; }

/* Nav spacing (proper list now) + current state */
.nav__list { display: flex; align-items: center; gap: 32px; margin: 0; padding: 0; list-style: none; }
.nav__item { margin: 0; }
.nav__item.is-current a { color: var(--ink); }
.nav__item.is-current a::after { width: 100%; }

/* Post row thumbnails */
.post-row__link { display: flex; align-items: center; gap: 22px; }
.post-row__thumb {
  flex: 0 0 auto; width: 118px; height: 86px; border-radius: 12px; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--line);
}
.post-row__thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-row__thumb--empty {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(140deg, var(--surface-2), var(--accent-tint));
}
.post-row__thumb--empty span {
  font-family: var(--mono); font-size: .6rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); padding: 6px; text-align: center; line-height: 1.3;
}

/* ---------- Mobile refinements ---------- */
@media (max-width: 860px) {
  .hero__inner { grid-template-columns: 1fr; gap: 36px; }
  .hero__media { justify-content: flex-start; }
  .hero__photo, .hero__monogram { max-width: 240px; aspect-ratio: 1 / 1; }
  .hero__monogram { font-size: 3.4rem; }
}

@media (max-width: 680px) {
  .site-header__inner { height: 60px; }
  .hero { padding-top: 40px; }
  .hero__title { font-size: clamp(2rem, 1.3rem + 5vw, 2.8rem); max-width: 100%; }
  .hero__lede { font-size: 1.08rem; max-width: 100%; }
  .hero__actions .btn { flex: 1 1 auto; text-align: center; }
  .section__head { flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 24px; }
  .post-row__link { gap: 16px; padding: 20px 4px; }
  .post-row__link:hover { padding-left: 4px; padding-right: 4px; }
  .post-row__thumb { width: 84px; height: 64px; }
  .post-row__title { font-size: 1.12rem; }
  .post-row__excerpt { font-size: .92rem; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
  .post-row__arrow { display: none; }
  .work-card__body { padding: 20px 20px 22px; }
  .gh-content { font-size: 1.05rem; }
  .gh-content .kg-width-full { border-radius: 0; }
}

/* ---------- Comments (Disqus) ---------- */
.comments { margin-top: 56px; padding-top: 36px; border-top: 1px solid var(--line); }
.comments__title { font-family: var(--serif); font-weight: 500; font-size: 1.6rem; letter-spacing: -0.02em; margin-bottom: 24px; }

/* ---------- Awards & recognition ---------- */
.award-list { display: flex; flex-direction: column; }
.award-item { display: flex; gap: 28px; padding: 22px 0; border-top: 1px solid var(--line); }
.award-item:last-child { border-bottom: 1px solid var(--line); }
.award-item__year { font-family: var(--mono); font-size: .85rem; color: var(--accent); flex: 0 0 70px; padding-top: 5px; }
.award-item__title { font-size: 1.2rem; letter-spacing: -0.02em; margin-bottom: 5px; }
.award-item__desc { color: var(--muted); font-size: .96rem; margin: 0; max-width: 60ch; }

/* ---------- Featured badge + section foot ---------- */
.badge {
  display: inline-block; vertical-align: middle; margin-right: 10px;
  font-family: var(--mono); font-size: .58rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-tint); border: 1px solid var(--line);
  padding: .25em .6em; border-radius: 999px; position: relative; top: -2px;
}
.section__foot { margin-top: 30px; }

@media (max-width: 680px) {
  .award-item { gap: 16px; padding: 18px 0; }
  .award-item__year { flex-basis: 48px; font-size: .78rem; }
  .post-row__excerpt { -webkit-line-clamp: 3; }
}

/* ---------- Hero top gap (tighter) + tight section ---------- */
.hero { padding: clamp(24px, 4vw, 52px) 0 clamp(36px, 5vw, 70px); }
.section--tight { padding-top: clamp(28px, 4vw, 52px); }

/* ---------- Carousel (auto-slide) ---------- */
.carousel { position: relative; }
.carousel__track {
  display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 6px max(24px, calc((100vw - var(--wrap)) / 2)) 22px;
  -ms-overflow-style: none; scrollbar-width: none;
}
.carousel__track::-webkit-scrollbar { display: none; }
.slide {
  scroll-snap-align: start; flex: 0 0 clamp(280px, 62vw, 400px);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.slide:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.slide__media { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.slide__media img { width: 100%; height: 100%; object-fit: cover; }
.slide__media--empty { display: flex; align-items: center; justify-content: center; background: linear-gradient(140deg, var(--surface-2), var(--accent-tint)); }
.slide__media--empty span { font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.slide__badge { position: absolute; top: 12px; left: 12px; font-family: var(--mono); font-size: .58rem; letter-spacing: .08em; text-transform: uppercase; color: var(--on-accent); background: var(--accent); padding: .3em .6em; border-radius: 999px; }
.slide__body { padding: 18px 20px 22px; }
.slide__title { font-size: 1.18rem; letter-spacing: -0.02em; margin-bottom: 8px; }
.slide__meta { font-family: var(--mono); font-size: .74rem; color: var(--muted); }
.carousel__nav { display: flex; gap: 10px; justify-content: flex-end; margin: 14px auto 0; }
.carousel__btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); cursor: pointer; font-size: 1.05rem;
  display: inline-flex; align-items: center; justify-content: center; transition: all .2s ease;
}
.carousel__btn:hover { border-color: var(--ink); transform: translateY(-1px); }

/* ---------- GitHub contributions ---------- */
.gh-contrib { margin-top: 44px; padding-top: 32px; border-top: 1px solid var(--line); }
.gh-contrib__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; }
.gh-contrib__label { font-family: var(--mono); font-size: .82rem; color: var(--ink-soft); letter-spacing: .02em; }
.gh-contrib__head a { font-size: .9rem; color: var(--accent); font-weight: 500; }
.gh-contrib__chart { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.gh-contrib__chart img { width: 100%; min-width: 680px; display: block; }

/* ---------- Carousel: center-zoom mode ---------- */
.carousel { --card: clamp(260px, 74vw, 400px); }
.carousel__track {
  align-items: center;
  padding-left: max(20px, calc(50% - var(--card) / 2));
  padding-right: max(20px, calc(50% - var(--card) / 2));
}
.slide {
  flex: 0 0 var(--card);
  scroll-snap-align: center;
  opacity: .5;
  transform: scale(.82);
  pointer-events: none;
  transition: transform .45s cubic-bezier(.22, .61, .36, 1), opacity .45s ease, box-shadow .3s ease;
}
.slide.is-near { opacity: .85; transform: scale(.9); }
.slide.is-active { opacity: 1; transform: scale(1); pointer-events: auto; box-shadow: var(--shadow); }
.slide.is-active:hover { transform: scale(1) translateY(-4px); }

/* ---------- GitHub calendar (dynamic) ---------- */
.gh-contrib__controls { display: flex; align-items: center; gap: 16px; }
.gh-contrib__year {
  font-family: var(--mono); font-size: .78rem; color: var(--ink-soft);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px;
  padding: 6px 10px; cursor: pointer;
}
.gh-cal { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 12px); grid-auto-columns: 12px; gap: 3px; min-width: 680px; }
.gh-cal i { width: 12px; height: 12px; border-radius: 3px; background: #ebedf0; }
.gh-cal i.lvl-1 { background: rgba(47, 75, 220, .30); }
.gh-cal i.lvl-2 { background: rgba(47, 75, 220, .50); }
.gh-cal i.lvl-3 { background: rgba(47, 75, 220, .72); }
.gh-cal i.lvl-4 { background: var(--accent); }
.gh-contrib__legend { display: flex; align-items: center; gap: 5px; justify-content: flex-end; margin-top: 14px; font-family: var(--mono); font-size: .7rem; color: var(--muted); }
.gh-contrib__legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; background: #ebedf0; }
.gh-contrib__legend .lvl-1 { background: rgba(47, 75, 220, .30); }
.gh-contrib__legend .lvl-2 { background: rgba(47, 75, 220, .50); }
.gh-contrib__legend .lvl-3 { background: rgba(47, 75, 220, .72); }
.gh-contrib__legend .lvl-4 { background: var(--accent); }
.gh-contrib__loading { font-family: var(--mono); font-size: .8rem; color: var(--muted); }
@media (prefers-color-scheme: dark) { .gh-cal i, .gh-contrib__legend i { background: #26262a; } }

/* ---------- GitHub calendar: months, totals, streaks ---------- */
.gh-contrib__total { font-family: var(--mono); font-size: .8rem; font-weight: 500; color: var(--accent); margin-left: 8px; }
.gh-cal-wrap { display: inline-block; }
.gh-months { display: grid; gap: 3px; height: 15px; margin-bottom: 5px; font-family: var(--mono); font-size: .62rem; color: var(--muted); }
.gh-months span { grid-row: 1; white-space: nowrap; }
.gh-contrib__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px 28px; margin-top: 16px; flex-wrap: wrap; }
.gh-stats { display: flex; gap: 26px; font-family: var(--mono); font-size: .76rem; color: var(--muted); }
.gh-stats b { color: var(--ink); font-weight: 600; }
@media (max-width: 680px) { .gh-stats { gap: 16px; font-size: .68rem; } }

/* ---------- Work card: blurred background fill (show full image) ---------- */
.work-card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.work-card__media::before {
  content: ""; position: absolute; inset: 0;
  background-image: var(--img); background-size: cover; background-position: center;
  filter: blur(22px) brightness(.55) saturate(1.15); transform: scale(1.25); z-index: 0;
}
.work-card__media--empty::before { display: none; }
.work-card__media img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; }
.work-card:hover .work-card__media img { transform: scale(1.02); }

/* ---------- Section lead/description ---------- */
.section__lead { color: var(--ink-soft); font-size: 1.08rem; max-width: 62ch; margin: -18px 0 34px; }

/* ---------- Logo thumbnails: white background ---------- */
.work-card__media--logo { background: #ffffff; }
.work-card__media--logo::before { display: none; }
.work-card__media--logo img { object-fit: contain; padding: 13% 16%; }

/* ---------- Featured In (media strip) ---------- */
.featured-in { padding: 6px 0 clamp(18px, 3.5vw, 38px); }
.featured-in__label { text-align: center; font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 22px; }
.featured-in__logos { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 30px 46px; }
.featured-in__logos a { display: inline-flex; }
.featured-in__logos img { height: 30px; width: auto; opacity: .55; filter: grayscale(1); transition: opacity .2s ease, filter .2s ease; }
.featured-in__logos a:hover img { opacity: 1; filter: none; }
@media (max-width: 680px) { .featured-in__logos { gap: 20px 30px; } .featured-in__logos img { height: 23px; } }
@media (prefers-color-scheme: dark) { .featured-in__logos img { filter: grayscale(1) brightness(0) invert(1); opacity: .55; } .featured-in__logos a:hover img { filter: none; } }

/* ---------- Impact in education ---------- */
.impact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.impact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px 26px; }
.impact-card__title { font-size: 1.18rem; letter-spacing: -0.02em; margin-bottom: 10px; }
.impact-card p { color: var(--muted); font-size: .98rem; margin: 0; }
@media (max-width: 820px) { .impact-grid { grid-template-columns: 1fr; gap: 16px; } }

/* ---------- Impact cards as links + optional media ---------- */
.impact-card { display: block; padding: 0; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.impact-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.impact-card__media { aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.impact-card__media img { width: 100%; height: 100%; object-fit: cover; }
.impact-card__body { padding: 24px 24px 26px; }
.impact-card__body p { color: var(--muted); font-size: .98rem; margin: 0; }

/* ---------- Award thumbnail (optional) ---------- */
.award-item__media { flex: 0 0 auto; width: 54px; height: 54px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.award-item__media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Certifications (post-driven) ---------- */
.cert-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.cert-card { display: flex; align-items: center; gap: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.cert-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.cert-card__media { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #fff; display: flex; align-items: center; justify-content: center; }
.cert-card__media img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.cert-card__title { font-size: 1.08rem; letter-spacing: -0.02em; margin-bottom: 4px; }
.cert-card__body p { color: var(--muted); font-size: .92rem; margin: 0; }
@media (max-width: 680px) { .cert-grid { grid-template-columns: 1fr; } }

/* ---------- Work cards: uniform (apple-to-apple) ---------- */
.work-grid { align-items: stretch; }
.work-card { height: 100%; }
.work-card__body { flex: 1; display: flex; flex-direction: column; padding: 22px 24px 24px; }
.work-card__title { font-size: 1.28rem; margin-bottom: 12px; }
.work-card__tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 14px; padding: 0; list-style: none; }
.work-card__tags li {
  font-family: var(--mono); font-size: .64rem; letter-spacing: .05em; text-transform: uppercase;
  color: var(--ink-soft); background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 999px; padding: .32em .64em;
}
.work-card__excerpt {
  color: var(--muted); font-size: .96rem; margin: 0 0 18px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  min-height: calc(1.5em * 3);
}
.work-card__link { margin-top: auto; font-size: .9rem; font-weight: 500; color: var(--accent); }

/* ---------- Event Documentation gallery ---------- */
.section__head--center { justify-content: center; text-align: center; }
.gallery__sub { text-align: center; color: var(--ink-soft); max-width: 48ch; margin: -22px auto 34px; font-size: 1.05rem; }
.gallery { position: relative; max-width: 920px; margin: 0 auto; }
.gallery__frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden; background: #000; box-shadow: var(--shadow); cursor: zoom-in; }
.gallery__slides { position: absolute; inset: 0; }
.gallery__slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .7s ease; }
.gallery__slide.is-active { opacity: 1; }
.gallery__overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.62), transparent 55%); pointer-events: none; }
.gallery__caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 28px; color: #fff; }
.gallery__badge { display: inline-block; font-family: var(--mono); font-size: .62rem; letter-spacing: .06em; text-transform: uppercase; padding: .35em .7em; border-radius: 999px; margin-bottom: 10px; }
.gallery__badge--org { background: rgba(47,75,220,.85); }
.gallery__badge--part { background: rgba(16,150,96,.85); }
.gallery__event { font-size: 1.3rem; letter-spacing: -0.02em; margin: 0 0 2px; }
.gallery__alt { font-size: .9rem; color: rgba(255,255,255,.82); margin: 0; }
.gallery__toggle { position: absolute; top: 14px; right: 14px; z-index: 3; font-family: var(--mono); font-size: .72rem; background: rgba(255,255,255,.9); color: #15151a; border: 0; border-radius: 999px; padding: .5em .9em; cursor: pointer; }
.gallery__toggle:hover { background: #fff; }
.gallery__nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: #15151a; font-size: 1.05rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform .2s ease, background .2s ease; }
.gallery__nav:hover { background: #fff; transform: translateY(-50%) scale(1.08); }
.gallery__nav--prev { left: 14px; }
.gallery__nav--next { right: 14px; }
.gallery__thumbs { display: flex; gap: 10px; overflow-x: auto; padding: 18px 2px 6px; scrollbar-width: none; }
.gallery__thumbs::-webkit-scrollbar { display: none; }
.gallery__thumb { flex: 0 0 auto; width: 92px; height: 60px; border-radius: 10px; overflow: hidden; border: 0; padding: 0; cursor: pointer; opacity: .55; outline: 2px solid transparent; outline-offset: 2px; transition: opacity .2s ease, outline-color .2s ease, transform .2s ease; }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb:hover { opacity: 1; }
.gallery__thumb.is-active { opacity: 1; outline-color: var(--accent); transform: translateY(-2px); }
.gallery__dots { display: flex; justify-content: center; gap: 7px; margin-top: 14px; }
.gallery__dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: var(--line-strong); cursor: pointer; transition: width .25s ease, background .2s ease; }
.gallery__dot.is-active { width: 26px; background: var(--accent); }
@media (max-width: 680px) { .gallery__event { font-size: 1.1rem; } .gallery__nav { width: 38px; height: 38px; } .gallery__thumb { width: 72px; height: 48px; } }

/* Lightbox */
.gallery-lightbox { position: fixed; inset: 0; z-index: 999; background: rgba(8,8,10,.92); display: flex; align-items: center; justify-content: center; padding: 4vw; }
.gallery-lightbox__img { max-width: 92vw; max-height: 88vh; border-radius: 12px; box-shadow: 0 20px 80px rgba(0,0,0,.6); }
.gallery-lightbox__close { position: absolute; top: 18px; right: 22px; background: none; border: 0; color: #fff; font-size: 2.4rem; line-height: 1; cursor: pointer; }
.gallery-lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 1.3rem; cursor: pointer; }
.gallery-lightbox__nav:hover { background: rgba(255,255,255,.28); }
.gallery-lightbox__prev { left: 3vw; }
.gallery-lightbox__next { right: 3vw; }

/* ---------- Credly certification badges ---------- */
.cert-credly { display: flex; flex-wrap: wrap; gap: 28px 36px; align-items: flex-start; }
.cert-credly iframe { border: 0; width: 200px; height: 340px; max-width: none; }

/* ---------- Certification cards with badge artwork (full title, no truncation) ---------- */
.cert-card { align-items: center; gap: 20px; padding: 20px 22px; }
.cert-card__badge { flex: 0 0 auto; width: 92px; height: 92px; object-fit: contain; }
.cert-card__title { font-size: 1.15rem; margin-bottom: 4px; white-space: normal; overflow: visible; text-overflow: clip; }
.cert-card__body p { color: var(--muted); font-size: .92rem; margin: 0 0 8px; }
.cert-card__verify { font-family: var(--mono); font-size: .76rem; font-weight: 500; color: var(--accent); }
.cert-card:hover .cert-card__verify { text-decoration: underline; }
@media (max-width: 680px) { .cert-card__badge { width: 76px; height: 76px; } }

/* ---------- YC inline icon ---------- */
.yc-icon { height: 0.95em; width: 0.95em; vertical-align: -0.13em; border-radius: 3px; margin: 0 0.06em 0 0.04em; display: inline-block; }

/* ---------- Work card YC logo badge ---------- */
.work-card__meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.work-card__meta .work-card__tags { margin: 0; }
.work-card__yc { height: 19px; width: auto; display: block; }
