@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@500;600;700;800&display=swap");

:root {
  --bg: #041129;
  --bg-alt: #061a39;
  --bg-soft: rgba(11, 35, 70, 0.75);
  --text: #f4f6ff;
  --text-soft: rgba(244, 246, 255, 0.78);
  --muted: #9ab7dd;
  --muted-strong: #d3e4ff;
  --accent: #ff9d28;
  --accent-strong: #ffc15a;
  --highlight: #00c2cb;
  --card: rgba(9, 28, 63, 0.86);
  --card-border: rgba(148, 184, 224, 0.22);
  --shadow-soft: 0 28px 60px rgba(3, 13, 32, 0.45);
  --transition: 260ms ease;
}

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

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

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(160deg, var(--bg) 0%, #051c3b 35%, #031027 100%);
  color: var(--text);
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  width: 38rem;
  height: 38rem;
  background: radial-gradient(circle at center, rgba(0, 194, 203, 0.24), transparent 70%);
  filter: blur(0.2px);
  pointer-events: none;
  z-index: -3;
  opacity: 0.85;
}

body::before {
  top: -14rem;
  right: -10rem;
}

body::after {
  bottom: -18rem;
  left: -14rem;
  background: radial-gradient(circle at center, rgba(255, 157, 40, 0.18), transparent 70%);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Poppins", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}

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

button {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

img,
video {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.landing-page {
  position: relative;
  overflow-x: hidden;
}

.background-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 900ms ease;
  filter: saturate(1.05) contrast(0.95);
  z-index: 0;
}

.background-video.is-visible {
  opacity: 1;
}

.navbar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: clamp(1.25rem, 3vw, 2.25rem) clamp(1.5rem, 7vw, 3.5rem);
  background: #041129;
  border-bottom: 1px solid rgba(0, 194, 203, 0.25);
  box-shadow: 0 18px 36px rgba(2, 10, 26, 0.35);
  z-index: 20;
}

.navbar__brand {
  font-family: "Poppins", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted-strong);
  transition: color var(--transition);
}

.navbar__brand:hover {
  color: var(--accent);
}

.navbar__links {
  display: flex;
  gap: clamp(1rem, 4vw, 3rem);
  align-items: center;
  justify-content: flex-start;
}

.navbar__link {
  position: relative;
  font-weight: 500;
  color: rgba(210, 226, 255, 0.72);
  padding-bottom: 0.35rem;
  transition: color var(--transition);
}

.navbar__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--highlight));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
}

.navbar__link.is-active {
  color: #ffffff;
}

.navbar__link:hover,
.navbar__link:focus-visible {
  color: #ffffff;
}

.navbar__link.is-active::after,
.navbar__link:hover::after {
  transform: scaleX(1);
}

.navbar__brand:focus-visible,
.navbar__link:focus-visible,
.btn-primary:focus-visible,
.project-card:focus-visible,
.topbar__brand:focus-visible,
.topbar__links a:focus-visible,
.link-underlined:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

.sections {
  position: relative;
  width: 100%;
  margin: 0 auto;
}

.section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(5rem, 12vw, 8rem) clamp(1.75rem, 6vw, 6rem);
  text-align: center;
  scroll-margin-top: clamp(5rem, 12vw, 8rem);
}

.section--hero {
  background: linear-gradient(140deg, rgba(5, 23, 53, 0.9), rgba(4, 16, 40, 0.78));
  min-height: clamp(34rem, 85vh, 56rem);
}

.section--hero.section--hero-video {
  background: transparent;
  overflow: hidden;
}

.section--hero.section--hero-video::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, rgba(5, 23, 53, 0.82), rgba(4, 16, 40, 0.7));
  z-index: 0;
}

.section--experiences {
  background: linear-gradient(150deg, rgba(5, 18, 44, 0.92), rgba(4, 16, 38, 0.85));
}

.section--skills {
  background: linear-gradient(150deg, rgba(5, 19, 42, 0.92), rgba(3, 13, 32, 0.9));
}

.section__inner {
  width: min(1100px, 90vw);
  display: grid;
  gap: 1.75rem;
  justify-items: stretch;
  text-align: left;
  position: relative;
  z-index: 1;
}

.section__inner.hero {
  justify-items: center;
  text-align: center;
}

.section__eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--highlight);
}

.section__title {
  font-size: clamp(2.4rem, 4.5vw, 4rem);
  font-weight: 800;
  line-height: 1.05;
  color: #ffffff;
}

.section__lead {
  font-size: clamp(1.05rem, 2.6vw, 1.35rem);
  max-width: 68ch;
  color: var(--text-soft);
}

.section__lead--compact {
  max-width: 60ch;
  color: rgba(212, 226, 252, 0.78);
}

.hero {
  position: relative;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  overflow: visible;
  justify-items: center;
}

