:root {
  --bg: #0b0f14;
  --surface: #0f1621;
  --surface-2: #111c2b;
  --text: #e9f0ff;
  --muted: rgba(233, 240, 255, .72);
  --border: rgba(233, 240, 255, .12);

  --accent: #7c3aed;
  /* neon violet */
  --accent-2: #22d3ee;
  /* neon cyan */
  --danger: #fb7185;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);

  --space-0: 3px;
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 14px;
  --space-4: 20px;
  --space-5: 28px;
  --space-6: 40px;

  /* Global horizontal gutters: mobile-first */
  --gutter: var(--space-3);

  /* Viewport width excluding scrollbar (prevents container/gallery mismatch) */
  --viewport-w: calc(100vw - (100vw - 100%));

  --font-sans: "Google Sans", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  --font-serif: "Abhaya Libre", "DM Serif Text", ui-serif, Georgia, "Times New Roman", Times, serif;
  --font-body: var(--font-serif);
  --font-header: var(--font-sans);

  --w-300: 300;
  --w-400: 400;
  --w-500: 500;
  --w-600: 600;
  --w-700: 700;

  --w-body: var(--w-300);
  --w-muted: var(--w-300);
  --w-header: var(--w-600);
  --w-kicker: var(--w-600);

  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --logo-size: 66px;
  --icon-size: 32px;

  --max: 1080px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

html {
  overflow-x: clip;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1400px 900px at 70% 4%, rgba(124, 58, 237, .22), transparent 70%),
    radial-gradient(1200px 800px at 12% 16%, rgba(34, 211, 238, .18), transparent 72%),
    radial-gradient(1500px 950px at 88% 38%, rgba(34, 211, 238, .10), transparent 74%),
    radial-gradient(1700px 1100px at 18% 55%, rgba(124, 58, 237, .10), transparent 76%),
    radial-gradient(1600px 1000px at 92% 72%, rgba(34, 211, 238, .08), transparent 76%),
    radial-gradient(1800px 1200px at 10% 88%, rgba(124, 58, 237, .08), transparent 78%),
    linear-gradient(180deg, rgba(11, 15, 20, 0) 0%, rgba(11, 15, 20, .20) 40%, rgba(11, 15, 20, 0) 100%),
    var(--bg);
  background-repeat: no-repeat;
  background-attachment: scroll;
  color: var(--text);
  font-family: var(--font-body);
  font-weight: var(--w-body);
  line-height: 1.45;
  overflow-x: clip;
}

.h1,
.h2,
.section-title,
.card-kicker,
.kv__label,
.nav-link,
.btn,
.chip {
  font-family: var(--font-sans);
}


.lang-switch {
  font-family: var(--font-sans) !important;
}

.h1,
.h2 {
  font-weight: var(--w-header);
}

ul,
ol,
p {
  margin: 0;
}

.overview {
  font-family: var(--font-sans);
}

.section-title,
.card-kicker,
.kv__label {
  font-weight: var(--w-kicker);
}

.muted {
  color: var(--muted);
  font-weight: var(--w-muted);
}

.fw-300 {
  font-weight: var(--w-300);
}

.fw-400 {
  font-weight: var(--w-400);
}

.fw-500 {
  font-weight: var(--w-500);
}

.fw-600 {
  font-weight: var(--w-600);
}

.fw-700 {
  font-weight: var(--w-700);
}

.card-kicker,
.section-title,
.kv__label {
  letter-spacing: .14em;
}


a {
  color: inherit;
}

.link-out {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: transform .15s ease, text-shadow .15s ease, color .15s ease, opacity .15s ease;
}

.link-out__icon {
  width: 20px;
  height: 20px;
  opacity: .65;
  flex: 0 0 auto;
}

.link-out:hover {
  color: var(--text);
  text-shadow: 0 0 14px rgba(34, 211, 238, .18);
  transform: translateY(-1px);
}

.link-out:hover .link-out__icon {
  opacity: .95;
}

