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

html {
    scroll-behavior: smooth;
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-dark);
    overflow-x: hidden;
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

html {
    overflow-x: hidden;
    width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Color Variables */
:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #06b6d4;
    --text-dark: #e2e8f0;
    --text-light: #94a3b8;
    --background-light: #1e293b;
    --background-dark: #0f172a;
    --white: #ffffff;
    --card-bg: #334155;
    --border-light: #475569;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-dark);
}

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

/* Gradient Text */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    text-align: center;
    min-height: 44px; /* Touch-friendly minimum height */
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

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

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

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.navbar.scrolled {
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
}

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

.nav-logo a {
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

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

/* Mobile Navigation */
.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    padding: 100px 0 50px;
    background: var(--background-dark);
    position: relative;
    overflow: hidden;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: 80vh;
    position: relative;
    z-index: 1;
}

.hero-content {
    animation: slideInLeft 1s ease-out;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.hero-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--card-bg);
    color: var(--text-dark);
    border-radius: 50%;
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

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

.hero-image {
    display: flex;
    justify-content: center;
    animation: slideInRight 1s ease-out;
}

.hero-img-container {
    position: relative;
    width: 300px;
    height: 300px;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
    border: 4px solid var(--white);
    transition: transform 0.4s ease;
}

.hero-img-container:hover .hero-img {
    transform: scale(1.1);
}

.hero-img-container::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    z-index: -1;
    animation: rotate 20s linear infinite;
    transition: all 0.4s ease;
}

.hero-img-container:hover::before {
    top: -60px;
    left: -60px;
    right: -60px;
    bottom: -60px;
    box-shadow: 0 0 80px rgba(99, 102, 241, 0.8),
                0 0 120px rgba(139, 92, 246, 0.6),
                0 0 160px rgba(99, 102, 241, 0.4);
}

/* Section Styles */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    text-align: center;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    text-align: center;
}

/* About Section */
.about {
    padding: 100px 0;
    background: var(--background-dark);
}

.about-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.about-text {
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.about-image {
    display: none;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
}

/* Overlapping Tilted Stats Cards */
.about-stats {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-radius: 0 !important;
    flex-wrap: wrap;
    padding: 2rem 0;
}

.stat {
    position: relative;
    width: 180px;
    height: 200px;
    background: rgba(255, 255, 255, 0.074);
    border: 1px solid rgba(255, 255, 255, 0.222);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    border-radius: 0.7rem;
    overflow: visible;
    transform: rotate(calc(var(--r) * 1deg));
    margin: 0 -20px;
    z-index: 1;
}

.stat:hover {
    transform: rotate(0deg) translateY(-15px) scale(1.05);
    border: 1px solid rgba(255, 255, 255, 0.454);
    box-shadow: 0px 0px 20px 1px rgba(99, 102, 241, 0.4);
    z-index: 10;
}

.stat::before {
    content: attr(data-text);
    position: absolute;
    bottom: 12px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.stat h4 {
    font-size: 2.2rem;
    color: #fff;
    margin-bottom: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.about-text .btn {
    margin: 1rem auto 0 auto;
    display: inline-flex;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
}

/* Skills Section */
.skills {
    padding: 100px 0;
    background: var(--background-dark);
}

.skills-grid {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    max-width: 100%;
    width: 100%;
}

.skill-category {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

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

.skill-category h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    text-align: center;
    width: 100%;
}

.skills-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    width: 100%;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--background-dark);
    border-radius: 8px;
    transition: all 0.3s ease;
    justify-content: flex-start;
}

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

.skill-item i {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.skill-item:hover i {
    color: var(--white);
}

/* Projects Section */
.projects {
    padding: 100px 0;
    background: var(--background-dark);
}

.projects-more {
    text-align: center;
    margin-top: 3rem;
    width: 100%;
    display: flex;
    justify-content: center;
}

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

@supports not (grid-template-columns: repeat(auto-fit, minmax(320px, 1fr))) {
    .projects-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 2rem;
    }
    
    .project-card {
        flex: 1 1 320px;
    }
}

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

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.project-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(99, 102, 241, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

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

.project-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--card-bg);
    color: var(--white);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.project-link:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: scale(1.1);
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.project-content p {
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    padding: 0.25rem 0.75rem;
    background: var(--background-dark);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.projects-more {
    text-align: center;
}

/* Contact Section */
.contact {
    padding: 100px 0;
    background: var(--background-dark);
    overflow-x: hidden;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
    width: 100%;
    max-width: 100%;
}

.contact-info {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
    text-align: left;
}

.contact-info p {
    margin-bottom: 2rem;
    line-height: 1.6;
    text-align: left;
}

.contact-items {
    margin-bottom: 2rem;
    width: 100%;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: var(--shadow);
    width: 100%;
}

.contact-item div {
    flex: 1;
    text-align: left;
}

.contact-item h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--text-dark);
    text-align: left;
}

