/* ============================================================
   styles.css — Albert Du personal site
   ============================================================ */

/* ============================================================
   1. CUSTOM PROPERTIES
   ============================================================ */
:root {
  --bg:           #F7F2EB;
  --surface:      #EDE6DA;
  --surface-2:    #E2D9CC;
  --text:         #1C1917;
  --text-muted:   #78706A;
  --text-subtle:  #A89E98;
  --accent:       #7B5CBF;
  --accent-dim:   #9E84D0;
  --accent-bg:    rgba(123, 92, 191, 0.08);
  --border:       #DDD5C8;

  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body:    'DM Sans', system-ui, -apple-system, sans-serif;

  --container:    1160px;
  --gap:          clamp(2rem, 5vw, 4rem);
  --section-gap:  clamp(5rem, 10vw, 9rem);

  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --transition:  0.25s var(--ease-in-out);
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  background-color: #f7f2eb; /* matches var(--bg) — fills iOS safe area behind Dynamic Island */
}

/* Scale base font up on larger screens so rem-based sizes grow with it */
@media (min-width: 1280px) { html { font-size: 17px; } }
@media (min-width: 1600px) { html { font-size: 18px; } }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Explicit safe-area fill: covers the Dynamic Island / notch zone on all pages */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: env(safe-area-inset-top);
  background: var(--bg);
  z-index: 9999;
  pointer-events: none;
}

body.leaving {
  opacity: 0;
  transition: opacity 0.3s var(--ease-in-out);
}

/* Grain texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 300px 300px;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ============================================================
   3. PAGE LOADER
   ============================================================ */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out), visibility 0.3s;
}

.page-loader.done {
  opacity: 0;
  visibility: hidden;
}

.loader-svg {
  overflow: visible;
}

.lc-inner {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-dasharray: 50.27;
  stroke-dashoffset: 50.27;
  animation: lcDraw 0.4s var(--ease-out) 0.06s forwards;
  transform-origin: center;
  transform-box: fill-box;
}

.lc-outer {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1;
  opacity: 0.4;
  stroke-dasharray: 125.66;
  stroke-dashoffset: 125.66;
  animation: lcDraw 0.55s var(--ease-out) 0.18s forwards;
  transform-origin: center;
  transform-box: fill-box;
}

@keyframes lcDraw {
  to { stroke-dashoffset: 0; }
}

/* ============================================================
   4. TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.label::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* ============================================================
   5. LAYOUT UTILITIES
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

.section { padding-block: var(--section-gap); }

/* ============================================================
   6. SCROLL ANIMATIONS
   ============================================================ */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-up:nth-child(1) { transition-delay: 0s; }
.fade-up:nth-child(2) { transition-delay: 0.08s; }
.fade-up:nth-child(3) { transition-delay: 0.16s; }
.fade-up:nth-child(4) { transition-delay: 0.24s; }
.fade-up:nth-child(5) { transition-delay: 0.32s; }

/* ============================================================
   7. NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  /* Always fill the safe area (Dynamic Island / notch) with the page bg */
  background-color: var(--bg);
  padding-top: max(1.1rem, calc(1.1rem + env(safe-area-inset-top)));
  padding-bottom: 1.1rem;
  transition: background-color 0.3s var(--ease-in-out), box-shadow 0.3s var(--ease-in-out);
}

.nav.scrolled {
  background-color: rgba(247, 242, 235, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  flex-shrink: 0;
  transition: opacity var(--transition);
}

.nav-logo:hover { opacity: 0.6; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-muted);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  transition: color var(--transition), background-color var(--transition);
}

.nav-links a:hover,
.nav-links a.active { color: var(--text); background-color: var(--accent-bg); }
.nav-links a.active { color: var(--accent); }

.nav-resume {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  flex-shrink: 0;
  transition: background-color var(--transition), color var(--transition);
}

.nav-resume:hover { background-color: var(--accent); color: white; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  gap: 5px;
  border-radius: 6px;
  transition: background-color var(--transition);
}

.nav-toggle:hover { background-color: var(--surface); }

