/* =========================================================
   Architect of Silence — Memoir Interface CSS
   Tech-noir aesthetic with neon accents
========================================================= */

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

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

/* THEME */
:root {
  --bg: #000000;
  --bg-elevated: #0a0a0a;
  --text: #e0e0e0;
  --text-dim: #8a8a8a;
  --accent: #00ffaa;
  --accent-dim: #00cc88;
  --line: rgba(0, 255, 170, 0.15);
  --line-subtle: rgba(255, 255, 255, 0.05);
  --card: #0f0f0f;
  --glow: rgba(0, 255, 170, 0.3);
  --radius: 8px;
}

/* BASE */
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", sans-serif;
  line-height: 1.7;
  padding-top: 80px;
  position: relative;
  overflow-x: hidden;
}

/* Animated grid background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(0, 255, 170, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 170, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
  animation: gridPulse 8s ease-in-out infinite;
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

/* Subtle scan line effect */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  pointer-events: none;
  z-index: 9999;
  animation: scan 4s linear infinite;
  opacity: 0.2;
}

@keyframes scan {
  0% { transform: translateY(0); }
  100% { transform: translateY(100vh); }
}

.container {
  width: min(1200px, 92%);
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

/* =========================================================
   TYPOGRAPHY
========================================================= */

h1, h2, h3 {
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

h1 { 
  font-size: clamp(2.5rem, 7vw, 4.5rem); 
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

h2 { 
  font-size: clamp(1.8rem, 5vw, 2.8rem); 
  margin-bottom: 1rem;
}

h3 { 
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  margin-bottom: 0.75rem;
  color: var(--accent);
}

p {
  font-size: 1rem;
  margin-bottom: 1.3rem;
  max-width: 720px;
}

.muted { 
  color: var(--text-dim);
  font-size: 0.95rem;
}

strong {
  color: var(--accent);
  font-weight: 600;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  text-align: center;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  text-align: center;
  color: var(--text-dim);
  margin-bottom: 4rem;
  font-size: 1.1rem;
}

/* =========================================================
   LINKS
========================================================= */

a {
  color: var(--accent);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover { 
  color: var(--text);
  text-shadow: 0 0 8px var(--glow);
}

/* =========================================================
   HEADER
========================================================= */

.nav {
  position: fixed;
  top: 0; 
  left: 0; 
  right: 0;
  z-index: 9998;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
  padding: 1rem 0;
}

.brand {
  font-size: 1.1rem;
  font-weight: 700;
  font-family: "Space Mono", monospace;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-shadow: 0 0 10px var(--glow);
}

.brand:hover {
  color: var(--accent);
}

/* Nav links */
.nav__links {
  display: flex;
  gap: 2.5rem;
}

.nav__links a {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.8;
  position: relative;
  font-family: "Space Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.75rem;
}

.nav__links a:hover {
  opacity: 1;
  color: var(--accent);
}

.nav__links a.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--glow);
}

/* Mobile toggle */
.nav__toggle {
  display: none;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0.5rem;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--accent);
  margin: 5px 0;
  transition: all 0.3s ease;
  box-shadow: 0 0 4px var(--glow);
}

/* =========================================================
   HERO
========================================================= */
.hero {
  text-align: center;
  padding: 140px 0 100px;
  position: relative;
}

.hero__wrap {
  max-width: 900px;
  margin: 0 auto;
}

.hero__label {
  font-family: "Space Mono", monospace;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 2rem;
  opacity: 0.9;
}

.hero__title {
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--text);
  text-shadow: 0 0 20px rgba(0, 255, 170, 0.1);
}

.hero__subtitle {
  font-size: 1.15rem;
  color: var(--text-dim);
  line-height: 1.8;
  max-width: 100%;
  margin: 0 auto;
}

/* =========================================================
   SECTIONS
========================================================= */
.section {
  padding: 6rem 0;
  position: relative;
}

.section--about {
  border-top: 1px solid var(--line-subtle);
}

/* =========================================================
   ABOUT
========================================================= */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 3rem;
}

.about-card {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 3rem;
  border-radius: var(--radius);
  position: relative;
}

.about-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.5;
}

.about-card h2,
.about-card h3 {
  margin-bottom: 1.5rem;
}

.about-card p {
  max-width: 100%;
  margin-bottom: 1.2rem;
}

.about-card p:last-child {
  margin-bottom: 0;
}

.principles-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.principles-list li {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-left: 1.5rem;
  position: relative;
}

.principles-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

/* =========================================================
   EXCERPTS
========================================================= */
.section--excerpts {
  background: var(--bg-elevated);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.excerpts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.excerpt-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.5rem;
  position: relative;
  transition: all 0.4s ease;
}

.excerpt-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.excerpt-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(0, 255, 170, 0.1);
}

.excerpt-card:hover::before {
  opacity: 0.1;
}

.excerpt-tag {
  font-family: "Space Mono", monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 1.5rem;
  opacity: 0.8;
}

.excerpt-quote {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text);
  font-style: italic;
  margin: 0;
  position: relative;
  padding-left: 1.5rem;
}

.excerpt-quote::before {
  content: '"';
  position: absolute;
  left: 0;
  top: -0.5rem;
  font-size: 3rem;
  color: var(--accent);
  opacity: 0.3;
  line-height: 1;
}

/* =========================================================
   PRINCIPLES/THEMES
========================================================= */
.themes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.theme-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.theme-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 255, 170, 0.08);
}

.theme-card h3 {
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.theme-card p {
  max-width: 100%;
  margin: 0 auto;
}

/* =========================================================
   CONTACT
========================================================= */
.section--contact {
  padding: 5rem 0;
}

.contact-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4rem;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.contact-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.contact-card h2 {
  margin-bottom: 1rem;
}

.contact-card p {
  max-width: 100%;
  margin-bottom: 2rem;
}

/* =========================================================
   BUTTONS
========================================================= */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: "Space Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
  border: 2px solid var(--accent);
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background: transparent;
  color: var(--accent);
}

.btn--primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--accent);
  transition: left 0.3s ease;
  z-index: -1;
}

.btn--primary:hover {
  color: var(--bg);
  box-shadow: 0 0 20px var(--glow);
}

.btn--primary:hover::before {
  left: 0;
}

/* =========================================================
   FOOTER
========================================================= */
.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--line);
  background: var(--bg-elevated);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer__links {
  display: flex;
  gap: 2rem;
}

.footer__links a {
  font-size: 0.85rem;
  font-family: "Space Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.7;
}

.footer__links a:hover {
  opacity: 1;
}

.to-top {
  font-size: 1.5rem;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.to-top:hover { 
  opacity: 1;
  transform: translateY(-3px);
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 900px) {
  
  .about-grid {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 768px) {

  body {
    padding-top: 70px;
  }

  .nav__links {
    position: absolute;
    top: 70px;
    right: 0;
    left: 0;
    padding: 2rem;
    flex-direction: column;
    gap: 1.5rem;
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  
  .nav__links.active { 
    display: flex; 
  }

  .nav__toggle { 
    display: block; 
  }

  .section { 
    padding: 4rem 0; 
  }

  .hero {
    padding: 100px 0 70px;
  }

  .hero__subtitle {
    font-size: 1rem;
  }

  .about-card,
  .contact-card {
    padding: 2rem;
  }

  .excerpt-card {
    padding: 2rem;
  }

  .footer__inner {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
  }

  .footer__links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .container {
    width: 90%;
  }

  h1 {
    font-size: 2rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .about-card,
  .excerpt-card,
  .theme-card {
    padding: 1.5rem;
  }

  .contact-card {
    padding: 2.5rem 1.5rem;
  }
}