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

:root {
    --bg-dark: #131313;
    --cyan: #49C4CE;
    --cyan-bright: #1AFFFA;
    --cyan-glow: rgba(73, 196, 206, 0.35);
    --cyan-text: #9DE0E0;
    --yellow-accent: #D4D070;
    --text-body: rgba(255, 255, 255, 0.73);
    --font-title: 'Orbitron', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;
    --card-texture: url('../static/Assets/Icons/cyberpunk_chip_bank_transfer_BLUE.png');
    --desc-texture: url('../static/Assets/Textures/cyberpunk_code_matrix.png');
}

html { scroll-behavior: smooth; }
html, body {
    height: 100%;
    overflow-x: hidden;
    background: var(--bg-dark);
    color: #fff;
    font-family: var(--font-mono);
}
body { position: relative; }

/* ===== PARTICLES ===== */
#particles {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0; pointer-events: none;
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex; align-items: center; justify-content: center;
    height: 65px;
}
.navbar .logo {
    position: absolute; left: 30px;
    font-family: var(--font-mono); font-size: 14px;
    color: var(--cyan-text); text-decoration: none;
}
.navbar nav { display: flex; gap: 28px; }
.navbar nav a {
    font-family: var(--font-mono); font-size: 13px;
    color: var(--cyan-text); text-decoration: none; letter-spacing: 1px;
    transition: color 0.2s, text-shadow 0.2s;
}
.navbar nav a:hover {
    color: var(--cyan-bright);
    text-shadow: 0 0 8px var(--cyan-glow);
}
.navbar .hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    position: absolute;
    right: 24px;
    z-index: 200;
}
.navbar .hamburger span {
    display: block; width: 24px; height: 2px;
    background: var(--cyan-text);
    transition: transform 0.3s, opacity 0.3s;
}

/* ===== LAYOUT ===== */
.main-container {
    position: relative; z-index: 1;
    display: flex; min-height: 100vh;
    padding: 80px 30px 60px 30px; gap: 0;
    max-width: 1400px;
    margin: 0 auto;
}
.left-column {
    flex: 1; display: flex; flex-direction: column;
    padding-right: 30px;
}
.right-column {
    width: 440px; flex-shrink: 0;
    display: flex; flex-direction: column; align-items: flex-end;
    margin-right: 84px;
}

/* ===== GLITCH TITLE ===== */
.hero-title {
    font-family: var(--font-title); font-weight: 800;
    font-size: clamp(34px, 4.5vw, 52px);
    color: var(--cyan-bright); letter-spacing: 4px;
    margin-top: 55px; line-height: 1.1;
    position: relative;
    cursor: default;
}

.hero-title::before,
.hero-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.hero-title:hover::before {
    color: #ff0040;
    animation: glitch-before 0.3s steps(2) infinite;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    transform: translate(-2px, -1px);
    opacity: 0.8;
}

.hero-title:hover::after {
    color: #00fff9;
    animation: glitch-after 0.25s steps(3) infinite;
    clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0 100%);
    transform: translate(2px, 1px);
    opacity: 0.8;
}

.hero-title:hover {
    animation: glitch-skew 0.4s steps(2) infinite;
}

@keyframes glitch-before {
    0%   { clip-path: polygon(0 2%, 100% 2%, 100% 5%, 0 5%); transform: translate(-2px, -1px); }
    10%  { clip-path: polygon(0 15%, 100% 15%, 100% 15%, 0 15%); transform: translate(2px, 0); }
    20%  { clip-path: polygon(0 10%, 100% 10%, 100% 20%, 0 20%); transform: translate(-1px, 2px); }
    30%  { clip-path: polygon(0 1%, 100% 1%, 100% 2%, 0 2%); transform: translate(0, -2px); }
    40%  { clip-path: polygon(0 33%, 100% 33%, 100% 33%, 0 33%); transform: translate(2px, 1px); }
    50%  { clip-path: polygon(0 44%, 100% 44%, 100% 44%, 0 44%); transform: translate(-2px, 0); }
    60%  { clip-path: polygon(0 50%, 100% 50%, 100% 60%, 0 60%); transform: translate(1px, -1px); }
    70%  { clip-path: polygon(0 70%, 100% 70%, 100% 70%, 0 70%); transform: translate(-1px, 2px); }
    80%  { clip-path: polygon(0 80%, 100% 80%, 100% 85%, 0 85%); transform: translate(2px, -1px); }
    90%  { clip-path: polygon(0 5%, 100% 5%, 100% 6%, 0 6%); transform: translate(-2px, 0); }
    100% { clip-path: polygon(0 40%, 100% 40%, 100% 42%, 0 42%); transform: translate(1px, 1px); }
}

