/* Design System for iuvalgoldansky.com - Based on videoeditormel.com */

/* ==========================================================================
   Design Tokens
   ========================================================================== */
:root {
    /* Color Palette */
    --white: #ffffff;
    --black: #000000;
    --accent: #1d0ae2;
    --light-accent: #cefd1b;
    --dark-accent: #dd4282;
    --safe-dark-accent: #1d0ae2;
    --safe-light-accent: #ffffff;
    --safe-inverse-accent: #ffffff;
    
    /* Menu Item Colors (from reference site) */
    --menu-1-bg: #1e0be2;
    --menu-1-text: #ffffff;
    --menu-1-hover-bg: #ffffff;
    --menu-1-hover-text: #1e0be2;
    
    --menu-2-bg: #dd4382;
    --menu-2-text: #ffffff;
    --menu-2-hover-bg: #ffffff;
    --menu-2-hover-text: #dd4382;
    
    --menu-3-bg: #cefe1c;
    --menu-3-text: #000000;
    --menu-3-hover-bg: #1c1c1c;
    --menu-3-hover-text: #cefe1c;
    
    --menu-4-bg: #ffffff;
    --menu-4-text: #000000;
    --menu-4-hover-bg: #1c1c1c;
    --menu-4-hover-text: #ffffff;
    
    /* Spacing */
    --max-site-width: 1500px;
    --desktop-gutter: 4vw;
    --mobile-gutter: 6vw;
    --grid-gap: 11px;
    
    /* Typography */
    --font-family: 'Inter', sans-serif;
    --font-family-heading: 'Archivo', sans-serif;
    --font-weight-normal: 500;
    --font-weight-bold: 700;
    --font-weight-extra-bold: 800;
    --font-weight-black: 900;
    
    /* Border Radius */
    --border-radius: 20px;
    
    /* Responsive Breakpoints */
    --breakpoint-mobile: 767px;
    --breakpoint-tablet: 768px;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
}

body {
    background-color: var(--black);
    color: var(--white);
    font-family: var(--font-family);
    font-weight: var(--font-weight-normal);
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* ==========================================================================
   Container & Layout
   ========================================================================== */
.container {
    width: 100%;
    max-width: var(--max-site-width);
    margin: 0 auto;
    padding: 0 var(--mobile-gutter);
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--desktop-gutter);
    }
}

.content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================================================
   Typography Scale
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-heading);
    font-weight: var(--font-weight-extra-bold);
    line-height: 1.2;
    color: var(--white);
}

h1 {
    font-size: 2em;
    margin-bottom: 2rem;
    text-align: center;
}

@media (min-width: 768px) {
    h1 {
        font-size: 3.5em;
    }
}

h2 {
    font-size: 1.2em;
    font-weight: var(--font-weight-bold);
    color: var(--white);
}

p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* ==========================================================================
   Links & Navigation
   ========================================================================== */
a {
    color: var(--white);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--light-accent);
}

/* Main links - styled as colored buttons like reference site menu */
.links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 2rem 0;
}

.links a {
    display: block;
    padding: 16px 24px;
    border-radius: 0; /* Square corners like reference menu items */
    font-family: var(--font-family);
    font-weight: var(--font-weight-bold);
    font-size: 1.1rem;
    text-align: center;
    transition: all 0.3s ease;
}

/* Assign specific colors to each link */
.links a:nth-child(1) {
    background-color: var(--menu-1-bg);
    color: var(--menu-1-text);
}

.links a:nth-child(1):hover {
    background-color: var(--menu-1-hover-bg);
    color: var(--menu-1-hover-text);
}

.links a:nth-child(2) {
    background-color: var(--menu-2-bg);
    color: var(--menu-2-text);
}

.links a:nth-child(2):hover {
    background-color: var(--menu-2-hover-bg);
    color: var(--menu-2-hover-text);
}

/* If there are more than 2 links, continue pattern */
.links a:nth-child(3) {
    background-color: var(--menu-3-bg);
    color: var(--menu-3-text);
}

.links a:nth-child(3):hover {
    background-color: var(--menu-3-hover-bg);
    color: var(--menu-3-hover-text);
}

.links a:nth-child(4) {
    background-color: var(--menu-4-bg);
    color: var(--menu-4-text);
}

.links a:nth-child(4):hover {
    background-color: var(--menu-4-hover-bg);
    color: var(--menu-4-hover-text);
}

