/* Palette extracted from the profile monogram and LinkedIn banner (assets/brand). */
:root {
  --bg: #f7f3ec;
  --surface: #fffdf9;
  --text: #2e211c;
  --muted: #6b5850;
  --line: #e6ddd2;
  --primary: #a3523c;
  --on-primary: #fffdf9;
  --secondary: #3f5a46;
  --accent: #e48273;
  --sage: #97b39f;
  --blush: #f3d9cf;
  --mint: #dbe7de;
  --shadow: 0 1px 2px rgb(46 33 28 / .04), 0 8px 24px rgb(46 33 28 / .06);

  --font: "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-hand: "Caveat", cursive;
  --radius: 18px;
  --wrap: 960px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1b1614; --surface: #26201d; --text: #f4ece4; --muted: #bfaea5; --line: #3a312c;
    --primary: #eba08e; --on-primary: #1b1614; --secondary: #9dbca6; --accent: #e48273; --sage: #415a47;
    --blush: #3a2722; --mint: #23302a; --shadow: 0 1px 2px rgb(0 0 0 / .2), 0 8px 24px rgb(0 0 0 / .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1b1614; --surface: #26201d; --text: #f4ece4; --muted: #bfaea5; --line: #3a312c;
  --primary: #eba08e; --on-primary: #1b1614; --secondary: #9dbca6; --accent: #e48273; --sage: #415a47;
  --blush: #3a2722; --mint: #23302a; --shadow: 0 1px 2px rgb(0 0 0 / .2), 0 8px 24px rgb(0 0 0 / .25);
  color-scheme: dark;
}

:lang(ar) { --font: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, sans-serif; --font-display: "IBM Plex Sans Arabic", serif; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1rem/1.7 var(--font);
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 500; line-height: 1.2; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; inset-inline-start: 1rem; top: -3rem; background: var(--surface); padding: .5rem 1rem; border-radius: 99px; z-index: 50; }
.skip:focus { top: 1rem; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 1rem;
  padding: .9rem max(16px, calc((100% - 1040px) / 2));
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__logo img { width: 40px; height: 40px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); }
.nav__links { display: flex; gap: .25rem; margin-inline-start: auto; }
.nav__links a {
  text-decoration: none; font-size: .9rem; color: var(--muted);
  padding: .35rem .75rem; border-radius: 99px; transition: color .2s, background-color .2s;
}
.nav__links a:hover { color: var(--text); }
.nav__links a.is-active { color: var(--primary); background: var(--blush); }
.nav__tools { display: flex; gap: .4rem; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center; flex: none;
  border: 1px solid var(--line); border-radius: 50%; background: var(--surface);
  cursor: pointer; transition: transform .2s var(--ease), border-color .2s;
  font-family: "IBM Plex Sans Arabic", sans-serif; font-weight: 600;
}
.icon-btn:hover { border-color: var(--primary); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn .i-moon { fill: currentColor; stroke: none; }
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: block; }
:root[data-theme="dark"] .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: block; }
  :root:not([data-theme="light"]) .i-moon { display: none; }
}
.nav__menu { display: none; }

@media (max-width: 860px) {
  .nav__menu { display: grid; }
  .nav__links {
    position: absolute; inset-inline: 16px; top: calc(100% + 6px);
    flex-direction: column; padding: .5rem; margin: 0;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(-6px); transition: .25s var(--ease);
  }
  .nav__links.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__links a { padding: .7rem 1rem; font-size: 1rem; }
  .nav__tools { margin-inline-start: auto; }
}

