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

:root {
    /* Tech & Futuristic (Dark Mode) */
    --dark: #0F172A;            /* base background */
    --darker: #0B1220;          /* section contrast */
    --surface: #111827;         /* cards/nav surfaces */
    --text: #E5E7EB;            /* primary text */
    --text-muted: #94A3B8;      /* secondary text */

    /* Accents */
    --primary: #22D3EE;         /* neon cyan */
    --primary-dark: #0EA5B7;    /* darker cyan */
    --accent-green: #01c16a;    /* bright green */
    --accent-purple: #6049ea;   /* electric purple */
    --gradient: linear-gradient(135deg, #22D3EE 0%, #6049ea 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--text);
    overflow-x: hidden;
    background: var(--dark);
}

/* Ensure anchored sections are fully visible below fixed navbar */
section {
    scroll-margin-top: 90px;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem 5%;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 20px rgba(0,0,0,0.35);
}

nav.scrolled {
    padding: 0.5rem 5%;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    background: var(--gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: float 3s ease-in-out infinite;
}

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

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

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

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

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

/* Active section link */
.nav-links a.active {
    color: var(--primary);
}
.nav-links a.active::after {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5%;
    background: linear-gradient(135deg, #0F172A 0%, #111827 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,144C960,149,1056,139,1152,128C1248,117,1344,107,1392,101.3L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
}

.hero-content {
    text-align: center;
    color: white;
    z-index: 1;
    animation: fadeInUp 1s ease;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    margin-bottom: 1rem;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero .subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

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

.btn-primary {
    background: var(--primary);
    color: #081A1F;
    box-shadow: 0 10px 30px rgba(34,211,238,0.25);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(34,211,238,0.35);
}

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

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

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

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

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

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

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

.about-text {
    color: var(--text-muted);
    line-height: 1.8;
}

.about-image {
    position: relative;
    animation: float 6s ease-in-out infinite;
    max-width: 320px;
    margin: 0 auto;
}

.about-image img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--primary);
    box-shadow:
        0 0 0 6px rgba(34, 211, 238, 0.15),  /* outer soft ring */
        0 0 40px rgba(34, 211, 238, 0.35),  /* cyan glow */
        0 10px 40px rgba(0, 0, 0, 0.4);      /* depth shadow */
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.skill-tag {
    padding: 0.5rem 1rem;
    background: var(--gradient);
    color: white;
    border-radius: 25px;
    font-size: 0.9rem;
    animation: fadeIn 0.5s ease;
}

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

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

.project-card {
    background: var(--surface);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.35);
    transition: all 0.3s ease;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.project-image {
    width: 100%;
    height: 260px;
    background: var(--gradient);
    position: relative;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-image::after {
    content: '🚀';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    opacity: 0.5;
}

.project-image.has-img::after {
    content: none;
}

.project-info {
    padding: 1.5rem;
}

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

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

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

.tech-tag {
    padding: 0.25rem 0.75rem;
    background: rgba(34, 211, 238, 0.12);
    color: var(--primary);
    border-radius: 15px;
    font-size: 0.85rem;
}

/* Project links */
.project-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.btn-small {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    border-radius: 9999px;
}

/* Timeline (Education & Experience) */
.education,
.experience {
    padding: 5rem 5%;
    background: var(--dark);
}

.timeline {
    position: relative;
    margin: 2rem 0;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, rgba(34,211,238,0.0), rgba(34,211,238,0.6), rgba(34,211,238,0.0));
}

.timeline-item {
    position: relative;
    margin: 0 0 2rem 0;
}

.timeline-dot {
    position: absolute;
    left: 0;
    top: 0.35rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 6px rgba(34,211,238,0.12), 0 0 18px rgba(34,211,238,0.45);
}

.timeline-content {
    margin-left: 2rem;
    background: var(--surface);
    border-radius: 16px;
    padding: 1rem 1.25rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

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

.timeline-meta {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.timeline-list {
    margin: 0.5rem 0 0 1.2rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .timeline {
        padding-left: 1.25rem;
    }
    .timeline::before {
        left: 8px;
    }
    .timeline-dot {
        left: -3px;
    }
    .timeline-content {
        margin-left: 1.5rem;
    }
}

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

.contact-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-form {
    margin-top: 2rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #1f2937;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #0B1220;
    color: var(--text);
}

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

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.social-link {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: translateY(-5px) rotate(360deg);
}

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

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Scroll animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 200px;
    }
    
    /* Slightly smaller project images on mobile */
    .project-image {
        height: 200px;
    }
    
    /* Adjust anchor offset for smaller navbar on mobile */
    section {
        scroll-margin-top: 80px;
    }
}

/* Extra large screens: make project images a bit taller */
@media (min-width: 1200px) {
    .project-image {
        height: 300px;
    }
}
