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

body {
    font-family: 'Georgia', serif;
    background-color: #2a2a2a;
    color: #333;
    padding: 20px;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto auto auto auto;
    gap: 20px;
    height: calc(100vh - 40px);
}

.card {
    background-color: #f5f1e8;
    border-radius: 20px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.card.dark {
    background-color: #4a5d4a;
    color: #f5f1e8;
}

/* Header */
.header {
    grid-column: 1 / -1;
    grid-row: 1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 2px;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav a {
    text-decoration: none;
    color: #333;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Main content */
.hero {
    grid-column: 1 / 3;
    grid-row: 2 / 4;
}

.hero h1 {
    font-size: 48px;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero .magic {
    font-style: italic;
    color: #4a5d4a;
}

.decorative-element {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border: 2px solid #4a5d4a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.decorative-element::before {
    content: '✦';
    font-size: 24px;
    color: #4a5d4a;
}

/* Photo - изображение на весь блок */
.photo {
    grid-column: 3;
    grid-row: 2 / 4;
    background: url('/static/profile.jpg') center/cover no-repeat;
    background-color: #f5f1e8;
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
    position: relative;
    height: 100%;
    width: 100%;
    box-shadow: 0 2px 12px rgba(0,0,0,0.13);
}

/* Убираем тег img из .photo в HTML */

/* Services */
.about {
    grid-column: 4;
    grid-row: 2;
}

.services h3 {
    font-size: 18px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.services h3::after {
    content: '↗';
    font-size: 16px;
}

.service-image {
    width: 100%;
    height: 120px;
    background: url('/placeholder.svg?height=120&width=200') center/cover;
    border-radius: 10px;
    margin-bottom: 20px;
}

.service-list {
    list-style: none;
}

.service-list li {
    padding: 12px 0;
    border-bottom: 1px solid #ddd;
    font-size: 16px;
}

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

/* About */
.services {
    grid-column: 1;
    grid-row: 4;
    position: relative;
    height: 300px; /* фиксированная высота блока */
    max-height: 300px; /* опционально, чтобы не рос слишком */
    padding: 20px; /* можно уменьшить паддинги для компактности */
    justify-content: flex-start; /* чтобы контент начинался сверху, а не по центру */
}

.about p {
    font-size: 14px;
    line-height: 1.6;
}

/* Contact */
.contact {
    grid-column: 2;
    grid-row: 4;
}

.contact h2 {
    font-size: 36px;
    margin-bottom: 10px;
}

.contact .me {
    font-style: italic;
    color: #f5f1e8;
}

.contact::after {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 20px;
    color: #f5f1e8;
}

/* Social - вертикальный список ссылок */
.social {
    grid-column: 4;
    grid-row: 4;
    display: flex;
    flex-direction: column;
    align-items: center;      /* центр по горизонтали */
    justify-content: center;  /* центр по вертикали */
    gap: 16px;
    padding: 20px 0;
    text-align: center;       /* чтобы текст внутри ссылок был тоже по центру */
}

.social a {
    text-decoration: none;     /* убираем подчеркивание */
    color: inherit;            /* цвет текста наследуется от родителя */
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.2s;
    display: block;            /* чтобы text-align: center работал */
    cursor: pointer;           /* курсор в виде руки, если нужно интерактивно */
}

.social a:hover {
    color: #4a5d4a;            /* или оставь такой же цвет, если hover не нужен */
}


/* Responsive */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        height: auto;
    }

    .header,
    .hero,
    .photo,
    .services,
    .about,
    .contact,
    .social {
        grid-column: 1;
        grid-row: auto;
    }

    .hero h1 {
        font-size: 32px;
    }

    .nav {
        flex-direction: column;
        gap: 15px;
    }
}
