/* assets/css/style.css */
:root {
    --bg-dark: #030712;
    --bg-card: rgba(17, 24, 39, 0.7);
    --primary: #2dd4bf;
    --primary-rgb: 45, 212, 191;
    --secondary: #8b5cf6;
    --secondary-rgb: 139, 92, 246;
    --accent: #f43f5e;
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(12px);
    --nav-height: 80px;
    --page-top-padding: 120px;
}

:root[data-theme="light"] {
    --bg-dark: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.8);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --glass-border: rgba(0, 0, 0, 0.1);
    --primary: #0d9488;
    --secondary: #7c3aed;
}

@media (max-width: 768px) {
    :root {
        --page-top-padding: 100px;
    }
}

.page-content {
    padding-top: var(--page-top-padding) !important;
}

.sections-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
}

@media (max-width: 1024px) {
    .sections-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    background-image:
        radial-gradient(at 0% 0%, rgba(var(--primary-rgb), 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(var(--secondary-rgb), 0.05) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(244, 63, 94, 0.05) 0px, transparent 50%);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    /* Standardized mobile padding */
}

@media (min-width: 768px) {
    .container {
        padding: 0 2.5rem;
        /* Standardized desktop padding */
    }
}

/* Glassmorphism Utility */
.glass {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
}

/* Header & Nav */
header {
    height: var(--nav-height);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

header.scrolled {
    background: var(--bg-dark);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    height: 70px;
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-secondary);
    transition: 0.3s;
    font-size: 0.95rem;
    position: relative;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section - Bento Style */
.hero-section {
    padding-top: calc(var(--nav-height) + 2rem);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(150px, auto);
    gap: 1.5rem;
    width: 100%;
}

.bento-item {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.bento-item:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.item-main {
    grid-column: span 2;
    grid-row: span 2;
}

.item-skills {
    grid-column: span 1;
    grid-row: span 2;
}

.item-cta {
    grid-column: span 1;
    grid-row: span 1;
    background: linear-gradient(135deg, rgba(45, 212, 191, 0.1), rgba(139, 92, 246, 0.1));
}

.item-stats {
    grid-column: span 1;
    grid-row: span 1;
}

.bento-item h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.bento-item p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.highlight {
    color: var(--primary);
}

/* Buttons */
.btn {
    padding: 0.8rem 2rem;
    border-radius: 100px;
    /* Consistently round */
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    text-align: center;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    box-shadow: 0 10px 20px -10px rgba(45, 212, 191, 0.5);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 20px 30px -10px rgba(45, 212, 191, 0.6);
    filter: brightness(1.1);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 0 20px rgba(45, 212, 191, 0.2);
}

.btn-primary::after,
.btn-glass::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20%;
    height: 200%;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(30deg);
    transition: 0.7s;
}

.btn-primary:hover::after,
.btn-glass:hover::after {
    left: 140%;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.reveal {
    animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .item-main,
    .item-skills {
        grid-column: span 1;
    }

    .bento-item h1 {
        font-size: 2.5rem;
    }
}

/* =================== Hamburger Menu =================== */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
    z-index: 2000;
    transition: background 0.2s;
}

.hamburger:hover {
    background: rgba(255, 255, 255, 0.08);
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 4px;
    transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
    transform-origin: center;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Hide mobile-only toggles on desktop */
.mobile-only-toggles {
    display: none;
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--bg-dark);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 1rem 2rem 1.5rem;
        gap: 0.25rem;
        border-bottom: 1px solid var(--glass-border);
        list-style: none;
    }

    .nav-links.open {
        display: flex;
        animation: navSlideDown 0.3s ease forwards;
    }

    @keyframes navSlideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

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

    .nav-links a {
        padding: 0.75rem 0.5rem;
        font-size: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        display: block;
    }

    .nav-links li:last-child a {
        border-bottom: none;
    }

    /* Hide desktop nav-controls on mobile */
    .nav-controls {
        display: none !important;
    }

    /* Mobile only toggles styling */
    .mobile-only-toggles {
        display: flex;
        gap: 1rem;
        padding-top: 1rem;
        margin-top: 0.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        justify-content: center;
    }

    .mobile-only-toggles .toggle-btn {
        flex: 1;
        justify-content: center;
        padding: 0.65rem 1rem;
        font-size: 0.85rem;
    }

    /* Homepage hero adjustments */
    .bento-grid-innovative {
        grid-template-columns: 1fr !important;
        grid-template-areas:
            "main"
            "exp"
            "cta" !important;
    }

    .hero-title {
        font-size: 2.5rem !important;
        letter-spacing: -1px !important;
    }

    .item-main,
    .item-skills,
    .item-cta {
        padding: 2rem !important;
    }

    .section-title {
        font-size: 1.8rem !important;
    }

    /* Prevent course title from overflowing */
    .course-card-premium h3 {
        font-size: 1.1rem !important;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    /* Fix nav-controls overflow */
    .nav-controls {
        gap: 0.4rem;
    }

    .toggle-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .btn {
        padding: 0.9rem 1.4rem !important;
        font-size: 0.9rem;
    }

    /* Buttons stack vertically */
    div[style*="display: flex"] .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-title {
        font-size: 2rem !important;
    }

    .section-title {
        font-size: 1.5rem !important;
    }

    .course-card-premium {
        padding: 1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* =================== Premium Footer =================== */
footer {
    position: relative;
    margin-top: 6rem;
    padding: 4rem 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.footer-glow {
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 200px;
    background: radial-gradient(ellipse, rgba(45, 212, 191, 0.08) 0%, rgba(139, 92, 246, 0.06) 50%, transparent 70%);
    pointer-events: none;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 3rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 3px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    display: inline-block;
}

.footer-tagline {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    max-width: 280px;
}

.footer-socials {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: rgba(45, 212, 191, 0.15);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(45, 212, 191, 0.15);
}

.footer-col-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 1.25rem;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease, padding-left 0.2s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--text-primary);
    padding-left: 6px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-bottom p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.footer-tech {
    font-size: 0.8rem !important;
    opacity: 0.5;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* =================== Contact Page Layout =================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.contact-title {
    font-size: 3.5rem;
}

.contact-form-card {
    padding: 4rem;
    border-radius: 40px;
}

@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .contact-title {
        font-size: 2.8rem;
    }

    .contact-form-card {
        padding: 2.5rem;
        border-radius: 24px;
    }
}

@media (max-width: 480px) {
    .contact-title {
        font-size: 2.2rem;
    }

    .contact-form-card {
        padding: 1.5rem;
        border-radius: 20px;
    }
}

/* =================== Premium Utilities =================== */
.primary-glow {
    box-shadow: 0 0 20px rgba(45, 212, 191, 0.2);
}

.btn-premium-cv {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--bg-dark);
    border: none;
    box-shadow: 0 10px 20px rgba(45, 212, 191, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: 0.3s;
}

.btn-premium-cv:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 30px rgba(45, 212, 191, 0.3);
    filter: brightness(1.1);
}

.nav-links li a.active {
    color: var(--primary);
}

.nav-links li a.active::after {
    width: 100%;
}

/* =================== Expertise Skill Cards =================== */
.expertise-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.skill-card-mini {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.skill-card-mini:hover {
    background: rgba(168, 85, 247, 0.08);
    border-color: rgba(168, 85, 247, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(168, 85, 247, 0.1);
}

.skill-card-mini i {
    font-size: 1.5rem;
    color: var(--primary);
    transition: 0.3s;
}

.skill-card-mini:hover i {
    transform: scale(1.2);
    color: var(--secondary);
}

.skill-card-mini span {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.expertise-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 1.5rem;
    line-height: 1.5;
}

/* =================== Premium CV Button =================== */
.btn-premium-cv {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(59, 130, 246, 0.2));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-premium-cv:hover {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.4), rgba(59, 130, 246, 0.4));
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(168, 85, 247, 0.2);
    color: white;
}

.btn-premium-cv i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.btn-premium-cv:hover i {
    transform: translateY(-2px);
}

/* =================== Light Theme Override =================== */
[data-theme="light"] {
    --bg-dark: #f0f4ff;
    --bg-card: rgba(255, 255, 255, 0.8);
    --primary: #0d9488;
    --primary-rgb: 13, 148, 136;
    --secondary: #7c3aed;
    --secondary-rgb: 124, 58, 237;
    --accent: #e11d48;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --glass-border: rgba(0, 0, 0, 0.08);
    --bg-card-light: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] body {
    background-image:
        radial-gradient(at 0% 0%, rgba(13, 148, 136, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(124, 58, 237, 0.08) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(225, 29, 72, 0.05) 0px, transparent 50%);
}

[data-theme="light"] header {
    background: rgba(240, 244, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="light"] header.scrolled {
    background: rgba(240, 244, 255, 0.96);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
}

[data-theme="light"] .nav-links.open {
    background: rgba(240, 244, 255, 0.98);
}

[data-theme="light"] .hamburger span {
    background: var(--text-primary);
}

/* =================== Nav Toggle Controls =================== */
.nav-controls {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.3px;
    font-family: inherit;
}

.toggle-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toggle-btn .toggle-icon {
    font-size: 0.9rem;
    transition: transform 0.4s ease;
}

.toggle-btn:hover .toggle-icon {
    transform: rotate(25deg) scale(1.2);
}

.nav-controls {
    position: relative;
    z-index: 1500;
}

.toggle-btn {
    pointer-events: auto;
}

/* =================== Blog Code Block Styling =================== */
.ck-content pre {
    background: var(--bg-card) !important;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border) !important;
    border-radius: 16px;
    padding: 1.5rem !important;
    overflow-x: auto;
    margin: 2rem 0 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.ck-content pre code {
    font-family: 'Fira Code', 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    color: inherit;
}

/* Inline code inside text */
.ck-content :not(pre) > code {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary);
    padding: 0.2rem 0.4rem;
    border-radius: 6px;
    font-family: 'Fira Code', 'Courier New', Courier, monospace;
    font-size: 0.9em;
}