/* =========================================================
   RESET + GLOBAL VARIABLES (DARK THEME DEFAULT)
   ========================================================= */
:root {
  --primary: #2563eb;
  --secondary: #f97316;

  --bg: #0f172a;
  --bg-elevated: #1e293b;
  --bg-muted: #0f172a;

  --surface: #1e293b;

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

  --border-subtle: #334155;

  --shadow-soft: 0 12px 35px rgba(0,0,0,0.45);

  --radius-lg: 18px;
  --radius-xl: 24px;
}

/* ==========================
   LIGHT THEME VARIABLES
   ========================== */
:root[data-theme="light"] {
  --bg: #ffffff;
  --bg-elevated: #f8f9fa;
  --bg-muted: #f0f2f5;

  --surface: #ffffff;

  --text: #0f172a;
  --text-muted: #0f172a;

  --border-subtle: #d0d4da;

  --shadow-soft: 0 8px 25px rgba(0,0,0,0.06);
}

/* ==========================
   BASE RESET
   ========================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
  min-height: 100vh;
}

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

/* Anchor reset */
a {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
a:hover,
a:focus {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}

.text-link {
  color: var(--primary);
  text-decoration: none;
}
.text-link:hover {
  text-decoration: underline;
}

/* Containers */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 4rem 0;
}

.section-muted {
  background: var(--bg-muted);
}

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 9999;
  backdrop-filter: blur(14px);
  background: #e5e7eb;
  overflow: visible;
  border-bottom: 1px solid var(--border-subtle);
}

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

.logo-main {
  font-weight: 700;
  font-size: .95rem;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.logo-sub {
  font-size: .7rem;
  color: var(--text-muted);
}

/* NAVIGATION */
.main-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.main-nav a {
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-muted);
}
.main-nav a:hover {
  color: var(--text);
}

/* HEADER CONTROLS */
.nav-controls {
  display: flex;
  align-items: center;
  gap: .5rem;
  z-index: 12000;
}

/* THEME TOGGLE */
.theme-toggle {
  padding: .35rem .6rem;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text);
  font-size: 1rem;
}

/* MOBILE MENU BUTTON */
.nav-toggle {
  display: none;
  border: 1px solid var(--border-subtle);
  padding: .4rem .7rem;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 1.25rem;
  cursor: pointer;
}

/* =========================================================
   HERO SECTION
   ========================================================= */
.hero-inner {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  font-size: .65rem;
  letter-spacing: .15em;
  color: var(--text-muted);
}

.hero h1 {
  font-size: clamp(2rem, 3vw, 2.7rem);
  margin: .5rem 0 1rem;
}

.hero-subtitle {
  color: var(--text-muted);
  max-width: 620px;
}

.hero-actions {
  margin: 1.5rem 0;
  display: flex;
  gap: 1rem;
}

.hero-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
}

/* =========================================================
   BUTTONS
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .65rem 1.4rem;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: .12s ease;
}

.btn:active {
  transform: scale(.97);
}

.primary-btn {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 10px 25px rgba(37,99,235,.3);
}

.ghost-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text);
}

/* =========================================================
   CARDS (Services, Blog, Portfolio)
   ========================================================= */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 1.2rem;
  box-shadow: var(--shadow-soft);
}

.badge {
  font-size: .7rem;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: .15rem .5rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  margin-top: 1.5rem;
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--bg-elevated);
  padding: 1.5rem 0 2rem;
  text-align: center;
  border-top: 1px solid var(--border-subtle);
}

.footer-note {
  color: var(--text-muted);
  font-size: .8rem;
  max-width: 500px;
  margin: .5rem auto 0;
}

/* =========================================================
   MOBILE RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .nav-toggle { display: inline-flex; }

  /* Mobile nav dropdown */
  .main-nav {
    position: absolute;
    top: 3.2rem;
    right: 1rem;
    flex-direction: column;
    align-items: flex-start;
    background: var(--surface);
    padding: .6rem .9rem;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft);
    display: none;
    min-width: 180px; /* AUTO WIDTH */
    width: auto;
  }

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

  .main-nav a {
    padding: .55rem .75rem;
    width: 100%;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }
}