/* =========================================================
   NOELLE OYUNGA — Personal Website
   Global Stylesheet
   ========================================================= */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Inter:wght@300;400;500;600&display=swap');

/* --- CSS Custom Properties --- */
:root {
  /* Colors — Black / White / Red */
  --bg-home: #0A0A0A;
  --bg-page: #FFFFFF;
  --bg-section: #F4F4F4;
  --primary: #E8192C;
  --primary-dark: #C4121F;
  --secondary: #E8192C;
  --earth: #333333;
  --text-dark: #0A0A0A;
  --text-mid: #333333;
  --text-light: #888888;
  --cream: #FFFFFF;
  --sand: #EEEEEE;
  --border: rgba(0, 0, 0, 0.1);
  --border-warm: rgba(232, 25, 44, 0.3);

  /* Mycelium colors (used in canvas + decorative SVGs) */
  --myc-line: rgba(255, 255, 255, 0.3);
  --myc-node: rgba(232, 25, 44, 0.85);
  --myc-glow: rgba(232, 25, 44, 0.4);

  /* Typography */
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;

  /* Layout */
  --max-width: 1200px;
  --content-width: 760px;
  --nav-height: 72px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--text-dark);
  background: var(--bg-page);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  line-height: 1.2;
  color: var(--text-dark);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); font-weight: 600; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.75rem); font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }

p {
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  color: var(--text-mid);
  margin-bottom: 1.25em;
}

p:last-child { margin-bottom: 0; }

blockquote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--text-dark);
  border-left: 3px solid var(--primary);
  padding-left: 1.5rem;
  margin: 2rem 0;
  line-height: 1.6;
}

/* --- Layout Utilities --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.content-narrow {
  max-width: var(--content-width);
  margin: 0 auto;
}

.section {
  padding: var(--space-lg) 0;
}

.section-lg {
  padding: var(--space-xl) 0;
}

/* --- Navigation (inner pages) --- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo:hover { color: var(--primary); }

.nav-logo-spore {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  box-shadow: 0 0 8px var(--primary);
  animation: spore-pulse 3s ease-in-out infinite;
}

@keyframes spore-pulse {
  0%, 100% { box-shadow: 0 0 6px var(--primary); opacity: 1; }
  50% { box-shadow: 0 0 16px var(--primary); opacity: 0.7; }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  list-style: none;
}

.nav-links a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
  transition: color 0.2s ease;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Mobile nav drawer */
.nav-drawer {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--bg-page);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem var(--space-md);
  z-index: 99;
}

.nav-drawer.open {
  display: block;
}

.nav-drawer ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.nav-drawer a {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mid);
  display: block;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.nav-drawer a:hover { color: var(--primary); }

/* Main content offset for fixed nav */
.page-content {
  padding-top: var(--nav-height);
}

/* --- Page Hero --- */
.page-hero {
  background: var(--bg-home);
  color: var(--cream);
  padding: var(--space-xl) 0 var(--space-lg);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(232, 25, 44, 0.12) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(232, 25, 44, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

.page-hero h1 {
  color: var(--cream);
  margin-bottom: 1rem;
}

.page-hero .subtitle {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: var(--space-sm);
}

.page-hero .lead {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(245, 239, 230, 0.75);
  max-width: 600px;
  margin-bottom: 0;
}

/* --- Section Labels --- */
.section-label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary);
  display: block;
  margin-bottom: 1rem;
}

/* --- Decorative Divider --- */
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: var(--space-md) 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.divider-spore {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--secondary);
  box-shadow: 0 0 8px var(--secondary);
  flex-shrink: 0;
}

/* --- Mycelial Decorative SVG (small, for page headers) --- */
.myc-accent {
  width: 100%;
  height: 60px;
  opacity: 0.4;
  pointer-events: none;
}

/* --- Cards / Project Grid --- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-md);
}

.project-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(44, 24, 16, 0.1);
  border-color: var(--border-warm);
}

.project-card-image {
  width: 100%;
  aspect-ratio: 16/10;
  background: var(--bg-section);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder-image {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--sand) 0%, var(--bg-section) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder-image svg {
  opacity: 0.3;
}

.project-card-body {
  padding: 1.5rem;
}

.project-meta {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.project-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.project-card p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.card-link {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.card-link::after {
  content: '→';
  transition: transform 0.2s ease;
}

.project-card:hover .card-link::after {
  transform: translateX(4px);
}

/* --- Featured Project Banner --- */
.featured-banner {
  background: var(--text-dark);
  color: var(--cream);
  padding: var(--space-lg) 0;
  position: relative;
  overflow: hidden;
}

.featured-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(232, 25, 44, 0.12) 0%, transparent 60%);
  pointer-events: none;
}

.featured-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--secondary);
  display: block;
  margin-bottom: 0.75rem;
}

.featured-banner h2 {
  color: var(--cream);
  margin-bottom: 1rem;
}

.featured-banner p {
  color: rgba(245, 239, 230, 0.7);
  max-width: 600px;
}