.hero::after {
  content: none;
}

.hero__content {
  position: relative;
  display: grid;
  gap: 1.5rem;
  z-index: 1;
  justify-items: center;
}

.hero__name {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.hero__role {
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.hero__bio {
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  color: var(--text-soft);
  max-width: 60ch;
}

.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.chip-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  background: rgba(0, 194, 203, 0.14);
  color: var(--muted-strong);
  font-weight: 600;
  font-size: 0.92rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  justify-content: center;
}

.section-heading {
  display: grid;
  gap: 0.85rem;
}

.section--experiences .section-heading,
.section--skills .section-heading {
  text-align: center;
  justify-items: center;
}

.section--experiences .section__lead,
.section--skills .section__lead {
  margin: 0 auto;
}

.experience-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
}

@media (min-width: 1080px) {
  .experience-grid {
    grid-template-columns: 1.5fr 1fr;
    align-items: start;
  }
}

.timeline {
  position: relative;
  display: grid;
  gap: 1.75rem;
  padding-left: 1.5rem;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0.3rem;
  bottom: 0.3rem;
  left: 0.4rem;
  width: 2px;
  background: linear-gradient(180deg, rgba(0, 194, 203, 0.65), rgba(255, 157, 40, 0.55));
}

.timeline__item {
  position: relative;
  padding: 1.6rem 1.9rem 1.8rem;
  border-radius: 24px;
  background: rgba(6, 24, 56, 0.92);
  border: 1px solid rgba(0, 194, 203, 0.18);
  box-shadow: 0 18px 45px rgba(3, 12, 31, 0.4);
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: -1.1rem;
  top: 1.4rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--highlight);
  box-shadow: 0 0 0 6px rgba(0, 194, 203, 0.18);
}

.timeline__period {
  font-size: 0.85rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(222, 235, 255, 0.72);
}

.timeline__role {
  margin-top: 0.65rem;
  font-size: 1.35rem;
  color: #ffffff;
}

.timeline__place {
  margin-top: 0.15rem;
  font-weight: 600;
  color: rgba(255, 193, 90, 0.92);
}

.timeline__details {
  margin-top: 1rem;
  display: grid;
  gap: 0.5rem;
  color: var(--text-soft);
  list-style: none;
  font-size: 0.98rem;
}

.experience-aside {
  display: grid;
  gap: 1.8rem;
}

.education-card {
  padding: 1.8rem 2rem;
  border-radius: 24px;
  background: rgba(7, 26, 58, 0.95);
  border: 1px solid rgba(148, 184, 224, 0.2);
  display: grid;
  gap: 1.35rem;
}

.education-card__title {
  font-size: 1.1rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-strong);
}

.education-list {
  list-style: none;
  display: grid;
  gap: 1.4rem;
}

.education-list__period {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(210, 226, 255, 0.6);
}

.education-list__place {
  display: block;
  margin-top: 0.25rem;
  font-weight: 600;
  color: #ffffff;
}

.education-list p {
  margin-top: 0.6rem;
  color: var(--text-soft);
  line-height: 1.6;
}

.experience-note {
  padding: 1.5rem 1.8rem;
  border-radius: 20px;
  background: rgba(255, 157, 40, 0.15);
  border: 1px solid rgba(255, 157, 40, 0.35);
  color: #ffffff;
  display: grid;
  gap: 0.55rem;
}

.experience-note__label {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 225, 180, 0.85);
}

.skills-grid {
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.5rem);
}

@media (min-width: 980px) {
  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.skills-card {
  padding: 1.9rem 2rem;
  border-radius: 24px;
  background: rgba(7, 25, 55, 0.92);
  border: 1px solid rgba(148, 184, 224, 0.2);
  display: grid;
  gap: 1.1rem;
  color: var(--text-soft);
  min-height: 100%;
}

.skills-card--accent {
  background: linear-gradient(140deg, rgba(255, 157, 40, 0.32), rgba(0, 194, 203, 0.18));
  border: 1px solid rgba(255, 193, 90, 0.35);
  color: #041129;
}

.skills-card__title {
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-strong);
}

.skills-card--accent .skills-card__title {
  color: #041129;
}

.skills-card--accent .chip {
  background: rgba(255, 255, 255, 0.7);
  color: #041129;
}

.skills-list {
  list-style: none;
  display: grid;
  gap: 0.6rem;
  font-size: 0.98rem;
}

.badge-list {
  list-style: none;
  display: grid;
  gap: 0.75rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: rgba(0, 194, 203, 0.18);
  color: var(--muted-strong);
  font-weight: 600;
  font-size: 0.95rem;
}

.about-columns {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  width: min(960px, 95vw);
}

.about-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-strong);
  margin-bottom: 0.75rem;
}

