/* PORTFOLIO — Professional Design System */

:root {
    --bg-color: #0d0d11;
    --card-bg: #14141c;
    --card-bg-hover: #1b1b25;
    --primary-color: #c8956a;
    --primary-hover: #d9a87c;
    --text-color: #e8e4dd;
    --secondary-text: #6b697c;
    --text-muted: #3f3d4a;
    --separator-color: #1f1f2a;
    --border-strong: #2c2c3a;
    --accent-dim: rgba(200, 149, 106, 0.1);
    --nav-height: 64px;
    --radius: 10px;
    --radius-sm: 6px;
    --ease: 0.2s ease;
}

@font-face {
    font-family: Louis;
    src: url(../Fonts/Louis.ttf);
    font-display: swap;
}

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

img {
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
}

:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
    border-radius: 3px;
}

*:focus:not(:focus-visible) {
    outline: none;
}

html {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Louis', system-ui, -apple-system, sans-serif;
    line-height: 1.7;
    min-height: 100%;
    padding-bottom: 72px;
}

/* ===== TYPOGRAPHY ===== */

h1, h2, h3 {
    font-family: 'Louis', sans-serif;
    line-height: 1.2;
    margin-bottom: 1.25rem;
}

h1 {
    font-size: 2.5rem;
    color: var(--text-color);
}

h2 {
    font-size: 1.4rem;
    color: var(--primary-color);
}

h3 {
    font-size: 1.15rem;
    color: var(--text-color);
}

p {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.75;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--ease);
}

a:hover {
    color: var(--primary-hover);
}

hr {
    border: none;
    border-top: 1px solid var(--separator-color);
    margin: 1.5rem 0;
}

/* ===== HEADER / NAV ===== */

header {
    background-color: rgba(13, 13, 17, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    width: 100%;
    border-bottom: 1px solid var(--separator-color);
    margin-bottom: 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    height: var(--nav-height);
}

.header-brand {
    font-family: 'Louis', sans-serif;
    font-size: 0.95rem;
    font-weight: bold;
    color: var(--text-color);
    letter-spacing: 0.08em;
    text-decoration: none;
    flex-shrink: 0;
    transition: color var(--ease);
}

.header-brand:hover {
    color: var(--primary-color);
}

.sections {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    font-size: 0.92rem;
    flex-grow: 1;
}

.sections a {
    color: var(--secondary-text);
    position: relative;
    padding-bottom: 3px;
    transition: color var(--ease);
}

.sections a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary-color);
    transition: width var(--ease);
}

.sections a:hover {
    color: var(--text-color);
}

.sections a:hover::after {
    width: 100%;
}

.sections #current {
    color: var(--text-color);
    font-weight: 600;
}

.sections #current::after {
    width: 100%;
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.lang-switcher button {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-color);
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    padding: 0.2rem 0.3rem;
    transition: color var(--ease), border-color var(--ease);
    letter-spacing: 0.04em;
    opacity: 0.5;
}

.lang-switcher button:hover {
    opacity: 1;
}

.lang-switcher button.active {
    color: var(--primary-color);
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
    opacity: 1;
}

.lang-separator {
    color: var(--border-strong);
}

/* Fallback: targets #current in any context */
#current {
    font-weight: 600;
    color: var(--text-color);
}

/* ===== SUBNAV ===== */

#div_games {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    padding: 0 1.5rem;
    max-width: 1100px;
    margin: -1rem auto 2.5rem;
}

#div_games .link {
    padding: 0.35rem 0.9rem;
    background-color: transparent;
    border: 1px solid var(--border-strong);
    border-radius: 20px;
    font-size: 0.82rem;
    color: var(--secondary-text);
    transition: all var(--ease);
}

#div_games .link:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

#div_games #current.link {
    background-color: var(--accent-dim);
    border-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
}

/* ===== LAYOUT ===== */

main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.contentDiv {
    width: 100%;
    max-width: 860px;
    margin: 0 auto 2rem auto;
    background-color: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--separator-color);
}

/* ===== HERO ===== */

.hero {
    padding: 3rem 0 4rem;
    max-width: 860px;
    margin: 0 auto;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.hero-text {
    flex: 1;
    min-width: 0;
}

.hero-label {
    font-size: 0.74rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 0.875rem;
    font-weight: 600;
}

.hero h1 {
    font-size: 3.2rem;
    line-height: 1.1;
    color: var(--text-color);
    margin-bottom: 1.25rem;
}

.hero-desc {
    font-size: 1.05rem;
    color: var(--secondary-text);
    line-height: 1.75;
    margin-bottom: 2rem;
    max-width: 460px;
}

.hero-ctas {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hero-photo-wrap {
    flex-shrink: 0;
}

/* ===== BUTTONS ===== */

.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--ease);
    border: 1px solid transparent;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--bg-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: var(--bg-color);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-color);
    border-color: var(--border-strong);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

/* ===== SKILLS ===== */

.skills-wrap {
    max-width: 860px;
    margin: 0 auto 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--separator-color);
}

.skills-label {
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.875rem;
    font-weight: 600;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    padding: 0.3rem 0.75rem;
    background: var(--card-bg);
    border: 1px solid var(--separator-color);
    border-radius: 4px;
    font-size: 0.76rem;
    color: var(--secondary-text);
    letter-spacing: 0.02em;
    transition: all var(--ease);
}

.skill-tag:hover {
    border-color: var(--border-strong);
    color: var(--text-color);
}

/* ===== ABOUT (intro layout) ===== */

.intro-flex {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
}

.intro-text {
    flex: 1;
}

#img_myself {
    width: 260px;
    height: 260px;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: var(--radius);
    border: 1px solid var(--border-strong);
    display: block;
}

