/* =========================================
   1. VARIABLES & SETUP (WARM MINIMALIST)
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Backgrounds */
    --bg-body: #fdfbf7;
    --bg-card: #ffffff;
    --bg-accent: #f2f0e9;

    /* Typography */
    --text-primary: #1c1917;
    --text-secondary: #57534e;
    --text-light: #a8a29e;

    /* Accents */
    --primary-color: #57534e;
    --primary-hover: #292524;
    --highlight: #e7e5e4;
    --accent-orange: #d97706;

    /* Layout */
    --nav-height: 80px;
    --container-max: 1150px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;

    /* Soft Shadows & Depth */
    --shadow-soft: 0 10px 40px -10px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 25px 50px -12px rgba(28, 25, 23, 0.12);

    /* Transitions */
    --transition-smooth: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    opacity: 0;
    animation: pageFadeIn 0.8s ease-out forwards;
}

@keyframes pageFadeIn {
    to {
        opacity: 1;
    }
}

/* =========================================
   2. UI COMPONENTS
   ========================================= */

/* Container */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    width: 100%;
}

/* Typography (Fluid) */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 0.75em;
    font-weight: 700;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    position: relative;
    display: inline-block;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--text-secondary);
    max-width: 650px;
}

.badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 50px;
    background: var(--bg-accent);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 32px;
    background: var(--text-primary);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: var(--transition-smooth);
    border: 2px solid var(--text-primary);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(28, 25, 23, 0.2);
}

.btn:active {
    transform: translateY(-1px);
}

.btn-outline {
    display: inline-block;
    padding: 14px 32px;
    background: transparent;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    border: 2px solid var(--text-primary);
    transition: var(--transition-smooth);
}

.btn-outline:hover {
    background: var(--bg-accent);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

/* Focus States for Accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent-orange);
    outline-offset: 4px;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 40px;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
    height: 100%;
    /* For grid strictness */
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(28, 25, 23, 0.05);
}

/* Grids */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 32px;
}

/* =========================================
   3. NAVIGATION
   ========================================= */
.navbar {
    height: var(--nav-height);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--accent-orange);
}

.nav-menu {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    font-weight: 700;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--text-primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    font-size: 1.7rem;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text-primary);
    padding: 5px;
}

/* =========================================
   4. PAGE SECTIONS
   ========================================= */
section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 72px;
}

/* Hero */
.hero {
    min-height: 90vh;
    /* Changed from 100vh to fit content better */
    display: flex;
    align-items: center;
    padding-top: 0;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 80px;
}

.hero-text {
    flex: 1;
}

/* Profile Image Update */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

.profile-img-large {
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--radius-lg);
    border: 12px solid var(--bg-accent);
    box-shadow: 20px 20px 0 #e7e5e4, var(--shadow-soft);
    transition: var(--transition-bounce);
}

.profile-img-large:hover {
    transform: scale(1.02) rotate(1deg);
    box-shadow: 25px 25px 0 var(--primary-color), var(--shadow-hover);
    border-color: #e7e5e4;
}

/* Timeline */
.timeline {
    position: relative;
    border-left: 3px solid var(--highlight);
    padding-left: 30px;
}

.timeline-item {
    margin-bottom: 50px;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -39px;
    top: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--text-primary);
    border: 4px solid var(--bg-body);
    transition: transform 0.3s ease;
}

.timeline-item:hover::before {
    transform: scale(1.2);
    background: var(--accent-orange);
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tag {
    padding: 8px 18px;
    background: var(--bg-accent);
    color: var(--text-secondary);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: 0.3s ease;
    border: 1px solid transparent;
}

.tag:hover {
    background: var(--text-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* =========================================
   5. RESPONSIVE MEDIA QUERIES
   ========================================= */
@media (max-width: 900px) {
    :root {
        --nav-height: 70px;
    }

    .container {
        padding: 0 20px;
    }

    .mobile-toggle {
        display: block;
        z-index: 1001;
        /* Above menu */
    }

    /* Mobile Menu with Premium Animation */
    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(253, 251, 247, 0.98);
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        padding: 40px;
        z-index: 1000;

        /* Hidden state */
        visibility: hidden;
        opacity: 0;
        transform: translateY(-20px);
        transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    }

    .nav-menu.active {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
    }

    .nav-link {
        font-size: 1.5rem;
    }

    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
        gap: 50px;
    }

    /* Important: Center buttons on mobile */
    .hero-text div[style*="justify-content: start"] {
        justify-content: center !important;
    }

    .profile-img-large {
        max-width: 320px;
        border-width: 8px;
        box-shadow: 15px 15px 0 #e7e5e4;
    }

    .profile-img-large:hover {
        transform: none;
        /* Disable shift on touch */
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 2rem;
    }

    .btn,
    .btn-outline {
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
    }

    .hero-text div[style*="display: flex"] {
        flex-direction: column;
        gap: 10px;
    }
}