.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background-color: var(--text);
  transition: transform 0.3s var(--ease-out), opacity 0.3s;
  transform-origin: center;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-mobile {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: rgba(247, 242, 235, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s var(--ease-out), opacity 0.3s var(--ease-out);
}

.nav-mobile.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.nav-mobile ul { list-style: none; }

.nav-mobile a {
  display: block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  color: var(--text-muted);
  transition: color var(--transition), background-color var(--transition);
}

.nav-mobile a:hover { color: var(--text); background-color: var(--surface); }

.nav-mobile a.nav-mobile-cv { color: var(--accent); }
.nav-mobile a.nav-mobile-cv:hover { color: var(--accent); background-color: var(--accent-bg); }

/* ============================================================
   8. HERO
   ============================================================ */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 6rem;
  padding-bottom: 4rem;
  position: relative;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 3rem;
  width: 100%;
  position: relative;
  z-index: 1;
}

.hero-content { max-width: 720px; }

.hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeSlideUp 0.6s var(--ease-out) 0.9s forwards;
}

.hero-title {
  font-size: clamp(3.2rem, 6.5vw, 5rem);
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 1.5rem;
  white-space: nowrap; /* always one line on two-column desktop layout */
}

.hero-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(24px);
  animation: wordReveal 0.75s var(--ease-out) forwards;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-muted);
  max-width: 440px;
  font-weight: 300;
  line-height: 1.65;
  opacity: 0;
  animation: fadeSlideUp 0.6s var(--ease-out) 1.65s forwards;
}

.hero-scroll {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 3rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-subtle);
  opacity: 0;
  animation: fadeSlideUp 0.6s var(--ease-out) 2s forwards;
  transition: color var(--transition);
}

.hero-scroll:hover { color: var(--accent); }
.hero-scroll svg { animation: scrollBounce 2s var(--ease-in-out) infinite 2.5s; }

.hero-image-wrap {
  position: relative;
  flex-shrink: 0;
  max-width: clamp(220px, 22vw, 360px);
  margin-right: clamp(0.5rem, 2vw, 2rem);
  opacity: 0;
  animation: fadeSlideUp 0.8s var(--ease-out) 1.1s forwards;
}

.hero-image-wrap img {
  width: 100%;
  height: auto;
  display: block;
  visibility: hidden; /* hidden but holds layout space as fallback */
}

.hero-image-anim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  pointer-events: none;
  user-select: none;
  display: block;
  /* Fade all four edges so the video rectangle boundary is invisible */
  -webkit-mask-image:
    linear-gradient(to right,  transparent 0%, black 5%, black 95%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, black 5%, black 95%, transparent 100%);
  mask-image:
    linear-gradient(to right,  transparent 0%, black 5%, black 95%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, black 5%, black 95%, transparent 100%);
  -webkit-mask-composite: destination-in;
  mask-composite: intersect;
}

/* hide any browser-injected video UI */
.hero-image-anim::-webkit-media-controls             { display: none !important; }
.hero-image-anim::-webkit-media-controls-enclosure   { display: none !important; }
.hero-image-anim::-webkit-media-controls-panel        { display: none !important; }

/* ============================================================
   9. MARQUEE
   ============================================================ */
.marquee-section {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding-block: 1rem;
  background-color: var(--surface);
}

.marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: marquee 40s linear infinite;
}

.marquee-track:hover { animation-play-state: paused; }

.marquee-item {
  padding-inline: 1.5rem;
  font-family: var(--font-display);
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  font-style: italic;
  color: var(--text-muted);
  white-space: nowrap;
}

.marquee-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: var(--accent);
  flex-shrink: 0;
}

/* ============================================================
   10. SECTION HEADERS
   ============================================================ */
.section-header { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-header .label { margin-bottom: 0.75rem; }
.section-header h2 { font-size: clamp(2rem, 4vw, 3.2rem); color: var(--text); }

/* ============================================================
   11. ABOUT SECTION
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  align-items: start;
}

.about-bio {
  font-size: clamp(1.05rem, 1.15vw, 1.15rem);
  color: var(--text-muted);
  line-height: 1.85;
}

.about-bio p + p { margin-top: 1.25rem; }

.about-bio a {
  color: var(--accent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  transition: border-color var(--transition);
}

.about-bio a:hover { border-color: var(--accent); }

/* Interest cards — 2-column grid */
.about-aside {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.interest-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.4rem 1.2rem;
  position: relative;
  overflow: hidden;
  cursor: default;
  transition: border-color 0.35s, box-shadow 0.35s;
  will-change: transform;
}

/* Holographic shimmer overlay */
.interest-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    ellipse 80% 60% at var(--holo-x, 50%) var(--holo-y, 50%),
    rgba(255, 255, 255, 0.38) 0%,
    rgba(255, 255, 255, 0.12) 40%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.interest-card.holo-active {
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  box-shadow: 0 8px 32px rgba(123, 92, 191, 0.15);
}

.interest-card.holo-active::before {
  opacity: 1;
}

.interest-card-wide {
  grid-column: 1 / -1;
}

.interest-card-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 0.3rem;
}

