/* ==========================================================================
   ASYRAF — HOME + GALLERY
   ========================================================================== */


/* --------------------------------------------------------------------------
   ROOT
   -------------------------------------------------------------------------- */

:root {
  --font-display: 'Inter', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}


/* --------------------------------------------------------------------------
   DARK MODE
   -------------------------------------------------------------------------- */

html[data-theme="dark"] {
  --bg: #0a0a0d;
  --card-bg: #16161a;

  --border: rgba(255, 255, 255, 0.10);

  --text: #f5f5f7;
  --text-muted: #6b6b73;
  --text-secondary: #a3a3ab;

  --marquee-stroke: rgba(255, 255, 255, 0.08);

  --btn-solid-bg: #f5f5f7;
  --btn-solid-text: #0a0a0d;

  --project-preview-bg: #111115;

  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
}


/* --------------------------------------------------------------------------
   LIGHT MODE
   -------------------------------------------------------------------------- */

html[data-theme="light"] {
  --bg: #dcdde1;
  --card-bg: #ffffff;

  --border: rgba(0, 0, 0, 0.09);

  --text: #0c0c0d;
  --text-muted: #86868f;
  --text-secondary: #55555e;

  --marquee-stroke: rgba(0, 0, 0, 0.10);

  --btn-solid-bg: #0c0c0d;
  --btn-solid-text: #f5f5f7;

  --project-preview-bg: #ededf0;

  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.18);
}


/* --------------------------------------------------------------------------
   RESET
   -------------------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);

  font-family: var(--font-body);
  line-height: 1.6;

  -webkit-font-smoothing: antialiased;

  overflow-x: hidden;

  transition:
    background 0.3s var(--ease),
    color 0.3s var(--ease);
}

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

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

button {
  font-family: inherit;
  cursor: pointer;

  border: none;
  background: none;

  color: inherit;
}


/* --------------------------------------------------------------------------
   THEME REVEAL
   -------------------------------------------------------------------------- */

.theme-reveal {
  position: fixed;

  inset: 0;

  background: var(--bg);

  z-index: 2000;

  pointer-events: none;

  clip-path: circle(0px at 92% 4%);
}

.theme-reveal.animating {
  transition: clip-path 0.65s var(--ease);

  clip-path: circle(150% at 92% 4%);
}


/* ==========================================================================
   NAVBAR
   ========================================================================== */

.navbar {
  position: fixed;

  top: 20px;
  left: 0;
  right: 0;

  z-index: 1000;

  display: flex;
  justify-content: center;

  padding: 0 20px;
}

.nav-pill {
  width: 100%;
  max-width: 1100px;

  display: flex;
  align-items: center;

  background: var(--card-bg);

  border: 1px solid var(--border);

  border-radius: 999px;

  padding: 10px 14px 10px 16px;

  box-shadow: var(--shadow);
}


/* --------------------------------------------------------------------------
   LEFT SIDE
   -------------------------------------------------------------------------- */

.nav-left {
  display: flex;

  align-items: center;

  gap: 32px;
}


/* --------------------------------------------------------------------------
   LOGO
   -------------------------------------------------------------------------- */

.nav-logo {
  display: flex;

  align-items: center;

  gap: 10px;

  font-weight: 800;

  font-size: 15px;
}

.nav-logo-mark {
  width: 32px;
  height: 32px;

  border-radius: 9px;

  background: var(--btn-solid-bg);

  color: var(--btn-solid-text);

  display: flex;

  align-items: center;
  justify-content: center;

  font-family: Georgia, serif;

  font-style: italic;

  font-size: 17px;
}

.nav-logo-text {
  letter-spacing: 0.02em;
}


/* --------------------------------------------------------------------------
   GALLERY LINK
   -------------------------------------------------------------------------- */

.nav-gallery-link {
  position: relative;

  font-size: 13px;

  font-weight: 600;

  color: var(--text-secondary);

  transition: color 0.2s ease;
}

.nav-gallery-link:hover {
  color: var(--text);
}

.nav-gallery-link::after {
  content: '';

  position: absolute;

  left: 0;

  bottom: -4px;

  width: 100%;
  height: 1px;

  background: var(--text);

  transform: scaleX(0);

  transform-origin: right;

  transition: transform 0.3s var(--ease);
}

.nav-gallery-link:hover::after {
  transform: scaleX(1);

  transform-origin: left;
}


/* --------------------------------------------------------------------------
   RIGHT SIDE
   -------------------------------------------------------------------------- */

.nav-right {
  display: flex;

  align-items: center;

  margin-left: auto;
}


/* --------------------------------------------------------------------------
   THEME BUTTON
   -------------------------------------------------------------------------- */

