/* ============================================================
   AYA NOUH — Editorial Minimalism with Kinetic Energy
   ============================================================ */

:root {
  --charcoal: #111111;
  --off-white: #F5F5F5;
  --sand: #D9A86C;
  --gray: #8A8A8A;
  --black: #000000;
  --white: #FFFFFF;

  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ---- Reset ---- */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--off-white);
  color: var(--charcoal);
  line-height: 1.6;
  overflow-x: hidden;
}

::selection {
  background-color: var(--sand);
  color: var(--charcoal);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

/* ---- Loader ---- */

.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s var(--ease-out), visibility 0.8s;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-text {
  display: flex;
  align-items: center;
  gap: 0.15em;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 4rem);
  color: var(--off-white);
  letter-spacing: 0.3em;
}

.loader-text span {
  display: inline-block;
  opacity: 0;
  transform: translateY(30px);
  animation: loaderReveal 0.6s var(--ease-out) forwards;
}

.loader-text span:nth-child(1) { animation-delay: 0.1s; }
.loader-text span:nth-child(2) { animation-delay: 0.15s; }
.loader-text span:nth-child(3) { animation-delay: 0.2s; }
.loader-text span:nth-child(5) { animation-delay: 0.35s; }
.loader-text span:nth-child(6) { animation-delay: 0.4s; }
.loader-text span:nth-child(7) { animation-delay: 0.45s; }
.loader-text span:nth-child(8) { animation-delay: 0.5s; }

.loader-dot {
  width: 8px;
  height: 8px;
  background: var(--sand);
  border-radius: 50%;
  margin: 0 0.2em;
  animation: loaderReveal 0.6s var(--ease-out) 0.28s forwards;
}

@keyframes loaderReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Navigation ---- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 3rem;
  mix-blend-mode: difference;
  transition: transform 0.5s var(--ease-out);
}

.nav.hidden {
  transform: translateY(-100%);
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--white);
  transition: opacity 0.3s;
}

.nav-logo:hover {
  opacity: 0.7;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-link {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  position: relative;
  padding-bottom: 2px;
  transition: opacity 0.3s;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--white);
  transition: width 0.4s var(--ease-out);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link:hover {
  opacity: 0.8;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 4px;
  z-index: 101;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--white);
  transition: transform 0.4s var(--ease-out), opacity 0.3s;
}

.nav-toggle.active span:first-child {
  transform: rotate(45deg) translate(3px, 3px);
}

.nav-toggle.active span:last-child {
  transform: rotate(-45deg) translate(3px, -3px);
}

/* Mobile menu */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--charcoal);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s var(--ease-out), visibility 0.5s;
}

.mobile-menu.active {
  opacity: 1;
  visibility: visible;
}

.mobile-link {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 5vw, 3rem);
  color: var(--off-white);
  letter-spacing: 0.05em;
  transition: color 0.3s;
}

.mobile-link:hover {
  color: var(--sand);
}

/* ---- Hero ---- */

.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-images {
  position: absolute;
  inset: 0;
}

.hero-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  opacity: 0;
  transition: opacity 1.5s var(--ease-in-out);
  transform: scale(1.05);
}

.hero-image.active {
  opacity: 1;
  animation: heroZoom 8s var(--ease-in-out) forwards;
}

@keyframes heroZoom {
  from { transform: scale(1.08); }
  to { transform: scale(1); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0.3) 40%,
    rgba(0, 0, 0, 0.15) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 3rem 6rem;
  max-width: 800px;
}

.hero-name {
  font-family: var(--font-serif);
  font-size: clamp(3.5rem, 10vw, 8rem);
  font-weight: 700;
  line-height: 0.95;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: 1.2rem;
}

.hero-tagline {
  font-size: clamp(0.85rem, 1.5vw, 1.1rem);
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.5rem;
}

.hero-motto {
  font-family: var(--font-serif);
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-style: italic;
  color: var(--sand);
  font-weight: 400;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  right: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  z-index: 2;
}

.scroll-indicator span {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  writing-mode: vertical-rl;
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--sand);
  animation: scrollPulse 2s var(--ease-in-out) infinite;
}

@keyframes scrollPulse {
  0% { top: -100%; }
  50% { top: 0; }
  100% { top: 100%; }
}

/* ---- Shared ---- */

.section {
  padding: 8rem 3rem;
}

.section-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 1.5rem;
}

.section-heading {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 2rem;
}

/* Reveal animation helpers */

.line {
  display: block;
  overflow: hidden;
}

.line-inner {
  display: block;
  transform: translateY(110%);
  transition: transform 0.9s var(--ease-out);
}

.revealed .line-inner {
  transform: translateY(0);
}

.line:nth-child(2) .line-inner {
  transition-delay: 0.1s;
}

