/* assets/css/style.css - Kamran Aydinov Modern Portfolio Theme */

:root {
    --bg-dark: #090c13;
    --bg-surface: #101522;
    --bg-surface-elevated: #161c2d;
    --bg-card: rgba(19, 25, 41, 0.75);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(99, 102, 241, 0.45);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --accent: #06b6d4;
    --accent-gold: #f59e0b;
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
    --gradient-card: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 100%);
    --glow-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.35);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme Variables */
[data-theme="light"] {
    --bg-dark: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.9);
    --border-color: rgba(15, 23, 42, 0.09);
    --border-hover: rgba(99, 102, 241, 0.6);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;

    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --accent: #0284c7;
    --accent-gold: #d97706;
    --gradient-primary: linear-gradient(135deg, #4f46e5 0%, #0284c7 100%);
    --gradient-card: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.8) 100%);
    --glow-shadow: 0 10px 30px -10px rgba(79, 70, 229, 0.2);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    position: relative;
    background-image: 
        radial-gradient(at 15% 15%, rgba(99, 102, 241, 0.08) 0px, transparent 50%),
        radial-gradient(at 85% 30%, rgba(6, 182, 212, 0.06) 0px, transparent 50%),
        radial-gradient(at 50% 80%, rgba(147, 51, 234, 0.07) 0px, transparent 50%);
    background-attachment: fixed;
    transition: background-color 0.3s ease, color 0.3s ease;
}

[data-theme="light"] body {
    background-image: 
        radial-gradient(at 15% 15%, rgba(99, 102, 241, 0.06) 0px, transparent 50%),
        radial-gradient(at 85% 30%, rgba(6, 182, 212, 0.05) 0px, transparent 50%),
        radial-gradient(at 50% 80%, rgba(147, 51, 234, 0.05) 0px, transparent 50%);
}

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

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

ul {
    list-style: none;
}

button, input, textarea {
    font-family: inherit;
    font-size: inherit;
    border: none;
    outline: none;
}

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography Helpers */
.text-center { text-align: center; }

.section {
    padding: 6.5rem 0;
    position: relative;
}

.section-header {
    margin-bottom: 3.5rem;
}

.section-subtitle {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    line-height: 1.2;
}

.section-lead {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin: 1rem auto 0;
}

.title-underline {
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    margin: 1.25rem auto 0;
    border-radius: var(--radius-full);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.85rem 1.6rem;
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.55);
    filter: brightness(1.08);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(8px);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.55rem 1.1rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 1.05rem 2rem;
    font-size: 1.05rem;
}

.btn-block {
    width: 100%;
}

.btn-text {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
    background: transparent;
    cursor: pointer;
    transition: var(--transition);
}

.btn-text:hover {
    color: #ffffff;
    transform: translateX(4px);
}

/* =========================================
   Header & Navigation
   ========================================= */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.25rem 0;
    transition: var(--transition);
    background: rgba(9, 12, 19, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.site-header.scrolled {
    padding: 0.85rem 0;
    background: rgba(9, 12, 19, 0.92);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.01em;
}

.logo-symbol {
    width: 38px;
    height: 38px;
    background: var(--gradient-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 1.05rem;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.logo-name {
    color: var(--text-primary);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 10px #10b981;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.8rem;
}

.nav-link {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 0.3rem 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
    border-radius: var(--radius-full);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Theme Toggle Button */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: rotate(15deg);
}

.sun-icon {
    display: block;
}
.moon-icon {
    display: none;
}

[data-theme="light"] .theme-toggle {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
    color: #475569;
}

[data-theme="light"] .theme-toggle:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #0f172a;
    border-color: rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .sun-icon {
    display: none;
}
[data-theme="light"] .moon-icon {
    display: block;
}

.drawer-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Language Switcher */
.lang-switch {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 3px;
}

.lang-btn {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary);
    transition: var(--transition);
}

.lang-btn.active {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

.lang-btn:hover:not(.active) {
    color: #ffffff;
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 8px;
}

.mobile-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
    border-radius: 2px;
}

/* Mobile Drawer */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100vh;
    background: var(--bg-surface-elevated);
    border-left: 1px solid var(--border-color);
    z-index: 1100;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.7);
}

.mobile-drawer.open {
    transform: translateX(-320px);
}

