/* ========== CSS Variables for Theming ========== */
:root {
    /* Light Theme Colors */
    --bg-color: #ffffff;
    --bg-secondary: #f4f7f6;
    --text-primary: #2d3436;
    --text-secondary: #636e72;
    --accent-color: #0984e3;
    --accent-hover: #74b9ff;
    --card-bg: rgba(255, 255, 255, 0.8);
    --border-color: rgba(0, 0, 0, 0.08);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    --glass-border: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] {
    /* Dark Theme Colors */
    --bg-color: #0f172a;
    --bg-secondary: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --accent-color: #38bdf8;
    --accent-hover: #7dd3fc;
    --card-bg: rgba(30, 41, 59, 0.7);
    --border-color: rgba(255, 255, 255, 0.05);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --glass-border: rgba(255, 255, 255, 0.05);
}

/* ========== Global Styles ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

.section {
    padding: 100px 10%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-title {
    margin-bottom: 50px;
    text-align: center;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.underline {
    height: 4px;
    width: 60px;
    background: var(--accent-color);
    margin: 0 auto;
    border-radius: 2px;
}

/* ========== Navbar ========== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 10%;
    z-index: 1000;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent-color);
    cursor: pointer;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links li a {
    font-weight: 500;
    position: relative;
}

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

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

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

.menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Theme Switch */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
}

.theme-switch {
    display: inline-block;
    height: 30px;
    position: relative;
    width: 60px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8px;
}

.slider .fa-sun { color: #f39c12; font-size: 14px; }
.slider .fa-moon { color: #f1c40f; font-size: 14px; }

.slider:before {
    background-color: #fff;
    bottom: 4px;
    content: "";
    height: 22px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 22px;
    z-index: 2;
}

input:checked + .slider {
    background-color: var(--accent-color);
}

input:checked + .slider:before {
    transform: translateX(30px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* ========== Hero Section ========== */
.hero {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding-top: 120px;
}

.hero-text {
    flex: 1;
    max-width: 600px;
}

.greeting {
    font-size: 1.2rem;
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 10px;
}

.hero-text h1 {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 15px;
    background: linear-gradient(to right, var(--text-primary), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.typing-text {
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 25px;
}

.bio {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    font-size: 1.2rem;
    color: var(--text-primary);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-5px);
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

.image-wrapper {
    position: relative;
    width: 350px;
    height: 350px;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    background: var(--accent-color);
    overflow: hidden;
    box-shadow: var(--shadow);
    animation: morph 8s ease-in-out infinite;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes morph {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    50% { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; }
    100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
}

/* ========== Skills Section ========== */
.skills {
    background-color: var(--bg-secondary);
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.skill-category {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
}

.skill-category h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
    color: var(--accent-color);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    background: var(--bg-color);
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}

/* ========== Education Timeline ========== */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: var(--border-color);
    top: 0;
    bottom: 0;
    left: 20px;
    margin-left: -1px;
}

.timeline-item {
    padding: 20px 0 20px 50px;
    position: relative;
}

.timeline-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--accent-color);
    border-radius: 50%;
    left: 12px;
    top: 25px;
    z-index: 1;
    box-shadow: 0 0 0 4px var(--bg-color);
}

.timeline-content {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.timeline-content h3 {
    font-size: 1.4rem;
    margin-bottom: 5px;
}

.timeline-content h4 {
    font-size: 1.1rem;
    color: var(--accent-color);
    font-weight: 500;
    margin-bottom: 10px;
}

.timeline-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ========== Projects Section ========== */
.projects {
    background-color: var(--bg-secondary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.project-content {
    padding: 30px;
}

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.project-content p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.project-content .highlight {
    color: var(--text-primary);
    font-weight: 500;
    background: rgba(9, 132, 227, 0.1);
    padding: 10px;
    border-radius: 8px;
    border-left: 3px solid var(--accent-color);
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.project-tags span {
    font-size: 0.8rem;
    padding: 5px 12px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--accent-color);
    font-weight: 600;
}

/* ========== Achievements Section ========== */
.achievements-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.achievement-item {
    display: flex;
    gap: 20px;
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.achievement-item:hover {
    transform: translateY(-5px);
}

.achievement-icon {
    font-size: 2rem;
    color: var(--accent-color);
    background: rgba(9, 132, 227, 0.1);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}

[data-theme="dark"] .achievement-icon {
    background: rgba(56, 189, 248, 0.1);
}

.achievement-text h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.achievement-text p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ========== Footer ========== */
footer {
    padding: 30px 10%;
    text-align: center;
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links a {
    font-size: 1.5rem;
    margin-left: 20px;
}

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

/* ========== Animations & Responsive ========== */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-up.appear {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }
.delay-3 { transition-delay: 0.6s; }

@media (max-width: 991px) {
    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 150px;
    }
    
    .hero-text {
        margin-top: 50px;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .nav-links {
        display: none;
    }
    
    .menu-btn {
        display: block;
    }
    
    .hero-text h1 {
        font-size: 3.5rem;
    }
    
    footer {
        flex-direction: column;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 80px 5%;
    }
    
    .image-wrapper {
        width: 280px;
        height: 280px;
    }
    
    .hero-text h1 {
        font-size: 2.8rem;
    }
}