@keyframes glitch-after {
    0%   { clip-path: polygon(0 65%, 100% 65%, 100% 70%, 0 70%); transform: translate(2px, 1px); }
    15%  { clip-path: polygon(0 80%, 100% 80%, 100% 85%, 0 85%); transform: translate(-1px, -1px); }
    25%  { clip-path: polygon(0 55%, 100% 55%, 100% 60%, 0 60%); transform: translate(1px, 2px); }
    35%  { clip-path: polygon(0 90%, 100% 90%, 100% 95%, 0 95%); transform: translate(-2px, 0); }
    45%  { clip-path: polygon(0 75%, 100% 75%, 100% 80%, 0 80%); transform: translate(0, -2px); }
    55%  { clip-path: polygon(0 60%, 100% 60%, 100% 62%, 0 62%); transform: translate(2px, 0); }
    65%  { clip-path: polygon(0 95%, 100% 95%, 100% 97%, 0 97%); transform: translate(-1px, 1px); }
    75%  { clip-path: polygon(0 68%, 100% 68%, 100% 72%, 0 72%); transform: translate(1px, -1px); }
    85%  { clip-path: polygon(0 85%, 100% 85%, 100% 88%, 0 88%); transform: translate(-2px, 2px); }
    100% { clip-path: polygon(0 72%, 100% 72%, 100% 75%, 0 75%); transform: translate(2px, -1px); }
}

@keyframes glitch-skew {
    0%   { transform: skew(0deg); }
    2%   { transform: skew(2deg); }
    4%   { transform: skew(-1deg); }
    6%   { transform: skew(0deg); }
    40%  { transform: skew(0deg); }
    42%  { transform: skew(-1.5deg); }
    44%  { transform: skew(0.8deg); }
    46%  { transform: skew(0deg); }
    80%  { transform: skew(0deg); }
    81%  { transform: skew(1deg); }
    82%  { transform: skew(-0.5deg); }
    83%  { transform: skew(0deg); }
    100% { transform: skew(0deg); }
}

.hero-subtitle {
    font-family: var(--font-mono); font-size: 15px;
    color: #fff; margin-top: 10px; opacity: 0.9;
}

/* ===== PLAYSTAR SHOWCASE — FLICKERING GLOW ===== */
.playstar-showcase {
    margin-top: 36px;
    width: 500px; max-width: 100%;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(73, 196, 206, 0.45);
    overflow: hidden; position: relative;
    cursor: default;
    transition: border-color 0.1s;
    /*animation: glow-flicker 4s step-end infinite;*/
}

@keyframes glow-flicker {
    0%   { box-shadow: 0 0 10px rgba(26,255,250,0.15), 0 0 20px rgba(26,255,250,0.08); border-color: rgba(73,196,206,0.45); }
    5%   { box-shadow: 0 0 18px rgba(26,255,250,0.3), 0 0 35px rgba(26,255,250,0.15); border-color: rgba(26,255,250,0.7); }
    8%   { box-shadow: 0 0 8px rgba(26,255,250,0.1); border-color: rgba(73,196,206,0.3); }
    12%  { box-shadow: 0 0 22px rgba(26,255,250,0.4), 0 0 45px rgba(26,255,250,0.2); border-color: var(--cyan-bright); }
    15%  { box-shadow: 0 0 10px rgba(26,255,250,0.12); border-color: rgba(73,196,206,0.35); }
    40%  { box-shadow: 0 0 10px rgba(26,255,250,0.12), 0 0 20px rgba(26,255,250,0.06); border-color: rgba(73,196,206,0.4); }
    42%  { box-shadow: 0 0 25px rgba(26,255,250,0.5), 0 0 50px rgba(26,255,250,0.25); border-color: var(--cyan-bright); }
    44%  { box-shadow: 0 0 6px rgba(26,255,250,0.08); border-color: rgba(73,196,206,0.25); }
    46%  { box-shadow: 0 0 20px rgba(26,255,250,0.35), 0 0 40px rgba(26,255,250,0.18); border-color: rgba(26,255,250,0.6); }
    48%  { box-shadow: 0 0 10px rgba(26,255,250,0.12); border-color: rgba(73,196,206,0.4); }
    75%  { box-shadow: 0 0 10px rgba(26,255,250,0.12); border-color: rgba(73,196,206,0.4); }
    76%  { box-shadow: 0 0 30px rgba(26,255,250,0.55), 0 0 60px rgba(26,255,250,0.3); border-color: var(--cyan-bright); }
    78%  { box-shadow: 0 0 8px rgba(26,255,250,0.1); border-color: rgba(73,196,206,0.3); }
    80%  { box-shadow: 0 0 15px rgba(26,255,250,0.25), 0 0 30px rgba(26,255,250,0.12); border-color: rgba(26,255,250,0.5); }
    82%  { box-shadow: 0 0 10px rgba(26,255,250,0.12); border-color: rgba(73,196,206,0.4); }
    100% { box-shadow: 0 0 10px rgba(26,255,250,0.12), 0 0 20px rgba(26,255,250,0.06); border-color: rgba(73,196,206,0.4); }
}

