:root {
    /* Color Palette - Premium Dark */
    --bg-base: #050505;
    --bg-surface: #0f0f11;
    --bg-card: #141417;
    --bg-card-hover: #1a1a1f;

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Vibrant Gradients & Accents */
    --accent-1: #38bdf8;
    /* Light Blue */
    --accent-2: #818cf8;
    /* Indigo */
    --accent-3: #c084fc;
    /* Purple */

    --gradient-primary: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    --gradient-glow: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(129, 140, 248, 0.2));

    /* Borders & Glass */
    --border-light: rgba(255, 255, 255, 0.05);
    --border-highlight: rgba(255, 255, 255, 0.15);
    --glass-bg: rgba(15, 15, 17, 0.7);

    /* Typography */
    --font-main: 'Inter', 'Plus Jakarta Sans', sans-serif;
    --font-heading: 'Fredoka', sans-serif;

    /* Animation Variables */
    --icon-opacity: 0.15;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.light-theme {
    /* Color Palette - Premium Light */
    --bg-base: #f8fafc;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;

    --accent-1: #0284c7;
    /* Darker blue for contrast */
    --accent-2: #4f46e5;
    /* Deeper indigo */

    --border-light: rgba(0, 0, 0, 0.08);
    --border-highlight: rgba(0, 0, 0, 0.15);
    --glass-bg: rgba(255, 255, 255, 0.85);

    --icon-opacity: 0.08;
}

body.dark-theme,
body.light-theme {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Background Blobs - Organic & Deep */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    filter: blur(120px);
    opacity: 0.3;
}

.blob {
    position: absolute;
    border-radius: 50%;
}

.blob-1 {
    width: 50vw;
    height: 50vw;
    top: -20vh;
    right: -10vw;
    background: radial-gradient(circle, var(--accent-2) 0%, transparent 70%);
    animation: drift 25s infinite alternate ease-in-out;
}

.blob-2 {
    width: 40vw;
    height: 40vw;
    bottom: -10vh;
    left: -10vw;
    background: radial-gradient(circle, var(--accent-1) 0%, transparent 70%);
    animation: drift 20s infinite alternate-reverse ease-in-out;
}

@keyframes drift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(-5%, 5%) scale(1.1);
    }
}

/* Glass Navigation */
.glass-nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-primary);
    text-decoration: none;
}

.logo span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.mobile-only {
    display: none;
}

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

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

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.mobile-menu-toggle:hover {
    transform: scale(1.1);
}

.theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s, transform 0.2s;
    margin-right: 1rem;
}

.theme-toggle:hover {
    background: var(--bg-surface);
    transform: scale(1.1);
}

.theme-toggle .sun-icon {
    display: none;
}

body.dark-theme .theme-toggle .moon-icon {
    display: none;
}

body.dark-theme .theme-toggle .sun-icon {
    display: block;
}

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

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 0.2s, box-shadow 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(56, 189, 248, 0.3);
}

.btn-primary:active {
    transform: translateY(1px) scale(0.98);
}

/* Main Content Structure */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10rem 2rem 4rem;
}

.section {
    margin-bottom: clamp(4rem, 8vw, 8rem);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 3rem;
    font-weight: 700;
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    text-align: center;
    color: var(--text-primary);
}

.section-title::before,
.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-light), transparent);
}

/* Hero Redesign - Futuristic */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8rem;
    position: relative;
}

.sci-fi-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(rgba(15, 23, 42, 0.8), rgba(5, 5, 5, 1)),
        radial-gradient(circle at 50% 50%, rgba(56, 189, 248, 0.1) 0%, transparent 60%);
    z-index: -1;
    pointer-events: none;
}

body.light-theme .sci-fi-hero::before {
    background:
        linear-gradient(rgba(240, 249, 255, 0.8), rgba(255, 255, 255, 1)),
        radial-gradient(circle at 50% 50%, rgba(56, 189, 248, 0.1) 0%, transparent 60%);
}

