:root {
  --ink: rgba(42, 26, 28, 0.8);
  --muted: rgba(156, 122, 126, 0.8);
  --paper: #fde7ea;
  --pig-skin: #fde7ea;
  --pig-pencil: rgba(218, 158, 168, 0.18);
  --line: #e0c4c7;
  --accent: rgba(184, 79, 104, 0.8);
  --soft: #f8dce1;
  --maroon: #5c1e1e;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: 'Cormorant Garamond', Georgia, serif;
}

body.intro-active {
  overflow: hidden;
}

body.intro-active .site-header,
body.intro-active main,
body.intro-active footer {
  opacity: 0;
}

button, a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

/* ===== Pig splash intro (index.html only) ===== */
.intro-animation {
  position: fixed;
  inset: 0;
  width: 100vw;
  min-height: 100vh;
  min-height: 100dvh;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  cursor: default;
}

body.pig-ready .intro-animation {
  cursor: pointer;
}

.intro-greeting {
  position: absolute;
  top: 16%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  margin: 0;
  text-align: center;
  white-space: nowrap;
  font-family: engria, 'Cormorant Garamond', Georgia, serif;
  color: rgba(48, 19, 23, 0.8);
  font-size: clamp(30px, 5.5vw, 68px);
  line-height: 1.15;
  opacity: 0;
  animation: greetIn 1100ms ease 4.7s forwards;
}

/* greeting disappears the moment the pig is clicked */
body.intro-complete .intro-greeting {
  animation: greetOut 320ms ease forwards;
}

@keyframes greetIn {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes greetOut {
  to { opacity: 0; transform: translate(-50%, -6px); }
}

/* "click me!" arrow at the pig's bottom-right, points up toward the pig */
.intro-clickme {
  position: absolute;
  left: 54%;
  top: 55%;
  z-index: 4;
  width: clamp(130px, 15vw, 210px);
  height: auto;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.6) rotate(-4deg);
  transform-origin: top left;
  animation: clickmePop 700ms cubic-bezier(0.34, 1.56, 0.64, 1) 4.9s forwards;
}

body.intro-complete .intro-clickme {
  animation: clickmeOut 280ms ease forwards;
}

