@import "./fonts.css";


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

:root {
    --col: 12.5%;
    --red: #ff4934;
    --black: #111111;
    --gray: #999999;
    --light-gray: #BBBBBB;
    --white: #FFFFFF;
    --gap: 1vw;
    --padding: 1vw;
}

html {
    font-size: 18px;
}

body {
    font-family: 'Palatino', serif;
    background-color: var(--white);
    color: var(--black);
    overflow-x: hidden;
}

img {
    -webkit-user-drag: none;
    -webkit-user-drag: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.grid-system {
    width: 100%;
    height: 100svh;
    padding: var(--padding);
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    column-gap: var(--gap);
    row-gap: var(--gap);
    overflow: hidden;
}

/* =====================
   ANIMATIONS
===================== */

@keyframes flicker {
    0%, 100% {
        opacity: 1;
    }
    10%, 20% {
        opacity: 0;
    }
    30% {
        opacity: 1;
    }
    40%, 50% {
        opacity: 0;
    }
    60% {
        opacity: 1;
    }
    70%, 80% {
        opacity: 0;
    }
    90% {
        opacity: 1;
    }
}

/* =====================
   HEADER — fixed
===================== */

header.row-1 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: var(--padding);
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    column-gap: var(--gap);
    align-items: center;
    z-index: 100;
    overflow: hidden;
}

.row-spacer {
    grid-column: 1 / -1;
    grid-row: 1;
}
.logo {
    grid-column: 1 / 2;
}

.signature {
    width: 120px;
    height: auto;
    object-fit: cover;
    display: block;
}

.available {
    grid-column: 7 / 9;
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
    gap: 8px;
}

.dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: var(--red);
    flex-shrink: 0;
}

.available:hover .dot {
    animation: flicker 0.4s ease-in-out;
}

.available-text {
    font-family: 'Palatino', serif;
    font-size: clamp(0.75rem, 0.95vw, 1rem);
    color: var(--black);
}

/* =====================
   HERO / ROWS 2–3
===================== */

section.row-2.hero {
    grid-column: 1 / -1;
    grid-row: 2 / 4;
    display: grid;
    grid-template-columns: subgrid;
    grid-template-rows: subgrid;
    overflow: hidden;
}

.hero-photo {
    grid-column: 3 / 4;
    grid-row: 1 / 2;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    overflow: hidden;
}

.portrait {
    width: clamp(2.8rem, 3.6vw, 4.2rem);
    display: block;
    object-fit: contain;
}

.hero-names {
    grid-column: 4 / 7;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    align-self: end;
    overflow: hidden;
}

.hero-bio {
    grid-column: 4 / 7;
    grid-row: 2;
    align-self: end;
    overflow: hidden;
}

.name-en {
    font-family: 'Palatino', serif;
    font-size: clamp(1.8rem, 3.2vw, 2.6rem);
    font-weight: normal;
    color: var(--red);
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.name-ru {
    font-family: 'Palatino', serif;
    font-size: clamp(0.85rem, 1.1vw, 1.1rem);
    font-weight: normal;
    color: var(--black);
}

.bio {
    font-family: 'Palatino', serif;
    font-size: clamp(0.8rem, 0.95vw, 1rem);
    line-height: 1.25;
    color: var(--black);
    text-align: justify;
    hyphens: none;
}

/* =====================
   SELECTED WORKS / ROWS 5–8
===================== */

section.row-3 {
    grid-column: 1 / -1;
    grid-row: 4 / 9;
    display: grid;
    grid-template-columns: subgrid;
    grid-template-rows: subgrid;
    position: relative;
    overflow: hidden;
}

.left-section-project {
    grid-column: 1 / 3;
    grid-row: 2 / 6;
    display: flex;
    flex-direction: column;
    gap: var(--gap);
    overflow: hidden;
}

.sort-block {
    display: flex;
    flex-direction: column;
    gap: 0.6em;
    overflow: hidden;
}

/* Project panels: stacked, only .active is visible */
.project-panel {
    grid-column: 3 / 9;
    grid-row: 1 / 6;
    display: none;
    grid-template-columns: subgrid;
    grid-template-rows: subgrid;
    overflow: hidden;
}

.project-panel.active {
    display: grid;
}

.project-image {
    grid-column: 1 / 5;
    grid-row: 1 / 6;
    overflow: hidden;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
}

.featured-img {
    width: 100%;
    object-fit: contain;
    display: block;
    bottom: 0;
}

.project-description {
    grid-column: 5 / 7;
    grid-row: 2 / 6;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 3vw;
    overflow: hidden;
}

.sort-label {
    font-family: 'Palatino', serif;
    font-size: clamp(0.75rem, 0.85vw, 0.9rem);
    color: var(--black);
}

.sort-list {
    display: flex;
    flex-direction: column;
    gap: 0.2em;
    
}

.sort-item {
    font-family: 'Palatino', serif;
    font-size: clamp(0.75rem, 0.9vw, 1rem);
    cursor: pointer;
    transition: color 0.4s ease, font-size 0.4s ease;
}

.sort-item.inactive {
    color: var(--light-gray);
}

.sort-item.active {
    color: var(--black);
    font-size: clamp(1rem, 1.4vw, 1.5rem);
    line-height: 1.2;
    font-style: italic;
}

.sort-item::before,
.sort-item::after {
    content: "";
    font-style: inherit;
}

/* active state brackets */
.sort-item.active::before {
    content: "(";
}

.sort-item.active::after {
    content: ")";
}

.selected-works-label {
    grid-column: 1 / 2;
    grid-row: 2 / 2;
    display: flex;
    align-items: flex-end;
    margin-top: auto;
}

.selected-works {
    font-family: 'Palatino', serif;
    font-size: clamp(1.5rem, 2.8vw, 3.2rem);
    font-weight: normal;
    font-style: italic;
    line-height: 1.1;
    color: var(--black);
}



.project-desc-text {
    font-family: 'Palatino', serif;
    font-size: clamp(0.7rem, 0.85vw, 0.95rem);
    line-height: 1.25;
    color: var(--black);
    text-align: justify;
    hyphens: auto;
}

.project-list {
    display: flex;
    flex-direction: column;
    gap: 0.15em;
    margin-top: auto;
    max-height: calc(3 * 2.3em);
    overflow-y: auto;
    scrollbar-width: none;
    position: relative;
    /* mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%); */
}

.project-list::-webkit-scrollbar {
    display: none;
}

.project-list-item {
    font-family: 'Palatino', serif;
    font-size: clamp(0.7rem, 0.85vw, 0.9rem);
    cursor: pointer;
    transition: color 0.4s ease, font-size 0.4s ease;
    display: grid;
    align-items: baseline;
    gap: 0.5em;
}

.project-list-item.inactive {
    color: var(--light-gray);
}

.project-list-item.active {
    color: var(--black);
    font-size: clamp(1rem, 1.5vw, 1.6rem);
    font-style: italic;
}

.project-year {
    grid-column: 9 / 9;
    font-size: clamp(0.65rem, 0.8vw, 0.85rem);
    font-style: normal;
    color: var(--black);
    display: none;
}

.project-list-item.active .project-year {
    display: inline;
}

.project-title::before,
.project-title::after {
    content: "";
    font-style: inherit;
}

.project-list-item.active .project-title::before {
    content: "(";
}

.project-list-item.active .project-title::after {
    content: ")";
}