/* ======================================================
   COMMON.CSS – SITE-WIDE PROFESSIONAL STYLES
====================================================== */

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

/* ---------- THEME VARIABLES (LIGHT DEFAULT) ---------- */
:root {
  --bg-page: #f4f6fb;
  --bg-surface: #ffffff;
  --bg-header: #ffffff;
  --bg-nav: #f8fafc;
  --bg-footer: #0f172a;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-invert: #e5e7eb;

  --primary: #2563eb;
  --border: #e2e8f0;
}

/* ---------- DARK MODE (SYSTEM) ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-page: #020617;
    --bg-surface: #020617;
    --bg-header: #020617;
    --bg-nav: #020617;
    --bg-footer: #020617;

    --text-main: #e5e7eb;
    --text-muted: #94a3b8;
    --text-invert: #e5e7eb;

    --primary: #60a5fa;
    --border: #1e293b;
  }
}

/* ---------- BASE ---------- */
html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  background-color: var(--bg-page);
  color: var(--text-main);
}

/* ---------- CONTAINER ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- TYPOGRAPHY ---------- */
h1, h2, h3 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-main);
  margin-bottom: 12px;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.2rem; }

p {
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* ---------- LINKS ---------- */
a {
  color: var(--primary);              
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:visited {
  color: #7c3aed;                     /* Purple for visited links */
}

/* ======================================================
   HEADER
====================================================== */
.site-header {
  background-color: var(--bg-header);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
}

/* Logo (small but noticeable) */
.site-logo img {
  height: 44px;              /* noticeable, not dominating */
  width: auto;
  object-fit: contain;
}

/* Header title block */
.site-title h1 {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.site-title p {
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* ======================================================
   NAVIGATION
====================================================== */
.site-nav {
  background-color: var(--bg-nav);
  border-bottom: 1px solid var(--border);
}

.site-nav .container {
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 12px 24px;
}

/* Navigation links – professional interaction */
.site-nav a {
  position: relative;
  font-weight: 600;
  color: var(--primary);
  padding: 4px 2px;
  text-decoration: none;
}

/* Hover state */
.site-nav a:hover {
  color: var(--primary);
}

/* Underline animation */
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: width 0.2s ease;
}

.site-nav a:hover::after {
  width: 100%;
}

/* Visited links */
.site-nav a:visited {
  color: #7c3aed;
}

/* Keyboard focus (accessibility) */
.site-nav a:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

/* Active navigation link */
.site-nav a.active {
  color: var(--primary);
  font-weight: 700;
}

/* Persistent underline for active page */
.site-nav a.active::after {
  width: 100%;
}

/* ======================================================
   MAIN
====================================================== */
.site-main {
  padding: 48px 0;
}

.site-main section {
  margin-bottom: 56px;
}

/* ======================================================
   FOOTER
====================================================== */

.site-footer {
  background-color: #020617; /* true dark */
  margin-top: 100px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.site-footer .container {
  padding: 48px 24px;
  text-align: center;
}

/* Footer heading */
.site-footer h3 {
  color: #f8fafc;
  font-size: 1.15rem;
  margin-bottom: 14px;
  font-weight: 700;
}

/* Footer text */
.site-footer p {
  color: #cbd5f5; /* higher contrast */
  font-size: 0.95rem;
  margin-bottom: 10px;
}

/* Footer links */
.site-footer a {
  color: #60a5fa;              /* blue always */
  font-weight: 500;
  text-decoration: none;
}

.site-footer a:visited {
  color: #a78bfa;              /* purple visited */
}

.site-footer a:hover {
  text-decoration: underline;
  color: #93c5fd;
}

/* Small spacing between link groups */
.site-footer nav p {
  margin-bottom: 12px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  h1 { font-size: 1.9rem; }

  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-logo img {
    height: 40px;
  }

  .site-nav .container {
    flex-wrap: wrap;
    gap: 12px;
  }
}
