/* ==========================================================================
   ADSOLUTELY! — Editorial Single-Page Portfolio Stylesheet
   Typography: Google Sans Flex (Bold 700 / Light 300)
   Palette: Dark Charcoal (#222222) & Pure White (#FFFFFF)
   ========================================================================== */

:root {
  --color-charcoal: #222222;
  --color-white: #FFFFFF;
  --color-charcoal-muted: rgba(34, 34, 34, 0.64);
  --color-charcoal-subtle: rgba(34, 34, 34, 0.14);
  --color-white-muted: rgba(255, 255, 255, 0.66);
  --color-white-subtle: rgba(255, 255, 255, 0.16);

  --font-family: 'Google Sans Flex', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --weight-light: 300;
  --weight-bold: 700;

  --container-max: 1640px;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --ease-editorial: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-family);
  font-weight: var(--weight-light);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-charcoal);
  background-color: var(--color-charcoal);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-family);
  font-weight: var(--weight-light);
  color: var(--color-charcoal);
  background-color: var(--color-white);
  overflow-x: hidden;
}

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

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

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

/* Focus accessibility */
:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

/* Skip to content link */
.skip-link {
  position: fixed;
  top: -100%;
  left: var(--gutter);
  z-index: 1000;
  padding: 0.75rem 1.25rem;
  background-color: var(--color-white);
  color: var(--color-charcoal);
  font-weight: var(--weight-bold);
  font-size: 0.875rem;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

/* Typography Utilities */
.fw-bold {
  font-weight: var(--weight-bold);
  font-variation-settings: 'wght' 700;
}

.fw-light {
  font-weight: var(--weight-light);
  font-variation-settings: 'wght' 300;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ==========================================================================
   Header & Minimal Navigation
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding-block: 1.35rem;
  transition: background-color 0.35s var(--ease-editorial),
              color 0.35s var(--ease-editorial),
              border-color 0.35s var(--ease-editorial),
              padding-block 0.35s var(--ease-editorial);
  background-color: rgba(34, 34, 34, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--color-white);
  border-bottom: 1px solid transparent;
}

.site-header.is-light {
  background-color: rgba(255, 255, 255, 0.92);
  color: var(--color-charcoal);
  border-bottom-color: var(--color-charcoal-subtle);
  padding-block: 1rem;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-wordmark {
  font-size: clamp(1.25rem, 1.8vw, 1.55rem);
  letter-spacing: -0.03em;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  transition: opacity 0.25s ease;
}

.brand-wordmark:hover {
  opacity: 0.78;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2.75rem);
  list-style: none;
}

.site-nav__link {
  font-size: clamp(0.875rem, 1vw, 1rem);
  font-weight: var(--weight-light);
  letter-spacing: -0.01em;
  position: relative;
  padding-block: 0.25rem;
  transition: opacity 0.25s ease;
}

.site-nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1.5px;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.35s var(--ease-editorial);
}

.site-nav__link:hover::after,
.site-nav__link.is-active::after {
  transform: scaleX(1);
  transform-origin: left center;
}

.site-nav__link.is-active {
  font-weight: var(--weight-bold);
}

/* ==========================================================================
   Section One — Animated Hero (#222222)
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  background-color: var(--color-charcoal);
  color: var(--color-white);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: clamp(5.5rem, 10vh, 8rem);
  padding-bottom: clamp(2rem, 5vh, 3.5rem);
  overflow: hidden;
}

.hero__spacer {
  flex: 1 1 auto;
}

.hero__stage-wrapper {
  width: 100%;
  margin-block: auto;
  padding-block: clamp(3rem, 8vh, 6rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Fixed-height headline stage prevents any layout shift (CLS = 0) */