.contact-item p {
    color: var(--text-light);
    margin: 0;
    text-align: left;
}

.contact-item i {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border-radius: 50%;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    width: 100%;
}

.contact-form {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.form-group {
    margin-bottom: 1.5rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.form-group input,
.form-group textarea {
    width: 100%;
    max-width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--background-dark);
    color: var(--text-dark);
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

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

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    max-width: 100%;
}

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

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-text p {
    margin: 0;
}

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

.footer-links a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transform: translateY(100px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

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

/* Responsive Design */

/* Tablet and Small Desktop (max-width: 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }

    .hero-container {
        gap: 3rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    .about-stats {
        gap: 1.5rem;
        margin: 0 -10px; /* Reduce overlap on tablet */
    }

    .stat {
        width: 130px;
        height: 130px;
        margin: 0 -10px; /* Less overlap on tablet */
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet (max-width: 768px) */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    /* Navigation */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--background-light);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 2rem 0;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 0.5rem 0;
    }

    .nav-link {
        padding: 1rem;
        font-size: 1.1rem;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Hero Section */
    .hero {
        padding: 80px 0 40px;
        min-height: auto;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
        min-height: auto;
        padding-top: 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 1.3rem;
    }

    .hero-description {
        font-size: 1rem;
        max-width: 100%;
    }

    .hero-buttons {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        align-items: center;
    }

    .hero-social {
        justify-content: center;
    }

    .hero-img-container {
        width: 250px;
        height: 250px;
        margin: 0 auto;
    }

    /* Reduce glow expansion on tablet for better performance */
    .hero-img-container:hover::before {
        top: -40px;
        left: -40px;
        right: -40px;
        bottom: -40px;
        box-shadow: 0 0 60px rgba(99, 102, 241, 0.7),
                    0 0 90px rgba(139, 92, 246, 0.5);
    }

    /* Sections */
    section {
        padding: 60px 0;
    }

    .about,
    .skills,
    .projects,
    .contact {
        padding: 60px 0;
    }

    .section-header {
        margin-bottom: 3rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    /* About Section */
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .about-text h3 {
        font-size: 1.5rem;
    }

    .about-text p {
        font-size: 1rem;
    }

    .about-stats {
        flex-wrap: wrap;
        gap: 1.25rem;
        justify-content: center;
    }
    
    .stat {
        width: 120px;
        height: 120px;
        margin: 0 -5px; /* Minimal overlap on mobile */
        transform: rotate(0deg) !important; /* Remove rotation on mobile for better readability */
    }

    .stat h4 {
        font-size: 1.8rem;
        margin-bottom: 1.2rem;
    }

    /* Skills Section */
    .skills-grid {
        width: 100%;
        padding: 0 1rem;
    }

    .skill-category {
        max-width: 100%;
        padding: 1.5rem;
    }

    .skills-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .skill-item {
        padding: 0.6rem;
        font-size: 0.9rem;
    }

    /* Projects Section */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-content h3 {
        font-size: 1.2rem;
    }

    .project-content p {
        font-size: 0.9rem;
    }

    /* Contact Section */
    .contact {
        padding: 50px 0;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .form-group input,
    .form-group textarea {
        font-size: 0.95rem;
        padding: 0.9rem;
    }

    .contact-info h3 {
        font-size: 1.5rem;
        text-align: center;
    }

    .contact-info p {
        text-align: center;
    }

    .contact-info {
        align-items: center;
    }

    /* Footer */
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
    }

    /* Back to Top */
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 1.5rem;
        right: 1.5rem;
    }
}

/* Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    /* Hero Section */
    .hero {
        padding: 70px 0 30px;
    }

    .hero-title {
        font-size: 1.8rem;
        line-height: 1.2;
    }

    .hero-description {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
        align-items: center;
        justify-content: center;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .hero-img-container {
        width: 200px;
        height: 200px;
    }

    /* Sections */
    section {
        padding: 50px 0;
    }

    .about,
    .skills,
    .projects,
    .contact {
        padding: 50px 0;
    }

    .section-header {
        margin-bottom: 2rem;
        text-align: center;
    }

    .section-title {
        font-size: 1.75rem;
        text-align: center;
    }

    .section-subtitle {
        font-size: 0.95rem;
        text-align: center;
    }

    /* Navigation */
    .navbar {
        padding: 0.75rem 0;
    }

    .nav-container {
        padding: 0 15px;
    }

    .nav-logo a {
        font-size: 1.3rem;
    }

    .nav-menu {
        top: 60px;
        max-height: calc(100vh - 60px);
    }

    /* About Section */
    .about-text h3 {
        font-size: 1.3rem;
    }

    .about-text p {
        font-size: 0.95rem;
    }

    .about-stats {
        flex-direction: row;
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .stat {
        width: 110px;
        height: 110px;
        margin: 0; /* No overlap on small mobile */
        transform: rotate(0deg) !important; /* No rotation on small mobile */
    }

    .stat h4 {
        font-size: 1.6rem;
        margin-bottom: 1rem;
    }

    /* Skills Section */
    .skill-category {
        padding: 1.5rem;
    }

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

    .skills-list {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .skill-item {
        padding: 0.6rem;
        font-size: 0.85rem;
    }

    .skill-item i {
        font-size: 1rem;
    }

    /* Contact Section */
    .contact {
        padding: 40px 0;
    }

    .contact-content {
        padding: 0;
    }

    .contact-form {
        padding: 1.25rem;
    }

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

    .form-group input,
    .form-group textarea {
        padding: 0.85rem;
        font-size: 0.9rem;
    }

    .contact-info h3 {
        font-size: 1.4rem;
    }

    .contact-info p {
        font-size: 0.9rem;
    }

    /* Projects Section */
    .project-card {
        margin: 0;
    }

    .project-image {
        height: 180px;
    }

    .project-content {
        padding: 1.25rem;
    }

    .project-content h3 {
        font-size: 1.1rem;
    }

    .project-content p {
        font-size: 0.875rem;
        line-height: 1.6;
    }

    .tech-tag {
        padding: 0.2rem 0.6rem;
        font-size: 0.75rem;
    }

    .project-link {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    /* Contact Section */
    .contact-info h3 {
        font-size: 1.3rem;
    }

    .contact-info p {
        font-size: 0.95rem;
    }

    .contact-item {
        padding: 0.875rem;
        flex-direction: row;
        align-items: flex-start;
    }

    .contact-item i {
        width: 35px;
        height: 35px;
        font-size: 1rem;
        flex-shrink: 0;
    }

    .contact-item h4 {
        font-size: 0.9rem;
    }

    .contact-item p {
        font-size: 0.85rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

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

    .form-group input,
    .form-group textarea {
        padding: 0.875rem;
        font-size: 0.95rem;
    }

    .form-group textarea {
        min-height: 100px;
    }

    /* Buttons */
    .btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }

    .btn-primary,
    .btn-secondary,
    .btn-outline {
        width: 100%;
        justify-content: center;
    }

    /* Footer */
    .footer {
        padding: 1.5rem 0;
    }

    .footer-text p {
        font-size: 0.85rem;
    }

    .footer-links {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .footer-links a {
        padding: 0.5rem 0;
    }

    /* Back to Top */
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 1rem;
        right: 1rem;
        font-size: 1rem;
    }

    /* Social Links */
    .social-links {
        justify-content: center;
        gap: 0.75rem;
    }

    .social-link {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    /* Prevent horizontal scroll */
    body {
        overflow-x: hidden;
    }

    .hero-container,
    .about-content,
    .skills-grid,
    .projects-grid,
    .contact-content {
        width: 100%;
        max-width: 100%;
    }
}

/* Extra Small Mobile (max-width: 360px) */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.6rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .hero-img-container {
        width: 180px;
        height: 180px;
    }

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

    .skill-item {
        font-size: 0.8rem;
    }

    .project-content h3 {
        font-size: 1rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .back-to-top {
        display: none;
    }
    
    .hero {
        padding-top: 2rem;
    }
    
    * {
        box-shadow: none !important;
    }
}

/* Sliding Text Animations */
@keyframes slideOut {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(-100%);
        opacity: 0;
    }
}

@keyframes slideIn {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}
