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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Merriweather', serif;
    margin: 0;
    background: #f9fafb;
    color: #111;
    line-height: 1.6;
    padding-top: 70px;
}

/* headings system */
h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
    letter-spacing: -0.5px;
}

section {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    scroll-margin-top: 80px;
}

h2 {
    font-size: 24px;
    border-bottom: 2px solid #ddd;
    padding-bottom: 5px;
}

/* =========================
   NAVBAR (SAAS STYLE)
========================= */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);

    border-bottom: 1px solid rgba(0,0,0,0.06);
    z-index: 1000;
}

.nav-left {
    font-weight: 700;
}

.nav-center {
    display: flex;
    gap: 18px;
}

.nav-center a {
    text-decoration: none;
    color: #111;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 8px;
    transition: 0.2s;
}

.nav-center a:hover {
    color: #4f46e5;
}

.nav-center a.active {
    background: #4f46e5;
    color: white;
}

.nav-right button {
    border: none;
    background: white;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

/* =========================
   HERO SECTION
========================= */

.hero {
    text-align: center;
    padding: 120px 20px 80px;
    background: radial-gradient(circle at top, #eef2ff, #f9fafb);
}

.hero h1 {
    font-size: 52px;
    margin-bottom: 10px;
}

.hero p {
    font-size: 18px;
    color: #555;
    max-width: 650px;
    margin: 0 auto 25px;
}

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

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    font-family: 'Montserrat', sans-serif;
    padding: 12px 18px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s;
}

.btn.primary {
    background: #4f46e5;
    color: white;
}

.btn.primary:hover {
    background: #4338ca;
}

.btn.secondary {
    background: white;
    border: 1px solid #ddd;
    color: #111;
}

.btn.secondary:hover {
    background: #f3f4f6;
}

/* =========================
   PROJECTS
========================= */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

/* =========================
   CARDS
========================= */

.card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0,0,0,0.05);
    padding: 22px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);

    transition: 0.25s ease;

    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.6s ease forwards;

    font-family: 'Merriweather', serif;
}

.card:hover {
    transform: translateY(-6px);
}

.card.featured {
    border: 2px solid #4f46e5;
}

.card a {
    margin-right: 10px;
    text-decoration: none;
    color: #4f46e5;
    font-weight: 600;
}

/* =========================
   LISTS
========================= */

ul {
    list-style: none;
    padding: 0;
}

li {
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(0,0,0,0.05);
    padding: 10px;
    margin: 5px 0;
    border-radius: 8px;
}

/* =========================
   METRICS (FIXED STRUCTURE)
========================= */

.metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    max-width: 1000px;
    margin: 60px auto;
    padding: 0 20px;
}

.metric {
    background: white;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.04);
    transition: 0.25s ease;
    opacity: 0;
    transform: translateY(10px);
}

.metric.visible {
    opacity: 1;
    transform: translateY(0);
}

.metric:hover {
    transform: translateY(-4px);
}

.metric h3 {
    font-size: 28px;
    margin: 0;
    color: #4f46e5;
}

.metric p {
    margin: 6px 0 0;
    font-size: 13px;
    color: #6b7280;
}

/* =========================
   DARK MODE TOGGLE
========================= */

#darkToggle {
    position: fixed;
    top: 20px;
    right: 20px;
    border: none;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    background: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

/* =========================
   ANIMATION
========================= */

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================
   DARK MODE (CONSISTENT SAAS STYLE)
========================= */

.dark {
    background: #0b1220;
    color: #e5e7eb;
}

.dark .hero {
    background: radial-gradient(circle at top, #0f172a, #111827);
}

.dark .navbar {
    background: rgba(15, 23, 42, 0.7);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.dark .nav-center a {
    color: #e5e7eb;
}

.dark .nav-center a:hover {
    color: #818cf8;
}

.dark .card,
.dark li,
.dark .metric {
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(255,255,255,0.05);
    color: #e5e7eb;
}

.dark .metric p {
    color: #cbd5e1;
}

.dark .btn.secondary {
    background: #1e293b;
    color: white;
    border: 1px solid #334155;
}

.dark #darkToggle {
    background: #1e293b;
    color: white;
}