/* CSS Variables for Light and Dark Mode */
:root {
    --primary-color: #3498db;
    --secondary-color: #2980b9;
    --accent-color: #e74c3c;
    --text-color: #333;
    --text-light: #555;
    --text-lighter: #777;
    --bg-color: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-card: #f8f9fa;
    --border-color: #ddd;
    --shadow-color: rgba(0, 0, 0, 0.05);
    --header-bg: #ffffff;
    --footer-bg: #2c3e50;
    --footer-text: #ffffff;
    --timeline-line: #3498db;
    --skill-bg: #e3f2fd;
    --contact-form-bg: #f8f9fa;
    --social-bg: #f0f0f0;
    --theme-toggle-bg: #f0f0f0;
    --theme-toggle-hover: #e0e0e0;
}

/* Dark Mode Variables */
body.dark-mode {
    --primary-color: #3498db;
    --secondary-color: #2980b9;
    --accent-color: #e74c3c;
    --text-color: #f8f9fa;
    --text-light: #ddd;
    --text-lighter: #bbb;
    --bg-color: #121212;
    --bg-secondary: #1e1e1e;
    --bg-card: #2c2c2c;
    --border-color: #444;
    --shadow-color: rgba(0, 0, 0, 0.2);
    --header-bg: #1e1e1e;
    --footer-bg: #1a1a1a;
    --footer-text: #f8f9fa;
    --timeline-line: #3498db;
    --skill-bg: #2c3e50;
    --contact-form-bg: #2c2c2c;
    --social-bg: #2c2c2c;
    --theme-toggle-bg: #2c2c2c;
    --theme-toggle-hover: #3c3c3c;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

/* Scroll Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

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

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-color);
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

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

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

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

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

.btn-resume {
    background: linear-gradient(135deg, var(--accent-color), #c0392b);
    color: white;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-resume:hover {
    background: linear-gradient(135deg, #c0392b, var(--accent-color));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

/* Header Styles */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--header-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1200px;
    margin: 0 auto;
    height: 70px; /* Fixed height for header */
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

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

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: color 0.3s ease;
    position: relative;
}

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

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

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

/* Theme Toggle Button */
.theme-toggle {
    margin-left: 1rem;
}

.theme-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--theme-toggle-bg);
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

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

.theme-btn i {
    transition: transform 0.5s ease;
}

.burger {
    display: none;
    cursor: pointer;
    margin-left: 1rem;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px;
    transition: all 0.3s ease;
}

/* Hero Section - FIXED */
.hero {
    display: flex;
    align-items: center;
    min-height: 100vh;
    /* Add top padding equal to header height plus extra space */
    padding-top: 100px;
    padding-bottom: 50px;
    padding-left: 5%;
    padding-right: 5%;
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--bg-color); /* Ensure solid background */
    position: relative; /* For positioning */
    z-index: 1; /* Above header */
}

.hero-content {
    flex: 1;
    padding-right: 2rem;
    position: relative; /* For stacking context */
    z-index: 2; /* Ensure content is above everything */
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--text-color) !important; /* Force solid color */
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: block;
    clear: both;
    opacity: 1 !important; /* Force full opacity */
    text-shadow: none !important; /* Remove any text shadow */
    background-color: transparent !important; /* No background */
    position: relative;
    z-index: 10; /* Highest priority */
}

.hero-content h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-light);
}

.hero-buttons {
    margin-bottom: 2rem;
}

.hero-buttons .btn {
    margin-right: 1rem;
}

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

.hero-socials a {
    color: var(--text-light);
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.hero-socials a:hover {
    color: var(--primary-color);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2; /* Ensure image is above background */
}

.profile-img {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow-color);
    border: 5px solid var(--bg-secondary); /* Solid border */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-img:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px var(--shadow-color);
}

/* Main photo styling - prominent hero photo */
.profile-img.main-photo {
    width: 350px;
    height: 350px;
    border-color: var(--primary-color);
    border-width: 6px;
    z-index: 3;
}

/* Rotating photo styling - for about section */
.profile-img.rotating-photo {
    width: 280px;
    height: 280px;
    opacity: 1;
    animation: fadeIn 0.5s ease-in-out;
    border-width: 4px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 0.95;
        transform: scale(1);
    }
}

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