.about-list {
  list-style: none;
  display: grid;
  gap: 0.65rem;
  color: rgba(226, 228, 236, 0.86);
  text-align: left;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.95rem 2.8rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--highlight));
  color: #041129;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition), box-shadow var(--transition);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 26px 60px rgba(2, 11, 28, 0.55);
}

.projects-grid {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.8rem;
  margin: 1.2rem auto 1.8rem;
}

@media (min-width: 720px) {
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.projects-grid--listing {
  width: 100%;
  margin-top: 2.4rem;
}

.projects-grid__placeholder {
  color: var(--muted);
  text-align: center;
  width: 100%;
}

.project-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--card-border);
  background: rgba(11, 8, 24, 0.82);
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: transform 260ms ease, border-color 260ms ease, box-shadow 260ms ease;
}

@supports not (aspect-ratio: 16 / 9) {
  .project-card {
    min-height: 320px;
  }
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(138, 92, 246, 0.35);
  box-shadow: 0 18px 45px rgba(14, 10, 32, 0.55);
}

.project-card__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: transform 320ms ease, opacity 320ms ease;
}

.project-card:hover .project-card__media {
  transform: scale(1.05);
  opacity: 1;
}

.project-card__overlay {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 1.9rem;
  background: linear-gradient(180deg, rgba(3, 4, 18, 0.18), rgba(4, 3, 14, 0.9));
  display: flex;
  flex-direction: column;
  gap: 0rem;
  text-align: left;
  margin-top: auto;
}

.project-card__category {
  font-size: 0.85rem;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-card__title {
  font-weight: 600;
  font-size: 1.3rem;
}

.project-card__summary {
  font-size: 1.05rem;
  color: rgba(226, 228, 236, 0.78);
  margin-top: 0.45rem;
}

.link-underlined {
  font-weight: 600;
  color: var(--accent-strong);
  position: relative;
}

.link-underlined::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.15rem;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--highlight));
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 220ms ease;
}

.link-underlined:hover::after {
  transform: scaleX(1);
}

/* Listing & detail pages */
body.projects-page,
body.project-page {
  min-height: 100vh;
  overflow-x: hidden;
  padding-top: 5.5rem;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem clamp(1.5rem, 6vw, 3rem);
  background: rgba(3, 16, 38, 0.88);
  border-bottom: 1px solid rgba(0, 194, 203, 0.25);
  box-shadow: 0 18px 36px rgba(2, 10, 26, 0.35);
  z-index: 15;
}

.topbar__brand {
  font-family: "Poppins", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted-strong);
}

.topbar__links {
  display: flex;
  gap: 1.5rem;
  font-weight: 500;
}

.content-wrapper {
  width: min(1200px, 95vw);
  margin: 0 auto;
  padding: 2.5rem 0 5rem;
  display: grid;
  gap: 2.5rem;
}

.intro-block {
  display: grid;
  gap: 0.9rem;
  text-align: left;
  margin-top: 1rem;
}

.page-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  justify-self: start;
  align-self: start;
  margin-top: 0.25rem;
  padding: 0rem 1.5rem;
  min-height: 2.65rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(9, 8, 22, 0.65);
  color: var(--muted-strong);
  font-weight: 500;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition), transform var(--transition),
    color var(--transition);
}

.page-back-link:hover,
.page-back-link:focus-visible {
  background: rgba(138, 92, 246, 0.18);
  border-color: rgba(138, 92, 246, 0.6);
  color: #ffffff;
  transform: translateY(-2px);
}

.site-footer {
  text-align: center;
  padding: 2.5rem 1rem 3rem;
  color: rgba(226, 228, 236, 0.65);
  font-size: 0.9rem;
}

.project-detail {
  display: grid;
  gap: 2rem;
}

.project-detail__header {
  display: grid;
  gap: 0.75rem;
  text-align: left;
}

.project-detail__category {
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 0.75rem;
  color: var(--muted);
}

.project-detail__title {
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  font-weight: 700;
}

.project-detail__summary {
  color: rgba(226, 228, 236, 0.78);
  max-width: 70ch;
}

.project-detail__body {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: start;
}

.project-detail__description {
  display: grid;
  gap: 1rem;
  color: rgba(226, 228, 236, 0.85);
}

.project-detail__description p {
  margin: 0;
}

.project-detail__description h1,
.project-detail__description h2,
.project-detail__description h3,
.project-detail__description h4,
.project-detail__description h5,
.project-detail__description h6 {
  margin: 0;
  font-weight: 600;
  color: var(--muted-strong);
}

.project-detail__description h1 {
  font-size: clamp(1.6rem, 2.8vw, 2rem);
}

.project-detail__description h2 {
  font-size: clamp(1.4rem, 2.4vw, 1.7rem);
}

.project-detail__description h3 {
  font-size: clamp(1.25rem, 2vw, 1.45rem);
}