.mobile-drawer-inner {
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.drawer-close {
    background: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: auto;
}

.mobile-link {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
}

.drawer-footer {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.lang-switch-mobile {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.lang-switch-mobile .lang-btn {
    text-align: center;
    padding: 8px;
}

.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1050;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* =========================================
   Hero Section
   ========================================= */
.hero-section {
    padding-top: 9.5rem;
    padding-bottom: 5.5rem;
    position: relative;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.35;
}

.hero-glow-1 {
    top: 5%;
    left: -100px;
    background: rgba(99, 102, 241, 0.4);
}

.hero-glow-2 {
    bottom: 5%;
    right: -100px;
    background: rgba(6, 182, 212, 0.3);
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3.5rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
    padding: 0.45rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.hero-title {
    font-size: 3.25rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 1.35rem;
    background: linear-gradient(135deg, #ffffff 40%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-lead {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 580px;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3.2rem;
    flex-wrap: wrap;
}

/* Stats */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    width: 100%;
    padding-top: 1.8rem;
    border-top: 1px solid var(--border-color);
}

.stat-card {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.85rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 0.3rem;
    line-height: 1.3;
}

/* Hero Visual */
.hero-visual {
    display: flex;
    justify-content: center;
}

.hero-card-frame {
    position: relative;
    width: 100%;
    max-width: 420px;
}

.hero-card-glow {
    position: absolute;
    inset: -10px;
    background: var(--gradient-primary);
    border-radius: 28px;
    filter: blur(25px);
    opacity: 0.35;
    z-index: 0;
}

.hero-image-wrapper {
    position: relative;
    z-index: 1;
    border-radius: 24px;
    overflow: hidden;
    background: var(--bg-surface-elevated);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.hero-portrait {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    transition: var(--transition);
}

.hero-card-frame:hover .hero-portrait {
    transform: scale(1.02);
}

.hero-card-badge {
    position: absolute;
    bottom: -15px;
    right: 20px;
    z-index: 2;
    background: rgba(16, 21, 34, 0.92);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 0.85rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.badge-icon {
    font-size: 1.4rem;
}

.badge-text {
    display: flex;
    flex-direction: column;
}

.badge-text strong {
    font-size: 0.95rem;
    color: #ffffff;
}

.badge-text small {
    font-size: 0.78rem;
    color: var(--accent);
}

/* =========================================
   About Section
   ========================================= */
.about-section {
    background: rgba(16, 21, 34, 0.4);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.vision-quote-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(6, 182, 212, 0.05) 100%);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: var(--radius-lg);
    padding: 2.5rem 3rem;
    margin-bottom: 4rem;
    position: relative;
    text-align: center;
    box-shadow: var(--glow-shadow);
}

.quote-icon {
    font-size: 4rem;
    color: var(--accent);
    opacity: 0.3;
    line-height: 0.6;
    margin-bottom: 0.5rem;
    font-family: Georgia, serif;
}

.quote-text {
    font-size: 1.35rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.6;
    max-width: 900px;
    margin: 0 auto 1.5rem;
    font-style: italic;
}

.quote-author {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.quote-author strong {
    font-size: 1rem;
    color: #ffffff;
}

.quote-author span {
    font-size: 0.85rem;
    color: var(--accent);
}

.timeline-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.8rem;
}

.chapter-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.2rem;
    transition: var(--transition);
    position: relative;
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
}

.chapter-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.5);
}

.chapter-badge {
    display: inline-block;
    align-self: flex-start;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.2);
    padding: 0.35rem 0.8rem;
    border-radius: var(--radius-full);
    margin-bottom: 1.25rem;
}

.chapter-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.chapter-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.chapter-desc strong {
    color: #ffffff;
}

/* =========================================
   Projects Section
   ========================================= */
.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 3.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 0.65rem 1.4rem;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.filter-btn.active {
    background: var(--gradient-primary);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    backdrop-filter: blur(12px);
}

.project-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-hover);
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.6);
}

.project-card.hidden {
    display: none !important;
}

.card-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #000000;
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .card-thumb img {
    transform: scale(1.05);
}

.card-tag-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(16, 21, 34, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-full);
    z-index: 2;
}

/* Play button overlay */
.play-btn-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    cursor: pointer;
    transition: var(--transition);
    z-index: 2;
}

