/* ============================================
   main.css — Base styles, CSS variables, fonts
   ============================================ */

/* ---------- Light Mode (Default) ---------- */
:root {
  --bg-primary: #f8f9ff;
  --bg-surface: #ffffff;
  --bg-card: #f0f2ff;
  --text-primary: #111827;
  --text-muted: #6b7280;
  --border: #e2e5f1;
  --accent: #0f1b61;
  --accent-hover: #1a2d9e;
  --accent-light: rgba(15, 27, 97, 0.07);
  --accent-mid: rgba(15, 27, 97, 0.15);
  --gold: #f9dc5c;
  --accent-rgb: 15, 27, 97;
  --bg-primary-rgb: 248, 249, 255;
  --brand-gradient: linear-gradient(135deg, #0f1b61 0%, #1a2d9e 100%);
}

/* ---------- Dark Mode ---------- */
[data-theme="dark"] {
  --bg-primary: #0d0e1a;
  --bg-surface: #13152a;
  --bg-card: #1a1d35;
  --text-primary: #e8eaf6;
  --text-muted: #8b92b8;
  --border: #252845;
  --accent: #7b94ff;
  --accent-hover: #95aeff;
  --accent-light: rgba(123, 148, 255, 0.1);
  --accent-mid: rgba(123, 148, 255, 0.2);
  --gold: #f9dc5c;
  --accent-rgb: 123, 148, 255;
  --bg-primary-rgb: 13, 14, 26;
  --brand-gradient: linear-gradient(135deg, #1a2460 0%, #252f7a 100%);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.loading {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4 {
  font-family: "Playfair Display", serif;
  line-height: 1.15;
  color: var(--text-primary);
}

/* ---------- Section Eyebrow Labels ---------- */
.section-eyebrow {
  display: block;
  font-family: "Inter", sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  text-align: center;
  margin-bottom: 0.75rem;
  opacity: 0.85;
}

/* Italic accent word inside section titles (matches reference) */
.section-title em {
  font-style: italic;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--accent);
}

.section-title {
  max-width: 700px;
  font-size: clamp(1.6rem, 3.5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.9px;
  text-align: center;
  margin: 0 auto clamp(0.5rem, 1vw, 1rem);
}

.section-subtitle {
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  color: var(--text-muted);
  text-align: center;
  max-width: 600px;
  margin: 0 auto clamp(2rem, 5vw, 4rem);
}

/* ---------- Highlight Italic (About section) ---------- */
.highlight-italic {
  font-family: "Playfair Display", serif;
  font-style: italic;
  color: var(--accent);
  font-weight: 600;
}

/* ---------- Inter for Numbers ---------- */
.num-inter {
  font-family: "Inter", sans-serif;
  font-weight: 700;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-hover);
}

/* ---------- Selection ---------- */
::selection {
  background: var(--accent);
  color: #ffffff;
}

/* ---------- Focus Visible ---------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- SVG Logo ---------- */
.svg-logo {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.logo-svg {
  height: 55px;
  width: auto;
  color: #ffffff;
  transition:
    color 0.3s ease,
    height 0.4s ease;
  display: block;
}

[data-theme="dark"] .logo-svg {
  color: #7b94ff;
}

.navbar.scrolled .logo-svg {
  height: 40px;
}

.footer .logo-svg {
  height: 55px;
  color: rgba(255, 255, 255, 0.85);
}

@media (max-width: 480px) {
  .logo-svg {
    height: 40px;
    width: auto;
  }

  .navbar.scrolled .logo-svg {
    height: 35px;
  }

  .section-title {
    max-width: 370px;
  }

  .skills-subtitle {
    max-width: 370px;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .logo-svg {
    height: 40px;
    width: auto;
  }

  .navbar.scrolled .logo-svg {
    height: 35px;
  }
}
