:root {
  --font-futura: "Futura PT", Futura, "Century Gothic", "Trebuchet MS", sans-serif;
  --purple: #562361;
  --purple-deep: #3a1847;
  --purple-muted: #6b3578;
  --lime: #98c93c;
  --lime-dim: #7aa82f;
  --white: #f5f3f7;
  --black: #0d0810;
  --text-muted: #c4b8cc;
  --nav-height: 4rem;
  --section-pad: clamp(4rem, 10vw, 7rem);
  --max-width: 72rem;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

  .lightbox {
    transition: none;
  }
}

body {
  margin: 0;
  font-family: var(--font-futura);
  font-weight: 500;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--white);
  background-color: var(--black);
}

h1, h2, h3,
.nav-brand,
.section-label,
.section-title,
.hero-cta,
.portfolio-card h3,
.site-footer strong {
  font-weight: 700;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--lime);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--white);
}

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

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

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 200;
  padding: 0.5rem 1rem;
  background: var(--lime);
  color: var(--black);
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
}

.skip-link:focus {
  top: 0;
}

/* —— Nav —— */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(13, 8, 16, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(152, 201, 60, 0.2);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-brand {
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
}

.nav-brand span {
  color: var(--lime);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid rgba(152, 201, 60, 0.35);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 1.25rem;
  margin: 0 auto;
  background: var(--lime);
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--lime);
}

@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem 1.25rem 1.5rem;
    background: rgba(13, 8, 16, 0.98);
    border-bottom: 1px solid rgba(152, 201, 60, 0.2);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s, opacity 0.25s;
  }

  .nav-links.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    display: block;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(86, 35, 97, 0.5);
  }
}

/* —— Sections —— */
main {
  padding-top: var(--nav-height);
}

section {
  scroll-margin-top: var(--nav-height);
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--section-pad) 1.25rem;
}

.section-label {
  display: inline-block;
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lime);
}

.section-title {
  margin: 0 0 1.25rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.2;
  color: var(--white);
}

/* —— Hero —— */
#home {
  min-height: calc(100vh - var(--nav-height));
  min-height: calc(100dvh - var(--nav-height));
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background: var(--purple-deep);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(13, 8, 16, 0.35) 0%,
      rgba(13, 8, 16, 0.1) 35%,
      rgba(13, 8, 16, 0.75) 78%,
      rgba(13, 8, 16, 0.95) 100%
    ),
    url("../images/GDSWebBackground.png") center 22% / cover no-repeat;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
  margin-top: auto;
  align-self: flex-end;
  padding: clamp(34rem, 78vh, 54rem) 1.25rem 1.5rem;
}

.hero-tagline {
  margin: 0 auto;
  max-width: 32rem;
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: var(--white);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.8);
  letter-spacing: 0.02em;
}

.hero-cta {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.75rem 1.75rem;
  background: transparent;
  border: 2px solid var(--lime);
  color: var(--lime);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.hero-cta:hover {
  background: var(--lime);
  color: var(--black);
}

/* —— About —— */
#about {
  background: linear-gradient(180deg, var(--black) 0%, var(--purple-deep) 100%);
}

.about-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr 1.2fr;
    align-items: start;
    gap: 3rem;
  }
}

.about-accent {
  padding: 1.5rem;
  border-left: 3px solid var(--lime);
  background: rgba(86, 35, 97, 0.25);
  border-radius: 0 8px 8px 0;
}

.about-accent p {
  margin: 0;
  font-size: 1.125rem;
  font-style: italic;
  color: var(--white);
}

.about-body p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.about-body p:last-child {
  margin-bottom: 0;
}

/* —— Work —— */
#work {
  background: var(--purple-deep);
}

.work-intro {
  max-width: 42rem;
  margin-bottom: 2.5rem;
  color: var(--text-muted);
}

.portfolio-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

a.portfolio-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  background: rgba(13, 8, 16, 0.5);
  border: 1px solid rgba(152, 201, 60, 0.15);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.2s;
}