.play-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.9);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.8);
    transition: var(--transition);
}

.play-icon svg {
    width: 22px;
    height: 22px;
    margin-left: 3px;
}

.project-card:hover .play-icon {
    transform: scale(1.15);
    background: var(--accent);
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.9);
}

.card-body {
    padding: 1.6rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-category-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.65rem;
    line-height: 1.3;
}

.card-role {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
    color: #cbd5e1;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.card-role svg {
    color: var(--accent-gold);
}

.card-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

.tag {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
}

.card-footer-action {
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: auto;
}

/* =========================================
   News / Media Section
   ========================================= */
.news-section {
    background: rgba(16, 21, 34, 0.3);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.news-layout {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

/* Featured news */
.news-featured-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: blur(12px);
    transition: var(--transition);
}

.news-featured-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.5);
}

.featured-thumb {
    position: relative;
    height: 100%;
    min-height: 280px;
}

.featured-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-badge {
    position: absolute;
    top: 18px;
    left: 18px;
    background: var(--gradient-primary);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
}

.featured-body {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.news-source {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.news-category {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.featured-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.featured-title a:hover {
    color: var(--accent);
}

.featured-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 1.8rem;
}

/* News grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.news-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.news-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.news-card-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #000;
}

.news-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.news-card:hover .news-card-thumb img {
    transform: scale(1.06);
}

.news-card-source {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(16, 21, 34, 0.85);
    backdrop-filter: blur(6px);
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
}

.news-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-card-tag {
    font-size: 0.72rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.news-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.4;
    margin-bottom: 1rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-title a:hover {
    color: var(--accent);
}

.news-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent);
    margin-top: auto;
}

.news-card-link:hover {
    color: #ffffff;
    transform: translateX(3px);
}

/* =========================================
   Contact Section
   ========================================= */
.contact-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 3rem;
    align-items: flex-start;
}

.contact-info-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-info-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    backdrop-filter: blur(12px);
    transition: var(--transition);
}

.contact-info-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.info-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-value {
    font-size: 1.05rem;
    color: #ffffff;
    font-weight: 600;
}

.info-value:hover {
    color: var(--accent);
}

.socials-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.8rem;
    backdrop-filter: blur(12px);
}

.socials-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1.25rem;
}

.social-links-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.social-link-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.social-link-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: translateX(4px);
}

/* Contact Form */
.contact-form-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    backdrop-filter: blur(16px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.form-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1.8rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.form-group {
    margin-bottom: 1.4rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.85rem 1.1rem;
    background: rgba(9, 12, 19, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: #ffffff;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    background: rgba(9, 12, 19, 0.85);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.form-alert {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 1.4rem;
    line-height: 1.4;
}

.form-alert.success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
}

.form-alert.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
}

/* =========================================
   Footer
   ========================================= */
.site-footer {
    background: #06080d;
    border-top: 1px solid var(--border-color);
    padding: 4.5rem 0 2rem;
}

.footer-top {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.2fr;
    gap: 3rem;
    margin-bottom: 3.5rem;
}

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

.footer-tagline {
    font-size: 0.9rem;
    color: var(--text-muted);
    max-width: 320px;
    margin-bottom: 1.25rem;
}

.footer-email {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.95rem;
    color: var(--accent);
    font-weight: 600;
}