/* Secondary navigation links */
.nav-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-links p {
    color: #aaaaaa;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.nav-links a {
    color: #aaaaaa;
    font-size: 0.9rem;
}

.nav-links a:hover {
    color: var(--white);
}

/* ==========================================================================
   Utility Classes (from design system)
   ========================================================================== */
.text-highlight-accent { color: var(--accent); }
.text-highlight-light { color: var(--light-accent); }
.text-highlight-dark { color: var(--dark-accent); }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.p-1 { padding: 1rem; }
.p-2 { padding: 2rem; }
.p-3 { padding: 3rem; }

/* ==========================================================================
   Media Elements (applying 20px border-radius)
   ========================================================================== */
img, .video-container, .embed-container, .video-player, iframe, video {
    border-radius: var(--border-radius);
    overflow: hidden;
    width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   Responsive Utilities
   ========================================================================== */
.mobile-only { display: block; }
.desktop-only { display: none; }

@media (min-width: 768px) {
    .mobile-only { display: none; }
    .desktop-only { display: block; }
}

/* ==========================================================================
   Animation Classes
   ========================================================================== */
.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Grid System (for future use)
   ========================================================================== */
.grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: var(--grid-gap);
    margin: 2rem 0;
}

@media (min-width: 768px) {
    .grid {
        grid-template-columns: repeat(24, 1fr);
    }
}

.grid-item {
    grid-column: span 2;
}

@media (min-width: 768px) {
    .grid-item {
        grid-column: span 4;
    }
}

/* ==========================================================================
   Page Layout Components (for existing pages)
   ========================================================================== */
.page-layout {
    display: block;
    padding: 0;
}

.page-container {
    width: 100%;
    max-width: var(--max-site-width);
    margin: 0 auto;
    padding: 0 var(--mobile-gutter);
}

@media (min-width: 768px) {
    .page-container {
        padding: 0 var(--desktop-gutter);
    }
}

.page-title {
    font-size: 2em;
    font-weight: var(--font-weight-extra-bold);
    margin-bottom: 1rem;
    text-align: center;
}

@media (min-width: 768px) {
    .page-title {
        font-size: 3.5em;
    }
}

.page-subtitle {
    font-size: 1.2em;
    color: #aaaaaa;
    text-align: center;
    margin-bottom: 2rem;
}

.main-nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 2rem 0;
    align-items: center;
}

