/* ============================================
   MICHELLE YIN WEBSITE - GLOBAL STYLES
   Design System Implementation
   ============================================ */

/* === CSS RESET === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* === ROOT VARIABLES === */
:root {
    /* Color Palette */
    --primary-accent: #6C87A7;
    --accent-hover: #5a6f8a;
    --text-main: #2E2E2E;
    --text-secondary: #4A4A4A;
    --bg-main: #F2F2F2;
    --bg-soft: #EAECEE;
    --card-bg: #FFFFFF;
    --border-color: #DDDDDD;

    /* Typography */
    --font-heading: 'Libre Baskerville', Georgia, serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;

    /* Spacing */
    --max-width: 1200px;
    --content-max-width: 900px;
    --section-padding: 1.5rem 1.5rem;
    --card-radius: 10px;
    --button-radius: 50px;

    /* Shadows */
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    --card-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* === BASE STYLES === */
body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    font-size: 16px;
}

/* === TYPOGRAPHY === */
h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 1.3;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
}

h3 {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
}

p {
    line-height: 1.7;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    color: var(--primary-accent);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* === NAVIGATION === */
nav {
    background-color: var(--card-bg);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    justify-content: center;
}

.nav-brand {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--text-main);
    font-weight: 600;
    margin-right: auto;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    padding-bottom: 0.25rem;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-accent);
    border-bottom-color: var(--primary-accent);
    text-decoration: none;
}

/* === LAYOUT CONTAINERS === */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--section-padding);
}

.section {
    margin-bottom: 4rem;
}

/* === HERO SECTION === */
.hero {
    background-color: var(--bg-soft);
    text-align: center;
    padding: 3rem 2rem 2.5rem 2rem;
}

.hero h1 {
    font-size: 2.5rem;
    color: var(--text-main);
    margin-bottom: 0.75rem;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* === BUTTONS === */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: var(--button-radius);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-accent);
    color: white;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 135, 167, 0.3);
}

.btn-secondary {
    background-color: var(--card-bg);
    color: var(--primary-accent);
    border: 2px solid var(--primary-accent);
}

.btn-secondary:hover {
    background-color: var(--primary-accent);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
}

.button-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* === CARDS === */
.card {
    background-color: var(--card-bg);
    border-radius: var(--card-radius);
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

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

.card h3 {
    color: var(--primary-accent);
    margin-bottom: 1rem;
}

.card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.card-link {
    color: var(--primary-accent);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.card-link:hover {
    color: var(--accent-hover);
}

/* === PILL CARDS === */
.pill-card {
    background-color: var(--card-bg);
    border-radius: 50px;
    padding: 1.25rem 1.75rem;
    box-shadow: var(--card-shadow);
    text-align: center;
    transition: all 0.3s ease;
}

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

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

.pill-card p {
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* === GRID LAYOUTS === */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* === NARROWER CONTENT SECTIONS === */
.content-narrow {
    max-width: var(--content-max-width);
    margin: 0 auto;
}

/* === NEWS ITEM === */
.news-item {
    background-color: var(--card-bg);
    border-radius: var(--card-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-accent);
}

.news-item:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateX(4px);
}

.news-item h3 {
    color: var(--primary-accent);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.news-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    font-style: italic;
}

.news-item p {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

/* === CONTENT BLOCKS === */
.content-block {
    background-color: var(--bg-soft);
    padding: 2rem 1.5rem;
    border-radius: var(--card-radius);
    margin-bottom: 2rem;
}

.content-block h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
}

/* === LISTS === */
ul, ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* === SECTION HEADERS === */
.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    color: var(--text-main);
    font-size: 1.75rem;
}

.section-header p {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.05rem;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 900px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    /* Navigation */
    .nav-container {
        justify-content: center;
    }

    .nav-brand {
        margin-right: 0;
        width: 100%;
        text-align: center;
        margin-bottom: 1rem;
    }

    .nav-links {
        gap: 1rem;
        justify-content: center;
    }

    /* Typography */
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    /* Grids become single column */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    /* Container padding */
    .container {
        padding: 2rem 1.5rem;
    }

    .hero {
        padding: 3rem 1.5rem;
    }

    /* Buttons */
    .button-group {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
}

/* === ACCESSIBILITY === */
:focus {
    outline: 2px solid var(--primary-accent);
    outline-offset: 2px;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* === ANIMATIONS === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* === UTILITY CLASSES === */
.text-center {
    text-align: center;
}

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
