/* ===== IMPORT GOOGLE FONT (MUST BE FIRST) ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

/* ===== BOX SIZING FIX ===== */
* {
    box-sizing: border-box;
}

/* ===== BODY STYLES ===== */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 40px;
    line-height: 1.6;
    color: #1a1a1a;
    background: #ffffff;
    background: linear-gradient(145deg, #ffffff 0%, #f8f8f8 100%);
    animation: pageFade 0.6s ease;
}

@keyframes pageFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== HEADER STYLES ===== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 20px 0;
    margin-bottom: 40px;
    border-bottom: 1px solid #eaeaea;
}

/* Only ONE h1 rule for header */
header h1 {
    font-size: 1.5rem;
    font-weight: 500;
    margin: 0;
    color: #333;
    transition: all 0.3s;
}

header h1:hover {
    color: #0066cc;
    transform: scale(1.05);
}

/* ===== NAVIGATION STYLES ===== */
nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

nav ul li {
    margin-right: 35px;
}

nav ul li:last-child {
    margin-right: 0;
}

nav a {
    text-decoration: none;
    color: #666;
    transition: all 0.3s;
    position: relative;
    display: inline-block;
}

nav a:hover {
    animation: gentleJump 0.4s ease;
}

@keyframes gentleJump {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #0066cc;
    transition: width 0.3s;
}

nav a:hover::after {
    width: 100%;
}

/* ===== PAGE HEADINGS (ONLY ONE h1 RULE FOR PAGE TITLE) ===== */
.page-title {
    font-size: 2.5rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    color: #222;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

/* ===== SECTION HEADINGS ===== */
h2 {
    font-size: 1.8rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    color: #222;
    border-bottom: 2px solid #0066cc;
    padding-bottom: 8px;
    margin-top: 30px;
    text-transform: uppercase;
}

h3 {
    font-size: 1.2rem;
    font-weight: 500;
    color: #333;
    margin: 20px 0 10px;
}

/* ===== PARAGRAPHS ===== */
p {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    color: #444;
}

/* ===== LINKS ===== */
a {
    color: #0066cc;
    text-decoration: underline;
    transition: color 0.3s;
}

a:hover {
    color: #004499;
}

/* ===== CLASS SELECTOR (WITH FALLBACK) ===== */
.highlight {
    background-color: #f0f7ff;
    background-color: rgba(0, 102, 204, 0.1);
    font-weight: bold;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    color: #0066cc;
}

/* ===== ID SELECTOR (WITH FALLBACKS) ===== */
#intro {
    background: #ffffff;
    background: rgba(255, 255, 255, 0.95);
    padding: 35px;
    border-radius: 16px;
    border: 1px solid #e8e8e8;
    border: 1px solid rgba(0, 102, 204, 0.05);
    margin: 30px 0;
    box-shadow: 0 10px 30px -15px rgba(0, 102, 204, 0.08);
    transition: all 0.4s;
}

#intro:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 35px -15px rgba(0, 102, 204, 0.2);
}

/* ===== SECTION STYLES (WITH FALLBACKS) ===== */
section {
    background: #ffffff;
    background: rgba(255, 255, 255, 0.95);
    padding: 35px;
    border-radius: 16px;
    border: 1px solid #e8e8e8;
    border: 1px solid rgba(0, 102, 204, 0.05);
    margin: 30px 0;
    transition: all 0.4s;
    box-shadow: 0 10px 30px -15px rgba(0, 102, 204, 0.08);
}

section:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 40px -15px rgba(0, 102, 204, 0.25);
}

/* ===== LIST STYLES ===== */
ul {
    list-style-type: disc;
    list-style-position: inside;
    margin: 10px 0;
    padding-left: 20px;
}

ol {
    list-style-type: decimal;
    list-style-position: inside;
    margin: 10px 0;
    padding-left: 20px;
}

li {
    margin-bottom: 8px;
    color: #444;
    transition: all 0.3s;
}

li:hover {
    color: #0066cc;
    transform: translateX(5px);
}

/* ===== DEFINITION LIST STYLES ===== */
dl {
    margin: 15px 0;
}

dt {
    font-weight: 600;
    color: #444;
    margin-top: 18px;
    transition: color 0.3s;
}

dt:hover {
    color: #0066cc;
}

dd {
    margin-left: 20px;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 12px;
    padding-left: 15px;
    border-left: 2px solid #f0f0f0;
    transition: all 0.3s;
}

dd:hover {
    border-left-color: #0066cc;
    padding-left: 20px;
}

/* ===== FOOTER STYLES ===== */
footer {
    margin-top: 60px;
    padding: 30px 0 20px;
    border-top: 1px solid #eaeaea;
    display: flex;
    justify-content: space-between;
    color: #999;
}

footer a {
    color: #999;
    text-decoration: none;
}

footer a:hover {
    color: #0066cc;
}

/* ===== MAIN CONTENT ===== */
main {
    width: 90vw;
    max-width: 1100px;
    margin: 0 auto;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    
    header {
        flex-direction: column;
        text-align: center;
    }
    
    header h1 {
        margin-bottom: 15px;
    }
    
    nav ul li {
        margin-right: 20px;
    }
    
    nav ul li:last-child {
        margin-right: 0;
    }
    
    footer {
        flex-direction: column;
        text-align: center;
    }
    
    footer p {
        margin-bottom: 10px;
    }
    
    section, #intro {
        padding: 25px;
    }
}