/* ==========================================================================
   CSS Variables & Theme - Modern & Fun (Blue, White, Green)
   ========================================================================== */
:root {
    /* Colors - Professional Senior Engineer Theme */
    --color-bg: #F8FAFC; /* Clean slate background */
    --color-surface: #ffffff; /* Pure white cards */
    --color-surface-hover: #ffffff;
    
    --color-text: #0F172A; /* Deep slate for high contrast */
    --color-text-muted: #475569; /* Slate */
    
    --color-primary: #0F172A; /* Deep slate/black */
    --color-primary-light: #334155;
    --color-secondary: #2563EB; /* Professional blue accent */
    --color-secondary-light: #3B82F6;
    
    --color-border: #E2E8F0;
    
    /* Typography */
    --font-display: 'Poppins', sans-serif;
    --font-body: 'Nunito', sans-serif;
    
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 32px;
    --radius-pill: 100px;
    
    /* Fun bouncy transition */
    --transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-smooth: all 0.3s ease;
    
    --max-width: 1100px;
    --section-spacing: 80px;
    
    --shadow-soft: 0 10px 40px rgba(37, 99, 235, 0.08);
    --shadow-hover: 0 20px 50px rgba(37, 99, 235, 0.15);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--color-text);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

ul {
    list-style: none;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

.section {
    padding: var(--section-spacing) 0;
}

.section-header {
    margin-bottom: 60px;
    text-align: center;
}

.section-header h2 {
    font-size: 2.8rem;
    margin-bottom: 16px;
    color: var(--color-primary);
}

.divider {
    height: 8px;
    width: 80px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    border-radius: var(--radius-pill);
    margin: 0 auto;
}

/* ==========================================================================
   Navigation & Hamburger
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 24px 0;
    z-index: 100;
    transition: var(--transition-smooth);
    background-color: transparent;
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    padding: 16px 0;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--color-primary);
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 36px;
}

.nav-links a {
    font-family: var(--font-display);
    color: var(--color-text-muted);
    font-size: 1.05rem;
    font-weight: 700;
    position: relative;
    padding: 8px 0;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 4px;
    background-color: var(--color-secondary);
    border-radius: var(--radius-pill);
    transition: var(--transition);
}

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

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    padding-top: 160px;
    padding-bottom: 60px;
    display: flex;
    align-items: center;
}

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

.hero-headline {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
}

.hero-subheadline {
    font-size: 1.3rem;
    color: var(--color-text-muted);
    margin-bottom: 48px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 36px;
    border-radius: var(--radius-pill);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff !important;
    box-shadow: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.15);
}

.btn-secondary {
    background: #fff;
    color: var(--color-primary);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 3px solid var(--color-primary);
    padding: 13px 33px; /* Adjust for border */
}

.btn-outline:hover {
    background: var(--color-primary);
    color: #fff !important;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.2);
}

/* ==========================================================================
   About Section
   ========================================================================== */

.about-text-center {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-text-center p {
    color: var(--color-text-muted);
    margin-bottom: 24px;
    font-size: 1.15rem;
}

/* ==========================================================================
   Projects Section
   ========================================================================== */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 40px;
}

.project-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.project-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-header {
    margin-bottom: 20px;
}

.project-header h3 {
    font-size: 1.8rem;
    margin-bottom: 12px;
    color: var(--color-text);
}

.role-badge {
    display: inline-block;
    padding: 8px 16px;
    background: #E0E7FF;
    color: var(--color-primary);
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: var(--radius-pill);
}

.project-desc {
    color: var(--color-text-muted);
    margin-bottom: 24px;
    flex-grow: 1;
    font-size: 1.1rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 32px;
}

.project-tech li {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--color-secondary);
    background: #D1FAE5;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
}

.project-links a {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    color: var(--color-primary);
    padding: 10px 0;
}

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

/* ==========================================================================
   Skills Section
   ========================================================================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.skill-category {
    background: var(--color-surface);
    padding: 40px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    text-align: center;
    transition: var(--transition);
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.skill-category h3 {
    font-size: 1.5rem;
    margin-bottom: 24px;
    color: var(--color-primary);
}

.skill-category ul {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.skill-category li {
    color: var(--color-text);
    font-weight: 600;
    font-size: 1.1rem;
    padding: 8px;
    background: var(--color-bg);
    border-radius: var(--radius-sm);
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-box {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 80px 40px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.contact-box::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
}

.contact-box h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--color-primary);
}

.contact-box p {
    color: var(--color-text-muted);
    font-size: 1.2rem;
    margin-bottom: 40px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    padding: 40px 0;
    text-align: center;
    background-color: var(--color-surface);
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-content p {
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: 1rem;
}

.footer-note {
    font-size: 0.9rem !important;
    opacity: 0.7;
}

/* ==========================================================================
   Animations & Utilities
   ========================================================================== */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .hero-headline {
        font-size: 3.8rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 16px 0;
    }
    
    .navbar.scrolled {
        padding: 12px 0;
    }
    
    .nav-links {
        display: none;
    }
    
    .nav-brand {
        font-size: 1.4rem;
    }
    
    .hero-greeting {
        font-size: 1rem;
        margin-bottom: 16px;
    }
    
    .hero-headline {
        font-size: 2.6rem;
    }
    
    .hero-subheadline {
        font-size: 1.15rem;
        margin-bottom: 32px;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-header {
        margin-bottom: 40px;
    }
    
    .section-header h2 {
        font-size: 2.2rem;
    }
    
    .contact-box {
        padding: 40px 20px;
    }
    
    .contact-box h2 {
        font-size: 2rem;
    }
    
    .contact-links {
        flex-direction: column;
    }
    
    .contact-links .btn {
        width: 100%;
        padding: 14px 24px;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-content {
        text-align: center;
    }
}
