/* ===================================================
   LAVEY LAI — PORTFOLIO
   =================================================== */

/* ----- Reset & Base ----- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:          #FEFAE0;
  --white:       #FFFEF5;
  --text:        #1C290D;
  --text-sub:    #736046;
  --border:      rgba(28, 41, 13, 0.10);
  --tag-bg:      rgba(103, 111, 83, 0.10);
  --gold:        #676F53;
  --sage:        #B3B49A;
  --dark:        #1C290D;
  --radius:      10px;
  --nav-h:       72px;
  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

/* ----- Typography ----- */
h1, h2, h3 {
  font-family: 'Playfair Display', Georgia, serif;
  line-height: 1.1;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 500; letter-spacing: -0.02em; }
h3 { font-size: 1.2rem; font-weight: 600; }

/* ----- Layout ----- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}
.section { padding: 96px 0; }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}
.section-label::before {
  content: '+';
  font-size: 0.9rem;
  font-weight: 400;
  opacity: 0.6;
}

.section-header { margin-bottom: 3.5rem; }
.section-header h2 { margin-bottom: 0.75rem; }
.section-header p  { color: var(--text-sub); max-width: 480px; line-height: 1.75; }


/* =====================================================
   NAVIGATION
   ===================================================== */
#navbar {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(28, 41, 13, 0.0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  border-bottom: 1px solid transparent;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease), backdrop-filter 0.4s;
}
#navbar .nav-logo     { color: #FEFAE0; }
#navbar .nav-links a  { color: rgba(254,250,224,0.5); }
#navbar .nav-links a:hover,
#navbar .nav-links a.active { color: #FEFAE0; }
#navbar .nav-links a::after { background: #FEFAE0; }
#navbar .nav-toggle span    { background: #FEFAE0; }

#navbar.scrolled {
  background: rgba(254, 250, 224, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
  box-shadow: 0 1px 0 var(--border), 0 4px 24px rgba(28,41,13,0.06);
}
#navbar.scrolled .nav-logo    { color: var(--text); }
#navbar.scrolled .nav-links a { color: var(--text-sub); }
#navbar.scrolled .nav-links a:hover,
#navbar.scrolled .nav-links a.active { color: var(--text); }
#navbar.scrolled .nav-links a::after { background: var(--text); }
#navbar.scrolled .nav-toggle span    { background: var(--text); }

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}
.nav-links a {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-sub);
  transition: color 0.2s var(--ease);
  position: relative;
  padding-bottom: 2px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--text);
  transition: width 0.25s var(--ease);
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.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: 1.5px;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }


/* =====================================================
   HERO
   ===================================================== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background: #1C290D;
  color: #FEFAE0;
}

/* Layered radial gradient atmosphere */
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 75% at 78% 35%, rgba(103,111,83,0.22) 0%, transparent 65%),
    radial-gradient(ellipse 40% 50% at 12% 85%, rgba(179,180,154,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 30% 40% at 50% 100%, rgba(56,29,3,0.35) 0%, transparent 70%);
  z-index: 0;
}

/* Signature: oversized ghost "LL" watermark */
.hero::after {
  content: 'LL';
  position: absolute;
  right: -0.08em;
  bottom: -0.12em;
  font-family: 'Playfair Display', serif;
  font-size: clamp(18rem, 42vw, 40rem);
  font-style: italic;
  font-weight: 700;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(179,180,154,0.11);
  letter-spacing: -0.06em;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 4rem) 2rem 5rem;
  display: grid;
  grid-template-columns: 1.45fr 0.55fr;
  gap: 4rem;
  align-items: center;
}

/* Role eyebrow */
.hero-greeting {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #B3B49A;
  margin-bottom: 1.75rem;
}
.hero-plus {
  color: #676F53;
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1;
  flex-shrink: 0;
}