.playstar-showcase:hover {
    animation: none;
    box-shadow: 0 0 20px rgba(26,255,250,0.4), 0 0 40px rgba(26,255,250,0.2);
    border-color: var(--cyan-bright);
}

.playstar-header {
    background: var(--cyan);
    display: flex; justify-content: space-between; align-items: center;
    padding: 3px 14px; height: 22px;
}
.playstar-header .title {
    font-family: var(--font-mono); font-size: 11px;
    font-weight: 700; color: #000;
}
.playstar-header .link {
    font-family: var(--font-mono); font-size: 8px;
    color: rgba(0,0,0,0.4); text-decoration: none;
}

.playstar-body {
    position: relative; width: 100%; height: calc(100% - 22px);
    background: #0a0c0e; overflow: hidden;
}
.playstar-body img {
    width: 100%; height: 100%;
    object-fit: cover; object-position: left top; display: block;
}
.playstar-body .version-overlay {
    position: absolute; top: 5px; right: 10px;
    text-align: right; font-family: var(--font-mono); font-size: 7px;
    color: var(--cyan); text-shadow: 0 0 4px rgba(73,196,206,0.5); line-height: 1.3;
}
.playstar-body .watermark {
    position: absolute; bottom: 5px; left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono); font-size: 7px;
    color: var(--cyan); opacity: 0.6;
}

/* ===== SOCIAL ===== */
.social-icons {
    display: flex; gap: 8px;
    margin-top: auto; padding-bottom: 8px;
}
.social-icons a {
    display: flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; transition: filter 0.2s;
}
.social-icons a:hover { filter: brightness(1.4) drop-shadow(0 0 4px var(--cyan-glow)); }
.social-icons img {
    width: 22px; height: 22px;
    filter: brightness(0) invert(1); opacity: 0.85;
}

/* ===== DESCRIPTION BOX — FIXED SIZE + TEXTURE ===== */
.description-box {
    position: relative;
    width: 386px; min-height: 208px;
    overflow: hidden;
    flex-shrink: 0;
}
.description-box::before {
    content: ''; position: absolute; inset: 0;
    background: var(--desc-texture) center / 100% 100% no-repeat;
    opacity: 0.85;
}
.description-box::after {
    content: ''; position: absolute; inset: 0;
    background: rgba(10,12,14,0.3);
}
.description-header {
    position: relative; z-index: 2;
    background: var(--yellow-accent);
    padding: 4px 30px;
    font-family: var(--font-mono); font-size: 9px;
    font-weight: 700; color: #000; letter-spacing: 2px;
    text-transform: uppercase;
    margin: 14px 30px 0 30px;
}
.description-text {
    position: relative; z-index: 2;
    padding: 14px 16px 14px 14px;
    margin: 0 30px;
    font-family: var(--font-mono); font-size: 13px;
    line-height: 1.65; color: var(--text-body);
}

/* ===== PROJECT CARDS — FIXED SIZE + TEXTURE ===== */
.projects-scroll {
    width: 386px; max-height: 340px;
    overflow-y: auto;
    display: flex; flex-direction: column; gap: 8px;
    margin-top: 16px;
    scrollbar-width: thin; scrollbar-color: var(--cyan) transparent;
}
.projects-scroll::-webkit-scrollbar { width: 3px; }
.projects-scroll::-webkit-scrollbar-track { background: transparent; }
.projects-scroll::-webkit-scrollbar-thumb { background: var(--cyan); border-radius: 2px; }

.project-card {
    position: relative;
    width: 375px; min-height: 110px;
    overflow: hidden; cursor: pointer;
    transition: filter 0.2s;
    text-decoration: none; color: inherit;
    display: block;
}
.project-card::before {
    content: ''; position: absolute; inset: 0;
    background: var(--card-texture) center / 100% 100% no-repeat;
    opacity: 0.92;
}
.project-card:hover { filter: brightness(1.15); }

