/* ====================== BUTTONS ====================== */
.outline-button {
  border: 3px solid #cbd5e1;
  background-color: transparent;
  color: #0f172a;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  font-weight: 500;
}
.outline-button:hover {
  background-color: #f1f5f9;
  border-color: #10b981;
  color: #0f172a;
  transform: scale(1.03);
}
html.dark .outline-button {
  border-color: #94a3b8;
  color: #f1f5f9;
}
html.dark .outline-button:hover {
  background-color: #334155;
  border-color: #10b981;
  color: #f1f5f9;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

/* Secondary button (used in hero) */
.secondary-btn {
  border: 2px solid var(--border-color);
  color: var(--text-color);
  transition: all 0.3s ease;
  text-decoration: none;
  font-weight: 500;
}
.secondary-btn:hover {
  border-color: #10b981;
  color: #10b981;
  background: rgba(16, 185, 129, 0.05);
}

/* ====================== ANCHOR LINKS & SCROLL ====================== */
html { scroll-behavior: smooth; }

[id], h1[id], h2[id], h3[id], h4[id] {
    scroll-margin-top: 120px;
}
@media (max-width: 1023px) {
    [id], h1[id], h2[id], h3[id], h4[id] {
        scroll-margin-top: 80px;
    }
}

/* ====================== INFO BOXES & CARDS ====================== */
.info-box {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.info-box:hover {
    border-color: #10b981;
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 
                0 8px 10px -6px rgb(0 0 0 / 0.1);
}
.dark .info-box:hover {
    border-color: #34d399;
}

/* ====================== NAVIGATION ====================== */
.nav-link, .brand-link {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}
.nav-link:hover, .brand-link:hover {
    color: #10b981;
}
.nav-link.current, .brand-link.current {
    color: #10b981 !important;
}

/* Underline effect */
.nav-link:hover::after, .brand-text::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 2px;
    background-color: #10b981;
    transform: scaleX(0);
    transition: transform 0.25s ease;
}
.nav-link:hover::after, .brand-link:hover .brand-text::after {
    transform: scaleX(1);
}
.brand-link.current .brand-text::after { display: none; }

/* ====================== MOBILE MENU ====================== */
.mobile-menu {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  right: 1rem;
  background: var(--card-bg);
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
  min-width: 240px;
  padding: 1rem 0;
  z-index: 1000;
  border: 1px solid var(--border-color);
  overflow: hidden;
}
.mobile-menu.open { display: block !important; }

.mobile-menu a {
  display: block;
  padding: 0.85rem 1.5rem;
  color: var(--text-color);
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}
.mobile-menu a:hover {
  color: #10b981;
  background: rgba(16,185,129,0.08);
}
html.dark .mobile-menu a:hover {
  background: rgba(16,185,129,0.18);
}

/* ====================== GLOBAL THEME ====================== */
:root {
  --bg-color: #f8fafc;
  --text-color: #0f172a;
  --soft-text: #64748b;
  --footer-text: #64748b;
  --border-color: #e2e8f0;
  --card-bg: #ffffff;
  --header-bg: #ffffff;
}
.dark {
  --bg-color: #0a1428;        /* Calm deep navy */
  --text-color: #f1f5f9;
  --soft-text: #94a3b8;
  --footer-text: #94a3b8;
  --border-color: #1e293b;
  --card-bg: #13223f;
  --header-bg: #0a1428;
}

body {
  background: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.4s ease, color 0.4s ease;
}

.soft-text { color: var(--soft-text); }
.footer-text { color: var(--footer-text); }

#site-header {
  background: var(--header-bg);
  border-color: var(--border-color);
}

/* ====================== HERO BACKGROUND SUPPORT ====================== */
.hero-bg {
  background-size: cover;
  background-position: center;
  position: relative;
}
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.35), rgba(0,0,0,0.55));
  z-index: 1;
}
.dark .hero-bg::before {
  background: linear-gradient(to bottom, rgba(0,0,0,0.5), rgba(0,0,0,0.7));
}

/* ====================== CONTENT LINKS ====================== */
article a, main a:not(.outline-button):not(.nav-link):not(.brand-link),
p a:not(.outline-button), li a:not(.outline-button) {
  color: #10b981;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: all 0.25s ease;
}
article a:hover, main a:hover, p a:hover, li a:hover {
  color: #34d399;
  text-decoration: none;
}

/* Focus */
a:focus-visible {
  outline: 3px solid #10b981;
  outline-offset: 4px;
  border-radius: 4px;
}