@keyframes clickmePop {
  0%   { opacity: 0; transform: scale(0.6) rotate(-4deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

@keyframes clickmeOut {
  to { opacity: 0; transform: scale(0.9); }
}

body.intro-complete .intro-animation {
  animation: introFade 250ms ease 150ms forwards;
}

body.intro-complete .site-header,
body.intro-complete main,
body.intro-complete footer {
  animation: siteFlashIn 250ms ease 200ms both;
}

.intro-pig {
  position: absolute;
  inset: 0;
  margin: auto;
  width: clamp(150px, 22vw, 260px);
  height: clamp(150px, 22vw, 260px);
  z-index: 1;
  animation: pigFloat 3s ease-in-out 5s infinite alternate;
}

/* pig flashes away rather than zooming in, so the cut to the new page feels instant */
body.intro-complete .intro-pig {
  animation: pigFlashOut 200ms ease forwards;
}

.intro-pig-emma,
.intro-pig-line,
.intro-pig-color {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Phase 1: the "Emma" signature draws first (left-to-right) */
.intro-pig-emma {
  z-index: 3;
  clip-path: inset(0 100% 0 0);
  animation: pigDrawLR 1s ease-out 300ms forwards;
}

/* Phase 2: the rest of the outline draws in right-to-left */
.intro-pig-line {
  z-index: 2;
  clip-path: inset(0 0 0 100%);
  animation: pigDrawRL 1.8s ease-out 1.3s forwards;
}

/* Phase 3: everything else (color, eyes, snout, cheeks) fills in after */
.intro-pig-color {
  z-index: 1;
  clip-path: inset(0 0 0 100%);
  animation: pigDrawRL 1.8s ease-in-out 3.1s forwards;
}

@keyframes pigDrawLR {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}

@keyframes pigDrawRL {
  from { clip-path: inset(0 0 0 100%); }
  to   { clip-path: inset(0 0 0 0); }
}

@keyframes pigFloat {
  to { transform: translateY(-10px) rotate(1deg); }
}

@keyframes pigFlashOut {
  to { opacity: 0; }
}

@keyframes siteFlashIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes introFade {
  to { opacity: 0; visibility: hidden; }
}

@keyframes siteAppear {
  from { opacity: 0; transform: scale(1.18); }
  to   { opacity: 1; transform: scale(1); }
}

/* ===== Header / nav (shared across every page) ===== */
.site-header {
  min-height: 132px;
  padding: 38px 34px 28px;
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
}

.icon-nav {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  width: min(1180px, calc(100% - 64px));
  margin: 0 auto;
}

.nav-icon {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: clamp(84px, 9vw, 118px);
  text-decoration: none;
  color: inherit;
  transition: transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1), filter 220ms ease;
}

.nav-icon img {
  height: 100%;
  width: auto;
  object-fit: contain;
  /* transparent PNG background → page texture shows through exactly */
}

.nav-icon:hover,
.nav-icon:focus-visible {
  transform: translateY(-6px) rotate(-2deg) scale(1.08);
  outline: none;
}

.nav-icon.active {
  transform: translateY(-4px) scale(1.05);
}

.header-social {
  position: absolute;
  right: 36px;
  top: 47px;
  color: var(--accent);
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 18px;
  font-weight: 500;
  text-decoration: none;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1, h2, p {
  margin-top: 0;
}

.section-heading h1 {
  margin: 0;
  font-size: clamp(68px, 8vw, 128px);
  font-weight: 400;
  line-height: 0.9;
}

.text-link {
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  padding: 0 0 4px;
  background: none;
  color: var(--ink);
  cursor: pointer;
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-block;
}

.text-link span {
  padding-left: 8px;
}

.inner-page {
  width: min(1180px, calc(100% - 64px));
  min-height: calc(100vh - 210px);
  margin: 0 auto;
  padding: 44px 0 82px;
  scroll-margin-top: 200px;
}

.section-heading {
  padding-bottom: 38px;
  border-bottom: 1px solid var(--line);
}


/* ===== Hero pages: home ("Welcome") + About ("Hi there! I'm Emma") ===== */
.hero-page {
  padding-top: 10px;
}

.hero-name h1 {
  margin: 0;
  font-size: clamp(38px, 4.4vw, 52px);
  font-weight: 400;
  line-height: 1.05;
  color: var(--maroon);
}

.hero-name-link {
  display: inline-block;
  text-decoration: none;
  color: inherit;
  transition: opacity 180ms ease;
}

.hero-name-link:hover {
  opacity: 0.75;
}

.hero-name-link:active h1 {
  color: #FFB4B4;
}

.welcome-visual {
  margin-top: 4px;
  margin-left: clamp(24px, 9vw, 115px);
}

.welcome-visual img {
  display: block;
  max-width: 100%;
  height: auto;
}

.hero-headline-title {
  margin: 0;
  text-align: center;
  font-family: 'Newsreader', serif;
  font-size: clamp(34px, 4.6vw, 52px);
  font-weight: 600;
  color: var(--maroon);
}

.hero-bio {
  margin: clamp(18px, 4vw, 36px) auto 0;
  max-width: 640px;
  text-align: center;
  font-family: 'Inter', Arial, sans-serif;
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.6;
  color: var(--maroon);
}

.hero-bio strong {
  font-weight: 700;
}

.skyline-visual {
  margin-top: clamp(30px, 6vw, 60px);
}

.skyline-visual img {
  display: block;
  width: 100%;
  height: auto;
}

/* About Me / Experience — added below the intro, no photo */
.about-extra {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 1fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
  margin-top: clamp(40px, 7vw, 76px);
}

.about-extra-col:last-child {
  text-align: right;
}

.about-extra-heading {
  margin: 0 0 14px;
  font-family: 'Newsreader', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--maroon);
}

.about-extra-col p {
  margin: 0 0 20px;
  font-family: 'Inter', Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--maroon);
}

.about-extra-col p:last-child {
  margin-bottom: 0;
}

.experience-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.experience-list li {
  margin-bottom: 20px;
}

.exp-role {
  display: block;
  font-family: 'Poppins', 'Inter', Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  color: var(--maroon);
}

.exp-role strong {
  font-weight: 700;
}

.exp-year {
  display: block;
  font-family: 'Poppins', 'Inter', Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  color: var(--maroon);
}

@media (max-width: 760px) {
  .about-extra {
    grid-template-columns: 1fr;
  }

  .about-extra-col:last-child {
    text-align: left;
  }
}

/* ===== Résumé page ===== */
.resume-layout {
  padding-top: 48px;
  max-width: 620px;
}

.resume-intro {
  font-size: 30px;
  line-height: 1.25;
  margin-bottom: 24px;
}

.resume-back {
  margin-top: 40px;
}

/* ===== Gallery section: plain image grid ===== */
.gallery-grid {
  column-count: 2;
  column-gap: 32px;
}

.gallery-item {
  display: block;
  width: 100%;
  break-inside: avoid;
  margin-bottom: 36px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  text-align: left;
}

.gallery-thumb {
  display: block;
  overflow: hidden;
  background: #fff;
}

.gallery-thumb img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 350ms ease;
}

.gallery-item:hover .gallery-thumb img {
  transform: scale(1.02);
}

.gallery-caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
}

