/* =========================================
   SAVVY OVERTHINKING — style.css
   ========================================= */

/* --- Design Tokens --- */
:root {
  --yellow:           #F5C400;
  --yellow-dark:      #D4A900;
  --yellow-geometric: rgba(180, 130, 0, 0.15);
  --near-black:       #1A1A1A;
  --dark-card:        #222222;
  --white:            #FFFFFF;
  --light-bg:         #F4F4F4;
  --border-light:     #E8E8E8;
  --text-primary:     #1A1A1A;
  --text-secondary:   #666666;

  --font-display:     'Barlow Condensed', sans-serif;
  --font-mono:        'Share Tech Mono', monospace;
  --font-body:        'Barlow', sans-serif;

  --nav-height:       60px;
  --card-radius:      4px;
  --card-gap:         12px;
}

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

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

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--light-bg);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* =========================================
   NAVIGATION
   ========================================= */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border-light);
  height: var(--nav-height);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.nav-logo img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-link {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--near-black);
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--yellow-dark);
}

.nav-link.active {
  color: var(--yellow-dark);
  border-bottom: 2px solid var(--yellow);
}

/* =========================================
   HERO
   ========================================= */
.hero {
  position: relative;
  margin-top: var(--nav-height);
  background-color: var(--yellow);
  overflow: hidden;
  padding: 80px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 340px;
}

/* Geometric faceted SVG background */
.hero-geo {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='300' viewBox='0 0 400 300'%3E%3Cpolygon points='0,0 120,0 60,80' fill='rgba(180,130,0,0.18)'/%3E%3Cpolygon points='120,0 240,0 180,90 60,80' fill='rgba(200,150,0,0.12)'/%3E%3Cpolygon points='240,0 400,0 400,60 300,110 180,90' fill='rgba(160,115,0,0.20)'/%3E%3Cpolygon points='0,0 60,80 0,140' fill='rgba(160,115,0,0.14)'/%3E%3Cpolygon points='60,80 180,90 140,170 20,160 0,140' fill='rgba(200,155,0,0.10)'/%3E%3Cpolygon points='180,90 300,110 280,190 140,170' fill='rgba(175,125,0,0.16)'/%3E%3Cpolygon points='300,110 400,60 400,180 360,200 280,190' fill='rgba(190,140,0,0.13)'/%3E%3Cpolygon points='0,140 20,160 0,220' fill='rgba(155,110,0,0.18)'/%3E%3Cpolygon points='20,160 140,170 120,240 30,250 0,220' fill='rgba(205,155,0,0.11)'/%3E%3Cpolygon points='140,170 280,190 260,260 120,240' fill='rgba(170,120,0,0.15)'/%3E%3Cpolygon points='280,190 360,200 400,180 400,300 260,260' fill='rgba(185,135,0,0.17)'/%3E%3Cpolygon points='0,220 30,250 0,300' fill='rgba(160,115,0,0.12)'/%3E%3Cpolygon points='30,250 120,240 100,300 0,300' fill='rgba(195,145,0,0.14)'/%3E%3Cpolygon points='120,240 260,260 240,300 100,300' fill='rgba(175,130,0,0.10)'/%3E%3Cpolygon points='260,260 400,300 240,300' fill='rgba(165,118,0,0.16)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 400px 300px;
  opacity: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
  background: transparent;
}

.hero-logo {
  width: 100%;
  max-width: 500px;
  height: auto;
  object-fit: contain;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.hero-tagline {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 18px;
  letter-spacing: 0.08em;
  color: var(--near-black);
  opacity: 0.85;
}

/* =========================================
   NOTICES BAR
   ========================================= */
.notices-bar {
  background: var(--near-black);
  padding: 10px 24px;
  text-align: center;
}

.notices-bar[hidden] {
  display: none;
}

.notices-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.notice-text {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--yellow);
  letter-spacing: 0.04em;
}

.notice-link {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--yellow);
  text-decoration: underline;
  letter-spacing: 0.04em;
  transition: opacity 0.2s;
}

.notice-link:hover {
  opacity: 0.75;
}

.notice-link:empty {
  display: none;
}

/* =========================================
   CONTENT AREA — TWO COLUMNS
   ========================================= */
.content-area {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  padding: 0;
  background: var(--white);
  border: 1px solid var(--border-light);
}

.column {
  flex: 1 1 50%;
  min-width: 0;
  padding: 32px 28px;
}

.column-rule {
  width: 1px;
  background: var(--border-light);
  align-self: stretch;
  flex-shrink: 0;
}

/* --- Column Headers --- */
.column-header {
  margin-bottom: 24px;
}

.column-header--analysis {
  background: var(--yellow);
  padding: 12px 16px;
  border-left: 4px solid var(--yellow-dark);
}

.column-header--analysis .column-header__label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--near-black);
}

.column-header--observation {
  background: var(--near-black);
  padding: 12px 16px;
}

.column-header--observation .column-header__label {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--white);
}

/* =========================================
   CARDS — SHARED
   ========================================= */
.cards-list {
  display: flex;
  flex-direction: column;
  gap: var(--card-gap);
}

.card {
  border-radius: var(--card-radius);
  border: 1px solid var(--border-light);
  background: var(--white);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
}

/* =========================================
   ANALYSIS CARDS (Substack / left column)
   ========================================= */
.card--analysis {
  border-left: 3px solid var(--yellow);
  padding: 16px 18px;
}

.card--analysis .card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.2;
  color: var(--near-black);
  margin-bottom: 8px;
  display: block;
  transition: color 0.15s;
}

.card--analysis .card-title:hover {
  color: var(--yellow-dark);
}

.card--analysis .card-excerpt {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

.card--analysis .card-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
}