/* About Section */
.about {
    padding: 5rem 5%;
    background-color: var(--bg-secondary);
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 4rem;
}

.about-image {
    flex: 0 0 auto;
}

.about-text {
    flex: 1;
    text-align: left;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-light);
}

.about-info {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 2rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-item i {
    color: var(--primary-color);
}

/* Skills Section */
.skills {
    padding: 5rem 5%;
    background-color: var(--bg-color);
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.skill-category {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--shadow-color);
}

.skill-category.featured {
    border: 2px solid var(--primary-color);
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
}

.skill-category h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-category h3 i {
    color: var(--primary-color);
}

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

.skill-item {
    background-color: var(--skill-bg);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.skill-item:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.3);
}

.skill-item.highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-weight: 700;
}

/* Currently Learning Section */
.learning {
    padding: 5rem 5%;
    background-color: var(--bg-color);
}

.learning-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.learning-card {
    background-color: var(--bg-secondary);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid var(--primary-color);
}

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

.learning-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.learning-icon i {
    font-size: 1.8rem;
    color: white;
}

.learning-content h3 {
    color: var(--text-color);
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
}

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

.learning-progress {
    margin-top: 1rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--bg-card);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 0.85rem;
    color: var(--text-lighter);
    font-style: italic;
}

/* Projects Section */
.projects {
    padding: 5rem 5%;
    background-color: var(--bg-secondary);
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background-color: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-img {
    height: 200px;
    background-color: var(--bg-secondary);
    display: flex;
    justify-content: center;
    align-items: center;
}

.project-img i {
    font-size: 80px;
    color: var(--primary-color);
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-size: 1.5rem;
}

.project-info p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tech-badge {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-links .btn {
    font-size: 0.9rem;
    padding: 8px 16px;
}

/* Experience Section */
.experience {
    padding: 5rem 5%;
    background-color: var(--bg-color);
}

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

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background-color: var(--timeline-line);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 2rem;
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 2rem;
}

.timeline-icon {
    position: absolute;
    top: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    z-index: 1;
}

.timeline-item:nth-child(odd) .timeline-icon {
    right: -20px;
}

.timeline-item:nth-child(even) .timeline-icon {
    left: -20px;
}

.timeline-content {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px var(--shadow-color);
}

.timeline-content h3 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.timeline-date {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
}

.timeline-location {
    display: block;
    margin-bottom: 1rem;
    color: var(--text-lighter);
    font-style: italic;
}

.timeline-content ul {
    padding-left: 1.5rem;
}

.timeline-content li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

/* Education Section */
.education {
    padding: 5rem 5%;
    background-color: var(--bg-secondary);
}

.education-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.education-card {
    display: flex;
    background-color: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow-color);
}

.education-icon {
    background-color: var(--primary-color);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
}

.education-icon i {
    font-size: 2rem;
}

.education-info {
    padding: 1.5rem;
}

.education-info h3 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.education-info p {
    margin-bottom: 0.3rem;
    color: var(--text-light);
}

.education-date {
    display: block;
    margin-top: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
}

/* Certifications Section */
.certifications {
    padding: 5rem 5%;
    background-color: var(--bg-color);
}

.certifications-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.certification-card {
    display: flex;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow-color);
    height: 100%;
}

.certification-icon {
    background-color: var(--primary-color);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
}

.certification-icon i {
    font-size: 2rem;
}

.certification-info {
    padding: 1.5rem;
}

.certification-info h3 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-size: 1.1rem;
}

.certification-info p {
    margin-bottom: 0.3rem;
    color: var(--text-light);
}

/* Contact Section */
.contact {
    padding: 5rem 5%;
    background-color: var(--bg-secondary);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

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

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    width: 40px;
    text-align: center;
}

.contact-item h3 {
    margin-bottom: 0.3rem;
    color: var(--text-color);
}

.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

.social-links a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--social-bg);
    color: var(--text-light);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--primary-color);
    color: white;
}

