/* size rules, positioning rules, spacing rules, style rules */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 50px; /* keeps anchored sections clear of the sticky header */
}

body {
  min-height: 100vh;
  font-family: 'Figtree', 'Segoe UI', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: #f8fafc;
  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(255, 255, 255, 0.06),
      transparent 45%
    ),
    linear-gradient(
      145deg,
      #222224,
      #1a1a1c 55%,
      #1f1f21
    );
  background-color: #1a1a1c;
  background-attachment: fixed;
}

img, video {
  display: block;
  max-width: 100%;
  max-height: 350px;
  object-fit: contain;
  -webkit-user-drag: none;
  -webkit-touch-callout: none; /* hides the iPhone/iPad long-press menu ("Save to Photos" etc.) on media */
  user-select: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    transition: none !important;
  }
}




/* header */

.header__wrapper {
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 1000;
  /* the cards' charcoal with a faint glow bottom-left (top-right spotlight removed) */
  background:
    radial-gradient(40% 120% at 0% 100%, rgba(255, 255, 255, 0.025), transparent 60%),
    #252527F2;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

/* lines the header up with the page content below it */
.header__inner {
  width: min(100% - 40px, 1000px);
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin: 0 auto;
  padding: 10px 0;
}

.header__title {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  color: #f3f4f6;
  font-size: 1.125rem;
  font-weight: 300;
  line-height: 1.35;
  letter-spacing: 0.05em;
  text-decoration: none;
}


.nav__wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px; /* same space on both sides of each slash */
}

.nav__divider {
  color: rgba(255, 255, 255, 0.18);
  font-size: 0.95rem;
  user-select: none;
}

/* very small phones: tighter spacing so the nav fits on one line */
@media (max-width: 340px) {
  .nav__wrapper {
    gap: 6px;
  }

  .nav__button, .nav__divider {
    font-size: 0.85rem;
  }

  /* long tags may wrap instead of sticking out past the screen edge */
  .work__tag {
    max-width: 100%;
    white-space: normal;
    border-radius: 12px;
  }
}

@media (max-width: 560px) {
  .header__inner {
    gap: 8px;
    padding: 10px 0 1px; /* the links' 36px tap height already adds space under the text, so this evens out the top and bottom */
  }

  .nav__wrapper {
    width: 100%;
    row-gap: 0; /* links wrap onto a second line instead of scrolling sideways */
  }
}




/* buttons */

.intro__button--icon, .intro__button, .intro__button--primary {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px; /* spacing for text + icon buttons */
  padding: 0 18px;
  color: #e5e7eb;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015)),
    #252527;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 1px 2px rgba(0, 0, 0, 0.4),
    0 6px 16px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.intro__button--icon {
  width: 44px;
  padding: 0;
  font-size: 1.2rem;
}

/* main call to action, e.g. View Resume/CV */
.intro__button--primary {
  color: #1a1a1c;
  background: linear-gradient(180deg, #ffffff, #e4e4e7);
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow:
    inset 0 -1px 0 rgba(0, 0, 0, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.4),
    0 8px 24px rgba(255, 255, 255, 0.08);
}

.intro__button i, .intro__button svg, .intro__button--icon i, .intro__button--icon svg {
  color: #a1a1aa;
  transition: color 0.2s ease;
}

/* icon-only buttons have no label, so their icon stays brighter */
.intro__button--icon i, .intro__button--icon svg {
  color: #d4d6dc;
}

/* small external-link arrows: View Resume/CV and the prototype links share one size */
.intro__button-icon, .project__link-icon {
  font-size: 0.62rem;
  opacity: 0.7;
}

.intro__button--icon:hover, .intro__button:hover {
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    #2a2a2c;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 2px 4px rgba(0, 0, 0, 0.4),
    0 10px 24px rgba(0, 0, 0, 0.28),
    0 0 0 4px rgba(255, 255, 255, 0.03);
  transform: translateY(-1px);
}

.intro__button:hover i, .intro__button:hover svg, .intro__button--icon:hover i, .intro__button--icon:hover svg {
  color: #ffffff;
}

.intro__button--primary:hover {
  background: linear-gradient(180deg, #ffffff, #f0f0f2);
  box-shadow:
    inset 0 -1px 0 rgba(0, 0, 0, 0.12),
    0 2px 4px rgba(0, 0, 0, 0.4),
    0 6px 16px rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}

.intro__button--icon:active, .intro__button:active, .intro__button--primary:active {
  transform: translateY(0);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35);
}

/* header nav: plain text links separated by slashes */
.nav__button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  color: #a1a1aa;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 400;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.nav__button:hover {
  color: #ffffff;
}

.intro__button--icon:focus-visible, .intro__button:focus-visible, .intro__button--primary:focus-visible,
.nav__button:focus-visible, .header__title:focus-visible, .modal__close:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}




