/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #fff;
    --text-color: #000;
    --text-secondary: #333;
    --text-muted: #666;
    --border-color: #eee;
    --border-light: #ddd;
    --header-bg: rgba(255, 255, 255, 0.8);
    --header-border: rgba(221, 221, 221, 0.3);
    --signature-color: #ff6666;
}

[data-theme="dark"] {
    --bg-color: #121212;
    --text-color: #ffffff;
    --text-secondary: #e0e0e0;
    --text-muted: #b0b0b0;
    --border-color: #333;
    --border-light: #444;
    --header-bg: rgba(18, 18, 18, 0.8);
    --header-border: rgba(68, 68, 68, 0.3);
    --signature-color: #ff6666;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--bg-color);
    font-size: 15px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 30px;
}

/* Header and Navigation */
header {
    background-color: var(--header-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--header-border);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.5rem;
    max-width: 700px;
    margin: 0 auto;
}

.logo h1 {
    font-size: 1.1rem;
    font-weight: 600;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 400;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--text-muted);
}

.theme-toggle-wrapper {
    display: flex;
    align-items: center;
}

.theme-toggle-checkbox {
    display: none;
}

.theme-toggle-label {
    display: inline-block;
    width: 50px;
    height: 24px;
    background-color: var(--border-light);
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.theme-toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background-color: var(--bg-color);
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.sun-icon, .moon-icon {
    position: absolute;
    transition: opacity 0.3s ease;
}

.sun-icon {
    opacity: 1;
}

.moon-icon {
    opacity: 0;
}

.theme-toggle-checkbox:checked + .theme-toggle-label {
    background-color: var(--text-color);
}

.theme-toggle-checkbox:checked + .theme-toggle-label .theme-toggle-slider {
    transform: translateX(26px);
}

.theme-toggle-checkbox:checked + .theme-toggle-label .theme-toggle-slider .sun-icon {
    opacity: 0;
}

.theme-toggle-checkbox:checked + .theme-toggle-label .theme-toggle-slider .moon-icon {
    opacity: 1;
}

.theme-toggle-label:hover {
    opacity: 0.8;
}

/* Hero Section */
.hero {
    background-color: var(--bg-color);
    padding: 6rem 0 4rem;
}

.hero h1 {
    font-family: 'Caveat', 'Brush Script MT', cursive;
    font-size: 3.5rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: var(--signature-color);
    letter-spacing: 1px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-weight: 400;
}

.intro-description {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
}

.highlight-sections {
    display: grid;
    grid-template-columns: 1fr;
    margin-top: 3rem;
}

.highlight-section {
    background-color: transparent;
    padding: 0;
}

.highlight-section h3 {
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 2rem;
    color: var(--text-color);
    letter-spacing: 0.5px;
}

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

.highlight-list li {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    border-left: 2px solid var(--text-color);
    padding-left: 1.5rem;
}

.highlight-list li::before {
    display: none;
}

/* Experience and Education Sections */
.experience, .education {
    padding: 4rem 0;
    border-top: 1px solid var(--border-color);
}

.experience h2, .education h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    font-weight: 600;
    color: var(--text-color);
}

.experience-list, .education-list {
    margin-left: 0;
    position: relative;
}

.experience-item, .education-item {
    margin-bottom: 2.5rem;
    position: relative;
    padding-left: 1.5rem;
    border-left: 2px solid var(--text-color);
}

.experience-item:last-child, .education-item:last-child {
    margin-bottom: 0;
}

.experience-header, .education-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
}

.experience-header h3, .education-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-color);
}

.experience-header .duration, .education-header .duration {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.experience-item .company, .education-item .company {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.experience-item .location, .education-item .location {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.experience-item .location::before, .education-item .location::before {
    content: '📌';
    font-style: normal;
}

/* Experience-specific styles */
.experience-item .company {
    margin-bottom: 0.3rem;
}

.experience-item .location {
    margin-bottom: 0.8rem;
}

/* Education-specific styles */
.education-item .company {
    margin: 0.1rem 0 0 0;
}

.education-item .location {
    margin-top: 0.5rem;
}

/* Experience-specific header styles */
.header-right {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.clickable {
    cursor: pointer;
}

.info-icon {
    display: flex;
    align-items: center;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.info-icon svg {
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.clickable:hover .info-icon {
    opacity: 1;
}

.clickable:hover .info-icon svg {
    color: var(--text-secondary);
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

[data-theme="dark"] .modal-backdrop {
    background: rgba(0, 0, 0, 0.6);
}

.modal-content {
    position: relative;
    background: var(--bg-color);
    width: 100vw;
    height: 100vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: var(--bg-color);
    z-index: 10;
    min-height: 80px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    padding-left: 3rem;
    padding-right: 3rem;
}

[data-theme="dark"] .modal-header {
    border-bottom: 1px solid var(--border-color);
}

.modal-header h4 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
    line-height: 1.2;
    flex: 1;
}

.close-modal {
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s ease;
    background: none;
    border: none;
    padding: 0.5rem;
    line-height: 1;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    color: var(--text-color);
    background: var(--border-color);
}

.modal-body {
    flex: 1;
    padding: 3rem;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.modal-meta {
    padding-bottom: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.modal-meta p {
    margin-bottom: 0;
    font-size: 1rem;
    color: var(--text-secondary);
}

.modal-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.7;
    max-width: none;
}

.modal-description p {
    margin-bottom: 1.5rem;
}

.modal-description p:last-child {
    margin-bottom: 0;
}

/* Twitter Section */
.twitter {
    padding: 4rem 0;
    border-top: 1px solid var(--border-color);
}

.twitter h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    font-weight: 600;
    color: var(--text-color);
}

.twitter-feed {
    width: 100%;
}

.section-description {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    padding-left: 1.5rem;
    border-left: 2px solid var(--text-color);
}

.social-links {
    margin-top: 2rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 0.8rem;
    font-size: 1rem;
}

.social-link:hover {
    text-decoration: underline;
}

.social-link svg {
    flex-shrink: 0;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--text-color);
    color: var(--bg-color);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.scroll-to-top svg {
    transition: transform 0.2s ease;
}

.scroll-to-top:hover svg {
    transform: translateY(-1px);
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 2rem;
}

footer p {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    nav {
        padding: 0.8rem 20px;
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .nav-links {
        gap: 1.2rem;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .highlight-sections {
        margin-top: 2rem;
    }

    .highlight-section {
        padding: 0;
    }
    
    .highlight-list li {
        font-size: 0.95rem;
        padding-left: 1.2rem;
        margin-bottom: 1.2rem;
    }
    
    .experience-header, .education-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.1rem;
    }

    .education-item .location {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 2.5rem 0 1.5rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.2rem;
    }
    
    .intro-description {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .highlight-section {
        padding: 0;
        margin-top: 1.5rem;
    }
    
    .highlight-section h3 {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .highlight-list li {
        font-size: 0.9rem;
        padding-left: 1rem;
        margin-bottom: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .experience-item, .education-item {
        padding-left: 1.2rem;
        margin-bottom: 2rem;
    }

    .experience h2, .education h2, .twitter h2 {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }
    
    .modal-header {
        padding: 1.5rem 0;
        max-width: 1200px;
        margin: 0 auto;
        width: 100%;
        padding-left: 2rem;
        padding-right: 2rem;
    }
    
    .modal-header h3 {
        font-size: 1.5rem;
    }
    
    .modal-body {
        padding: 2rem;
        max-width: 1200px;
        margin: 0 auto;
        width: 100%;
    }
    
    .close-modal {
        font-size: 1.5rem;
        width: 2.5rem;
        height: 2.5rem;
    }
}
