/* ============================================
   Nick Virzi — Mentorship Site
   Clean, elegant, warm design + effects
   ============================================ */

:root {
  --color-bg: #faf9f6;
  --color-bg-alt: #f3f1ec;
  --color-text: #2c2c2c;
  --color-text-muted: #6b6b6b;
  --color-accent: #8b6914;
  --color-accent-light: #c49a2a;
  --color-border: #e0ddd6;
  --color-dark: #1a1a1a;
  --color-white: #ffffff;

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --max-width: 1100px;
  --section-pad: 7rem;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

/* ============================================
   Navigation
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 0;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav.scrolled {
  background: rgba(250, 249, 246, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--color-border);
}

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

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.05em;
  transition: opacity 0.3s ease;
}

.nav.scrolled .nav-logo {
  color: var(--color-text);
}

.nav:not(.scrolled) .nav-logo {
  color: var(--color-white);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  transition: color 0.2s ease;
  position: relative;
}

.nav:not(.scrolled) .nav-links a {
  color: rgba(255, 255, 255, 0.6);
}

.nav:not(.scrolled) .nav-links a:hover {
  color: rgba(255, 255, 255, 1);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a:hover {
  color: var(--color-text);
}

/* ============================================
   Hero
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(160deg, #1a1a1a 0%, #2d2418 50%, #1a1a1a 100%);
  color: var(--color-white);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(139, 105, 20, 0.15) 0%, transparent 70%);
}

.hero-waves {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.4;
}

.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 154, 42, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
  will-change: left, top;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem;
}

.hero-tag {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent-light);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.3s forwards;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(3.5rem, 10vw, 7.5rem);
  font-weight: 300;
  line-height: 1.05;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}

/* Subtle gold line beneath the name */
.hero-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 1px;
  margin: 1.2rem auto 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  opacity: 0;
  animation: fadeIn 0.6s ease 2s forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

.name-word {
  display: inline-flex;
}

/* Initials: visible from the start, fade in */
.initial {
  display: inline-block;
  opacity: 0;
  animation: initialAppear 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
}

.name-word:nth-child(2) .initial {
  animation-delay: 0.3s;
}

@keyframes initialAppear {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

/* Expanding letters — smooth single expansion, both words together */
.expand-letters {
  display: inline-flex;
  overflow: hidden;
  max-width: 0;
  opacity: 0;
  animation: expandLetters 2.5s cubic-bezier(0.25, 1, 0.5, 1) 0.7s forwards;
}

@keyframes expandLetters {
  from { max-width: 0; opacity: 0; }
  15%  { opacity: 1; }
  to   { max-width: 300px; opacity: 1; }
}

.letter {
  display: inline-block;
}


.hero-subtitle {
  font-size: 1.15rem;
  font-weight: 300;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.7);
  max-width: 500px;
  margin: 0 auto 2.5rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.6s forwards;
}

.hero-cta {
  display: inline-block;
  padding: 0.85rem 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-white);
  transition: all 0.3s ease;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.8s forwards;
}

.hero-cta:hover {
  background: var(--color-white);
  color: var(--color-dark);
  border-color: var(--color-white);
}

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 3;
  opacity: 0;
  animation: fadeUp 0.8s ease 1.2s forwards;
}

.hero-scroll-hint span {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.4), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.3); transform-origin: top; }
}

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

.hero-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--color-bg));
  z-index: 2;
}

/* ============================================
   Magnetic Button Effect
   ============================================ */
.magnetic {
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  will-change: transform;
}

/* ============================================
   Sections — Shared
   ============================================ */
.section {
  padding: var(--section-pad) 0;
}

.section-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 2.5rem;
  color: var(--color-text);
}

/* ============================================
   Philosophy
   ============================================ */
.philosophy-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 4rem;
  align-items: start;
}

.philosophy-text .lead {
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.85;
  color: var(--color-text);
  margin-bottom: 1.5rem;
}

.philosophy-text p {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
}

.philosophy-quote {
  position: relative;
  padding: 2.5rem;
  background: var(--color-bg-alt);
  border-left: 3px solid var(--color-accent);
  align-self: center;
  transition: transform 0.4s ease;
}

.philosophy-quote:hover {
  transform: translateX(4px);
}

.philosophy-logo {
  width: 120px;
  height: auto;
  margin: 0 auto 1.5rem;
  display: block;
}

.philosophy-quote blockquote {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-style: italic;
  line-height: 1.6;
  color: var(--color-text);
}

.philosophy-quote cite {
  display: block;
  margin-top: 1rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-style: normal;
  color: var(--color-text-muted);
}

/* ============================================
   About / Background
   ============================================ */
.about {
  background: var(--color-bg-alt);
}

.about-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 4rem;
  align-items: start;
}

.about-photo-wrapper {
  position: sticky;
  top: 6rem;
}

.about-photo {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

.about-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  pointer-events: none;
}

.about-photo img {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(15%) contrast(1.05);
  transition: filter 0.5s ease, transform 0.5s ease;
}

