/* --- MODERN DESIGN SYSTEM --- */
:root {
    --primary: #0088ff;
    --primary-glow: rgba(0, 136, 255, 0.5);
    --secondary: #6c757d;
    --accent: #3b4fe4;
    
    /* Dark Theme (Default) */
    --bg: #0d1117;
    --card-bg: #161b22;
    --text: #c9d1d9;
    --text-muted: #8b949e;
    --border: #30363d;
    --glass: rgba(22, 27, 34, 0.8);
    --shadow: rgba(0, 0, 0, 0.3);
    --nav-bg: rgba(13, 17, 23, 0.8);
}

html[data-theme="light"] {
    --bg: #f6f8fa;
    --card-bg: #ffffff;
    --text: #24292f;
    --text-muted: #57606a;
    --border: #d0d7de;
    --glass: rgba(255, 255, 255, 0.8);
    --shadow: rgba(31, 35, 40, 0.1);
    --nav-bg: rgba(246, 248, 250, 0.8);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--text);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: 0.3s;
}

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

ul {
    list-style: none;
}

/* --- NAVIGATION --- */
.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    transition: 0.3s;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: nowrap;
}

nav a {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.95rem;
    position: relative;
    white-space: nowrap;
}

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

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

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

/* --- THEME SWITCHER --- */
.theme-switcher {
    display: flex;
    align-items: center;
    margin-left: 2rem;
}

#theme-toggle {
    display: none;
}

.slider {
    width: 60px;
    height: 30px;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 30px;
    position: relative;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8px;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: inset 0 2px 4px var(--shadow);
}

.slider::before {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    left: 2px;
    top: 2px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 2px 8px var(--primary-glow);
    z-index: 2;
}

#theme-toggle:checked + .slider {
    background: var(--card-bg);
    border-color: var(--primary);
}

#theme-toggle:checked + .slider::before {
    transform: translateX(30px);
}

.slider i {
    font-size: 0.85rem;
    z-index: 1;
    transition: 0.3s;
}

.slider .fa-sun {
    color: #ffb800;
}

.slider .fa-moon {
    color: #a5b4fc;
}

#theme-toggle:checked + .slider .fa-sun {
    opacity: 0.2;
    transform: scale(0.8);
}

#theme-toggle:not(:checked) + .slider .fa-moon {
    opacity: 0.2;
    transform: scale(0.8);
}

/* --- HERO SECTION --- */
#hero {
    padding: 10rem 0 6rem;
    background: radial-gradient(circle at 90% 10%, rgba(0, 136, 255, 0.05), transparent 40%);
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.hero-text {
    flex: 1;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(0, 136, 255, 0.1);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.tagline {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.summary {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 600px;
}

.contact-info {
    margin-bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 1rem;
}

.contact-info i {
    width: 20px;
    color: var(--primary);
    text-align: center;
}

.social-links {
    display: flex;
    gap: 1.2rem;
    margin-top: 0.5rem;
}

.social-links a {
    font-size: 1.5rem;
    color: var(--text-muted);
}

.social-links a:hover {
    color: var(--primary);
    transform: translateY(-3px);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--primary-glow);
    color: white;
}

.btn-outline {
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    background: var(--border);
}

.hero-image {
    flex: 0 0 350px;
}

.profile-frame {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    padding: 8px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-frame::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        transparent, 
        var(--primary), 
        var(--accent), 
        transparent 30%
    );
    animation: rotate 4s linear infinite;
    z-index: 0;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    z-index: 1;
    background: var(--bg);
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- SECTIONS --- */
section {
    padding: 6rem 0;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

h2 i {
    color: var(--primary);
    font-size: 1.5rem;
}

/* --- CARDS --- */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px var(--shadow);
}

.job-header h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.company {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.duration, .location {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.responsibilities {
    margin-top: 1.5rem;
}

.responsibilities li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--text-muted);
}

.responsibilities li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary);
}

/* --- SKILLS --- */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border);
}

.skill-category h3 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.skill-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-badge {
    padding: 0.5rem 1rem;
    background: rgba(0, 136, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: 0.3s;
}

.skill-badge:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: scale(1.05);
}

/* --- CERTIFICATIONS --- */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.cert-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 15px;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    color: inherit;
    position: relative;
}

.cert-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    background: rgba(0, 136, 255, 0.05);
    box-shadow: 0 10px 20px var(--shadow);
}

.cert-icon {
    font-size: 2rem;
    color: var(--primary);
    flex-shrink: 0;
}

.cert-info {
    flex-grow: 1;
}

.cert-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
    color: var(--text);
}

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

.cert-link-icon {
    font-size: 0.9rem;
    color: var(--text-muted);
    opacity: 0;
    transition: 0.3s;
}

.cert-card:hover .cert-link-icon {
    opacity: 1;
    color: var(--primary);
    transform: translateX(3px);
}

.more-certs {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-muted);
    font-style: italic;
}

.more-certs a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: 0.3s;
}

.more-certs a:hover {
    color: var(--primary);
    text-decoration-color: var(--primary);
}


/* --- FOOTER --- */
footer {
    padding: 4rem 0;
    text-align: center;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .header-content {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        padding: 0.75rem 0;
    }
    nav {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 0.75rem;
        gap: 1.2rem;
        padding-top: 0.75rem;
        border-top: 1px solid var(--border);
    }
    .theme-switcher {
        margin-left: 0;
        order: 2;
    }
    .logo {
        order: 1;
    }
    #hero {
        padding-top: 13rem; /* Increase top padding to clear the taller mobile header */
    }
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
    }
    .hero-text h1 {
        font-size: 2.8rem;
    }
    .contact-info p, .cta-buttons, .social-links {
        justify-content: center;
    }
    .summary {
        margin: 0 auto 2rem;
    }
}

@media (max-width: 600px) {
    .hero-text h1 {
        font-size: 2.5rem;
    }
    .hero-image, .profile-frame {
        width: 250px;
        height: 250px;
    }
}

/* --- ANIMATIONS ON SCROLL --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: 0.8s ease-out;
}

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