.card-kicker {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: var(--space-4);
  top: var(--space-4);
  width: auto;
  height: auto;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  z-index: 999;
}

.container {
  width: min(var(--max), calc(var(--viewport-w) - 2*var(--gutter)));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: transparent;
  border-bottom: none;
  padding: var(--space-3) 0;
}


.site-header>.container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-3);
  padding: 0;
}

.header-spacer {
  min-width: 1px;
}

.site-nav {
  display: flex;
  gap: var(--space-4);
  justify-self: center;
}

.nav-link {
  text-decoration: none;
  padding: 6px 8px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  transition: border-color .15s ease, color .15s ease, transform .15s ease;
}

.nav-link:hover {
  color: var(--text);
  border-bottom-color: rgba(233, 240, 255, .22);
  transform: translateY(-1px);
}

.nav-link[aria-current="page"] {
  color: var(--text);
  border-bottom-color: rgba(34, 211, 238, .65);
}

.site-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.lang-switch {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 0;
  font: inherit;
  letter-spacing: .08em;
  cursor: pointer;
  transition: color .15s ease, transform .15s ease, text-shadow .15s ease;
}

.lang-switch:hover {
  color: var(--text);
  transform: translateY(-1px);
  text-shadow: 0 0 18px rgba(34, 211, 238, .18);
}

.lang-switch:focus-visible {
  outline: 2px solid rgba(34, 211, 238, .35);
  outline-offset: 6px;
  border-radius: 6px;
}

.btn {
  appearance: none;
  border: none;
  background: #ffffffd6;
  color: #0b0f14;
  border-radius: 9px;
  font-weight: 500;
  padding: 10px 14px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-1px);
  background: #ffffff;
  /* box-shadow: 1px 1px 16px 9px rgba(17,28,43,.85), 0 0 22px rgba(34,211,238,.10); */
}

.btn:active {
  transform: translateY(0px);
}

.btn[aria-pressed="true"] {
  background: #ffffff;
  /* box-shadow: 1px 1px 16px 9px rgba(17,28,43,.90), 0 0 0 2px rgba(34,211,238,.30); */
}

:focus-visible {
  outline: 2px solid rgba(34, 211, 238, .9);
  outline-offset: 3px;
}

main {
  flex: 1 0 auto;
  padding-bottom: var(--space-6);
}

.card {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .01));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero {
  padding: var(--space-4);
  position: relative;
  overflow: hidden;
}

.hero-about {
  display: grid;
  gap: var(--space-1);
  margin-top: var(--space-3);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: radial-gradient(600px 220px at 20% 10%, rgba(124, 58, 237, .28), transparent 60%),
    radial-gradient(500px 220px at 80% 20%, rgba(34, 211, 238, .18), transparent 60%);
  filter: blur(0px);
  opacity: .9;
  pointer-events: none;
}

.hero>* {
  position: relative;
}

.h1 {
  font-size: 32px;
  line-height: 1.1;
  margin: 0 0 var(--space-2);
}

.h2 {
  font-size: 18px;
  line-height: 1.25;
  margin: var(--space-2) 0 var(--space-1);
}

.p {
  margin: 0;
  color: var(--muted);
}

.stack {
  display: grid;
  gap: var(--space-3);
}

.panel {
  box-shadow: none;
}

.panel__inner {
  padding: var(--space-4);
}

.panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  border: none;
  background: #ffffffd6;
  color: #0b0f14;
  border-radius: 9px;
  font-weight: 500;
  padding: 10px 14px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.chip:hover {
  transform: translateY(-1px);
  background: #ffffff;
  /* box-shadow: 1px 1px 16px 9px rgba(17,28,43,.85), 0 0 22px rgba(34,211,238,.10); */
}

.chip--muted {
  opacity: .92;
}

.kv {
  display: grid;
  gap: 4px;
  border-bottom: 1px solid var(--border);
}

.kv:last-child {
  border-bottom: none;
}

.kv__label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
}