.interest-card-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============================================================
   12. PHOTOGRAPHY TEASER
   ============================================================ */
.photo-teaser {
  background-color: var(--surface);
  border-radius: 12px;
  padding: clamp(2rem, 5vw, 4rem);
  overflow: hidden;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.photo-placeholder {
  background-color: var(--surface-2);
  border-radius: 6px;
  overflow: hidden;
  transition: transform var(--transition), opacity var(--transition);
}

.photo-placeholder:nth-child(2) { margin-top: 1.5rem; }
.photo-placeholder:nth-child(3) { margin-top: -1rem; }
.photo-placeholder:hover { transform: scale(0.98); opacity: 0.85; }

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

.photo-teaser-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.photo-teaser-caption {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.6;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  padding-bottom: 1px;
  transition: gap var(--transition), border-color var(--transition);
  white-space: nowrap;
}

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

/* ============================================================
   13. SERVICES SECTION
   ============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.service-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.service-card:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  box-shadow: 0 8px 32px rgba(123, 92, 191, 0.08);
  transform: translateY(-3px);
}

.service-card-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background-color: var(--accent-bg);
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  align-self: flex-start;
}

@keyframes status-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.2; }
}

.service-card-tag svg {
  animation: status-blink 2.6s ease-in-out infinite;
}

.service-card h3 { font-size: clamp(1.5rem, 2.5vw, 2rem); color: var(--text); }

.service-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.75;
  flex: 1;
}

/* "a wide range of texts" trigger */
.texts-trigger {
  display: inline;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: inherit;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
  text-underline-offset: 2px;
  cursor: pointer;
  transition: text-decoration-color var(--transition);
  position: relative;
}

.texts-trigger:hover {
  text-decoration-color: var(--accent);
}

/* Tooltip via pseudo-element */
.texts-trigger::after {
  content: 'Click to see full list of texts...';
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--text);
  color: var(--bg);
  font-size: 0.72rem;
  font-weight: 400;
  white-space: nowrap;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  font-family: var(--font-body);
}

.texts-trigger::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  border: 5px solid transparent;
  border-top-color: var(--text);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
}

.texts-trigger:hover::after,
.texts-trigger:focus::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.texts-trigger:hover::before,
.texts-trigger:focus::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.service-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  margin-top: 0.5rem;
  transition: gap var(--transition);
}

.service-cta:hover { gap: 0.75rem; }

.services-note {
  font-size: 0.875rem;
  color: var(--text-subtle);
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  line-height: 1.7;
}

.services-note a {
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  transition: color var(--transition), border-color var(--transition);
}

.services-note a:hover { color: var(--accent); border-color: var(--accent); }

/* ============================================================
   14. MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(18, 14, 12, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-in-out);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: clamp(1.75rem, 4vw, 2.5rem);
  max-width: 480px;
  width: 100%;
  position: relative;
  transform: translateY(16px);
  transition: transform 0.35s var(--ease-out);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
  cursor: pointer;
  border: none;
  font-family: var(--font-body);
}

.modal-close:hover { background: var(--surface-2); color: var(--text); }

.modal-eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--text);
  margin-bottom: 1.25rem;
  padding-right: 2rem;
}

.modal-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.modal-list li {
  font-size: 0.925rem;
  color: var(--text-muted);
  padding: 0.25rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  line-height: 1.4;
}

.modal-list li::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-dim);
  flex-shrink: 0;
}

.modal-note {
  font-size: 0.85rem;
  font-style: italic;
  font-family: var(--font-display);
  color: var(--text-muted);
  line-height: 1.6;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

/* ============================================================
   15. TIMELINE
   ============================================================ */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), var(--border), transparent);
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
}

.timeline-item:last-child { padding-bottom: 0; }

/* Dot exactly centred on the 1px line */
.timeline-dot {
  position: absolute;
  left: calc(-2rem - 4px);
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--bg);
  border: 2px solid var(--accent);
  transition: background-color var(--transition), transform var(--transition);
}

.timeline-item:hover .timeline-dot {
  background-color: var(--accent);
  transform: scale(1.3);
}