/* Layout */
main { padding-inline: 16px; }
.section, .hero { max-width: var(--wrap); margin-inline: auto; }
.section { padding-block: 4.5rem 1rem; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.section__head h2, .hero__name { font-family: var(--font-display); }
.section__head h2 { font-size: clamp(1.9rem, 4vw, 2.4rem); }
.sub { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin: 2.5rem 0 1rem; }
:lang(ar) .sub { letter-spacing: 0; font-size: .95rem; }

.hand { font-family: var(--font-hand); font-size: 1.5rem; color: var(--primary); line-height: 1.1; }
.hand--small { font-size: 1.2rem; color: var(--muted); }
:lang(ar) .hand { font-family: var(--font); font-size: 1.05rem; }
:lang(ar) .hand--small { font-size: .9rem; }

/* Hero */
.hero { padding-block: clamp(3rem, 9vw, 6rem) 1rem; }
.hero .hand { display: inline-flex; align-items: center; gap: .4rem; }
.hero .hand::before { content: "↘"; font-family: var(--font); font-size: 1rem; }
:lang(ar) .hero .hand::before { content: "↙"; }
.hero__name { font-size: clamp(2.8rem, 9vw, 4.6rem); font-weight: 500; letter-spacing: -.01em; margin-top: .3rem; }
:lang(ar) .hero__name { font-weight: 600; letter-spacing: 0; }
.hero__tagline { color: var(--muted); margin-top: .5rem; font-size: .95rem; letter-spacing: .12em; text-transform: uppercase; }
:lang(ar) .hero__tagline { letter-spacing: 0; text-transform: none; }
.star { color: var(--accent); display: inline-block; }
.hero__meta { color: var(--muted); font-size: .9rem; margin-top: .35rem; }
.hero__about { font-size: clamp(1.1rem, 2.4vw, 1.3rem); margin-top: 1.75rem; max-width: 36em; }

.now { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem 2rem; margin: 2.25rem 0 0; }
.now dt { font-family: var(--font-hand); font-size: 1.3rem; color: var(--secondary); }
:lang(ar) .now dt { font-family: var(--font); font-size: .9rem; font-weight: 600; }
.now dd { margin: .25rem 0 0; color: var(--muted); }
.now dd span { display: block; }
.now dd b { color: var(--text); font-weight: 500; }

.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.25rem; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; cursor: pointer;
  padding: .7rem 1.4rem; border-radius: 99px; border: 1px solid var(--primary);
  background: var(--primary); color: var(--on-primary); font-weight: 500; font-size: .95rem;
  transition: transform .2s var(--ease), background-color .2s, color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--primary); }
.btn--small { padding: .45rem 1rem; font-size: .85rem; }

.hero { max-width: var(--wrap); display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 3rem; align-items: center; }
.hero__text { grid-column: 1; grid-row: 1; }
.hero__art { grid-column: 2; grid-row: 1; margin: 0; aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 60%, transparent 60.6%);
          mask-image: radial-gradient(circle at 50% 50%, #000 60%, transparent 60.6%);
  animation: breathe 9s ease-in-out infinite; }
.hero__art img { width: 100%; height: 100%; object-fit: cover; }
@keyframes breathe { 50% { transform: translateY(-6px) rotate(1.5deg); } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero__art { opacity: .92; } }
:root[data-theme="dark"] .hero__art { opacity: .92; }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 1rem; max-width: var(--wrap); }
  .hero__art { grid-column: 1; width: 150px; }
  .hero__text { grid-row: 2; }
}

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.chip {
  border: 1px solid var(--line); background: transparent; border-radius: 99px;
  padding: .35rem .9rem; font-size: .85rem; color: var(--muted); cursor: pointer;
  transition: color .2s, background-color .2s, border-color .2s;
}
.chip:hover { color: var(--text); border-color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }

/* Project cards */
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 1.25rem; }
.card {
  display: flex; flex-direction: column; text-align: start; padding: 0; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), opacity .3s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card[hidden] { display: none; }
.card__media { aspect-ratio: 16 / 10; background: var(--mint); display: grid; place-items: center; overflow: hidden; position: relative; }
.card:nth-child(3n+2) .card__media { background: var(--blush); }
.card__media img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .6s var(--ease); }
.card__media img.contain { object-fit: contain; padding: 1.25rem; }
.card__media img.icon { width: 72px; height: 72px; object-fit: contain; border-radius: 16px; }
.card:hover .card__media img { transform: scale(1.03); }
.badge {
  position: absolute; inset-inline-start: .75rem; top: .75rem;
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .75rem; padding: .2rem .6rem; border-radius: 99px;
  background: var(--surface); color: var(--secondary); border: 1px solid var(--line);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--secondary); }
.card__body { padding: 1.1rem 1.25rem 1.3rem; display: grid; gap: .4rem; }
.card__meta { font-size: .8rem; color: var(--muted); }
.card__title { font-size: 1.15rem; font-weight: 500; }
.card__short { color: var(--muted); font-size: .95rem; }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .4rem; padding: 0; list-style: none; }
.tags li { font-size: .75rem; padding: .1rem .55rem; border-radius: 99px; background: var(--bg); color: var(--muted); }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; inset-block: .6rem; inset-inline-start: 5px; width: 1px; background: var(--line); }
.tl { position: relative; padding-inline-start: 2rem; padding-bottom: 1.25rem; }
.tl::before { content: ""; position: absolute; inset-inline-start: 0; top: .55rem; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 2px solid var(--sage); transition: border-color .3s, background-color .3s; }
.tl.is-open::before { border-color: var(--primary); background: var(--primary); }
.tl__toggle { all: unset; display: block; width: 100%; cursor: pointer; border-radius: 10px; }
.tl__toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; }
.tl__top { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; flex-wrap: wrap; }
.tl__title { font-weight: 500; font-size: 1.05rem; }
.tl__date { font-size: .85rem; color: var(--muted); white-space: nowrap; }
.tl__org { color: var(--muted); font-size: .95rem; }
.tl__more { display: inline-flex; align-items: center; gap: .3rem; font-size: .82rem; color: var(--primary); margin-top: .35rem; }
.tl__more::after { content: "+"; transition: transform .3s var(--ease); }
.tl.is-open .tl__more::after { transform: rotate(45deg); }
.tl__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.tl.is-open .tl__panel { grid-template-rows: 1fr; }
.tl__panel > div { overflow: hidden; }
.tl__panel p { color: var(--muted); padding-top: .75rem; }
.tl__groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; padding: 1rem 0 .25rem; }
.tl__groups h4 { margin: 0 0 .35rem; font-size: .85rem; font-weight: 600; color: var(--secondary); }
.tl__groups ul { margin: 0; padding-inline-start: 1.1rem; color: var(--muted); font-size: .9rem; }