.project-detail__description h4,
.project-detail__description h5,
.project-detail__description h6 {
  font-size: clamp(1.1rem, 1.8vw, 1.25rem);
}

.project-detail__description ul,
.project-detail__description ol {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.45rem;
  list-style-position: outside;
}

.project-detail__description li {
  margin: 0;
}

.project-detail__description a {
  color: var(--accent-strong);
  text-decoration: underline;
  text-decoration-color: rgba(138, 92, 246, 0.55);
  text-underline-offset: 0.25em;
  transition: color var(--transition), text-decoration-color var(--transition);
}

.project-detail__description a:hover,
.project-detail__description a:focus-visible {
  color: #ffffff;
  text-decoration-color: currentColor;
}

.project-detail__description code {
  font-family: 'JetBrains Mono', 'Fira Code', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  background: rgba(148, 163, 184, 0.16);
  border-radius: 6px;
  padding: 0.15rem 0.4rem;
  font-size: 0.95em;
  color: #f9fafb;
}

.project-detail__description pre {
  margin: 0;
  padding: 1rem 1.2rem;
  background: rgba(8, 7, 20, 0.85);
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  overflow-x: auto;
  box-shadow: 0 12px 30px rgba(15, 12, 40, 0.3);
}

.project-detail__description pre code {
  padding: 0;
  background: none;
  color: inherit;
}

.project-detail__description blockquote {
  margin: 0;
  padding-left: 1.15rem;
  border-left: 3px solid rgba(138, 92, 246, 0.45);
  color: rgba(226, 228, 236, 0.78);
  font-style: italic;
}

.project-detail__description blockquote p {
  margin: 0;
}

.project-detail__description hr {
  margin: 0;
  border: none;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.project-detail__facts {
  display: grid;
  gap: 0.85rem;
  background: rgba(10, 8, 22, 0.82);
  border-radius: 16px;
  padding: 1.5rem 1.8rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.project-detail__facts dt {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--muted);
}

.project-detail__facts dd {
  margin-left: 0;
  font-weight: 600;
}

.project-detail__gallery {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.project-detail__gallery button {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(9, 7, 22, 0.85);
  cursor: zoom-in;
  padding: 0;
}

.project-detail__gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms ease;
}

.project-detail__gallery button:hover img {
  transform: scale(1.05);
}

.project-empty {
  text-align: center;
  display: grid;
  gap: 1.5rem;
  margin: 4rem auto;
  padding: 3rem 2rem;
  max-width: 520px;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(8, 6, 18, 0.86);
}

.project-empty__title {
  font-size: 1.8rem;
  font-weight: 700;
}

.image-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
}

.image-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 4, 14, 0.8);
  backdrop-filter: blur(6px);
}

.image-modal__content {
  position: relative;
  z-index: 1;
  max-width: min(90vw, 960px);
  max-height: 90vh;
  border-radius: 20px;
  overflow: hidden;
  background: #04040c;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 24px 65px rgba(5, 5, 20, 0.65);
}

.image-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.1rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  background: rgba(15, 13, 30, 0.8);
}

.image-modal__content img {
  width: 100%;
  height: auto;
  display: block;
}

.image-modal__caption {
  padding: 1rem 1.5rem 1.3rem;
  font-size: 0.95rem;
  color: rgba(214, 219, 235, 0.8);
}

@media (max-height: 820px) {
  .section {
    align-items: flex-start;
  }
}

@media (max-width: 900px) {
  .section {
    align-items: flex-start;
  }

  .navbar__links {
    gap: 1.25rem;
  }

  .section__inner {
    gap: 1.2rem;
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .project-detail__body {
    grid-template-columns: 1fr;
  }

  .project-detail__facts {
    padding: 1.25rem 1.5rem;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 0.95rem;
  }

  .navbar {
    flex-direction: column;
    gap: 0.85rem;
    padding-inline: 1.5rem;
  }

  .navbar__brand {
    letter-spacing: 0.28em;
  }

  .navbar__links {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .section {
    padding-inline: 1.25rem;
  }

  .section__title {
    font-size: clamp(2.1rem, 9vw, 3rem);
  }

  .section__lead {
    font-size: 1.02rem;
  }

  body.projects-page,
  body.project-page {
    padding-top: 6.5rem;
  }

  .topbar {
    flex-direction: column;
    gap: 0.75rem;
  }

  .topbar__links {
    width: 100%;
    justify-content: center;
  }

  .project-detail__gallery {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .btn-primary {
    width: 100%;
  }

}

@media (min-width: 1600px) {
  .section {
    padding: 6rem 5rem;
    scroll-margin-top: 6rem;
  }

  .section__title {
    font-size: 3.5rem;
  }

  .section__lead {
    font-size: 1.25rem;
  }
}