@media (min-width: 768px) {
    .main-nav {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
}

.main-nav a {
    display: block;
    padding: 12px 24px;
    border-radius: 0;
    font-weight: var(--font-weight-bold);
    font-size: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

/* Color cycling for navigation links */
.main-nav a:nth-child(1) {
    background-color: var(--menu-1-bg);
    color: var(--menu-1-text);
}

.main-nav a:nth-child(1):hover {
    background-color: var(--menu-1-hover-bg);
    color: var(--menu-1-hover-text);
}

.main-nav a:nth-child(2) {
    background-color: var(--menu-2-bg);
    color: var(--menu-2-text);
}

.main-nav a:nth-child(2):hover {
    background-color: var(--menu-2-hover-bg);
    color: var(--menu-2-hover-text);
}

.main-nav a:nth-child(3) {
    background-color: var(--menu-3-bg);
    color: var(--menu-3-text);
}

.main-nav a:nth-child(3):hover {
    background-color: var(--menu-3-hover-bg);
    color: var(--menu-3-hover-text);
}

.main-nav a:nth-child(4) {
    background-color: var(--menu-4-bg);
    color: var(--menu-4-text);
}

.main-nav a:nth-child(4):hover {
    background-color: var(--menu-4-hover-bg);
    color: var(--menu-4-hover-text);
}

.prose {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.prose h2 {
    font-size: 1.5em;
    font-weight: var(--font-weight-bold);
    margin: 1.5rem 0 1rem 0;
}

.prose p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.prose a {
    color: var(--light-accent);
    text-decoration: underline;
}

.prose a:hover {
    color: var(--accent);
}

.page-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 3rem 0;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    align-items: center;
}

@media (min-width: 768px) {
    .page-links {
        flex-direction: row;
        justify-content: center;
    }
}

.page-links a {
    color: #aaaaaa;
    font-size: 0.9rem;
}

.page-links a:hover {
    color: var(--white);
}

.project-list {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2rem;
    margin: 3rem auto;
    max-width: 650px;
}

@media (min-width: 768px) {
    .project-list {
        max-width: 700px;
    }
}

.project-card {
    border-radius: var(--border-radius);
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-media {
    display: block;
    width: 100%;
    height: auto;
}

.project-media img,
.project-media video {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    display: block;
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    font-size: 1.2em;
    font-weight: var(--font-weight-bold);
    margin-bottom: 0.5rem;
}

.project-info p {
    color: #aaaaaa;
    font-size: 0.9rem;
    line-height: 1.5;
}

.section-intro {
    text-align: center;
    color: #aaaaaa;
    font-size: 1.1rem;
    max-width: 800px;
    margin: 2rem auto;
    line-height: 1.6;
}

/* ==========================================================================
   Index Page Layout (bsotm.com inspired)
   ========================================================================== */
.index-layout {
    display: block;
    background-color: var(--black);
    color: var(--white);
    font-family: var(--font-family);
    min-height: 100vh;
}

/* Header */
.index-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem var(--mobile-gutter);
    max-width: var(--max-site-width);
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 1rem;
}

@media (min-width: 768px) {
    .index-header {
        padding: 2rem var(--desktop-gutter);
        flex-wrap: nowrap;
    }
}

.index-site-title {
    font-family: var(--font-family-heading);
    font-size: 1.5em;
    font-weight: var(--font-weight-extra-bold);
    color: var(--white);
    text-decoration: none;
    white-space: nowrap;
}

.index-site-title:hover {
    color: var(--light-accent);
}

/* Override main-nav for horizontal header layout */
.index-header .main-nav {
    margin: 0;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.index-header .main-nav a {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* Header nav group (nav + lang switcher) */
.header-nav-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Language switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 2px;
}

.lang-switcher a {
    font-size: 0.7rem;
    font-weight: 600;
    color: #666;
    text-decoration: none;
    padding: 4px 7px;
    border: 1px solid #555;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    line-height: 1;
}

.lang-switcher a:hover {
    color: #fff;
    border-color: #fff;
}

.lang-switcher a.lang-active {
    color: #fff;
    border-color: #fff;
    background: rgba(255,255,255,0.12);
}

/* Gallery Grid */
.index-gallery {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: var(--grid-gap);
    padding: 0;
    width: 100%;
}

@media (min-width: 550px) {
    .index-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .index-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

.index-gallery-item {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background-color: #1a1a1a;
}

.index-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    transition: transform 0.4s ease;
}

.index-gallery-item:hover img {
    transform: scale(1.05);
}

/* Placeholder for items without images */
.index-gallery-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1a1a1a;
    color: #aaaaaa;
    font-size: 0.9rem;
    text-align: center;
    padding: 1rem;
}

/* Title overlay on hover */
.index-gallery-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 1rem 1rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: var(--white);
    font-size: 0.9rem;
    font-weight: var(--font-weight-bold);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.index-gallery-item:hover .index-gallery-title {
    opacity: 1;
}

/* Footer */
.index-footer {
    text-align: center;
    padding: 3rem 1rem;
    color: #555;
    font-size: 0.8rem;
}

.index-footer a {
    color: #777;
}

.index-footer a:hover {
    color: var(--white);
}

/* ==========================================================================
   Project cards
   ========================================================================== */
.project-card {
    border-radius: var(--border-radius);
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.05);
    position: relative;
    cursor: pointer;
}

.project-card-inner {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    display: block;
    text-decoration: none;
    color: inherit;
}

.project-media {
    display: block;
    width: 100%;
    margin: 0;
    position: relative;
}

.project-media img,
.project-media video {
    width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   Project card overlay & play button
   ========================================================================== */
.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.65rem 1rem;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    pointer-events: none;
}

.project-overlay-inner {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    width: 100%;
    gap: 0;
}

.project-overlay-inner a {
    pointer-events: auto;
}

.project-overlay-inner h2 {
    font-family: var(--font-family-heading);
    font-size: 0.9rem;
    font-weight: var(--font-weight-bold);
    color: var(--white);
    margin: 0;
    white-space: nowrap;
}

.overlay-slash {
    color: rgba(255, 255, 255, 0.35);
    margin: 0 0.35rem;
    font-size: 0.85rem;
    user-select: none;
}

.project-overlay-inner .project-meta-line {
    font-size: 0.8rem;
    color: #cccccc;
    line-height: 1.4;
    margin: 0;
}

.project-overlay-inner .project-meta-line a {
    color: var(--light-accent);
    text-decoration: underline;
}

.project-play {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
}

.project-play svg {
    opacity: 0.9;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}
    color: #cccccc;
    line-height: 1.4;
    margin: 0;
}