/* Modern Lightweight CSS Framework - Mobile First
 * Total size: ~8KB - Optimized for GitHub Pages
 * Color Scheme: Professional Blue/Gray with excellent contrast
 */

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

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #64748b;
    --accent: #0ea5e9;
    --bg-main: #ffffff;
    --bg-surface: #f8fafc;
    --bg-card: #ffffff;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-lg: rgba(0, 0, 0, 0.15);
    --success: #10b981;
    --warning: #f59e0b;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-main);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

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

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

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

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

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

/* Container & Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.container-narrow {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Modern Navigation */
.nav {
    background: var(--bg-card);
    box-shadow: 0 1px 3px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--secondary);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-btn:hover, .nav-btn.active {
    background: var(--bg-surface);
    color: var(--primary);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.hero-profile {
    width: 150px;
    height: 150px;
    border-radius: 80%;
    border: 4px solid white;
    margin: 0 auto 1.5rem;
    object-fit: cover;
    object-position: center 20%;
    box-shadow: 0 4px 6px var(--shadow-lg);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border-radius: 0.5rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.btn:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

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

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.card:hover {
    box-shadow: 0 4px 12px var(--shadow-lg);
    transform: translateY(-4px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.card-subtitle {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.card-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--bg-surface);
    color: var(--secondary);
    border-radius: 1rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-primary {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

/* Grid System */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

/* Sections */
.section {
    padding: 3rem 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 50%;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.section-subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Icon List */
.icon-list {
    list-style: none;
}

.icon-list li {
    padding: 0.5rem 0;
    display: flex;
    align-items: start;
    gap: 0.75rem;
}

.icon-list i {
    color: var(--primary);
    font-size: 1.1rem;
    margin-top: 0.25rem;
}

/* Timeline (for Teaching/Experience) */
.timeline-item {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 2rem;
    border-left: 2px solid var(--border);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
}

.timeline-date {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--bg-surface);
    color: var(--secondary);
    border-radius: 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Contact Cards */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.contact-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px var(--shadow-lg);
}

.contact-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.contact-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.contact-card p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--bg-surface);
    border-radius: 50%;
    color: var(--secondary);
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-4px);
}

/* Footer */
.footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
}

.footer p {
    color: var(--text-light);
    margin: 0;
    font-size: 0.9rem;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-muted { color: var(--text-light); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* Responsive Design */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    .hero h1 { font-size: 2.25rem; }
    
    .nav-content {
        justify-content: center;
    }
    
    .nav-links {
        justify-content: center;
        width: 100%;
    }
    
    .nav-btn {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    .hero {
        padding: 3rem 0;
    }
    
    .timeline-item {
        padding-left: 1.5rem;
    }
    
    .card {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
    }
    
    h1 { font-size: 1.75rem; }
    .hero h1 { font-size: 2rem; }
    
    .hero-profile {
        width: 120px;
        height: 120px;
    }
    
    .container, .container-narrow {
        padding: 0 0.75rem;
    }
    
    .nav-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
    }
}

/* Print Styles */
@media print {
    .nav, .footer { display: none; }
    .card { box-shadow: none; border: 1px solid var(--border); }
    a { text-decoration: underline; }
}
