/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.6;
    color: #2c3e50;
    background-color: #f9f9f9;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
}

/* ===== CONTAINER ===== */
.container {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    margin-bottom: 30px;
}

/* ===== BACK BUTTON ===== */
.back-to-main {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
}

.back-link {
    display: inline-flex;
    align-items: center;
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    padding: 8px 15px;
    border-radius: 6px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    border: 1px solid #eaeaea;
}

.back-link:hover {
    color: #ffffff;
    background: #3498db;
    transform: translateX(-3px);
    border-color: #3498db;
}

.back-link i {
    margin-right: 8px;
    font-size: 16px;
}

/* ===== HEADER ===== */
.site-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 0 20px 25px;
    border-bottom: 2px solid #eaeaea;
}

.site-header h1 {
    font-size: 38px;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 20px;
    color: #34495e;
    margin-bottom: 20px;
    font-style: italic;
    font-weight: 400;
}

/* ===== CONTACT INFO ===== */
.contact-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.contact-link {
    color: #2c3e50;
    text-decoration: none;
    font-size: 18px;
    padding: 8px 15px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    border: 1px solid #eaeaea;
}

.contact-link:hover {
    color: #3498db;
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.1);
}

.contact-link i {
    font-size: 18px;
}

.email {
    color: #2c3e50;
}

.telegram {
    color: #2c3e50;
}

.telegram i {
    color: #0088cc;
}

/* ===== MISSION STATEMENT ===== */
.mission-statement {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 30px;
    border-radius: 10px;
    margin: 30px 0;
    border-left: 5px solid #3498db;
    font-size: 18px;
    line-height: 1.7;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

/* ===== SECTIONS ===== */
.section {
    margin: 40px 0;
}

.section h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 2px solid #ecf0f1;
    font-size: 28px;
    font-weight: 600;
    position: relative;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100px;
    height: 2px;
    background: #3498db;
}

/* ===== EDUCATION LIST ===== */
.education-list {
    list-style-type: none;
    padding-left: 0;
}

.education-item {
    margin-bottom: 25px;
    padding-left: 30px;
    position: relative;
    border-left: 3px solid #3498db;
    padding-bottom: 15px;
}

.education-item:last-child {
    border-left-color: #2ecc71;
}

.year {
    font-weight: bold;
    color: #3498db;
    font-size: 16px;
    background: #f0f7ff;
    padding: 3px 10px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 8px;
}

/* ===== COMPETENCIES GRID ===== */
.competencies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.competency-card {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    border-top: 4px solid #3498db;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.competency-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.1);
    border-top-color: #2ecc71;
}

.competency-card h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 20px;
    font-weight: 600;
}

.card-arrow {
    display: inline-flex;
    align-items: center;
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #eaeaea;
    transition: all 0.3s;
}

.card-arrow:hover {
    color: #2980b9;
    gap: 10px;
}

.card-arrow i {
    margin-left: 8px;
    transition: transform 0.3s;
}

.card-arrow:hover i {
    transform: translateX(5px);
}

/* ===== NAVIGATION ARROWS (INDEX PAGE) ===== */
.navigation-arrows {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 50px 0 30px;
    padding-top: 30px;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
}

.nav-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.3s ease;
    width: 140px;
    padding: 20px;
    border-radius: 10px;
    background: #f8f9fa;
}

.nav-arrow:hover {
    color: #3498db;
    transform: translateY(-8px);
    background: white;
    box-shadow: 0 8px 15px rgba(52, 152, 219, 0.15);
}

.nav-arrow i {
    font-size: 42px;
    margin-bottom: 15px;
    color: #3498db;
}

.nav-arrow span {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

/* ===== PROJECTS (PAGE 1) ===== */
.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 35px;
    margin-top: 30px;
}

.project-card {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    border-top: 4px solid #3498db;
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.project-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
    gap: 20px;
}

.book-image {
    width: 150px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    flex-shrink: 0;
    border: 1px solid #eaeaea;
}

.book-info h3 {
    font-size: 22px;
    color: #2c3e50;
    margin-bottom: 8px;
    font-weight: 600;
}

.book-author {
    font-size: 17px;
    color: #7f8c8d;
    font-style: italic;
    margin-bottom: 15px;
}

.project-details {
    margin-top: 20px;
}

.feature-list {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 20px;
}

.feature-list li {
    margin-bottom: 12px;
    padding-left: 28px;
    position: relative;
    line-height: 1.6;
}

.feature-list li::before {
    content: "✓";
    color: #2ecc71;
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 18px;
}

.feature-text {
    margin-top: 15px;
    padding: 18px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    line-height: 1.7;
}

.feature-text strong {
    color: #2c3e50;
}

/* ===== TOPICS (PAGE 2) ===== */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.topic-card {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    border-top: 4px solid #2ecc71;
    transition: all 0.3s ease;
    text-align: center;
    height: 100%;
}