.about-photo:hover img {
  filter: grayscale(0%) contrast(1);
  transform: scale(1.02);
}

.about-right .section-label,
.about-right .section-title {
  text-align: left;
}

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

.about-card {
  padding: 2.5rem 2rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.4s ease;
  position: relative;
  overflow: hidden;
}

.about-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.about-card:hover::before {
  transform: scaleX(1);
}

.about-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.about-icon {
  color: var(--color-accent);
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease;
}

.about-card:hover .about-icon {
  transform: scale(1.1);
}

.about-card h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.about-card p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ============================================
   Approach
   ============================================ */
.approach-steps {
  max-width: 700px;
}

.step {
  display: flex;
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--color-border);
  position: relative;
}

.step:last-child {
  border-bottom: none;
}

.step-number {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 600;
  color: var(--color-accent-light);
  opacity: 0.6;
  flex-shrink: 0;
  width: 3rem;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.step:hover .step-number {
  opacity: 1;
  transform: scale(1.15);
}

.step-content h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.step-content p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ============================================
   Reading List
   ============================================ */
.reading {
  background: var(--color-bg-alt);
}

.reading-intro {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  max-width: 650px;
  margin-bottom: 3rem;
  line-height: 1.8;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.book-card {
  padding: 2rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.4s ease;
  position: relative;
  overflow: hidden;
}

.book-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(139, 105, 20, 0.03), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.book-card:hover::after {
  opacity: 1;
}

.book-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.book-category {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
}

.book-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  position: relative;
  z-index: 1;
}

.book-author {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
}

.book-desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.65;
  position: relative;
  z-index: 1;
}

/* ============================================
   Connect / CTA
   ============================================ */
.connect-container {
  text-align: center;
  max-width: 600px;
}

.connect-text {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

.connect-btn {
  display: inline-block;
  padding: 1rem 3rem;
  background: var(--color-dark);
  color: var(--color-white);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  overflow: hidden;
}

.connect-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-light));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.connect-btn:hover::before {
  opacity: 1;
}

.connect-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 30px rgba(139, 105, 20, 0.3);
}

.connect-btn span,
.connect-btn {
  position: relative;
  z-index: 1;
}

.connect-note {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* ============================================
   Footer
   ============================================ */
.footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--color-border);
}

.footer-inner {
  text-align: center;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  transition: color 0.2s ease;
}

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

.footer-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--color-border);
}

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

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 900px) {
  :root {
    --section-pad: 5rem;
  }

  .philosophy-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

  .about-photo-wrapper {
    position: static;
    max-width: 280px;
    margin: 0 auto;
  }

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

  .books-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-glow {
    display: none;
  }
}

/* Hamburger button — hidden on desktop */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 101;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--color-text-muted);
  margin: 5px 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav:not(.scrolled) .nav-toggle span {
  background: rgba(255, 255, 255, 0.7);
}

/* Animate to X when open */
.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);
}

@media (max-width: 600px) {
  :root {
    --section-pad: 4rem;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    width: 260px;
    height: 100vh;
    background: rgba(26, 26, 26, 0.97);
    backdrop-filter: blur(12px);
    padding: 5rem 2rem 2rem;
    gap: 1.5rem;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 100;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links a {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 1rem;
  }

  .nav-links a:hover {
    color: rgba(255, 255, 255, 1) !important;
  }

  .hero-subtitle br {
    display: none;
  }

  .step {
    flex-direction: column;
    gap: 0.5rem;
  }

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

  .hero-scroll-hint {
    display: none;
  }
}

/* ============================================
   Scroll Animations
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.23, 1, 0.32, 1),
              transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

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

/* Staggered delays for grid children */
.stagger-1 { transition-delay: 0.05s; }
.stagger-2 { transition-delay: 0.1s; }
.stagger-3 { transition-delay: 0.15s; }
.stagger-4 { transition-delay: 0.2s; }
.stagger-5 { transition-delay: 0.25s; }
.stagger-6 { transition-delay: 0.3s; }
.stagger-7 { transition-delay: 0.35s; }
.stagger-8 { transition-delay: 0.4s; }
.stagger-9 { transition-delay: 0.45s; }

/* Parallax depth for sections */
.parallax-section {
  will-change: transform;
}

/* Smooth text reveal for section titles */
.text-reveal {
  overflow: hidden;
}

.text-reveal-inner {
  display: block;
  transform: translateY(100%);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.text-reveal.visible .text-reveal-inner {
  transform: translateY(0);
}

/* Horizontal line that grows on scroll */
.divider-line {
  width: 0;
  height: 1px;
  background: var(--color-accent);
  margin: 3rem 0;
  transition: width 1s cubic-bezier(0.23, 1, 0.32, 1);
}

.divider-line.visible {
  width: 80px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .fade-in {
    opacity: 1;
    transform: none;
  }

  .title-word {
    opacity: 1;
    transform: none;
  }
}
