/* ===============================
   Design System
   =============================== */

/* Core variables */
:root {
  --font-main: 'Montserrat', sans-serif;

  --spacing-base: 8px;
  --spacing-section: 64px;
  --spacing-block: 24px;

  --transition-speed: 150ms;
}

/* Light Theme (default) */
body.light {
  --bg-color: #FFFFFF;
  --text-light: #111111;
  --text-muted: #444444;

    --blue-accent: #03308a;
  --blue-accent-hover: #5A93FF;

  background-color: var(--bg-color);
  color: var(--text-light);
}

/* Dark Theme */
body.dark {
  --bg-color: #000000;
  --text-light: #E5E5E5;
  --text-muted: #B3B3B3;
  --blue-accent: #3A7DFF;
  --blue-accent-hover: #5A93FF;

  background-color: var(--bg-color);
  color: var(--text-light);
}

/* Smooth theme transition */
body, header, footer, nav, section, p, h1, h2, h3, h4, a, .cta-button {
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ===============================
   Global Reset & Base
   =============================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  line-height: 1.6;
  font-size: 16px;
}

/* ===============================
   Typography
   =============================== */
h1 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: var(--spacing-block);
  text-align: center;
}

h2 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: var(--spacing-block);
  text-align: center;
}

h3 {
  font-size: 22px;
  font-weight: 500;
  margin-bottom: var(--spacing-block);
}

h4 {
  font-size: 18px;
  font-weight: 500;
  margin: var(--spacing-block) 0 var(--spacing-base) 0;
  color: var(--text-muted);
}

p {
  margin-bottom: var(--spacing-block);
  text-align: left;
}

ul {
  margin-bottom: var(--spacing-block);
  text-align: left;
}

strong { font-weight: 600; }
em { font-style: italic; }

/* ===============================
   Layout & Sections
   =============================== */
section {
  max-width: 1080px;
  margin: auto;
  padding: var(--spacing-section) var(--spacing-base);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  margin-bottom: var(--spacing-block);
  margin: auto;
}

hr {
  border: none;
  border-top: 1px solid var(--text-muted);
  margin: 48px 0;
}

/* ===============================
   Header & Navigation
   =============================== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: var(--spacing-base) 0;
  z-index: 1000;
}

nav {
  max-width: 1080px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--spacing-base);
  position: relative; /* required for absolute centering */
}

nav .brand {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-light);
}

/* Center nav items to viewport */
nav ul {
  list-style: none;
  display: flex;
  gap: var(--spacing-base);
  margin: 0;
  padding: 0;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

/* Nav links as text */
nav ul li a {
  background: none;
  color: var(--text-light);
  font-weight: 600;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  transition: color var(--transition-speed), transform var(--transition-speed);
}

nav ul li a:hover {
  color: var(--blue-accent);
  transform: scale(1.05);
}

/* Adaptive header/footer background */
body.light header,
body.light footer {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(6px);
  color: var(--text-light);
}

body.dark header,
body.dark footer {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  color: var(--text-light);
}

/* ===============================
   Theme Toggle
   =============================== */
#theme-toggle {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  margin-left: var(--spacing-block);
  color: var(--text-light);
  transition: transform var(--transition-speed), color var(--transition-speed);
}

#theme-toggle:hover {
  transform: scale(1.2);
  color: var(--blue-accent);
}

/* ===============================
   Intro Section
   =============================== */
#intro {
  padding-top: 40px;
  text-align: center;
  border: 1px solid var(--text-muted);
  border-radius: 7px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  padding-bottom: 40px;
  padding-left: 40px;
  padding-right: 40px;
  margin-top: 120px;
}

#intro img {
  border-radius: 50%;
  max-width: 160px;
  margin: auto;
  margin-bottom: var(--spacing-block);
}

#intro p {
  max-width: 70ch; /* readability */
  margin: 0 auto var(--spacing-block) auto;
}

#intro p:last-of-type {
  margin-bottom: 32px; /* extra spacing before CTAs */
}

.intro-links {
  margin-top: var(--spacing-block);
  display: flex;
  gap: var(--spacing-block);
  justify-content: center;
  flex-wrap: wrap;
}

/* ===============================
   CTA Buttons
   =============================== */
a.cta-button {
  display: inline-block;
  background: var(--blue-accent);
  color: #ffffff; /* always white */
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: transform var(--transition-speed) ease-in-out,
              background var(--transition-speed) ease-in-out;
}

a.cta-button:hover {
  background: var(--blue-accent-hover);
  transform: scale(1.05);
}

a.cta-button:active {
  transform: scale(0.98);
}

/* ===============================
   Projects Section
   =============================== */
#projects article {
  margin-bottom: var(--spacing-section);
}

#projects h3 {
  margin-top: var(--spacing-block);
}

/* ===============================
   Contact Section
   =============================== */
#contact {
  text-align: center;
}

#contact p {
  margin-bottom: var(--spacing-block);
}

.contact-buttons {
  display: flex;
  justify-content: center;
  gap: var(--spacing-block);
  flex-wrap: wrap;
}

.contact-buttons .cta-button {
  min-width: 140px;
  text-align: center;
}

/* ===============================
   Footer
   =============================== */
footer {
  text-align: center;
  padding: var(--spacing-block);
  font-size: 14px;
  margin-top: var(--spacing-section);
}

footer p {
  text-align: center;
}

/* ===============================
   Responsive Adjustments
   =============================== */
@media (max-width: 768px) {
  nav ul {
    gap: 12px;
  }

  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
  h3 { font-size: 18px; }
  body { font-size: 14px; }
}


.jade-link {
  color: #933de3;
  text-decoration: underline;
}


