@import url('https://fonts.googleapis.com/css2?family=Cormorant:wght@400;500;600;700&family=Montserrat:wght@300;400;500;600;700&display=swap');

/* =====================
   RESET & BASE
===================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background: #000;
  color: #fff;
}

body {
  font-family: 'Montserrat', 'PingFang SC', 'Noto Sans SC', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  background: #000;
  color: #fff;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

/* =====================
   SCROLL MARGIN FOR ANCHORS
===================== */
div[id],
article[id] {
  scroll-margin-top: 100px;
}

/* =====================
   SITE HEADER
===================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #000;
  border-bottom: 1px solid #333;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 2rem;
  height: 64px;
  gap: 1rem;
}

.nav-side {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-left {
  justify-content: flex-end;
}

.nav-right {
  justify-content: flex-start;
}

.nav-link {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ccc;
  padding: 0.5rem 0.25rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: color 200ms ease, border-color 200ms ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: #fff;
  border-color: #fff;
}

.brand-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.brand-link {
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-wordmark {
  font-family: 'Cormorant', 'Georgia', serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  white-space: nowrap;
}

.brand-logo {
  height: 36px;
  width: auto;
}

/* =====================
   ANCHOR BAR (STICKY)
===================== */
.anchor-bar {
  position: sticky;
  top: 64px;
  z-index: 90;
  background: #111;
  border-bottom: 1px solid #222;
  overflow-x: auto;
  scrollbar-width: none;
}

.anchor-bar::-webkit-scrollbar {
  display: none;
}

.anchor-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 2rem;
}

.anchor-link {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888;
  padding: 0.75rem 1rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  transition: color 200ms ease, border-color 200ms ease;
  white-space: nowrap;
}

.anchor-link:hover {
  color: #fff;
  border-color: #fff;
}

/* =====================
   HERO
===================== */
.hero-section {
  position: relative;
  min-height: 45vh;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: calc(64px + 44px + 2rem) 2rem 2rem;
  overflow: hidden;
  background: #000;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, #1a1a1a 1px, transparent 1px),
    linear-gradient(to bottom, #1a1a1a 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.6;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2rem;
}

.hero-icon {
  flex-shrink: 0;
  opacity: 0.85;
}

.hero-text {
  text-align: right;
  max-width: 560px;
}

.hero-h1 {
  font-family: 'Cormorant', 'Georgia', serif;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 1rem;
}

.hero-desc {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.8;
  color: #aaa;
  letter-spacing: 0.03em;
}

/* =====================
   PAGE LAYOUT (ASIDE + MAIN)
===================== */
.page-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 3rem;
  align-items: start;
}

/* =====================
   ASIDE
===================== */
.sidebar {
  position: sticky;
  top: calc(64px + 44px + 1.5rem);
}

.aside-inner {
  border-left: 2px solid #fff;
  padding-left: 1.25rem;
}

.aside-heading {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #555;
  margin-bottom: 1rem;
}

.aside-link {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
  color: #777;
  padding: 0.4rem 0;
  letter-spacing: 0.03em;
  border-bottom: 1px solid transparent;
  transition: color 200ms ease;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.aside-link:hover {
  color: #fff;
}

/* =====================
   MAIN CONTENT
===================== */
.main-content {
  min-width: 0;
}

.content-article {
  width: 100%;
}

.content-body {
  width: 100%;
}

/* =====================
   CONTENT TYPOGRAPHY
===================== */
.content-body h2,
.content-body h3 {
  font-family: 'Cormorant', 'Georgia', serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-top: 3rem;
  margin-bottom: 1.25rem;
  color: #fff;
}

.content-body h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  border-top: 1px solid #222;
  padding-top: 2rem;
}

.content-body h3 {
  font-size: clamp(1.2rem, 2vw, 1.7rem);
}

.content-body h2 > span,
.content-body h3 > span {
  display: inline;
}

.content-body p {
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  line-height: 1.8;
  color: #ccc;
  margin-bottom: 1.25rem;
}

.content-body ul,
.content-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.content-body li {
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  line-height: 1.8;
  color: #ccc;
  margin-bottom: 0.5rem;
}

.content-body a {
  color: #fff;
  border-bottom: 1px solid #555;
  transition: border-color 200ms ease;
}

.content-body a:hover {
  border-color: #fff;
}

.content-body strong {
  font-weight: 600;
  color: #fff;
}

