/* ============================================
   DENISSE — Shibari Artist
   Typography-driven, text-only design
   ============================================ */

:root {
  --bg: #0a0a09;
  --bg-warm: #0f0e0b;
  --text: #e8e2d6;
  --text-dim: #8a8478;
  --text-faint: #4a463e;
  --accent: #c4a47c;
  --accent-warm: #d4a574;
  --serif: 'Cormorant Garamond', 'Georgia', serif;
  --sans: 'Darker Grotesque', 'Helvetica Neue', sans-serif;
}

/* ---- Reset & Base ---- */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--text-faint) transparent;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

/* ---- Rope Canvas ---- */

.rope-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  animation: canvasFadeIn 3s ease 1s forwards;
}

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

/* Ensure content sits above the canvas */
.nav,
.hero,
.curriculum,
.contact,
.footer {
  position: relative;
  z-index: 1;
}

/* ---- Film Grain Overlay ---- */

.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  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");
  background-size: 128px 128px;
}

/* ---- Navigation ---- */

.nav {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 100;
  display: flex;
  gap: 2rem;
  padding: 2rem 2.5rem;
  mix-blend-mode: difference;
}

.nav-link {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  position: relative;
  padding-bottom: 0.25rem;
  transition: opacity 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nav-link:hover {
  opacity: 0.8;
}

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

/* ---- Hero ---- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 45%, rgba(196, 164, 124, 0.04) 0%, transparent 70%),
    radial-gradient(ellipse 80% 60% at 20% 80%, rgba(196, 164, 124, 0.02) 0%, transparent 60%);
  pointer-events: none;
}

.hero-inner {
  text-align: center;
  position: relative;
}

/* Location above name */
.hero-location {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeSlideDown 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 1.8s forwards;
}

.hero-location-line {
  display: block;
  width: 3rem;
  height: 1px;
  background: var(--text-faint);
}

.hero-location-text {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* Main name */
.hero-name {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(4rem, 15vw, 14rem);
  line-height: 0.85;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.hero-letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(80px) rotateX(40deg);
  animation: letterReveal 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: calc(0.15s + var(--i) * 0.08s);
}

@keyframes letterReveal {
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
  }
}

/* Subtitle */
.hero-subtitle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.hero-subtitle-word {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.2rem, 3vw, 2.4rem);
  letter-spacing: 0.08em;
  color: var(--accent);
  opacity: 0;
  animation: fadeSlideUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: calc(1s + var(--j) * 0.15s);
}

.hero-subtitle-divider {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1rem, 2.5vw, 2rem);
  color: var(--text-faint);
  opacity: 0;
  animation: fadeIn 0.6s ease 1.2s forwards;
}

/* Tagline */
.hero-tagline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  opacity: 0;
  animation: fadeSlideUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 1.5s forwards;
}

.tagline-word {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.tagline-amp {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text-faint);
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  animation: fadeIn 1s ease 2.5s forwards;
}

.scroll-line {
  display: block;
  width: 1px;
  height: 4rem;
  background: linear-gradient(to bottom, var(--text-faint), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 0.8; transform: scaleY(1.2); }
}

/* ---- Shared Section Styles ---- */

.section-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0 clamp(1.5rem, 5vw, 6rem);
  margin-bottom: 4rem;
}

.section-number {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--text-faint);
}

.section-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.5rem, 6vw, 5rem);
  letter-spacing: 0.02em;
  color: var(--text);
  white-space: nowrap;
}

.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--text-faint), transparent);
}

/* ---- Curriculum ---- */

.curriculum {
  padding: 8rem 0;
  position: relative;
}

.curriculum::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(80%, 600px);
  height: 1px;
  background: linear-gradient(to right, transparent, var(--text-faint), transparent);
}

.timeline {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 6rem);
  position: relative;
}

/* Vertical timeline line */
.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: clamp(4.5rem, calc(1.5rem + 3rem + 5vw), 10rem);
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--text-faint) 10%, var(--text-faint) 90%, transparent);
}

.timeline-entry {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  padding: 2rem 0;
  position: relative;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.timeline-entry.revealed {
  opacity: 1;
  transform: translateY(0);
}

.timeline-entry + .timeline-entry {
  border-top: 1px solid rgba(138, 132, 120, 0.1);
}

.entry-year {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--accent);
  min-width: 5rem;
  padding-top: 0.3rem;
  text-align: right;
  position: relative;
}

/* Dot on timeline */
.entry-year::after {
  content: '';
  position: absolute;
  right: -1.25rem;
  top: 0.55rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-faint);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.timeline-entry:hover .entry-year::after {
  background: var(--accent);
  box-shadow: 0 0 12px rgba(196, 164, 124, 0.3);
}

.entry-content {
  padding-left: 0.5rem;
}

.entry-type {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.5rem;
}

