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

:root {
  --color-bg: #050508;
  --color-surface: #0e0e14;
  --color-text: #F0EDE8;
  --color-text-dim: #a09e98;
  --color-accent: #C9B99A;
  --color-accent-glow: rgba(201, 185, 154, 0.25);
  --color-accent-bright: #e2d4b5;
  --color-secondary: #6B6B6B;
  --color-border: rgba(240, 237, 232, 0.08);
  --color-border-hover: rgba(201, 185, 154, 0.35);
  --color-glass: rgba(14, 14, 20, 0.7);
  --color-glass-border: rgba(240, 237, 232, 0.06);

  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', sans-serif;
  --max-width: 960px;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

html {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.8;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--color-bg);
  overflow-x: hidden;
  position: relative;
}

/* ─── Particle Canvas ─── */
#particle-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ─── Ambient Gradient Orbs ─── */
.ambient-orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: orbPulse 8s ease-in-out infinite alternate;
}

.ambient-orb--1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(201, 185, 154, 0.15) 0%, transparent 65%);
  top: -5%; right: -15%;
  filter: blur(60px);
}

.ambient-orb--2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(130, 140, 200, 0.10) 0%, transparent 65%);
  bottom: 10%; left: -20%;
  filter: blur(60px);
  animation-delay: 4s;
}

@keyframes orbPulse {
  0%   { opacity: 0.5; transform: scale(1); }
  100% { opacity: 0.8; transform: scale(1.08); }
}

/* ─── Grain Overlay ─── */
.grain-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ─── Custom Cursor ─── */
.cursor-dot {
  position: fixed;
  width: 8px; height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.cursor-dot.visible { opacity: 1; }

.cursor-ring {
  position: fixed;
  width: 36px; height: 36px;
  border: 1.5px solid rgba(201, 185, 154, 0.35);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: width 0.4s var(--ease-spring), height 0.4s var(--ease-spring),
              border-color 0.3s ease, opacity 0.3s ease;
}
.cursor-ring.visible { opacity: 1; }
.cursor-ring.hovering { width: 56px; height: 56px; border-color: var(--color-accent); }

/* ─── Navigation ─── */
.site-nav {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 100;
  padding: 20px 0;
  transition: background 0.4s ease, padding 0.4s ease;
}

.site-nav.scrolled {
  background: var(--color-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-glass-border);
  padding: 14px 0;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
  text-decoration: none;
  transition: color 0.3s ease;
}
.nav-logo:hover { color: var(--color-accent); }

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-link {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-dim);
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--color-accent);
  transition: width 0.4s var(--ease-out-expo);
}
.nav-link:hover { color: var(--color-text); }
.nav-link:hover::after { width: 100%; }

/* ─── Typography ─── */
h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; line-height: 1.2; }
p, span, li, a { font-family: var(--font-sans); }
a { color: var(--color-text); text-decoration: none; transition: color 0.3s ease; }
a:hover { color: var(--color-accent); }

/* ─── Layout ─── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: 40px;
  padding-right: 40px;
  text-align: left;
}

/* UNIFORM section spacing — same for ALL sections */
.section-block {
  padding-top: 100px;
  padding-bottom: 100px;
  position: relative;
  z-index: 2;
}

/* ─── Scroll Reveal ─── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}
.reveal.revealed { opacity: 1; transform: translateY(0); }

.reveal-scale {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}
.reveal-scale.revealed { opacity: 1; transform: scale(1); }

.stagger-children > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s var(--ease-out-expo), transform 0.5s var(--ease-out-expo);
}
.stagger-children.revealed > *:nth-child(1) { transition-delay: 0s;    opacity: 1; transform: translateY(0); }
.stagger-children.revealed > *:nth-child(2) { transition-delay: 0.07s; opacity: 1; transform: translateY(0); }
.stagger-children.revealed > *:nth-child(3) { transition-delay: 0.14s; opacity: 1; transform: translateY(0); }
.stagger-children.revealed > *:nth-child(4) { transition-delay: 0.21s; opacity: 1; transform: translateY(0); }
.stagger-children.revealed > *:nth-child(5) { transition-delay: 0.28s; opacity: 1; transform: translateY(0); }
.stagger-children.revealed > *:nth-child(6) { transition-delay: 0.35s; opacity: 1; transform: translateY(0); }

/* ═══════════════════════════════════════════
   HERO — fits viewport, no extra gap below
   ═══════════════════════════════════════════ */