.content-body em {
  font-style: italic;
  color: #ddd;
}

.content-body blockquote {
  border-left: 3px solid #fff;
  padding-left: 1.5rem;
  margin: 2rem 0;
  color: #aaa;
  font-style: italic;
}

.content-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

.content-body th,
.content-body td {
  padding: 0.75rem 1rem;
  border: 1px solid #222;
  text-align: left;
}

.content-body th {
  background: #111;
  font-weight: 600;
  letter-spacing: 0.05em;
  font-size: 0.8rem;
  text-transform: uppercase;
}

/* Content sections */
.content-body div {
  margin-bottom: 4rem;
}

/* Cards within content */
.content-body .card,
.content-body [class*="card"] {
  background: #111;
  border-radius: 18px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid #222;
  transition: border-color 200ms ease, transform 200ms ease;
}

.content-body .card:hover,
.content-body [class*="card"]:hover {
  border-color: #444;
  transform: translateY(-2px);
}

/* =====================
   FOOTER
===================== */
.site-footer {
  background: #000;
  border-top: 1px solid #222;
  margin-top: 4rem;
}

.footer-top {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.footer-brand-col {
  border-top: 2px solid #fff;
  padding-top: 1.5rem;
}

.footer-brand-huge {
  font-family: 'Cormorant', 'Georgia', serif;
  font-size: clamp(2.5rem, 5vw, 5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 1rem;
}

.footer-brand-desc {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  font-weight: 300;
  line-height: 1.7;
  color: #666;
  letter-spacing: 0.03em;
}

.footer-nav-col {
  padding-top: 1.5rem;
}

.footer-nav-col nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.footer-nav-col nav dl {
  list-style: none;
}

.footer-nav-col nav dt,
.footer-nav-col nav dd {
  margin: 0;
  padding: 0;
}

.footer-nav-col nav dt a,
.footer-nav-col nav dd a {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
  color: #666;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
  transition: color 200ms ease;
}

.footer-nav-col nav dt a:hover,
.footer-nav-col nav dd a:hover {
  color: #fff;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  border-top: 1px solid #111;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-copy,
.footer-note {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  color: #444;
  letter-spacing: 0.03em;
}

/* =====================
   SCROLL REVEAL ANIMATION
===================== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 500ms ease, transform 500ms ease;
  }

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

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* =====================
   RESPONSIVE
===================== */
@media (max-width: 900px) {
  .header-inner {
    padding: 0 1rem;
    gap: 0.5rem;
  }

  .nav-link {
    font-size: 0.65rem;
    gap: 0.75rem;
    letter-spacing: 0.05em;
  }

  .page-layout {
    grid-template-columns: 1fr;
    padding: 2rem 1rem;
    gap: 2rem;
  }

  .sidebar {
    position: static;
    border-left: none;
    border-top: 1px solid #222;
    padding-top: 1rem;
  }

  .aside-inner {
    border-left: none;
    padding-left: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
  }

  .aside-heading {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .aside-link {
    border: 1px solid #333;
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    min-height: 40px;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 3rem 1rem 2rem;
  }

  .footer-nav-col nav {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .footer-bottom {
    padding: 1.5rem 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

@media (max-width: 600px) {
  .header-inner {
    height: 56px;
  }

  .anchor-bar {
    top: 56px;
  }

  .nav-side {
    gap: 0.75rem;
  }

  .nav-link {
    font-size: 0.6rem;
    letter-spacing: 0.04em;
  }

  .hero-section {
    min-height: 45vh;
    padding: calc(56px + 44px + 1.5rem) 1rem 2rem;
    justify-content: center;
  }

  .hero-inner {
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    gap: 1.25rem;
  }

  .hero-text {
    text-align: right;
    max-width: 100%;
  }

  .hero-h1 {
    font-size: 2rem;
  }

  div[id],
  article[id] {
    scroll-margin-top: 120px;
  }

  .content-body h2 {
    font-size: 1.5rem;
  }

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

  .footer-brand-huge {
    font-size: 2.5rem;
  }
}

@media (max-width: 375px) {
  .nav-link {
    font-size: 0.55rem;
  }

  .anchor-link {
    font-size: 0.6rem;
    padding: 0.75rem 0.6rem;
  }

  .hero-h1 {
    font-size: 1.75rem;
  }

  .page-layout {
    padding: 1.5rem 0.875rem;
  }
}