/* intro */

.intro__wrapper {
  width: min(100% - 40px, 1000px);
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 0 auto;
  padding: 56px 0 12px; /* less space before Selected Work */
  color: #e5e7eb;
}

.intro__title {
  max-width: 850px;
  color: #f9fafb;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 300; /* Segoe UI Light; 200 renders the same, as Segoe UI has no lighter weight */
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

/* headline and the line under it sit closer together than the rest of the intro */
.intro__heading {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.intro__subtitle {
  color: #a1a1aa;
  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
  font-weight: 300;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.socials__wrapper {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.socials__email {
  min-height: 44px;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  color: #e5e7eb;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: left;
  overflow-wrap: anywhere;
  background: none;
  border: 0;
  cursor: pointer;
  transition: color 180ms ease;
}

.socials__email i, .socials__email svg {
  color: #a1a1aa;
  font-size: 0.95rem;
  transition: color 180ms ease;
}

.socials__email:hover, .socials__email.is-copied {
  color: #ffffff;
}

.socials__email:hover i, .socials__email:hover svg {
  color: #ffffff;
}

/* hidden on screen, still read by screen readers */
.visually-hidden {
  width: 1px;
  height: 1px;
  position: absolute;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.socials__email:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
  border-radius: 4px;
}




/* sections */

.section__wrapper {
  width: min(100% - 40px, 1000px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 0 auto;
  padding: 44px 0;
}

.section__wrapper--last {
  padding-bottom: 80px;
}

.section__title {
  color: #f3f4f6;
  font-size: 1.35rem;
  font-weight: 300; /* Segoe UI Light on Windows */
  line-height: 1.3;
  letter-spacing: 0;
}

.section__subtitle {
  color: #a1a1aa;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}




/* selected work */

.work__card {
  max-width: 820px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  border-radius: 20px;
  /* spotlight: soft glow top-right, fainter one bottom-left */
  background:
    radial-gradient(110% 80% at 100% 0%, rgba(255, 255, 255, 0.1), transparent 55%),
    radial-gradient(70% 60% at 0% 100%, rgba(255, 255, 255, 0.04), transparent 60%),
    #252527;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.work__header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.work__logo {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: #e5e7eb;
  font-size: 1.1rem;
  font-weight: 600;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.work__name {
  color: #f9fafb;
  font-size: 1.25rem;
  font-weight: 300; /* light, so the company names don't compete with the text */
  letter-spacing: 0.01em;
}

.work__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

.work__tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  color: #e5e7eb;
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.08), transparent 60%), /* the shine, toned down */
    linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-top-color: rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.work__list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 0 0;
  color: #d4d6dc;
  font-size: 0.9rem;
  line-height: 1.7;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}




/* italic note that follows a list, separate from the bullets */
.work__note {
  color: #a1a1aa; /* same grey as the nav links */
  font-size: 0.9rem;
  font-style: italic;
  line-height: 1.7;
}




/* collapsible work cards: only the first bullet shows until "Show more" is clicked.
   The .js class is set in the <head>, so without JavaScript every card stays open. */
.js .work__card:not(.is-open) :is(.work__list, .media__list) li:not(:first-child),
.js .work__card:not(.is-open) .work__note {
  display: none;
}

.work__card.is-open :is(.work__list, .media__list) li:not(:first-child),
.work__card.is-open .work__note {
  animation: card-reveal 0.3s ease both;
}

@keyframes card-reveal {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

.work__toggle {
  display: none;
}

/* full-width strip along the bottom of the card */
.js .work__toggle {
  width: calc(100% + 48px); /* spans the card edge to edge */
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 2px -24px -24px;
  padding: 0 24px;
  color: #a1a1aa;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-align: left;
  background: transparent;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0 0 20px 20px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* subtle hover: the text brightens a little and a faint tint appears */
.js .work__toggle:hover {
  color: #d4d6dc;
  background: rgba(255, 255, 255, 0.035);
}

.work__toggle:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: -4px;
}

.work__toggle-chevron {
  width: 7px;
  height: 7px;
  margin-top: -3px;
  margin-right: 4px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.25s ease, margin 0.25s ease;
}

.work__card.is-open .work__toggle-chevron {
  margin-top: 3px;
  transform: rotate(-135deg);
}

@media (prefers-reduced-motion: reduce) {
  .work__card.is-open :is(.work__list, .media__list) li,
  .work__card.is-open .work__note {
    animation: none;
  }
}




/* media cards */

.media__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.media__card {
  min-width: 0;
  height: fit-content;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.22), transparent 45%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04));
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-top-color: rgba(255, 255, 255, 0.45);
  border-left-color: rgba(255, 255, 255, 0.3);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(255, 255, 255, 0.05);
}

.media__image, .media__video {
  max-width: 100%;
  display: grid;
  justify-content: center;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.18);
}

.media__title {
  color: #f3f4f6;
  font-size: 1rem;
  font-weight: 500;
}

.media__caption {
  color: #d4d6dc;
  font-size: 0.9rem;
  font-weight: 500;
}

.media__paragraph, .media__list {
  color: #bfc4ce;
  font-size: 0.9rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.media__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* brighter reading text for the work cards and the App Landing Page note */
.work__card .media__list, .project__note .media__paragraph {
  color: #d4d6dc;
  font-size: 0.9rem;
}

/* App Landing Page note: a step smaller than the work cards */
.project__note .media__title {
  font-size: 0.95rem;
}

.project__note .media__paragraph {
  max-width: 820px; /* lines up with the right edge of the work cards */
  font-size: 0.9rem;
}

.work__card .media__list {
  gap: 14px;
}

/* ** same treatment as intro__link in the old site */
.media__paragraph a, .ai__paragraph a, .project__link {
  color: #e5e7eb;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  padding-bottom: 1px;
  transition: color 180ms ease, border-color 180ms ease;
}

.media__paragraph a:hover, .ai__paragraph a:hover, .project__link:hover {
  color: #ffffff;
  border-color: #ffffff;
}

.media__paragraph a:focus-visible, .ai__paragraph a:focus-visible, .project__link:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 4px;
  border-radius: 2px;
}
/* ** */

@media (max-width: 700px) {
  .media__grid {
    grid-template-columns: 1fr;
  }
}

/* screenshots inside the Ndara.ai and Fronet cards */
.work__media {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
  margin-top: 4px;
}

.work__figure {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* no divider under the images, like the Zorevia card */
.work__media + .work__list {
  padding-top: 0;
  border-top: none;
}

/* quiet captions, so they don't compete with the card text */
.work__figure .media__caption {
  color: #8f9097;
  font-size: 0.78rem;
  font-weight: 400;
}

/* image carousels (Fronet card): swipe or scroll on any device, buttons and dots when JS runs */
.carousel__wrapper {
  position: relative;
}

.carousel__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  border-radius: 10px;
}

.js .carousel__track {
  scrollbar-width: none; /* the buttons and dots replace the scrollbar */
}

.js .carousel__track::-webkit-scrollbar {
  display: none;
}

.carousel__track:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

.carousel__track .media__image {
  aspect-ratio: 16 / 10;
  flex: 0 0 100%;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr); /* keeps the grid cell inside the 16:10 box, so tall screenshots aren't cropped */
  scroll-snap-align: start;
  border-radius: 0;
}