.hero {
  min-height: 70vh;
  min-height: 70dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 100px;   /* space for nav */
  padding-bottom: 60px;
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: clamp(48px, 9vw, 96px);
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: -0.03em;
  line-height: 1.05;
  opacity: 0;
  transform: translateY(35px);
  animation: heroIn 1s var(--ease-out-expo) 0.3s forwards;
}

.hero-title .text-gradient {
  background: linear-gradient(135deg, var(--color-text) 0%, var(--color-accent) 40%, var(--color-accent-bright) 60%, var(--color-text) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 6s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes heroIn {
  to { opacity: 1; transform: translateY(0); }
}

.hero-subtitle {
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-accent);
  margin-bottom: 16px;
  opacity: 0;
  animation: heroIn 0.8s var(--ease-out-expo) 0.1s forwards;
}

.hero-description {
  font-size: clamp(16px, 2.2vw, 22px);
  color: var(--color-text-dim);
  font-weight: 300;
  margin-bottom: 36px;
  max-width: 560px;
  line-height: 1.7;
  opacity: 0;
  animation: heroIn 0.8s var(--ease-out-expo) 0.6s forwards;
}

.hero-cta-group {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: heroIn 0.8s var(--ease-out-expo) 0.9s forwards;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--color-bg);
  background: var(--color-accent);
  padding: 14px 32px;
  border-radius: 50px;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.4s var(--ease-spring), box-shadow 0.4s ease;
  -webkit-tap-highlight-color: transparent;
}

.hero-cta:hover {
  color: var(--color-bg);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--color-accent-glow);
}

.hero-cta .cta-arrow {
  display: inline-block;
  transition: transform 0.4s var(--ease-spring);
}
.hero-cta:hover .cta-arrow { transform: translateX(4px); }

.hero-link-secondary {
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-dim);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 4px;
  transition: all 0.3s ease;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.hero-link-secondary:hover { color: var(--color-accent); border-color: var(--color-accent); }

/* ─── Section Dividers & Labels ─── */
.section-divider {
  width: 60px; height: 1px;
  background: linear-gradient(to right, var(--color-accent), transparent);
  margin-bottom: 40px;
}

.section-label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-accent);
  margin-bottom: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-label::before {
  content: '';
  display: inline-block;
  width: 24px; height: 1px;
  background: var(--color-accent);
}

.section-heading {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 700;
  margin-bottom: 48px;
  letter-spacing: -0.02em;
}

/* ─── About ─── */
.about-grid { display: block; }

.about-photo-wrapper {
  display: none;
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  border: 1px solid rgba(240, 237, 232, 0.15);
  overflow: hidden;
  margin-bottom: 40px;
  border-radius: 12px;
}
@media (min-width: 769px) {
  .about-grid.has-photo {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: center;
  }
  .about-grid.has-photo .about-photo-wrapper { margin-bottom: 0; }
}
.about-grid.has-photo .about-photo-wrapper { display: block; }

.about-photo {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.about-photo.loaded { opacity: 1; }

.about-text {
  font-size: 16px;
  line-height: 1.9;
  color: var(--color-text-dim);
  max-width: 720px;
}
.about-grid.has-photo .about-text { max-width: none; }
.about-text p { margin-bottom: 24px; }
.about-text p:last-child { margin-bottom: 0; }

/* ─── Work ─── */
.work-list { display: flex; flex-direction: column; }

.work-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  align-items: center;
  padding: 32px 24px;
  border-top: 1px solid var(--color-border);
  transition: all 0.4s var(--ease-out-expo);
  cursor: default;
  border-radius: 8px;
}
.work-row:last-child { border-bottom: 1px solid var(--color-border); }
@media (hover: hover) {
  .work-row:hover { border-color: var(--color-border-hover); background: rgba(201, 185, 154, 0.03); }
}