/* Massive display title */
.hero-name {
  font-size: clamp(5.5rem, 14vw, 12rem);
  line-height: 0.9;
  letter-spacing: -0.045em;
  margin-bottom: 2.25rem;
  color: #FEFAE0;
}
.hero-iam {
  display: block;
  font-size: 0.2em;
  font-style: italic;
  font-weight: 400;
  color: rgba(179,180,154,0.4);
  letter-spacing: -0.01em;
  line-height: 2.5;
  margin-bottom: -0.15em;
}

.hero-tagline {
  font-size: 0.78rem;
  color: rgba(254,250,224,0.35);
  letter-spacing: 0.08em;
  margin-bottom: 3rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.hero .btn-outline {
  border-color: rgba(254,250,224,0.28);
  color: rgba(254,250,224,0.75);
}
.hero .btn-outline:hover {
  background: rgba(254,250,224,0.06);
  border-color: rgba(254,250,224,0.5);
  color: #FEFAE0;
  transform: translateY(-2px);
}

/* Photo — editorial rectangular crop */
.hero-image {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  position: relative;
}
.hero-image::before {
  content: '';
  position: absolute;
  inset: 14px -14px -14px 14px;
  border: 1px solid rgba(179,180,154,0.15);
  border-radius: 6px;
  z-index: 0;
}
.hero-img-wrap {
  position: relative;
  z-index: 1;
  width: 200%;
  max-width: 600px;
}
.hero-image img {
  width: 100%;
  aspect-ratio: 3 / 4.2;
  object-fit: cover;
  object-position: center top;
  border-radius: 4px;
  display: block;
  filter: grayscale(8%) contrast(1.04);
  box-shadow:
    0 2px 4px rgba(0,0,0,0.08),
    0 12px 40px rgba(0,0,0,0.28),
    0 32px 80px rgba(0,0,0,0.16);
}
/* Sage colour wash over photo */
.hero-img-overlay {
  position: absolute;
  inset: 0;
  border-radius: 4px;
  background: linear-gradient(160deg, rgba(103,111,83,0.2) 0%, transparent 55%);
  pointer-events: none;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(254,250,224,0.25);
  z-index: 1;
  opacity: 0;
  animation:
    fadeInOnly 0.5s ease 1.1s forwards,
    float 2.8s ease-in-out 1.7s infinite;
}
@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}


/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.7rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn-primary {
  background: var(--text);
  color: #FEFAE0;
  border-color: var(--text);
}
.btn-primary:hover {
  background: #2A3E14;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(28,41,13,0.18), 0 12px 32px rgba(28,41,13,0.10);
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: rgba(28,41,13,0.35);
}
.btn-outline:hover {
  background: var(--text);
  color: #FEFAE0;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(28,41,13,0.14);
}


/* =====================================================
   ABOUT
   ===================================================== */
.about { background: var(--white); padding: 64px 0 48px; }

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: start;
}

.about-text .section-label { margin-bottom: 0.75rem; }
.about-text h2  { margin-bottom: 1.5rem; }
.about-text p {
  color: var(--text-sub);
  line-height: 1.85;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.about-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}