.contact-form {
    background-color: var(--contact-form-bg);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px var(--shadow-color);
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    background-color: var(--bg-secondary);
    color: var(--text-color);
    transition: border-color 0.3s ease;
}

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

/* Footer */
footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 2rem 5%;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.footer-text p {
    margin-bottom: 0.5rem;
}

.footer-text i {
    color: var(--accent-color);
}

/* Success Message Styles */
.success-message {
    text-align: center;
    padding: 2rem;
}

.success-message i {
    font-size: 3rem;
    color: #2ecc71;
    margin-bottom: 1rem;
}

.success-message h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.success-message p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .hero-content h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content {
        padding-right: 0;
        margin-bottom: 2rem;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
        margin-bottom: 0.8rem;
    }
    
    .hero-content h2 {
        font-size: 1.6rem;
        margin-bottom: 1.2rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-buttons {
        margin-bottom: 1.5rem;
    }
    
    .hero-buttons .btn {
        margin: 0.5rem;
        padding: 10px 20px;
    }
    
    .profile-img {
        width: 280px;
        height: 280px;
    }
    
    .profile-img.main-photo {
        width: 300px;
        height: 300px;
    }
    
    .profile-img.rotating-photo {
        width: 240px;
        height: 240px;
    }
    
    .about-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    .about-text {
        text-align: center;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        right: 0;
        top: 70px;
        background-color: var(--bg-secondary);
        width: 100%;
        flex-direction: column;
        align-items: center;
        padding: 1rem 0;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        transform: translateY(-150%);
        transition: transform 0.5s ease;
        z-index: 999;
    }
    
    .nav-links.active {
        transform: translateY(0);
    }
    
    .nav-links li {
        margin: 0.8rem 0;
    }
    
    .burger {
        display: block;
    }
    
    .theme-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .hero {
        padding-top: 120px; /* Increased padding for smaller screens */
    }
    
    .hero-content h1 {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-content h2 {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }
    
    .hero-content p {
        font-size: 1rem;
        margin-bottom: 1.2rem;
    }
    
    .hero-buttons {
        margin-bottom: 1.2rem;
    }
    
    .hero-buttons .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .profile-img {
        width: 220px;
        height: 220px;
    }
    
    .profile-img.main-photo {
        width: 250px;
        height: 250px;
    }
    
    .profile-img.rotating-photo {
        width: 200px;
        height: 200px;
    }
    
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 60px !important;
        padding-right: 0 !important;
    }
    
    .timeline-item:nth-child(odd) .timeline-icon,
    .timeline-item:nth-child(even) .timeline-icon {
        left: 10px;
    }
    
    .education-card,
    .certification-card {
        flex-direction: column;
    }
    
    .education-icon,
    .certification-icon {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 2rem;
    }
    
    .hero {
        padding-top: 110px; /* Further increased for mobile */
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-content h2 {
        font-size: 1.2rem;
        margin-bottom: 0.8rem;
    }
    
    .hero-content p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .hero-buttons {
        margin-bottom: 1rem;
    }
    
    .hero-buttons .btn {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
    
    .profile-img {
        width: 200px;
        height: 200px;
    }
    
    .profile-img.main-photo {
        width: 220px;
        height: 220px;
    }
    
    .profile-img.rotating-photo {
        width: 180px;
        height: 180px;
    }
    
    .about-info {
        flex-direction: column;
        align-items: center;
    }
    
    .skills-container,
    .projects-container,
    .education-container,
    .certifications-container {
        grid-template-columns: 1fr;
    }
    
    .theme-btn {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
}

/* Extra small devices (phones, 400px and down) */
@media (max-width: 400px) {
    .hero {
        padding-top: 100px; /* Further increased for very small screens */
    }
    
    .hero-content h1 {
        font-size: 1.5rem;
        line-height: 1.2;
    }
    
    .hero-content h2 {
        font-size: 1rem;
    }
    
    .hero-content p {
        font-size: 0.85rem;
    }
    
    .hero-buttons .btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .profile-img {
        width: 180px;
        height: 180px;
    }
    
    .profile-img.main-photo {
        width: 180px;
        height: 180px;
    }
    
    .profile-img.rotating-photo {
        width: 160px;
        height: 160px;
    }
}