/* ============================================
   ACQUISITION / INQUIRY FORM STYLING
   ============================================ */

.order-form-section {
  margin-top: 2.5rem;
  padding: 2rem 1.75rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

html.theme-dark .order-form-section {
  background: rgba(15, 23, 42, 0.96);
  border-color: rgba(148, 163, 184, 0.4);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.8);
}

.form-title {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.form-subtitle {
  margin: 0 0 1.75rem;
  font-size: 0.95rem;
  color: #64748b;
}

html.theme-dark .form-subtitle {
  color: #cbd5f5;
}

.order-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group-full {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

html.theme-dark .form-label {
  color: #e2e8f0;
}

.required {
  color: #e11d48;
  font-size: 0.9em;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 0.55rem;
  border: 1px solid #cbd5f5;
  background: #ffffff;
  font-size: 0.95rem;
  color: #0f172a;
  outline: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease;
}

html.theme-dark .form-input,
html.theme-dark .form-select,
html.theme-dark .form-textarea {
  background: #020617;
  border-color: #1e293b;
  color: #e5e7eb;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #9ca3af;
}

html.theme-dark .form-input::placeholder,
html.theme-dark .form-textarea::placeholder {
  color: #6b7280;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.35);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* Submit button (reuses general .btn / .btn-primary if you have them) */
.form-submit-btn {
  margin-top: 0.5rem;
  padding-inline: 1.75rem;
}

.btn.btn-primary.form-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-weight: 600;
}

/* If you don't already have .btn / .btn-primary, you can enable:

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition:
    background-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.1s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(79, 70, 229, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(79, 70, 229, 0.45);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.35);
}
*/

.form-footnote {
  margin-top: 0.85rem;
  font-size: 0.8rem;
  color: #64748b;
}

html.theme-dark .form-footnote {
  color: #cbd5f5;
}

/* Responsive for form */
@media (max-width: 768px) {
  .order-form-section {
    padding: 1.5rem 1.25rem;
  }

  .order-form-grid {
    grid-template-columns: 1fr;
  }

  .form-title {
    font-size: 1.3rem;
  }
}


/* ============================================
   BASE & THEME
   ============================================ */

:root {
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --color-bg: #f5f5fb;
  --color-bg-alt: #ffffff;
  --color-surface: #ffffff;
  --color-surface-soft: #f0f2ff;
  --color-border-subtle: rgba(15, 23, 42, 0.08);

  --color-text-main: #0f172a;
  --color-text-muted: #64748b;

  --color-academia: #2b6cb0;  /* blue */
  --color-land: #e76f51;      /* warm accent */
  --color-accent: #6366f1;    /* indigo */
  --color-accent-soft: rgba(99, 102, 241, 0.12);

  --shadow-soft: 0 22px 55px rgba(15, 23, 42, 0.12);

  --radius-lg: 20px;
  --radius-md: 14px;

  --transition-fast: 0.12s ease-out;
  --transition-med: 0.18s ease-out;
}

/* ==== Dark Theme Variables (IMPROVED CONTRAST) ==== */
/* Apply when .theme-dark is on <html> or <body> */
:root.theme-dark,
.theme-dark {
  --color-bg: #020617;        /* main page background */
  --color-bg-alt: #020617;
  --color-surface: #020617;   /* cards, hero, surfaces */
  --color-surface-soft: #020617;

  --color-border-subtle: rgba(148, 163, 184, 0.35);

  --color-text-main: #e5e7eb;  /* main text */
  --color-text-muted: #9ca3af; /* muted text */

  /* lighter brand colors on dark bg */
  --color-academia: #93c5fd;
  --color-land: #fdba74;
  --color-accent: #a5b4fc;
  --color-accent-soft: rgba(165, 180, 252, 0.25);

  --shadow-soft: 0 22px 55px rgba(15, 23, 42, 0.9);
}

/* Base reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

/* Base body background */
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text-main);
  background: radial-gradient(circle at top left, #e0e7ff 0, var(--color-bg) 40%, var(--color-bg-alt) 100%);
  -webkit-font-smoothing: antialiased;
}

/* Dark mode background fix for readability */
.theme-dark body,
html.theme-dark body {
  background: radial-gradient(
    circle at top left,
    #020617 0,
    var(--color-bg) 45%,
    var(--color-bg-alt) 100%
  );
}

a {
  color: var(--color-accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

/* Utility container */
.container {
  width: min(1120px, 100% - 2.5rem);
  margin-inline: auto;
}

/* ============================================
   HEADER & LOGO
   ============================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: radial-gradient(circle at top left, rgba(129, 140, 248, 0.16) 0, rgba(15, 23, 42, 0.01) 45%);
  border-bottom: 1px solid var(--color-border-subtle);
}

.theme-dark .site-header,
html.theme-dark .site-header {
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.85) 0, rgba(15, 23, 42, 0.6) 55%);
  border-bottom-color: rgba(30, 64, 175, 0.45);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.8rem 0.4rem;
}

/* Logo block */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: conic-gradient(from 210deg, #4f46e5, #22c55e, #eab308, #f97316, #4f46e5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0b1120;
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.3);
  position: relative;
  overflow: hidden;
}
.logo-mark::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 11px;
  background: radial-gradient(circle at 20% 0, #ffffff 0, #e5e7eb 52%, #cbd5f5 100%);
  opacity: 0.9;
}
.logo-mark span {
  position: relative;
  z-index: 1;
}

.theme-dark .logo-mark::after,
html.theme-dark .logo-mark::after {
  background: radial-gradient(circle at 20% 0, #1f2937 0, #020617 55%, #020617 100%);
  opacity: 0.92;
}

.logo-text-wrap {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-text-main);
}
.logo-subtitle {
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

/* Navigation */
.navbar-right {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.main-nav {
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-decoration: none;
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast),
    transform 0.1s ease;
}

.nav-links a::before {
  content: "•";
  font-size: 0.7rem;
  color: var(--color-accent);
  opacity: 0.8;
}

.nav-links a:hover {
  background: var(--color-accent-soft);
  color: var(--color-text-main);
  transform: translateY(-1px);
}

/* Dark mode nav contrast */
.theme-dark .nav-links a,
html.theme-dark .nav-links a {
  color: var(--color-text-muted);
}
.theme-dark .nav-links a:hover,
html.theme-dark .nav-links a:hover {
  color: var(--color-text-main);
}

/* Highlight current page if you add .is-active */
.nav-links a.is-active {
  background: var(--color-accent-soft);
  color: var(--color-text-main);
  font-weight: 600;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  border-radius: 999px;
  border: 1px solid var(--color-border-subtle);
  background: rgba(255, 255, 255, 0.7);
  padding: 0.4rem 0.6rem;
  cursor: pointer;
}

.menu-toggle-inner {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.menu-toggle span {
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: #0f172a;
  display: block;
}
.theme-dark .menu-toggle,
html.theme-dark .menu-toggle {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(51, 65, 85, 0.8);
}
.theme-dark .menu-toggle span,
html.theme-dark .menu-toggle span {
  background: #e5e7eb;
}

/* Theme toggle button */
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--color-border-subtle);
  background: radial-gradient(circle at 20% 0, #ffffff 0, var(--color-surface) 80%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  margin-left: 0.2rem;
  position: relative;
  overflow: hidden;
}

.theme-icon {
  position: absolute;
  transition: opacity var(--transition-med), transform var(--transition-med);
}

.theme-icon-sun {
  opacity: 1;
  transform: translateY(0);
}

.theme-icon-moon {
  opacity: 0;
  transform: translateY(8px);
}

.theme-dark .theme-icon-sun,
html.theme-dark .theme-icon-sun {
  opacity: 0;
  transform: translateY(-8px);
}

.theme-dark .theme-icon-moon,
html.theme-dark .theme-icon-moon {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   HERO & SECTIONS
   ============================================ */

.hero {
  padding: 2.8rem 0 2.6rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.2fr);
  gap: 2.5rem;
  align-items: center;
}

.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: var(--color-academia);
  margin-bottom: 0.6rem;
  font-weight: 700;
}

.hero h1 {
  font-size: 2.25rem;
  line-height: 1.2;
  margin: 0 0 0.75rem;
}

.hero-subtitle {
  margin: 0 0 1.3rem;
  color: var(--color-text-muted);
  max-width: 36rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.2rem;
}

.hero-highlights {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--color-text-muted);
  font-size: 0.92rem;
}

/* Hero card / snapshot */
.hero-card {
  background: radial-gradient(circle at top left, #eef2ff 0, var(--color-surface) 55%);
  border-radius: 24px;
  padding: 1.5rem 1.6rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--color-border-subtle);
}

.theme-dark .hero-card,
html.theme-dark .hero-card {
  background: radial-gradient(circle at top left, #111827 0, var(--color-surface) 60%);
}

.hero-card-heading {
  font-size: 1.05rem;
  margin: 0 0 0.9rem;
  color: var(--color-text-main);
}

.brand-snapshot-card {
  border-radius: 16px;
  background: var(--color-surface-soft);
  padding: 1rem 1.1rem;
}

.brand-snapshot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.7rem;
}

.brand-name {
  font-weight: 700;
  margin: 0;
}

.brand-tagline {
  margin: 0.15rem 0 0;
  font-size: 0.86rem;
  color: var(--color-text-muted);
}

.live-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.08);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #16a34a;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.3);
}