.contact-link {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.contact-link:hover { border-color: var(--text); }

.skills-column .section-label { margin-bottom: 1.1rem; }
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.skill-item {
  background: var(--tag-bg);
  border: 1px solid var(--border);
  padding: 0.35rem 0.8rem;
  border-radius: 100px;
  font-size: 0.75rem;
  color: var(--text-sub);
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
  cursor: default;
}
.skill-item:hover {
  background: var(--text);
  color: var(--white);
  border-color: var(--text);
}


/* =====================================================
   PORTFOLIO
   ===================================================== */
.portfolio { background: #ffffff; }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7rem;
}

.project-card {
  background: #ffffff;
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 2px 4px rgba(28,41,13,0.04),
    0 8px 24px rgba(28,41,13,0.07),
    0 24px 48px rgba(28,41,13,0.06);
}

/* Wide featured cards */
.project-card.featured,
.project-card.featured-alt {
  grid-column: 1 / -1;
  flex-direction: row;
}
.project-card.featured-alt { flex-direction: row-reverse; }

.project-image {
  overflow: hidden;
  flex-shrink: 0;
}
.project-card:not(.featured):not(.featured-alt) .project-image {
  aspect-ratio: 4 / 5;
  width: 100%;
}
.project-card.featured .project-image {
  width: 50%;
  min-height: 560px;
  aspect-ratio: auto;
}
/* Stacked cards interaction */
.stacked-cards-wrap {
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: #ffffff;
}

.stacked-cards {
  position: relative;
  width: 380px;
  height: 540px;
  flex-shrink: 0;
}
.shelfsense-card.project-card.featured .project-image {
  min-height: 720px;
}
.shelfsense-card .stacked-cards {
  width: 390px;
  height: 540px;
}

/* Video project image panels — replaces inline styles */
.video-project-image {
  width: 65%;
  min-height: 350px;
  background: #ffffff;
  display: flex !important;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.video-project-image video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Project info preview images */
.project-info-img {
  width: 100%;
  max-width: 280px;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 1rem;
  display: block;
}

.sc {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 12px;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sc-1 { z-index: 3; cursor: pointer; }
.sc-2 { z-index: 2; }
.sc-3 { z-index: 1; }

.sc-img {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 12px;
}

.sc-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.stacked-cards.spread .sc-2 {
  transform: translateX(-60px) rotate(-15deg);
}
.stacked-cards.spread .sc-3 {
  transform: translateX(60px) rotate(15deg);
}
.project-card.featured-alt .project-image {
  width: 50%;
  min-height: 660px;
}
.community-card.project-card.featured-alt .project-image {
  width:50%;
  min-height: 0;
  max-height: 380px;
  aspect-ratio: auto;
}

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


.project-info {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.project-card.featured .project-info,
.project-card.featured-alt .project-info {
  padding: 2.5rem 2.75rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
}
.project-tags span {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  background: var(--tag-bg);
  color: var(--text-sub);
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  border: 1px solid var(--border);
}
.project-tags .tag-award {
  background: rgba(103,111,83,0.12);
  color: var(--gold);
  border-color: rgba(103,111,83,0.25);
}


.project-card h3 { margin-bottom: 0.3rem; line-height: 1.2; font-size: 1.6rem; font-weight: 700; }

.project-subtitle {
  font-size: 0.75rem;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 0.75rem;
}
.project-desc {
  font-size: 0.875rem;
  color: var(--text-sub);
  line-height: 1.78;
  margin-bottom: 1.35rem;
  flex: 1;
}
/* Animated "View Project" button */
.proj-btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  background: var(--text);
  color: var(--white);
  padding: 0.6rem 2rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow 0.2s var(--ease);
}
.proj-btn:hover {
  box-shadow: 0 4px 16px rgba(28,41,13,0.22);
}
.proj-btn:active .proj-btn-icon {
  transform: scale(0.95);
}
.proj-btn-text {
  margin-right: 2rem;
  transition: opacity 0.5s var(--ease);
  white-space: nowrap;
}
.proj-btn:hover .proj-btn-text {
  opacity: 0;
}
.proj-btn-icon {
  position: absolute;
  right: 0.25rem;
  top: 0.25rem;
  bottom: 0.25rem;
  border-radius: 3px;
  z-index: 10;
  display: grid;
  place-items: center;
  width: 25%;
  background: rgba(255,255,255,0.15);
  transition: width 0.5s var(--ease), transform 0.15s var(--ease);
  font-style: normal;
}
.proj-btn:hover .proj-btn-icon {
  width: calc(100% - 0.5rem);
}


/* =====================================================
   COMMUNITY MARQUEE
   ===================================================== */
.community {
  background: var(--bg);
  overflow: hidden;
  padding: 72px 0 5rem;
}
.community .container { padding-bottom: 2rem; }

.marquee-outer {
  width: 100%;
  overflow: hidden;
}
.marquee-track {
  display: flex;
  gap: 0.75rem;
  width: max-content;
  animation: marquee-scroll 50s linear infinite;
}
.marquee-track img {
  height: 280px;
  width: auto;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  display: block;
  filter: saturate(0.9);
  transition: filter 0.4s var(--ease), transform 0.4s var(--ease);
}
.marquee-track img:hover {
  filter: saturate(1.05);
  transform: scale(1.02);
}
.marquee-outer:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes marquee-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (max-width: 640px) {
  .marquee-track img { height: 200px; }
}


/* =====================================================
   PHOTOGRAPHY
   ===================================================== */
.photography {
  background: #1C290D;
  color: #FEFAE0;
}
.photography .section-label { color: rgba(179,180,154,0.55); }
.photography .section-header p { color: rgba(254,250,224,0.45); }
.photography h2 { color: #FEFAE0; }

.photo-view-all {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(179,180,154,0.7);
  text-decoration: none;
  border-bottom: 1px solid rgba(179,180,154,0.25);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.photo-view-all span { transition: transform 0.2s ease; }
.photo-view-all:hover {
  color: #FEFAE0;
  border-color: rgba(179,180,154,0.6);
}
.photo-view-all:hover span { transform: translateX(3px); }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 210px;
  gap: 0.5rem;
}
.photo-item {
  overflow: hidden;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
}
.photo-item:nth-child(4n+1) { grid-row: span 2; }

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--ease);
}
.photo-item:hover img { transform: scale(1.06); }

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.96);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.lightbox.active { display: flex; }

#lightbox-img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  transition: color 0.2s var(--ease);
  line-height: 1;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { color: white; }

.lightbox-close { top: 1.5rem; right: 1.75rem; font-size: 2.4rem; }
.lightbox-prev  { left: 1.5rem;  top: 50%; transform: translateY(-50%); font-size: 3rem; }
.lightbox-next  { right: 1.5rem; top: 50%; transform: translateY(-50%); font-size: 3rem; }


/* =====================================================
   LITERATURE
   ===================================================== */
.literature { background: var(--white); }

.lit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: start;
}
.lit-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.lit-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(28,41,13,0.06), 0 16px 40px rgba(28,41,13,0.05);
}

