/* ============================================================
   portfolio.css - /ac personal portfolio page

   Standalone page (not part of the en/ru template split).
   Reuses the Cosmos1562 theme tokens and fonts.
   ============================================================ */


/* --- 1. Fonts ------------------------------------------- */

@font-face {
    font-family: 'Orbitron';
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url('/static/fonts/orbitron.woff2') format('woff2');
}
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url('/static/fonts/space-grotesk-latin.woff2') format('woff2');
}


/* --- 2. Theme tokens ----------------------------------- */

:root {
    --bg: #060d18;
    --cyan: #00c8ff;
    --cyan-dim: #0d3a52;
    --cyan-glow: rgba(0, 200, 255, 0.08);
    --text: #a8d4e8;
    --text-muted: #2e5f7a;
    --panel-bg: rgba(8, 15, 30, 0.85);
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}


/* --- 3. Base and background grid ---------------------- */

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

body {
    background: var(--bg);
    font-family: 'Space Grotesk', sans-serif;
    min-height: 100vh;
    color: var(--text);
    line-height: 1.6;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 200, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 200, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

main {
    position: relative;
    z-index: 1;
    max-width: 820px;
    margin: 0 auto;
    padding: 4rem 1.5rem 6rem;
}


/* --- 4. Header --------------------------------------- */

.hero h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2rem, 6vw, 3.2rem);
    color: #fff;
    letter-spacing: 0.02em;
}

.hero .tagline {
    color: var(--cyan);
    font-size: 1.1rem;
    margin-top: 0.4rem;
    letter-spacing: 0.04em;
}

.hero p.intro {
    margin-top: 1.2rem;
    max-width: 60ch;
}

.links {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.links a {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid var(--cyan-dim);
    border-radius: 4px;
    color: var(--cyan);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.links a:hover {
    background: var(--cyan-glow);
    border-color: var(--cyan);
}


/* --- 5. Sections ------------------------------------ */

section {
    margin-top: 3.5rem;
}

section > h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--cyan-dim);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}


/* --- 6. Entry lists --------------------------------- */

.entries {
    list-style: none;
}

.entries li {
    background: var(--panel-bg);
    border: 1px solid var(--cyan-dim);
    border-left: 2px solid var(--cyan);
    border-radius: 4px;
    padding: 0.9rem 1.25rem;
    margin-bottom: 0.75rem;
}

.entries .name {
    display: block;
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.entries .desc {
    display: block;
    margin-top: 0.3rem;
    color: var(--text);
    font-size: 0.95rem;
}

.note {
    margin-top: 1rem;
    color: var(--cyan);
    font-size: 0.95rem;
}


/* --- 7. Gallery slideshow -------------------------- */

.slideshow {
    position: relative;
    margin-top: 0.5rem;
}

.stage {
    position: relative;
    background: #0a1628;
    border: 1px solid var(--cyan-dim);
    border-radius: 6px;
    overflow: hidden;
    height: 440px;
}

.slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.4s var(--ease);
    pointer-events: none;
}

.slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.slide img {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    object-fit: contain;
}

.slide:not(.is-active) figcaption {
    visibility: hidden;
}

.slide figcaption {
    flex: 0 0 auto;
    padding: 0.7rem 1rem;
    background: rgba(6, 13, 24, 0.9);
    border-top: 1px solid var(--cyan-dim);
    color: var(--text);
    font-size: 0.9rem;
    text-align: center;
}

.slideshow .nav {
    position: absolute;
    top: calc((440px - 3rem) / 2 - 1.25rem);
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid var(--cyan-dim);
    border-radius: 50%;
    background: rgba(6, 13, 24, 0.75);
    color: var(--cyan);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.slideshow .nav:hover {
    background: var(--cyan-glow);
    border-color: var(--cyan);
}

.slideshow .prev { left: 0.75rem; }
.slideshow .next { right: 0.75rem; }

.dots {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.dot {
    width: 0.6rem;
    height: 0.6rem;
    padding: 0;
    border: 1px solid var(--cyan-dim);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: background 0.2s var(--ease);
}

.dot.is-active {
    background: var(--cyan);
    border-color: var(--cyan);
}

@media (max-width: 560px) {
    .stage { height: 320px; }
    .slideshow .nav { top: calc((320px - 3rem) / 2 - 1.25rem); }
}


/* --- 8. Footer ------------------------------------- */

footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem 1.5rem 3rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

footer a {
    color: var(--text-muted);
}
