/* ==================================================== DEFAULT VARIABLES */
:root {
    --primary-color: #2d5d83;
    --secondary-color: #333;
    --accent-color: #f4f4f4;
    --text-color: #333;
    --text-light: #fff;
    --border-radius: 8px;
    --shadow: 0 5px 15px rgba(0,0,0,0.1);
    --shadow-hover: 0 10px 30px rgba(0,0,0,0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    scroll-behavior: smooth;
}

/* ==================================================== LAYOUT AND SECTIONS */
.section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

.section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--secondary-color);
    position: relative;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-color);
}

/* ==================================================== SECTION:MYSELF */
.myself {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), #1e3d58);
    color: var(--text-light);
    padding: 0 2rem;
    position: relative;
}

.myself-content {
    max-width: 800px;
}

.myself h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.myself h2 {
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.myself p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.8;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ==================================================== NAVIGATION */
.myself nav {
    position: absolute;
    top: 2rem;
    width: 100%;
    padding: 0 2rem;
}

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

.nav-links li a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
}

.nav-links li a:hover,
.nav-links li a.active {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.nav-links li a.active {
    background: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

/* ==================================================== LANGUAGE TOGGLE */
.language-toggle {
    margin-left: auto;
}

#language-switch {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--text-light);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#language-switch:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.language-flag {
    font-size: 1.1rem;
}

.language-text {
    font-weight: 600;
}

/* ==================================================== BUTTONS AND LINKS */
#resume-download {
    padding: 1rem 2rem;
    background: transparent;
    border: 2px solid var(--text-light);
    color: var(--text-light);
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

#resume-download:hover {
    background: var(--text-light);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* ==================================================== SECTION:ABOUT */
#about p {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* ==================================================== SECTION:SKILLS */
.skills-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.skill-category {
    background: var(--accent-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.skill-category h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.skill-category ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.skill-category li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.skill-category li:last-child {
    border-bottom: none;
}

/* ==================================================== SECTION:PROJECTS */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2.5rem;
}

.project-card {
    border: 1px solid #e0e0e0;
    padding: 2rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    background: white;
    display: flex;
    flex-direction: column;
}

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

.project-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.project-card p {
    margin-bottom: 1.5rem;
    color: #666;
    line-height: 1.7;
    flex-grow: 1;
}

.project-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: auto;
}

.project-link {
    padding: 0.7rem 1.5rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: all 0.3s ease;
}

.project-link:hover {
    background: #1e3d58;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.tech-stack {
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 500;
    font-style: italic;
}

/* ==================================================== SECTION:PAPERS */
.papers-grid {
    display: grid;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.paper-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius);
    padding: 2rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.paper-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.paper-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    line-height: 1.4;
}

.paper-meta-info {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.paper-date {
    background: var(--primary-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.paper-category {
    background: var(--accent-color);
    color: var(--text-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.paper-card p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #555;
}

.paper-technologies {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}

.tech-tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.3rem 0.7rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.papers-meta {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.papers-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: all 0.3s ease;
}

.papers-link:hover {
    background: #1e3d58;
    transform: translateY(-1px);
}

/* ==================================================== SECTION:CONTACT */
#contact {
    text-align: center;
    background: var(--accent-color);
    margin: 0;
    max-width: none;
}

#contact p {
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.contact-links-print {
    display: none;
}

.contact-buttons {
    margin: 2rem 0;
}

.contact-btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    margin: 0.5rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.contact-btn:hover {
    background: #1e3d58;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* ==================================================== EASTEREGG */
.easter-egg {
    opacity: 0.001;
    position: absolute;
    left: -9999px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: none;
}

/* ==================================================== FOOTER */
footer {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--secondary-color);
    color: var(--text-light);
}

footer p {
    opacity: 0.9;
}

/* ==================================================== PRINT STYLES */
@media print {
    * {
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    nav,
    .language-toggle,
    #resume-download,
    .project-link,
    .contact-btn,
    .easter-egg {
        display: none !important;
    }
    
    @page {
        margin: 1cm;
        size: A4;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000 !important;
        background: #fff !important;
        width: 100% !important;
    }
    
    /* MYSELF SECTION PRINT */
    .myself {
        height: auto !important;
        background: #2d5d83 !important;
        color: #fff !important;
        padding: 2cm 0 !important;
        text-align: center;
        page-break-after: always;
    }
    
    .myself h1 {
        font-size: 28pt !important;
        color: #fff !important;
        margin-bottom: 0.5cm !important;
    }
    
    .myself h2 {
        font-size: 16pt !important;
        color: #fff !important;
        margin-bottom: 0.5cm !important;
    }
    
    .myself p {
        font-size: 14pt !important;
        color: #fff !important;
        margin-bottom: 1cm !important;
    }
    
    /* GENERAL SECTIONS PRINT */
    .section {
        padding: 1.5cm 0 !important;
        max-width: none !important;
        page-break-inside: avoid;
    }
    
    .section h2 {
        font-size: 20pt !important;
        color: #000 !important;
        text-align: left;
        border-bottom: 2px solid #2d5d83;
        padding-bottom: 0.3cm;
        margin-bottom: 1cm !important;
    }
    
    .section h2::after {
        display: none;
    }
    
    /* SKILLS SECTION PRINT */
    .skills-container {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
        margin-bottom: 1cm !important;
    }
    
    .skill-category {
        background: #f8f9fa !important;
        border: 1px solid #ddd !important;
        padding: 1rem !important;
        page-break-inside: avoid;
    }
    
    .skill-category h3 {
        color: #2d5d83 !important;
        font-size: 14pt !important;
        margin-bottom: 0.5cm !important;
    }
    
    .skill-category li {
        padding: 0.3rem 0 !important;
        border-bottom: 1px solid #eee !important;
    }
    
    /* PROJECTS SECTION PRINT */
    .project-grid {
        display: block !important;
    }
    
    .project-card {
        border: 1px solid #ddd !important;
        padding: 1rem !important;
        margin-bottom: 1cm !important;
        page-break-inside: avoid;
        min-height: auto !important;
    }
    
    .project-card h3 {
        color: #2d5d83 !important;
        font-size: 14pt !important;
        margin-bottom: 0.5cm !important;
    }
    
    .project-card p {
        margin-bottom: 0.5cm !important;
        color: #333 !important;
        line-height: 1.5 !important;
    }
    
    /* ABOUT SECTION PRINT */
    #about p {
        text-align: left !important;
        margin-bottom: 0.7cm !important;
        color: #333 !important;
    }
    
    /* CONTACT SECTION PRINT */
    #contact {
        background: #f8f9fa !important;
        text-align: left !important;
        page-break-before: avoid;
    }
    
    #contact h2 {
        text-align: left !important;
        border-bottom: 2px solid var(--primary-color);
        padding-bottom: 0.3cm;
        margin-bottom: 1cm !important;
    }
    
    #contact p {
        text-align: left !important;
        margin-bottom: 1cm !important;
        color: #333 !important;
    }
    
    .contact-links-print {
        display: block !important;
        margin: 1cm 0 !important;
    }
    
    .contact-link {
        display: block !important;
        margin: 0.5cm 0 !important;
        color: #000 !important;
        text-decoration: underline !important;
        font-weight: 500;
    }
    
    .contact-buttons {
        display: none !important;
    }
}