.hero-content {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero-layout {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

/* Profile Image HUD */
.hero-profile-container {
    position: relative;
    width: 350px;
    height: 350px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.profile-image-wrapper {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    border: 2px solid var(--accent-1);
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.4);
    z-index: 2;
    background-color: var(--bg-card);
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: contrast(1.1) saturate(1.2);
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(to bottom, transparent, rgba(56, 189, 248, 0.8), transparent);
    animation: scan 4s linear infinite;
    z-index: 3;
    pointer-events: none;
}

@keyframes scan {
    0% {
        top: -10%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 110%;
        opacity: 0;
    }
}

.tech-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px dashed var(--text-secondary);
    opacity: 0.5;
    z-index: 1;
}

.outer-ring {
    width: 350px;
    height: 350px;
    border: 2px dashed rgba(56, 189, 248, 0.3);
    animation: spin-slow 20s linear infinite;
}

.inner-ring {
    width: 315px;
    height: 315px;
    border: 1px solid rgba(192, 132, 252, 0.4);
    border-left: 2px solid var(--accent-3);
    animation: spin-slow-reverse 15s linear infinite;
}

@keyframes spin-slow {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes spin-slow-reverse {
    100% {
        transform: rotate(-360deg);
    }
}

.tech-hud-element {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 2px solid var(--accent-1);
    z-index: 3;
}

.hud-top-left {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

.hud-bottom-right {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
}

/* Hero Text & Glitch */
.hero-text-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.glitch-text {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -1px;
    position: relative;
    color: var(--text-primary);
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.glitch-text::before {
    left: 2px;
    text-shadow: -2px 0 red;
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim 3s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: -2px;
    text-shadow: -2px 0 var(--accent-1);
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(23px, 9999px, 86px, 0);
    }

    20% {
        clip: rect(61px, 9999px, 12px, 0);
    }

    40% {
        clip: rect(34px, 9999px, 94px, 0);
    }

    60% {
        clip: rect(89px, 9999px, 55px, 0);
    }

    80% {
        clip: rect(10px, 9999px, 73px, 0);
    }

    100% {
        clip: rect(52px, 9999px, 3px, 0);
    }
}

.cyber-subtitle {
    font-size: clamp(1.1rem, 1.5vw, 1.3rem);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600;
    margin-bottom: 2rem;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.cyber-stats {
    display: flex;
    justify-content: flex-start;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    width: 100%;
}

body.light-theme .cyber-stats {
    border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
}

.cyber-stat-box {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: rgba(15, 15, 17, 0.5);
    border-left: 3px solid var(--accent-1);
    border-radius: 0 8px 8px 0;
    backdrop-filter: blur(5px);
}

body.light-theme .cyber-stat-box {
    background: rgba(255, 255, 255, 0.8);
}

.glow-text {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent-1);
    line-height: 1;
    margin-bottom: 0.3rem;
    text-shadow: 0 0 15px rgba(56, 189, 248, 0.5);
}

.cyber-bio {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.highlight-cyan {
    color: var(--accent-1);
    font-weight: 600;
    text-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

.highlight-purple {
    color: var(--accent-3);
    font-weight: 600;
    text-shadow: 0 0 8px rgba(192, 132, 252, 0.4);
}

.btn-cyber {
    position: relative;
    display: inline-flex;
    padding: 0.8rem 2rem;
    background: transparent;
    color: var(--accent-1);
    border: 1px solid var(--accent-1);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    overflow: hidden;
    transition: all 0.3s;
    text-decoration: none;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.2) inset;
}

.btn-cyber:hover {
    background: rgba(56, 189, 248, 0.1);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.4) inset, 0 0 20px rgba(56, 189, 248, 0.2);
    text-shadow: 0 0 8px var(--accent-1);
}

.btn-cyber-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 2rem;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

body.light-theme .btn-cyber-outline {
    border-color: rgba(0, 0, 0, 0.2);
}

.btn-cyber-outline:hover {
    border-color: var(--accent-3);
    color: var(--accent-3);
    background: rgba(192, 132, 252, 0.05);
}

body.light-theme .btn-cyber-outline:hover {
    background: rgba(192, 132, 252, 0.1);
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
}

/* Modern Card Grid Layouts */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: inset 0 0 20px rgba(56, 189, 248, 0.02), 0 4px 6px rgba(0, 0, 0, 0.3);
}

body.light-theme .card {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.025);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(800px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(56, 189, 248, 0.06), transparent 40%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
    z-index: 0;
}

.card>* {
    position: relative;
    z-index: 1;
}

.job-info-header {
    background: rgba(255, 255, 255, 0.02);
    margin: -2rem -2rem 1.5rem -2rem;
    padding: 2rem;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.3s;
}

.card:hover .job-info-header {
    background: rgba(255, 255, 255, 0.04);
}

body.light-theme .job-info-header {
    background: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid var(--border-light);
}

body.light-theme .card:hover .job-info-header {
    background: rgba(0, 0, 0, 0.04);
}

body.light-theme .card:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(2, 132, 199, 0.3);
}

.card:hover {
    background: rgba(15, 23, 42, 0.85);
    transform: translateY(-5px);
    border-color: rgba(56, 189, 248, 0.8);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(56, 189, 248, 0.3), inset 0 0 15px rgba(56, 189, 248, 0.1);
}

.card:hover::before {
    opacity: 1;
}

/* Job & Project Item Styles */
.job-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.job-title {
    font-size: 1.25rem;
    font-weight: 700;
    font-family: var(--font-heading);
    letter-spacing: -0.5px;
    color: var(--text-primary);
    line-height: 1.3;
}

.job-date {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
    background: var(--bg-surface);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid var(--border-light);
    white-space: nowrap;
}

.job-company {
    color: var(--accent-1);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    line-height: 1.4;
}

.project-subtitle {
    color: var(--text-muted);
    font-style: italic;
    font-weight: 400;
    font-size: 0.95rem;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Remove the ::after line as we now have the block border */

.job-details {
    list-style: none;
}

.job-details li {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.job-details li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 2px;
    background: var(--accent-1);
    box-shadow: 0 0 8px var(--accent-1);
}

.job-details strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Tech Stack Badges */
.tech-stack-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-badge {
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-1);
    border: 1px solid rgba(56, 189, 248, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Skills Grid */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.skill-tag {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: default;
    box-shadow: inset 0 0 10px rgba(56, 189, 248, 0.05);
}

body.light-theme .skill-tag {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

.skill-tag:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: #38bdf8;
    color: #fff;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.4), inset 0 0 15px rgba(56, 189, 248, 0.2);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

body.light-theme .skill-tag:hover {
    color: #000;
}

/* Education List */
.edu-certs-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.edu-item {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    transition: all 0.3s;
}

.edu-item:hover {
    border-color: var(--border-highlight);
    transform: translateX(5px);
}

.edu-item h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

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

/* Footer */
.glass-footer {
    text-align: center;
    padding: 4rem;
    border-top: 1px solid var(--border-light);
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4rem;
}

/* Responsive */
@media (max-width: 900px) {

    .grid-container,
    .edu-certs-container,
    .contact-container {
        grid-template-columns: 1fr;
    }

    .contact-container {
        gap: 2rem;
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
        order: 2;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--bg-surface);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
        z-index: 1001;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.5rem;
        font-family: var(--font-heading);
    }

    .nav-actions {
        order: 1;
        margin-left: auto;
        margin-right: 0.5rem;
    }

    .nav-actions .btn-primary {
        display: none;
    }

    .mobile-only {
        display: block;
        margin-top: 1rem;
    }

    .social-links-nav {
        display: none;
    }

    .btn-primary {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .nav-links .btn-primary {
        padding: 1rem 2.5rem;
        font-size: 1.1rem;
    }

    .hero-content h1 {
        font-size: 2.8rem;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 1.5rem;
        justify-content: space-around;
    }

    .stat-number {
        font-size: 2rem;
    }

    main {
        padding-top: 7rem;
    }

    .card {
        padding: 1.5rem;
    }

    #experience-timeline {
        padding-left: 1.5rem;
    }

    #experience-timeline .timeline-icon {
        left: -1.5rem;
    }

    .job-info-header {
        margin: -1.5rem -1.5rem 1rem -1.5rem;
        padding: 1.5rem;
    }

    .job-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .job-title {
        font-size: 1.15rem;
    }

    .job-date {
        align-self: flex-start;
        font-size: 0.8rem;
    }

    .job-company {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-stats {
        gap: 1rem;
    }

    .stat-item {
        flex: 1 1 40%;
    }

    .section-title {
        font-size: 1.8rem;
        gap: 0.5rem;
    }

    .modal-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
}

/* Hero Stats & Bio */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-light);
    width: 100%;
}

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

.stat-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-1);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-bio p {
    margin-bottom: 1.5rem;
}

