:root {
    --bg-main: #0a0a0c;
    --bg-alt: #111114;
    --accent: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.5);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --nav-bg: rgba(10, 10, 12, 0.8);
    --nav-bg-scrolled: rgba(10, 10, 12, 0.95);
}

body.light-mode {
    --bg-main: #f8fafc;
    --bg-alt: #f1f5f9;
    --accent: #2563eb;
    --accent-glow: rgba(37, 99, 235, 0.2);
    --text-main: #0f172a;
    --text-muted: #475569;
    --glass-bg: rgba(0, 0, 0, 0.03);
    --glass-border: rgba(0, 0, 0, 0.1);
    --nav-bg: rgba(248, 250, 252, 0.8);
    --nav-bg-scrolled: rgba(248, 250, 252, 0.95);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Glow Background effect */
.glow-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% -10%, rgba(59, 130, 246, 0.15), transparent 60%);
    pointer-events: none;
    z-index: -1;
}

/* Navigation */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    height: 80px;
    display: flex;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-nav.scrolled {
    height: 70px;
    background: var(--nav-bg-scrolled);
}

.glass-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--accent);
}

.theme-toggle {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    margin-left: 1rem;
}

.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.light-mode .theme-toggle svg {
    color: #f59e0b;
    stroke: #f59e0b;
}

.light-mode .hero h1 {
    background: linear-gradient(to right, #0f172a, #475569);
    -webkit-background-clip: text;
    background-clip: text;
}

/* Blog Page Hero */
.blog-hero {
    padding: 160px 0 80px;
    position: relative;
    overflow: hidden;
    text-align: left;
}

.blog-hero::after {
    content: '';
    position: absolute;
    top: 20%;
    left: 10%;
    width: 300px;
    height: 300px;
    background: var(--accent);
    filter: blur(150px);
    opacity: 0.1;
    z-index: -1;
}

.blog-hero h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    margin: 1rem 0;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.blog-hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
}

.nav-active {
    color: var(--accent) !important;
    font-weight: 600;
}

/* Hero Section */

.hero {
    padding: 180px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    top: 20%;
    left: 10%;
    width: 300px;
    height: 300px;
    background: var(--accent);
    filter: blur(150px);
    opacity: 0.1;
    z-index: -1;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    font-weight: 700;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.emoji-shield {
    -webkit-text-fill-color: initial;
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
}

.hero h2 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.25rem;
    color: var(--accent);
    margin-bottom: 2rem;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
}

/* Sections common */
.section {
    padding: 100px 0;
}

.alt-bg {
    background-color: var(--bg-alt);
}

.section-header {
    margin-bottom: 4rem;
}

.section-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.underline {
    width: 60px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
}

/* Certifications */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.cert-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 12px;
    position: relative;
    transition: var(--transition);
}

.cert-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    background: rgba(59, 130, 246, 0.03);
}

.cert-card::before {
    content: attr(data-date);
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.cert-icon {
    width: 48px;
    height: 48px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.cert-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.cert-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

a.cert-card {
    color: var(--text-main);
}

a.cert-card h3 {
    color: var(--text-main);
}

.target-box {
    background: rgba(59, 130, 246, 0.05);
    border: 1px dashed var(--accent);
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.target-icon {
    color: var(--accent);
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: var(--bg-alt);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 16px;
}

.skill-category h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    font-size: 1.2rem;
}

.skill-category h3 i {
    color: var(--accent);
    width: 20px;
}

.skill-category ul {
    list-style: none;
}

.skill-category ul li {
    padding: 0.5rem 0;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-category ul li::before {
    content: '→';
    color: var(--accent);
    font-size: 0.8rem;
}

/* Lab Projects */
.lab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.lab-card {
    background: var(--bg-main);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 16px;
    transition: var(--transition);
}

.lab-card:hover {
    border-color: var(--accent);
    transform: scale(1.02);
}

.lab-top {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.lab-top i {
    width: 40px;
    height: 40px;
    color: var(--accent);
}

.lab-card h3 {
    font-size: 1.3rem;
}

.lab-card p {
    color: var(--text-muted);
}

/* Blog */
.section-desc {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 0.75rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, var(--accent), transparent);
    opacity: 0;
    transition: var(--transition);
}

.blog-card:hover {
    border-color: var(--accent);
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(59, 130, 246, 0.08);
}

.blog-card:hover::before {
    opacity: 1;
}

.blog-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.blog-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent);
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 0.3rem 0.75rem;
    border-radius: 99px;
    font-size: 0.78rem;
    font-weight: 600;
}

.blog-tag svg {
    width: 13px;
    height: 13px;
}

.blog-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.blog-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-main);
}

.blog-excerpt {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.7;
    flex: 1;
}

.blog-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
}

.blog-read {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.blog-read svg {
    width: 14px;
    height: 14px;
}

.blog-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

.blog-link:hover {
    gap: 0.7rem;
}

.blog-link svg {
    width: 14px;
    height: 14px;
    transition: var(--transition);
}

/* YouTube Video Blog Card */
:root {
    --yt-red: #ff0000;
}

.blog-tag--youtube {
    background: rgba(255, 0, 0, 0.1);
    color: #ff4444;
    border-color: rgba(255, 0, 0, 0.25);
}

.blog-card--video {
    grid-column: span 1;
}

.blog-video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.blog-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 10px;
}

/* YouTube Thumbnail + Play Button */
.yt-thumbnail {
    position: absolute;
    inset: 0;
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
}

.yt-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease, filter 0.4s ease;
    filter: brightness(0.85);
}

.yt-thumbnail:hover img {
    transform: scale(1.04);
    filter: brightness(0.65);
}

.yt-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.6));
}

.yt-thumbnail:hover .yt-play-btn {
    transform: translate(-50%, -50%) scale(1.15);
    filter: drop-shadow(0 6px 28px rgba(255, 0, 0, 0.6));
}

.yt-play-bg {
    fill: #ff0000;
    fill-opacity: 0.92;
}

.yt-play-arrow {
    fill: #fff;
}

.blog-card--video:hover {
    box-shadow: 0 16px 40px rgba(255, 0, 0, 0.1);
    border-color: rgba(255, 68, 68, 0.4);
}

.blog-card--video:hover::before {
    background: linear-gradient(to right, #ff4444, transparent);
}

/* Contact */
.contact-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.contact-content p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.contact-methods {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.contact-pill {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 1rem 2rem;
    border-radius: 99px;
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition);
}

.contact-pill:hover {
    border-color: var(--accent);
    background: rgba(59, 130, 246, 0.05);
    transform: translateY(-3px);
}

.contact-pill i {
    color: var(--accent);
}

/* Footer */
footer {
    padding: 4rem 0;
    border-top: 1px solid var(--glass-border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
    }

    .hero {
        padding: 140px 0 60px;
        text-align: center;
    }

    .hero p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }
}