/* RESET & BASE
---------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #0f172a;
    background: #020617; /* default dark */
}

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

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

/* HEADER
---------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.9rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Base logo container – size only */
.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: 42px;
    overflow: visible;
}

.logo-icon img {
    height: 100%;
    width: auto;
    object-fit: contain;
}

/* optional text (currently empty) */
.logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, #e5e7eb 0%, #a5b4fc 50%, #c4b5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#mainNav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

#mainNav a {
    font-size: 0.95rem;
    font-weight: 500;
    color: #e2e8f0;
    opacity: 0.9;
    transition: color 0.2s ease, opacity 0.2s ease, transform 0.1s ease;
}

#mainNav a:hover {
    color: #a5b4fc;
    opacity: 1;
    transform: translateY(-1px);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: 1px solid rgba(148, 163, 184, 0.6);
    border-radius: 999px;
    padding: 0.4rem 0.7rem;
    font-size: 1.1rem;
    color: #e2e8f0;
    cursor: pointer;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-right: 0.4rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    background: #020617;
    color: #e5e7eb;
    font-size: 1.05rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.theme-toggle:hover {
    background: #111827;
    border-color: #c4b5fd;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .theme-toggle {
        /* show nicely next to burger on mobile */
        order: -1;
    }
}

/* HERO
---------------------------------------- */
.hero {
    padding: 4.5rem 1.5rem 3.5rem;
    background:
        radial-gradient(circle at top left, #1d4ed8 0, transparent 55%),
        radial-gradient(circle at bottom right, #7c3aed 0, transparent 55%),
        #020617;
    color: #e5e7eb;
}

.hero-content {
    max-width: 960px;
    margin: 0 auto;
    text-align: center;
}

.hero h1 {
    font-size: clamp(2.4rem, 4vw, 3.1rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.05rem;
    max-width: 640px;
    margin: 0.5rem auto 1.8rem;
    color: #cbd5f5;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 1.8rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #f9fafb;
    box-shadow: 0 15px 40px rgba(79, 70, 229, 0.55);
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.2s ease;
}

.cta-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 50px rgba(79, 70, 229, 0.7);
    opacity: 0.95;
}

.stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    justify-content: center;
    margin-top: 2.5rem;
}

.stat-item {
    background: rgba(15, 23, 42, 0.7);
    border-radius: 0.9rem;
    padding: 0.9rem 1.1rem;
    min-width: 130px;
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.stat-number {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: #e5e7eb;
}

.stat-label {
    font-size: 0.8rem;
    color: #cbd5f5;
}

/* MAIN CONTENT / CATEGORIES
---------------------------------------- */
.main-content {
    background: #020617;
    padding: 3rem 1.5rem 3.5rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-title {
    font-size: 1.9rem;
    font-weight: 700;
    color: #e5e7eb;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: #9ca3af;
    font-size: 0.98rem;
}

.category {
    margin-bottom: 2.8rem;
}

.category-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: #e5e7eb;
    margin-bottom: 1.2rem;
}

.category-icon {
    font-size: 1.3rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.1rem;
}

.tool-card {
    background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.25), rgba(15, 23, 42, 0.96));
    border-radius: 0.9rem;
    padding: 1.1rem 1.1rem 1.2rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.tool-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: #f9fafb;
}

.tool-card p {
    font-size: 0.9rem;
    color: #cbd5f5;
    margin-bottom: 0.7rem;
}

.tool-tag {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #e5e7eb;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.5);
}

.tool-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.8);
    border-color: rgba(129, 140, 248, 0.9);
    background: radial-gradient(circle at top left, rgba(129, 140, 248, 0.45), rgba(15, 23, 42, 0.98));
}

/* BLOG SECTION
---------------------------------------- */
.blog-section {
    border-top: 1px solid rgba(51, 65, 85, 0.85);
    margin-top: 3rem;
    padding-top: 2.5rem;
}

.blog-content {
    max-width: 900px;
    margin: 0 auto;
    color: #e5e7eb;
    font-size: 0.98rem;
    line-height: 1.85;
}

.blog-content h2,
.blog-content h3 {
    margin-top: 1.8rem;
    margin-bottom: 0.7rem;
    color: #f9fafb;
}

.blog-content p {
    margin-bottom: 1rem;
    color: #d1d5db;
}

.blog-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    color: #d1d5db;
}

.blog-content li {
    margin-bottom: 0.4rem;
}

/* FOOTER
---------------------------------------- */
footer {
    background: #020617;
    color: #e5e7eb;
    padding: 2.5rem 1.5rem 1.5rem;
    border-top: 1px solid #1e293b;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-column h4 {
    font-size: 1.02rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
}