/* Rows (education, honors) */
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem; padding: 1.1rem 0; border-top: 1px solid var(--line); }
.row:last-child { border-bottom: 1px solid var(--line); }
.row__title { font-weight: 500; }
.row__sub { color: var(--muted); font-size: .95rem; grid-column: 1; }
.row__date { color: var(--muted); font-size: .85rem; grid-row: 1; grid-column: 2; white-space: nowrap; }
.row__desc { color: var(--muted); font-size: .9rem; grid-column: 1 / -1; }

/* Honors */
.honors { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 1.25rem; }
.honor { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.honor:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.honor__media { all: unset; box-sizing: border-box; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; overflow: hidden; aspect-ratio: 16 / 10; padding: clamp(1rem, 4%, 1.75rem); background: var(--blush); cursor: zoom-in; }
.honor:nth-child(2n) .honor__media { background: var(--mint); }
.honor__media img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 4px; background: #fff; box-shadow: 0 1px 2px rgb(46 33 28 / .08), 0 10px 24px rgb(46 33 28 / .12); transition: transform .5s var(--ease); }
.honor__media:hover img { transform: translateY(-3px) scale(1.015); }
.honor__media:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.honor__media--empty { cursor: default; }
.honor__media--empty span { font-size: 3rem; color: var(--primary); opacity: .55; }
.honor__body { padding: 1.1rem 1.25rem 1.3rem; display: grid; gap: .3rem; }
.honor__date { font-size: .8rem; color: var(--muted); }
.honor__title { font-size: 1.05rem; font-weight: 500; line-height: 1.4; }
.honor__issuer { color: var(--secondary); font-size: .9rem; }
.honor__desc { color: var(--muted); font-size: .9rem; margin-top: .2rem; }

/* Certifications */
.certs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 1rem; }
.cert { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.cert:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.cert__body { display: flex; gap: .85rem; align-items: flex-start; padding: 1rem 1.1rem; flex: 1; }
.cert__mark { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--mint); color: var(--secondary); font-weight: 600; font-size: .85rem; }
.cert:nth-child(2n) .cert__mark { background: var(--blush); color: var(--primary); }
.cert__thumb { all: unset; flex: none; width: 52px; height: 36px; border-radius: 8px; overflow: hidden; cursor: zoom-in; background: #fff; box-shadow: 0 0 0 1px var(--line); transition: transform .3s var(--ease); }
.cert__thumb img { width: 100%; height: 100%; object-fit: cover; }
.cert__thumb:hover { transform: scale(1.08); }
.cert__thumb:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.cert__name { font-weight: 500; font-size: .95rem; line-height: 1.4; }
.cert__meta { color: var(--muted); font-size: .8rem; margin-top: .15rem; }
.cert__id { font-family: ui-monospace, monospace; font-size: .72rem; opacity: .8; overflow-wrap: anywhere; }
.cert__actions { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0 1.1rem 1rem; }
.cert__link { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; text-decoration: none; color: var(--primary); padding: .25rem .7rem; border-radius: 99px; border: 1px solid var(--line); background: transparent; cursor: pointer; transition: border-color .2s, background-color .2s; }
.cert__link:hover { border-color: var(--primary); background: var(--blush); }
.cert__link svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Skills */
.skill-group + .skill-group { margin-top: 1.25rem; }
.skill-group h3 { font-size: .85rem; color: var(--muted); font-weight: 500; margin-bottom: .6rem; }
.skill-group .chips { margin: 0; }
.chip--skill.has-projects { color: var(--text); }
.chip--skill.has-projects::after { content: " ↗"; color: var(--primary); }
.chip--skill:not(.has-projects) { cursor: default; }
.chip--skill:not(.has-projects):hover { border-color: var(--line); color: var(--muted); }
.langs { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 1.5rem; }
.langs b { font-weight: 500; }
.langs span { color: var(--muted); font-size: .9rem; margin-inline-start: .4rem; }

/* Contact */
.contact { padding-bottom: 4rem; }
.contact__lead { color: var(--muted); max-width: 32em; }
.contact__email { display: inline-block; margin-top: 1.25rem; font-size: clamp(1.25rem, 4.5vw, 1.9rem); font-weight: 500; color: var(--primary); text-decoration: none; border-bottom: 1px solid var(--line); word-break: break-all; transition: border-color .2s; }
.contact__email:hover { border-color: var(--primary); }
.contact__list { list-style: none; margin: 2rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.contact__list a, .contact__list span {
  display: inline-flex; align-items: center; gap: .5rem; text-decoration: none;
  padding: .5rem 1rem; border: 1px solid var(--line); border-radius: 99px; font-size: .9rem; background: var(--surface);
  transition: border-color .2s, color .2s;
}
.contact__list a:hover { border-color: var(--primary); color: var(--primary); }
.contact__list svg { width: 16px; height: 16px; fill: currentColor; }
.contact__list [dir="ltr"] { unicode-bidi: isolate; }

.footer__dua { font-family: "IBM Plex Sans Arabic", sans-serif; color: var(--secondary); }
.footer { align-items: center; max-width: var(--wrap); margin: 0 auto; padding: 2rem 16px 3rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; color: var(--muted); font-size: .85rem; }

/* Modal */
dialog { color: var(--text); }
.modal {
  width: min(920px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 0;
  border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow);
}
.modal::backdrop, .lightbox::backdrop { background: rgb(27 22 20 / .45); backdrop-filter: blur(4px); }
.modal[open] { animation: rise .35s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.modal__inner { padding: clamp(1.25rem, 4vw, 2.25rem); position: relative; }
.modal__close { position: absolute; top: 1rem; inset-inline-end: 1rem; }
.modal h2 { font-family: var(--font-display); font-size: clamp(1.7rem, 4vw, 2.2rem); padding-inline-end: 3rem; }
.modal__meta { color: var(--muted); font-size: .85rem; margin-top: .3rem; }
.modal__desc { margin-top: 1rem; color: var(--text); }
.modal__links { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; }
.modal h3 { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin: 2rem 0 .75rem; }
:lang(ar) .modal h3 { letter-spacing: 0; font-size: .95rem; }

.browser { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--bg); }
.browser__bar { display: flex; align-items: center; gap: .6rem; padding: .55rem .8rem; border-bottom: 1px solid var(--line); }
.browser__dots { display: flex; gap: 5px; }
.browser__dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.browser__dots i:first-child { background: var(--accent); }
.browser__dots i:nth-child(2) { background: var(--blush); }
.browser__dots i:nth-child(3) { background: var(--sage); }
.browser__url { flex: 1; min-width: 0; font-size: .78rem; color: var(--muted); background: var(--surface); padding: .2rem .7rem; border-radius: 99px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; text-align: left; }
.browser__btn { all: unset; cursor: pointer; color: var(--muted); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; }
.browser__btn:hover { color: var(--primary); background: var(--surface); }
.browser__btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.browser__frame { position: relative; height: min(70dvh, 640px); background: var(--surface); }
.browser__frame iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.browser__loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: .9rem; }
.browser.is-full { position: fixed; inset: 0; z-index: 100; border-radius: 0; border: 0; }
.browser.is-full .browser__frame { height: calc(100dvh - 45px); }

.video { width: 100%; border-radius: 14px; background: #000; aspect-ratio: 848 / 432; }

.gallery { display: flex; gap: .75rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .5rem; scrollbar-width: thin; }
.gallery button { all: unset; cursor: zoom-in; flex: 0 0 auto; scroll-snap-align: start; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.gallery button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.gallery img { height: 220px; width: auto; max-width: 70vw; object-fit: contain; }
.gallery figcaption { font-size: .78rem; color: var(--muted); padding: .35rem .6rem; background: var(--surface); }

/* Lightbox */
.lightbox { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; }
.lightbox[open] { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .5rem; padding: 3.5rem 12px 1.5rem; }
.lightbox figure { margin: 0; display: grid; justify-items: center; gap: .75rem; min-width: 0; }
.lightbox img { max-height: calc(100dvh - 8rem); max-width: 100%; border-radius: 12px; background: #fff; }
.lightbox figcaption { color: #f4ece4; font-size: .9rem; }
.lightbox__close { position: fixed; top: 12px; inset-inline-end: 12px; }
:dir(rtl) .lightbox__nav svg { transform: scaleX(-1); }
/* Reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

.noscript { text-align: center; padding: 2rem; }

@media (max-width: 560px) {
  .row { grid-template-columns: 1fr; }
  .row__date { grid-row: auto; grid-column: 1; }
  .browser__frame { height: 72dvh; }
  .gallery img { height: 180px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