.footer-heading {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #ffffff;
    margin-bottom: 1.25rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.footer-links a:hover {
    color: var(--accent);
    transform: translateX(3px);
}

.social-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.social-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.social-pill:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

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

.back-to-top {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.back-to-top:hover {
    color: var(--accent);
}

/* =========================================
   Video Lightbox Modal
   ========================================= */
.video-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.video-modal.active {
    opacity: 1;
    visibility: visible;
}

.video-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.video-modal-dialog {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 940px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.video-modal.active .video-modal-dialog {
    transform: scale(1);
}

.video-modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    z-index: 20;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
    transition: var(--transition);
}

.video-modal-close:hover {
    background: rgba(239, 68, 68, 0.8);
    transform: rotate(90deg);
}

.video-modal-body {
    position: relative;
    width: 100%;
    background: #000;
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-modal-title {
    padding: 1.25rem 1.75rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    background: var(--bg-surface);
}

/* =========================================
   Light Theme Explicit Overrides
   ========================================= */
[data-theme="light"] .site-header {
    background: rgba(248, 250, 252, 0.85);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .site-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .hero-title {
    background: linear-gradient(135deg, #0f172a 40%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .hero-badge {
    background: rgba(79, 70, 229, 0.08);
    border-color: rgba(79, 70, 229, 0.2);
    color: #4338ca;
}

[data-theme="light"] .hero-card-badge {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .hero-card-badge strong {
    color: #0f172a;
}

[data-theme="light"] .about-section,
[data-theme="light"] .news-section {
    background: rgba(241, 245, 249, 0.6);
}

[data-theme="light"] .vision-quote-card {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.04) 0%, rgba(2, 132, 199, 0.03) 100%);
    border-color: rgba(79, 70, 229, 0.18);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .quote-text,
[data-theme="light"] .quote-author strong,
[data-theme="light"] .chapter-title,
[data-theme="light"] .chapter-desc strong,
[data-theme="light"] .card-title,
[data-theme="light"] .featured-title,
[data-theme="light"] .news-card-title,
[data-theme="light"] .info-value,
[data-theme="light"] .socials-title,
[data-theme="light"] .form-title,
[data-theme="light"] .footer-heading,
[data-theme="light"] .mobile-link {
    color: #0f172a;
}

[data-theme="light"] .card-role {
    color: #334155;
}

[data-theme="light"] .tag {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.08);
    color: #475569;
}

[data-theme="light"] .chapter-card,
[data-theme="light"] .project-card,
[data-theme="light"] .news-card,
[data-theme="light"] .news-featured-card,
[data-theme="light"] .contact-info-card,
[data-theme="light"] .socials-wrapper {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .chapter-card:hover,
[data-theme="light"] .project-card:hover,
[data-theme="light"] .news-card:hover,
[data-theme="light"] .news-featured-card:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .contact-form-panel {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .form-control {
    background: #f8fafc;
    border-color: rgba(0, 0, 0, 0.12);
    color: #0f172a;
}

[data-theme="light"] .form-control:focus {
    background: #ffffff;
}

[data-theme="light"] .social-link-item {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.06);
    color: #334155;
}

[data-theme="light"] .social-link-item:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.12);
    color: #0f172a;
}

[data-theme="light"] .site-footer {
    background: #f1f5f9;
    border-top-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .footer-links a {
    color: #475569;
}

[data-theme="light"] .social-pill {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
    color: #334155;
}

[data-theme="light"] .social-pill:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #0f172a;
}

[data-theme="light"] .mobile-drawer {
    background: #ffffff;
}

[data-theme="light"] .video-modal-dialog {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .video-modal-title {
    background: #ffffff;
    color: #0f172a;
}

[data-theme="light"] .filter-btn {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
    color: #475569;
}

[data-theme="light"] .filter-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #0f172a;
}

[data-theme="light"] .filter-btn.active {
    background: var(--gradient-primary);
    color: #ffffff;
}

[data-theme="light"] .btn-outline {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.12);
    color: #0f172a;
}

[data-theme="light"] .btn-outline:hover {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.22);
}

[data-theme="light"] .lang-switch {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .lang-btn:not(.active) {
    color: #475569;
}

[data-theme="light"] .lang-btn:hover:not(.active) {
    color: #0f172a;
}

@media (max-width: 1080px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-title {
        font-size: 2.8rem;
    }
    .hero-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .hero-visual {
        order: -1;
    }
    .hero-card-frame {
        max-width: 340px;
    }
}

@media (max-width: 860px) {
    .nav-links, .nav-cta {
        display: none;
    }
    .mobile-toggle {
        display: flex;
    }
    .timeline-grid {
        grid-template-columns: 1fr;
    }
    .news-featured-card {
        grid-template-columns: 1fr;
    }
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .footer-top {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .section {
        padding: 4.5rem 0;
    }
    .section-title {
        font-size: 2rem;
    }
    .hero-title {
        font-size: 2.2rem;
    }
    .hero-lead {
        font-size: 1rem;
    }
    .projects-grid {
        grid-template-columns: 1fr;
    }
    .news-grid {
        grid-template-columns: 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .vision-quote-card {
        padding: 2rem 1.5rem;
    }
    .quote-text {
        font-size: 1.15rem;
    }
    .contact-form-panel {
        padding: 1.8rem 1.4rem;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}
