/* Main */

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

body {
    margin: 0;
    padding: 0;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
}

main {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: auto auto auto 1fr;
    column-gap: 20px;
    padding: 0 30px;
    min-height: 100vh;
}

/* Links */

.nav-links {
    text-decoration: none;
    color: #0a0a0a;
    width: 100%; /* Take full width of parent li */
    display: block;
    font-family: Arial, sans-serif;
}

.nav-left {
    text-align: left;
}

.nav-center {
    text-align: center;
}

.nav-right {
    text-align: right;
}

/* Fonts and text */

h1 {
    font-size: clamp(3rem, 10vw, 11.5625rem); /* More aggressive scaling */
    line-height: 0.9;
}

.name {
    font-weight: 900; /* Black weight */
}

p {
    font-size: clamp(0.7rem, 1vw, 1rem); /* Scales with viewport, min 0.7rem, max 1rem */
    line-height: 1.25;
}

a {
    font-size: clamp(0.9rem, 1.3vw, 1.875rem); /* Scales down more at smaller viewports */
    line-height: 1;
}

.italic {
    font-style: italic;
}

/* Main - index page */

.background-origin {
    background: #D5BE86;
    height: 100vh;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
    transition: background 0.3s ease;
}

h1, p, a {
    transition: color 0.3s ease;
}

/* Header Object */
.header-object {
    grid-column: 2 / 12; /* columns 2-11, width = 1386px in Figma */
    height: 58vh; /* 651px / 1117px = 58.3% */
    display: flex;
    align-items: flex-end; /* h1 at bottom of container */
    justify-content: center;
}

.name {
    line-height: 16.47vh; /* 184px / 1117px = 16.47vh */
    margin: 0;
    padding: 0;
    text-align: center;
}

/* Subheader Object */
.subheader-object {
    grid-column: 2 / 12; /* aligns with columns 2-11 */
    height: 3.6vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -0.1vh; /* -11px / 1117px = -0.985% */
}

.name-subtitle {
    margin: 0;
    padding: 0;
    text-align: center;
    font-style: italic;
}

/* Navigator bar */
.main-nav {
    grid-column: 2 / 12; /* aligns with columns 2-11 */
    height: 3.49vh; /* 39px / 1117px = 3.49% */
    border-bottom: 0.179vh solid #0a0a0a; /* 2px / 1117px = 0.179% */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 3.58vh; /* 40px / 1117px = 3.58% */
    margin-bottom: clamp(1rem, 1vh, 2.375rem);
    transition: border-bottom-color 0.3s ease;
}

.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0 0 clamp(2px, 0.2vw, 4px) 0;
    height: 100%;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
}

.main-nav li {
    width: 19.9%; /* 276px / 1386px (nav width) */
}

/* Works section */
.works-text {
    grid-column: 2 / span 4;
    grid-row: 4;
    padding-right: 3vw; /* Subtle width reduction with viewport scaling */
}

.works-list {
    grid-column: 1 / -1;
    grid-row: 4;
}

.works-list ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5vh; /* Faster scaling for smaller viewports */
}

.work-item {
    display: flex;
    align-items: center;
    gap: 18px;
    text-decoration: none;
    color: #0a0a0a;
    cursor: pointer;
    margin-left: calc(50vw - 131px - 30px);
}

.work-image {
    width: 262px;
    height: 50px;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 0.5px #0a0a0a;
    transition: box-shadow 0.3s ease;
}

.work-text {
    width: 424px;
    height: 50px;
    display: flex;
    align-items: center;
    font-family: Arial, sans-serif;
}

@media (max-width: 1024px) {
    .work-text {
        display: none;
    }
}

/* Theme classes for hover states */
.theme-boryspil .background-origin {
    background: #EFD5A3 !important;
}

.theme-boryspil .name,
.theme-boryspil .name-subtitle,
.theme-boryspil .nav-links,
.theme-boryspil .work-item {
    color: #0a0a0a !important;
}

.theme-boryspil .main-nav {
    border-bottom-color: #0a0a0a !important;
}

.theme-boryspil .work-image {
    box-shadow: inset 0 0 0 0.5px #0a0a0a !important;
}

.theme-diieva .background-origin {
    background: #951D1F !important;
}

.theme-diieva .name,
.theme-diieva .name-subtitle,
.theme-diieva .nav-links,
.theme-diieva .work-item,
.theme-diieva .works-text {
    color: #F7F4E9 !important;
}

.theme-diieva .main-nav {
    border-bottom-color: #F7F4E9 !important;
}

.theme-diieva .work-image {
    box-shadow: inset 0 0 0 0.5px #F7F4E9 !important;
}

.theme-solidarity .background-origin {
    background: #FFFFFF !important;
}

.theme-solidarity .name,
.theme-solidarity .name-subtitle,
.theme-solidarity .nav-links,
.theme-solidarity .work-item,
.theme-solidarity .works-text {
    color: #1A2744 !important;
}

.theme-solidarity .main-nav {
    border-bottom-color: #FFC900 !important;
}

.theme-solidarity .work-image {
    box-shadow: inset 0 0 0 0.5px #1A2744 !important;
}

.theme-glossary .background-origin {
    background: #FFFFFF !important;
}

.theme-glossary .name,
.theme-glossary .name-subtitle,
.theme-glossary .nav-links,
.theme-glossary .work-item {
    color: #0a0a0a !important;
}

.theme-glossary .main-nav {
    border-bottom-color: #0a0a0a !important;
}

.theme-glossary .work-image {
    box-shadow: inset 0 0 0 0.5px #0a0a0a !important;
}

