@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;700&family=Oswald:wght@500;600&display=swap');

:root {
    --bg-1: #0c1f23;
    --bg-2: #153b44;
    --bg-3: #1f505b;
    --accent: #00f5d4;
    --accent-warm: #ff7a4a;
    --text: #f2fbfb;
    --muted: rgba(255, 255, 255, 0.72);
    --card: rgba(255, 255, 255, 0.08);
    --stroke: rgba(255, 255, 255, 0.14);
}

html {
    min-height: 100%;
    background: linear-gradient(135deg, var(--bg-1), var(--bg-2), var(--bg-3));
}

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

body {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    background: transparent;
    color: var(--text);
    font-family: "Manrope", system-ui, sans-serif;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* ===== Header ===== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 10px 24px;
    min-height: 72px;
    background: rgba(8, 20, 23, 0.78);
    border-bottom: 1px solid var(--stroke);
    backdrop-filter: blur(12px);
    z-index: 20;
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 14px;
    background: rgba(8, 20, 23, 0.6);
    border: 1px solid var(--stroke);
    border-radius: 18px;
    backdrop-filter: blur(10px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
    justify-self: start;
    position: relative;
    z-index: 3;
}

.header-crab {
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    justify-self: center;
    position: relative;
    z-index: 1;
}

.crab {
    width: 72px;
    height: 72px;
    background: url('./static/krab.svg') center/contain no-repeat;
    cursor: pointer;
    transition: transform 0.4s ease, filter 0.4s ease;
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.35));
}

.brand {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.brand-title {
    font-family: "Oswald", "Manrope", sans-serif;
    font-size: 22px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand-subtitle {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.6);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    justify-self: end;
    position: relative;
    z-index: 3;
}

.burger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: rgba(8, 20, 23, 0.6);
    border: 1px solid var(--stroke);
    border-radius: 12px;
    padding: 10px 12px;
    cursor: pointer;
}

.burger span {
    width: 24px;
    height: 2px;
    background: var(--text);
    display: block;
}

/* ===== Hero ===== */

.hero {
    padding: 110px 0 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    position: relative;
    z-index: 1;
    flex: 1;
    width: 100%;
}

/* ===== Tabs ===== */

.tabs {
    display: inline-flex;
    gap: 8px;
    margin-bottom: 0;
    padding: 6px;
    border-radius: 999px;
    background: rgba(8, 20, 23, 0.5);
    border: 1px solid var(--stroke);
    backdrop-filter: blur(10px);
    z-index: 30;
}

.tab {
    background: none;
    border: none;
    color: var(--text);
    font-size: 16px;
    font-family: "Oswald", "Manrope", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    position: relative;
    padding: 10px 18px;
    border-radius: 999px;
    transition: 0.3s;
}

.tab:hover {
    color: #ffffff;
}

.tab.active {
    background: rgba(0, 245, 212, 0.16);
    box-shadow: inset 0 0 0 1px rgba(0, 245, 212, 0.5);
}

/* ===== Content ===== */

.content {
    width: min(92%, 1100px);
    margin-top: 12px;
}

h1 {
    font-family: "Oswald", "Manrope", sans-serif;
    font-size: 36px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.panel {
    display: none;
    text-align: center;
    padding-top: 22px;
}

.panel.active {
    display: block;
    animation: panelIn 0.6s ease;
}

.section-lead {
    margin-top: 12px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.5;
}

.site-footer {
    margin-top: 0;
    padding: 28px 24px;
    background: #0b1619;
    border-top: none;
    box-shadow: none;
    flex-shrink: 0;
}

.footer-inner {
    width: min(92%, 1100px);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
}

.footer-crab {
    width: 48px;
    height: 48px;
    margin: 0 auto 4px;
    background: url('./static/krab.svg') center/contain no-repeat;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35));
}

.footer-brand {
    font-family: "Oswald", "Manrope", sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.footer-info {
    color: var(--muted);
    font-size: 14px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

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

/* ===== Projects ===== */

#projects {
    text-align: left;
}

#contacts {
    text-align: left;
}

.projects {
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin-top: 24px;
}

.project {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
    padding: 24px;
    border-radius: 18px;
    border: 1px solid var(--stroke);
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.18);
    opacity: 0;
    transform: translateY(40px);
    transition: 0.6s;
}

.project.visible {
    opacity: 1;
    transform: translateY(0);
}

.about-card {
    margin-top: 24px;
    text-align: left;
    opacity: 1;
    transform: none;
}

.pixel-frame {
    margin-top: 16px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(8, 20, 23, 0.6);
    border: 1px solid var(--stroke);
}

