:root {
    --gap: 16px;
    --max: 1100px;
    --color-primary: #0a84ff;
    --radius: 12px;

}
*{
    box-sizing:border-box
}
body{
    font-family:Inter,system-ui,Segoe UI,Arial,sans-serif;
    margin:0;
    color:#111
}

.btn {
    display: inline-block;
    padding: .6rem .8rem;
    border-radius: var(--radius);
    font: inherit;
    cursor: pointer;
    border: none;
    transition: filter .2s;
}
.btn--primary {
    background: var(--color-primary);
    color: #fff;
}
.logo{
    width:144px;
    height:144px;
}
.container{
    max-width:var(--max);
    margin:0 auto;padding:24px
}
.site-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:12px 24px;
    border-bottom:1px solid #eee
}
.nav a{
    margin-left:16px;
    text-decoration:none;
    color:inherit

}
.hero{
    display:flex;gap:20px;
    align-items:center;
    padding:24px 0
}
.photo img{
    width:150px;
    height:150px;
    object-fit:cover;
    border-radius:8px
}
.btn{display:inline-block;
    padding:8px 14px;
    border-radius:6px;
    background:#111;
    color:#fff;
    text-decoration:none
}
.skills,.top-projects{
    margin-top:24px
}
.skill-list{
    list-style:none;
    padding:0;
    margin:0
}
.skill-list li{
    margin:10px 0;
    display:flex;
    justify-content:space-between;
    align-items:center
}
.skill-list .bar{
    width:40%;
    height:12px;
    background:#eee;
    border-radius:8px;
    position:relative;
    overflow:hidden
}
.skill-list .bar::after{
    content:'';
    position:absolute;
    left:0;
    top:0;
    height:100%;
    width:0;background:#111;
    border-radius:8px;
    transition:width .6s ease
}

.projects-preview {
    margin-block: var(--space-2xl, 3rem);
}

.projects-preview__grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    gap: var(--space-lg, 1.5rem);
}
.projects-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
    gap:16px;margin-top:12px
}
.card, .project-card{
    padding:18px;border:1px solid #eee;
    border-radius:8px;
    text-align:center;
    min-width: 0;
    transition: transform .2s ease, box-shadow .2s ease;
}
.project-card:hover{ transform: translateY(-4px); }
.project-card__title,
.project-card__description { overflow-wrap: anywhere; }
.modal{
    position:fixed;
    inset:0;display:none;
    align-items:center;
    justify-content:center;
    background:rgba(0,0,0,0.5)
}
.modal[aria-hidden="false"]{
    display:flex
}
.modal-content{
    background:#fff;
    padding:20px;
    border-radius:8px;
    max-width:720px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 10000;
    width:90%}
.site-footer{
    text-align:center;
    padding:18px;
    border-top:1px solid #eee;
    margin-top:36px
}


@media(max-width:700px){.hero{flex-direction:column;text-align:center}}

/* --- ШАПКА И БРЕНД (минималистично) --- */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    border-bottom: 1px solid #eee;
    background: #fff;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.logo:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111;
    margin: 0;
}

/* --- НАВИГАЦИЯ --- */
.nav {
    position: sticky;
    top: 0;
    /* Прибавки для вырезов/жестовых панелей — только где они есть */
    padding-block-start: calc(.75rem + env(safe-area-inset-top));
    padding-block-end: .75rem;
    padding-inline-start: calc(var(--space-md, 1rem) + env(safe-area-inset-left));
    padding-inline-end: calc(var(--space-md, 1rem) + env(safe-area-inset-right));
    color: #fff;

}

.nav a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    position: relative;
    padding-bottom: 2px;
    transition: color 0.2s ease;
}
.contact-form{
    display:flex;
    flex-direction: column;
    gap: 16px;
}
.nav a:hover {
    color: #000;
}

.nav a.active {
    color: #000;
    font-weight: 600;
}

.nav a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #000;
    border-radius: 1px;
}

.contact-form {
    max-width: 600px;
    margin: 40px auto;
    padding: 20px;
    border-radius: 12px;
    background: #f9f9f9;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.contact-form h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.6rem;
    color: #333;
}

.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form label {
    display: flex;
    flex-direction: column;
    font-weight: 500;
    color: #333;
}

.contact-form input,
.contact-form textarea {
    margin-top: 5px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #0078ff;
    outline: none;
}

.contact-form .btn {
    padding: 10px 15px;
    background-color: dimgrey;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.contact-form .btn:hover {
    background-color: #005fcc;
}

.contact-info {
    margin-top: 25px;
    text-align: center;
    color: #555;
    font-size: 0.95rem;
}

.contact-info p {
    margin: 5px 0;
}


/* --- АДАПТИВНОСТЬ --- */
@media (max-width: 768px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .nav {
        flex-wrap: wrap;
        gap: 10px;
    }

    .name {
        font-size: 1.1rem;
    }
}

main { flex: 1;
    padding-inline: clamp(.75rem, .5rem + 1vw, 2rem);}
.page{
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.skip-link{
    position: absolute;
    inset-inline-start: 1rem;
    inset-block-start: -100%;
    z-index: 10000;
    padding: .5rem .75rem;
    background: #111;
    color: #fff;
    border-radius: .5rem;
    text-decoration: none;
}
.skip-link:focus,
.skip-link:focus-visible { inset-block-start: 1rem; }
:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
a, button, input, textarea { outline-offset: 2px; }
/* Крупные цели на устройствах с pointer:coarse */
@media (pointer: coarse){
    a, button, .nav__link { min-height: 44px; padding: .75rem 1rem; }
}

.hero__photo{
    inline-size: 200px; /* или: clamp(150px, 22vw, 200px); тогда sizes
меняем соответствующе */
    block-size: auto;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 /
0.1);
}

.projects-list{
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg, 1.5rem);
}

.section-title { font-size: clamp(1.5rem, 1.1rem + 2vw, 2rem); }
.hero__greeting { font-size: clamp(1.25rem, 1rem + 1.2vw, 1.8rem); }

.visually-hidden{
    position:absolute!important; width:1px; height:1px; padding:0; margin:-1px;
    overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0;
    /* Повышенный контраст (прогрессивно) */
    @media (prefers-contrast: more){
        .button, .filter{ box-shadow: inset 0 0 0 2px #fff; }
        /* Уважение к снижению движения */
        @media (prefers-reduced-motion: reduce){
            *{ animation: none !important; transition: none !important; }
        }
    }
}

.section, .main { padding-inline: clamp(1rem, calc(.5rem + 1vw), 2rem); }
/* Кнопки: минимальная зона клика 44px (WCAG) */
.button { padding-block: max(.5rem, calc((44px - 1em)/2)); }
/* Full-bleed для геро-блока (если нужен фон на всю ширину) */
.hero--bleed{
    margin-inline: calc(50% - 50vw);
    padding-inline: calc(50vw - 50%);
}

/* Safe-area в футере (жестовая панель) */
.footer { padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }

.object-fit-cover { object-fit: cover; } /* Заполняет с обрезкой */
.object-fit-contain { object-fit: contain; } /* Вписывает полностью */
.object-fit-fill { object-fit: fill; } /* Растягивает */

.responsive-image {
    width: 100%; height: auto; display: block; /* Занимает всю ширину контейнера */
    /* Высота рассчитывается автоматически */
    /* Убирает лишние отступы */
}