.hero-headline {
  position: relative;
  width: 100%;
  height: 1.24em;
  font-size: clamp(2.35rem, 10.2vw, 11.4rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  user-select: none;
}

.hero-phrase {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  will-change: transform, opacity;
  opacity: 0;
  transform: translateY(105%);
  transition: transform 0.68s var(--ease-editorial),
              opacity 0.52s var(--ease-editorial);
  pointer-events: none;
}

.hero-phrase.is-active {
  opacity: 1;
  transform: translateY(0%);
  pointer-events: auto;
}

.hero-phrase.is-exiting {
  opacity: 0;
  transform: translateY(-105%);
}

.hero-phrase__bold {
  font-weight: var(--weight-bold);
  font-variation-settings: 'wght' 700;
}

.hero-phrase__light {
  font-weight: var(--weight-light);
  font-variation-settings: 'wght' 300;
}

/* Subtle Hero Bottom Bar */
.hero__footer {
  width: 100%;
  border-top: 1px solid var(--color-white-subtle);
  padding-top: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: clamp(0.8125rem, 0.95vw, 0.9375rem);
  color: var(--color-white-muted);
}

.hero__tagline {
  font-weight: var(--weight-light);
  letter-spacing: 0.01em;
}

.hero__tagline strong {
  color: var(--color-white);
  font-weight: var(--weight-bold);
}

.hero__controls {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.hero__counter {
  font-variant-numeric: tabular-nums;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
}

.hero__scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-white);
  font-weight: var(--weight-light);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.hero__scroll-cue:hover {
  opacity: 0.75;
  transform: translateY(2px);
}

.hero__scroll-arrow {
  display: inline-block;
  transition: transform 0.3s var(--ease-editorial);
}

.hero__scroll-cue:hover .hero__scroll-arrow {
  transform: translateY(3px);
}

/* ==========================================================================
   Section Two — The Introduction (#FFFFFF)
   ========================================================================== */
.intro-section {
  background-color: var(--color-white);
  color: var(--color-charcoal);
  padding-top: clamp(6rem, 13vw, 12.5rem);
  padding-bottom: clamp(6rem, 13vw, 12.5rem);
  border-bottom: 1px solid var(--color-charcoal-subtle);
}

.intro-section__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
  border-bottom: 1px solid var(--color-charcoal-subtle);
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.intro-section__label {
  font-weight: var(--weight-bold);
}

.intro-section__sublabel {
  font-weight: var(--weight-light);
  color: var(--color-charcoal-muted);
}

.intro-statement {
  font-weight: var(--weight-bold);
  font-variation-settings: 'wght' 700;
  font-size: clamp(2rem, 4.55vw, 4.65rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
  color: var(--color-charcoal);
  max-width: 24ch;
}

@media (min-width: 1024px) {
  .intro-statement {
    max-width: 100%;
  }
}

.intro-statement__line {
  display: inline;
}

@media (min-width: 960px) {
  .intro-statement__line {
    display: block;
  }
  .intro-statement__line--indent {
    padding-left: clamp(2rem, 7vw, 7.5rem);
  }
}

.intro-punchline-wrap {
  margin-top: clamp(3rem, 7vw, 6.5rem);
  padding-top: clamp(2rem, 4.5vw, 4rem);
  border-top: 1px solid var(--color-charcoal-subtle);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .intro-punchline-wrap {
    flex-direction: row;
    align-items: baseline;
  }
}

.intro-punchline-caption {
  font-size: clamp(0.95rem, 1.15vw, 1.125rem);
  font-weight: var(--weight-light);
  color: var(--color-charcoal-muted);
  max-width: 34ch;
  line-height: 1.45;
}

.intro-punchline {
  font-weight: var(--weight-bold);
  font-variation-settings: 'wght' 700;
  font-size: clamp(3.25rem, 9.2vw, 9.25rem);
  line-height: 0.96;
  letter-spacing: -0.045em;
  color: var(--color-charcoal);
}

/* ==========================================================================
   Section Three — Latest Projects (Pentagram-Inspired Editorial Grid)
   ========================================================================== */
.projects-section {
  background-color: var(--color-white);
  color: var(--color-charcoal);
  padding-top: clamp(5rem, 10vw, 9.5rem);
  padding-bottom: clamp(6rem, 12vw, 11rem);
}

.projects-header {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-bottom: clamp(2.25rem, 4vw, 3.5rem);
  margin-bottom: clamp(2.75rem, 5vw, 4.5rem);
  border-bottom: 1px solid var(--color-charcoal);
}

@media (min-width: 960px) {
  .projects-header {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

.projects-heading {
  font-weight: var(--weight-bold);
  font-variation-settings: 'wght' 700;
  font-size: clamp(2.5rem, 5.5vw, 5.25rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.projects-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
}

.filter-btn {
  font-size: 0.9375rem;
  font-weight: var(--weight-light);
  color: var(--color-charcoal-muted);
  padding-block: 0.25rem;
  position: relative;
  transition: color 0.25s ease;
}

.filter-btn:hover {
  color: var(--color-charcoal);
}

.filter-btn.is-active {
  color: var(--color-charcoal);
  font-weight: var(--weight-bold);
}

.filter-btn.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background-color: var(--color-charcoal);
}

/* Pentagram-Style Responsive Portfolio Grid:
   - Mobile: 1 column
   - Tablet (>= 680px): 2 columns
   - Large Desktop (>= 1080px): 3 columns */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  column-gap: clamp(1.5rem, 2.75vw, 2.75rem);
  row-gap: clamp(3.25rem, 6vw, 5.5rem);
  align-items: start;
}

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

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

/* Project Item Component */
.project-card {
  display: flex;
  flex-direction: column;
  transition: opacity 0.35s var(--ease-editorial), transform 0.35s var(--ease-editorial);
}

.project-card[hidden] {
  display: none;
}

.project-card__link {
  display: flex;
  flex-direction: column;
  group: project;
}

.project-card__media {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: #F2F0EC;
  margin-bottom: 1.15rem;
}

/* Curated Editorial Proportions (Landscape, Portrait, Square, Wide) */
.project-card__media--4x3 {
  aspect-ratio: 4 / 3;
}

.project-card__media--4x5 {
  aspect-ratio: 4 / 5;
}

.project-card__media--1x1 {
  aspect-ratio: 1 / 1;
}

.project-card__media--16x10 {
  aspect-ratio: 16 / 10;
}

.project-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.65s var(--ease-editorial);
  will-change: transform;
}

.project-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.project-card__category {
  font-size: 0.75rem;
  font-weight: var(--weight-light);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-charcoal-muted);
}

.project-card__index {
  font-size: 0.75rem;
  font-weight: var(--weight-light);
  font-variant-numeric: tabular-nums;
  color: var(--color-charcoal-muted);
}

.project-card__title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.project-card__title {
  font-weight: var(--weight-bold);
  font-variation-settings: 'wght' 700;
  font-size: clamp(1.2rem, 1.45vw, 1.45rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-charcoal);
  position: relative;
}

.project-card__arrow {
  font-size: 1.05rem;
  font-weight: var(--weight-light);
  color: var(--color-charcoal);
  opacity: 0.28;
  transform: translate(-3px, 3px);
  transition: opacity 0.3s var(--ease-editorial),
              transform 0.3s var(--ease-editorial);
  flex-shrink: 0;
}

.project-card__description {
  font-weight: var(--weight-light);
  font-variation-settings: 'wght' 300;
  font-size: clamp(0.9375rem, 1.02vw, 1.025rem);
  line-height: 1.45;
  color: var(--color-charcoal-muted);
  max-width: 44ch;
  transition: color 0.3s ease;
}

/* Desktop Hover Interactions — Restrained & Editorial */
@media (hover: hover) and (pointer: fine) {
  .project-card__link:hover .project-card__image {
    transform: scale(1.035);
  }

  .project-card__link:hover .project-card__arrow {
    opacity: 1;
    transform: translate(0, 0);
  }

  .project-card__link:hover .project-card__description {
    color: var(--color-charcoal);
  }
}

.projects-footnote {
  margin-top: clamp(3.5rem, 6vw, 5.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-charcoal-subtle);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--color-charcoal-muted);
}