/* ===== MEDIA ===== */

.imgBlock {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    justify-content: center;
    margin: 2rem 0;
}

.gameCapture {
    max-width: 48%;
    height: auto;
    border: 1px solid var(--separator-color);
    border-radius: var(--radius-sm);
    display: block;
}

.documentImg {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    border: 1px solid var(--separator-color);
}

video {
    width: 100%;
    max-width: 760px;
    border-radius: var(--radius);
    display: block;
    margin: 0 auto;
    border: 1px solid var(--separator-color);
}

.videoGrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.verticalVideo {
    width: 100%;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--separator-color);
}

/* ===== FOOTER ===== */

footer, .footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    background-color: rgba(13, 13, 17, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.875rem 1.5rem;
    text-align: center;
    border-top: 1px solid var(--separator-color);
    z-index: 100;
    font-size: 0.82rem;
    color: var(--secondary-text);
}

footer a, .footer a {
    color: var(--secondary-text);
    transition: color var(--ease);
}

footer a:hover, .footer a:hover {
    color: var(--primary-color);
}

/* ===== HELPERS ===== */

.text {
    color: var(--text-color);
}

.hSeparator {
    border-top: 1px solid var(--separator-color);
}

/* ===== AVAILABILITY & CONTACTS ===== */

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.45; transform: scale(0.82); }
}

.availability {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.74rem;
    letter-spacing: 0.04em;
    color: #4ade80;
    margin-bottom: 0.75rem;
}

.availability-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    flex-shrink: 0;
    animation: pulse-dot 2.5s ease-in-out 0.6s infinite;
}

.hero-contacts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.25rem;
    margin-top: 1.5rem;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    color: var(--secondary-text);
    text-decoration: none;
    transition: color var(--ease);
}

.contact-link svg { flex-shrink: 0; opacity: 0.7; }

.contact-link:hover { color: var(--primary-color); }

/* ===== PROJECT META ===== */

.project-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1.1rem;
}

.badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.18rem 0.55rem;
    border-radius: 3px;
}

.badge-personal      { background: rgba(200, 149, 106, 0.12); color: var(--primary-color); }
.badge-gamejam       { background: rgba(139,  92, 246, 0.12); color: #a78bfa; }
.badge-tool          { background: rgba( 56, 189, 248, 0.12); color: #7dd3fc; }
.badge-company-test  { background: rgba( 52, 211, 153, 0.12); color: #6ee7b7; }

.project-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
}

.stack-tag {
    font-size: 0.71rem;
    padding: 0.18rem 0.55rem;
    background: transparent;
    border: 1px solid var(--separator-color);
    border-radius: 3px;
    color: var(--secondary-text);
}

/* ===== 404 ===== */

.not-found-main {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--nav-height) - 72px);
    padding: 0 1.5rem;
}

.not-found-content {
    text-align: center;
    max-width: 440px;
}

.not-found-code {
    font-size: 5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.not-found-title {
    font-size: 1.6rem;
    margin-bottom: 0.75rem;
}

.not-found-desc {
    color: var(--secondary-text);
    margin-bottom: 2rem;
}

/* ===== CV DOWNLOAD ===== */

.cv-actions {
    display: flex;
    justify-content: center;
    margin-bottom: 1.75rem;
}

/* ===== RESPONSIVE ===== */

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

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

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

/* Hero: staggered entrance on page load */
.availability    { animation: fadeSlideUp 0.5s ease 0.00s both; }
.hero-label      { animation: fadeSlideUp 0.5s ease 0.05s both; }
.hero h1         { animation: fadeSlideUp 0.6s ease 0.18s both; }
.hero-desc       { animation: fadeSlideUp 0.5s ease 0.30s both; }
.hero-ctas       { animation: fadeSlideUp 0.5s ease 0.42s both; }
.hero-photo-wrap { animation: fadeSlideUp 0.65s ease 0.10s both; }

/* Skills section follows hero */
.skills-wrap { animation: fadeSlideUp 0.5s ease 0.52s both; }

/* Single-section pages: gentle entrance */
.page-fade { animation: fadeSlideUp 0.5s ease 0.1s both; }

/* Scroll reveal: JS adds .reveal to off-screen elements, .is-visible when they enter viewport */
.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .availability,
    .availability-dot,
    .hero-label,
    .hero h1,
    .hero-desc,
    .hero-ctas,
    .hero-photo-wrap,
    .skills-wrap,
    .page-fade {
        animation: none;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ===== RESPONSIVE ===== */

@media (max-width: 768px) {
    .hero {
        padding: 2rem 0 3rem;
    }

    .hero-content {
        flex-direction: column-reverse;
        gap: 2rem;
        text-align: center;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero-ctas {
        justify-content: center;
    }

    .hero-contacts {
        justify-content: center;
    }

    .availability {
        justify-content: center;
    }

    .hero-desc {
        max-width: none;
        margin-left: auto;
        margin-right: auto;
    }

    #img_myself {
        width: 160px;
        height: 160px;
        margin: 0 auto;
    }

    .intro-flex {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .header-container {
        flex-direction: column;
        height: auto;
        padding: 0.875rem 1rem;
        gap: 0.75rem;
    }

    .header-brand {
        font-size: 0.9rem;
    }

    .sections {
        gap: 1.5rem;
        font-size: 0.87rem;
        order: 1;
    }

    .lang-switcher {
        order: 2;
    }

    .contentDiv {
        padding: 1.75rem 1.25rem;
    }

    h1 { font-size: 1.9rem; }
    h2 { font-size: 1.2rem; }

    .gameCapture {
        max-width: 100%;
    }

    #div_games {
        margin-top: -0.5rem;
        padding: 0 0.75rem;
    }
}
