/*
Theme Name:  Starfield Explorer's Log
Theme URI:   https://artbymattias.com
Author:      Mattias
Author URI:  https://artbymattias.com
Description: A custom dark space-themed WordPress theme for the Starfield Explorer's Log. Features the full visual language of the companion app — Orbitron headings, Share Tech Mono data display, animated star canvas, and a dark/light/high-contrast theme system.
Version:     1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License:     GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: starfield-log
Tags:        dark, custom-colors, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready
*/

/* ─── CSS VARIABLES ─────────────────────────────────────────── */
:root {
  --bg:          #050810;
  --bg2:         #080d1a;
  --bg3:         #0d1528;
  --panel:       #0c1422dd;
  --border:      #253a6a;
  --border2:     #3456a0;
  --accent:      #5dd0ff;
  --accent2:     #a07de0;
  --gold:        #ffe082;
  --green:       #80ffbc;
  --red:         #ff6b6b;
  --orange:      #ffb74d;
  --text:        #ddeeff;
  --text-dim:    #8aaed4;
  --text-muted:  #5a7aaa;
  --glow:        0 0 12px #5dd0ff80;
  --fs:          16px;
  --header-h:    70px;
  --max-w:       1200px;
  --radius:      0px;
}

/* ─── RESET ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: var(--fs, 16px); scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Rajdhani', sans-serif;
  font-weight: 500;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── STAR CANVAS ────────────────────────────────────────────── */
#star-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ─── SITE WRAPPER ───────────────────────────────────────────── */
#page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#content {
  flex: 1;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

/* ─── TYPOGRAPHY ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Orbitron', sans-serif;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--text);
  line-height: 1.2;
}

h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h2 { font-size: clamp(1.2rem, 3vw, 1.8rem); }
h3 { font-size: clamp(1rem, 2.5vw, 1.4rem); }
h4 { font-size: 1rem; }
h5, h6 { font-size: .85rem; }

p { margin-bottom: 1.2em; color: var(--text-dim); }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: #fff; }

strong, b { color: var(--text); font-weight: 700; }
em, i     { color: var(--text-dim); font-style: italic; }

code, pre {
  font-family: 'Share Tech Mono', monospace;
  font-size: .85em;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--accent);
}
code { padding: 2px 6px; }
pre  { padding: 16px 20px; overflow-x: auto; margin-bottom: 1.5em; }

blockquote {
  border-left: 3px solid var(--accent);
  padding: 12px 20px;
  margin: 1.5em 0;
  background: var(--bg3);
  color: var(--text-dim);
  font-style: italic;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2em 0;
}

ul, ol { padding-left: 1.5em; margin-bottom: 1.2em; color: var(--text-dim); }
li { margin-bottom: .4em; }

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

/* ─── HEADER ─────────────────────────────────────────────────── */
#masthead {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, #080e1eee 0%, #050810cc 100%);
  border-bottom: 1px solid var(--border2);
  box-shadow: 0 2px 30px #0008;
  backdrop-filter: blur(8px);
  height: var(--header-h);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 20px;
}

/* ─── LOGO ───────────────────────────────────────────────────── */
.site-branding {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  font-size: 1.8rem;
  color: var(--accent);
  filter: drop-shadow(var(--glow));
  animation: pulse 3s ease-in-out infinite;
  line-height: 1;
}

