:root {
  --bg: #0d0d0d;
  --text: #f5f5f5;
  --accent: #b11212;
  --muted: #888;
  --terminal-bg: #111;
  --terminal-border: #b11212;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.6;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: auto;
  overflow: hidden;
}

html { height: 100%; overflow: hidden; }

section {
  min-height: 100vh;
  padding: 0 10vw;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: start;
}  

.content {
  position: relative;
  width: 400px;
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.9s ease;
  text-align: center;
  text-align-last: center
}

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

h1 { font-size: 3.2rem; }
h2 { font-size: 2.1rem; }
p  { font-size: 1.15rem; }

.accent { color: var(--accent); }
.muted { color: var(--muted); }
   
.divider {
  bottom: 1rem; 
  left: 50%; 
  width: 60px;
  height: 2px;
  background: var(--accent);
}

/* Terminal-style console */
.terminal {
  max-width: 100%;
  overflow: hidden;
  position: absolute;
  top: -1rem;
  background: transparent;
  border-left: 4px solid var(--terminal-border);
  padding: 1rem 1.2rem;
  margin-bottom: 2rem;
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  text-align: left;
}

.cursor-line .cursor {
  background: var(--accent);
  padding-left: 2px;
  padding-right: 2px;
  display: inline-block;
  animation: blink 2s infinite;
}

.cursor-line .cursor::after {
  content: "_";
}

@keyframes blink {
  0%,50%,100% { opacity: 1; background: var(--accent); }
  25%,75% { opacity: 0; background: transparent; }
}

/* Typed quote */
.typed {
  font-style: normal;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.15rem;
  line-height: 1.6;
  margin-top: 2rem;
  min-height: 2rem;
  white-space: pre-wrap;
}

/* nav */
nav {
  position: fixed;
  top: 20px;
  left: 20px;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.4s ease;
  z-index: 1000;
}

nav a {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  border-bottom: none;
  opacity: 0.6;
}

nav a::before {
  content: "↳ ";
  opacity: 0.4;
}


nav a:hover {
  opacity: 1;
}

/* Section navigation arrows */
.section-arrow {
  position: fixed;
  bottom: 30px;
  left: calc(50% + 15px);
  font-size: 2rem;
  color: var(--accent);
  animation: bounce 2s infinite;
  cursor: pointer;
  opacity: 1;
}

.section-arrow:hover {
  opacity: 0.7;
}

.section-arrow.last-section {
  left: calc(50% - 15px);
  animation: bounce-up 2s infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(10px);
  }
}

@keyframes bounce-up {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Link styling */
.accent-link {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  transition: opacity 0.3s ease;
}

.accent-link:hover {
  opacity: 0.7;
}

/* Manifesto typewriter effect */
.typed#manifesto {
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  line-height: 1.5;
  white-space: pre-wrap;
  border-left: 2px solid var(--accent);
  padding: 1rem 1.2rem;
  min-height: 15rem; /* Adjust to fit the manifesto */
  animation: none;
  text-align: left;
  text-align-last: left;
}

.typed#typed {
  font-size: 1.15rem;
  line-height: 1.5;
  white-space: pre-wrap;
  text-align: center;
  text-align-last: center;
}



.back-link {
  position: fixed;
  top: 20px;
  left: 20px;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.4s ease;
  z-index: 1000;
}

.back-link:hover {
  opacity: 1;
}

.manifest-page .section-arrow {
  display: none;
}

.manifest-page .content {
  max-width: 720px;    /* keep the content width limited */
  width: 100%;          /* let it shrink on small screens */
  margin: 0 auto;       /* center horizontally */
  margin-top: 6rem;
}

body.manifest-page {
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: none
}

body.manifest-page section {
  min-height: auto;
  height: auto;
  align-item: flex-start;
}

h1 {
  max-width: 100%;
}

@media (max-width: 768px) {
  h1 {
    font-size: 2.1rem;
    line-height: 1.15;
    text-align: center;
    overflow-wrap: anywhere;
  }

  h1 span.accent {
    display: inline-block;
  }

  .terminal {
    overfow: hidden;
    font-size: 0.95rem;
    padding: 0.8rem 1rem;
    margin-bottom: 1.5rem;
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }

  .cursor-line {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .typed#manifesto {
    min-height: auto;
  }
}

@supports (-webkit-touch-callout: none) {
  .manifest-page .content {
    margin-top: 7rem;
  }
}
