/* ============================================================================
   CV Web Application - Styles
   Inspired by Twenty Seconds CV LaTeX Template
   ============================================================================ */

/* --------------------------------------------------------------------------
   CSS Variables
   -------------------------------------------------------------------------- */
:root {
    --sidebar-bg: #1a5276;
    --sidebar-text: #ffffff;
    --sidebar-accent: #85c1e9;
    --main-bg: #ffffff;
    --main-text: #2c3e50;
    --accent-color: #1a5276;
    --border-color: #ecf0f1;
    --skill-bar-bg: rgba(255, 255, 255, 0.2);
    --skill-bar-fill: #85c1e9;
    --link-color: #2980b9;
    --link-hover: #1a5276;
    --section-bg: #f8f9fa;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--main-text);
    background-color: #f0f2f5;
}

/* --------------------------------------------------------------------------
   Main Layout
   -------------------------------------------------------------------------- */
.cv-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.cv-wrapper {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 0;
    background: var(--main-bg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    overflow: hidden;
    min-height: 100vh;
    align-items: stretch;
}

/* --------------------------------------------------------------------------
   Sidebar Styles
   -------------------------------------------------------------------------- */
.sidebar {
    background: linear-gradient(180deg, var(--sidebar-bg) 0%, #154360 100%);
    color: var(--sidebar-text);
    padding: 30px 25px;
}

.profile-photo-container {
    text-align: center;
    margin-bottom: 20px;
}

.profile-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid var(--sidebar-accent);
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.sidebar-name {
    font-size: 1.6rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 400;
    text-align: center;
    color: var(--sidebar-accent);
    margin-bottom: 25px;
}

.sidebar-divider {
    border: none;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin: 20px 0;
}

.sidebar-section-title {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    color: var(--sidebar-accent);
    font-weight: 600;
}

/* Contact Info */
.contact-info {
    margin-top: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 0.85rem;
}

.contact-item i {
    width: 18px;
    color: var(--sidebar-accent);
}

.contact-item a {
    color: var(--sidebar-text);
    text-decoration: none;
    transition: color 0.3s ease;
    word-break: break-word;
}

.contact-item a:hover {
    color: var(--sidebar-accent);
}

/* Skills Bubbles */
.skills-bubbles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.skill-bubble {
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.skill-bubble:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* Programming Skills Bars */
.programming-skills {
    margin-top: 10px;
}

.skill-bar-container {
    margin-bottom: 12px;
}

.skill-name {
    display: block;
    font-size: 0.75rem;
    margin-bottom: 4px;
    opacity: 0.9;
}

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

.skill-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--sidebar-accent), #48c9b0);
    border-radius: 4px;
    transition: width 1s ease-out;
}

/* Expertise List */
.expertise-list {
    list-style: none;
    padding-left: 0;
}

.expertise-list li {
    position: relative;
    padding-left: 15px;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.expertise-list li::before {
    content: '\25A0';
    position: absolute;
    left: 0;
    color: var(--sidebar-accent);
    font-size: 0.6rem;
    top: 4px;
}

/* --------------------------------------------------------------------------
   Main Content Styles
   -------------------------------------------------------------------------- */
.main-content {
    padding: 30px 50px 40px;
    background: var(--main-bg);
}

.cv-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
}

.cv-section:last-of-type {
    border-bottom: none;
}

.section-title {
    font-size: 1.4rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--accent-color);
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-intro,
.section-text {
    margin-bottom: 15px;
    text-align: justify;
    line-height: 1.7;
}

.section-text.highlight {
    background: var(--section-bg);
    padding: 12px 15px;
    border-left: 4px solid var(--accent-color);
    border-radius: 0 4px 4px 0;
}

.subsection-title {
    font-size: 1.1rem;
    color: var(--accent-color);
    margin: 20px 0 10px;
}

.subsection-subtitle {
    font-size: 1rem;
    color: var(--main-text);
    margin: 15px 0 10px;
    font-weight: 600;
}

/* Summary Section */
.summary {
    background: linear-gradient(135deg, var(--section-bg) 0%, #fff 100%);
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.summary-text {
    font-size: 1.05rem;
    line-height: 1.8;
    text-align: justify;
}

/* Education Section */
.education-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.education-item {
    position: relative;
    padding-left: 25px;
    border-left: 3px solid var(--accent-color);
}

.education-header {
    margin-bottom: 5px;
}

.education-years {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 2px 10px;
    border-radius: 3px;
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.education-degree {
    font-size: 1.1rem;
    color: var(--main-text);
    margin-top: 5px;
}

.education-institution {
    color: #666;
    font-style: italic;
    margin-bottom: 5px;
}

.education-thesis {
    font-size: 0.9rem;
    color: #555;
}

/* Models List */
.models-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.model-item {
    background: var(--section-bg);
    padding: 15px 20px;
    border-radius: 6px;
    border-left: 4px solid var(--accent-color);
}

.model-item h4 {
    margin-bottom: 8px;
    font-size: 1rem;
}

.model-names {
    font-weight: 400;
    color: var(--link-color);
}

.model-item p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #555;
}

/* Links Lists */
.links-list {
    list-style: none;
    padding-left: 0;
}

.links-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.links-list li:last-child {
    border-bottom: none;
}

.links-list a {
    color: var(--link-color);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.links-list a::before {
    content: '\2192';
    color: var(--accent-color);
}

.links-list a:hover {
    color: var(--link-hover);
    padding-left: 5px;
}

/* Field Experience */
.field-areas {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 15px;
}

.field-areas li {
    margin-bottom: 5px;
}

/* Publications Section */
.publications .publications-list {
    padding-left: 25px;
    margin-bottom: 25px;
}

.publications .publications-list li {
    margin-bottom: 12px;
    font-size: 0.9rem;
    line-height: 1.6;
    text-align: justify;
}

/* Footer */
.cv-footer {
    text-align: center;
    padding-top: 30px;
    color: #666;
    font-size: 0.9rem;
}

.cv-footer a {
    color: var(--link-color);
    text-decoration: none;
}

/* --------------------------------------------------------------------------
   Responsive Design
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .cv-wrapper {
        grid-template-columns: 280px 1fr;
    }

    .main-content {
        padding: 30px 35px;
    }
}

@media (max-width: 768px) {
    .cv-container {
        padding: 10px;
    }

    .cv-wrapper {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        max-height: none;
        padding: 25px 20px;
    }

    .profile-photo {
        width: 120px;
        height: 120px;
    }

    .main-content {
        padding: 25px 20px;
    }

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

    .model-item {
        padding: 12px 15px;
    }
}

@media (max-width: 480px) {
    .sidebar-name {
        font-size: 1.4rem;
    }

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

    .education-degree {
        font-size: 1rem;
    }

    .publications .publications-list li {
        font-size: 0.85rem;
    }
}

/* --------------------------------------------------------------------------
   Print Styles
   -------------------------------------------------------------------------- */
@media print {
    .cv-container {
        padding: 0;
        max-width: 100%;
    }

    .cv-wrapper {
        grid-template-columns: 250px 1fr;
        box-shadow: none;
        border-radius: 0;
    }

    .sidebar {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .cv-section {
        page-break-inside: avoid;
    }

    a {
        text-decoration: none;
    }

    a[href]::after {
        content: none;
    }
}

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

.cv-section {
    animation: fadeIn 0.5s ease-out;
}

.skill-bubble:nth-child(1) { animation-delay: 0.1s; }
.skill-bubble:nth-child(2) { animation-delay: 0.15s; }
.skill-bubble:nth-child(3) { animation-delay: 0.2s; }
.skill-bubble:nth-child(4) { animation-delay: 0.25s; }
.skill-bubble:nth-child(5) { animation-delay: 0.3s; }
.skill-bubble:nth-child(6) { animation-delay: 0.35s; }

/* --------------------------------------------------------------------------
   Tabs Navigation
   -------------------------------------------------------------------------- */
.cv-tabs {
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
}

.cv-tabs .nav-tabs {
    border-bottom: none;
    gap: 5px;
}

.cv-tabs .nav-link {
    color: var(--main-text);
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    padding: 12px 20px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cv-tabs .nav-link:hover {
    color: var(--accent-color);
    background: var(--section-bg);
    border-bottom-color: var(--sidebar-accent);
}

.cv-tabs .nav-link.active {
    color: var(--accent-color);
    background: transparent;
    border-bottom: 3px solid var(--accent-color);
    font-weight: 600;
}

.tab-content-wrapper {
    padding-top: 20px;
    animation: fadeIn 0.4s ease-out;
}

/* Remove border from last section in each tab */
.tab-content-wrapper .cv-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* --------------------------------------------------------------------------
   Work History / Timeline
   -------------------------------------------------------------------------- */
.work-timeline {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.work-item {
    position: relative;
    padding-left: 25px;
    border-left: 3px solid var(--accent-color);
}

.work-header {
    margin-bottom: 5px;
}

.work-years {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 2px 10px;
    border-radius: 3px;
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.work-role {
    font-size: 1.1rem;
    color: var(--main-text);
    margin-top: 5px;
    margin-bottom: 2px;
}

.work-company {
    color: #666;
    font-style: italic;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.work-description {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Projects Section
   -------------------------------------------------------------------------- */
.project-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
    padding: 12px 15px;
    background: var(--section-bg);
    border-radius: 6px;
}

.legend-label {
    font-weight: 600;
    color: var(--main-text);
    margin-right: 5px;
}

.projects-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.project-card {
    background: var(--section-bg);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 15px;
}

.project-title {
    font-size: 1.05rem;
    color: var(--main-text);
    margin: 0;
    flex: 1;
}

.project-year {
    background: var(--accent-color);
    color: white;
    padding: 2px 10px;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

.project-description {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 12px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* --------------------------------------------------------------------------
   Responsive Tabs
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .cv-tabs .nav-link {
        padding: 10px 12px;
        font-size: 0.8rem;
    }

    .project-card-header {
        flex-direction: column;
        gap: 8px;
    }

    .project-year {
        align-self: flex-start;
    }
}

@media (max-width: 480px) {
    .cv-tabs .nav-tabs {
        flex-wrap: wrap;
    }

    .cv-tabs .nav-link {
        flex: 1 1 45%;
        text-align: center;
        padding: 8px 10px;
        font-size: 0.75rem;
    }

    .project-legend {
        flex-direction: column;
        align-items: flex-start;
    }
}
