/* George Yang Portfolio - Modern Design System */

/* ============================================
   COLOR SYSTEM
   ============================================ */
:root {
    /* Background Colors */
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-surface: #f1f3f5;

    /* Border Colors */
    --border-primary: #3350b4;
    --border-secondary: #5c7cfa;
    --border-light: #e9ecef;

    /* Text Colors */
    --text-primary: #212529;
    --text-secondary: #495057;
    --text-muted: #868e96;

    /* Accent Colors */
    --accent-primary: #3350b4;
    --accent-secondary: #4c6ef5;
    --accent-success: #51cf66;
    --accent-info: #339af0;
    --accent-warning: #f59f00;
    --accent-danger: #f03e3e;

    /* Shadows */
    --shadow-sm: 0 2px 10px rgba(51, 80, 180, 0.05);
    --shadow-md: 0 4px 20px rgba(51, 80, 180, 0.1);
    --shadow-lg: 0 6px 30px rgba(51, 80, 180, 0.15);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #3350b4 0%, #5c7cfa 100%);
    --gradient-secondary: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 2.5rem;
    --space-xxl: 3rem;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 50%;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ============================================
   BASE STYLES
   ============================================ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 16px;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.main-header {
    background: var(--bg-secondary);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-base);
}

.main-header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.header-top {
    padding: var(--space-sm) 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title-section h1 {
    color: var(--accent-primary);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    letter-spacing: -0.5px;
}

.header-title-section .subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Navigation */
.nav-container {
    background: rgba(245, 247, 250, 1);
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.nav-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(0, 0, 0, 0.05);
}

.nav-items {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: flex;
    align-items: center;
    gap: 0;
    position: relative;
}

.nav-indicator {
    position: absolute;
    bottom: 0;
    height: 3px;
    width: 0;
    left: 0;
    background: var(--accent-primary);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.nav-item {
    flex: 1;
    text-align: center;
    padding: 0.8rem 0.5rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.9rem;
    color: var(--text-secondary);
    position: relative;
    white-space: nowrap;
    text-decoration: none;
}

.nav-item:hover {
    color: var(--accent-primary);
    background: rgba(51, 80, 180, 0.05);
}

.nav-item.active {
    font-weight: 600;
    color: var(--accent-primary);
    background: rgba(51, 80, 180, 0.08);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: var(--space-xxl) 0;
    position: relative;
}

.hero-name {
    font-size: 4rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-sm);
    letter-spacing: -2px;
}

.hero-tagline {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    font-weight: 500;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto var(--space-xl) auto;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all var(--transition-base);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

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

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

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

/* ============================================
   SECTION STYLES
   ============================================ */
.content-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.content-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: var(--gradient-primary);
}

.section-header {
    margin-bottom: var(--space-lg);
    padding-left: var(--space-sm);
}

.section-title {
    color: var(--accent-primary);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* ============================================
   TIMELINE COMPONENT
   ============================================ */
.timeline {
    position: relative;
    padding-left: var(--space-lg);
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-light);
}

.timeline-item {
    position: relative;
    padding-bottom: var(--space-xl);
    padding-left: var(--space-lg);
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -10px;
    top: 5px;
    width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    background: var(--accent-primary);
    border: 4px solid var(--bg-secondary);
    box-shadow: 0 0 0 4px var(--border-light);
}

.timeline-date {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(51, 80, 180, 0.1);
    color: var(--accent-primary);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.timeline-company {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.timeline-role {
    font-size: 1.1rem;
    color: var(--accent-primary);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.timeline-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-sm);
}

.timeline-description ul {
    margin-left: var(--space-md);
    margin-top: var(--space-xs);
}

.timeline-description li {
    margin-bottom: var(--space-xs);
}

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-top: var(--space-sm);
}

.tag {
    padding: 0.3rem 0.8rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ============================================
   PROJECT GRID
   ============================================ */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--space-lg);
}

.project-card {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: all var(--transition-base);
    cursor: pointer;
}

.project-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
    border-color: var(--accent-primary);
}

.project-image {
    width: 100%;
    height: 200px;
    background: var(--gradient-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.project-content {
    padding: var(--space-md);
}

.project-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-sm);
}

.project-links {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.project-link {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    transition: all var(--transition-fast);
}

.project-link:hover {
    background: var(--accent-primary);
    color: white;
}

/* ============================================
   SKILLS GRID
   ============================================ */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
}

.skill-category {
    background: var(--bg-surface);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.skill-category-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.skill-list {
    list-style: none;
}

.skill-item {
    margin-bottom: var(--space-md);
}

.skill-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.skill-level {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.skill-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    transition: width var(--transition-slow);
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.contact-card {
    background: var(--bg-surface);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    text-align: center;
    transition: all var(--transition-base);
    text-decoration: none;
    color: inherit;
    display: block;
}

.contact-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
    transform: translateY(-3px);
}

.contact-icon {
    font-size: 2rem;
    color: var(--accent-primary);
    margin-bottom: var(--space-sm);
}

.contact-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.contact-value {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============================================
   FOOTER
   ============================================ */
.main-footer {
    background: var(--bg-secondary);
    padding: var(--space-xl) var(--space-lg);
    margin-top: var(--space-xxl);
    border-top: 1px solid var(--border-light);
    text-align: center;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

.mb-sm {
    margin-bottom: var(--space-sm);
}

.mb-md {
    margin-bottom: var(--space-md);
}

.mb-lg {
    margin-bottom: var(--space-lg);
}

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

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

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }

    .header-title-section h1 {
        font-size: 1.5rem;
    }

    .nav-item {
        font-size: 0.8rem;
        padding: 0.7rem 0.3rem;
    }

    .hero-name {
        font-size: 3rem;
    }

    .hero-tagline {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .content-section {
        padding: var(--space-lg);
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .skills-container {
        grid-template-columns: 1fr;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .header-wrapper,
    .nav-items,
    .main-content {
        padding: 0 var(--space-sm);
    }

    .nav-item {
        font-size: 0.7rem;
        padding: 0.6rem 0.2rem;
    }

    .hero-section {
        min-height: 60vh;
        padding: var(--space-lg) 0;
    }

    .hero-name {
        font-size: 2.5rem;
    }

    .hero-tagline {
        font-size: 1rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
    }

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

    .content-section {
        padding: var(--space-md);
    }

    .section-title {
        font-size: 1.4rem;
    }

    .timeline {
        padding-left: var(--space-sm);
    }

    .timeline-item {
        padding-left: var(--space-md);
    }
}

.contact-icon svg {
    width: 40px;
    height: 40px;
    fill: var(--accent-primary);
}

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

::-webkit-scrollbar-track {
    background: var(--bg-surface);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 5px;
}

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