/* ===== FONT IMPORT ===== */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ===== ROOT VARIABLES ===== */
:root {
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-text: #1a1a1a;
  --color-muted: #6b7280;
  --color-accent: #0078ff;
  --color-border: #e5e7eb;

  --font-body: "JetBrains Mono", monospace;
  --font-heading: "JetBrains Mono", monospace;

  --radius: 10px;
  --shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  --transition: 0.3s ease;

  --max-width: 1100px;
  --space-section: 6rem;
}

body.manual-dark {
  --color-bg: #0f172a;
  --color-surface: #1e293b;
  --color-text: #f8fafc;
  --color-muted: #94a3b8;
  --color-border: #334155;
  --color-accent: #3b82f6;
}


/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  font-size: 1rem;
}

.container {
  width: min(90%, var(--max-width));
  margin: auto;
  padding-block: var(--space-section);
}

/* ===== NAVIGATION ===== */
.header {
  background: var(--color-surface);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
  transition: color var(--transition);
}

.nav-links a:hover,
.nav-links a:focus {
  color: var(--color-accent);
}

/* Mobile Nav */
.nav-toggle {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    flex-direction: column;
    position: absolute;
    top: 70px;
    right: 1rem;
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem;
    display: none;
  }

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

/* ===== HERO ===== */
.hero {
  text-align: center;
  padding-block: 8rem;
}

.hero h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 1rem;
}

.hero p {
  color: var(--color-muted);
  max-width: 600px;
  margin: auto;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.btn-wrap {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.btn {
  background: var(--color-accent);
  color: #fff;
  margin: auto 1rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 500;
  display: inline-block;
  transition: background var(--transition), transform var(--transition);
}

.btn:hover {
  background: #005ecc;
  transform: translateY(-2px);
}

/* ===== SECTIONS ===== */
section h2 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  text-align: center;
  margin-bottom: 2rem;
  letter-spacing: 0.5px;
}

section p {
  max-width: 600px;
  margin: auto;
  text-align: center;
  color: var(--color-muted);
}

/* ===== GRID / CARD LAYOUT ===== */
.grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

.card img {
  width: 100%;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

/* ===== CONTACT ===== */
.contact p {
  margin-bottom: 1.5rem;
}

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  padding: 2rem 0;
  font-size: 0.9rem;
  color: var(--color-muted);
}

/* ===== ANIMATIONS ===== */
section {
  /* opacity: 0; */
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== ACCESSIBILITY ===== */
a:focus, button:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* ===== DARK MODE ===== */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0f172a;
    --color-surface: #1e293b;
    --color-text: #f8fafc;
    --color-muted: #94a3b8;
    --color-border: #334155;
    --color-accent: #3b82f6;
  }

  body {
    background: var(--color-bg);
    color: var(--color-text);
  }

  .header {
    background: var(--color-surface);
    box-shadow: none;
    border-bottom: 1px solid var(--color-border);
  }

  .nav-links a {
    color: var(--color-text);
  }

  .nav-links a:hover,
  .nav-links a:focus {
    color: var(--color-accent);
  }

  .card {
    background: var(--color-surface);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  }

  .btn {
    background: var(--color-accent);
  }

  .btn:hover {
    background: #2563eb;
  }

  .footer {
    color: var(--color-muted);
  }
}