.lit-featured {
  background: #1C290D;
  color: #FEFAE0;
  border-color: #1C290D;
}

.lit-cover {
  position: relative;
  margin: -2rem -2rem 1.5rem;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
}
.lit-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.6s var(--ease);
}
.lit-card:hover .lit-cover img { transform: scale(1.04); }
.lit-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(28,41,13,0.72) 0%, transparent 55%);
}

.lit-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: var(--gold);
  color: white;
  padding: 0.2rem 0.55rem;
  border-radius: 100px;
  margin-bottom: 0.85rem;
  align-self: flex-start;
}
.lit-source {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-sub);
  margin-bottom: 0.6rem;
}
.lit-featured .lit-source { color: rgba(254,250,224,0.35); }

.lit-card h3 { font-size: 1.15rem; margin-bottom: 0.3rem; line-height: 1.2; }

.lit-type {
  font-size: 0.78rem;
  color: var(--gold);
  font-style: italic;
  margin-bottom: 0.85rem;
}
.lit-card p {
  font-size: 0.875rem;
  color: var(--text-sub);
  line-height: 1.78;
  margin-bottom: 1.5rem;
  flex: 1;
}
.lit-featured p { color: rgba(254,250,224,0.55); }
.lit-featured .project-link {
  color: rgba(254,250,224,0.75);
  border-color: rgba(254,250,224,0.2);
}
.lit-featured .project-link:hover {
  color: #B3B49A;
  border-color: #B3B49A;
}


/* =====================================================
   CONTACT
   ===================================================== */
.contact { background: var(--bg); }

.contact-inner { max-width: 560px; }
.contact-inner h2 { margin: 0.5rem 0 1rem; }
.contact-inner > p {
  color: var(--text-sub);
  font-size: 0.95rem;
  line-height: 1.85;
  margin-bottom: 2.25rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.social-links {
  display: flex;
  gap: 1.75rem;
}
.social-links a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-sub);
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.social-links a:hover {
  color: var(--text);
  border-color: var(--text);
}


/* =====================================================
   FOOTER
   ===================================================== */