.kv__value {
  font-size: 16px;
  color: var(--text);
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

section {
  display: flex;
  flex-direction: column;

  gap: var(--space-2);
}

.section-title {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted);
  margin: var(--space-6) 0 0;
}

.carousel {
  display: grid;
  gap: var(--space-2);
  overflow: visible;
  /* Contain width to parent so dots center correctly even when gallery overflows */
  width: 100%;
  max-width: 100%;
}

.gallery {
  display: flex;
  overflow-x: auto;
  gap: calc(var(--space-4));
  /* Cross-axis clipping is common when one axis is scrollable.
    Keep layout spacing tight, but reserve independent internal paint room
    for glows via padding + negative margin that cancels in flow. */
  --glow-room: 28px;
  padding-top: calc(var(--space-2) + 2 * var(--glow-room));
  padding-bottom: calc(var(--space-2) + var(--glow-room));
  margin-top: calc(-1 * var(--space-2) - 2 * var(--glow-room));
  margin-bottom: calc(-1 * var(--glow-room));
  scroll-snap-type: x mandatory;
  --card-basis: min(360px, calc(100dvw - 2*var(--gutter)));
  /* Keep the first card aligned to the main `.container` left edge.
     On narrow viewports use a small inset; on wide viewports compute the
     container offset and add the standard horizontal padding. */
  --gallery-inset: max(var(--gutter), calc((var(--viewport-w) - var(--max)) / 2));
  --gallery-inset-scroll: max(var(--gutter), calc((var(--viewport-w) - var(--max) - var(--gutter)) / 2));
  padding-left: var(--gallery-inset);
  scroll-padding-inline: calc(var(--gallery-inset-scroll));
  padding-right: var(--gallery-inset);
  margin-left: calc(-1 * var(--gallery-inset));

  /* Allow the LAST card to scroll all the way to the left inset again */
  --gallery-trailing: max(0px, calc(var(--viewport-w) - var(--gallery-inset) - var(--card-basis)));

  /* Hide scrollbar UI (keep scroll behavior) */
  scrollbar-width: none;
}

.gallery::after {
  content: "";
  flex: 0 0 var(--gallery-trailing);
}

@supports not (width: 100dvw) {
  .gallery {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    --card-basis: min(360px, calc(var(--viewport-w) - var(--gutter)));
  }
}

.gallery--lg {
  --card-basis: min(620px, calc(var(--viewport-w) - var(--gutter)));
}

@supports not (width: 100dvw) {
  .gallery--lg {
    --card-basis: min(620px, calc(var(--viewport-w) - var(--gutter)));
  }
}

.gallery::-webkit-scrollbar {
  display: none;
}

.gallery-card {
  flex: 0 0 var(--card-basis);
  scroll-snap-align: start;
  
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15, 22, 33, .7);
  position: relative;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transform: translateY(0) scale(1);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.card-nav {
  margin-top: auto;
  padding-top: var(--space-3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
}

.gallery-card.is-active:hover .card-nav {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.card-nav__spacer {
  width: 34px;
  height: 34px;
}

.card-nav__btn {
  appearance: none;
  border: 1px solid rgba(233, 240, 255, .12);
  background: rgba(255, 255, 255, .03);
  color: var(--muted);
  border-radius: 999px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.card-nav__btn:hover {
  transform: translateY(-1px);
  color: var(--text);
  border-color: rgba(34, 211, 238, .28);
  background: rgba(34, 211, 238, .06);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, .12), 0 10px 24px rgba(0, 0, 0, .35);
}

.card-nav__btn:active {
  transform: translateY(0px);
}

.card-nav__icon {
  width: 18px;
  height: 18px;
}

.gallery-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  background:
    radial-gradient(var(--g1-sx, 420px) var(--g1-sy, 180px) at var(--g1-x, 25%) var(--g1-y, 10%), var(--g1-c, rgba(124, 58, 237, .16)), transparent 65%),
    radial-gradient(var(--g2-sx, 360px) var(--g2-sy, 170px) at var(--g2-x, 85%) var(--g2-y, 35%), var(--g2-c, rgba(34, 211, 238, .10)), transparent 68%),
    radial-gradient(var(--g3-sx, 340px) var(--g3-sy, 160px) at var(--g3-x, 45%) var(--g3-y, 85%), var(--g3-c, rgba(251, 113, 133, .10)), transparent 70%),
    radial-gradient(var(--g4-sx, 300px) var(--g4-sy, 150px) at var(--g4-x, 10%) var(--g4-y, 55%), var(--g4-c, rgba(34, 211, 238, .00)), transparent 72%);
  opacity: 0;
  transition: opacity .18s ease;
  pointer-events: none;
}

.gallery-card:hover {
  /* transform: translateY(-3px) scale(1.01); */
  border-color: rgba(233, 240, 255, .18);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .46), 0 0 0 1px rgba(34, 211, 238, .16),
    0 0 24px rgba(34, 211, 238, .14), 0 0 32px rgba(124, 58, 237, .10);
}

