/* ═══════════════════════════════════════════
   QINGYUE GUO — PORTFOLIO
   Font:   Outfit (sans-serif) + DM Mono
   Accent: #4f9290 (teal)
═══════════════════════════════════════════ */

/* ── RESET ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --paper: #F4F1EC;
  --ink: #1A1A18;
  --ink-mid: #666560;
  --ink-faint: #D8D4CC;
  --accent: #4f9290;
  --accent-dim: rgba(79, 146, 144, 0.15);

  --font-body: 'Outfit', system-ui, sans-serif;
  --font-mono: 'DM Mono', 'Courier New', monospace;

  --header-h: 68px;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ──────────────────────────────────────────
   HEADER / NAV
────────────────────────────────────────── */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4rem;
  transition: background 0.45s var(--ease), backdrop-filter 0.45s var(--ease), border-color 0.45s;
  border-bottom: 1px solid transparent;
}

#site-header.scrolled {
  background: rgba(244, 241, 236, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--ink-faint);
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
}

.nav-logo a {
  font-family: var(--font-body);
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
  transition: color 0.4s;
}

#site-header.scrolled .nav-logo a {
  color: var(--ink);
}

.nav-name {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.4s;
}

#site-header.scrolled .nav-name {
  color: var(--ink-mid);
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

/* ── 3 NAV STATES ── */

/* Default: visible but subdued */
.nav-item {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  position: relative;
  transition: color 0.25s;
}

/* Hover: white + underline in accent color */
.nav-item:hover {
  color: #fff;
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

.nav-item:hover::after {
  transform: scaleX(1);
}

/* Active (current page): accent color + permanent underline */
.nav-item.active {
  color: var(--accent);
}

.nav-item.active::after {
  transform: scaleX(1);
}

/* -- Scrolled versions of the 3 states -- */
#site-header.scrolled .nav-item {
  color: var(--ink-mid);
}

#site-header.scrolled .nav-item:hover {
  color: var(--ink);
}

#site-header.scrolled .nav-item.active {
  color: var(--accent);
}

/* Dropdown arrow */
.dropdown-arrow {
  font-size: 1.2rem;
  transition: transform 0.3s var(--ease);
  display: inline-block;
}

.nav-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
}

/* Dropdown menu */
.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  min-width: 150px;
  background: var(--paper);
  border: 1px solid var(--ink-faint);
  padding: 0.4rem 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

.nav-dropdown.open .dropdown-menu {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  padding: 0.65rem 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-mid);
  transition: color 0.2s, padding-left 0.2s;
}

.dropdown-item:hover {
  color: var(--accent);
  padding-left: 1.5rem;
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: #fff;
  transition: background 0.4s, transform 0.3s;
}

#site-header.scrolled .nav-toggle span {
  background: var(--ink);
}

/* ──────────────────────────────────────────
   HERO
────────────────────────────────────────── */
.hero {
  position: relative;
  width: 100%;
  height: 110vh;
  min-height: 600px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-image-container {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Real image fills the container */
.hero-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  object-position: right center;
}

/* Gradient: lets top nav show, darkens bottom for text legibility */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
      rgba(10, 10, 8, 0.2) 0%,
      rgba(10, 10, 8, 0.0) 35%,
      rgba(10, 10, 8, 0.45) 70%,
      rgba(10, 10, 8, 0.75) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 4rem 5.5rem;
  opacity: 0;
  animation: fadeUp 0.9s 0.25s var(--ease) forwards;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title {
  font-family: var(--font-body);
  font-size: clamp(3.5rem, 8vw, 7.5rem);
  font-weight: 300;
  line-height: 1;
  margin-left: -0.05em;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 1.8rem;
}

.hero-sub {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 2.5rem;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 0.85rem 1.8rem;
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}

.hero-cta:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  right: 4rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: fadeUp 0.9s 0.8s var(--ease) forwards;
}

.hero-scroll-hint span {
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  writing-mode: vertical-rl;
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), transparent);
  animation: scrollPulse 2s 1.2s ease-in-out infinite;
}

@keyframes scrollPulse {

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

  50% {
    opacity: 1;
    transform: scaleY(0.65);
  }
}

/* ──────────────────────────────────────────
   GALLERY SECTION
────────────────────────────────────────── */
.section-gallery {
  padding: 6rem 4rem;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 1.2rem;
  border-top: 1px solid var(--ink-faint);
  margin-bottom: 2.5rem;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-mid);
}

.section-title {
  font-size: 1.6rem;
  font-weight: 300;
  letter-spacing: -0.02em;
}

.section-link {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mid);
  transition: color 0.2s;
}

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

/* ── GALLERY GRID — 3 / 2 / 1 columns ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

/* All cards uniform square-ish */
.gallery-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  background: #c8c3bb;
}

/* ── PLACEHOLDER ── */
.card-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, #d2cdc5 0%, #bfbab2 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  position: relative;
}

/* Number badge via ::before */
.card-placeholder::before {
  content: attr(data-n);
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 300;
  color: rgba(26, 26, 24, 0.12);
  letter-spacing: -0.02em;
  line-height: 1;
}

/* Thin cross-hair lines for visual interest */
.card-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, transparent calc(50% - 0.5px), rgba(26, 26, 24, 0.06) calc(50% - 0.5px), rgba(26, 26, 24, 0.06) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    linear-gradient(to bottom, transparent calc(50% - 0.5px), rgba(26, 26, 24, 0.06) calc(50% - 0.5px), rgba(26, 26, 24, 0.06) calc(50% + 0.5px), transparent calc(50% + 0.5px));
}