.reveal-fade {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal-fade.revealed {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 0.2s !important; }

.text-link {
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  position: relative;
  padding-bottom: 2px;
  transition: color 0.3s;
}

.text-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}

.text-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.text-link:hover {
  color: var(--sand);
}

/* ---- Identity ---- */

.identity {
  background: var(--off-white);
}

.identity-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 1400px;
  margin: 0 auto;
  align-items: center;
}

.identity-image {
  position: relative;
}

.image-mask {
  overflow: hidden;
  position: relative;
}

.image-mask img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out);
}

.image-mask:hover img {
  transform: scale(1.03);
}

.identity-text {
  max-width: 520px;
}

.identity-description {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--charcoal);
  margin-bottom: 2rem;
  font-weight: 300;
}

.identity-details {
  display: flex;
  gap: 2rem;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray);
}

/* ---- Work ---- */

.work {
  background: var(--charcoal);
  color: var(--off-white);
}

.work-header {
  max-width: 1400px;
  margin: 0 auto 4rem;
}

.work .section-label {
  color: var(--sand);
}

.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.work-item {
  position: relative;
  overflow: hidden;
  display: block;
  cursor: pointer;
}

.work-image {
  width: 100%;
  overflow: hidden;
}

.work-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(60%) brightness(0.7);
  transition: filter 0.8s var(--ease-out), transform 1s var(--ease-out);
}

.work-item:hover .work-image img {
  filter: grayscale(0%) brightness(0.85);
  transform: scale(1.04);
}

.work-large {
  grid-column: 1 / 2;
  grid-row: 1 / 3;
}

.work-large .work-image {
  height: 100%;
}

.work-large .work-image img {
  height: 100%;
  min-height: 500px;
}

.work-small .work-image {
  height: 280px;
}

.work-small .work-image img {
  height: 100%;
}

.work-wide {
  grid-column: 1 / 3;
}

.work-wide .work-image {
  height: 350px;
}

.work-wide .work-image img {
  height: 100%;
}

.work-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.work-item:hover .work-info {
  opacity: 1;
  transform: translateY(0);
}

.work-info h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 0.3rem;
}

.work-info span {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sand);
}

.work-cta {
  text-align: center;
  margin-top: 3rem;
}

.work-cta .text-link {
  color: var(--sand);
}

.work-cta .text-link::after {
  background: var(--sand);
}

/* ---- Dual Mindset ---- */

.mindset {
  background: var(--off-white);
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.mindset-container {
  display: flex;
  flex: 1;
  min-height: 80vh;
  position: relative;
}

.mindset-half {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem;
  transition: transform 1s var(--ease-out), background-color 1s var(--ease-out);
}

.mindset-left {
  background: var(--charcoal);
  color: var(--off-white);
  transform: translateX(0);
}

.mindset-right {
  background: var(--off-white);
  color: var(--charcoal);
  transform: translateX(0);
}

.mindset-divider {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--sand);
  transform: translateX(-50%);
  z-index: 2;
  transition: opacity 0.8s;
}

.mindset-content {
  text-align: center;
}

.mindset-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 500;
  letter-spacing: 0.05em;
  margin-bottom: 2rem;
}

.mindset-list li {
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: lowercase;
  margin-bottom: 0.8rem;
  opacity: 0.7;
}

.mindset-merged {
  position: absolute;
  bottom: 3rem;
  left: 0;
  right: 0;
  text-align: center;
  opacity: 0;
  transition: opacity 0.8s var(--ease-out);
  z-index: 3;
}

.mindset-merged.visible {
  opacity: 1;
}

.mindset-merged-text {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-style: italic;
  color: var(--sand);
  letter-spacing: 0.05em;
}

/* ---- Gallery ---- */

.gallery {
  background: var(--off-white);
  padding-bottom: 4rem;
  overflow: hidden;
}

.gallery .section-label {
  display: block;
  padding: 0 3rem 2rem;
}

.gallery-track {
  display: flex;
  gap: 1.5rem;
  padding: 0 3rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
}

.gallery-track::-webkit-scrollbar {
  display: none;
}

.gallery-track:active {
  cursor: grabbing;
}

.gallery-item {
  flex: 0 0 auto;
  width: 40vw;
  min-width: 300px;
  max-width: 600px;
  scroll-snap-align: start;
  position: relative;
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  height: 55vh;
  min-height: 350px;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out);
}

.gallery-item:hover img {
  transform: scale(1.03);
}

.gallery-caption {
  display: block;
  margin-top: 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray);
}

/* ---- Athlete ---- */

.athlete {
  background: var(--black);
  color: var(--off-white);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  min-height: 90vh;
}

.athlete-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 1.5rem;
}

.athlete-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.athlete-division {
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 0.5rem;
}