.gallery-card:hover::before {
  opacity: .55;
}

.gallery-card.is-active {
  /* transform: translateY(-6px) scale(1.03); */
  border-color: rgba(34, 211, 238, .35);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .50), 0 0 0 1px rgba(34, 211, 238, .16),
    0 0 40px rgba(34, 211, 238, .18), 0 0 55px rgba(124, 58, 237, .14);
}

.gallery-card.is-active::before {
  opacity: 1;
}

.carousel-dots {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  width: min(var(--max), calc(var(--viewport-w) - 2*var(--gutter)));
  padding: 0;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 1px solid rgba(233, 240, 255, .18);
  background: rgba(233, 240, 255, .12);
  cursor: pointer;
  padding: 0;
  transition: transform .16s ease, background-color .16s ease, border-color .16s ease;
}

.carousel-dot:hover {
  transform: scale(1.55);
  border-color: rgba(34, 211, 238, .35);
  background: rgba(34, 211, 238, .20);
}

.carousel-dot[aria-current="true"] {
  transform: scale(1.65);
  border-color: rgba(34, 211, 238, .55);
  background: linear-gradient(135deg, rgba(124, 58, 237, .55), rgba(34, 211, 238, .45));
}

.card-row {
  display: flex;
  gap: var(--space-3);
  align-items: stretch;
  margin-bottom: var(--space-3);
  min-height: var(--card-head-h);
}

.card-row__body {
  min-width: 0;
}

.card-head {
  align-items: flex-start;
}

.card-head__body {
  width: 100%;
}

.card-head__top {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  align-items: center;
}

.card-head__org {
  flex: 1;
  min-width: 0;
}

.card-head__main {
  margin-top: 2px;
}

.card-head__label {
  font-family: var(--font-header);
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 2px;
  min-width: 120px;
}

.card-head__title {
  margin: 0;
}

.card-head__sub {
  margin-top: 2px;
  font-size: 16px;
  line-height: 1.25;
  font-family: var(--font-sans);
}

.card-head__meta {
  margin-left: auto;
  text-align: right;
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
  font-family: var(--font-header);
  letter-spacing: .10em;
  font-size: 12px;
  font-weight: var(--w-kicker);
  align-self: flex-start;
  text-transform: capitalize;
}

.card-head__duration {
  font-weight: var(--w-700);
}

.card-head__range {
  font-weight: var(--w-400);
}

.logo--exp {
  border-radius: 16px;
}

.exp-text {
  margin: 0 0 var(--space-3);
  color: var(--muted);
  line-height: 1.55;
  max-width: none;
}

.exp-highlights {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.logo {
  height: var(--logo-size);
  width: var(--logo-size);
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .03);
  object-fit: contain;
  flex: 0 0 auto;
}

.ref-photo {
  height: var(--logo-size);
  width: var(--logo-size);
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .03);
  object-fit: cover;
  flex: 0 0 auto;
}