.work-number {
  font-size: 12px; font-weight: 600;
  color: var(--color-accent);
  letter-spacing: 0.05em;
  min-width: 28px;
}

.work-content { display: flex; flex-direction: column; gap: 6px; }

.work-name {
  font-size: 22px; font-weight: 600;
  color: var(--color-text);
  transition: color 0.3s ease;
}
.work-row:hover .work-name { color: var(--color-accent); }

.work-desc {
  font-size: 15px;
  color: var(--color-secondary);
  line-height: 1.7;
  transition: color 0.3s ease;
}
.work-row:hover .work-desc { color: var(--color-text-dim); }

.work-arrow {
  font-size: 20px;
  color: var(--color-secondary);
  transition: all 0.4s var(--ease-spring);
}
.work-row:hover .work-arrow { color: var(--color-accent); transform: translateX(6px); }

/* ─── Skills ─── */
.skills-grid { display: flex; flex-wrap: wrap; gap: 14px; }

.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 50px;
  font-size: 15px;
  color: var(--color-text-dim);
  transition: all 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
  .skill-tag:hover { border-color: var(--color-accent); color: var(--color-accent); }
}
.skill-icon { font-size: 18px; }

/* ─── Marquee ─── */
.marquee-section {
  padding: 28px 0;
  overflow: hidden;
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marqueeScroll 30s linear infinite;
  will-change: transform;
}

.marquee-item {
  font-family: var(--font-serif);
  font-size: clamp(22px, 4vw, 48px);
  font-weight: 600;
  color: var(--color-text);
  opacity: 0.12;
  white-space: nowrap;
  padding: 0 36px;
}

.marquee-dot {
  color: var(--color-accent);
  padding: 0 16px;
  opacity: 0.3;
  font-size: clamp(14px, 2vw, 24px);
  display: flex;
  align-items: center;
}

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

/* ─── Contact ─── */
.contact-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
}

