/* =================================
   Isaac Qi's Academic Landing Page - CSS
   ================================= */

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

/* CSS Custom Properties */
:root {
    /* Primary Colors */
    --parchment: #f4f1e8;
    --old-paper: #e8e0d0;
    --aged-ivory: #f0ead6;
    --sepia: #d4c4a0;
    
    --oxford-blue: #1a1f2e;
    --midnight-navy: #0f1419;
    --charcoal: #2c2c2c;
    --slate-gray: #4a4a4a;
    --pewter: #6d6d6d;
    
    /* Accent Colors */
    --burgundy: #722f37;
    --deep-forest: #2d4a3a;
    --burnt-amber: #cc8500;
    --copper: #b07850;
    --gold-leaf: #d4af37;
    
    /* Text Colors */
    --text-primary: #2c2c2c;
    --text-secondary: #4a4a4a;
    --text-muted: #6d6d6d;
    --text-light: #f4f1e8;
    
    /* Typography */
    --font-serif: 'EB Garamond', 'Crimson Text', Georgia, serif;
    --font-sans: 'Crimson Text', 'Times New Roman', serif;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-xxl: 4rem;
    
    /* Layout */
    --max-width: 1200px;
    --container-padding: 2rem;
    --border-radius: 0.25rem;
    
    /* Shadows */
    --shadow-light: 0 2px 4px rgba(44, 44, 44, 0.1);
    --shadow-medium: 0 4px 12px rgba(44, 44, 44, 0.15);
    --shadow-heavy: 0 8px 24px rgba(44, 44, 44, 0.2);
}

/* Base Typography */
body {
    font-family: var(--font-serif);
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--parchment);
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(210, 180, 140, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 69, 19, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(160, 82, 45, 0.03) 0%, transparent 50%);
    min-height: 100vh;
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: var(--space-sm);
    color: var(--oxford-blue);
}

h1 { font-size: 2.5rem; margin-bottom: var(--space-md); }
h2 { font-size: 2rem; margin-bottom: var(--space-md); }
h3 { font-size: 1.5rem; margin-bottom: var(--space-sm); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--space-sm);
    color: var(--text-secondary);
}

a {
    color: var(--burgundy);
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

a:hover {
    color: var(--oxford-blue);
    border-bottom-color: var(--burgundy);
}

/* Header Styles */
.site-header {
    padding: var(--space-xl) 0 var(--space-lg);
    border-bottom: 2px solid var(--old-paper);
    margin-bottom: var(--space-xl);
    background: linear-gradient(135deg, var(--aged-ivory) 0%, var(--parchment) 100%);
    box-shadow: var(--shadow-light);
}

.header-content {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.site-title {
    font-size: 3rem;
    font-weight: 600;
    color: var(--oxford-blue);
    margin-bottom: var(--space-xs);
    text-shadow: 0 2px 4px rgba(26, 31, 46, 0.1);
    letter-spacing: 0.02em;
}

/* Navigation */
.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-lg);
}

.main-nav a {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 1px solid transparent;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--oxford-blue);
    background: var(--old-paper);
    border-color: var(--sepia);
    box-shadow: var(--shadow-light);
}

/* Special styling for dashboard link */
.dashboard-link {
    background: var(--oxford-blue) !important;
    color: var(--text-light) !important;
    border-color: var(--oxford-blue) !important;
    font-weight: 600 !important;
}

.dashboard-link:hover {
    background: var(--midnight-navy) !important;
    color: var(--text-light) !important;
    border-color: var(--midnight-navy) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium) !important;
}

/* Main Content */
.main-content {
    margin-bottom: var(--space-xxl);
}

/* Section Styles */
section {
    margin-bottom: var(--space-xxl);
}

/* Intro Section */
.intro-section {
    background: var(--aged-ivory);
    padding: var(--space-xl);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    border-left: 4px solid var(--burgundy);
    position: relative;
}

.intro-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--sepia), transparent);
}

.intro-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.intro-text:last-child {
    margin-bottom: 0;
}

.dashboard-inline-link {
    color: var(--oxford-blue);
    font-weight: 600;
    border-bottom: 2px solid var(--oxford-blue);
    padding-bottom: 1px;
}

.dashboard-inline-link:hover {
    color: var(--midnight-navy);
    border-bottom-color: var(--midnight-navy);
}

/* Focus Grid */
.current-focus h3 {
    text-align: center;
    margin-bottom: var(--space-lg);
    color: var(--oxford-blue);
    position: relative;
}

.current-focus h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: var(--gold-leaf);
}

.focus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.focus-card {
    background: white;
    padding: var(--space-lg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    border-top: 3px solid var(--deep-forest);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.focus-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(45, 74, 58, 0.02) 0%, transparent 50%);
    border-radius: var(--border-radius);
    pointer-events: none;
}

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

.focus-card h4 {
    color: var(--oxford-blue);
    margin-bottom: var(--space-sm);
    font-size: 1.2rem;
}