.logo--placeholder {
  background: radial-gradient(18px 18px at 30% 30%, rgba(34, 211, 238, .35), transparent 65%),
    radial-gradient(22px 18px at 70% 60%, rgba(124, 58, 237, .35), transparent 65%),
    rgba(255, 255, 255, .03);
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.icon-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.icon-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.icon-label {
  color: var(--muted);
  font-size: 16px;
  font-family: var(--font-header);
  letter-spacing: .06em;
}

.icon-notes {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
  font-family: var(--font-body);
  letter-spacing: 0;
}

.logo.logo--skill {
  height: var(--icon-size);
  width: var(--icon-size);
  border-radius: 7px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.1);
  padding: var(--space-0);
  object-fit: contain;
  object-position: center;
  flex: 0 0 auto;
}

.list {
  padding-left: 18px;
  color: var(--muted);
  font-weight: var(--w-muted);
}

.grid-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.page-head {
  padding-top: var(--space-2);
}

.page-head .h1 {
  margin-bottom: var(--space-2);
}

.card-link {
  text-decoration: none;
}

.card-link:hover {
  border-color: rgba(34, 211, 238, .28);
}

.project-card {
  padding: var(--space-4);
}

.project-card--inactive {
  border-color: rgba(233, 240, 255, .08);
  background: linear-gradient(180deg, rgba(255, 255, 255, .02), rgba(255, 255, 255, .008));
  cursor: default;
}

.project-card--inactive .logo--project {
  opacity: .9;
  filter: saturate(.9);
}

.project-card__head {
  margin-bottom: 0;
  min-height: auto;
}

.card-head__label--compact {
  min-width: 0;
}

.logo--project-lg {
  width: 64px;
  height: 64px;
}

.project-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.meta-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(233, 240, 255, .16);
  background: rgba(255, 255, 255, .03);
  color: var(--muted);
  font-family: var(--font-sans);
  font-weight: var(--w-kicker);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(233, 240, 255, .16);
  background: rgba(255, 255, 255, .03);
  color: rgba(233, 240, 255, .86);
  font-family: var(--font-sans);
  font-weight: var(--w-kicker);
  font-size: 12px;
  letter-spacing: .06em;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: var(--space-2) 0 var(--space-3);
  color: var(--muted);
  text-decoration: none;
  font-family: var(--font-sans);
  letter-spacing: .08em;
  transition: color .15s ease, transform .15s ease, text-shadow .15s ease;
}

.back-link:hover {
  color: var(--text);
  transform: translateY(-1px);
  text-shadow: 0 0 14px rgba(34, 211, 238, .14);
}

.back-link .card-nav__icon {
  width: 16px;
  height: 16px;
}

.project-card__top {
  display: flex;
  gap: var(--space-3);
  align-items: center;
}

.project-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .03);
  flex: 0 0 auto;
}

.project-icon--lg {
  width: 64px;
  height: 64px;
  border-radius: 22px;
}