.game-wrap {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: #0b1018;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

#flappyCanvas {
    width: 100%;
    height: auto;
    display: block;
    image-rendering: pixelated;
}

.game-ui {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(8, 20, 23, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    display: flex;
    gap: 8px;
    align-items: center;
}

.score-label {
    color: rgba(255, 255, 255, 0.6);
}

.game-hint {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: linear-gradient(90deg, rgba(12, 23, 28, 0.8), rgba(12, 23, 28, 0.45));
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.game-hint.hidden {
    opacity: 0;
    pointer-events: none;
}

.project-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.project-desc {
    color: var(--muted);
    margin-top: 6px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.project-tags span {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(0, 245, 212, 0.14);
    border: 1px solid rgba(0, 245, 212, 0.4);
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.project-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.field {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(8, 20, 23, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.field-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 6px;
}

.field-value {
    font-size: 15px;
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.project-gallery img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: transform 0.3s;
}

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

/* ===== Contacts ===== */

.contacts {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(280px, 1.1fr);
    gap: 24px;
    margin-top: 32px;
    align-items: start;
    text-align: left;
}

.contact-info {
    display: grid;
    gap: 16px;
}

.contact-card {
    display: flex;
    gap: 16px;
    align-items: center;
    background: rgba(8, 20, 23, 0.6);
    padding: 18px 20px;
    border-radius: 14px;
    border: 1px solid var(--stroke);
    position: relative;
    transition: transform 0.3s;
}

.contact-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 18%;
    width: 4px;
    height: 64%;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--accent), var(--accent-warm));
}

.contact-card:hover {
    transform: translateY(-4px);
}

.contact-form {
    display: grid;
    gap: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--stroke);
    border-radius: 18px;
    padding: 22px;
}

.contact-form label {
    display: grid;
    gap: 8px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.6);
}

.contact-form input,
.contact-form textarea {
    background: rgba(8, 20, 23, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 12px 14px;
    color: #fff;
    font-size: 15px;
    font-family: "Manrope", system-ui, sans-serif;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.btn {
    background: linear-gradient(120deg, var(--accent), var(--accent-warm));
    border: none;
    color: #082226;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 12px 18px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 245, 212, 0.2);
}

/* ===== Modal ===== */

.image-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    z-index: 1000;
}

.image-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.image-modal img {
    max-width: 90vw;
    max-height: 90vh;
}

.modal-btn {
    position: absolute;
    background: none;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
}

.modal-btn.prev { left: 20px; }
.modal-btn.next { right: 20px; }
.contact-title {
    font-weight: bold;
    margin-bottom: 4px;
}

.contact-value {
    font-size: 18px;
    margin-bottom: 0;
}

.main_text {
    font-size: 24px;
    margin-top: 16px;
    line-height: 1.5;
    color: var(--muted);
}

@media (max-width: 980px) {
    .content {
        width: min(92%, 900px);
    }

    .project-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .project-tags {
        justify-content: flex-start;
    }

    .contacts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .site-header {
        padding: 10px 16px;
        gap: 10px;
    }

    .hero {
        padding-top: 110px;
    }

    .logo {
        padding: 8px 12px;
    }

    .crab {
        width: 56px;
        height: 56px;
    }

    .brand-title {
        font-size: 18px;
    }

    .brand-subtitle {
        font-size: 11px;
        letter-spacing: 0.14em;
    }

    .burger {
        display: flex;
    }

    .tabs {
        position: absolute;
        top: 100%;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        width: min(86vw, 260px);
        margin-top: 10px;
        display: none;
        background: #0b1619;
        border-radius: 16px;
        padding: 10px;
        gap: 6px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
        backdrop-filter: none;
    }

    .tabs.open {
        display: flex;
    }

    .tab {
        font-size: 14px;
        text-align: left;
        width: 100%;
        padding: 12px 14px;
        border-radius: 12px;
    }

    .section-lead {
        font-size: 16px;
    }

    .project-gallery img {
        height: 150px;
    }
}
/* ===== Toast ===== */
.custom-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 14px 18px;
    border-radius: 14px;
    background: rgba(8, 20, 23, 0.95);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
    font-size: 14px;
    letter-spacing: 0.04em;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 9999;
}

.custom-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.custom-toast.success {
    box-shadow: 0 0 0 1px rgba(0,245,212,0.4);
}

.custom-toast.error {
    box-shadow: 0 0 0 1px rgba(255,122,74,0.5);
}


/* ===== Personal data consent ===== */
.consent {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: none;
    color: rgba(255,255,255,0.7);
}

.consent input[type="checkbox"] {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

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

.consent a:hover {
    color: #fff;
}
