/* ============================================================
   KB Practice — Apple-Luxe Site-Wide Styles
   Shared across homepage, blogs, and functional pages.
   Design tokens extracted from reference-styles.css
   ============================================================ */

/* ── Tokens ── */
:root {
  --bg: #050505;
  --bg-raised: #0c0c0c;
  --bg-subtle: #141414;
  --glass: rgba(10, 10, 10, 0.72);
  --border: rgba(255, 255, 255, 0.06);
  --shadow-ambient: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 24px 48px -12px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.02);
  --text: #f2f2f2;
  --text-2: #86868B;
  --text-3: #555558;
  --blue-from: #3B82F6;
  --blue-to: #2563EB;
  --red-from: #EF4444;
  --red-to: #DC2626;
  --green-from: #22C55E;
  --green-to: #16A34A;
  --amber: #FFB300;
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --r: 14px;
  --r-sm: 10px;
  --content-mx: 6vw;
  --content-max: 860px;
}

[data-theme="light"] {
  --bg: #FFFFFF;
  --bg-raised: #FFFFFF;
  --bg-subtle: #F5F5F7;
  --glass: rgba(255, 255, 255, 0.88);
  --border: rgba(0, 0, 0, 0.06);
  --shadow-ambient: 0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 24px 48px -12px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.03);
  --text: #1D1D1F;
  --text-2: #86868B;
  --text-3: #AEAEB2;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  transition: background 0.4s ease, color 0.4s ease;
  min-height: 100vh;
}

/* Ambient glow (subtle) */
body::before {
  content: '';
  position: fixed;
  top: -45%;
  left: 50%;
  transform: translateX(-50%);
  width: 130%;
  height: 65%;
  background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

[data-theme="light"] body::before {
  background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.02) 0%, transparent 70%);
}

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

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

a:hover {
  color: #60A5FA;
}

ul,
ol {
  padding-left: 1.5rem;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem var(--content-mx);
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease;
}

.nav-logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.nav-logo span {
  font-weight: 500;
  color: var(--text-2);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links a {
  display: block;
  padding: 0.45rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  border-radius: var(--r-sm);
  transition: all 0.2s var(--ease);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--bg-subtle);
}

/* Search in nav */
.nav-search {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: 0.75rem;
}

.nav-search input {
  width: 170px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.4rem 0.85rem;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.82rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, width 0.3s var(--ease);
}

.nav-search input:focus {
  border-color: var(--blue-from);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
  width: 220px;
}

.nav-search input::placeholder {
  color: var(--text-3);
}

.nav-search button {
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(180deg, #4B92FF 0%, #2563EB 100%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4), 0 2px 4px rgba(37, 99, 235, 0.15);
  transition: all 0.2s var(--ease);
}

.nav-search button:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4), 0 4px 12px rgba(37, 99, 235, 0.25);
}

.nav-search button:active {
  transform: scale(0.96);
}

/* Right actions group */
.nav-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Theme toggle */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--ease);
  flex-shrink: 0;
}

.theme-toggle:hover {
  color: var(--amber);
  background: var(--bg-subtle);
}

/* Mobile hamburger */
.nav-hamburger {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.nav-hamburger:hover {
  color: var(--text);
  background: var(--bg-subtle);
}

/* ============================================================
   CONTENT CONTAINERS
   ============================================================ */
.page-wrap {
  position: relative;
  z-index: 1;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--content-mx);
}

.page-wrap-wide {
  max-width: 1100px;
}

/* ============================================================
   HERO SECTION (homepage)
   ============================================================ */
.hero {
  text-align: center;
  padding: 5rem 1rem 3.5rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text) 0%, var(--text-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-2);
  max-width: 560px;
  margin: 0 auto 2rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ============================================================
   3D LUXE BUTTONS
   ============================================================ */
.btn {
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  border: none;
  border-radius: 24px;
  padding: 0.7rem 1.65rem;
  cursor: pointer;
  white-space: nowrap;
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.2s var(--ease);
}

.btn:active {
  transform: scale(0.96);
}

.btn-blue {
  background: linear-gradient(180deg, #4B92FF 0%, #2563EB 100%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4), 0 2px 4px rgba(37, 99, 235, 0.15), 0 8px 16px rgba(37, 99, 235, 0.2);
}

.btn-blue:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4), 0 2px 4px rgba(37, 99, 235, 0.2), 0 12px 24px rgba(37, 99, 235, 0.28);
}

.btn-secondary {
  background: var(--bg-subtle);
  color: var(--text-2);
  box-shadow: none;
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  color: var(--text);
  background: var(--bg-raised);
  transform: translateY(-1px);
}

.btn-green {
  background: linear-gradient(180deg, #4ADE80 0%, #16A34A 100%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.35), 0 2px 4px rgba(22, 163, 74, 0.15), 0 8px 16px rgba(22, 163, 74, 0.2);
}

.btn-green:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.35), 0 2px 4px rgba(22, 163, 74, 0.2), 0 12px 24px rgba(22, 163, 74, 0.28);
}

