html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* =========================================================
   TYPOGRAPHY — self-hosted font (lives in /fonts, no Google link)
   The file travels with the site, so every screen shows the
   same text as your computer. If it ever fails, the system
   font stack below is used instead (text is never invisible).
========================================================= */
@font-face {
  font-family: 'Manrope';
  src: url('fonts/manrope.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-main: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
  font-family: var(--font-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}


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

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

ul {
  list-style: none;
}

/* ===== Corner link (About / Back to Home) ===== */
.corner-link {
  position: fixed;
  top: 1.75rem;
  right: 1.75rem;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  padding: 0.65rem 1.2rem;
  border-radius: 50px;
  backdrop-filter: blur(6px);
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.corner-link:hover {
  background-color: #5DA9E9;
  border-color: #5DA9E9;
  transform: translateY(-2px);
}


/* ===== Hero (H1 only) ===== */
.hero {
  position: relative;
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem;
  background-color: #0d0d0d;
  color: #ffffff;
}

.hero-content {
  position: relative;
  max-width: min(1400px, 95vw);
  width: 100%;
}

/* ===== Visually-hidden text (kept for accessibility/SEO) ===== */
.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;
}

/* ===== Hero logo video (replaces the kinetic text) ===== */
.hero-logo-video {
  display: block;
  width: 100%;
  max-width: 420px; /* mobile (≤767px), mobile-first base */
  margin: 0 auto;
  height: auto;
}

/* tablet */
@media screen and (min-width: 768px) and (max-width: 1023px) {
  .hero-logo-video { max-width: 680px; }
}

/* desktop */
@media screen and (min-width: 1024px) {
  .hero-logo-video { max-width: 1300px; }
}

/* ===== Showcase — horizontal scroll-journey through "what I do" ===== */
.showcase {
  position: relative;
  background-color: #0d0d0d;
}

.showcase-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.showcase-track {
  display: flex;
  height: 100%;
  will-change: transform;
}

.showcase-panel {
  position: relative;
  flex: 0 0 100vw;
  width: 100vw;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem;
  text-align: center;
  overflow: hidden;
}

.showcase-panel[data-panel="01"] { background-color: #0d0d0d; color: #ffffff; }
.showcase-panel[data-panel="02"] { background-color: #5DA9E9; color: #0d0d0d; }
.showcase-panel[data-panel="03"] { background-color: #ffffff; color: #0d0d0d; }
.showcase-panel[data-panel="04"] { background-color: #0d0d0d; color: #ffffff; }

/* Giant watermark numeral behind the text — reinforces "chapter" of the journey */
.showcase-panel::before {
  content: attr(data-panel);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-main);
  font-size: 32vw;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  color: currentColor;
  opacity: 0.05;
  white-space: nowrap;
  pointer-events: none;
  z-index: 0;
}

.showcase-panel__inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  width: 100%;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Only hidden once index.js is running — if the script fails to load
   (wrong file name on GitHub, slow network) the text stays visible. */
.anim-ready .showcase-panel__inner {
  opacity: 0;
  transform: translateY(26px) scale(0.96);
}

.anim-ready .showcase-panel.is-active .showcase-panel__inner,
.anim-ready .showcase-panel.in-view .showcase-panel__inner {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.showcase-panel__num {
  display: block;
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: #5DA9E9;
  margin-bottom: 1.4rem;
}

.showcase-panel[data-panel="02"] .showcase-panel__num {
  color: #0d0d0d;
}

.showcase-panel__title {
  font-family: var(--font-main);
  font-size: 2.1rem; /* mobile (≤767px), mobile-first base */
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 1.3rem;
  color: currentColor;
}

@media screen and (min-width: 768px) and (max-width: 1023px) {
  .showcase-panel__title { font-size: 2.6rem; } /* tablet */
}

@media screen and (min-width: 1024px) {
  .showcase-panel__title { font-size: 4.4rem; } /* desktop */
}

.showcase-panel__text {
  font-family: var(--font-main);
  font-size: 0.92rem; /* mobile (≤767px), mobile-first base */
  font-weight: 300;
  line-height: 1.7;
  color: currentColor;
  opacity: 0.8;
  max-width: 54ch;
  margin: 0 auto;
}

@media screen and (min-width: 768px) and (max-width: 1023px) {
  .showcase-panel__text { font-size: 1rem; } /* tablet */
}

@media screen and (min-width: 1024px) {
  .showcase-panel__text { font-size: 1.2rem; } /* desktop */
}

/* ===== Journey HUD — progress pill pinned to the bottom of the sticky view ===== */
.showcase-hud {
  position: absolute;
  left: 50%;
  bottom: 2.5rem;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background-color: rgba(13, 13, 13, 0.55);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.6rem 1.1rem;
  border-radius: 50px;
  pointer-events: none;
}

.showcase-hud__count {
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #ffffff;
  white-space: nowrap;
}

.showcase-hud__sep {
  opacity: 0.45;
  margin: 0 0.2em;
}

.showcase-hud__bar {
  width: 160px;
  height: 2px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
  display: block;
}

.showcase-hud__fill {
  width: 0%;
  height: 100%;
  background-color: #5DA9E9;
  display: block;
  transition: width 0.1s linear;
}

/* mobile — same horizontal pinned journey, just a bigger watermark numeral
   and tighter panel padding so it reads well on a narrow screen */
@media screen and (max-width: 767px) {
  .showcase-panel {
    padding: 3.5rem 1.5rem;
  }

  .showcase-panel::before {
    font-size: 40vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  .showcase {
    height: auto !important;
  }

  .showcase-sticky {
    position: static;
    height: auto;
    overflow: visible;
  }

  .showcase-track {
    display: block;
    transform: none !important;
  }

  .showcase-panel {
    width: 100%;
    height: auto;
    flex: none;
    padding: 4rem 2rem;
  }

  .showcase-panel__inner {
    opacity: 1 !important;
    transform: none !important;
    transition: none;
  }

  .showcase-hud {
    display: none;
  }
}

/* ===== About Section — CV-style card layout (same brand as the rest of
   the site: black background, #5DA9E9 accent, Manrope type),
   with a staggered scroll-reveal on every card (see about.js). ===== */
.about {
  background-color: #0d0d0d;
  color: #ffffff;
  padding: 6rem 1.5rem 7rem; /* mobile (≤767px), mobile-first base */
}

@media screen and (min-width: 768px) and (max-width: 1023px) {
  .about { padding: 7rem 2.5rem 8rem; } /* tablet */
}

@media screen and (min-width: 1024px) {
  .about { padding: 8rem 3rem 9rem; } /* desktop */
}

.about-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* ----- Shared card chrome ----- */
.about-card {
  position: relative;
  background-color: #161616;
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 1.8rem;
  font-family: var(--font-main);
}

.about-card__label {
  display: inline-block;
  font-family: var(--font-main);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #5DA9E9;
  margin-bottom: 1rem;
}

.about-card__label--spaced {
  margin-top: 1.6rem;
}

.about-section-title {
  font-family: var(--font-main);
  font-size: 1.8rem; /* mobile */
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 3.5rem 0 1.5rem;
}

@media screen and (min-width: 768px) and (max-width: 1023px) {
  .about-section-title { font-size: 2.1rem; }
}

@media screen and (min-width: 1024px) {
  .about-section-title { font-size: 2.6rem; }
}

/* ----- Header row ----- */
.about-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media screen and (min-width: 768px) {
  .about-header {
    grid-template-columns: 0.8fr 1.3fr 1fr;
  }
}

.about-card--photo {
  padding: 0;
  overflow: hidden;
  min-height: 220px;
}

.profile-photo {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  display: block;
}

.about-card--title {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #5DA9E9;
  margin-bottom: 0.9rem;
}

.about-heading {
  font-family: var(--font-main);
  font-size: 2.2rem; /* mobile */
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
}

@media screen and (min-width: 768px) and (max-width: 1023px) {
  .about-heading { font-size: 2.6rem; }
}

@media screen and (min-width: 1024px) {
  .about-heading { font-size: 3.2rem; }
}

.about-card--contact {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.9rem;
}

.about-contact-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
  transition: color 0.2s ease;
}

.about-contact-row:hover {
  color: #5DA9E9;
}

.about-contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  background-color: rgba(93, 169, 233, 0.12);
  color: #5DA9E9;
  font-size: 0.85rem;
  font-weight: 700;
}

/* ----- Highlights row ----- */
.about-highlights {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

@media screen and (min-width: 768px) {
  .about-highlights {
    grid-template-columns: 1fr 1fr;
  }
}

.about-text {
  font-weight: 300;
  line-height: 1.75;
  opacity: 0.85;
}

.about-text--lead {
  font-size: 1.05rem;
}

.about-edu-item {
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 0.9rem;
}

.about-edu-item:first-of-type {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

.about-edu-role {
  font-size: 0.95rem;
  font-weight: 700;
}

.about-edu-meta {
  font-size: 0.8rem;
  font-weight: 400;
  opacity: 0.6;
  margin-top: 0.25rem;
}

/* ----- Highlights: left column stacks two cards ----- */
.about-highlights__col {
  display: grid;
  gap: 1rem;
  align-content: start;
}

/* ----- Technical skills: titled groups, each list on a thin accent line ----- */
.about-tech {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem 2rem;
}

@media screen and (min-width: 1024px) {
  .about-tech { grid-template-columns: 1fr 1fr; }
}

.about-tech-title {
  font-family: var(--font-main);
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
}

.about-tech-list {
  list-style: none;
  border-left: 1.5px solid rgba(93, 169, 233, 0.45);
  padding-left: 0.9rem;
  margin-left: 0.2rem;
}

.about-tech-list li {
  font-size: 0.88rem;
  font-weight: 400;
  line-height: 1.4;
  opacity: 0.85;
  padding: 0.22rem 0;
}

/* ----- Pills (Skills / Software) ----- */
.about-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.about-pill {
  display: inline-flex;
  align-items: center;
  background-color: rgba(93, 169, 233, 0.1);
  color: #5DA9E9;
  border: 1.5px solid rgba(93, 169, 233, 0.35);
  border-radius: 50px;
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

@media (hover: hover) {
  .about-pill:hover {
    background-color: #5DA9E9;
    color: #0d0d0d;
    transform: translateY(-2px);
  }
}

/* ----- Experience cards ----- */
.about-experience-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media screen and (min-width: 768px) {
  .about-experience-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.about-job-role {
  font-family: var(--font-main);
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
}

.about-job-company {
  font-size: 0.9rem;
  font-weight: 600;
  color: #5DA9E9;
  margin-bottom: 0.4rem;
}

.about-job-meta {
  font-size: 0.78rem;
  font-weight: 500;
  opacity: 0.55;
  margin-bottom: 1.1rem;
}

.about-job-list {
  list-style: none;
}

.about-job-list li {
  position: relative;
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.6;
  opacity: 0.85;
  padding-left: 1.1rem;
  margin-bottom: 0.6rem;
}

.about-job-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: #5DA9E9;
}

.about-job-list li:last-child {
  margin-bottom: 0;
}

/* ----- Footer row: Software / Achievements / Languages ----- */
.about-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 3.5rem;
}

@media screen and (min-width: 768px) {
  .about-footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media screen and (min-width: 768px) {
  .about-footer-grid--2 {
    grid-template-columns: 1.4fr 1fr;
  }
}

.about-achv-list {
  list-style: none;
}

.about-achv-list li {
  position: relative;
  font-size: 0.88rem;
  font-weight: 300;
  line-height: 1.6;
  opacity: 0.85;
  padding-left: 1.1rem;
  margin-bottom: 0.7rem;
}

.about-achv-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: #5DA9E9;
}

.about-achv-list li:last-child {
  margin-bottom: 0;
}

.about-lang-item + .about-lang-item {
  margin-top: 1.3rem;
}

.about-lang-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.about-lang-row span:last-child {
  color: #5DA9E9;
  font-weight: 700;
}

.about-lang-bar {
  width: 100%;
  height: 6px;
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.about-lang-fill {
  display: block;
  height: 100%;
  width: var(--fill, 0%);
  background-color: #5DA9E9;
  border-radius: 4px;
}

/* ----- Scroll reveal: cards fade/slide up in a cascade as they enter
   the viewport (triggered by about.js via IntersectionObserver). Touch
   and mouse alike — this is an entrance effect, not a hover effect. ----- */
.reveal-card {
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.anim-ready .reveal-card:not(.is-visible) {
  opacity: 0;
  transform: translateY(36px);
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal-card {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ===== Projects gallery — hovering one card dims the rest, and its
   title scatters a little (unrelated to the About redesign above). ===== */
.scatter-letter {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (hover: hover) {
  .gallery-grid:has(.gallery-card:hover) .gallery-card.in-view:not(:hover) {
    opacity: 0.45;
  }

  .gallery-card:hover .scatter-letter {
    transform: translateY(var(--sy, 0)) rotate(var(--sr, 0deg));
  }
}

/* ===== Projects Section ===== */
.projects {
  background-color: #0d0d0d;
  padding: 6rem 0;
  overflow: hidden;
}

.projects-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.projects .section-label {
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #5DA9E9;
  margin-bottom: 0.6rem;
}

.projects-heading {
  font-family: var(--font-main);
  font-size: 1.8rem; /* mobile (≤767px), mobile-first base */
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -1px;
  margin-bottom: 1rem;
}

@media screen and (min-width: 768px) and (max-width: 1023px) {
  .projects-heading { font-size: 2.2rem; } /* tablet */
}

@media screen and (min-width: 1024px) {
  .projects-heading { font-size: 3.2rem; } /* desktop */
}

.projects-subtitle {
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.6);
  max-width: 560px;
  margin-bottom: 3rem;
}

/* ===== Gallery Grid ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

/* Each project = one square frame with its logo (shown whole, never
   cropped) + the project name underneath, outside the image. */
.gallery-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  cursor: pointer;
  outline: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.anim-ready .gallery-card:not(.in-view) {
  opacity: 0;
  transform: scale(0.92);
}

.gallery-card.in-view {
  opacity: 1;
  transform: scale(1);
}

.gallery-card__frame {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  background-color: #ffffff;
  border: 1.5px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Logo backgrounds — change these to match each file */
.gallery-card__frame--light { background-color: #ffffff; }
.gallery-card__frame--mist  { background-color: #b9cac6; } /* GreenWave: white + black parts both read */

.gallery-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10%;
  transition: transform 0.4s ease;
}

/* For a logo file that already has a lot of empty space around it (Yale):
   fills the frame so the logo isn't tiny. Only the empty margin is trimmed. */
.gallery-card__frame--fill .gallery-card__image {
  object-fit: cover;
  padding: 0;
}

.gallery-card:hover .gallery-card__frame,
.gallery-card:focus-visible .gallery-card__frame {
  border-color: #5DA9E9;
  box-shadow: 0 20px 40px rgba(93, 169, 233, 0.2);
}

.gallery-card:hover .gallery-card__image {
  transform: scale(1.05);
}

.gallery-card__title {
  font-family: var(--font-main);
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.2px;
  transition: color 0.25s ease;
}

.gallery-card:hover .gallery-card__title,
.gallery-card:focus-visible .gallery-card__title {
  color: #5DA9E9;
}

.gallery-card .image-fallback {
  position: absolute;
  inset: 0;
}

/* ===== Lightbox ===== */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gallery-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.gallery-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.9);
}

.gallery-lightbox__content {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  max-height: 90vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(0.9);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.gallery-lightbox.is-open .gallery-lightbox__content {
  transform: scale(1);
  opacity: 1;
}

.gallery-lightbox__image {
  max-width: 100%;
  max-height: 75vh;
  width: auto;
  border-radius: 12px;
  display: block;
}

.gallery-lightbox__info {
  margin-top: 1.2rem;
  text-align: center;
}

.gallery-lightbox__info h3 {
  font-family: var(--font-main);
  font-size: 1.4rem;
  font-weight: 700;
  color: #ffffff;
}

.gallery-lightbox__close,
.gallery-lightbox__nav {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.gallery-lightbox__close:hover,
.gallery-lightbox__nav:hover {
  background-color: #5DA9E9;
  border-color: #5DA9E9;
}

.gallery-lightbox__close {
  top: -3rem;
  right: 0;
  width: 40px;
  height: 40px;
  font-size: 1.4rem;
}

.gallery-lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 1.3rem;
}

.gallery-lightbox__nav--prev {
  left: -1.5rem;
}

.gallery-lightbox__nav--next {
  right: -1.5rem;
}

@media screen and (max-width: 1023px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-lightbox__nav--prev {
    left: 0.5rem;
  }

  .gallery-lightbox__nav--next {
    right: 0.5rem;
  }

  .gallery-lightbox__close {
    top: 0.5rem;
    right: 0.5rem;
  }
}

@media screen and (max-width: 767px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-card {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ===== Coming Soon modal — shown on click for not-yet-live projects ===== */
.coming-soon-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.coming-soon-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.coming-soon-modal__backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.85);
}

.coming-soon-modal__content {
  position: relative;
  z-index: 1;
  max-width: 420px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background-color: #0d0d0d;
  border: 1.5px solid rgba(93, 169, 233, 0.35);
  border-radius: 20px;
  padding: 3rem 2rem 2.5rem;
  transform: scale(0.85);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.coming-soon-modal.is-open .coming-soon-modal__content {
  transform: scale(1);
  opacity: 1;
}

.coming-soon-modal__close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-radius: 50%;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.coming-soon-modal__close:hover {
  background-color: #5DA9E9;
  border-color: #5DA9E9;
}

.coming-soon-modal__icon {
  width: 64px;
  height: 64px;
  margin-bottom: 1.4rem;
  color: #5DA9E9;
}

/* Spinning ring + a ticking clock hand — reads as "in progress", not an error */
.coming-soon-modal.is-open .coming-soon-modal__icon svg {
  animation: coming-soon-spin 3.5s linear infinite;
}

.coming-soon-modal.is-open .coming-soon-modal__hand {
  transform-origin: 12px 12px;
  animation: coming-soon-tick 2s steps(12) infinite;
}

@keyframes coming-soon-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes coming-soon-tick {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.coming-soon-modal__title {
  font-family: var(--font-main);
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
  margin-bottom: 0.8rem;
}

.coming-soon-modal__text {
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.65);
}

@media (prefers-reduced-motion: reduce) {
  .coming-soon-modal__content {
    transform: none !important;
    transition: opacity 0.2s ease;
  }

  .coming-soon-modal.is-open .coming-soon-modal__icon svg,
  .coming-soon-modal.is-open .coming-soon-modal__hand {
    animation: none !important;
  }
}

/* ===== Parallax photo mask (wrapper created dynamically by JS) ===== */
.photo-mask {
  width: 100%;
  height: min(450px, 55vh);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 60px -25px rgba(13, 13, 13, 0.4);
}

.photo-mask .profile-photo {
  width: 100%;
  height: 130%;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
  display: block;
}

/* ===== Fallback placeholders (generated by JS when an image fails to load) ===== */
.icon-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-main);
  font-size: 0.72rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
  border-radius: 14px;
}

.logo-fallback {
  font-family: var(--font-main);
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.image-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(
    135deg,
    #1a1a1a,
    #1a1a1a 10px,
    #0d0d0d 10px,
    #0d0d0d 20px
  );
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  padding: 1rem;
}

.about-card--photo .image-fallback {
  border-radius: 18px;
  color: rgba(13, 13, 13, 0.4);
  background: repeating-linear-gradient(
    135deg,
    #f2f2f2,
    #f2f2f2 10px,
    #e8e8e8 10px,
    #e8e8e8 20px
  );
}