.project-hero {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.project-hero--desktop {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.project-hero__row {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.project-hero--mobile {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.project-hero__head {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.project-hero__titles {
  display: flex;
  flex-direction: column;
  gap: var(--space-0);
  min-width: 0;
}

.project-hero__name {
  margin: 0;
}

.project-hero__desc {
  margin: 0;
}

.shot-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.shot {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .03);
}

:root {
  --shot-max-h: 280px;
}

.gallery--shots {
  /* Use fixed card width like About galleries so scroll math works reliably */
  --card-basis: min(320px, calc(var(--viewport-w) - 2*var(--gutter)));
}

.gallery-card--shot {
  flex: 0 0 var(--card-basis);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
}

/* For image-only cards, keep the same nav UX but overlay it on the image. */
.gallery-card--shot .card-nav {
  position: absolute;
  left: var(--space-4);
  right: var(--space-4);
  bottom: var(--space-4);
  margin-top: 0;
  padding-top: 0;
  z-index: 3;
}

.gallery-card--shot .card-nav__btn {
  /* Higher contrast over images but same base styling */
  border-color: rgba(233, 240, 255, .22);
  background: rgba(11, 15, 20, .55);
  color: rgba(233, 240, 255, .92);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .35);
  backdrop-filter: blur(6px);
}

.gallery-card--shot .card-nav__btn:hover {
  /* Match About hover: lift, cyan accent border, glow */
  transform: translateY(-1px);
  color: var(--text);
  border-color: rgba(34, 211, 238, .28);
  background: rgba(34, 211, 238, .12);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, .12), 0 10px 24px rgba(0, 0, 0, .35);
}

/* Dots: use default centered behavior from base .carousel-dots */

.shot--carousel {
  display: block;
  width: 100%;
  height: auto;
  border: none;
  border-radius: 0;
  background: transparent;
}

/* Screenshot grid (masonry via CSS columns) */
.screenshots-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.screenshots-grid-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.section-subtitle {
  font-family: var(--font-sans);
  font-weight: var(--w-kicker);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(233, 240, 255, .78);
}

.screenshot-grid {
  columns: 320px;
  column-gap: var(--space-3);
}

.screenshot-grid__item {
  break-inside: avoid;
  margin-bottom: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transform: translateY(0);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.screenshot-grid__item:hover {
  border-color: rgba(233, 240, 255, .18);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .46), 0 0 0 1px rgba(34, 211, 238, .16),
    0 0 24px rgba(34, 211, 238, .14), 0 0 32px rgba(124, 58, 237, .10);
}

.screenshot-grid__img {
  display: block;
  width: 100%;
  height: auto;
}

/* Lightbox overlay */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: var(--space-4);
  animation: lightbox-in .2s ease;
}

@keyframes lightbox-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox__content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 94vw;
  max-height: 84vh;
}

.lightbox__img {
  max-width: min(90vw, 1200px);
  max-height: 80vh;
  border-radius: var(--radius);
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
  user-select: none;
}

.lightbox__close {
  position: fixed;
  top: var(--space-4);
  right: var(--space-4);
  z-index: 210;
  appearance: none;
  border: 1px solid rgba(233, 240, 255, .22);
  background: rgba(11, 15, 20, .55);
  color: rgba(233, 240, 255, .92);
  border-radius: 999px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform .15s ease, border-color .15s ease, background-color .15s ease, color .15s ease;
}

.lightbox__close svg {
  width: 20px;
  height: 20px;
}

.lightbox__close:hover {
  transform: scale(1.1);
  color: var(--text);
  border-color: rgba(34, 211, 238, .28);
  background: rgba(34, 211, 238, .12);
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  appearance: none;
  border: 1px solid rgba(233, 240, 255, .22);
  background: rgba(11, 15, 20, .55);
  color: rgba(233, 240, 255, .92);
  border-radius: 999px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .35);
  transition: transform .15s ease, border-color .15s ease, background-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.lightbox__nav--prev { left: var(--space-3); }
.lightbox__nav--next { right: var(--space-3); }

.lightbox__nav:hover {
  transform: translateY(-50%) scale(1.1);
  color: var(--text);
  border-color: rgba(34, 211, 238, .28);
  background: rgba(34, 211, 238, .12);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, .12), 0 10px 24px rgba(0, 0, 0, .35);
}

.lightbox__nav .card-nav__icon {
  width: 20px;
  height: 20px;
}

.lightbox__dots {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin-top: var(--space-4);
}


.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-5) 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
}

@media (min-width: 760px) {
  :root {
    --gutter: var(--space-4);
    --shot-max-h: 440px;
  }

  main {
    padding: var(--space-5) 0;
  }

  .hero {
    padding: var(--space-6);
  }

  .h1 {
    font-size: 46px;
  }

  .grid {
    grid-template-columns: 1.2fr .8fr;
  }

  .icon-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery {
    /* For some reason, I need to add 3px to the width for it to go fully to the edge...*/
    width: calc(100dvw + 3px);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}