/* ==========================================================================
   Section Four — Contact Call to Action (#222222)
   ========================================================================== */
.contact-section {
  background-color: var(--color-charcoal);
  color: var(--color-white);
  padding-top: clamp(6rem, 13vw, 12rem);
  padding-bottom: clamp(6rem, 13vw, 12rem);
}

.contact-section__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(2rem, 4vw, 3.5rem);
}

.contact-section__eyebrow {
  font-size: 0.875rem;
  font-weight: var(--weight-bold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-white-muted);
}

.contact-section__heading {
  font-weight: var(--weight-bold);
  font-variation-settings: 'wght' 700;
  font-size: clamp(2.75rem, 7vw, 7.25rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  max-width: 15ch;
}

.contact-section__copy {
  font-weight: var(--weight-light);
  font-variation-settings: 'wght' 300;
  font-size: clamp(1.25rem, 2.2vw, 2rem);
  line-height: 1.38;
  letter-spacing: -0.015em;
  color: var(--color-white-muted);
  max-width: 38ch;
}

.contact-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
  padding: 1.15rem 2.4rem;
  background-color: var(--color-white);
  color: var(--color-charcoal);
  font-weight: var(--weight-bold);
  font-size: clamp(1.05rem, 1.25vw, 1.25rem);
  letter-spacing: -0.01em;
  border: 1.5px solid var(--color-white);
  transition: background-color 0.3s var(--ease-editorial),
              color 0.3s var(--ease-editorial),
              transform 0.3s var(--ease-editorial);
}

