@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

html {
    width: 100%;
    background: linear-gradient(
        135deg in srgb,
        #ffffff 0%,
        #f8fafc 40%,
        #f1f5f9 100%
    );
    background-attachment: fixed;
    min-height: 100vh;
    scroll-behavior: smooth;
}

html::before {
    content: "";
    position: fixed;
    inset: 0;
    background: inherit;
    filter: blur(30px);
    opacity: 0.15;
    pointer-events: none;
    z-index: -1;
}

:root {
    --primary: #0f172a;
    --secondary: #64748b;
    --accent: #3b82f6;
    --highlight: #3b82f6;
    --surface: #ffffff;
    --background: #f8fafc;
    --border: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: transparent;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::after {
    content: "";
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 180px;
    background: linear-gradient(to bottom, transparent, #ffffff);
    pointer-events: none;
}

/* Navigation */
nav {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.navbar {
    list-style: none;
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 4rem;
}

#home {
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--primary);
    margin-right: auto;
}

#home:hover {
    background-color: #fff;
}

.navbar li a {
    display: block;
    text-decoration: none;
    color: var(--text-secondary);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.navbar li a:hover {
    background: #93c5fd33; /* highlight but subtle */
    color: var(--primary);
}

.links {
    display: flex;
    margin-left: auto;
    gap: 0.25rem;
    align-items: center;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    padding: 0.5rem;
    margin-left: auto;
    border-radius: 0.375rem;
    transition: background 0.2s ease;
}

.hamburger:hover {
    background: var(--background);
}

.hamburger span {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    margin: 2px 0;
    transition: all 0.3s ease;
    border-radius: 1px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-4px, 4px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-4px, -4px);
}

/* Hero Section */
#hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    max-width: none;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 400;
}

.cta-button {
    display: inline-block;
    padding: 0.875rem 2rem;
    background: var(--accent);
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    margin-top: 0.5rem;
}

.cta-button:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.cta-button:active {
    transform: translateY(0);
}

.hero-pretitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 400;
}

#projects {
    border-radius: 1rem;
    padding-top: 4rem;
    padding-bottom: 4rem;
    padding-left: 0;
    padding-right: 0;
}

/* Sections */
section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

section h2 {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--primary);
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 3rem;
    height: 3px;
    background: var(--highlight);
    border-radius: 1.5px;
}

/* Project Grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--highlight);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
    display: block;
}

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

.project-card-content {
    padding: 1.5rem;
}

.project-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

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

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    background: var(--background);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    font-weight: 500;
}

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

.project-links a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid var(--border);
    color: var(--text-primary);
    background: var(--background);
}

.project-links a:hover {
    background: var(--highlight);
    color: white;
    border-color: var(--highlight);
    transform: translateY(-1px);
}

/* GitHub Repos Section */
#repos {
    background: var(--surface);
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-top: 0;
}

.repo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 0 2rem 2rem 2rem;
}

.repo-card {
    padding: 1.5rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.repo-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.repo-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.repo-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.875rem;
    flex-grow: 1;
}

.repo-card a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: color 0.2s ease;
    align-self: flex-start;
    margin-top: auto;
}

.repo-card a:hover {
    color: var(--highlight);
}

/* Contact Section */
#contact {
    padding-bottom: 12rem; /* Extra padding to clear the fade */
    padding-left: 0;
    padding-right: 0;
}

#contact a {
    text-decoration: none;
    color: var(--accent);
}

.contact-content {
    display: flex;
    gap: 2rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .links {
        position: fixed;
        top: 4rem;
        left: 0;
        width: 100%;
        background: var(--surface);
        flex-direction: column;
        display: none;
        box-shadow: var(--shadow-lg);
        border-bottom: 1px solid var(--border);
        padding: 1rem 0;
    }
    
    .links.active {
        display: flex;
    }
    
    .links li {
        width: 100%;
    }
    
    .links li a {
        display: block;
        padding: 1rem 2rem;
        border-radius: 0;
        border-bottom: 1px solid var(--border);
    }
    
    .links li:last-child a {
        border-bottom: none;
    }
    
    .navbar {
        position: relative;
        padding: 0 1rem;
    }

    section {
        padding: 3rem 1rem;
    }

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

    .hero-content {
        padding: 0 1rem;
    }

    section h2 {
        font-size: 2rem;
    }

    .contact-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

}