.status-text {
  font-size: 0.79rem;
  color: #15803d;
}

/* Dark mode status more visible */
.theme-dark .live-status,
html.theme-dark .live-status {
  background: rgba(34, 197, 94, 0.18);
}
.theme-dark .status-text,
html.theme-dark .status-text {
  color: #4ade80;
}

.brand-bullets {
  margin: 0;
  padding-left: 1rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* Sections */
.section {
  padding: 2.4rem 0;
}

.section-alt {
  padding: 2.4rem 0;
  background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.09) 0, var(--color-bg-alt) 35%, var(--color-bg) 100%);
}

.section-kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: var(--color-academia);
  margin: 0 0 0.4rem;
  font-weight: 700;
}

.section-heading {
  margin: 0 0 0.75rem;
  font-size: 1.6rem;
}

.section-intro {
  margin: 0 0 1.4rem;
  color: var(--color-text-muted);
  max-width: 40rem;
}

/* ============================================
   GRIDS & CARDS
   ============================================ */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem;
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.3fr);
  gap: 1.5rem;
}

.card {
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  padding: 1.15rem 1.2rem 1.2rem;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.06);
  position: relative;
  overflow: hidden;
  transition:
    transform var(--transition-med),
    box-shadow var(--transition-med),
    border-color var(--transition-med),
    background-color var(--transition-med);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  border-color: rgba(79, 70, 229, 0.35);
}

