:root {
    /* Modern dark-blue theme (more premium + standout) */
    --primary: #4F8CFF;       /* bright modern blue */
    --primary-dark: #2563EB;  /* deep blue */
    --secondary: #7C3AED;    /* optional purple accent */
    --accent: #4F8CFF;

    --dark: #071226;          /* near-black blue */
    --light: #EAF2FF;         /* crisp off-white */
    --gray: #A6B2D6;          /* muted blue-gray */

    --light-gray: rgba(234, 242, 255, 0.14);
    --success: #22C55E;

    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

body {
    font-family: 'Open Sans', sans-serif;
    background:
        radial-gradient(1200px circle at 10% 0%, rgba(79, 140, 255, 0.20), transparent 40%),
        radial-gradient(900px circle at 90% 10%, rgba(124, 58, 237, 0.14), transparent 38%),
        linear-gradient(180deg, #071226 0%, #070F1F 50%, #071226 100%);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
}

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

section {
    padding: 5rem 0;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

.btn {
    display: inline-block;
    padding: 0.9rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(67, 97, 238, 0.4);
}

.btn:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

@media (hover: none) {
    .btn:hover {
        transform: none;
        box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
    }
    
    .btn:active {
        transform: scale(0.95);
        box-shadow: 0 2px 10px rgba(67, 97, 238, 0.2);
    }
}

@keyframes popOut {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
    100% {
        transform: scale(1);
    }
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
    animation: popOut 1s ease-in-out infinite;
}

.btn-whatsapp:hover {
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
}

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

.btn-outline:hover {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

/* Header */
header {
    background: linear-gradient(135deg, #0f0f1e 0%, #1a1a2e 50%, #16213e 100%);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
}

header.scrolled {
    padding: 0.5rem 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 0;
    transition: var(--transition);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 700;
    font-size: 1.5rem;
    color: white;
    text-decoration: none;
}

.logo-img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    transition: var(--transition);
    max-width: 100%;
    height: auto;
}

.logo:hover .logo-img {
    transform: rotate(15deg);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    position: relative;
    transition: var(--transition);
}

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

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

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

.mobile-menu-btn {
    display: none;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    font-size: 1.2rem;
    color: white;
    cursor: pointer;
    transition: var(--transition);
    z-index: 1001;
    position: relative;
    padding: 0.6rem;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 10px rgba(67, 97, 238, 0.3);
}

.mobile-menu-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.4);
}

.mobile-menu-btn.active {
    background: linear-gradient(135deg, var(--accent), var(--secondary));
    box-shadow: 0 4px 15px rgba(247, 37, 133, 0.4);
}

/* Hero Section */
.hero {
    padding-top: 12rem;
    padding-bottom: 8rem;
    background:
        radial-gradient(1100px circle at 12% 10%, rgba(79, 140, 255, 0.35), transparent 45%),
        radial-gradient(950px circle at 85% 30%, rgba(124, 58, 237, 0.22), transparent 42%),
        linear-gradient(135deg, #071226 0%, #0A1633 55%, #071226 100%);
    color: var(--light);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 8s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -150px;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 10s ease-in-out infinite;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    position: relative;
    z-index: 2;
}

.hero-text {
    flex: 1;
    animation: fadeInLeft 1s ease-out;
}

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

.profile-img {
    width: 350px;
    height: 350px;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    object-fit: cover;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    border: 5px solid rgba(255, 255, 255, 0.2);
    animation: morphing 10s ease-in-out infinite;
    transition: var(--transition);
    max-width: 100%;
    height: auto;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.2rem;
    line-height: 1.2;
}

.hero h2 {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.8rem;
    font-weight: 500;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 90%;
}

.hero-btns {
    display: flex;
    gap: 1.2rem;
    margin-top: 2.5rem;
}

/* About Section */
.about {
    background:
        radial-gradient(900px circle at 15% 10%, rgba(79, 140, 255, 0.18), transparent 45%),
        linear-gradient(135deg, rgba(255,255,255,0.02) 0%, rgba(79, 140, 255, 0.06) 100%);
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
    font-size: 2.8rem;
    color: var(--light);
    position: relative;
    padding-bottom: 1.2rem;
}

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

.about-content {
    display: flex;
    align-items: center;
    gap: 5rem;
}

.about-img {
    flex: 1;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transform: perspective(1000px) rotateY(-10deg);
    transition: var(--transition);
}

.about-img:hover {
    transform: perspective(1000px) rotateY(0);
}

.about-img img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.8s ease;
    max-width: 100%;
    object-fit: cover;
}

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

.about-text {
    flex: 1;
}

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

.about-text p {
    margin-bottom: 1.8rem;
    color: rgba(167, 176, 192, 0.95);
    line-height: 1.8;
}

/* Skills Section */
.skills {
    background:
        radial-gradient(900px circle at 15% 20%, rgba(59, 130, 246, 0.22), transparent 45%),
        linear-gradient(135deg, rgba(255,255,255,0.02) 0%, rgba(59,130,246,0.10) 100%);
}

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

.skill-card {
    background-color: rgba(10, 22, 51, 0.55);
    border: 1px solid rgba(79, 140, 255, 0.22);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    transition: var(--transition);
}

.skill-card:hover::before {
    width: 100%;
    opacity: 0.05;
}

.skill-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.skill-card:active {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

@media (hover: none) {
    .skill-card:hover {
        transform: none;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    }
    
    .skill-card:active {
        transform: scale(0.98);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    }
}

.skill-icon {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 1.8rem;
    transition: var(--transition);
}

.skill-card:hover .skill-icon {
    transform: scale(1.2) rotate(10deg);
    color: var(--secondary);
}

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

.skill-card ul {
    list-style-type: none;
    text-align: left;
}

.skill-card li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: rgba(167, 176, 192, 0.95);
    transition: var(--transition);
}

.skill-card:hover li {
    color: var(--light);
}

.skill-card i {
    color: var(--primary);
    transition: var(--transition);
    text-shadow: 0 10px 30px rgba(79, 140, 255, 0.25);
}

.skill-card:hover i {
    color: var(--secondary);
    transform: scale(1.2);
}

/* Projects Section - Deterministic Equal-Size Cards (3/2/1 grid) */
.projects {
    background:
        radial-gradient(900px circle at 80% 30%, rgba(59, 130, 246, 0.22), transparent 45%),
        linear-gradient(135deg, rgba(255,255,255,0.02) 0%, rgba(59,130,246,0.10) 100%);
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: stretch;
    justify-content: center;
}

/* Card styling */
.project-card {
    justify-self: stretch;
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(230, 234, 242, 0.10);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    position: relative;
    backdrop-filter: blur(10px);

    height: 520px;
    display: flex;
    flex-direction: column;
}

/* Deterministic inner layout */
.project-info {
    padding: 1.8rem;
    position: relative;
    z-index: 2;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

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

.project-tech {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.8rem;
    letter-spacing: 0.5px;
}

.project-info p {
    flex: 1 1 auto;
    margin-bottom: 1.5rem;
    color: rgba(167, 176, 192, 0.95);
    line-height: 1.5;
    /* Clamp so content cannot expand the card */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-links {
    display: flex;
    gap: 1.2rem;
    margin-top: auto; /* pin links to bottom of fixed-height card */
    flex-shrink: 0;
}


.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.7));
    opacity: 0;
    transition: var(--transition);
    z-index: 1;
}

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

.project-card:hover {
    /* keep layout stable (no scale that changes perceived size/spacing) */
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}


.project-card:active {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

/* Responsive grid columns (3 desktop / 2 tablet / 1 mobile) */
@media (max-width: 992px) {
    .projects-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .projects-container {
        grid-template-columns: 1fr;
    }
}


@media (hover: none) {
    .project-card:hover {
        transform: none;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    }

    /* Prevent touch interactions from scaling the card and changing perceived layout */
    .project-card:active {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    }
}

.project-img {
    height: 220px;
    overflow: hidden;
    flex-shrink: 0;
}

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

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

/* Contact Section */
.contact {
    background:
        radial-gradient(900px circle at 20% 20%, rgba(59, 130, 246, 0.20), transparent 45%),
        linear-gradient(135deg, rgba(255,255,255,0.02) 0%, rgba(59,130,246,0.10) 100%);
    text-align: center;
}

.contact-container {
    max-width: 700px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.contact-item {
    display: flex;
    flex-direction: row;
    align-items:flex;
    gap: 1.5rem;
    transition: var(--transition);
}

.contact-item:hover {
    transform: translateX(10px);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 10px 20px rgba(67, 97, 238, 0.3);
}

.contact-details h4 {
    margin-bottom: 0.5rem;
    color: var(--light);
    font-size: 1.2rem;
}

.contact-details p, .contact-details a {
    color: var(--gray);
    text-decoration: none;
    transition: var(--transition);
}

.contact-details a:hover {
    color: var(--primary);
}

.whatsapp-container {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(230, 234, 242, 0.10);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.whatsapp-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.whatsapp-container h3 {
    margin-bottom: 1.5rem;
    color: var(--light);
}

.whatsapp-container p {
    margin-bottom: 2rem;
    color: rgba(167, 176, 192, 0.95);
}

/* Professional Footer */
footer {
    background: linear-gradient(135deg, #0f0f1e 0%, #1a1a2e 50%, #16213e 100%);
    color: white;
    padding: 0;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

.footer-top {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    padding: 3rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-main {
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-brand .logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: white;
    margin-bottom: 1rem;
}

.footer-brand .logo-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    transition: var(--transition);
}

.footer-brand .logo:hover .logo-img {
    transform: rotate(15deg) scale(1.1);
    border-color: var(--secondary);
}

.footer-brand .logo span {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
}

.footer-description {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    max-width: 400px;
}

.footer-section h3 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 1px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-links li {
    transition: var(--transition);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.footer-links a i {
    font-size: 0.9rem;
    opacity: 0;
    transition: var(--transition);
}

.footer-links a:hover i {
    opacity: 1;
}

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

.social-links a {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.social-links a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: var(--transition);
    z-index: -1;
}

.social-links a:hover::before {
    width: 100%;
    height: 100%;
}

.social-links a:hover {
    color: white;
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 20px rgba(67, 97, 238, 0.3);
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin: 0;
}

.footer-bottom-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

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

@keyframes shimmer {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 1;
    }
}

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

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

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

@keyframes morphing {
    0% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
    25% {
        border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%;
    }
    50% {
        border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%;
    }
    75% {
        border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%;
    }
    100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
}

/* Enhanced Responsive Design */
/* Extra Large Desktop (1200px+) */
@media (min-width: 1201px) {
    .container {
        max-width: 1200px;
        padding: 0 2rem;
    }
}

/* Large Desktop (992px - 1200px) */
@media (max-width: 1200px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .hero-content, .about-content {
        gap: 3rem;
    }
    
    .hero-text h1 {
        font-size: 3.5rem;
    }
    
    .hero-text h2 {
        font-size: 2rem;
    }
}

/* Desktop/Tablet (768px - 992px) */
@media (max-width: 992px) {
    .hero-content, .about-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-text h1 {
        font-size: 2.8rem;
    }
    
    .hero-text h2 {
        font-size: 1.5rem;
    }
    
    .hero-btns {
        justify-content: center;
        gap: 1rem;
    }
    
    .skills-container {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 2rem;
    }
    
    .projects-container {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Tablet (576px - 768px) */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero-content {
        padding: 2rem 0;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .hero-text h2 {
        font-size: 1.3rem;
    }
    
    .hero-text p {
        font-size: 1rem;
    }
    
    .hero-btns {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .skills-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .projects-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

/* Mobile (480px - 576px) */
@media (max-width: 576px) {
    .container {
        padding: 0 0.8rem;
    }
    
    header {
        padding: 0.8rem 0;
    }
    
    .nav-links {
        width: 90%;
        max-width: 280px;
        padding: 5rem 1.5rem 2rem;
        gap: 1rem;
    }
    
    .nav-links a {
        font-size: 1rem;
        padding: 0.8rem 1.5rem;
        min-width: 180px;
    }
    
    .mobile-menu-btn {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
    
    .hero-content {
        padding: 1.5rem 0;
    }
    
    .hero-text h1 {
        font-size: 2.2rem;
    }
    
    .hero-text h2 {
        font-size: 1.2rem;
    }
    
    .hero-text p {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    .hero-image {
        margin-top: 2rem;
    }
    
    .hero-image img {
        width: 200px;
        height: 200px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 0.6rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 992px) {
    .hero-content, .about-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-btns {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .hero p {
        max-width: 100%;
    }
    
    .about-img {
        max-width: 500px;
        margin: 0 auto;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .hero h2 {
        font-size: 1.8rem;
    }
    
    .skills-container {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .nav-container {
        position: relative;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        width: 250px;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 249, 250, 0.98));
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        gap: 0;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
        backdrop-filter: blur(10px);
        border-radius: 12px;
        padding: 1rem 0;
        margin-top: 0.5rem;
        z-index: 1000;
        border: 1px solid rgba(67, 97, 238, 0.1);
        overflow: hidden;
        transform: translateY(-10px);
        opacity: 0;
        transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }
    
    .nav-links.active {
        display: flex;
        transform: translateY(0);
        opacity: 1;
    }
    
    .nav-links a {
        font-size: 1rem;
        font-weight: 500;
        color: var(--dark);
        padding: 0.8rem 1.5rem;
        text-align: left;
        border-bottom: 1px solid rgba(67, 97, 238, 0.1);
        transition: var(--transition);
        position: relative;
        overflow: hidden;
    }
    
    .nav-links a:last-child {
        border-bottom: none;
    }
    
    .nav-links a::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        width: 3px;
        height: 100%;
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        transform: scaleY(0);
        transition: transform 0.3s ease;
    }
    
    .nav-links a:hover {
        background: linear-gradient(90deg, rgba(67, 97, 238, 0.1), rgba(67, 97, 238, 0.05));
        color: var(--primary);
        padding-left: 2rem;
    }
    
    .nav-links a:hover::before {
        transform: scaleY(1);
    }
    
    .nav-links a::after {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero {
        padding-top: 8rem;
        padding-bottom: 4rem;
    }
    
    .hero h1 {
        font-size: 2.2rem;
        line-height: 1.3;
    }

    .hero h2 {
        font-size: 1.4rem;
    }
    
    .hero p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .profile-img {
        width: 220px;
        height: 220px;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 3rem;
    }
    
    .hero-btns {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .btn {
        width: 200px;
        text-align: center;
    }
    
    .about-content {
        gap: 3rem;
    }
    
    .about-text h3 {
        font-size: 1.6rem;
    }
    
    .about-text p {
        font-size: 0.95rem;
    }
    
    .skills-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .skill-card {
        padding: 2rem;
    }
    
    .skill-icon {
        font-size: 3rem;
    }
    
    /* Grid handles layout now; do not force flex-direction/stacking */
    .projects-container {
        grid-template-columns: 1fr;
        justify-content: center;
    }

    .project-card {
        width: 100%;
        height: 520px;
        min-height: 520px;
        max-height: 520px;
    }

    .project-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .project-links .btn {
        width: 100%;
    }

    .contact-info {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
        align-items: center;
        width: 100%;
        max-width: 300px;
    }
    
    .contact-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .whatsapp-container {
        padding: 2rem;
        margin-top: 2rem;
    }
    
    .social-links {
        gap: 1.2rem;
    }
    
    .social-links a {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}

/* Footer Responsive Design */
@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .footer-top {
        padding: 2rem 0;
    }
    
    .footer-main {
        padding: 3rem 0 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-brand {
        text-align: center;
        align-items: center;
    }
    
    .footer-brand .logo {
        justify-content: center;
    }
    
    .footer-description {
        max-width: 100%;
    }
    
    .footer-section h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-bottom-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .footer-top {
        padding: 1.5rem 0;
    }
    
    .footer-main {
        padding: 2rem 0 1rem;
    }
    
    .social-links a {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}