.theme-toggle {
  width: 36px;
  height: 36px;

  border-radius: 50%;

  border: 1px solid var(--border);

  display: flex;

  align-items: center;
  justify-content: center;

  color: var(--text);

  flex-shrink: 0;

  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.theme-toggle:hover {
  background: var(--bg);

  transform: rotate(10deg);
}

.icon-moon {
  display: none;
}

html[data-theme="dark"] .icon-sun {
  display: none;
}

html[data-theme="dark"] .icon-moon {
  display: block;
}


/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
  position: relative;

  min-height: 100vh;

  display: flex;

  align-items: flex-end;

  justify-content: center;

  overflow: hidden;

  padding-top: 140px;
}


/* --------------------------------------------------------------------------
   MOVING ASYRAF
   -------------------------------------------------------------------------- */

.hero-marquee {
  position: absolute;

  top: 42%;

  left: 0;

  width: 100%;

  transform: translateY(-50%);

  overflow: hidden;

  white-space: nowrap;

  z-index: 0;

  pointer-events: none;
}

.marquee-track {
  display: inline-flex;

  gap: 60px;

  animation: marqueeScroll 22s linear infinite;
}

.marquee-track span {
  font-family: var(--font-display);

  font-weight: 800;

  font-size: clamp(90px, 15vw, 220px);

  letter-spacing: -0.02em;

  color: transparent;

  -webkit-text-stroke: 1.5px var(--marquee-stroke);
}

@keyframes marqueeScroll {

  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }

}


/* ==========================================================================
   HERO PHOTO
   ========================================================================== */

.hero-photo-wrap {
  position: relative;

  z-index: 1;

  display: flex;

  justify-content: center;

  align-items: flex-end;

  width: 100%;
}

.hero-photo {
  width: min(650px, 80vw);

  filter:
    drop-shadow(
      0 30px 60px rgba(0, 0, 0, 0.25)
    );
}

.placeholder-figure {
  width: 100%;

  height: auto;

  display: block;
}


/* ==========================================================================
   SCROLL DOWN
   ========================================================================== */

.scroll-cue {
  position: absolute;

  right: 28px;

  bottom: 28px;

  z-index: 2;

  display: flex;

  align-items: center;

  gap: 10px;

  writing-mode: vertical-rl;

  font-size: 11px;

  font-weight: 600;

  letter-spacing: 0.18em;

  color: var(--text-muted);
}

.scroll-cue-line {
  width: 1px;

  height: 40px;

  background: var(--text-muted);

  animation: scrollCueMove 2s ease-in-out infinite;
}

@keyframes scrollCueMove {

  0%,
  100% {
    transform: scaleY(1);

    transform-origin: top;
  }

  50% {
    transform: scaleY(0.4);

    transform-origin: top;
  }

}


/* ==========================================================================
   GALLERY
   ========================================================================== */

.gallery-section {
  position: relative;

  min-height: 100vh;

  padding: 140px 24px;

  background: var(--bg);

  border-top: 1px solid var(--border);
}

.gallery-container {
  width: 100%;

  max-width: 1100px;

  margin: 0 auto;
}


/* --------------------------------------------------------------------------
   GALLERY HEADING
   -------------------------------------------------------------------------- */

.gallery-heading {
  max-width: 720px;

  margin-bottom: 70px;
}

.gallery-kicker {
  display: inline-block;

  margin-bottom: 14px;

  font-size: 11px;

  font-weight: 700;

  letter-spacing: 0.22em;

  color: var(--text-muted);
}

.gallery-heading h2 {
  margin-bottom: 18px;

  font-size: clamp(46px, 8vw, 90px);

  line-height: 0.95;

  letter-spacing: -0.06em;

  font-weight: 800;
}

.gallery-heading p {
  max-width: 600px;

  font-size: 16px;

  color: var(--text-secondary);

  line-height: 1.8;
}


/* --------------------------------------------------------------------------
   GALLERY GRID
   -------------------------------------------------------------------------- */

.gallery-grid {
  display: grid;

  grid-template-columns: 1fr;

  gap: 32px;
}


/* ==========================================================================
   PROJECT CARD
   ========================================================================== */

.project-card {
  overflow: hidden;

  background: var(--card-bg);

  border: 1px solid var(--border);

  border-radius: 26px;

  box-shadow: var(--shadow);

  transition:
    transform 0.35s var(--ease),
    border-color 0.35s ease;
}

.project-card:hover {
  transform: translateY(-6px);

  border-color: var(--text-muted);
}


/* --------------------------------------------------------------------------
   PROJECT PREVIEW
   -------------------------------------------------------------------------- */

.project-preview {
  min-height: 380px;

  display: flex;

  align-items: center;
  justify-content: center;

  background: var(--project-preview-bg);

  border-bottom: 1px solid var(--border);
}