@keyframes pulse {
  0%, 100% { opacity: 1; filter: drop-shadow(0 0 8px #5dd0ffcc); }
  50%       { opacity: .7; filter: drop-shadow(0 0 20px #5dd0ff); }
}

.custom-logo { height: 40px; width: auto; }

.site-title-group { display: flex; flex-direction: column; gap: 2px; }

.site-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: .25em;
  color: #fff;
  text-shadow: 0 0 20px #5dd0ff80;
  line-height: 1;
  text-decoration: none;
}
.site-title:hover { color: #fff; }

.site-description {
  font-family: 'Share Tech Mono', monospace;
  font-size: .6rem;
  letter-spacing: .35em;
  color: var(--accent);
  text-transform: uppercase;
}

/* ─── NAVIGATION ─────────────────────────────────────────────── */
#site-navigation { display: flex; align-items: center; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-menu li { position: relative; }

.nav-menu a {
  display: block;
  padding: 8px 14px;
  font-family: 'Orbitron', sans-serif;
  font-size: .58rem;
  font-weight: 600;
  letter-spacing: .12em;
  color: var(--text-muted);
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
  white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu .current-menu-item > a,
.nav-menu .current_page_item > a {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Dropdown */
.nav-menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: #080e1eee;
  border: 1px solid var(--border2);
  box-shadow: 0 8px 30px #000c;
  backdrop-filter: blur(8px);
  z-index: 200;
  list-style: none;
  padding: 6px 0;
}
.nav-menu li:hover > .sub-menu { display: block; }
.nav-menu .sub-menu a {
  border-bottom: none;
  padding: 9px 18px;
  font-size: .55rem;
}

/* Mobile toggle */
.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text-dim);
  padding: 8px 12px;
  font-family: 'Orbitron', sans-serif;
  font-size: .55rem;
  letter-spacing: .1em;
  cursor: pointer;
  transition: all .2s;
}
.menu-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* Header CTA button */
.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: linear-gradient(135deg, var(--bg3), var(--bg2));
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: 'Orbitron', sans-serif;
  font-size: .58rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-decoration: none;
  transition: all .2s;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  white-space: nowrap;
}
.header-cta:hover { color: #fff; box-shadow: var(--glow); background: linear-gradient(135deg, var(--bg2), var(--panel)); }

/* ─── HERO SECTION ───────────────────────────────────────────── */
.hero {
  padding: 100px 0 80px;
  text-align: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, #1a3a6a22 0%, transparent 70%);
  pointer-events: none;
}

.hero-eyebrow {
  font-family: 'Share Tech Mono', monospace;
  font-size: .75rem;
  letter-spacing: .3em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 900;
  letter-spacing: .15em;
  color: #fff;
  text-shadow: 0 0 40px #5dd0ff40;
  margin-bottom: 20px;
  line-height: 1.1;
}

.hero-title span { color: var(--accent); }

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--text-dim);
  max-width: 600px;
  margin: 0 auto 40px;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── BUTTONS ────────────────────────────────────────────────── */
.btn-primary,
.wp-block-button__link {
  display: inline-block;
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--bg3), var(--bg2));
  border: 1px solid var(--accent);
  color: var(--accent) !important;
  font-family: 'Orbitron', sans-serif;
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-decoration: none !important;
  transition: all .2s;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  cursor: pointer;
}
.btn-primary:hover,
.wp-block-button__link:hover {
  color: #fff !important;
  box-shadow: var(--glow);
}

.btn-secondary {
  display: inline-block;
  padding: 12px 28px;
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text-dim);
  font-family: 'Orbitron', sans-serif;
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-decoration: none;
  transition: all .2s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ─── FEATURE CARDS ──────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin: 60px 0;
}

.feature-card {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}
.feature-card:hover { border-color: var(--border2); box-shadow: 0 0 30px #0008; }
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: .3;
}

.feature-icon { font-size: 2rem; margin-bottom: 14px; }
.feature-title {
  font-family: 'Orbitron', sans-serif;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .15em;
  color: var(--text);
  margin-bottom: 10px;
}
.feature-desc { font-size: .9rem; color: var(--text-dim); line-height: 1.6; }

/* ─── SECTION WRAPPER ────────────────────────────────────────── */
.section { padding: 80px 0; }
.section-sm { padding: 50px 0; }

.section-header { margin-bottom: 50px; text-align: center; }
.section-eyebrow {
  font-family: 'Share Tech Mono', monospace;
  font-size: .7rem;
  letter-spacing: .25em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--text);
  margin-bottom: 14px;
}
.section-lead {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 580px;
  margin: 0 auto;
}

/* ─── DIVIDER ────────────────────────────────────────────────── */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border2), transparent);
  margin: 0;
}

/* ─── PRICING CARDS ──────────────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 36px 28px;
  position: relative;
  transition: border-color .2s;
}
.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 40px #5dd0ff18;
}
.pricing-card.featured::before {
  content: 'RECOMMENDED';
  position: absolute;
  top: -1px; left: 50%; transform: translateX(-50%);
  background: var(--accent);
  color: var(--bg);
  font-family: 'Orbitron', sans-serif;
  font-size: .5rem;
  font-weight: 700;
  letter-spacing: .15em;
  padding: 3px 14px;
}

.pricing-name {
  font-family: 'Orbitron', sans-serif;
  font-size: .7rem;
  letter-spacing: .2em;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.pricing-price {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 6px;
}
.pricing-period {
  font-family: 'Share Tech Mono', monospace;
  font-size: .7rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
}
.pricing-features li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: .85rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 10px;
}
.pricing-features li:last-child { border-bottom: none; }
.pricing-features li::before { content: '✓'; color: var(--green); font-size: .8rem; flex-shrink: 0; }
.pricing-features li.unavailable { opacity: .4; }
.pricing-features li.unavailable::before { content: '✕'; color: var(--red); }

/* ─── BLOG / POSTS ───────────────────────────────────────────── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.post-card {
  background: var(--panel);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.post-card:hover { border-color: var(--border2); box-shadow: 0 0 20px #0006; }

.post-card-thumb { width: 100%; height: 180px; object-fit: cover; }
.post-card-body  { padding: 20px; }
.post-card-meta {
  font-family: 'Share Tech Mono', monospace;
  font-size: .65rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: .08em;
}
.post-card-title {
  font-family: 'Orbitron', sans-serif;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.4;
}
.post-card-excerpt { font-size: .85rem; color: var(--text-dim); line-height: 1.5; margin-bottom: 16px; }
.post-card-link {
  font-family: 'Orbitron', sans-serif;
  font-size: .55rem;
  letter-spacing: .12em;
  color: var(--accent);
  text-decoration: none;
  text-transform: uppercase;
}
.post-card-link:hover { color: #fff; }

/* ─── SINGLE POST ────────────────────────────────────────────── */
.entry-header { margin-bottom: 40px; padding-bottom: 30px; border-bottom: 1px solid var(--border); }
.entry-title  { margin-bottom: 16px; }
.entry-meta   { font-family: 'Share Tech Mono', monospace; font-size: .7rem; color: var(--text-muted); letter-spacing: .08em; }
.entry-meta a { color: var(--text-muted); }
.entry-meta a:hover { color: var(--accent); }
.entry-content { max-width: 780px; }
.entry-content > * + * { margin-top: 1.2em; }
.entry-content h2, .entry-content h3 { margin-top: 2em; margin-bottom: .6em; }
.entry-content img { border: 1px solid var(--border); }