.carousel__track img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain; /* shows each screenshot whole, whatever its shape */
}

.carousel__button--prev, .carousel__button--next {
  width: 32px;
  height: 32px;
  position: absolute;
  top: 50%;
  display: none;
  place-items: center;
  color: #f3f4f6;
  font-size: 0.75rem;
  background: rgba(26, 26, 28, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  backdrop-filter: blur(8px);
  transform: translateY(-50%);
  cursor: pointer;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.carousel__button--prev {
  left: 8px;
}

.carousel__button--next {
  right: 8px;
}

.js .carousel__button--prev, .js .carousel__button--next {
  display: grid;
}

.carousel__button--prev:hover, .carousel__button--next:hover {
  background: rgba(37, 37, 39, 0.9);
}

.carousel__button--prev:disabled, .carousel__button--next:disabled {
  opacity: 0;
  pointer-events: none;
}

.carousel__button--prev:focus-visible, .carousel__button--next:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.carousel__dots:empty {
  display: none;
}

.carousel__dot {
  width: 6px;
  height: 6px;
  padding: 0;
  background: rgba(255, 255, 255, 0.25);
  border: none;
  border-radius: 999px;
  cursor: pointer;
}

.carousel__dot[aria-current="true"] {
  background: rgba(255, 255, 255, 0.75);
}

/* phones: 3/4 of the card padding */
@media (max-width: 560px) {
  .work__card {
    padding: 18px;
  }

  .media__card {
    padding: 15px;
  }

  .work__media {
    grid-template-columns: 1fr;
  }

  .js .work__toggle {
    width: calc(100% + 36px);
    margin: 2px -18px -18px;
    padding: 0 18px;
  }
}




/* experiments and personal projects */

.project__wrapper {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 36px; /* space between groups like UI/UX Prototypes and Image to Website */
}

.media__grid .project__wrapper {
  margin-bottom: 0;
}

/* extra space between a section heading and its first group, e.g. above UI/UX Prototypes */
.section__title + .project__wrapper {
  margin-top: 16px;
}

.socials__contra {
  font-style: italic;
}

.project__list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding-left: 0;
  list-style: none;
  color: #bfc4ce;
  font-size: 0.9rem; /* same as the paragraph above it */
  line-height: 1.7;
}

.project__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.project__note {
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}




/* how I use AI */

.ai__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 48px;
}