/* =========================================
   OBSERVATION CARDS (Medium / right column)
   ========================================= */
.card--observation {
  padding: 0;
}

.card--observation .card-header-band {
  background: var(--near-black);
  padding: 12px 16px;
}

.card--observation .card-title {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
  line-height: 1.3;
  display: block;
  transition: opacity 0.15s;
}

.card--observation .card-title:hover {
  opacity: 0.8;
}

.card--observation .card-body {
  padding: 12px 16px 14px;
}

.card--observation .card-excerpt {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}

.card--observation .card-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
}

/* =========================================
   FALLBACK CARD
   ========================================= */
.card--fallback {
  padding: 20px 18px;
  border-left: 3px solid var(--border-light);
  text-align: center;
}

.card--fallback p {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.card--fallback a {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--yellow-dark);
  text-decoration: underline;
}

/* =========================================
   SKELETON LOADING
   ========================================= */
@keyframes skeleton-pulse {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.skeleton-card {
  border-radius: var(--card-radius);
  border: 1px solid var(--border-light);
  background: var(--white);
  padding: 16px 18px;
}

.skeleton-bar {
  border-radius: 3px;
  background: linear-gradient(90deg, #ececec 25%, #f5f5f5 50%, #ececec 75%);
  background-size: 800px 100%;
  animation: skeleton-pulse 1.4s ease infinite;
}

.skeleton-title {
  height: 26px;
  width: 85%;
  margin-bottom: 8px;
}

.skeleton-title-2 {
  height: 26px;
  width: 60%;
  margin-bottom: 12px;
}

.skeleton-line {
  height: 13px;
  width: 100%;
  margin-bottom: 6px;
}

.skeleton-line-short {
  height: 13px;
  width: 70%;
  margin-bottom: 12px;
}

.skeleton-date {
  height: 11px;
  width: 80px;
  margin-top: 4px;
}

/* Observation skeleton has dark band */
.skeleton-card--observation {
  padding: 0;
}

.skeleton-card--observation .skeleton-band {
  background: #2e2e2e;
  padding: 12px 16px;
  margin-bottom: 0;
}

.skeleton-card--observation .skeleton-band .skeleton-bar {
  background: linear-gradient(90deg, #3a3a3a 25%, #444 50%, #3a3a3a 75%);
  background-size: 800px 100%;
}

.skeleton-card--observation .skeleton-body {
  padding: 12px 16px 14px;
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
  background: var(--near-black);
  padding: 48px 24px 32px;
  margin-top: 0;
}

.footer-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-logo img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  opacity: 0.9;
}

.footer-logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.1em;
  color: var(--white);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-link {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--yellow);
  letter-spacing: 0.04em;
  transition: opacity 0.2s;
}

.footer-link:hover {
  opacity: 0.75;
}

.footer-sep {
  color: var(--yellow);
  opacity: 0.4;
  font-size: 14px;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #666;
  letter-spacing: 0.04em;
}

/* =========================================
   ABOUT MODAL
   ========================================= */

/* Button reset so it matches the other nav links */
.nav-link--about {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--near-black);
  transition: color 0.2s;
  padding: 0;
  line-height: inherit;
}

.nav-link--about:hover {
  color: var(--yellow-dark);
}

/* <dialog> backdrop */
.about-modal::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.about-modal {
  border: none;
  padding: 0;
  background: transparent;
  max-width: 560px;
  width: calc(100% - 48px);
  border-radius: 6px;
  overflow: visible;
}

/* Fallback for browsers without native <dialog> backdrop */
.about-modal[open] {
  display: flex;
}

.about-modal__inner {
  position: relative;
  background: var(--near-black);
  border: 1px solid #333;
  border-top: 3px solid var(--yellow);
  border-radius: 6px;
  padding: 40px 40px 36px;
  width: 100%;
}

.about-modal__close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.15s;
}

.about-modal__close:hover {
  color: var(--yellow);
}

.about-modal__heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 32px;
  letter-spacing: 0.06em;
  color: var(--yellow);
  margin-bottom: 24px;
  text-transform: uppercase;
}

.about-modal__body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.65;
  color: #ccc;
  margin-bottom: 16px;
}

.about-modal__body:last-of-type {
  margin-bottom: 28px;
}

.about-modal__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid #333;
  padding-top: 20px;
}

.about-modal__link {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--yellow);
  letter-spacing: 0.05em;
  transition: opacity 0.15s;
}

.about-modal__link:hover {
  opacity: 0.75;
}

@media (max-width: 480px) {
  .about-modal__inner {
    padding: 32px 24px 28px;
  }

  .about-modal__heading {
    font-size: 26px;
  }
}

/* =========================================
   NOTICE FADE TRANSITION
   ========================================= */
.notice-fade-out {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.notice-fade-in {
  opacity: 1;
  transition: opacity 0.5s ease;
}

/* =========================================
   MOBILE RESPONSIVE (≤768px)
   ========================================= */
@media (max-width: 768px) {
  .hero {
    padding: 56px 20px;
    min-height: auto;
  }

  .hero-tagline {
    font-size: 15px;
  }

  .nav-links {
    gap: 20px;
  }

  .nav-link {
    font-size: 12px;
  }

  .content-area {
    flex-direction: column;
    border-left: none;
    border-right: none;
  }

  .column-rule {
    width: 100%;
    height: 1px;
  }

  .column {
    padding: 24px 16px;
  }

  .card--analysis .card-title {
    font-size: 19px;
  }

  .footer-logo-text {
    font-size: 17px;
  }

  .footer-links {
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .nav-inner {
    padding: 0 16px;
  }

  .hero-logo {
    max-width: 280px;
  }

  .notices-inner {
    flex-direction: column;
    gap: 6px;
  }
}
