/* ============================================================
   Vickie Lee-Her · Portfolio
   Shared stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --ink: #0a0a0a;
  --text: #2d2d2d;
  --muted: #525252;
  --muted-2: rgba(45, 45, 45, 0.7);
  --brand: #545454;
  --brand-dark: #3a3a3a;
  --brand-tint: #eeeeee;
  --bg: #ffffff;
  --bg-alt: #fafafa;
  --border: #e5e5e5;
  --border-strong: #dbdbdb;

  --container: 1280px;
  --nav-h: 80px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --pad-x: 48px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---- Page transition veil (leave-only; hidden by default so content is never blocked) ---- */
.page-veil {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.32s ease;
}
body.leaving .page-veil { opacity: 1; pointer-events: all; }

/* ============================================================
   Layout helpers
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.section { padding: 112px 0; }
.section--tight { padding: 80px 0; }

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.nav.is-stuck {
  border-bottom-color: var(--border);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}
.nav-aurora {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: 0.9;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 55%, rgba(0,0,0,0) 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 55%, rgba(0,0,0,0) 100%);
}
.nav__inner {
  position: relative;
  z-index: 1;
  height: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav__identity {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav__avatar {
  width: 38px;
  height: 38px;
  min-height: 0;
  border-radius: 50%;
  flex-shrink: 0;
  --slot-bg: var(--brand-tint);
}
.nav__brand {
  font-size: 20px;
  letter-spacing: 0.05px;
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav__link {
  position: relative;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 0;
  transition: color 0.2s ease;
}
.nav__link::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  height: 1.5px; width: 100%;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.32s var(--ease);
}
.nav__link:hover { color: var(--ink); }
.nav__link:hover::after { transform: scaleX(1); }
.nav__link.is-active { color: var(--ink); }
.nav__link.is-active::after { transform: scaleX(1); background: var(--brand); }

/* ---- Work dropdown ---- */
.nav__dropdown {
  position: relative;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 5px;
}
.nav__dropdown-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  padding: 0; border: none; background: none;
  color: var(--muted);
  cursor: pointer;
}
.nav__dropdown:hover .nav__dropdown-toggle { color: var(--ink); }
.nav__chev { transition: transform 0.25s var(--ease); }
.nav__dropdown:hover .nav__chev,
.nav__dropdown.is-expanded .nav__chev { transform: rotate(180deg); }

.nav__menu {
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%) translateY(10px);
  min-width: 300px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.12);
  padding: 8px;
  display: flex; flex-direction: column; gap: 2px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
  z-index: 120;
}
/* transparent bridge so the cursor can cross the gap without losing hover */
.nav__menu::before {
  content: ''; position: absolute;
  top: -12px; left: 0; right: 0; height: 12px;
}
.nav__dropdown:hover .nav__menu,
.nav__dropdown:focus-within .nav__menu {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(6px);
}
.nav__menu-link {
  position: relative;
  display: flex; flex-direction: column; gap: 3px;
  padding: 11px 14px; border-radius: 7px;
  transition: background 0.18s ease;
}
.nav__menu-link:hover { background: var(--bg-alt); }
.nav__menu-title {
  font-size: 14px; font-weight: 500; color: var(--ink);
  letter-spacing: -0.005em;
}
.nav__menu-meta {
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
}
.nav__menu-check {
  display: none;
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--brand);
}
.nav__menu-link.is-current {
  background: var(--brand-tint);
  padding-right: 40px;
  box-shadow: inset 2.5px 0 0 var(--brand);
}
.nav__menu-link.is-current .nav__menu-title { color: var(--brand); font-weight: 600; }
.nav__menu-link.is-current .nav__menu-meta { color: var(--brand); }
.nav__menu-link.is-current .nav__menu-check { display: block; }