/* Skills Categories */
.skills-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.category-title {
    font-family: var(--font-heading);
    color: var(--accent-2);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.skills-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Navbar Scrolled State */
.glass-nav.scrolled {
    padding: 0.5rem 0;
    background: var(--glass-bg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Scroll Progress Bar */
.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: var(--gradient-primary);
    width: 0%;
    z-index: 9999;
    transition: width 0.1s ease-out;
}

/* Floating Icons */
.floating-icons-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.floating-icon {
    position: absolute;
    color: var(--accent-1);
    opacity: 0;
    animation: float-up-fade linear infinite;
    filter: drop-shadow(0 0 10px var(--accent-2));
}

@keyframes float-up-fade {
    0% {
        transform: translateY(110vh) rotate(0deg) scale(0.8);
        opacity: 0;
    }

    10% {
        opacity: var(--icon-opacity);
    }

    90% {
        opacity: var(--icon-opacity);
    }

    100% {
        transform: translateY(-10vh) rotate(360deg) scale(1.2);
        opacity: 0;
    }
}

/* Typing Subtitle Cursor */
.hero-subtitle {
    position: relative;
    display: inline-block;
}

.hero-subtitle::after {
    content: '|';
    margin-left: 2px;
    color: var(--accent-1);
    animation: blink 1s step-start infinite;
}

.hero-subtitle.typing-done::after {
    animation: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-1);
}

/* Global Spotlight */
.global-spotlight {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 999;
    background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(56, 189, 248, 0.04), transparent 40%);
    transition: background 0.1s ease;
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

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

body.light-theme .global-spotlight {
    background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(2, 132, 199, 0.03), transparent 40%);
}