/* ─── SIDEBAR ────────────────────────────────────────────────── */
.widget-area { padding-left: 40px; }

.widget {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 22px;
  margin-bottom: 24px;
}
.widget-title {
  font-family: 'Orbitron', sans-serif;
  font-size: .65rem;
  letter-spacing: .2em;
  color: var(--accent);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget ul li { padding: 6px 0; border-bottom: 1px solid var(--border); font-size: .85rem; }
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { color: var(--text-dim); }
.widget ul li a:hover { color: var(--accent); }

/* ─── CONTENT + SIDEBAR LAYOUT ───────────────────────────────── */
.content-area { flex: 1; }

.has-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}

@media (max-width: 900px) {
  .has-sidebar { grid-template-columns: 1fr; }
  .widget-area { padding-left: 0; margin-top: 40px; }
}

/* ─── COMMENTS ───────────────────────────────────────────────── */
.comments-area { margin-top: 60px; padding-top: 40px; border-top: 1px solid var(--border); }
.comments-title {
  font-family: 'Orbitron', sans-serif;
  font-size: .8rem;
  letter-spacing: .15em;
  color: var(--accent);
  margin-bottom: 30px;
}
.comment-list { list-style: none; padding: 0; }
.comment { padding: 20px 0; border-bottom: 1px solid var(--border); }
.comment-author { font-weight: 600; color: var(--text); margin-bottom: 4px; font-size: .85rem; }
.comment-meta { font-family: 'Share Tech Mono', monospace; font-size: .65rem; color: var(--text-muted); margin-bottom: 10px; }
.comment-content p { font-size: .85rem; color: var(--text-dim); }

.comment-form label {
  display: block;
  font-family: 'Orbitron', sans-serif;
  font-size: .55rem;
  letter-spacing: .15em;
  color: var(--text-muted);
  margin-bottom: 5px;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 12px;
  font-family: 'Share Tech Mono', monospace;
  font-size: .8rem;
  outline: none;
  transition: border-color .2s;
  margin-bottom: 16px;
}
.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--accent); }
.comment-form textarea { height: 120px; resize: vertical; }

/* ─── PAGINATION ─────────────────────────────────────────────── */
.pagination, .post-navigation {
  display: flex;
  gap: 8px;
  margin: 40px 0;
  justify-content: center;
  flex-wrap: wrap;
}
.page-numbers, .nav-links a, .nav-links span {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: 'Share Tech Mono', monospace;
  font-size: .75rem;
  text-decoration: none;
  transition: all .2s;
}
.page-numbers.current, .nav-links span {
  border-color: var(--accent);
  color: var(--accent);
}
.page-numbers:hover, .nav-links a:hover { border-color: var(--border2); color: var(--accent); }