.btn-red {
  background: linear-gradient(180deg, #F87171 0%, #DC2626 100%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.35), 0 2px 4px rgba(220, 38, 38, 0.15), 0 8px 16px rgba(220, 38, 38, 0.2);
}

.btn-red:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.35), 0 2px 4px rgba(220, 38, 38, 0.2), 0 12px 24px rgba(220, 38, 38, 0.28);
}

.btn-sm {
  font-size: 0.82rem;
  padding: 0.5rem 1.2rem;
}

.btn-lg {
  font-size: 1rem;
  padding: 0.8rem 2rem;
}

/* ============================================================
   BLOG CARDS (homepage)
   ============================================================ */
.section-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-3);
  margin-bottom: 1.25rem;
}

.blog-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.blog-card {
  display: block;
  padding: 1.25rem 1.35rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--r);
  text-decoration: none;
  transition: all 0.25s var(--ease);
  box-shadow: var(--shadow-ambient);
}

.blog-card:hover {
  background: var(--bg-subtle);
  border-color: rgba(59, 130, 246, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.blog-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
  line-height: 1.4;
}

.blog-card p {
  font-size: 0.88rem;
  color: var(--text-2);
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card .card-arrow {
  display: inline-block;
  color: var(--blue-from);
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.5rem;
  transition: transform 0.2s;
}

.blog-card:hover .card-arrow {
  transform: translateX(4px);
}

/* ============================================================
   ARTICLE / PROSE (blog sub-pages)
   ============================================================ */
.article-header {
  padding: 3.5rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.article-header h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: var(--text);
}

.prose {
  padding-bottom: 4rem;
}

.prose h2 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.prose h3 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 2rem;
  margin-bottom: 0.6rem;
  color: var(--text);
}

.prose p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-2);
  margin-bottom: 1.25rem;
}

.prose ul,
.prose ol {
  margin-bottom: 1.25rem;
  color: var(--text-2);
}

.prose li {
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 0.5rem;
}

.prose a {
  color: var(--blue-from);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(59, 130, 246, 0.3);
  transition: text-decoration-color 0.2s;
}

.prose a:hover {
  text-decoration-color: var(--blue-from);
}

.prose hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 2.5rem 0;
}

.prose img {
  border-radius: var(--r);
  margin: 1.5rem 0;
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 0.35rem;
  letter-spacing: 0.01em;
}

.form-input {
  width: 100%;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 0.65rem 0.9rem;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  border-color: var(--blue-from);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.form-input::placeholder {
  color: var(--text-3);
}

/* ============================================================
   CARDS (for written round, database, etc.)
   ============================================================ */
.card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow-ambient);
}

.card-header {
  padding: 1.15rem 1.35rem;
  border-bottom: 1px solid var(--border);
}

.card-header h2,
.card-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}

.card-body {
  padding: 1.35rem;
}

.card-text {
  color: var(--text-2);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  padding: 1rem 1.15rem;
  border-radius: var(--r);
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 1rem;
  border: 1px solid;
}

.alert a,
.alert .alert-link {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.alert-success {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.2);
  color: var(--green-from);
}

.alert-success a {
  color: var(--green-from);
}

.alert-danger {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
  color: var(--red-from);
}

.alert-danger a {
  color: var(--red-from);
}

.alert-info {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.15);
  color: var(--blue-from);
}