.project-card::after {
    content: '';
    position: absolute; inset: 0;
    z-index: 2;
    opacity: 0;
    pointer-events: none;
    background: rgba(26,255,250,0.18);
}

.project-card:hover::after {
    animation: card-flash 0.15s steps(1) forwards;
}

@keyframes card-flash {
    0%   { opacity: 1; }
    50%  { opacity: 0; }
    70%  { opacity: 0.7; }
    100% { opacity: 0; }
}

.project-card-inner {
    position: relative; z-index: 1;
    display: flex; align-items: flex-start;
    height: 100%; padding: 4px 10px 4px 14px;
}

.project-card .gh-icon {
    width: 69px; height: 74px;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    margin-top: 10px;
}
.project-card .gh-icon img {
    width: 55px; height: 55px;
    filter: var(--cyan) drop-shadow(0 0 3px var(--cyan-glow));
    opacity: 0.9;
}

.project-card .card-info {
    flex: 1; padding-left: 18px; min-width: 0;
    padding-top: 4px;
}

.project-card .card-label {
    font-family: var(--font-mono); font-size: 6px;
    color: var(--cyan); letter-spacing: 1.5px;
    text-shadow: 0 0 3px rgba(73,196,206,0.4);
    text-transform: uppercase;
    margin-bottom: 2px;
}
.project-card .card-name {
    font-family: var(--font-title); font-weight: 700;
    font-size: 14px; color: var(--cyan);
    text-shadow: 0 0 4px rgba(73,196,206,0.35);
    margin-top: 1px; margin-bottom: 12px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.project-card .card-desc-label {
    font-family: var(--font-mono); font-size: 6px;
    color: var(--cyan); letter-spacing: 1.5px;
    text-shadow: 0 0 3px rgba(73,196,206,0.4);
    text-transform: uppercase;
    margin-bottom: 2px;
}
.project-card .card-desc {
    font-family: var(--font-title); font-weight: 700;
    font-size: 11px; color: var(--cyan); line-height: 1.5;
    margin-top: 2px;
    max-width: 230px;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}

/* ===== CONTACT BUTTON ===== */
.contact-btn {
    position: fixed; bottom: 26px; right: 30px;
    z-index: 50;
    background: var(--cyan); color: #000;
    font-family: var(--font-mono); font-size: 12px;
    letter-spacing: 1px; padding: 10px 42px;
    border: none; cursor: pointer;
    transform: skewX(-14deg);
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 0 12px var(--cyan-glow);
}
.contact-btn span { display: inline-block; transform: skewX(14deg); }
.contact-btn:hover {
    background: var(--cyan-bright);
    box-shadow: 0 0 20px var(--cyan-glow), 0 0 40px rgba(73,196,206,0.2);
}

/* ===========================================
   MOBILE RESPONSIVE
   =========================================== */
@media (max-width: 960px) {
    .navbar nav {
        position: fixed; top: 0; left: 0; right: 0;
        background: rgba(19,19,19,0.96);
        flex-direction: column; align-items: center;
        gap: 0; padding: 65px 0 20px;
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        z-index: 150;
    }
    .navbar nav.open { transform: translateY(0); }
    .navbar nav a {
        padding: 12px 0; font-size: 15px;
    }
    .navbar .hamburger { display: flex; }

    .main-container {
        flex-direction: column;
        padding: 80px 16px 80px 16px;
        align-items: center;
    }
    .left-column {
        padding-right: 0; align-items: center; width: 100%;
    }
    .right-column {
        align-items: center; width: 100%; margin-right: 0;
    }
    .hero-title { font-size: 32px; text-align: center; }
    .hero-subtitle { text-align: center; }

    .playstar-showcase {
        width: 100%; max-width: 500px;
    }

    .description-box {
        width: 100%; max-width: 500px;
    }
    .projects-scroll {
        width: 100%; max-width: 500px;
    }
    .project-card {
        width: 100%; min-width: 300px; max-width: 420px;
        margin-left: auto; margin-right: auto;
    }

    .contact-btn {
        bottom: 16px; right: 16px;
        padding: 10px 28px; font-size: 11px;
    }
}

@media (max-width: 480px) {
    .hero-title { font-size: 26px; letter-spacing: 2px; }
    .hero-subtitle { font-size: 13px; }

    .description-box { min-height: 180px; width: 100%; max-width: 380px; }
    .project-card { min-height: 100px; min-width: 260px; max-width: 380px; }
    .projects-scroll { max-width: 380px; }

    .navbar .logo { left: 16px; font-size: 12px; }
}