.contact-heading {
  font-size: clamp(28px, 6vw, 56px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.contact-text {
  font-size: 17px;
  color: var(--color-text-dim);
  max-width: 500px;
  line-height: 1.7;
}

.contact-email {
  font-size: clamp(16px, 3.5vw, 30px);
  font-weight: 500;
  color: var(--color-text);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  text-decoration: none;
  transition: color 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}

.contact-email::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: linear-gradient(to right, var(--color-accent), var(--color-accent-bright));
  transition: width 0.5s var(--ease-out-expo);
}
.contact-email:hover { color: var(--color-accent); }
.contact-email:hover::after { width: 100%; }

.email-arrow {
  transition: transform 0.4s var(--ease-spring);
  font-size: 22px;
  flex-shrink: 0;
}
.contact-email:hover .email-arrow { transform: translate(4px, -4px); }

/* ─── Footer ─── */
footer {
  padding: 48px 0 32px 0;
  border-top: 1px solid var(--color-border);
  position: relative;
  z-index: 2;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-text { font-size: 13px; color: var(--color-secondary); letter-spacing: 0.05em; }
.footer-links { display: flex; gap: 24px; }
.footer-link { font-size: 13px; color: var(--color-secondary); text-decoration: none; transition: color 0.3s ease; }
.footer-link:hover { color: var(--color-accent); }

/* ══════════════════════════════════════════════
   MOBILE — 768px
   ══════════════════════════════════════════════ */
@media (max-width: 768px) {

  .cursor-dot, .cursor-ring { display: none !important; }

  /* Nav */
  .site-nav { padding: 14px 0; }
  .site-nav.scrolled { padding: 10px 0; }
  .nav-inner { padding: 0 20px; }
  .nav-links { gap: 16px; }
  .nav-link { font-size: 11px; letter-spacing: 0.06em; }
  .nav-logo { font-size: 16px; }

  .container { padding-left: 20px; padding-right: 20px; }

  /* UNIFORM spacing — every section identical */
  .section-block { padding-top: 75px; padding-bottom: 75px; }

  /* Hero — clean padding, no 100vh */
  .hero {
    min-height: auto;
    padding-top: 120px; /* space for fixed nav bar */
    padding-bottom: 60px;
  }

  .hero-title { font-size: clamp(34px, 11vw, 52px); margin-bottom: 14px; }
  .hero-subtitle { font-size: 11px; letter-spacing: 0.15em; margin-bottom: 12px; }
  .hero-description { font-size: 15px; max-width: 100%; margin-bottom: 28px; }
  .hero-cta-group { gap: 14px; }
  .hero-cta { padding: 13px 26px; font-size: 14px; white-space: nowrap; }
  .hero-link-secondary { font-size: 13px; white-space: nowrap; }

  /* Sections */
  .section-heading { font-size: clamp(24px, 7vw, 32px); margin-bottom: 32px; }
  .section-divider { margin-bottom: 28px; }

  /* About */
  .about-text { font-size: 15px; line-height: 1.8; }
  .about-text p { margin-bottom: 18px; }

  /* Marquee */
  .marquee-section { padding: 18px 0; }
  .marquee-item { font-size: 18px; padding: 0 18px; }
  .marquee-dot { padding: 0 8px; font-size: 12px; }

  /* Work */
  .work-row { grid-template-columns: auto 1fr; gap: 18px; padding: 28px 16px; }
  .work-arrow { display: none; }
  .work-name { font-size: 18px; }
  .work-desc { font-size: 13.5px; line-height: 1.6; }
  .work-number { font-size: 11px; align-self: flex-start; margin-top: 4px; }

  /* Skills */
  .skills-grid { gap: 12px; }
  .skill-tag { padding: 13px 22px; font-size: 13px; }
  .skill-icon { font-size: 15px; }

  /* Contact */
  .contact-container { gap: 32px; }
  .contact-heading { font-size: clamp(24px, 8vw, 36px); }
  .contact-text { font-size: 15px; }
  .contact-email { font-size: clamp(13px, 4vw, 18px); gap: 8px; word-break: break-all; }
  .email-arrow { font-size: 16px; }

  /* Footer */
  footer { padding: 36px 0 24px 0; }
  .footer-inner { flex-direction: column; gap: 10px; text-align: center; }

  /* Orbs — VISIBLE on mobile: bigger, no blur, just soft gradient */
  .ambient-orb--1 {
    width: 350px; height: 350px;
    background: radial-gradient(circle, rgba(201, 185, 154, 0.38) 0%, transparent 70%);
    top: -5%; right: -10%;
    filter: blur(40px);
    opacity: 0.8;
  }
  .ambient-orb--2 {
    width: 280px; height: 280px;
    background: radial-gradient(circle, rgba(130, 140, 200, 0.32) 0%, transparent 70%);
    bottom: 15%; left: -15%;
    filter: blur(40px);
    opacity: 0.7;
  }

  /* Faster reveals */
  .reveal, .reveal-scale { transition-duration: 0.5s; }
  .stagger-children > * { transition-duration: 0.4s; }
}

/* Extra small */
@media (max-width: 400px) {
  .container { padding-left: 16px; padding-right: 16px; }
  .nav-inner { padding-left: 16px; padding-right: 16px; }
  .nav-links { gap: 10px; }
  .nav-link { font-size: 10px; }
  .hero-title { font-size: 30px; }
  .hero-cta { padding: 12px 20px; font-size: 13px; }
  .skill-tag { padding: 10px 14px; font-size: 12px; }
  .work-row { padding: 18px 10px; }
  .work-name { font-size: 16px; }
  .contact-heading { font-size: 22px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .marquee-track { animation: none; }
  .reveal, .reveal-scale { opacity: 1; transform: none; }
  .stagger-children > * { opacity: 1; transform: none; }
}