footer {
  background: #1C290D;
  color: rgba(254,250,224,0.75);
  padding: 2.25rem 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: #FEFAE0;
}
.footer-copy { font-size: 0.75rem; color: rgba(254,250,224,0.28); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a {
  font-size: 0.75rem;
  color: rgba(254,250,224,0.38);
  transition: color 0.2s var(--ease);
}
.footer-links a:hover { color: #FEFAE0; }


/* =====================================================
   HERO ENTRANCE ANIMATIONS
   ===================================================== */

/* Initial hidden states — hero-loaded class triggers reveals */
.hero-greeting,
.hero-name,
.hero-tagline,
.hero-actions,
.hero-img-wrap {
  opacity: 0;
}

.hero-loaded .hero-greeting {
  animation: fadeUp 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.06s forwards;
}
.hero-loaded .hero-name {
  animation: fadeUpBig 0.95s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}
.hero-loaded .hero-tagline {
  animation: fadeUp 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.44s forwards;
}
.hero-loaded .hero-actions {
  animation: fadeUp 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.58s forwards;
}
.hero-loaded .hero-img-wrap {
  animation: fadeInRight 1.05s cubic-bezier(0.16, 1, 0.3, 1) 0.32s forwards;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUpBig {
  from { opacity: 0; transform: translateY(36px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInOnly {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Ambient hero bg drift — subtle breathing */
@keyframes bgDrift {
  0%, 100% { transform: scale(1) translate(0, 0); }
  50%       { transform: scale(1.05) translate(-1%, 1.5%); }
}
.hero-bg {
  animation: bgDrift 18s ease-in-out infinite;
}

/* =====================================================
   SCROLL ANIMATIONS
   ===================================================== */
.fade-up {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
  transition-delay: var(--fd, 0ms);
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =====================================================
   REDUCED MOTION
   ===================================================== */
@media (prefers-reduced-motion: reduce) {
  .hero-greeting,
  .hero-name,
  .hero-tagline,
  .hero-actions,
  .hero-img-wrap { opacity: 1; animation: none !important; }
  .hero-bg       { animation: none; }
  .scroll-indicator { animation: none !important; opacity: 1; }
  .fade-up       { opacity: 1; transform: none; transition: none; }
}


/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 960px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: left;
    gap: 3rem;
    padding-top: calc(var(--nav-h) + 2.5rem);
  }
  .hero-image {
    justify-content: flex-start;
    order: -1;
  }
  .hero-img-wrap { max-width: 260px; }
  .hero-actions { justify-content: flex-start; }
  .scroll-indicator { display: none; }

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

  .projects-grid { grid-template-columns: 1fr; }
  .project-card.featured,
  .project-card.featured-alt {
    flex-direction: column;
  }
  .project-card.featured .project-image,
  .project-card.featured-alt .project-image {
    width: 100% !important;
    min-height: 220px;
    aspect-ratio: 16 / 9;
  }
  .video-project-image {
    width: 100% !important;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
  .shelfsense-card.project-card.featured .project-image { min-height: 0; aspect-ratio: 4/3; }
  .stacked-cards { width: 100%; max-width: 320px; height: 400px; }
  .shelfsense-card .stacked-cards { width: 100%; max-width: 300px; height: 400px; }
  .project-info-img { max-width: 180px; }

  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 180px;
  }
  .photo-item:nth-child(4n+1) { grid-row: span 1; }

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

@media (max-width: 640px) {
  .section { padding: 70px 0; }

  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: #1C290D;
    border-bottom: 1px solid rgba(179,180,154,0.12);
    padding: 1.5rem 2rem;
    gap: 1.25rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.22);
  }
  .nav-links.open a { color: rgba(254,250,224,0.65) !important; }
  #navbar.scrolled .nav-links.open { background: #FEFAE0; border-color: var(--border); }
  #navbar.scrolled .nav-links.open a { color: var(--text-sub) !important; }
  .nav-toggle { display: flex; }

  .hero-name { font-size: clamp(3.5rem, 15vw, 6rem); }

  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 140px;
  }

  .footer-inner { flex-direction: column; text-align: center; }
}