.timeline-date {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.timeline-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.timeline-org {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.timeline-bullets {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.5rem;
}

.timeline-bullets li {
  font-size: 0.95rem;
  color: var(--text-subtle);
  padding-left: 1rem;
  position: relative;
}

.timeline-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: var(--accent-dim);
}

/* ============================================================
   15b. CV SHIMMER BUTTON (Background section)
   ============================================================ */
.cv-shimmer-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  position: relative;
  padding: 0.75rem 2rem;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.3s, color 0.3s;
}

.cv-shimmer-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 20%,
    rgba(255,255,255,0.55) 50%,
    transparent 80%
  );
  animation: cv-shimmer 3.2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes cv-shimmer {
  0%   { left: -70%; }
  50%  { left: 120%; }
  100% { left: 120%; }
}

.cv-shimmer-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================================================
   16. CONTACT SECTION
   ============================================================ */
.contact-section {
  text-align: center;
  padding-block: var(--section-gap);
  border-top: 1px solid var(--border);
}

.contact-heading {
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-family: var(--font-display);
  color: var(--text);
  margin-bottom: 1.25rem;
}

.contact-body {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-inline: auto;
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

.contact-email {
  display: inline-block;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-family: var(--font-display);
  font-style: italic;
  color: var(--accent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  padding-bottom: 2px;
  transition: letter-spacing var(--transition), border-color var(--transition);
  margin-bottom: 3rem;
}

.contact-email:hover { letter-spacing: 0.01em; border-color: var(--accent); }

.social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: background-color var(--transition), border-color var(--transition),
              color var(--transition), transform var(--transition);
}

.social-link:hover {
  background-color: var(--accent);
  border-color: var(--accent);
  color: white;
  transform: translateY(-3px);
}

.social-link svg { width: 18px; height: 18px; }

/* ============================================================
   17. FOOTER
   ============================================================ */
.footer { border-top: 1px solid var(--border); padding-block: 2rem; }

.footer-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-copyright {
  font-size: 0.8rem;
  color: var(--text-subtle);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-subtle);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

.footer-back {
  font-size: 0.8rem;
  color: var(--text-subtle);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color var(--transition);
}

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

/* ============================================================
   18. PHOTOGRAPHY PAGE — HEADER
   ============================================================ */
.photo-page-header {
  padding-top: 4rem;
  padding-bottom: 0;
  position: relative;
}

.photo-page-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  background-color: var(--bg);
  padding-top: max(1rem, calc(1rem + env(safe-area-inset-top)));
  padding-bottom: 1rem;
  transition: background-color 0.3s, box-shadow 0.3s;
}

.photo-page-nav .nav-inner {
  position: relative;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.photo-page-nav.scrolled {
  background-color: rgba(247, 242, 235, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}

.photo-nav-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text);
  transition: opacity var(--transition);
}

.photo-nav-logo:hover { opacity: 0.6; }

.photo-nav-back {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--transition), gap var(--transition);
}

.photo-nav-back:hover { color: var(--accent); gap: 0.6rem; }

.photo-hero {
  padding-block: clamp(2rem, 4vw, 3.5rem);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2rem;
}

.photo-hero-content { /* left column */ }

.photo-hero-title {
  font-size: clamp(2rem, 4.5vw, 4rem);
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 1rem;
}

.photo-hero-image {
  max-width: clamp(130px, 18vw, 260px);
  flex-shrink: 0;
}

.photo-hero-image img {
  width: 100%;
  height: auto;
  display: block;
  mix-blend-mode: multiply;
}

.photo-hero-sub {
  font-size: 1rem;
  color: var(--text-muted);
  font-style: italic;
  font-family: var(--font-display);
  margin-top: 0.8rem;
}

.insta-shimmer-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1.2rem;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 400;
  font-style: normal;
  font-family: var(--font-body);
  color: var(--text-muted);
  background: var(--surface);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  transition: border-color var(--transition), color var(--transition);
}

.insta-shimmer-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 25%,
    rgba(255, 255, 255, 0.52) 50%,
    transparent 75%
  );
  transform: translateX(-100%);
  animation: insta-sweep 3.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes insta-sweep {
  0%   { transform: translateX(-100%); }
  45%  { transform: translateX(200%); }
  100% { transform: translateX(200%); }
}

.insta-shimmer-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================================================
   19. PHOTOGRAPHY — GALLERY
   ============================================================ */
.gallery-section { padding-block: 3rem var(--section-gap); }