.footer-column p {
    font-size: 0.9rem;
    color: #9ca3af;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 0.45rem;
}

.footer-column a {
    font-size: 0.9rem;
    color: #9ca3af;
    transition: color 0.15s ease;
}

.footer-column a:hover {
    color: #c4b5fd;
}

.footer-bottom {
    border-top: 1px solid #1f2937;
    padding-top: 1rem;
    text-align: center;
    font-size: 0.85rem;
    color: #9ca3af;
}

.social-links {
    display: flex;
    gap: 0.65rem;
    margin-top: 0.9rem;
}

.social-links a {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

/* RESPONSIVE
---------------------------------------- */
@media (max-width: 768px) {
    #mainNav {
        display: none;
        position: absolute;
        top: 64px;
        right: 1.5rem;
        flex-direction: column;
        background: rgba(15, 23, 42, 0.98); /* dark card */
        padding: 0.9rem 1rem;
        border-radius: 0.9rem;
        border: 1px solid rgba(148, 163, 184, 0.5);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
        min-width: 190px;
        z-index: 1200;
    }

    #mainNav.nav-open {
        display: flex;
    }

    #mainNav a {
        color: #e5e7eb;
        padding: 0.4rem 0.2rem;
    }

    #mainNav a + a {
        margin-top: 0.1rem;
    }

    .mobile-menu-btn {
        display: inline-flex;
    }

    .hero {
        padding-top: 3.5rem;
        padding-bottom: 2.8rem;
    }

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

/* Desktop nav always visible */
@media (min-width: 769px) {
    #mainNav {
        display: flex;
    }
}

/* THEME OVERRIDES
---------------------------------------- */

/* Light theme base */
body.theme-light {
    background: #f8fafc;
    color: #0f172a;
}

/* Header */
body.theme-light .site-header {
    background: rgba(248, 250, 252, 0.96);
    border-bottom-color: rgba(148, 163, 184, 0.35);
}

body.theme-light .logo-text {
    background: linear-gradient(135deg, #1e293b 0%, #4f46e5 50%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.theme-light #mainNav a {
    color: #1e293b;
}

body.theme-light #mainNav a:hover {
    color: #4f46e5;
}

/* Theme button light mode */
body.theme-light .theme-toggle {
    background: #e5e7eb;
    color: #0f172a;
    border-color: rgba(148, 163, 184, 0.9);
}

/* Hero */
body.theme-light .hero {
    background:
        radial-gradient(circle at top left, #bfdbfe 0, transparent 55%),
        radial-gradient(circle at bottom right, #ddd6fe 0, transparent 55%),
        #f8fafc;
    color: #0f172a;
}

body.theme-light .hero p {
    color: #475569;
}

body.theme-light .stat-item {
    background: #ffffff;
    border-color: #e2e8f0;
}

body.theme-light .stat-number {
    color: #0f172a;
}

body.theme-light .stat-label {
    color: #64748b;
}

/* Main background */
body.theme-light .main-content {
    background: #f8fafc;
}

/* Tool cards */
body.theme-light .tool-card {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

body.theme-light .tool-card h3 {
    color: #0f172a;
}

body.theme-light .tool-card p {
    color: #475569;
}

body.theme-light .tool-tag {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

body.theme-light .tool-card:hover {
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
    border-color: #4f46e5;
    background: #f9fafb;
}

/* Blog section */
body.theme-light .blog-section {
    border-top-color: #e2e8f0;
}

body.theme-light .blog-content h2,
body.theme-light .blog-content h3 {
    color: #0f172a;
}

body.theme-light .blog-content p,
body.theme-light .blog-content ul {
    color: #475569;
}

/* Footer */
body.theme-light footer {
    background: #0f172a;
    color: #e5e7eb;
}

body.theme-light .footer-column p,
body.theme-light .footer-column a {
    color: #cbd5f5;
}

body.theme-light .footer-column a:hover {
    color: #a5b4fc;
}

body.theme-light .footer-bottom {
    border-top-color: #111827;
}

/* Logo on dark theme – white pill behind logo so black text is visible */
body.theme-dark .logo-icon,
body.theme-dark:not(.theme-light) .logo-icon {
    background: #ffffff;
    border-radius: 10px;
    padding: 2px 6px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.45);
}

/* Logo on light theme – transparent background */
body.theme-light .logo-icon {
    background: transparent;
    padding: 0;
    box-shadow: none;
}

/* Mobile light-theme dropdown */
@media (max-width: 768px) {
    body.theme-light #mainNav {
        background: #ffffff;
        border-color: #e2e8f0;
        box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
    }

    body.theme-light #mainNav a {
        color: #0f172a;
    }
}
