/* nonri.net - Design Language Styles */
/* Colors: #FAF5EE (cream), #C65D3A (terracotta), #8B5E3C (sienna), #5A4435 (dark sienna),
   #F0E6D8 (warm cream), #E8C07A (gold), #3D2014 (dark walnut), #D4917A (rose),
   #9C7B65 (muted tan), #6B2D4A (plum), #ffffff (white) */

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

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

body {
  background-color: #FAF5EE;
  color: #5A4435;
  font-family: 'Source Serif 4', 'Georgia', serif;
  font-weight: 400;
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
}

/* ============================================
   PARTICLE CANVAS
   ============================================ */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
}

/* ============================================
   TIMELINE SPINE
   ============================================ */
.timeline-spine {
  position: fixed;
  top: 0;
  left: 30%;
  width: 2px;
  height: 100vh;
  z-index: 2;
  pointer-events: none;
}

.spine-line {
  width: 2px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    #8B5E3C 10%,
    #8B5E3C 90%,
    transparent 100%
  );
  opacity: 0.4;
}

/* ============================================
   SECTIONS - General
   ============================================ */
.section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  z-index: 3;
  padding: 80px 0;
}

.section-content {
  margin-left: 38%;
  max-width: 520px;
  padding: 40px 40px 40px 0;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.section-content.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   TIMELINE NODES
   ============================================ */
.timeline-node {
  position: absolute;
  left: 30%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
}

.bloom-svg {
  display: block;
  opacity: 0;
  transform: scale(0.3) rotate(-30deg);
  transition: opacity 1s ease, transform 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bloom-svg.bloomed {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.bloom-svg .petal {
  transform-origin: 60px 60px;
  transition: all 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.bloom-svg.bloomed .petal {
  animation: petal-breathe 4s ease-in-out infinite alternate;
}

@keyframes petal-breathe {
  0% { transform: scale(1); opacity: inherit; }
  100% { transform: scale(1.05); opacity: 0.8; }
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-title {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-weight: 600;
  font-style: italic;
  font-size: 84px;
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: #3D2014;
  margin-bottom: 16px;
}

.hero-subtitle {
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9C7B65;
  margin-bottom: 32px;
}

.hero-description {
  font-family: 'Source Serif 4', 'Georgia', serif;
  font-size: 20px;
  line-height: 1.7;
  color: #5A4435;
  max-width: 440px;
}

/* ============================================
   SECTION TITLES
   ============================================ */
.section-title {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-weight: 600;
  font-style: italic;
  font-size: 48px;
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: #3D2014;
  margin-bottom: 24px;
}

.section-body {
  font-family: 'Source Serif 4', 'Georgia', serif;
  font-size: 18px;
  line-height: 1.7;
  color: #5A4435;
  margin-bottom: 20px;
}

.section-body:last-child {
  margin-bottom: 0;
}

/* ============================================
   CODE BLOCK
   ============================================ */
.code-block {
  background-color: #3D2014;
  border-radius: 8px;
  padding: 24px 28px;
  margin: 28px 0;
  overflow-x: auto;
}

.code-block code {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  line-height: 1.8;
  color: #F0E6D8;
  white-space: pre;
  display: block;
}

.code-comment {
  color: #9C7B65;
}

.code-keyword {
  color: #E8C07A;
}

.code-number {
  color: #D4917A;
}

/* ============================================
   GALLERY GRID
   ============================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 32px;
}

.gallery-cell {
  background-color: rgba(240, 230, 216, 0.5);
  border: 1px solid rgba(139, 94, 60, 0.15);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  overflow: hidden;
}

.mini-canvas {
  display: block;
  width: 100%;
  height: 160px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.gallery-label {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9C7B65;
}

/* ============================================
   CLOSING SECTION
   ============================================ */
.closing-invitation {
  font-style: italic;
  color: #8B5E3C;
}

.closing-mark {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.mark-symbol {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-weight: 600;
  font-style: italic;
  font-size: 28px;
  color: #C65D3A;
}

.mark-year {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: #9C7B65;
  letter-spacing: 0.1em;
}

/* ============================================
   SCROLL PROGRESS INDICATOR
   ============================================ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(to right, #C65D3A, #E8C07A);
  z-index: 100;
  transition: width 0.1s linear;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .timeline-spine {
    left: 15%;
  }

  .timeline-node {
    left: 15%;
  }

  .section-content {
    margin-left: 25%;
    max-width: 70%;
    padding: 24px 16px 24px 0;
  }

  .hero-title {
    font-size: 52px;
  }

  .section-title {
    font-size: 36px;
  }

  .bloom-svg {
    width: 80px;
    height: 80px;
  }
}

@media (max-width: 480px) {
  .timeline-spine {
    left: 8%;
  }

  .timeline-node {
    left: 8%;
  }

  .section-content {
    margin-left: 18%;
    max-width: 78%;
  }

  .hero-title {
    font-size: 40px;
  }

  .section-title {
    font-size: 28px;
  }

  .hero-description,
  .section-body {
    font-size: 16px;
  }

  .bloom-svg {
    width: 60px;
    height: 60px;
  }

  .gallery-grid {
    gap: 12px;
  }
}