/* Project Filters */
.project-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    padding: 0.6rem 1.5rem;
    border-radius: 9999px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
    color: white;
    background: var(--gradient-primary);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.2);
}

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

/* Visual Experience Timeline */
#experience-timeline {
    display: flex;
    flex-direction: column;
    position: relative;
    padding-left: 2.5rem;
}

#experience-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-1), var(--accent-3), transparent);
    border-radius: 2px;
}

#experience-timeline .job-item {
    width: 100%;
    position: relative;
    overflow: visible;
}

#experience-timeline .timeline-icon {
    position: absolute;
    left: -2.5rem;
    top: 50%;
    width: 36px;
    height: 36px;
    background: var(--bg-base);
    /* Breaks the line behind it */
    border: 2px solid var(--accent-1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 0 10px var(--accent-1);
    color: var(--accent-1);
    transition: transform 0.3s, color 0.3s, background 0.3s, box-shadow 0.3s;
}

#experience-timeline .timeline-icon svg {
    width: 18px;
    height: 18px;
}

#experience-timeline .job-item:hover .timeline-icon {
    background: var(--accent-1);
    color: var(--bg-base);
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 20px var(--accent-1);
}

/* Skills Layout & Chart */
.skills-layout {
    display: flex;
    gap: 4rem;
    align-items: center;
    flex-wrap: wrap;
}

.chart-container {
    min-width: 300px;
    width: 100%;
    height: 350px;
    position: relative;
}

#skills-grid {
    flex: 1.5;
    min-width: 300px;
}

/* Contact Form */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    background: linear-gradient(145deg, var(--bg-card), var(--bg-surface));
    border: 1px solid var(--border-highlight);
    border-radius: 24px;
    padding: 4rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.contact-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(56, 189, 248, 0.03), transparent 70%);
    pointer-events: none;
}

