:root {
    --primary: #0891b2;
    --primary-dark: #0e7490;
    --primary-light: #22d3ee;
    --secondary: #f1f5f9;
    --dark: #0f172a;
    --light: #ffffff;
    --gray: #64748b;
    --gray-light: #e2e8f0;
    --border-radius: 0.5rem;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--light);
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

section {
    padding: 5rem 0;
}

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

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-header p {
    max-width: 800px;
    margin: 0 auto;
    color: var(--gray);
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
}

.btn {
    display: inline-block;
    padding: .75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary);
    color: #fff;
    border: none;
}

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

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

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

.btn-full {
    width: 100%;
}

/* Header - REMOVED sticky positioning */
header {
    background-color: var(--light);
    border-bottom: 1px solid var(--gray-light);
    position: relative; /* Changed from sticky */
    width: 100%;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
    flex-wrap: wrap;
}

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

nav ul {
    display: flex;
    gap: 1rem;
}

nav ul li a {
    font-size: .9rem;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
}

nav ul li a:hover {
    color: var(--primary);
    background-color: var(--secondary);
}

.hero {
    background: linear-gradient(to bottom, #ecfeff, white);
    padding: 4rem 0;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: .5rem;
}

.hero-text h2 {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 1rem;
}

.hero-text p {
    font-size: 1.1rem;
    color: var(--gray);
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-image img {
    border-radius: 50%;
    border: 4px solid var(--primary);
    margin: 0 auto;
    max-width: 300px;
}

.about-content {
    display: block;
}

.about-info {
    display: grid;
    gap: 1.5rem;
}

.info-item h3 {
    font-size: 1.25rem;
    margin-bottom: .5rem;
    color: var(--dark);
}

.info-item p {
    color: var(--gray);
    line-height: 1.6;
}

.skills {
    background-color: var(--secondary);
}

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

.card {
    background-color: #fff;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.badge {
    background-color: var(--primary);
    color: #fff;
    padding: .25rem .75rem;
    border-radius: 9999px;
    font-size: .8rem;
    font-weight: 500;
}

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

.project-card {
    background-color: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.project-image img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    cursor: zoom-in;
}

.project-image img:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: -3px;
}

.image-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.86);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    z-index: 2000;
}

.image-lightbox.open {
    display: flex;
}

.image-lightbox img {
    max-width: min(1280px, 96vw);
    max-height: 90vh;
    border-radius: 0.65rem;
    box-shadow: 0 24px 45px rgba(0, 0, 0, 0.35);
    object-fit: contain;
    background: #fff;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    font-size: 1.25rem;
    margin-bottom: .25rem;
    color: var(--dark);
}

.project-content h4 {
    font-size: 1rem;
    font-weight: 400;
    color: var(--gray);
    margin-bottom: 1rem;
}

.project-content p {
    font-size: .9rem;
    color: var(--gray);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.tag {
    border: 1px solid var(--gray-light);
    padding: .25rem .75rem;
    border-radius: 9999px;
    font-size: .8rem;
    color: var(--gray);
}

.contact {
    background: linear-gradient(180deg, #e7edf1 0%, #dde5eb 100%);
    padding: 5.5rem 0 4.5rem;
}

.contact .section-header {
    margin-bottom: 2.8rem;
}

.contact .section-header h2 {
    margin-bottom: 1.1rem;
    font-size: 3rem;
    letter-spacing: -0.02em;
}

.contact .section-header p {
    max-width: 680px;
    font-size: 1.2rem;
    line-height: 1.55;
    margin-bottom: 0.5rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: stretch;
}

.contact .card {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 0.8rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.1);
    padding: 1.8rem;
}

.contact .card h3 {
    margin-bottom: 1.35rem;
    font-size: 1.4rem;
    line-height: 1.25;
}

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

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

.contact-item i {
    color: var(--primary);
    font-size: 1.25rem;
    width: 20px;
}

.contact-item a, .contact-item p {
    color: var(--gray);
    font-size: 1.02rem;
    transition: color 0.3s ease;
}

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

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

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

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

.contact-form {
    display: grid;
    gap: 1.5rem;
}

.form-group {
    display: grid;
    gap: .5rem;
}

.form-group label {
    font-size: .95rem;
    font-weight: 500;
    color: var(--dark);
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: .85rem .95rem;
    border: 1px solid var(--gray-light);
    border-radius: 0.75rem;
    font-family: inherit;
    font-size: .95rem;
    background: #f8fafc;
    transition: border-color 0.3s ease;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}

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

.contact .btn-primary {
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
}

.fade-in {
    animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

footer {
    background-color: #fff;
    border-top: 1px solid var(--gray-light);
    padding: 1.5rem 0;
    box-shadow: 0 -1px 0 rgba(15, 23, 42, 0.04);
}

.footer-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    text-align: left;
}

.footer-content p {
    font-size: .9rem;
    color: var(--gray);
    line-height: 1.5;
}

.footer-social {
    display: flex;
    gap: 1.35rem;
}

.footer-social a {
    color: var(--gray);
    font-size: .95rem;
    font-weight: 500;
    transition: color 0.25s ease;
}

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

/* Mobile-First Responsive Design */
@media (max-width: 767px) {
    .container {
        padding: 0 1rem;
    }
    
    section {
        padding: 3rem 0;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .hero {
        padding: 3rem 0;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .hero-text h2 {
        font-size: 1.1rem;
    }
    
    .navbar {
        flex-direction: column;
        height: auto;
        padding: 1rem 0;
        gap: 1rem;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    nav ul li {
        margin-left: 0;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .card {
        padding: 1rem;
    }

    .contact {
        padding: 3.5rem 0 3rem;
    }

    .contact .section-header {
        margin-bottom: 2.5rem;
    }

    .contact .section-header h2 {
        font-size: 2.2rem;
    }

    .contact .section-header p {
        font-size: 1.05rem;
        margin-bottom: 0.35rem;
    }
    
    .project-content {
        padding: 1rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (min-width: 400px) {
    .hero-buttons {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .hero-buttons .btn {
        flex: 1;
        min-width: 140px;
    }
}

@media (min-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr 400px;
    }
    
    .about-info {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .navbar {
        flex-direction: row;
    }
    
    nav ul {
        gap: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr 500px;
    }
    
    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-text h1 {
        font-size: 3.5rem;
    }
    
    .hero-text h2 {
        font-size: 1.5rem;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .hero-text h1 {
        font-size: 1.75rem;
    }
    
    .section-header h2 {
        font-size: 1.75rem;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}
