@font-face {
  font-family: 'JetBrains Mono';
  src: url('./fonts/JetBrainsMono-Medium.woff2') format('woff2'),
       url('./fonts/JetBrainsMono-Medium.woff') format('woff');
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('./fonts/JetBrainsMono-Thin.woff2') format('woff2'),
       url('./fonts/JetBrainsMono-Thin.woff') format('woff');
  font-weight: 100;
  font-display: swap;
}

@font-face {
  font-family: 'Fodor';
  src: url('./fonts/Architype-Fodor.woff2') format('woff2'),
       url('./fonts/Architype-Fodor.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --left-margin: 250px;

  /* Hover band tuning - tighter, more optically balanced */
  --statement-pad-top: 10px;
  --statement-pad-bottom: 10px;
  --statement-pad-right: 40px;
  --statement-highlight: #aeff00;
}

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

body {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  line-height: 1.6;
  background: #fafaf8;
  color: #121415;
  padding: 480px 40px 60px var(--left-margin);
  font-weight: 100;
  overflow-x: hidden;
}

.container {
  max-width: 800px;
}

.section {
  margin-bottom: 80px;
  position: relative;
}

.section-header {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 4px;
  margin-bottom: 20px;
  position: relative;
  padding-left: 0;
  font-weight: 500;
}

.section-header::before {
  content: '';
  position: absolute;
  right: 100%;
  margin-right: 20px;
  top: 50%;
  width: 100vw;
  height: 1px;
  background: #121415;
}

.code-block {
  background: #ffff00;
  padding: 60px;
  margin: 30px 0;
  width: 480px;
  height: 480px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

.code-content {
  font-size: 16px;
  line-height: 1.8;
  font-weight: 100;
  white-space: pre-wrap;
  letter-spacing: 0.5px;
}

.code-value {
  font-weight: 500;
}

.body-text {
  margin-bottom: 20px;
  max-width: 680px;
}

/* Full-bleed rows */
.statements {
  margin: 20px 0 30px 0;
  position: relative;
  left: calc(-1 * var(--left-margin));
  width: 100vw;
}

/* The row itself provides layout; highlight is drawn by ::before for perfect alignment */
.statement-row {
  position: relative;
  cursor: pointer;
  margin: 0;
  padding: var(--statement-pad-top) var(--statement-pad-right) var(--statement-pad-bottom) var(--left-margin);
  transition: none;
}

.statement-row::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--statement-highlight);
  opacity: 0;
  z-index: 0;
}

.statement-row:hover::before,
.statement-row.active::before {
  opacity: 1;
}

/* Ensure text sits above highlight */
.statement-row > * {
  position: relative;
  z-index: 1;
}

.statement-text {
  font-family: 'Fodor', sans-serif;
  font-size: 88px;
  line-height: 0.95;
  margin: 0;
  font-weight: 100;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transform: translateY(-5px); /* Was -2px, increase to -5px or -6px */
}

.annotation {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease; to transition: max-height 0.3s ease, padding 0.3s ease;
  font-size: 16px;
  line-height: 1.6;
/*  padding-top: 0;
  padding-bottom: 0;   */
  max-width: 680px;
}

.annotation.expanded {
  max-height: 2000px;
/*  padding-top: 20px;
  padding-bottom: 20px;*/
}

.annotation p:first-child {
  margin-top: 20px;  ← Add this
}

.annotation p {
  margin-bottom: 20px;
}

.annotation p:last-child {
  margin-bottom: 20px;  ← Keep this (was 0, change to 20px)
}

.quote-wrapper {
  margin: 30px 0 30px calc(-1 * var(--left-margin));
  padding-left: 0;
  font-size: 16px;
  line-height: 1.6;
  position: relative;
}

.quote-text {
  background: #ffff00;
  padding: 20px 20px;
  padding-left: calc(var(--left-margin) - 0.45em);
  display: inline;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.quote-attribution {
  font-size: 16px;
  margin-left: 0.3em;
  display: inline;
}

.links {
  margin-top: 40px;
}

.link-item {
  margin-bottom: 8px;
  line-height: 1.6;
}

.link-item a {
  color: #121415;
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: border-color 0.2s;
}

.link-item a:hover {
  border-bottom: 1px dashed #121415;
}

#square-animation {
  padding-bottom: 15px;
}
/* EXIT SECTION STYLES  */

.exit-section {
  margin-bottom: 120px;
}

.exit-links {
  margin-top: 60px;
  position: relative;
  left: calc(-1 * var(--left-margin));
  width: 100vw;
}

.exit-row {
  position: relative;
  margin-bottom: calc(var(--fib) * 8px); /* Fibonacci spacing */
  height: 40px; /* Enough height for link */
}

.exit-row::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: #121415;
  z-index: 0;
}

.exit-link {
  position: absolute;
  left: var(--offset);
  top: 50%;
  transform: translate(0, -50%);
  z-index: 1;
  
  padding: 8px 16px;
  
  color: #121415;
  background: #fafaf8;
  text-decoration: none;
  
  font-size: 16px;
  line-height: 1;
  white-space: nowrap;
  
  transition: all 0.2s ease;
}

.exit-link:hover {
  background: #121415;
  color: #fafaf8;
}

/* MOBILE STYLES  */

@media (max-width: 768px) {
  
  body {
    padding: 240px 20px 40px 40px;
  }

  .statements {
    left: calc(-40px);
  }

  .statement-row {
    padding-left: 40px;
    padding-right: 20px;
  }

  .statement-text {
    font-size: 48px;
    line-height: 0.95;
    transform: translateY(-3px);
  }

  .code-block {
    width: 100%;
    height: auto;
    min-height: 300px;
  }

  /* Hide square animation on mobile - SVG breaks layout */
  #square-animation {
    display: none;
  }

  /* Fix quote styling for mobile with proper margin calculation */
  .quote-wrapper {
    margin-left: calc(-1 * var(--left-margin));
    padding-left: 0;
  }

  .quote-text {
    padding-left: calc(var(--left-margin) - 0.45em);
  }

  /* Quote - full yellow block on mobile */
  .quote-wrapper {
    margin: 30px 0;
    margin-left: calc(-1 * var(--left-margin));
    background: #ffff00;
    padding: 20px;
    padding-left: var(--left-margin);
  }

  .quote-text {
    background: none; /* Remove inline background */
    padding: 0;
    display: block;
  }

  .quote-attribution {
    display: block;
    margin-left: 0;
    margin-top: 10px;
  }
  .exit-links {
    position: relative;
    left: 0;
    width: 100%;
    padding: 0;
  }
  
  .exit-row {
    margin-bottom: calc(var(--fib) * 6px);
    height: auto;
    min-height: 32px;
    position: relative;
    display: flex;
    align-items: center;
    padding-left: 0;
  }
  
  .exit-row::before {
    /* 1px dotted line from left edge, stops before link */
    content: '';
    flex: 1;
    height: 0;
    border-top: 1px dotted #121415;
    margin-right: 12px;
  }
  
  .exit-link {
    position: static;
    flex-shrink: 0;
    
    font-size: 16px; /* Same as body text */
    padding: 6px 0; /* Vertical padding only */
    padding-right: 20px; /* Space from right edge */
    white-space: nowrap;
  }
  
  /* Reduce spacing on closing blank lines */
  .exit-row.blank {
    margin-bottom: calc(var(--fib) * 4px);
  }
  
  /* Blank rows - full width line, no margin */
  .exit-row.blank::before {
    flex: none;
    width: 100%;
    margin-right: 0;
  }
}