.entry-details {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.entry-teacher {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  color: var(--text);
  transition: color 0.3s ease;
}

.timeline-entry:hover .entry-teacher {
  color: var(--accent);
}

.entry-separator {
  color: var(--text-faint);
  font-size: 1rem;
}

.entry-location {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: var(--text-dim);
  transition: color 0.3s ease;
}

.timeline-entry:hover .entry-location {
  color: var(--text);
}

/* Ongoing badge */
.entry-ongoing-badge {
  display: inline-block;
  margin-top: 0.8rem;
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 0.3rem 0.8rem;
  border: 1px solid rgba(196, 164, 124, 0.3);
  position: relative;
  overflow: hidden;
}

.entry-ongoing-badge::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(196, 164, 124, 0.05);
}

.ongoing .entry-year::after {
  background: var(--accent);
  box-shadow: 0 0 8px rgba(196, 164, 124, 0.2);
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(196, 164, 124, 0.2); }
  50% { box-shadow: 0 0 16px rgba(196, 164, 124, 0.5); }
}

/* ---- Contact ---- */

.contact {
  padding: 8rem 0;
  position: relative;
}

.contact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(80%, 600px);
  height: 1px;
  background: linear-gradient(to right, transparent, var(--text-faint), transparent);
}

.contact-body {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 6rem);
}

.contact-intro {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  line-height: 1.6;
  color: var(--text-dim);
  margin-bottom: 3rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.contact-intro.revealed {
  opacity: 1;
  transform: translateY(0);
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 3rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 0;
  text-decoration: none;
  border-bottom: 1px solid rgba(138, 132, 120, 0.15);
  position: relative;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.contact-link.revealed {
  opacity: 1;
  transform: translateY(0);
}

.contact-link::before {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.contact-link:hover::before {
  width: 100%;
}

.contact-label {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
  min-width: 5rem;
  transition: color 0.3s ease;
}

.contact-link:hover .contact-label {
  color: var(--text-dim);
}

.contact-value {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 300;
  color: var(--text);
  flex: 1;
  transition: color 0.3s ease;
}

.contact-link:hover .contact-value {
  color: var(--accent);
}

.contact-arrow {
  font-family: var(--sans);
  font-size: 1.2rem;
  color: var(--text-faint);
  transform: translateX(0);
  transition: transform 0.3s ease, color 0.3s ease;
}

.contact-link:hover .contact-arrow {
  transform: translateX(6px);
  color: var(--accent);
}

.contact-location {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.8;
  color: var(--text-dim);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.contact-location.revealed {
  opacity: 1;
  transform: translateY(0);
}

.contact-location em {
  font-family: var(--serif);
  color: var(--text);
  font-style: italic;
}

/* ---- Footer ---- */

.footer {
  padding: 3rem clamp(1.5rem, 5vw, 6rem);
  border-top: 1px solid rgba(138, 132, 120, 0.1);
}

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

.footer-name {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 1rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

.footer-divider {
  width: 2rem;
  height: 1px;
  background: var(--text-faint);
}

.footer-copy {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--text-faint);
}

/* ---- Shared Animations ---- */

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

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

@keyframes fadeSlideDown {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Hover cursor style ---- */

a {
  cursor: pointer;
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
  .nav {
    padding: 1.5rem;
    gap: 1.5rem;
  }

  .hero {
    padding: 1.5rem;
  }

  .hero-location {
    margin-bottom: 1.5rem;
  }

  .hero-name {
    margin-bottom: 1rem;
  }

  .hero-subtitle {
    gap: 0.6rem;
    margin-bottom: 2rem;
  }

  .section-header {
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 3rem;
  }

  .section-line {
    display: none;
  }

  .timeline::before {
    display: none;
  }

  .timeline-entry {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 1.5rem 0;
  }

  .entry-year {
    text-align: left;
  }

  .entry-year::after {
    display: none;
  }

  .entry-content {
    padding-left: 0;
  }

  .contact-link {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .contact-label {
    width: 100%;
    min-width: unset;
  }
}

@media (max-width: 480px) {
  .hero-subtitle {
    flex-direction: column;
    gap: 0.3rem;
  }

  .hero-subtitle-divider {
    display: none;
  }

  .hero-tagline {
    flex-direction: column;
    gap: 0.2rem;
  }

  .tagline-amp {
    display: none;
  }
}

/* ---- Large screens ---- */

@media (min-width: 1400px) {
  .timeline {
    max-width: 900px;
  }
}

/* ---- Reduced motion ---- */

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

  html {
    scroll-behavior: auto;
  }

  .hero-letter {
    opacity: 1;
    transform: none;
  }

  .timeline-entry {
    opacity: 1;
    transform: none;
  }

  .contact-intro,
  .contact-link,
  .contact-location {
    opacity: 1;
    transform: none;
  }
}