.nav__toggle {
  display: none;
  width: 44px; height: 44px;
  border: none; background: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 10px;
}
.nav__toggle span {
  display: block; height: 1.5px; width: 100%;
  background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.2s ease;
}
.nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 32px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  border: 2px solid var(--brand);
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn--ghost { background: transparent; color: var(--brand); }
.btn--ghost:hover { background: var(--brand); color: #fff; }
.btn .btn__arrow { transition: transform 0.25s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* ============================================================
   Typography utilities
   ============================================================ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: '';
  width: 28px; height: 1px;
  background: var(--brand);
}

.display {
  font-weight: 500;
  font-size: clamp(34px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-transform: uppercase;
  margin: 0;
}
.h2 {
  font-weight: 500;
  font-size: clamp(30px, 3.4vw, 38px);
  line-height: 1.12;
  letter-spacing: -0.018em;
  color: var(--ink);
  margin: 0;
}
.h3 {
  font-weight: 500;
  font-size: 21px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
}
.lead {
  font-size: 20px;
  line-height: 1.62;
  color: var(--muted-2);
  margin: 0;
}
.body {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
}
.muted { color: var(--muted); }

/* ============================================================
   Image slots
   ============================================================ */
image-slot {
  --slot-bg: #f4f3f0;
  background: var(--slot-bg);
  display: block;
  position: relative;
}

/* ---- Image-download deterrents ---- */
img, image-slot {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  position: relative;
  background: #262626;
  color: #b0b0b0;
}
.footer__art { line-height: 0; position: relative; overflow: hidden; }
.footer__art img { display: block; width: 100%; height: auto; }
.footer-aurora {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 1;
  mix-blend-mode: multiply;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 14%, transparent 46%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 14%, transparent 46%);
}
@media (prefers-reduced-motion: reduce) {
  .footer-aurora { /* still rendered once, just not animated */ }
}
.footer__inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 48px;
  padding: 72px 0 64px;
}
.footer__brand-name {
  font-size: 18px; font-weight: 500; color: #ffffff;
  margin: 0 0 14px;
}
.footer__brand-desc {
  font-size: 14px; line-height: 1.6; color: #a6a6a6;
  max-width: 320px; margin: 0;
}
.footer__socials { display: flex; gap: 14px; margin-top: 24px; }
.footer__social {
  position: relative;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,0.20);
  border-radius: 50%;
  color: #aebfcc;
  transition: all 0.25s var(--ease);
}
.footer__social:hover { background: var(--brand); border-color: var(--brand); color: #fff; transform: translateY(-2px); }
/* Hover help text */
.footer__social::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 10px); left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--ink); color: #fff;
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  white-space: nowrap; padding: 6px 10px; border-radius: 6px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  z-index: 10;
}
.footer__social::before {
  content: ''; position: absolute;
  bottom: calc(100% + 5px); left: 50%;
  transform: translateX(-50%) translateY(4px);
  border: 5px solid transparent; border-top-color: var(--ink);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  z-index: 10;
}
.footer__social[data-tip]:hover::after,
.footer__social[data-tip]:focus-visible::after,
.footer__social[data-tip]:hover::before,
.footer__social[data-tip]:focus-visible::before {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.footer__col-title {
  font-size: 13px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: #ffffff;
  margin: 0 0 20px;
}
.footer__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.footer__list a {
  font-size: 14px; color: #a6a6a6;
  transition: color 0.2s ease, padding-left 0.2s var(--ease);
}
.footer__list a:hover { color: #ffffff; padding-left: 4px; }
.footer__contact-row { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #a6a6a6; }
.footer__contact-row a:hover { color: #ffffff; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 24px 0;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-size: 13px; color: #8c8c8c;
}
.footer__bottom-link { color: #a6a6a6; transition: color 0.2s ease; }
.footer__bottom-link:hover { color: #ffffff; }

/* ============================================================
   Scroll reveal · content is visible by default; the hidden
   start-state is applied ONLY when JS is active (.js on <html>).
   ============================================================ */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: 0.07s; }
.reveal[data-d="2"] { transition-delay: 0.14s; }
.reveal[data-d="3"] { transition-delay: 0.21s; }
.reveal[data-d="4"] { transition-delay: 0.28s; }

/* Hard safety net: if scripting/animation stalls, snap everything visible. */
.reveal-all .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
  .page-veil { display: none; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  :root { --pad-x: 28px; }
  .nav__links {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px var(--pad-x) 20px;
    transform: translateY(-12px);
    opacity: 0; pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s var(--ease);
  }
  .nav.is-open .nav__links { opacity: 1; transform: none; pointer-events: all; }
  .nav__link { width: 100%; padding: 16px 0; font-size: 15px; border-bottom: 1px solid var(--border); }
  .nav__link::after { display: none; }
  .nav__toggle { display: flex; }

  /* Work dropdown: inline accordion on mobile */
  .nav__dropdown {
    height: auto; width: 100%;
    flex-wrap: wrap; align-items: center; gap: 0;
    border-bottom: 1px solid var(--border);
  }
  .nav__dropdown .nav__link { flex: 1; border-bottom: none; }
  .nav__dropdown-toggle { width: 48px; height: 56px; color: var(--ink); }
  .nav__menu {
    position: static; transform: none;
    opacity: 1; visibility: visible; pointer-events: auto;
    box-shadow: none; border: none; min-width: 0; width: 100%;
    padding: 0; gap: 0;
    max-height: 0; overflow: hidden;
    transition: max-height 0.32s var(--ease);
    z-index: auto;
  }
  .nav__menu::before { display: none; }
  .nav__dropdown.is-expanded .nav__menu { max-height: 380px; }
  .nav__menu-link { padding: 13px 0 13px 18px; border-radius: 0; }
  .nav__menu-link + .nav__menu-link { border-top: 1px solid var(--border); }
  .footer__inner { grid-template-columns: 1fr; gap: 40px; }
  .section { padding: 72px 0; }
}

@media (max-width: 560px) {
  .display { font-size: 34px; }
  .lead { font-size: 17px; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}
