/* ============================================================
   Nerissa Leonardo — Interior Design Portfolio
   Faithful, scroll-animated presentation of the PDF pages.
   ============================================================ */

:root {
  --paper:   #efe9e0;
  --ink:     #211d18;
  --line:    #d8cdbe;
  --clay:    #b56b42;
  --shadow:  0 30px 70px -34px rgba(43, 33, 22, .42);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --pad: clamp(1rem, 4vw, 3.5rem);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ---------- NAV ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.2rem var(--pad);
  transition: background .4s ease, padding .4s ease, box-shadow .4s ease;
}
.nav.scrolled { padding: .7rem var(--pad); }
/* blur lives on a pseudo-element, NOT on .nav itself — backdrop-filter on .nav
   would make it a containing block and trap the fixed mobile menu inside it */
.nav.scrolled::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(239, 233, 224, .85);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.nav__mark { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; letter-spacing: .04em; }
.nav__logo { height: clamp(26px, 3.2vw, 34px); width: auto; display: block; }
.nav.scrolled .nav__logo { height: clamp(24px, 3vw, 30px); }
.nav__links { display: flex; gap: 2.2rem; }
.nav__links a {
  font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 400;
  position: relative; padding: .2rem 0;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px; background: var(--clay); transition: width .35s ease;
}
.nav__links a:hover::after { width: 100%; }
.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { width: 24px; height: 1.5px; background: var(--ink); transition: transform .3s ease, opacity .3s ease; }

/* ---------- DOCUMENT FLOW ---------- */
.doc {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(2.2rem, 5vw, 5rem);
  padding: clamp(2.2rem, 5vw, 5rem) var(--pad) clamp(4rem, 8vw, 7rem);
}

/* A single PDF page presented as a document sheet */
.page {
  width: 100%;
  max-width: 1120px;            /* landscape spreads */
}
.page--portrait { max-width: 600px; }

.page__sheet {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #fff;
  cursor: zoom-in;
  transition: transform .5s cubic-bezier(.22,1,.36,1), box-shadow .5s ease;
}

/* working links overlaid on the contact pages */
.hotspot {
  position: absolute;
  display: block;
  cursor: pointer;
  border-radius: 4px;
  transition: background .25s ease, box-shadow .25s ease;
}
.hotspot:hover {
  background: rgba(181, 107, 66, .14);
  box-shadow: 0 0 0 1px rgba(181, 107, 66, .4);
}
.page__sheet:hover { transform: translateY(-4px); box-shadow: 0 40px 90px -34px rgba(43,33,22,.5); }
.page__sheet { aspect-ratio: 1224 / 792; }
.page__sheet img { width: 100%; height: 100%; display: block; object-fit: cover; }

/* simple, subtle fade-in as each page scrolls into view */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.22, 1, .36, 1);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
}

/* ---------- COVER (page 1) ---------- */
.cover {
  min-height: 100svh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  width: 100%; max-width: none;
  padding-top: 4rem;
  padding-bottom: 26vh;   /* shifts the centered logo upward */
  position: relative;
}
.cover__logo {
  position: relative;
  width: min(54vw, 560px);
  height: auto;
  margin: 0 auto;
}
.cover__bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(70% 55% at 82% 12%, rgba(181,107,66,.16), transparent 60%),
    radial-gradient(60% 55% at 14% 92%, rgba(141,156,128,.16), transparent 60%);
}

/* ---------- SCROLL CUE ---------- */
.scrollcue {
  position: fixed; left: 50%; bottom: 1.8rem; transform: translateX(-50%);
  z-index: 40; opacity: 1; transition: opacity .5s ease; pointer-events: none;
}
.scrollcue.hide { opacity: 0; }
.scrollcue span {
  display: block; width: 1px; height: 46px;
  background: linear-gradient(var(--ink), transparent);
  animation: cue 2.2s ease-in-out infinite; transform-origin: top;
}
@keyframes cue { 0%,100% { transform: scaleY(.4); opacity: .4; } 50% { transform: scaleY(1); opacity: 1; } }

/* ---------- SCROLL-IN ANIMATION ---------- */
.reveal {
  opacity: 0;
  transform: translateY(46px) scale(.985);
  transition: opacity 1s cubic-bezier(.22,1,.36,1), transform 1s cubic-bezier(.22,1,.36,1);
  will-change: opacity, transform;
}
.reveal.drift-l { transform: translateY(46px) translateX(-26px) scale(.985); }
.reveal.drift-r { transform: translateY(46px) translateX(26px) scale(.985); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .scrollcue span { animation: none; }
}

