:root {
  --primary: #2563EB;
  --secondary: #16A34A;
  --background: #FAFAFA;
  --surface: #FFFFFF;
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --accent: #FACC15;
  --border: #E2E8F0;
  --shadow-soft: 0 8px 20px rgba(15, 23, 42, 0.06);
  --header-height: 72px;
  --header-height-mobile: 56px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", sans-serif;
  background-color: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100%;
  background-image: linear-gradient(180deg, rgba(37, 99, 235, 0.06), transparent 240px),
    repeating-linear-gradient(0deg, #FAFAFA, #FAFAFA 28px, #EDF1F6 29px);
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 64px 0;
}

.section-muted {
  background: #F8FAFC;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 12px;
}

h1,
h2,
h3 {
  font-family: "Georgia", "Times New Roman", serif;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2.2rem, 3vw, 3.2rem);
  line-height: 1.15;
}

h2 {
  font-size: clamp(1.7rem, 2.4vw, 2.4rem);
  margin-bottom: 16px;
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

p {
  color: var(--text-secondary);
}

.lead {
  font-size: 1.05rem;
  margin-top: 12px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 250, 0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height-mobile);
  gap: 16px;
}

.logo {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.site-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

.site-nav a {
  display: block;
  padding: 14px 20px;
  color: var(--text-primary);
  font-weight: 600;
}

.site-nav.is-open {
  max-height: 320px;
  opacity: 1;
  box-shadow: var(--shadow-soft);
}

.nav-toggle {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  display: block;
}

.menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 90;
}

.menu-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

body.nav-open {
  overflow: hidden;
}

.hero-grid {
  display: grid;
  gap: 28px;
  align-items: center;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--primary);
  color: #FFFFFF;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}

.card p {
  color: var(--text-secondary);
}

.media {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: #E5E7EB;
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 24px;
}

.list-notes {
  padding-left: 18px;
  color: var(--text-secondary);
  display: grid;
  gap: 8px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.feature-link {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-block;
  margin-top: 8px;
}

.notes-toolbar {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
}

.search-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 1rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-btn {
  border-radius: 999px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-weight: 600;
  color: var(--text-secondary);
}

.filter-btn.is-active {
  background: var(--secondary);
  color: #FFFFFF;
  border-color: transparent;
}

.notes-grid {
  display: grid;
  gap: 24px;
}

.note-card ul {
  padding-left: 18px;
  color: var(--text-secondary);
  display: grid;
  gap: 6px;
}

.note-toggle {
  border: none;
  background: transparent;
  color: var(--primary);
  font-weight: 700;
  padding: 0;
  text-align: left;
}

.note-more {
  margin-top: 10px;
  color: var(--text-secondary);
}

.topic-grid {
  display: grid;
  gap: 24px;
  align-items: center;
}

.topic-content ul {
  padding-left: 18px;
  color: var(--text-secondary);
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.about-grid {
  display: grid;
  gap: 24px;
  align-items: center;
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.field label {
  font-weight: 600;
  color: var(--text-primary);
}

.field input,
.field select,
.field textarea {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 1rem;
  font-family: inherit;
  background: var(--surface);
}

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

.field-error {
  color: #B91C1C;
  font-size: 0.85rem;
  min-height: 18px;
}

.form-status {
  margin-top: 12px;
  font-weight: 600;
}

.form-status.success {
  color: var(--secondary);
}

.form-status.error {
  color: #B91C1C;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 24px;
  background: #F8FAFC;
}

.footer-grid {
  display: grid;
  gap: 24px;
}

.footer-brand {
  font-weight: 700;
  color: var(--text-primary);
}

.footer-branding,
.footer-col {
  display: grid;
  gap: 10px;
}

.footer-title {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.footer-meta {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-col a {
  color: var(--text-secondary);
  font-weight: 600;
}

.footer-col a:hover {
  color: var(--primary);
}

.footer-bottom {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-bottom a {
  color: var(--primary);
  font-weight: 600;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

@media (min-width: 640px) {
  .header-inner {
    height: var(--header-height);
  }

  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .notes-toolbar {
    grid-template-columns: 1.5fr 2fr;
    align-items: center;
  }

  .notes-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

@media (min-width: 1024px) {
  .header-inner {
    height: var(--header-height);
  }

  .site-nav {
    position: static;
    max-height: none;
    opacity: 1;
    display: flex;
    gap: 12px;
    background: transparent;
    border: none;
    box-shadow: none;
  }

  .site-nav a {
    padding: 10px 12px;
    border-radius: 999px;
  }

  .site-nav a:hover {
    background: #EFF6FF;
  }

  .nav-toggle {
    display: none;
  }

  .menu-backdrop {
    display: none;
  }

  .hero-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .notes-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .topic-grid {
    grid-template-columns: 1fr 1.1fr;
  }

  .topic-grid.reverse {
    grid-template-columns: 1.1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .container {
    max-width: 1180px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto;
    transition: none !important;
    animation: none !important;
  }
}
