/* ==========================================================================
   CSS Variables & Design System
   ========================================================================== */
   :root {
    /* Dark Theme (Default) */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #3b82f6;
    --accent-hover: #60a5fa;
    --card-bg: #1e293b;
    --card-border: #334155;
    --navbar-bg: rgba(15, 23, 42, 0.9);
    
    /* Layout */
    --max-width: 1200px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 12px;
}

body.light-mode {
    /* Light Theme */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --navbar-bg: rgba(248, 250, 252, 0.9);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* For fixed navbar */
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* ==========================================================================
   Typography & Utilities
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

.section {
    padding: 100px 5%;
    max-width: var(--max-width);
    margin: 0 auto;
}

.bg-alt {
    background-color: var(--bg-secondary);
    max-width: 100%;
    padding: 100px 5%;
}

.bg-alt > * {
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

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

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--accent);
    color: #fff;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

.btn-outline {
    background-color: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.btn-outline:hover {
    background-color: var(--accent);
    color: #fff;
}

.btn-block {
    display: block;
    width: 100%;
}

/* ==========================================================================
   Animations
   ========================================================================== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.2s;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--navbar-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 15px 5%;
    border-bottom: 1px solid var(--card-border);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -1px;
}

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

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

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-primary);
}

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

.theme-toggle, .menu-toggle {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle:hover {
    color: var(--accent);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px; /* Offset for navbar */
    position: relative;
    max-width: var(--max-width);
    margin: 0 auto;
    padding-left: 5%;
    padding-right: 5%;
}

.hero-content {
    flex: 1;
    padding-right: 50px;
}

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

.name {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 15px;
    background: linear-gradient(to right, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.title {
    font-size: 2rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 25px;
}

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

.cta-buttons {
    display: flex;
    gap: 20px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-container {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--accent);
    position: relative;
    z-index: 2;
}

.image-container::after {
    content: '';
    position: absolute;
    inset: -15px;
    border-radius: 50%;
    border: 2px dashed var(--accent);
    opacity: 0.3;
    animation: rotate 20s linear infinite;
    z-index: 1;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

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

.about-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.stat-box {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 30px 20px;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
}

.stat-box:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.stat-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 15px;
}

.stat-box h4 {
    margin-bottom: 5px;
}

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

/* ==========================================================================
   Skills Section
   ========================================================================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.skill-category {
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: var(--border-radius);
    border: 1px solid var(--card-border);
    transition: var(--transition);
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--accent);
}

.skill-icon {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 20px;
}

.skill-category h3 {
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.skill-category ul {
    list-style-type: none;
}

.skill-category ul li {
    color: var(--text-secondary);
    margin-bottom: 12px;
    position: relative;
    padding-left: 25px;
}

.skill-category ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* ==========================================================================
   Projects Section
   ========================================================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.project-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--card-border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

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

.project-img {
    height: 220px;
    width: 100%;
    overflow: hidden;
    background-color: var(--bg-secondary);
}

.project-img .placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 4rem;
    color: var(--text-secondary);
    opacity: 0.5;
    background: linear-gradient(45deg, var(--bg-primary), var(--bg-secondary));
}

.project-card:hover .placeholder {
    color: var(--accent);
    transform: scale(1.05);
    transition: var(--transition);
}

.project-info {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.project-info p {
    color: var(--text-secondary);
    margin-bottom: 25px;
    flex-grow: 1;
}

.project-link {
    color: var(--accent);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}

.project-link:hover {
    color: var(--accent-hover);
    gap: 12px;
}

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

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

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 50px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: var(--accent);
    border-radius: 50%;
    left: 13px;
    top: 5px;
    border: 4px solid var(--bg-secondary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.timeline-content {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    border: 1px solid var(--card-border);
    transition: var(--transition);
}

.timeline-content:hover {
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.timeline-date {
    display: inline-block;
    padding: 6px 14px;
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--accent);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
}

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

.timeline-content h4 {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 15px;
    font-size: 1rem;
}

.timeline-content ul {
    list-style-type: disc;
    padding-left: 20px;
    color: var(--text-secondary);
}

.timeline-content ul li {
    margin-bottom: 8px;
}

/* ==========================================================================
   Services Section
   ========================================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--card-bg);
    padding: 40px 30px;
    border-radius: var(--border-radius);
    text-align: center;
    border: 1px solid var(--card-border);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background-color: rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    color: var(--accent);
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background-color: var(--accent);
    color: #fff;
    transform: scale(1.1);
}

/* ==========================================================================
   Objective Section
   ========================================================================== */
.objective {
    text-align: center;
    padding: 120px 5%;
}

.objective-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.quote-icon {
    font-size: 3rem;
    color: var(--accent);
    opacity: 0.2;
    margin: 20px 0;
}

.objective h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.objective p {
    font-size: 1.3rem;
    line-height: 1.8;
    color: var(--text-secondary);
    font-style: italic;
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 20px;
}

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

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

.social-links a {
    width: 45px;
    height: 45px;
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-primary);
    font-size: 1.2rem;
}

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

.contact-form {
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: var(--border-radius);
    border: 1px solid var(--card-border);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    background-color: var(--bg-secondary);
    padding: 40px 5%;
    border-top: 1px solid var(--card-border);
    text-align: center;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
}

.back-to-top {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.back-to-top:hover {
    color: var(--accent);
}

/* ==========================================================================
   Media Queries (Responsive Design)
   ========================================================================== */
@media screen and (max-width: 992px) {
    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 120px;
    }
    
    .hero-content {
        padding-right: 0;
        margin-top: 40px;
    }
    
    .intro {
        margin: 0 auto 40px;
    }
    
    .cta-buttons {
        justify-content: center;
    }
    
    .about-content, .contact-container {
        grid-template-columns: 1fr;
    }
    
    .image-container {
        width: 300px;
        height: 300px;
    }
}

@media screen and (max-width: 768px) {
    .section {
        padding: 80px 5%;
    }

    .bg-alt {
        padding: 80px 5%;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--navbar-bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.4s;
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .name {
        font-size: 3rem;
    }
    
    .title {
        font-size: 1.5rem;
    }
    
    .timeline::before {
        left: 0;
    }
    
    .timeline-item {
        padding-left: 30px;
    }
    
    .timeline-dot {
        left: -7px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
    }
}

@media screen and (max-width: 480px) {
    .name {
        font-size: 2.2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .image-container {
        width: 250px;
        height: 250px;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .projects-grid, .skills-grid, .services-grid {
        grid-template-columns: 1fr;
    }
}