.contact-cta-btn__arrow {
  transition: transform 0.3s var(--ease-editorial);
}

.contact-cta-btn:hover {
  background-color: transparent;
  color: var(--color-white);
}

.contact-cta-btn:hover .contact-cta-btn__arrow {
  transform: translateX(4px);
}

/* ==========================================================================
   Section Five — Footer (#222222)
   ========================================================================== */
.site-footer {
  background-color: var(--color-charcoal);
  color: var(--color-white);
  border-top: 1px solid var(--color-white-subtle);
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 820px) {
  .site-footer__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.site-footer__wordmark {
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  line-height: 1;
}

.site-footer__tagline {
  font-size: 0.9375rem;
  font-weight: var(--weight-light);
  color: var(--color-white-muted);
}

.site-footer__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem 2.5rem;
  font-size: 0.875rem;
  color: var(--color-white-muted);
}

.site-footer__link {
  color: var(--color-white);
  font-weight: var(--weight-bold);
  border-bottom: 1px solid var(--color-white-subtle);
  padding-bottom: 0.1rem;
  transition: border-color 0.25s ease, opacity 0.25s ease;
}

.site-footer__link:hover {
  border-color: var(--color-white);
}

/* ==========================================================================
   Project Case-Study Preview Modal (Accessible Editorial Sheet)
   ========================================================================== */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 3vw, 2.5rem);
  background-color: rgba(34, 34, 34, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease-editorial),
              visibility 0.3s var(--ease-editorial);
}

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

.project-modal__dialog {
  width: 100%;
  max-width: 960px;
  max-height: 90svh;
  overflow-y: auto;
  background-color: var(--color-white);
  color: var(--color-charcoal);
  border: 1px solid var(--color-charcoal);
  transform: translateY(16px);
  transition: transform 0.35s var(--ease-editorial);
}

.project-modal.is-open .project-modal__dialog {
  transform: translateY(0);
}

.project-modal__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 1.75rem;
  border-bottom: 1px solid var(--color-charcoal-subtle);
}

.project-modal__category {
  font-size: 0.75rem;
  font-weight: var(--weight-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-modal__close {
  font-size: 0.875rem;
  font-weight: var(--weight-bold);
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--color-charcoal);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.project-modal__close:hover {
  background-color: var(--color-charcoal);
  color: var(--color-white);
}

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

@media (min-width: 760px) {
  .project-modal__body {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

.project-modal__figure {
  background-color: #F2F0EC;
  border-bottom: 1px solid var(--color-charcoal-subtle);
}

@media (min-width: 760px) {
  .project-modal__figure {
    border-bottom: none;
    border-right: 1px solid var(--color-charcoal-subtle);
  }
}

.project-modal__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-modal__content {
  padding: clamp(1.5rem, 3vw, 2.5rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
}

.project-modal__title {
  font-weight: var(--weight-bold);
  font-size: clamp(1.65rem, 2.4vw, 2.25rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.project-modal__desc {
  font-weight: var(--weight-light);
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--color-charcoal-muted);
  margin-bottom: 1.25rem;
}

.project-modal__note {
  font-size: 0.8125rem;
  font-weight: var(--weight-light);
  color: var(--color-charcoal-muted);
  padding-top: 1rem;
  border-top: 1px solid var(--color-charcoal-subtle);
}

/* ==========================================================================
   Reduced Motion Preference
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