.athlete-detail {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--gray);
  letter-spacing: 0.1em;
}

.athlete-image {
  height: 100%;
}

.athlete-image .image-mask {
  height: 100%;
}

.athlete-image img {
  width: 100%;
  height: 100%;
  min-height: 500px;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.1);
  transition: filter 1s var(--ease-out);
}

.athlete-image:hover img {
  filter: grayscale(100%) contrast(1.2) brightness(1.1);
}

/* ---- About ---- */

.about {
  background: var(--off-white);
  max-width: 1400px;
  margin: 0 auto;
}

.about-header {
  margin-bottom: 4rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.about-narrative p {
  font-size: 1.05rem;
  line-height: 1.9;
  font-weight: 300;
  margin-bottom: 1.5rem;
  color: var(--charcoal);
}

.about-skills,
.about-languages {
  margin-top: 2rem;
}

.about-skills h4,
.about-languages h4,
.about-timeline h4 {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 0.8rem;
}

.about-skills p,
.about-languages p {
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--charcoal);
}

.about-timeline h4 {
  margin-bottom: 2rem;
}

.timeline {
  position: relative;
  padding-left: 1.5rem;
  border-left: 1px solid rgba(0, 0, 0, 0.1);
}

.timeline-item {
  position: relative;
  padding-bottom: 2rem;
  padding-left: 1.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 0.4rem;
  width: 5px;
  height: 5px;
  background: var(--sand);
  border-radius: 50%;
  transform: translateX(-50%);
  margin-left: -0.5px;
}

.timeline-date {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sand);
  display: block;
  margin-bottom: 0.3rem;
}

.timeline-content strong {
  font-size: 0.95rem;
  font-weight: 500;
  display: block;
  margin-bottom: 0.3rem;
}

.timeline-content p {
  font-size: 0.85rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--gray);
}

/* ---- Contact ---- */

.contact {
  background: var(--charcoal);
  color: var(--off-white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 70vh;
  text-align: center;
  position: relative;
}

.contact-heading {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 500;
  line-height: 1.15;
  margin-bottom: 3rem;
}

.contact-links {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
  justify-content: center;
}

.contact-links .text-link {
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  color: var(--sand);
}

.contact-links .text-link::after {
  background: var(--sand);
}

.contact-links .text-link:hover {
  color: var(--off-white);
}

.footer {
  position: absolute;
  bottom: 2rem;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--gray);
}

/* ---- Responsive ---- */

@media (max-width: 1024px) {
  .section {
    padding: 6rem 2rem;
  }

  .identity-grid {
    gap: 3rem;
  }

  .about-grid {
    gap: 3rem;
  }

  .work-small .work-image {
    height: 240px;
  }

  .work-wide .work-image {
    height: 280px;
  }
}

@media (max-width: 768px) {
  .nav {
    padding: 1.2rem 1.5rem;
  }

  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .section {
    padding: 5rem 1.5rem;
  }

  .hero-content {
    padding: 0 1.5rem 4rem;
  }

  .scroll-indicator {
    right: 1.5rem;
  }

  .identity-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .identity-image {
    max-height: 60vh;
  }

  .identity-image .image-mask {
    max-height: 60vh;
  }

  .identity-image img {
    max-height: 60vh;
  }

  .work-grid {
    grid-template-columns: 1fr;
  }

  .work-large {
    grid-column: 1;
    grid-row: auto;
  }

  .work-large .work-image img {
    min-height: 300px;
  }

  .work-wide {
    grid-column: 1;
  }

  .work-small .work-image,
  .work-wide .work-image {
    height: 250px;
  }

  .work-info {
    opacity: 1;
    transform: translateY(0);
  }

  .mindset-container {
    flex-direction: column;
    min-height: auto;
  }

  .mindset-half {
    padding: 4rem 2rem;
  }

  .mindset-divider {
    left: 0;
    right: 0;
    top: 50%;
    bottom: auto;
    width: 100%;
    height: 1px;
  }

  .gallery .section-label {
    padding: 0 1.5rem 2rem;
  }

  .gallery-track {
    padding: 0 1.5rem;
  }

  .gallery-item {
    width: 75vw;
  }

  .athlete {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    min-height: auto;
  }

  .athlete-image img {
    min-height: 350px;
    max-height: 50vh;
  }

  .about {
    padding: 5rem 1.5rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .contact-links {
    flex-direction: column;
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero-name {
    font-size: clamp(2.8rem, 14vw, 4.5rem);
  }

  .section-heading {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
  }

  .athlete-title {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .contact-heading {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .gallery-item {
    width: 85vw;
    min-width: 260px;
  }

  .gallery-item img {
    height: 40vh;
    min-height: 280px;
  }
}