.gallery-title {
  font-family: 'Newsreader', serif;
  font-size: 19px;
  font-weight: 500;
  font-style: normal;
  color: var(--maroon);
}

.gallery-meta {
  flex: 0 0 auto;
  color: var(--muted);
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 12px;
  text-align: right;
}

/* Placeholder shown until a real artwork photo exists at the given path */
.gallery-thumb.img-fallback {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #fff url("../images/pig-outline-only.png") no-repeat center/40% auto;
}

.gallery-thumb.img-fallback img {
  display: none;
}

.gallery-thumb.img-fallback::after {
  content: "image coming soon";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  text-align: center;
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  align-items: safe center;
  justify-content: center;
  padding: 40px;
  overflow-y: auto;
  background: #f7f2ec;
}

.lightbox.open {
  display: flex;
}

.lightbox-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  max-width: 100%;
}

.lightbox-thumbs {
  position: fixed;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 70vh;
  overflow-y: auto;
}

.lightbox-thumbs[hidden] {
  display: none;
}

.lightbox-thumb {
  display: block;
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border: 2px solid transparent;
  border-radius: 0;
  padding: 0;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
}

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

.lightbox-thumb.active {
  border-color: var(--maroon);
}

.lightbox-thumb.img-fallback {
  background: #fff url("../images/pig-outline-only.png") no-repeat center/45% auto;
}

.lightbox-thumb.img-fallback img {
  display: none;
}

.lightbox-img-wrap img {
  display: block;
  max-width: 88vw;
  max-height: 82vh;
  margin: 0 auto;
  object-fit: contain;
  box-shadow: 0 12px 44px rgba(40, 20, 20, 0.16);
}

.lightbox-img-wrap.img-fallback {
  width: 60vw;
  max-width: 520px;
  aspect-ratio: 4 / 3;
  background: #fff url("../images/pig-outline-only.png") no-repeat center/25% auto;
}

.lightbox-img-wrap.img-fallback img {
  display: none;
}

.lightbox-caption {
  margin: 0;
  text-align: center;
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.lightbox-caption #lb-title {
  font-family: 'Newsreader', serif;
  font-size: 16px;
  font-weight: 500;
}

.lightbox-caption-sep,
.lightbox-caption #lb-meta {
  color: var(--muted);
}

.lightbox-desc {
  margin: -6px 0 0;
  max-width: 560px;
  text-align: center;
  font-size: 15px;
  line-height: 1.6;
  white-space: pre-line;
  color: rgba(122, 85, 88, 0.85);
}

.lightbox-desc[hidden] {
  display: none;
}

.lightbox-close {
  position: fixed;
  right: 28px;
  top: 24px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 6px 18px rgba(40, 20, 20, 0.16);
  cursor: pointer;
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
}

/* ===== Footer (shared across every page) ===== */
.page-footer {
  width: min(1180px, calc(100% - 64px));
  margin: 0 auto;
  padding: clamp(30px, 4vw, 46px) 0 clamp(24px, 3vw, 34px);
  border-top: 1px solid #e8d0d3;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-credit {
  margin: 0;
  font-style: italic;
  font-size: 17px;
  color: var(--maroon);
}

.footer-credit .heart {
  font-style: normal;
}

.footer-links {
  display: flex;
  gap: clamp(20px, 4vw, 40px);
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 18px;
  transition: color 180ms ease;
}

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

@media (max-width: 760px) {
  .site-header {
    min-height: auto;
    padding: 18px 16px 12px;
  }

  .header-social {
    display: none;
  }

  .inner-page {
    width: calc(100% - 32px);
    min-height: calc(100vh - 160px);
    padding: 42px 0 56px;
  }

  .section-heading h1 {
    font-size: 68px;
  }

  .gallery-grid {
    column-count: 1;
  }

  .lightbox {
    flex-direction: column;
    padding: 54px 18px 70px;
    gap: 16px;
  }

  .lightbox-thumbs {
    position: static;
    transform: none;
    flex-direction: row;
    max-height: none;
    overflow-x: auto;
    overflow-y: visible;
    padding-bottom: 4px;
  }

  .lightbox-thumb {
    width: 56px;
    height: 56px;
  }

  .lightbox-img-wrap img {
    max-height: 54vh;
  }

  .page-footer {
    width: calc(100% - 32px);
  }

  .footer-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