.contact-text {
    color: var(--text-primary);
    /* Use primary for better visibility */
    font-size: 1.1rem;
    line-height: 1.6;
}

.contact-info {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-primary);
    font-weight: 500;
}

body.light-theme .contact-item {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .contact-item:hover {
    background: rgba(0, 0, 0, 0.06);
}

.contact-item i {
    color: var(--accent-1);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-main);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.light-theme .form-group input,
body.light-theme .form-group textarea {
    background: #ffffff;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-1);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

.form-submit {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    border-radius: 9999px;
    margin-top: 1rem;
    box-shadow: 0 10px 20px rgba(56, 189, 248, 0.2);
}

.form-submit:hover {
    box-shadow: 0 15px 30px rgba(56, 189, 248, 0.4);
}

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

    .contact-text {
        text-align: center;
    }

    .contact-info {
        align-items: center;
    }
}

@media (max-width: 480px) {
    .contact-container {
        padding: 1.5rem;
        gap: 2rem;
    }

    .contact-item {
        font-size: 0.9rem;
        gap: 0.5rem;
    }
}


/* --- UX ENHANCEMENTS --- */

/* Scroll Spy - Active Nav States */
.nav-links a.active {
    color: var(--accent-1);
    font-weight: 600;
}

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

/* Hero CTA Actions */
.hero-actions {
    display: flex;
    gap: 1.5rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.btn-secondary {
    padding: 0.75rem 1.75rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
}

body.light-theme .btn-secondary {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-1);
    transform: translateY(-2px);
}

body.light-theme .btn-secondary:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: var(--accent-1);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: var(--bg-surface);
    color: var(--accent-1);
    border: 1px solid var(--accent-1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3),
        0 0 15px rgba(56, 189, 248, 0.2);
    backdrop-filter: blur(10px);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--accent-1);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.4),
        0 0 25px rgba(56, 189, 248, 0.4);
}

/* Read More Toggles */
.read-more-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--accent-1);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    transition: all 0.2s ease;
    width: fit-content;
}

body.light-theme .read-more-btn {
    border-color: rgba(0, 0, 0, 0.1);
}

.read-more-btn:hover {
    background: rgba(56, 189, 248, 0.05);
    border-color: var(--accent-1);
}

.read-more-btn svg {
    transition: transform 0.3s ease;
}

.read-more-btn.active svg {
    transform: rotate(180deg);
}

.job-details li.hidden {
    display: none;
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    *,
    ::before,
    ::after {
        animation-delay: -1ms !important;
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        background-attachment: initial !important;
        scroll-behavior: auto !important;
        transition-duration: 0s !important;
        transition-delay: 0s !important;
    }

    .floating-icons-container,
    .background-blobs {
        display: none !important;
    }

    .typing-subtitle::after {
        display: none !important;
    }

    .card::before {
        display: none !important;
    }
}

/* --- REFINED BUTTON STYLING --- */
.btn-glow {
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    transform: rotate(45deg);
    transition: all 0.5s ease;
    opacity: 0;
}

.btn-glow:hover::before {
    left: 100%;
    top: 100%;
    opacity: 1;
}

.hero-actions .btn-primary {
    font-size: 1.1rem;
    padding: 1rem 2rem;
}

.hero-actions .btn-secondary {
    font-size: 1.1rem;
    padding: 1rem 2rem;
}

.btn-full {
    width: 100%;
    max-width: 450px;
    text-align: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .btn-full {
        max-width: 100%;
    }
}

/* --- PREMIUM ENHANCEMENTS --- */

/* Loader Screen */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-base);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s;
}

.loader-wrapper.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-logo {
    font-family: 'Fredoka', sans-serif;
    font-size: 6rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    animation: pulse 2s infinite ease-in-out;
}

.loader-logo span {
    color: var(--accent-1);
}

.loader-bar-container {
    width: 200px;
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
    margin: 0 auto 1.5rem;
    overflow: hidden;
}

