/* CSS Variables */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #3b82f6;
    --background-color: #ffffff;
    --surface-color: #f8fafc;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --secondary-color: #94a3b8;
    --accent-color: #60a5fa;
    --background-color: #0f172a;
    --surface-color: #1e293b;
    --text-color: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.3);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    transition: var(--transition);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p {
    margin-bottom: 1rem;
}

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

a:hover {
    color: var(--primary-dark);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--background-color);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: var(--surface-color);
}

.sun-icon { display: none; }
.moon-icon { display: block; }

[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 0 3rem;
    background: linear-gradient(135deg, var(--background-color) 0%, var(--surface-color) 100%);
}

.hero-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-quote-wrap {
    width: 100%;
    max-width: 1200px;
    padding: 0 2rem;
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.hero-quote {
    max-width: 720px;
    margin: 0;
    padding: 1.5rem 1.5rem 1.5rem 1.75rem;
    border-left: 3px solid var(--primary-color);
    text-align: center;
    font-style: italic;
    font-size: 1.125rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.hero-quote cite {
    display: block;
    margin-top: 0.75rem;
    font-style: normal;
    font-size: 0.875rem;
    color: var(--text-color);
}

.hero-quote cite a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.hero-quote cite a:hover {
    text-decoration: underline;
}

.hero-quote-source {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

@media (max-width: 1024px) {
    .hero-quote {
        font-size: 1rem;
        padding: 1rem 1rem 1rem 1.25rem;
    }
    .hero-quote-wrap {
        margin-top: 2rem;
    }
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

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

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

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

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

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-placeholder {
    width: 250px;
    height: 320px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 5rem;
    font-weight: 700;
    color: white;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    border-radius: 50%;
}

/* Section Styles */
section {
    padding: 6rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
    color: var(--text-color);
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
}

.about-text p {
    color: var(--text-muted);
    font-size: 1.125rem;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.about-cta {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.6rem 1.25rem;
    color: var(--primary-color);
    background: transparent;
    border: 1.5px solid var(--primary-color);
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    transition: var(--transition);
}

.about-cta:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.contact-info {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.contact-info h3 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.contact-info p {
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: var(--transition);
}

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

.project-header {
    margin-bottom: 1rem;
}

.project-title {
    font-size: 1.25rem;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.project-company {
    color: var(--primary-color);
    font-weight: 500;
}

.project-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.project-description {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.project-metrics {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.metric {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: var(--background-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.metric-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

.metric-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    line-height: 1.2;
    text-align: right;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.project-expand {
    width: 100%;
    padding: 0.75rem;
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

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

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--background-color);
    border-radius: 12px;
    max-width: 800px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

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

.modal-body {
    padding: 2rem;
}

/* Experience Section */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 3rem;
}

.timeline-item:nth-child(odd) {
    padding-left: 0;
    padding-right: 3rem;
    text-align: right;
}

.timeline-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 3px solid var(--background-color);
    z-index: 1;
}

.timeline-content {
    background: var(--surface-color);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.timeline-header {
    margin-bottom: 0.5rem;
}

.timeline-header h3 {
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.timeline-company {
    color: var(--primary-color);
    font-weight: 500;
}

.timeline-tagline {
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    margin-bottom: 1rem;
}

.timeline-subnote {
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0;
    margin-bottom: 1rem;
}

.timeline-subnote em {
    color: var(--primary-color);
    font-style: italic;
}

.timeline-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.timeline-list {
    list-style: none;
    text-align: left;
}

.timeline-list li {
    margin-bottom: 0.75rem;
    color: var(--text-muted);
    position: relative;
    padding-left: 1rem;
}

.timeline-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.skill-category-title {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skill-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skill-name {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.skill-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border-radius: 4px;
    transition: width 1s ease-in-out;
    width: 0;
}

/* Education Section */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.education-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: var(--transition);
}

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

.education-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
}

.education-header h3 {
    color: var(--text-color);
    font-size: 1.25rem;
}

.education-year {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.education-details p {
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

.education-details p strong {
    color: var(--text-color);
}

.education-details p em {
    color: var(--primary-color);
    font-style: italic;
}

/* Languages Section */
.languages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.language-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
}

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

.language-flag {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.language-card h3 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.language-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.language-level {
    margin-top: 1rem;
}

.level-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.level-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border-radius: 4px;
    transition: width 1s ease-in-out;
    width: 0;
}

/* Hobbies Section */
.hobbies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.hobby-item {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
}

.hobby-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.hobby-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.hobby-item h3 {
    color: var(--text-color);
    font-size: 1.125rem;
    margin: 0;
}

.hobby-desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.language-cefr {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.grade-note {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-style: italic;
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 600px;
    margin: 0 auto;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-icon {
    font-size: 1.5rem;
}

.contact-text p {
    margin-bottom: 0.25rem;
}

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

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

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

.footer-links a:hover {
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
    /* More zoom out: smaller base font for "default zoom a bit more out" */
    html {
        font-size: 15px;
    }

    /* Tighter container padding so content stretches further right */
    .container {
        padding: 0 1.5rem;
    }

    /* Tighter section padding so more content is visible at once */
    section {
        padding: 4rem 0;
    }

    /* Tighter section-title margin */
    .section-title {
        margin-bottom: 2.5rem;
    }

    /* Smaller heading sizes for the zoom-out feel */
    h1 {
        font-size: 2rem;
    }
    h2 {
        font-size: 1.5rem;
    }
    h3 {
        font-size: 1.25rem;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--background-color);
        flex-direction: column;
        padding: 1rem 2rem;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu.active {
        display: flex;
    }

    .hamburger {
        display: flex;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-title {
        font-size: 2rem;
    }

    /* Buttons full width on mobile for the "stretched" feel */
    .hero-buttons {
        justify-content: center;
        flex-direction: column;
        align-items: stretch;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .profile-placeholder {
        width: 180px;
        height: 180px;
        font-size: 3rem;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

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

    .projects-grid,
    .education-grid,
    .languages-grid,
    .hobbies-grid,
    .skills-grid {
        grid-template-columns: 1fr;
    }

    /* Cards full width on mobile */
    .project-card,
    .skill-category,
    .education-card,
    .language-card,
    .hobby-item {
        width: 100%;
    }

    .timeline::before {
        left: 20px;
    }

    /* Timeline: less left padding so the card stretches further right */
    .timeline-item {
        padding-left: 2.5rem;
        padding-right: 0;
        text-align: center;
    }

    /* Keep bullets left-aligned even when other timeline content is centered */
    .timeline-list {
        text-align: left;
    }

    .timeline-item:nth-child(odd) {
        padding-left: 2.5rem;
        padding-right: 0;
        text-align: center;
    }

    .timeline-marker {
        left: 20px;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    /* Contact items: label + value on the same line, left-aligned, tight enough to fit long values */
    .contact-info {
        text-align: left;
    }
    .contact-info h3 {
        text-align: center;
    }
    .contact-item {
        gap: 0.75rem;
        align-items: center;
    }
    .contact-icon {
        font-size: 1.25rem;
    }
    .contact-text p {
        display: block;
        font-size: 0.8125rem;
    }
    .contact-text p strong {
        font-weight: 600;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

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

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

/* Print Styles */
@media print {
    .navbar,
    .theme-toggle,
    .hamburger,
    .project-expand,
    .modal {
        display: none !important;
    }

    .hero {
        min-height: auto;
        padding-top: 2rem;
    }

    section {
        padding: 2rem 0;
    }

    .project-card,
    .skill-category,
    .contact-info {
        break-inside: avoid;
    }
}