/* --- Buttons / CTAs --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: none;
  border-radius: 1px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(232, 25, 44, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--cream);
  border: 1px solid rgba(245, 239, 230, 0.4);
}

.btn-outline:hover {
  background: rgba(245, 239, 230, 0.1);
  color: var(--cream);
  border-color: rgba(245, 239, 230, 0.7);
}

.btn-outline-dark {
  background: transparent;
  color: var(--text-dark);
  border: 1px solid var(--border-warm);
}

.btn-outline-dark:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* --- Philosophy / Quote Block --- */
.philosophy-block {
  background: var(--bg-section);
  border-left: 4px solid var(--primary);
  padding: 2rem 2.5rem;
  margin: var(--space-md) 0;
}

.philosophy-block p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--text-dark);
  line-height: 1.7;
  margin-bottom: 0;
}

/* --- Timeline (Education) --- */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--border-warm);
}

.timeline-item {
  position: relative;
  padding-bottom: 2rem;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--primary);
  transform: translateX(-4px);
  box-shadow: 0 0 8px rgba(196, 98, 45, 0.4);
}

.timeline-year {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 0.25rem;
}

.timeline-item h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
  color: var(--text-dark);
}

.timeline-item p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0;
}

/* --- Zones (Brikicho) --- */
.zones-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5px;
}

.zone {
  padding: var(--space-md) var(--space-sm);
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
}

.zone-1 { background: #1A0F0A; }
.zone-2 { background: #2C1810; }
.zone-3 { background: #3D2218; }

.zone-number {
  font-family: var(--font-serif);
  font-size: 5rem;
  font-weight: 700;
  color: rgba(245, 239, 230, 0.06);
  position: absolute;
  top: 1rem;
  right: 1rem;
  line-height: 1;
}

.zone-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 0.5rem;
}

.zone h3 {
  color: var(--cream);
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.zone p {
  color: rgba(245, 239, 230, 0.65);
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* --- Programme List --- */
.programme-list {
  list-style: none;
}

.programme-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.programme-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  margin-top: 0.55rem;
}

/* --- Press Links --- */
.press-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
}

.press-item:last-child { border-bottom: none; }

.press-source {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 0.25rem;
}

.press-item h4 { font-size: 0.95rem; line-height: 1.4; }

.press-link-icon {
  flex-shrink: 0;
  color: var(--primary);
  font-size: 1.2rem;
  margin-top: 2px;
}

/* --- Contact Form --- */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mid);
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 0.875rem 1rem;
  border: 1px solid var(--border);
  border-radius: 1px;
  background: white;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-dark);
  transition: border-color 0.2s ease;
  width: 100%;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(196, 98, 45, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 140px;
}

/* --- Social Links --- */
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 1px;
  transition: all 0.2s ease;
}

.social-link:hover {
  color: var(--primary);
  border-color: var(--border-warm);
  background: rgba(196, 98, 45, 0.05);
}

/* --- Footer --- */
.site-footer {
  background: var(--text-dark);
  color: rgba(245, 239, 230, 0.6);
  padding: var(--space-lg) 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-md);
  align-items: start;
}

.footer-name {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--cream);
  margin-bottom: 0.5rem;
}

.footer-tagline {
  font-size: 0.8rem;
  color: var(--secondary);
  letter-spacing: 0.08em;
  margin-bottom: 0;
}

.footer-nav-title {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(245, 239, 230, 0.4);
  margin-bottom: 1rem;
}

.footer-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-nav a {
  font-size: 0.85rem;
  color: rgba(245, 239, 230, 0.6);
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: var(--secondary);
}

.footer-bottom {
  margin-top: var(--space-md);
  padding-top: var(--space-sm);
  border-top: 1px solid rgba(245, 239, 230, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: rgba(245, 239, 230, 0.3);
}

/* --- Tag/Badge --- */
.tag {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--bg-section);
  color: var(--text-light);
  border-radius: 1px;
  border: 1px solid var(--border);
}

.tag-primary {
  background: rgba(196, 98, 45, 0.1);
  color: var(--primary);
  border-color: rgba(196, 98, 45, 0.2);
}

/* --- Responsive --- */
@media (max-width: 900px) {
  :root {
    --space-lg: 3rem;
    --space-xl: 5rem;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

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

  .zone {
    min-height: 200px;
  }
}

@media (max-width: 640px) {
  :root {
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
  }

  .nav-links { display: none; }
  .nav-toggle { display: flex; }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

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

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

  .press-item {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* --- Animations --- */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fade-in 0.6s ease forwards;
}

.fade-in-delay-1 { animation-delay: 0.1s; opacity: 0; }
.fade-in-delay-2 { animation-delay: 0.2s; opacity: 0; }
.fade-in-delay-3 { animation-delay: 0.3s; opacity: 0; }
.fade-in-delay-4 { animation-delay: 0.4s; opacity: 0; }

/* --- Utility --- */
.text-center { text-align: center; }
.text-serif { font-family: var(--font-serif); }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-light { color: var(--text-light); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.gap-sm { gap: var(--space-sm); }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.align-center { align-items: center; }
.wrap { flex-wrap: wrap; }
.hidden { display: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
