:root {
    --bg-dark: #030712;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.1);
    --primary: #6366f1;
    --secondary: #0ea5e9;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #8b5cf6;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

img {
    max-width: 100%;
    height: auto;
}

* {
    overflow-wrap: break-word;
}

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

/* Glassmorphism utility */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
}

/* Navbar */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: all 0.3s ease;
}

nav.scrolled {
    background: rgba(3, 7, 18, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a span {
    position: relative;
    z-index: 1;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.65, 0.05, 0.36, 1);
}

.nav-links a:hover {
    color: var(--text-primary);
    transform: translateY(-1px);
}

.nav-links a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.hero-content h1 span {
    background: linear-gradient(to right, var(--primary), var(--secondary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
}

.image-container {
    width: 100%;
    height: 100%;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    overflow: hidden;
    animation: morph 8s ease-in-out infinite;
    border: 4px solid var(--primary);
}

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

@keyframes morph {
    0% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }

    50% {
        border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
    }

    100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
}

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

.btn-primary {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 10px 20px -10px var(--primary);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 30px -10px var(--primary);
}

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

.btn-outline:hover {
    background: var(--card-bg);
    border-color: var(--primary);
    transform: translateY(-3px);
}

.hero-btns {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

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

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    justify-content: center;
}

@media (max-width: 1024px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 426px) {
    .skills-grid {
        grid-template-columns: 1fr !important;
    }
}

.skill-card {
    padding: 2.5rem;
    text-align: left;
    transition: all 0.3s ease;
    height: 100%;
}

.skill-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-5px);
    border-color: var(--primary);
}

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

.project-card {
    overflow: hidden;
    transition: all 0.3s ease;
}

.project-image {
    width: 100%;
    height: 250px;
    background: #1e293b;
    position: relative;
    overflow: hidden;
}

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

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

.project-info {
    padding: 2rem;
}

.project-info h3 {
    margin-bottom: 0.5rem;
}

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

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

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

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
}

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

/* About Section Grid */
.about-container {
    padding: 3rem;
    margin-top: 2rem;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: start;
}

.feature-item {
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateX(5px);
}

.about-highlights {
    transition: all 0.3s ease;
}

.about-highlights:hover {
    box-shadow: 0 10px 30px -10px var(--primary);
}

@media (max-width: 992px) {
    .about-container {
        padding: 2rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 480px) {
    .about-container {
        padding: 1.5rem;
    }
}

/* Contact Info Styles */
.contact-whatsapp-card {
    padding: 3rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.whatsapp-icon-wrapper {
    width: 80px;
    height: 80px;
    background: rgba(37, 211, 102, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #25D366;
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
}

.whatsapp-btn {
    background: #25D366;
    color: white;
    border: none;
    padding: 1.2rem 2.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border-radius: 100px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px -5px rgba(37, 211, 102, 0.4);
}

.whatsapp-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -5px rgba(37, 211, 102, 0.5);
}

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

.contact-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.contact-icon-wrapper {
    width: 50px;
    height: 50px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
}

.contact-icon-wrapper.secondary {
    background: rgba(14, 165, 233, 0.1);
    color: var(--secondary);
}

.contact-icon-wrapper.accent {
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent);
}

.contact-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.2rem;
}

.contact-value {
    font-weight: 600;
}

.contact-card:hover {
    transform: translateX(10px);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--card-border);
}

/* Contact Section Alignment */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: stretch;
}

@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .contact-whatsapp-card {
        padding: 2rem;
        width: 100%;
    }

    .whatsapp-btn {
        padding: 1rem 1.5rem;
        /* Reduce padding to fit screen */
        width: auto;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .contact-whatsapp-card {
        padding: 1.5rem 1rem;
    }

    .whatsapp-btn {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }

    .contact-card {
        padding: 1rem;
        gap: 0.8rem;
    }

    .contact-value {
        font-size: 0.85rem;
        /* Ensure long emails don't break */
        word-break: break-all;
    }
}

.social-icon {
    width: 45px;
    height: 45px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px -5px var(--primary);
}

.section-glow {
    position: relative;
}

.section-glow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

/* Form Status Alerts */
.status-alert {
    padding: 1rem;
    border-radius: 12px;
    margin-top: 1.5rem;
    font-size: 0.95rem;
    display: none;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.status-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.status-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.status-loading {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--text-secondary);
}

/* Footer */
footer {
    padding: 3rem 0;
    border-top: 1px solid var(--card-border);
    text-align: center;
    color: var(--text-secondary);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .menu-toggle {
        display: block !important;
        color: var(--text-primary);
        font-size: 1.8rem;
        padding: 0.5rem;
        margin-right: -0.5rem;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--bg-dark);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.4s cubic-bezier(0.65, 0.05, 0.36, 1);
        gap: 2.5rem;
        padding: 2rem;
        z-index: 2000;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.5rem;
        width: 100%;
        text-align: center;
    }

    /* Hero Section */
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-content h1 {
        font-size: 2.8rem;
        word-wrap: break-word;
    }

    .hero-btns {
        justify-content: center;
        gap: 0.8rem;
        flex-wrap: wrap;
        margin-top: 1rem;
    }

    .hero-btns .btn {
        width: auto;
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    .hero-content p {
        margin: 0 auto 2.5rem auto;
        font-size: 1.1rem;
    }

    .hero-image {
        max-width: 300px;
        margin: 0 auto;
    }

    /* Sections Padding */
    section {
        padding: 60px 0;
        overflow: hidden;
        /* Prevent child overflow */
    }

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

    .section-glow::before {
        width: 300px;
        height: 300px;
    }

    /* Grids Refinement */
    .skill-card {
        padding: 1.2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .timeline-item {
        padding-left: 2rem;
    }

    .contact-social-card {
        padding: 1.5rem;
        margin-top: 0.5rem;
    }

    .social-links {
        gap: 0.8rem !important;
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2.2rem;
    }

    .container {
        padding: 0 1rem;
    }

    .about-container {
        padding: 1.2rem;
    }

    .contact-whatsapp-card {
        padding: 1.5rem;
    }

    .social-links {
        gap: 0.5rem !important;
    }

    .social-icon {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
}