.card-kicker {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-academia);
  margin-bottom: 0.35rem;
}

.card-title {
  margin: 0 0 0.4rem;
  font-size: 1rem;
}

.card-text {
  margin: 0 0 0.8rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

/* ============================================
   TOOLS / APPS LISTS WITH ICONS
   ============================================ */

.tools-list,
.jobs-list,
.links-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.55rem;
}

.tools-list a,
.jobs-list a,
.links-list a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
  padding: 0.4rem 0.6rem;
  border-radius: 999px;
  color: var(--color-text-main);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.3);
  transition:
    background-color var(--transition-fast),
    transform 0.1s ease,
    box-shadow var(--transition-fast);
}

.theme-dark .tools-list a,
.theme-dark .jobs-list a,
.theme-dark .links-list a,
html.theme-dark .tools-list a,
html.theme-dark .jobs-list a,
html.theme-dark .links-list a {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(51, 65, 85, 0.9);
  color: var(--color-text-main);
}

.tools-list a::before {
  content: "🛠️";
}
.jobs-list a::before {
  content: "💼";
}
.links-list a::before {
  content: "🔗";
}

.tools-list a:hover,
.jobs-list a:hover,
.links-list a:hover {
  background: var(--color-accent-soft);
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.18);
  transform: translateY(-1px);
}