/* ─── ABOUT PAGE ─────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.about-img {
  border: 1px solid var(--border);
  position: relative;
}
.about-img img { width: 100%; }
.about-img::before {
  content: '';
  position: absolute;
  inset: -6px;
  border: 1px solid var(--border);
  pointer-events: none;
}

/* ─── CONTACT PAGE ───────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 24px;
}
.contact-info-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 2px; }
.contact-info-label {
  font-family: 'Orbitron', sans-serif;
  font-size: .55rem;
  letter-spacing: .15em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.contact-info-value { font-size: .9rem; color: var(--text-dim); }

/* WP contact form styling (works with CF7 / WPForms) */
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form textarea,
.wpforms-field input,
.wpforms-field textarea {
  width: 100% !important;
  background: var(--bg3) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  padding: 9px 12px !important;
  font-family: 'Share Tech Mono', monospace !important;
  font-size: .8rem !important;
  outline: none !important;
  border-radius: 0 !important;
  transition: border-color .2s !important;
  margin-bottom: 14px;
}
.wpcf7-form input:focus,
.wpcf7-form textarea:focus { border-color: var(--accent) !important; }
.wpcf7-form textarea,
.wpforms-field textarea { height: 140px; resize: vertical; }
.wpcf7-submit,
.wpforms-submit {
  background: linear-gradient(135deg, var(--bg3), var(--bg2)) !important;
  border: 1px solid var(--accent) !important;
  color: var(--accent) !important;
  font-family: 'Orbitron', sans-serif !important;
  font-size: .65rem !important;
  font-weight: 600 !important;
  letter-spacing: .12em !important;
  padding: 12px 28px !important;
  cursor: pointer !important;
  transition: all .2s !important;
  border-radius: 0 !important;
}
.wpcf7-submit:hover,
.wpforms-submit:hover { color: #fff !important; box-shadow: var(--glow) !important; }

/* ─── TRACKER PAGE ───────────────────────────────────────────── */
.tracker-wrapper {
  min-height: calc(100vh - var(--header-h));
  padding: 0;
}

/* ─── FOOTER ─────────────────────────────────────────────────── */
#colophon {
  background: #080e1e;
  border-top: 1px solid var(--border2);
  padding: 50px 0 30px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .site-branding { margin-bottom: 16px; }
.footer-tagline { font-size: .85rem; color: var(--text-muted); line-height: 1.6; max-width: 260px; }

.footer-col-title {
  font-family: 'Orbitron', sans-serif;
  font-size: .6rem;
  letter-spacing: .2em;
  color: var(--accent);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.footer-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-menu li { margin-bottom: 10px; }
.footer-menu a {
  font-size: .85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color .2s;
}
.footer-menu a:hover { color: var(--accent); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-family: 'Share Tech Mono', monospace;
  font-size: .65rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 10px;
}

.footer-bottom a { color: var(--text-muted); }
.footer-bottom a:hover { color: var(--accent); }

/* ─── LIGHT THEME ────────────────────────────────────────────── */
body.theme-light {
  --bg:         #eef2f8;
  --bg2:        #e2e8f2;
  --bg3:        #d6dff0;
  --panel:      #ffffffdd;
  --border:     #b0c0dc;
  --border2:    #7a96cc;
  --accent:     #1a72b8;
  --accent2:    #6b48c4;
  --gold:       #b07800;
  --green:      #1a8a50;
  --red:        #cc2222;
  --orange:     #cc6600;
  --text:       #0e1a2e;
  --text-dim:   #3a5278;
  --text-muted: #6a82a8;
  --glow:       0 0 12px #1a72b840;
}
body.theme-light #masthead {
  background: linear-gradient(180deg, #dce6f4ee 0%, #eef2f8cc 100%);
}
body.theme-light #star-canvas { opacity: .15; }
body.theme-light #colophon { background: #dce6f4; }

/* ─── HIGH CONTRAST THEME ────────────────────────────────────── */
body.theme-contrast {
  --bg:         #020509;
  --bg2:        #050a12;
  --bg3:        #091020;
  --panel:      #0a1422ee;
  --border:     #2d4a8a;
  --border2:    #4060b8;
  --accent:     #7de8ff;
  --accent2:    #b89aff;
  --gold:       #ffe599;
  --green:      #a0ffcc;
  --red:        #ff8888;
  --orange:     #ffcc77;
  --text:       #eef6ff;
  --text-dim:   #a8c8ee;
  --text-muted: #7090c0;
}

/* ─── UTILITY CLASSES ────────────────────────────────────────── */
.text-accent  { color: var(--accent); }
.text-muted   { color: var(--text-muted); }
.text-center  { text-align: center; }
.mono         { font-family: 'Share Tech Mono', monospace; }
.mb-0         { margin-bottom: 0; }
.mt-section   { margin-top: 60px; }

/* ─── SCROLLBAR ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--border2); }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --header-h: 60px; }
  .container { padding: 0 16px; }
  .hero { padding: 60px 0 50px; }
  .section { padding: 50px 0; }
  .menu-toggle { display: block; }
  #site-navigation { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; background: #080e1eee; border-bottom: 1px solid var(--border2); backdrop-filter: blur(8px); padding: 10px 0; }
  #site-navigation.toggled { display: block; }
  .nav-menu { flex-direction: column; gap: 0; }
  .nav-menu a { border-bottom: none; border-left: 2px solid transparent; }
  .nav-menu .current-menu-item > a { border-left-color: var(--accent); }
  .nav-menu .sub-menu { position: static; box-shadow: none; border: none; padding-left: 20px; display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .features-grid { grid-template-columns: 1fr; }
}