.ai__group {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.ai__paragraph, .ai__steps {
  color: #d4d6dc;
  font-size: 0.9rem;
  line-height: 1.7;
}

/* numbered steps with small outlined numbers */
.ai__steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
  counter-reset: ai-step;
}

.ai__steps li {
  position: relative;
  padding-left: 32px;
  counter-increment: ai-step;
}

.ai__steps li::before {
  content: counter(ai-step);
  width: 20px;
  height: 20px;
  position: absolute;
  left: 0;
  top: 0.15em;
  display: grid;
  place-items: center;
  color: #a1a1aa;
  font-size: 0.72rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
}

@media (max-width: 700px) {
  .ai__grid {
    grid-template-columns: 1fr;
  }
}




/* education */

.education__card {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); /* image 60%, text 40% */
  align-items: center;
  gap: 24px;
}

/* let the certificate image grow taller than the site-wide 350px limit */
.education__card img {
  max-height: 480px;
}

.education__list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.education__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

@media (max-width: 700px) {
  .education__card {
    grid-template-columns: 1fr;
  }
}




/* modal */

.modal {
  width: min(100% - 32px, 560px);
  max-height: 85vh;
  margin: auto;
  padding: 0;
  color: #e5e7eb;
  background: #252527;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.modal[open] {
  display: flex;
  flex-direction: column;
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.modal__title {
  color: #f9fafb;
  font-size: 1.1rem;
  font-weight: 500;
}

.modal__close {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #e5e7eb;
  font-size: 1rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015)),
    #2a2a2c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.modal__close:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.3);
}

/* full screen image viewer */

.media__image img {
  cursor: zoom-in;
}

.media__image img:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: -2px; /* inside, so the rounded wrapper doesn't clip it */
}

.lightbox {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 16px;
  background: transparent;
  border: 0;
  cursor: zoom-out;
}

.lightbox[open] {
  display: grid;
  place-items: center;
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
}

.lightbox__image {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px); /* leaves room for mobile browser bars */
  border-radius: 10px;
}

.lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
}

.modal__body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 24px 24px;
  overflow-y: auto;
}

.modal__group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal__label {
  color: #a1a1aa;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.modal__paragraph, .modal__list {
  color: #e5e7eb;
  font-size: 0.9rem; /* same as the work card text */
  line-height: 1.7;
}

/* short lines instead of bullet points */
.work__list, .media__list, .modal__list {
  list-style: none;
}

.work__list li, .media__list li, .modal__list li {
  position: relative;
  padding-left: 24px;
}

.work__list li::before, .media__list li::before, .modal__list li::before {
  content: "";
  width: 7px;
  height: 1px;
  position: absolute;
  left: 3px;
  top: 0.85em; /* middle of the first line (line-height 1.7) */
  background: rgba(255, 255, 255, 0.4);
}

/* larger screens: bigger reading text */
@media (min-width: 701px) {
  .work__list, .work__note, .media__caption,
  .media__paragraph, .media__list,
  .work__card .media__list, .project__note .media__paragraph,
  .ai__paragraph, .ai__steps,
  .modal__paragraph, .modal__list,
  .project__list {
    font-size: 1rem;
  }

  /* same ~11% step up as the text above */
  .work__figure .media__caption {
    font-size: 0.87rem;
  }  /* these stay at their original size: Timelapse/Result captions, Figma card and certificate details */
  .project__wrapper .media__caption, .media__card .media__paragraph {
    font-size: 0.9rem;
  }
}