/* ============================================
   PAGE LAYOUT (ARTICLE PAGES)
   ============================================ */

.page-hero {
  padding: 2.4rem 0 1.4rem;
}

.page-kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  color: var(--color-academia);
  margin-bottom: 0.35rem;
  font-weight: 700;
}

.page-title {
  margin: 0 0 0.4rem;
  font-size: 1.8rem;
}

.page-subtitle {
  margin: 0;
  color: var(--color-text-muted);
  max-width: 40rem;
  font-size: 0.96rem;
}

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(0, 0.9fr);
  gap: 1.8rem;
  align-items: flex-start;
  padding-bottom: 2.5rem;
}

.page-main {
  min-width: 0;
}

.page-sidebar {
  min-width: 0;
}

/* Article */
.article {
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  padding: 1.4rem 1.5rem;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.06);
}

.article h2 {
  margin: 1.4rem 0 0.7rem;
  font-size: 1.2rem;
}
.article h3 {
  margin: 1rem 0 0.5rem;
  font-size: 1.05rem;
}
.article p {
  margin: 0 0 0.75rem;
}
.article ul {
  margin: 0 0 0.85rem;
  padding-left: 1.1rem;
}
.article li {
  margin-bottom: 0.4rem;
}

/* Callouts */
.callout {
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  margin: 0.9rem 0;
  background: var(--color-surface-soft);
  border: 1px solid rgba(99, 102, 241, 0.22);
  font-size: 0.93rem;
}

.callout-strong {
  border-left: 3px solid var(--color-accent);
}

/* Sidebar cards */
.sidebar-card {
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  padding: 1.1rem 1.1rem 1.15rem;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
  margin-bottom: 1.1rem;
}

.sidebar-title {
  margin: 0 0 0.4rem;
  font-size: 1rem;
}

.sidebar-text {
  margin: 0 0 0.7rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* ============================================
   BUTTONS (GENERIC)
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  gap: 0.35rem;
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform 0.1s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(79, 70, 229, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(79, 70, 229, 0.45);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--color-text-main);
  border: 1px solid var(--color-border-subtle);
}
.btn-outline:hover {
  background: var(--color-accent-soft);
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  border-top: 1px solid var(--color-border-subtle);
  background: var(--color-bg-alt);
  padding: 1.8rem 0 2rem;
  margin-top: 2rem;
}

.footer-inner {
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}
.footer-links a {
  color: var(--color-text-muted);
  font-size: 0.88rem;
}
.footer-links a:hover {
  color: var(--color-accent);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.8fr);
  }

  .page-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-sidebar {
    order: -1;
  }

  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .header-inner {
    padding-inline: 0;
  }

  .main-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .hero {
    padding: 2.4rem 0 2rem;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.8rem;
  }

  .page-hero {
    padding-top: 2rem;
  }

  .grid-3,
  .grid-2,
  .split-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .container {
    width: min(100% - 1.6rem, 100%);
  }
}

/* Optional: if you have a mobile nav panel, you can show it with .is-open */
.mobile-nav {
  display: none;
}
.mobile-nav.is-open {
  display: block;
}

/* ============================================
   HEADER / LOGO / TOGGLE REFINEMENTS
   ============================================ */

/* Header no longer sticky & slightly smaller */
.site-header {
  position: relative;       /* was sticky */
  top: auto;
  z-index: 20;
  backdrop-filter: none;
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border-subtle);
}

.theme-dark .site-header,
html.theme-dark .site-header {
  background: #020617;
  border-bottom-color: rgba(51, 65, 85, 0.8);
}

.header-inner {
  padding: 0.55rem 0;       /* was bigger; now slimmer */
}

/* Use text logo, hide the old gradient box if you don't want it */
.logo-mark {
  display: none;
}

/* Text logo with different colors for Academia / Land */
.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 0.15rem;
  text-decoration: none;
}

