:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
    --text-muted: #95a5a6;
    --accent: #3498db;
    --accent-hover: #2980b9;
    --accent-rgb: 52, 152, 219;
    --primary: #667eea;
    --primary-rgb: 102, 126, 234;
    --border: #e9ecef;
    --shadow: rgba(0, 0, 0, 0.1);
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #808080;
    --accent: #4dabf7;
    --accent-hover: #339af0;
    --accent-rgb: 77, 171, 247;
    --primary: #845ec2;
    --primary-rgb: 132, 94, 194;
    --border: #404040;
    --shadow: rgba(0, 0, 0, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: all 0.3s ease;
}

[data-theme="dark"] .nav {
    background: rgba(26, 26, 26, 0.95);
}

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

.nav-brand {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s ease;
    position: relative;
}

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

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

.theme-toggle, .mobile-menu-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: background-color 0.3s ease;
    color: var(--text-primary);
}

.theme-toggle:hover, .mobile-menu-toggle:hover {
    background-color: var(--bg-secondary);
}

.mobile-menu-toggle {
    display: none;
}

.mobile-menu-toggle .icon {
    width: 1.5rem;
    height: 1.5rem;
}

/* Icon Styles */
.icon {
    width: 1.25rem;
    height: 1.25rem;
    stroke: currentColor;
    fill: none;
    display: inline-block;
}

.skill-icon .icon,
.interest-icon .icon {
    width: 2rem;
    height: 2rem;
}

.contact-icon {
    width: 1.5rem;
    height: 1.5rem;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 5rem;
    position: relative;
    overflow: hidden;
}

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

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 300;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.hero-stat {
    text-align: center;
    opacity: 1; /* Ensure always visible */
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.hero-visual {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.floating-elements {
    position: relative;
    width: 300px;
    height: 300px;
}

.floating-element {
    position: absolute;
    width: 60px;
    height: 60px;
    background: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 6s ease-in-out infinite;
    box-shadow: 0 4px 20px var(--shadow);
}

.floating-element:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-element:nth-child(2) {
    top: 60%;
    right: 20%;
    animation-delay: 2s;
}

.floating-element:nth-child(3) {
    bottom: 20%;
    left: 30%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.btn-primary, .btn-secondary, .btn-outline {
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

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

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

/* Sections */
.section {
    padding: 5rem 0;
}

.section-alt {
    background-color: var(--bg-secondary);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--text-primary);
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.about-text p {
    margin-bottom: 1.5rem;
}

.about-text a {
    color: var(--accent);
    text-decoration: none;
}

.about-text a:hover {
    text-decoration: underline;
}

.about-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    color: var(--accent);
    font-weight: 500;
}

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

.image-container {
    position: relative;
    width: 280px;
    height: 280px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px var(--shadow);
    transition: all 0.3s ease;
    border: 3px solid var(--border);
}

.image-container:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px var(--shadow);
    border-color: var(--accent);
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    display: block;
}

.image-container:hover .profile-image {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.image-container:hover .image-overlay {
    transform: translateY(0);
}

.image-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
}

.image-badge .icon {
    width: 16px;
    height: 16px;
    fill: var(--accent);
}

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

.timeline::before {
    content: '';
    position: absolute;
    left: 2rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    margin-left: 4rem;
}

.timeline-marker {
    position: absolute;
    left: -3.5rem;
    top: 0.5rem;
    width: 3rem;
    height: 3rem;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 1;
}

.timeline-content {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px var(--shadow);
    border-left: 4px solid var(--accent);
}

.timeline-date {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.timeline-content h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.timeline-company {
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 1rem;
}

.timeline-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

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

.skill-tag {
    background: var(--accent);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Achievements Section */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.achievement-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border);
}

.achievement-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow);
    border-color: var(--accent);
}

.achievement-icon {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: white;
}

.achievement-content h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.achievement-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.achievement-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.achievement-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

.skill-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow);
}

.skill-icon {
    width: 4rem;
    height: 4rem;
    background: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    transition: transform 0.3s ease;
    color: var(--accent);
}