.focus-card p {
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.submission-status {
    margin-top: var(--space-md);
    text-align: right;
}

.status-badge {
    display: inline-block;
    background: none;
    color: var(--text-muted);
    padding: 0;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0.02em;
    font-style: italic;
    border: none;
    box-shadow: none;
}

/* Research Interests Section */
.research-interests h3 {
    text-align: center;
    margin-bottom: var(--space-lg);
    color: var(--oxford-blue);
    position: relative;
}

.research-interests h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: var(--gold-leaf);
}

.interests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.interest-card {
    background: white;
    padding: var(--space-lg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    border-top: 3px solid var(--burgundy);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.interest-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(114, 47, 55, 0.05), transparent);
    transition: left 0.5s ease;
}

.interest-card:hover::before {
    left: 100%;
}

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

.interest-card h4 {
    color: var(--oxford-blue);
    margin-bottom: var(--space-sm);
}

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

/* Footer */
.site-footer {
    background: var(--oxford-blue);
    color: var(--text-light);
    text-align: center;
    padding: var(--space-xl) 0;
    margin-top: var(--space-xxl);
    border-top: 3px solid var(--gold-leaf);
}

.site-footer p {
    color: var(--old-paper);
    margin-bottom: var(--space-xs);
}

.motto {
    font-style: italic;
    font-size: 0.9rem;
    color: var(--sepia);
    letter-spacing: 0.1em;
    margin-bottom: 0 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --container-padding: 1rem;
        --space-xl: 2rem;
        --space-xxl: 2.5rem;
    }
    
    .site-title {
        font-size: 2.2rem;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: var(--space-sm);
        align-items: center;
    }
    
    .focus-grid,
    .interests-grid {
        grid-template-columns: 1fr;
    }
    
    .intro-section {
        padding: var(--space-lg);
    }
    
    .study-summary-pocket {
        min-width: auto;
        width: calc(100% - 2rem);
        max-width: 400px;
        margin: 0 auto;
        padding: var(--space-md) var(--space-lg);
        gap: var(--space-md);
        border-radius: 30px;
        box-sizing: border-box;
    }
    
    .metric-value {
        font-size: 1.8rem;
    }
    
    .metric-label {
        font-size: 0.8rem;
    }
    
    .summary-divider {
        height: 30px;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 1.8rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }
    h3 { font-size: 1.3rem; }
    
    .intro-section {
        padding: var(--space-md);
    }
    
    .focus-card,
    .interest-card {
        padding: var(--space-md);
    }
    
    .study-summary-pocket {
        flex-direction: column;
        gap: var(--space-sm);
        padding: var(--space-lg);
        border-radius: 25px;
        width: calc(100% - 1rem);
        margin: 0 auto;
        box-sizing: border-box;
    }
    
    .summary-divider {
        width: 40px;
        height: 1px;
        background: linear-gradient(to right, transparent, var(--copper), transparent);
    }
    
    .metric-value {
        font-size: 1.6rem;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--old-paper);
}

::-webkit-scrollbar-thumb {
    background: var(--sepia);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--pewter);
}

/* Selection Styling */
::selection {
    background: rgba(114, 47, 55, 0.2);
    color: var(--oxford-blue);
}

/* Progress Bar Styles */
.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--old-paper);
    border-radius: 4px;
    overflow: hidden;
    margin-top: var(--space-xs);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--deep-forest), var(--copper));
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    min-width: 40px;
    margin-top: 0.25rem;
    display: block;
}

/* Study Summary Pocket Watch Design */
.current-week h2 {
    text-align: center;
    margin-bottom: var(--space-lg);
    color: var(--oxford-blue);
    position: relative;
}

.current-week h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: var(--gold-leaf);
}

.study-summary-container {
    display: flex;
    justify-content: center;
    margin: var(--space-xl) 0;
}

.study-summary-pocket {
    background: linear-gradient(145deg, var(--aged-ivory), var(--old-paper));
    border: 3px solid var(--copper);
    border-radius: 50px;
    padding: var(--space-lg) var(--space-xl);
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    box-shadow: 
        var(--shadow-heavy),
        inset 0 1px 3px rgba(212, 175, 55, 0.3);
    position: relative;
    min-width: 500px;
    justify-content: space-around;
}

.study-summary-pocket::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 16px;
    background: var(--copper);
    border-radius: 10px 10px 0 0;
    box-shadow: inset 0 -2px 4px rgba(0,0,0,0.2);
}

.study-summary-pocket::after {
    content: '';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: var(--gold-leaf);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.summary-metric {
    text-align: center;
    flex: 1;
}

.metric-value {
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--oxford-blue);
    font-family: var(--font-serif);
    margin-bottom: 0.25rem;
    text-shadow: 0 1px 2px rgba(26, 31, 46, 0.1);
}

.hrs-unit {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-muted);
    opacity: 0.8;
}

.metric-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

.summary-divider {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, var(--copper), transparent);
    flex-shrink: 0;
}

.last-updated {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: var(--space-md);
    opacity: 0.8;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Print styles */
@media print {
    .site-header,
    .site-footer {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .intro-section,
    .current-focus,
    .research-interests {
        break-inside: avoid;
    }
}