.alert-info a {
  color: var(--blue-from);
}

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress {
  height: 28px;
  background: var(--bg-subtle);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress-bar {
  height: 100%;
  background: linear-gradient(180deg, #4B92FF 0%, #2563EB 100%);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  transition: width 0.4s var(--ease);
}

/* ============================================================
   FORM CHECK (radio/checkbox — for written round)
   ============================================================ */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background 0.15s;
}

.form-check:hover {
  background: var(--bg-subtle);
}

.form-check-input {
  width: 18px;
  height: 18px;
  margin-top: 0.15rem;
  accent-color: var(--blue-from);
  cursor: pointer;
  flex-shrink: 0;
}

.form-check-label {
  font-size: 0.95rem;
  color: var(--text);
  cursor: pointer;
  line-height: 1.5;
}

/* ============================================================
   BADGE
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 700;
}

.bg-secondary {
  background: var(--bg-subtle) !important;
  color: var(--text-2) !important;
  border: 1px solid var(--border);
}

.fs-5 {
  font-size: 0.92rem !important;
}

/* ============================================================
   INPUT GROUP (for database page)
   ============================================================ */
.input-group {
  display: flex;
  align-items: stretch;
}

.input-group .form-input,
.input-group .form-control {
  flex: 1;
  border-radius: var(--r-sm) 0 0 var(--r-sm);
}

.input-group .btn,
.input-group button {
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

.input-group-text {
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: var(--r-sm) 0 0 var(--r-sm);
  color: var(--text-3);
  font-size: 0.9rem;
}

.input-group-text+.form-input,
.input-group-text+.form-control {
  border-radius: 0;
}

/* ============================================================
   UTILITIES (Bootstrap compatibility shims)
   ============================================================ */
.form-control {
  width: 100%;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 0.65rem 0.9rem;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  border-color: var(--blue-from);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.form-control::placeholder {
  color: var(--text-3);
}

.btn-primary {
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 600;
  border: none;
  border-radius: 24px;
  padding: 0.65rem 1.35rem;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(180deg, #4B92FF 0%, #2563EB 100%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4), 0 2px 4px rgba(37, 99, 235, 0.15), 0 8px 16px rgba(37, 99, 235, 0.2);
  transition: all 0.2s var(--ease);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4), 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-primary:active {
  transform: scale(0.96);
}

.btn-secondary {
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 0.65rem 1.35rem;
  cursor: pointer;
  background: var(--bg-subtle);
  color: var(--text-2);
  transition: all 0.2s var(--ease);
}

.btn-secondary:hover {
  color: var(--text);
  background: var(--bg-raised);
}

.btn-outline-light {
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  background: transparent;
  color: var(--text-2);
  transition: all 0.2s;
}

.btn-outline-light:hover {
  color: var(--text);
  background: var(--bg-subtle);
}

/* Spacing utilities */
.my-2 {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.my-5 {
  margin-top: 3rem;
  margin-bottom: 3rem;
}

.mt-3 {
  margin-top: 1rem;
}

.mt-4 {
  margin-top: 1.5rem;
}

.mt-5 {
  margin-top: 3rem;
}

.mb-3 {
  margin-bottom: 1rem;
}

.mb-4 {
  margin-bottom: 1.5rem;
}

.lead {
  font-size: 1.1rem;
  color: var(--text-2);
  line-height: 1.65;
}

/* Flex utilities */
.d-flex {
  display: flex;
}

.d-none {
  display: none;
}

.justify-content-between {
  justify-content: space-between;
}

.justify-content-center {
  justify-content: center;
}

.align-items-center {
  align-items: center;
}

.text-center {
  text-align: center;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.col-md-6 {
  flex: 1;
  min-width: 280px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  margin-top: auto;
  padding: 2rem var(--content-mx);
  border-top: 1px solid var(--border);
  text-align: center;
}

.site-footer p {
  font-size: 0.78rem;
  color: var(--text-3);
}

.site-footer a {
  color: var(--text-2);
}

/* ============================================================
   TABLES
   ============================================================ */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin: 1.5rem 0;
}

th {
  text-align: left;
  padding: 0.7rem 0.85rem;
  background: var(--bg-subtle);
  color: var(--text-2);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  vertical-align: top;
}

tr:hover td {
  background: var(--bg-subtle);
}

/* ============================================================
   QUOTE BLOCK (article embeds)
   ============================================================ */
.quote-block {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue-from);
  border-radius: var(--r-sm);
  padding: 1.15rem 1.35rem;
  margin: 1.25rem 0;
  font-style: italic;
  color: var(--text-2);
}

.quote-block p {
  margin-bottom: 0.5rem;
}

.quote-block p:last-child {
  margin-bottom: 0;
}

blockquote,
q {
  font-style: italic;
  color: var(--text-2);
}

/* ============================================================
   DIVIDER
   ============================================================ */
.divider {
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent 80%);
  margin: 2rem 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 1400px) {
  :root {
    --content-mx: 12vw;
  }
}

@media (min-width: 1800px) {
  :root {
    --content-mx: 18vw;
  }
}

@media (max-width: 768px) {
  :root {
    --content-mx: 1.25rem;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 0.65rem 1.5rem;
    border-radius: 0;
  }

  .nav-hamburger {
    display: flex;
  }

  .nav-search {
    display: none;
  }

  .nav-links.open~.nav-search,
  .nav-search.open {
    display: flex;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    background: var(--bg-raised);
    padding: 0.65rem 1.25rem;
    border-bottom: 1px solid var(--border);
  }

  .hero {
    padding: 3rem 0.5rem 2.5rem;
  }

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

  .hero p {
    font-size: 1rem;
  }

  .btn {
    padding: 0.6rem 1.3rem;
    font-size: 0.85rem;
  }

  .article-header {
    padding: 2.5rem 0 1.25rem;
  }

  .article-header h1 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  :root {
    --content-mx: 0.85rem;
  }

  .site-nav {
    padding: 0.7rem 0.85rem;
  }

  .nav-logo {
    font-size: 1.1rem;
  }

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

  .blog-card {
    padding: 1rem 1.1rem;
  }
}