/**
 * Main Stylesheet
 * Raviraj Portfolio Theme
 */

/* ── CSS Variables ── */
:root {
  --bg: #0a0a0b;
  --surface: #141416;
  --surface-2: #1c1c1f;
  --border: #2a2a2e;
  --text: #e4e4e7;
  --text-muted: #8b8b94;
  --accent: #d4a053;
  --accent-dim: rgba(212, 160, 83, 0.12);
  --green: #4ade80;
  --blue: #60a5fa;
  --purple: #a78bfa;
  --pink: #f472b6;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ── Skip Link ── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--bg);
  padding: 0.5rem 1rem;
  text-decoration: none;
  z-index: 100000;
}

.skip-link:focus {
  left: 0;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

p + p {
  margin-top: 1rem;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover,
a:focus {
  color: #f0c987;
}

/* ── Site Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 10, 11, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-branding .site-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.site-title a {
  color: var(--text);
  text-decoration: none;
}

.site-description {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ── Navigation ── */
.main-navigation {
  display: flex;
  align-items: center;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle-icon {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.menu-toggle-icon span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: all 0.3s ease;
}

.primary-menu-container ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.primary-menu-container li {
  margin: 0;
}

.primary-menu-container a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  padding: 0.5rem 0;
}

.primary-menu-container a:hover,
.primary-menu-container a:focus,
.primary-menu-container .current-menu-item > a {
  color: var(--accent);
}

/* ── Mobile Navigation ── */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .primary-menu-container {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .menu-toggle[aria-expanded="true"] + .primary-menu-container {
    max-height: 100vh;
  }

  .primary-menu-container ul {
    flex-direction: column;
    gap: 0;
    padding: 1rem 2rem;
  }

  .primary-menu-container li {
    border-bottom: 1px solid var(--border);
  }

  .primary-menu-container li:last-child {
    border-bottom: none;
  }

  .primary-menu-container a {
    display: block;
    padding: 1rem 0;
  }
}

/* ── Site Footer ── */
.site-footer {
  text-align: center;
  padding: 4rem 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 4rem;
}

.site-info-inner {
  max-width: 900px;
  margin: 0 auto;
}

.footer-content {
  margin-bottom: 1rem;
}

.copyright {
  margin: 0;
}

.footer-navigation ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin: 1rem 0 0;
  padding: 0;
}

.footer-navigation li {
  margin: 0;
}

.footer-navigation a {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-navigation a:hover {
  color: var(--text);
}

/* ── Back to Top Button ── */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--surface-2);
  border-color: var(--accent);
}

.back-to-top svg {
  color: var(--text);
}

/* ── Main Content ── */
#primary {
  min-height: 50vh;
}

/* ── Utilities ── */
.screen-reader-text {
  position: absolute;
  left: -9999px;
  top: -9999px;
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .site-header-inner {
    padding: 1rem;
  }

  .site-footer {
    padding: 3rem 1rem;
  }

  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
  }
}