/* ---------- LIGHTBOX ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(26, 22, 18, .96);
  backdrop-filter: blur(6px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity .4s ease, visibility .4s ease;
  padding: 1.5rem;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox__stage { flex: 1; display: flex; align-items: center; justify-content: center; width: 100%; max-width: 1280px; min-height: 0; }
.lightbox__frame {
  position: relative; display: inline-block; line-height: 0;
  transform-origin: center center;
  will-change: transform;
  touch-action: none;
}
.lightbox:not(.zoomed) .lightbox__frame { cursor: zoom-in; }
.lightbox.zoomed .lightbox__frame { cursor: grab; }
.lightbox.zoomed .lightbox__frame.panning { cursor: grabbing; }
.lightbox__stage img {
  max-width: 100%; max-height: 86vh; object-fit: contain;
  border-radius: 6px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.7);
}
/* contact links sit over the zoomed image; slightly more visible on the dark bg */
.lightbox__frame .hotspot:hover {
  background: rgba(255,255,255,.16);
  box-shadow: 0 0 0 1px rgba(255,255,255,.45);
}
@keyframes lb-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.lightbox__close {
  position: absolute; top: 1rem; right: 1.4rem; background: none; border: 0;
  color: var(--paper); font-size: 2.4rem; line-height: 1; cursor: pointer; opacity: .8; transition: opacity .3s;
}
.lightbox__close:hover { opacity: 1; }
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); color: var(--paper);
  width: 52px; height: 52px; border-radius: 50%; font-size: 1.8rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background .3s ease;
}
.lightbox__nav:hover { background: rgba(255,255,255,.2); }
.lightbox__nav--prev { left: 1.2rem; }
.lightbox__nav--next { right: 1.2rem; }
.lightbox__bar { margin-top: 1rem; color: var(--clay); font-size: .78rem; letter-spacing: .16em; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 860px) {
  .nav__links {
    position: fixed; inset: 0 0 0 auto; width: min(72vw, 300px);
    background: var(--paper); flex-direction: column; justify-content: center;
    gap: 1.8rem; padding: 3rem; transform: translateX(100%);
    transition: transform .45s cubic-bezier(.22,1,.36,1); box-shadow: var(--shadow);
  }
  .nav__links.open { transform: none; }
  .nav__links a { font-size: 1.1rem; }
  .nav__toggle { display: flex; z-index: 60; }
  .nav__toggle.open span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .nav__toggle.open span:last-child { transform: translateY(-3px) rotate(-45deg); }

  .lightbox__nav { width: 44px; height: 44px; font-size: 1.5rem; }
  .lightbox__stage img { max-height: 78vh; }

  /* cover: bigger logo, less dead space on tall phones */
  .cover { padding-bottom: 8vh; }
  .cover__logo { width: min(78vw, 460px); }
}

/* ============================================================
   ABOUT PAGE  (about.html)
   ============================================================ */
.about-body { background: var(--paper); }

/* distinct "About" nav button (pill) */
.nav__links a.nav__about {
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: .34rem 1.05rem;
  transition: background .3s ease, color .3s ease, border-color .3s ease;
}
.nav__links a.nav__about::after { display: none; }
.nav__links a.nav__about:hover,
.nav__links a.nav__about.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.about {
  max-width: 1220px;
  margin: 0 auto;
  padding: clamp(6rem, 12vh, 9rem) var(--pad) clamp(3rem, 7vw, 6rem);
}
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
/* let both columns shrink instead of blowing out the row (long URLs, wide cards) */
.about__intro, .about__works { min-width: 0; }

/* left — identity + bio */
.about__head { display: flex; gap: clamp(1.2rem, 3vw, 2rem); align-items: flex-start; }
.about__photo {
  width: clamp(150px, 40%, 220px);
  height: auto;
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.about__id { display: flex; flex-direction: column; gap: 1.3rem; padding-top: .5rem; }
.about__logo { width: clamp(110px, 60%, 150px); height: auto; }
.about__contact { list-style: none; display: flex; flex-direction: column; gap: .7rem; }
.about__contact a {
  display: inline-flex; align-items: center; gap: .65rem;
  font-size: .92rem; color: var(--ink-soft);
  transition: color .25s ease;
}
.about__contact a:hover { color: var(--clay); }
.about__contact a span { overflow-wrap: anywhere; }
.about__contact svg { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }
.about__contact a:last-child span { border-bottom: 1px solid var(--line); }

.about__bio { margin-top: clamp(1.8rem, 4vw, 2.6rem); max-width: 46ch; }
.about__bio p {
  color: var(--ink-soft);
  font-weight: 300;
  font-size: clamp(1rem, 1.05vw, 1.12rem);
  line-height: 1.9;
  letter-spacing: .003em;
  margin-bottom: 1.35rem;
}
.about__bio strong { color: var(--ink); font-weight: 500; }

/* right — selected works as buttons */
.about__works-title {
  font-size: .8rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--clay); font-weight: 600; margin-bottom: 1.8rem;
}
.work {
  display: flex; gap: 1.2rem; align-items: center;
  min-width: 0;
  padding: 1rem; border-radius: 16px;
  border: 1px solid transparent;
  text-decoration: none; color: var(--ink);
  transition: transform .4s cubic-bezier(.22,1,.36,1), box-shadow .4s ease, border-color .4s ease, background .4s ease;
}
.work__info { min-width: 0; }
.work__meta, .work__tag { overflow-wrap: anywhere; }
.work + .work { margin-top: 1.4rem; }
.work:hover { background: #fff; box-shadow: var(--shadow); border-color: var(--line); transform: translateY(-3px); }
.work__thumb {
  flex-shrink: 0; width: clamp(150px, 34%, 230px);
  aspect-ratio: 16 / 9; border-radius: 11px; overflow: hidden;
  background: var(--paper-2); box-shadow: 0 14px 30px -20px rgba(43,33,22,.5);
}
.work__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s cubic-bezier(.22,1,.36,1); }
.work:hover .work__thumb img { transform: scale(1.06); }
.work__info { display: flex; flex-direction: column; }
.work__name { font-family: var(--serif); font-weight: 600; font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1; }
.work__meta { font-size: .82rem; color: var(--ink-soft); margin-top: .35rem; }
.work__tag { font-size: .82rem; color: var(--ink-soft); margin-top: .35rem; }
.work__go {
  margin-top: .8rem; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--clay); font-weight: 500;
}
.work__go em { font-style: normal; display: inline-block; transition: transform .35s ease; }
.work:hover .work__go em { transform: translateX(5px); }

@media (max-width: 980px) {
  .about__grid { grid-template-columns: 1fr; gap: 2.8rem; }
  .about__bio { max-width: none; }
}
@media (max-width: 480px) {
  .about__head { flex-direction: column; }
  .about__photo { width: 60%; }
  .work { gap: 1rem; padding: .6rem; }
  .work__thumb { width: 38%; }
}