.logo-text {
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.logo-text .logo-academia {
  color: var(--color-academia);
}

.logo-text .logo-land {
  margin-left: 0.18rem;
  color: var(--color-land);
}

.logo:hover .logo-academia,
.logo:hover .logo-land {
  text-decoration: none;
  opacity: 0.9;
}

/* Nav links a bit smaller, more "tab-like" but compact */
.nav-links a {
  padding: 0.32rem 0.6rem;
  font-size: 0.82rem;
  border-radius: 999px;
}

.nav-links a::before {
  font-size: 0.6rem;
}

/* When used as page-tabs (e.g., under hero) */
.tabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.6rem 0 1rem;
  padding: 0;
  list-style: none;
}

.tabs-nav button,
.tabs-nav a {
  border-radius: 999px;
  border: 1px solid var(--color-border-subtle);
  background: var(--color-surface);
  padding: 0.35rem 0.8rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform 0.1s ease;
}

.tabs-nav button:hover,
.tabs-nav a:hover {
  background: var(--color-accent-soft);
  color: var(--color-text-main);
  transform: translateY(-1px);
}

.tabs-nav .is-active {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
  color: var(--color-text-main);
  font-weight: 600;
}

/* Theme toggle: clearer and with hover */
.theme-toggle {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--color-border-subtle);
  background: radial-gradient(circle at 20% 0, #ffffff 0, var(--color-surface) 80%);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
  transition:
    box-shadow var(--transition-fast),
    transform 0.1s ease,
    border-color var(--transition-fast),
    background-color var(--transition-fast);
}

.theme-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.2);
  border-color: rgba(99, 102, 241, 0.5);
}

/* Icons already fade between sun/moon; just keep them small */
.theme-icon svg {
  width: 17px;
  height: 17px;
}

/* ============================================
   ARTICLE PAGES: HERO & BODY
   ============================================ */

/* Make hero/header on sub-pages less tall */
.page-hero {
  padding: 1.6rem 0 1.1rem;       /* was larger */
}

.page-hero h1 {
  font-size: 1.6rem;              /* smaller title */
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.page-hero-lead {
  font-size: 0.94rem;
  max-width: 42rem;
  color: var(--color-text-muted);
}

/* Two-column layout but a bit tighter */
.page-layout {
  grid-template-columns: minmax(0, 2.1fr) minmax(0, 0.9fr);
  gap: 1.4rem;
  padding-bottom: 2rem;
}

/* Article body typographic tuning */
.article-body {
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  padding: 1.25rem 1.35rem;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
  font-size: 0.95rem;
  line-height: 1.7;
}

.article-body h2 {
  margin: 1.2rem 0 0.6rem;
  font-size: 1.15rem;
}

.article-body h3 {
  margin: 0.95rem 0 0.5rem;
  font-size: 1rem;
}

.article-body p {
  margin: 0 0 0.75rem;
}

.article-body ul,
.article-body ol {
  margin: 0 0 0.9rem;
  padding-left: 1.1rem;
}

.article-body li {
  margin-bottom: 0.4rem;
}

/* Sidebar cards smaller */
.page-sidebar .sidebar-section,
.page-sidebar .sidebar-card {
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  padding: 0.9rem 1rem;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
  font-size: 0.9rem;
}

/* ============================================
   FOOTER REFINEMENTS
   ============================================ */

.site-footer {
  padding: 1.3rem 0 1.4rem;
  margin-top: 1.8rem;
  background: var(--color-bg-alt);
}

.theme-dark .site-footer,
html.theme-dark .site-footer {
  background: #020617;
}

.footer-inner {
  font-size: 0.86rem;
}

.footer-links a {
  font-size: 0.84rem;
}

/* ============================================
   RESPONSIVE TWEAKS FOR SMALL SCREENS
   ============================================ */

@media (max-width: 900px) {
  .page-hero {
    padding-top: 1.4rem;
    padding-bottom: 1rem;
  }

  .page-hero h1 {
    font-size: 1.45rem;
  }

  .article-body {
    padding: 1.1rem 1.15rem;
  }
}

@media (max-width: 768px) {
  .header-inner {
    padding-inline: 0.4rem;
  }

  .logo-text {
    font-size: 0.98rem;
  }

  .page-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-sidebar {
    order: -1;
  }
}
