/* =========================================
   Global Variables & Design Tokens
   ========================================= */
:root {
    /* Colors - Light Theme (Default) */
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a5a;
    --text-muted: #888899;

    --accent-primary: #4f46e5;
    /* Indigo/Blue */
    --accent-secondary: #8b5cf6;
    /* Purple */
    --accent-tertiary: #10b981;
    /* Green/Success */
    --accent-danger: #ef4444;
    /* Red/Error */

    --border-color: rgba(0, 0, 0, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px rgba(31, 38, 135, 0.07);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    /* Layout & Spacing */
    --max-width: 1200px;
    --header-height: 80px;
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme overrides */
html[data-theme="dark"] {
    --bg-primary: #0f111a;
    --bg-secondary: #1a1c29;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(26, 28, 41, 0.7);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* =========================================
   Reset & Base Styles
   ========================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition-normal), color var(--transition-normal);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-secondary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul,
ol {
    list-style: none;
}

button,
input,
textarea {
    font-family: inherit;
}

/* =========================================
   Layout Containers
   ========================================= */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* =========================================
   Typography Utilities
   ========================================= */
.text-gradient {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

/* =========================================
   Glassmorphism Utilities
   ========================================= */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--border-radius-md);
}

/* =========================================
   Buttons
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: none;
    text-decoration: none;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent-primary);
    color: var(--accent-primary);
}

.btn-outline:hover {
    background: var(--accent-primary);
    color: white;
}

/* =========================================
   Header & Navigation
   ========================================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: var(--header-height);
    display: flex;
    align-items: center;
    transition: all var(--transition-normal);
}

.header.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    height: 70px;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    transition: width var(--transition-normal);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background var(--transition-fast);
}

.theme-toggle:hover {
    background: var(--border-color);
}

/* Mobile Menu Toggle */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
}

/* =========================================
   Footer
   ========================================= */
.footer {
    margin-top: auto;
    padding: 4rem 0 2rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-col h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-links a {
    color: var(--text-secondary);
}

.footer-links a:hover {
    color: var(--accent-primary);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.social-link:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-3px);
}

.social-link img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* =========================================
   Main Content Area
   ========================================= */
.main-content {
    padding-top: var(--header-height);
    flex: 1;
}

/* =========================================
   Animations
   ========================================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
}

.fade-in-up.visible {
    animation: fadeInUp 0.6s ease forwards;
}

.delay-100.visible {
    animation-delay: 0.1s;
}

.delay-200.visible {
    animation-delay: 0.2s;
}

.delay-300.visible {
    animation-delay: 0.3s;
}

/* =========================================
   Responsive Design
   ========================================= */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background: var(--glass-bg);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        transition: left var(--transition-normal);
    }

    .nav-links.active {
        left: 0;
    }

    .mobile-menu-btn {
        display: block;
    }
}

/* =========================================
   Home Page Specific Styles
   ========================================= */

/* Hero Section */
/* Hero Section */
.hero-section {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: 4rem;
}

.hero-bg-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    background: radial-gradient(circle at 15% 50%, rgba(79, 70, 229, 0.03), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.03), transparent 25%);
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    animation: float 10s infinite ease-in-out alternate;
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: var(--accent-primary);
    top: -150px;
    right: -100px;
    animation: float-slow 15s infinite ease-in-out alternate;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: var(--accent-secondary);
    bottom: -100px;
    left: -150px;
    animation: float-medium 12s infinite ease-in-out alternate-reverse;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: var(--accent-tertiary);
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.08;
    filter: blur(100px);
    animation: pulse-glow 8s infinite alternate;
}

@keyframes float {
    0% {
        transform: translateY(0) scale(1);
    }

    100% {
        transform: translateY(-30px) scale(1.05);
    }
}

@keyframes float-slow {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(-40px, 40px) scale(1.1);
    }
}

@keyframes float-medium {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(30px, -30px) scale(1.05);
    }
}

@keyframes pulse-glow {
    0% {
        opacity: 0.05;
        transform: translate(-50%, -50%) scale(0.9);
    }

    100% {
        opacity: 0.12;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
}

@media (min-width: 900px) {
    .hero-container {
        grid-template-columns: 1.2fr 1fr;
    }
}

.hero-text {
    text-align: left;
}

@media (max-width: 899px) {
    .hero-text {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

.hero-title {
    font-size: clamp(3rem, 5vw, 4.8rem);
    line-height: 1.15;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.25rem;
    max-width: 600px;
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

@media (max-width: 899px) {
    .hero-actions {
        justify-content: center;
    }
}

/* Hero Graphic / Right Side */
.hero-graphic {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 450px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-avatar-wrapper {
    position: relative;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    padding: 10px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.2), rgba(139, 92, 246, 0.2));
    animation: float 6s infinite ease-in-out alternate;
    z-index: 2;
}

.hero-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg-secondary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.hero-floating-card {
    position: absolute;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 3;
    animation: float-medium 8s infinite ease-in-out alternate;
}

.hero-floating-card.card-1 {
    top: 10%;
    left: -10%;
    animation-delay: -2s;
}

.hero-floating-card.card-2 {
    bottom: 15%;
    right: -15%;
    animation-delay: -4s;
}

.floating-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.floating-text .stat {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.floating-text .label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Common Section Styles */
.section-padding {
    padding: 6rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.section-header h2 {
    margin-bottom: 0;
    font-size: 2rem;
}

.view-all {
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

/* Article Cards Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

/* Global Article Card */
.article-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    background: var(--bg-secondary);
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

html[data-theme="dark"] .article-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.category-badge {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    background: rgba(79, 70, 229, 0.1);
    color: var(--accent-primary);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 0.5rem;
    border: 1px solid rgba(79, 70, 229, 0.2);
}

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-content .meta {
    font-size: 0.85rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.card-content .meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}

.card-content h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.card-content h3 a {
    color: var(--text-primary);
}

.card-content h3 a:hover {
    color: var(--accent-primary);
}

.card-content .excerpt {
    font-size: 0.95rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}