.project-preview-content {
  display: flex;

  flex-direction: column;

  align-items: center;
  justify-content: center;

  gap: 20px;

  color: var(--text);
}

.project-ai-badge {
  padding: 7px 12px;

  border: 1px solid var(--border);

  border-radius: 999px;

  font-family: 'JetBrains Mono', monospace;

  font-size: 10px;

  font-weight: 600;

  letter-spacing: 0.16em;
}

.face-icon {
  opacity: 0.9;
}

.project-preview-label {
  font-family: 'JetBrains Mono', monospace;

  font-size: 11px;

  letter-spacing: 0.18em;

  color: var(--text-muted);
}


/* --------------------------------------------------------------------------
   PROJECT INFO
   -------------------------------------------------------------------------- */

.project-info {
  display: grid;

  grid-template-columns: 70px 1fr;

  gap: 20px;

  padding: 34px;
}

.project-number {
  font-family: 'JetBrains Mono', monospace;

  font-size: 12px;

  color: var(--text-muted);

  padding-top: 7px;
}

.project-content h3 {
  margin-bottom: 14px;

  font-size: clamp(25px, 4vw, 38px);

  line-height: 1.15;

  letter-spacing: -0.035em;
}

.project-content p {
  max-width: 670px;

  margin-bottom: 24px;

  color: var(--text-secondary);

  font-size: 14px;

  line-height: 1.8;
}


/* --------------------------------------------------------------------------
   TAGS
   -------------------------------------------------------------------------- */

.project-tags {
  display: flex;

  flex-wrap: wrap;

  gap: 8px;

  margin-bottom: 28px;
}

.project-tags span {
  padding: 7px 11px;

  border: 1px solid var(--border);

  border-radius: 999px;

  font-family: 'JetBrains Mono', monospace;

  font-size: 10px;

  color: var(--text-secondary);
}


/* --------------------------------------------------------------------------
   PROJECT BUTTON
   -------------------------------------------------------------------------- */

.project-button {
  width: fit-content;

  display: inline-flex;

  align-items: center;

  gap: 10px;

  padding: 12px 17px;

  border-radius: 999px;

  background: var(--btn-solid-bg);

  color: var(--btn-solid-text);

  font-size: 12px;

  font-weight: 700;

  transition:
    transform 0.25s var(--ease),
    opacity 0.25s ease;
}

.project-button:hover {
  transform: translateY(-2px);

  opacity: 0.88;
}

.project-button span {
  font-size: 15px;
}


/* ==========================================================================
   TABLET
   ========================================================================== */

@media (max-width: 900px) {

  .navbar {
    top: 14px;

    padding: 0 14px;
  }

  .nav-pill {
    padding: 9px 12px;
  }

  .nav-left {
    gap: 24px;
  }

  .hero {
    padding-top: 110px;
  }

  .hero-photo {
    width: min(600px, 82vw);
  }

  .marquee-track span {
    font-size: clamp(90px, 20vw, 180px);
  }

  .gallery-section {
    padding: 120px 20px;
  }

  .gallery-heading {
    margin-bottom: 50px;
  }

  .project-preview {
    min-height: 320px;
  }

}


/* ==========================================================================
   PHONE
   ========================================================================== */

@media (max-width: 640px) {

  .navbar {
    top: 12px;

    padding: 0 12px;
  }

  .nav-pill {
    padding: 8px 10px 8px 12px;
  }

  .nav-left {
    gap: 18px;
  }

  .nav-logo-mark {
    width: 30px;
    height: 30px;
  }

  .nav-logo-text {
    font-size: 14px;
  }

  .nav-gallery-link {
    font-size: 11px;
  }

  .theme-toggle {
    width: 34px;
    height: 34px;
  }

  .hero {
    min-height: 100vh;

    padding-top: 100px;
  }

  .hero-photo {
    width: min(520px, 92vw);
  }

  .hero-marquee {
    top: 40%;
  }

  .marquee-track {
    gap: 35px;
  }

  .marquee-track span {
    font-size: clamp(80px, 30vw, 150px);
  }

  .scroll-cue {
    right: 14px;

    bottom: 18px;

    font-size: 9px;
  }

  .gallery-section {
    min-height: auto;

    padding: 100px 16px;
  }

  .gallery-heading {
    margin-bottom: 38px;
  }

  .gallery-heading p {
    font-size: 14px;
  }

  .project-preview {
    min-height: 260px;
  }

  .project-info {
    grid-template-columns: 1fr;

    gap: 8px;

    padding: 25px;
  }

  .project-number {
    padding-top: 0;
  }

}


/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;

    transition-duration: 0.001ms !important;
  }

  .theme-reveal.animating {
    clip-path: circle(150% at 92% 4%);
  }

}