.gallery-grid {
  columns: 3 260px;
  column-gap: 1rem;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  width: 100%;
  background-color: var(--surface);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(28, 25, 23, 0);
  transition: background 0.3s var(--ease-out);
  border-radius: 6px;
}

.gallery-item:hover::after { background: rgba(28, 25, 23, 0.1); }

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease-out);
}

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

/* ============================================================
   20. LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(18, 14, 12, 0.94);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-in-out);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lightbox.active { opacity: 1; pointer-events: auto; }

.lightbox-img-wrap {
  max-width: min(90vw, 1200px);
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img-wrap img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 4px;
  object-fit: contain;
  box-shadow: 0 32px 80px rgba(0,0,0,0.5);
}

.lightbox-close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: white;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.15);
  font-family: var(--font-body);
}

.lightbox-close:hover { background: rgba(255,255,255,0.2); }

.lightbox-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.lightbox-btn:hover { background: rgba(255,255,255,0.18); }
.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }
.lightbox-prev:hover { transform: translateY(-50%) translateX(-3px); }
.lightbox-next:hover { transform: translateY(-50%) translateX(3px); }

.lightbox-counter {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.08em;
}

/* ============================================================
   21. 404 PAGE
   ============================================================ */
.not-found {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  gap: 1.5rem;
}

.not-found-num {
  font-size: clamp(6rem, 20vw, 14rem);
  font-family: var(--font-display);
  color: var(--surface-2);
  line-height: 1;
  letter-spacing: -0.04em;
  user-select: none;
}

.not-found-msg {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--text-muted);
  max-width: 420px;
}

.not-found-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  padding: 0.6rem 1.4rem;
  border-radius: 24px;
  transition: background-color var(--transition), color var(--transition);
  margin-top: 0.5rem;
}

.not-found-link:hover { background-color: var(--accent); color: white; }

/* ============================================================
   22. KEYFRAME ANIMATIONS
   ============================================================ */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes wordReveal {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(6px); }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(var(--marquee-offset, -50%)); }
}


/* ============================================================
   23. RESPONSIVE — TABLET (max 768px)
   ============================================================ */
@media (max-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero-image-wrap {
    /* Cap height so the full hero (image + text) fits in one screen on mobile */
    max-width: min(300px, 55vh, 78vw);
    width: 100%;
    margin-inline: auto;
    order: -1;
  }

  .hero-content { text-align: center; }
  .hero-title { white-space: normal; } /* allow wrapping on single-column mobile */
  .hero-sub { margin-inline: auto; }
  .hero-scroll { margin-inline: auto; }

  .about-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }

  .photo-grid { grid-template-columns: 1fr 1fr; }
  .photo-grid .photo-placeholder:nth-child(3) { display: none; }
  .photo-placeholder:nth-child(2) { margin-top: 0; }
  .photo-placeholder:nth-child(3) { margin-top: 0; }
  .photo-teaser-footer { flex-direction: column; align-items: flex-start; }

  .footer-inner { flex-direction: column; align-items: center; text-align: center; gap: 0.5rem; }
  .footer-copy { position: static; transform: none; }

  .gallery-grid { columns: 2 160px; }

  .about-aside { grid-template-columns: 1fr 1fr; }

  /* photo + cv hero: collapse to single column */
  .photo-hero {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .photo-hero-image { max-width: min(150px, 38vw); margin-inline: auto; order: -1; }
}

/* ============================================================
   24. RESPONSIVE — MOBILE (max 480px)
   ============================================================ */
@media (max-width: 480px) {
  .nav-links, .nav-resume { display: none; }
  .nav-toggle { display: flex; }
  .nav-mobile { display: block; }

  .hero {
    padding-top: 5rem;
    padding-bottom: 2rem;
  }

  .hero-inner { gap: 1.5rem; }

  .hero-image-wrap {
    max-width: min(240px, 50vh, 80vw);
  }

  .hero-title { font-size: clamp(2.8rem, 12vw, 4rem); }

  .about-aside { grid-template-columns: 1fr; }
  .interest-card-wide { grid-column: auto; }

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

  .gallery-grid { columns: 1; }

  .lightbox-btn { width: 38px; height: 38px; }
  .lightbox-prev { left: 0.75rem; }
  .lightbox-next { right: 0.75rem; }

  .texts-trigger::after,
  .texts-trigger::before { display: none; }
}

/* ============================================================
   25. REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .marquee-track { animation: none; }
  html { scroll-behavior: auto; }

  .page-loader { display: none; }
}
