/* ==== БАЗОВЫЕ СТИЛИ ==== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    font-size: 16px;
}

/* ==== БЛОК PAGE ==== */
.page {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* ==== БЛОК HEADER ==== */
.header {
    background: #2c3e50;
    color: white;
    padding: 1rem 0;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

/* ==== БЛОК NAV ==== */
.nav-list {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-link:hover {
    background-color: #34495e;
}

.nav-link.active {
    background-color: #3498db;
}

/* ==== БЛОК MAIN ==== */
.main {
    padding: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

/* ==== HERO SECTION ==== */
.hero {
    background: #ecf0f1;
    padding: 3rem 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.hero-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: center;
}

.hero-text h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.highlight {
    color: #e74c3c;
    font-weight: bold;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.profile-photo {
    width: 100%;
    max-width: 300px;
    height: 300px;
    border-radius: 8px;
    object-fit: cover;
}

/* ==== КНОПКИ ==== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 1rem;
    text-align: center;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #e74c3c;
    color: white;
}

.btn-secondary:hover {
    background: #c0392b;
}

.btn-outline {
    background: transparent;
    color: #3498db;
    border: 2px solid #3498db;
}

.btn-outline:hover {
    background: #3498db;
    color: white;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-full {
    width: 100%;
}

/* ==== СЕКЦИИ ==== */
.section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.page-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.text-center {
    text-align: center;
    margin-top: 2rem;
}

/* ==== НАВЫКИ ==== */
.skills {
    margin: 3rem 0;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.skill-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.skill-item h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.skill-bar {
    background: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
    height: 25px;
}

.skill-progress {
    background: #3498db;
    color: white;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: bold;
}

/* ==== ПРОЕКТЫ ==== */
.projects-preview {
    margin: 3rem 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.project-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-image {
    width: 100%;
    height: 150px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-content {
    padding: 1rem;
}

.project-content h3 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

/* ==== ФИЛЬТР ПРОЕКТОВ ==== */
.projects-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: white;
    color: #333;
    border: 2px solid #bdc3c7;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.projects-container {
    display: grid;
    gap: 2rem;
}

.project-card-large {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: grid;
    grid-template-columns: 300px 1fr;
}

.project-card-large .project-image {
    height: 200px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tag {
    background: #ecf0f1;
    color: #2c3e50;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* ==== УЧЕБНЫЙ ДНЕВНИК ==== */
.diary-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #bdc3c7;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-left: 4px solid #bdc3c7;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.1rem;
    top: 2rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #bdc3c7;
    border: 3px solid white;
}

.timeline-item.completed {
    border-left-color: #27ae60;
}

.timeline-item.completed::before {
    background: #27ae60;
}

.timeline-item.in-progress {
    border-left-color: #f39c12;
}

.timeline-item.in-progress::before {
    background: #f39c12;
}

.timeline-date {
    font-weight: bold;
    color: #3498db;
    margin-bottom: 0.5rem;
}

.timeline-content h3 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-top: 0.5rem;
}

.status-badge.completed {
    background: #d5f4e6;
    color: #27ae60;
}

.status-badge.in-progress {
    background: #fef5e7;
    color: #f39c12;
}

/* ==== КУРСЫ ==== */
.current-courses {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.course-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.course-card h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.course-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #3498db;
    border-radius: 4px;
}

.progress-text {
    font-weight: bold;
    color: #3498db;
    min-width: 40px;
}

.course-card p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* ==== КОНТАКТЫ ==== */
.contact-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.contact-form-section,
.contact-info-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-weight: bold;
    color: #2c3e50;
}

.required {
    color: #e74c3c;
}

.form-input,
.form-textarea {
    padding: 0.75rem;
    border: 2px solid #bdc3c7;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #3498db;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* ==== ИНФОРМАЦИЯ О КОНТАКТАХ ==== */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item h3 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.contact-item p {
    color: #7f8c8d;
}

/* ==== БЛОК FOOTER ==== */
.footer {
    background: #2c3e50;
    color: white;
    margin-top: 3rem;
}

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

.footer-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #3498db;
}

/* ==== АДАПТИВНОСТЬ ==== */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding: 0 1rem;
    }

    .nav-list {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1rem;
    }

    .hero-text h2 {
        font-size: 1.5rem;
    }

    .hero-actions {
        justify-content: center;
    }

    .diary-layout,
    .contact-layout {
        grid-template-columns: 1fr;
    }

    .projects-filter {
        flex-direction: column;
        align-items: center;
    }

    .filter-btn {
        width: 200px;
    }

    .project-card-large {
        grid-template-columns: 1fr;
    }

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

    .main {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .skills-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 250px;
    }
}