a.portfolio-card:hover,
a.portfolio-card:focus-visible {
  border-color: rgba(152, 201, 60, 0.45);
  transform: translateY(-2px);
  color: inherit;
}

a.portfolio-card:hover h3,
a.portfolio-card:focus-visible h3 {
  color: var(--lime);
}

.portfolio-card-media {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--black);
}

.portfolio-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

a.portfolio-card:hover .portfolio-card-media img,
a.portfolio-card:focus-visible .portfolio-card-media img {
  transform: scale(1.04);
}

.portfolio-card-body {
  padding: 1.25rem 1.25rem 1.5rem;
}

.portfolio-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: var(--white);
  transition: color 0.2s;
}

.portfolio-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.portfolio-card-cta {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lime);
}

/* —— Portfolio pages —— */
.portfolio-page {
  background: var(--purple-deep);
  min-height: calc(100vh - var(--nav-height));
  min-height: calc(100dvh - var(--nav-height));
}

.back-link {
  display: inline-block;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-muted);
}

.back-link:hover {
  color: var(--lime);
}

.portfolio-lead {
  max-width: 40rem;
  margin: 0 0 2.5rem;
  color: var(--text-muted);
}

.portfolio-page .section-title {
  margin-bottom: 0.75rem;
}

/* —— Mosaic gallery —— */
.mosaic {
  column-count: 1;
  column-gap: 0.75rem;
}

@media (min-width: 520px) {
  .mosaic {
    column-count: 2;
  }
}

@media (min-width: 900px) {
  .mosaic {
    column-count: 3;
  }
}

.mosaic-item {
  display: block;
  width: 100%;
  margin: 0 0 0.75rem;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 4px;
  background: rgba(13, 8, 16, 0.5);
  break-inside: avoid;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s, opacity 0.2s;
}

.mosaic-item:hover,
.mosaic-item:focus-visible {
  border-color: rgba(152, 201, 60, 0.55);
  opacity: 0.92;
}

.mosaic-item img {
  width: 100%;
  height: auto;
  vertical-align: middle;
}

/* —— Lightbox —— */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(13, 8, 16, 0.92);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s, visibility 0.2s;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lightbox-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 64rem);
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
}

.lightbox-figure {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  flex: 1;
}

.lightbox-figure img {
  max-width: 100%;
  max-height: calc(100vh - 7rem);
  max-height: calc(100dvh - 7rem);
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
  flex-shrink: 0;
}

.lightbox-btn {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 2px solid var(--lime);
  border-radius: 4px;
  background: transparent;
  color: var(--lime);
  font-family: var(--font-futura);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.lightbox-btn:hover {
  background: var(--lime);
  color: var(--black);
}

.lightbox-close {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
}

.lightbox-counter {
  min-width: 4.5rem;
  text-align: center;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

body.lightbox-open {
  overflow: hidden;
}

/* —— Contact —— */
#contact {
  background: linear-gradient(180deg, var(--purple-deep) 0%, var(--black) 100%);
}

.contact-wrap {
  text-align: center;
  max-width: 32rem;
  margin: 0 auto;
}

.contact-wrap .section-title {
  margin-bottom: 0.75rem;
}

.contact-wrap > p {
  margin: 0 0 2rem;
  color: var(--text-muted);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 8px;
  background: rgba(86, 35, 97, 0.4);
  border: 1px solid rgba(152, 201, 60, 0.25);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.social-links a:hover {
  background: rgba(152, 201, 60, 0.15);
  border-color: var(--lime);
  transform: scale(1.05);
}

.social-links img {
  width: 2rem;
  height: 2rem;
}

.contact-note {
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--purple-muted);
}

/* —— Footer —— */
.site-footer {
  padding: 1.5rem 1.25rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(86, 35, 97, 0.6);
  background: var(--black);
}

.site-footer strong {
  color: var(--lime);
}