.loader-bar {
    width: 0%;
    height: 100%;
    background: var(--gradient-primary);
    animation: load 2.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.loader-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

@keyframes load {
    0% {
        width: 0%;
    }

    100% {
        width: 100%;
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

/* Modal System */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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


.modal-backdrop {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
}

.modal-content {
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    background: var(--bg-card);
    border: 1px solid var(--border-highlight);
    border-radius: 24px;
    padding: 3rem;
    position: relative;
    z-index: 1;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s;
}

.modal-close:hover {
    background: var(--bg-surface);
    color: var(--accent-1);
    transform: rotate(90deg);
}

/* Certification Badges */
.certifications-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

.cert-badge {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cert-badge:hover {
    border-color: var(--accent-1);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(56, 189, 248, 0.1);
}

.cert-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-glow);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-1);
    flex-shrink: 0;
}

.cert-info h4 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.cert-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.cert-verify-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-1);
    text-decoration: none;
    margin-top: 0.5rem;
    padding: 0.3rem 0.6rem;
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 6px;
    background: rgba(56, 189, 248, 0.05);
    transition: all 0.3s;
}

.cert-verify-btn:hover {
    background: var(--accent-1);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(56, 189, 248, 0.2);
}

.cert-verify-btn i {
    width: 12px;
    height: 12px;
}

/* Social Links */
.social-links-nav {
    display: flex;
    gap: 1.5rem;
    margin-right: 2rem;
}

.social-links-nav a {
    color: var(--text-secondary);
    transition: all 0.3s;
}

.social-links-nav a:hover {
    color: var(--accent-1);
    transform: translateY(-2px);
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-social a {
    color: var(--text-muted);
    font-size: 1.5rem;
    transition: all 0.3s;
}

.footer-social a:hover {
    color: var(--accent-1);
    transform: scale(1.2);
}

/* Case Study Buttons */
.btn-detail {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    transition: all 0.3s;
}

.btn-detail:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: 0 5px 15px rgba(56, 189, 248, 0.3);
}

/* Skill Highlighting */
.project-card {
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card .btn-detail {
    margin-top: auto;
}

.project-card.highlight {
    border-color: var(--accent-1);
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.3);
    transform: scale(1.02);
    z-index: 10;
}

.project-card.dim {
    opacity: 0.4;
    filter: grayscale(0.5);
}

.skill-tag {
    cursor: pointer !important;
}

/* Industry Chart Container */
.chart-container-mini {
    height: 300px;
    position: relative;
    margin-top: 1rem;
}

/* Magnetic Interaction */
.btn-primary,
.btn-secondary,
.btn-detail,
.social-links-nav a,
.theme-toggle {
    transition: transform 0.1s linear;
}

/* Scroll Hide Nav */
.glass-nav.nav-hidden {
    transform: translateY(-100%);
}

/* Certification Viewer Modal */
.cert-modal-content {
    width: 95%;
    max-width: 1000px;
    height: 90vh;
    padding: 0 !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-surface);
}

.modal-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.modal-btn,
.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-btn:hover,
.modal-close-btn:hover {
    color: var(--accent-1);
    transform: scale(1.1);
}

.cert-viewer-body {
    flex: 1;
    position: relative;
    background: #f1f5f9;
}

#cert-iframe {
    width: 100%;
    height: 100%;
    background: white;
}

.cert-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--text-muted);
}

.cert-error i {
    margin-bottom: 1rem;
    color: var(--accent-1);
}

.hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .hide-on-mobile {
        display: none !important;
    }
}

/* Responsive Sci-Fi Hero */
@media (max-width: 900px) {
    .hero-layout {
        flex-direction: column;
        gap: 3rem;
        text-align: center;
    }

    .hero-text-content {
        align-items: center;
        text-align: center;
    }

    .cyber-stats {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-actions {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .hero-profile-container {
        display: none;
    }

    .glitch-text {
        font-size: clamp(1.8rem, 7vw, 3.5rem) !important;
        white-space: nowrap;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        padding: 0 1rem;
        line-height: 1.5;
    }
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.reveal-visible {
    opacity: 1;
    transform: translateY(0);
}