/* Image inside card — fills card & scales on hover */
.card-image {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 0.65s var(--ease);
}

.gallery-card:hover .card-image img {
  transform: scale(1);
}

/* ── CARD OVERLAY — slides up on hover ── */
.card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.4rem 1.2rem;
  background: linear-gradient(to top, rgba(10, 10, 8, 0.78) 0%, rgba(10, 10, 8, 0.0) 55%);
  opacity: 0;
  transition: opacity 0.32s var(--ease);
}

.gallery-card:hover .card-overlay {
  opacity: 1;
}

/* Left accent bar that slides in */
.card-overlay::before {
  content: '';
  position: absolute;
  left: 0;
  top: 30%;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.35s 0.05s var(--ease);
}

.gallery-card:hover .card-overlay::before {
  transform: scaleY(1);
}

.card-type {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: white;
  display: block;
  margin-bottom: 0.4rem;
  transform: translateY(6px);
  transition: transform 0.3s var(--ease);
}

.gallery-card:hover .card-type {
  transform: translateY(0);
}

.card-title {
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.35;
  color: #fff;
  transform: translateY(6px);
  transition: transform 0.3s 0.04s var(--ease);
  margin-bottom: 0.7rem;
}

.gallery-card:hover .card-title {
  transform: translateY(0);
}

.card-link {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  opacity: 0;
  transition: opacity 0.25s 0.08s var(--ease), color 0.2s;
  align-self: flex-start;
}

.gallery-card:hover .card-link {
  opacity: 1;
}

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

/* ──────────────────────────────────────────
   ABOUT SECTION
────────────────────────────────────────── */
.section-about {
  padding: 5rem 4rem;
  border-top: 1px solid var(--ink-faint);
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: start;
}

.about-quote {
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.45;
  color: var(--ink);
  margin: 1rem 0 1.5rem;
  border-left: 3px solid var(--accent);
  padding-left: 1.2rem;
}

.about-body {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.9;
  color: var(--ink-mid);
  margin-bottom: 1.5rem;
  max-width: 46ch;
}

.text-link {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mid);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s, gap 0.2s;
}

.text-link:hover {
  color: var(--accent);
  gap: 0.9rem;
}

.services-list {
  list-style: none;
  margin-top: 1rem;
}

.services-list li {
  font-size: 0.95rem;
  font-weight: 300;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--ink-faint);
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: color 0.2s, padding-left 0.2s;
  cursor: default;
}

.services-list li::before {
  content: '–';
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.services-list li:hover {
  color: var(--accent);
  padding-left: 0.4rem;
}

/* ──────────────────────────────────────────
   LIGHTBOX
────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 8, 0.92);
  cursor: zoom-out;
}

.lightbox-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90vw;
  max-height: 90vh;
  transform: scale(0.94);
  transition: transform 0.35s var(--ease);
}

.lightbox.open .lightbox-content {
  transform: scale(1);
}

.lightbox-img {
  display: block;
  max-width: 88vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.lightbox-caption {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  line-height: 1;
  transition: color 0.2s;
}

.lightbox-close:hover {
  color: #fff;
}

/* card-link as button reset */
button.card-link {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-align: left;
}


/* ──────────────────────────────────────────
   FOOTER
────────────────────────────────────────── */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 4rem 4rem 2rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 1rem;
}

.footer-email {
  font-size: 0.95rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.75);
  transition: color 0.2s;
}

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

.footer-nav,
.footer-socials {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-nav a,
.footer-socials a {
  font-size: 0.95rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.2s;
}

.footer-nav a:hover,
.footer-socials a:hover {
  color: var(--accent);
}

.footer-bottom {
  padding-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  text-align: center;
}

/* ──────────────────────────────────────────
   SCROLL REVEAL UTILITY
────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ──────────────────────────────────────────
   RESPONSIVE
────────────────────────────────────────── */

/* Tablet: 2 columns */
@media (max-width: 1024px) {
  #site-header {
    padding: 0 2rem;
  }

  .hero-content {
    padding: 0 2rem 4rem;
  }

  .hero-scroll-hint {
    right: 2rem;
  }

  .section-gallery {
    padding: 5rem 2rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .section-about {
    padding: 4rem 2rem;
  }

  .about-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .site-footer {
    padding: 3rem 2rem 2rem;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

/* Mobile: 1 column */
@media (max-width: 640px) {
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  /* Mobile nav open */
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    top: var(--header-h);
    height: calc(100vh - var(--header-h));
    background: var(--paper);
    padding: 3rem 2rem;
    gap: 1.8rem;
    z-index: 99;
  }

  .nav-links.open .nav-item {
    font-size: 1.6rem;
    font-weight: 300;
    font-family: var(--font-body);
    color: var(--ink);
    letter-spacing: -0.01em;
    text-transform: none;
  }

  .nav-links.open .nav-item::after {
    display: none;
  }

  .nav-links.open .nav-item.active {
    color: var(--accent);
  }

  .dropdown-menu {
    position: static;
    transform: none;
    opacity: 1;
    pointer-events: all;
    border: none;
    padding: 0 0 0 1rem;
    background: transparent;
    display: none;
  }

  .nav-dropdown.open .dropdown-menu {
    display: block;
  }

  .dropdown-item {
    font-size: 1.2rem;
    font-weight: 300;
    font-family: var(--font-body);
    color: var(--ink-mid);
    letter-spacing: -0.01em;
    text-transform: none;
    padding: 0.4rem 0;
  }

  .hero-title {
    font-size: clamp(3rem, 13vw, 5rem);
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-card {
    aspect-ratio: 4/3;
  }

  .section-header {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}