/* GLOBAL STYLES */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --primary-bg: #abc4ff; /* Periwinkle Blue */
    --text-color: #0d1b3e; /* Deep Navy */
    --accent-color: #d93f2c; /* Burnt Orange */
    --white: #ffffff;
    --border-line: #555;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--text-color);
}

ul {
    list-style: none;
}

/* =========================================
   AUTOMATIC RESPONSIVE HEADER
   ========================================= */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background-color: var(--primary-bg);
    flex-wrap: wrap; /* This allows items to stack automatically */
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
}

nav ul {
    display: flex;
    gap: 30px;
    flex-wrap: wrap; /* Allows links to wrap if screen is narrow */
}

nav ul li a {
    font-weight: 500;
    transition: 0.3s;
    font-size: 1rem;
}

nav ul li a:hover, nav ul li a.active {
    color: var(--accent-color);
}

.cta-btn {
    background-color: var(--text-color);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 0.9rem;
    white-space: nowrap; /* Keeps button text on one line */
}

/* HERO SECTION */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 50px 5%;
    min-height: 80vh;
    flex-wrap: wrap; /* Enables stacking */
}

.hero-text {
    flex: 1 1 400px; /* Grow, Shrink, Basis: Stacks if narrower than 400px */
    padding-right: 50px;
}

.hero-text h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-image {
    flex: 1 1 400px;
    height: 500px;
    background-color: rgba(255,255,255,0.2);
    border-radius: 10px;
    margin-top: 20px;
    background-size: cover;
    background-position: center;
}

/* BUTTONS */
.main-btn {
    background-color: var(--accent-color);
    color: var(--white);
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 600;
    display: inline-block;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
}

/* SECTIONS (Experience, About, Contact) */
.container {
    padding: 60px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 40px;
}

/* AUTOMATIC GRID */
.experience-grid {
    display: grid;
    /* Automatically fits columns based on available width (min 300px) */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* CARDS */
.detail-card {
    background: rgba(255, 255, 255, 0.4);
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    border-left: 5px solid var(--accent-color);
}

/* FORM */
.contact-wrapper {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    flex-wrap: wrap; /* Stacks on mobile */
}

.contact-form {
    flex: 1 1 100%; /* Takes full width on mobile */
    max-width: 600px;
}

input, textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-line);
    padding: 10px 0;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    outline: none;
    color: var(--text-color);
}

/* FOOTER */
footer {
    padding: 40px 5%;
    font-size: 0.9rem;
    border-top: 1px solid rgba(0,0,0,0.05);
}

/* =========================================
   MEDIA QUERIES (Fine Tuning)
   ========================================= */

@media (max-width: 900px) {
    /* Tablet & Mobile: Stack Header Elements */
    header {
        justify-content: center;
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    nav ul {
        justify-content: center;
        gap: 15px;
    }

    .hero-text h1 {
        font-size: 2.8rem; /* Smaller font for mobile */
    }

    .hero-text {
        padding-right: 0;
        text-align: center;
    }
    
    .hero-image {
        height: 300px; /* Shorter image on mobile */
    }
    
    /* Center the button in Hero on mobile */
    .hero-text a.main-btn {
        margin: 0 auto; 
    }
}

@media (max-width: 480px) {
    /* Small Phone adjustments */
    nav ul {
        gap: 10px;
        font-size: 0.9rem;
    }
    
    .logo {
        margin-bottom: 10px;
    }

    .section-title {
        font-size: 2rem;
    }
}