.topic-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(46, 204, 113, 0.15);
}

.topic-number {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: #2ecc71;
    color: white;
    border-radius: 50%;
    font-weight: bold;
    font-size: 20px;
    line-height: 40px;
    margin-bottom: 15px;
}

.topic-title {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 12px;
    font-weight: 600;
}

.topic-description {
    font-size: 15px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 15px;
}

.external-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 4px;
    background: white;
    border: 1px solid #eaeaea;
    transition: all 0.3s;
}

.external-link:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.external-link i {
    font-size: 12px;
}

/* ===== SERVICES (PAGE 2) ===== */
.services-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.service-card {
    padding: 25px;
    background: white;
    border-radius: 8px;
    border: 1px solid #eaeaea;
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.08);
    border-color: #3498db;
}

.service-card h3 {
    color: #2c3e50;
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 600;
}

/* ===== TASKS (PAGE 3) ===== */
.tasks-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-top: 30px;
}

.task-card {
    background: #f8f9fa;
    padding: 35px;
    border-radius: 10px;
    border-left: 4px solid #e74c3c;
    transition: all 0.3s ease;
    position: relative;
}

.task-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.task-number {
    position: absolute;
    top: -18px;
    left: 25px;
    background: #e74c3c;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 20px;
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

.task-title {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
    font-weight: 600;
}

.solution-box, .result-box {
    margin: 25px 0;
    padding: 22px;
    border-radius: 8px;
    line-height: 1.7;
}

.solution-box {
    background: white;
    border-left: 4px solid #3498db;
}

.solution-box h4, .result-box h4 {
    color: #3498db;
    margin-bottom: 12px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.solution-box h4 i, .result-box h4 i {
    font-size: 20px;
}

.result-box {
    background: #e8f6f3;
    border-left: 4px solid #2ecc71;
}

.result-box h4 {
    color: #27ae60;
}

/* ===== TECH STACK ===== */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 40px;
    padding-top: 25px;
    border-top: 1px solid #eee;
    justify-content: center;
}

.tech-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: white;
    border-radius: 25px;
    border: 1px solid #ddd;
    font-weight: 600;
    color: #2c3e50;
    transition: all 0.3s ease;
    font-size: 15px;
}

.tech-tag:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

.tech-tag.python { border-color: #306998; color: #306998; }
.tech-tag.python:hover { background: #306998; color: white; }

.tech-tag.html { border-color: #e34c26; color: #e34c26; }
.tech-tag.html:hover { background: #e34c26; color: white; }

.tech-tag.css { border-color: #264de4; color: #264de4; }
.tech-tag.css:hover { background: #264de4; color: white; }

.tech-tag.git { border-color: #f1502f; color: #f1502f; }
.tech-tag.git:hover { background: #f1502f; color: white; }

.tech-tag.ai { border-color: #8e44ad; color: #8e44ad; }
.tech-tag.ai:hover { background: #8e44ad; color: white; }

.tech-tag.regex { border-color: #d35400; color: #d35400; }
.tech-tag.regex:hover { background: #d35400; color: white; }

.tech-tag i {
    font-size: 18px;
}

/* ===== FOOTER ===== */
.site-footer {
    text-align: center;
    margin-top: 60px;
    padding-top: 25px;
    color: #7f8c8d;
    font-size: 15px;
    border-top: 2px solid #eee;
    line-height: 1.6;
}

.copyright {
    margin-top: 10px;
    font-size: 14px;
    color: #95a5a6;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 992px) {
    .container {
        padding: 30px;
    }
    
    .projects-container,
    .competencies-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    
    .container {
        padding: 25px 20px;
    }
    
    .site-header h1 {
        font-size: 30px;
    }
    
    .subtitle {
        font-size: 18px;
    }
    
    .contact-info {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .back-to-main {
        position: static;
        margin-bottom: 20px;
        text-align: center;
    }
    
    .back-link {
        display: inline-flex;
    }
    
    .navigation-arrows {
        flex-direction: column;
        gap: 25px;
        align-items: center;
    }
    
    .nav-arrow {
        width: 100%;
        max-width: 280px;
    }
    
    .project-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .book-image {
        width: 180px;
    }
    
    .task-card {
        padding: 25px 20px;
    }
    
    .task-title {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px 15px;
    }
    
    .site-header h1 {
        font-size: 26px;
    }
    
    .section h2 {
        font-size: 24px;
    }
    
    .topics-grid {
        grid-template-columns: 1fr;
    }
    
    .task-number {
        width: 40px;
        height: 40px;
        font-size: 18px;
        top: -15px;
        left: 20px;
    }
    
    .tech-tag {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    .mission-statement {
        padding: 20px;
        font-size: 16px;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .back-to-main,
    .navigation-arrows,
    .card-arrow,
    .external-link {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
        padding: 0;
        max-width: 100%;
    }
    
    .container {
        box-shadow: none;
        padding: 20px;
    }
}