.skill-card:hover .skill-icon {
    transform: scale(1.1);
}

.skill-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.skill-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.skill-progress {
    width: 100%;
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 3px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.skill-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    border-radius: 3px;
    width: 0%;
    transition: width 1.5s ease;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.85rem;
    font-weight: 500;
}

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

.project-card {
    background: var(--bg-primary);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow);
}

.project-card.featured {
    border: 2px solid var(--accent);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.01));
    position: relative;
}

[data-theme="dark"] .project-card.featured {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.02));
}

.project-card.featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--primary));
}

.project-card.featured .project-content {
    position: relative;
    z-index: 1;
}

.project-content {
    padding: 2rem;
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.project-card.featured h3 {
    color: var(--text-primary);
    font-weight: 600;
}

.project-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.project-card.featured p {
    color: var(--text-primary);
    font-weight: 500;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.project-status {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
}

/* Interests Section */
.interests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.interest-item {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px var(--shadow);
}

.interest-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.interest-item:hover::before {
    transform: translateX(0);
}

.interest-item.featured {
    background: linear-gradient(135deg, var(--accent)15, var(--primary)15);
    border-color: var(--accent);
}

.interest-item.featured::before {
    background: linear-gradient(90deg, var(--accent), var(--primary));
    height: 4px;
}

.interest-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px var(--shadow);
    border-color: var(--accent);
}

.interest-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.interest-item:hover .interest-icon {
    background: var(--primary);
    transform: scale(1.1) rotate(5deg);
}

.interest-icon .icon {
    width: 28px;
    height: 28px;
    fill: white;
}

.interest-item h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.interest-item p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.interest-stats {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.interest-stats .stat {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.interest-item.featured .interest-stats .stat {
    background: var(--primary);
}

/* Blog Section */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.blog-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow);
}

.blog-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.blog-date {
    color: var(--text-muted);
}

.blog-category {
    background: var(--accent);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-weight: 500;
}

.blog-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.blog-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.blog-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.blog-link:hover {
    color: var(--accent-hover);
}

.blog-cta {
    text-align: center;
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 3rem auto 0;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: 1rem;
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-message {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.form-message--success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message--error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Contact Section */
.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.7;
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.contact-method {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.contact-method:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-2px);
}

.contact-icon {
    font-size: 1.25rem;
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        padding: 1rem;
    }
    
    .nav-links {
        position: fixed;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        box-shadow: 0 4px 20px var(--shadow);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        border-top: 1px solid var(--border);
    }
    
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .hero {
        padding-top: 6rem;
        text-align: center;
        flex-direction: column;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-visual {
        margin-top: 2rem;
    }
    
    .floating-elements {
        width: 250px;
        height: 250px;
    }
    
    .hero-stats {
        justify-content: center;
        gap: 1rem;
    }
    
    .hero-stat {
        flex: 1;
        min-width: 100px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .image-container {
        width: 220px;
        height: 220px;
        margin: 0 auto;
    }
    
    .timeline {
        margin-left: 1rem;
    }
    
    .timeline::before {
        left: 1rem;
    }
    
    .timeline-item {
        margin-left: 2.5rem;
    }
    
    .timeline-marker {
        left: -1.5rem;
        width: 2rem;
        height: 2rem;
    }
    
    .timeline-content {
        padding: 1.5rem;
    }
    
    .skills-grid,
    .projects-grid,
    .blog-grid,
    .achievements-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-methods {
        grid-template-columns: 1fr;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .contact-form {
        margin: 2rem auto 0;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .nav-brand {
        font-size: 1.25rem;
    }
    
    .nav-links {
        gap: 0.5rem;
    }
    
    .nav-link {
        font-size: 0.8rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .about-stats {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.skill-card,
.project-card,
.interest-item {
    animation: fadeInUp 0.6s ease-out;
}

/* Smooth scrolling for older browsers */
html:not([scroll-behavior]) {
    scroll-behavior: smooth;
}
