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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

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

/* Навигация */
.navbar {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    width: 40px;
    height: 40px;
    background: #007bff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    font-weight: bold;
}

.student-name {
    font-size: 1.2rem;
    font-weight: bold;
}

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

.nav-menu a {
    text-decoration: none;
    color: #333;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    background-color: #007bff;
    color: white;
}

/* Герой секция */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    padding: 4rem 0;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #666;
}

.photo-placeholder {
    width: 300px;
    height: 300px;
    background: #ddd;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    margin: 0 auto;
}

/* Кнопки */
.btn-primary {
    background: #007bff;
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.btn-secondary:hover {
    background: #545b62;
}

/* Карточки */
.section-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.skills-grid {
    display: grid;
    gap: 1.5rem;
}

.skill-item {
    display: grid;
    grid-template-columns: 1fr 2fr auto;
    align-items: center;
    gap: 1rem;
}

.skill-bar {
    background: #e9ecef;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
}

.skill-progress {
    background: #007bff;
    height: 100%;
    border-radius: 5px;
    transition: width 0.3s ease;
}

/* Проекты */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.project-card {
    background: #e9ecef;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: bold;
    color: #666;
}

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

.project-card-large {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s ease;
}

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

.project-image {
    width: 100%;
    height: 150px;
    background: #e9ecef;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* Фильтры */
.filter-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

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

/* Дневник */
.diary-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-radius: 8px;
    background: #f8f9fa;
}

.task-item.completed {
    border-left: 4px solid #28a745;
}

.task-item.in-progress {
    border-left: 4px solid #ffc107;
}

.task-status {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    background: #e9ecef;
}

/* Курсы */
.courses-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.course-item {
    display: grid;
    grid-template-columns: 1fr 2fr auto;
    align-items: center;
    gap: 1rem;
}

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

.progress-fill {
    background: #28a745;
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Контакты */
.contacts-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

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

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

.form-group label {
    font-weight: bold;
    color: #333;
}

.form-group input,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
}

.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    min-height: 1.2em;
}

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

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

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

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    position: relative;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #333;
}

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

/* Футер */
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* Адаптивность */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        gap: 1rem;
    }

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

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

    .skill-item,
    .course-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .filter-buttons {
        flex-wrap: wrap;
    }

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

* Стили для фото и изображений */
.photo-placeholder {
    width: 300px;
    height: 300px;
    background: #ddd;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    margin: 0 auto;
    overflow: hidden; /* Важно: обрезает всё, что выходит за границы */
}

.photo-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Важно: изображение заполнит контейнер без искажений */
    object-position: center; /* Центрирует изображение */
    display: block;
}

/* Стили для логотипа */
.logo {
    width: 40px;
    height: 40px;
    background: #007bff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    font-weight: bold;
    overflow: hidden; /* Важно для логотипа */
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* или contain, в зависимости от нужного эффекта */
    object-position: center;
}