/* ══════════════════════════════════════════════════
   EVXRST — Digital Identity  |  styles.css
   ══════════════════════════════════════════════════ */

:root {
    --bg: #020205;
    --accent: #a78bfa;
    --accent2: #60a5fa;
    --accent3: #f472b6;
    --text: #ffffff;
    --dim: rgba(255,255,255,0.38);
    --card-bg: rgba(255,255,255,0.025);
    --card-border: rgba(255,255,255,0.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Syne', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
}

body::after {
    content: '';
    position: fixed;
    inset: -20%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.12;
    background:
        radial-gradient(circle at 20% 30%, rgba(96,165,250,0.22), transparent 36%),
        radial-gradient(circle at 78% 22%, rgba(167,139,250,0.2), transparent 34%),
        radial-gradient(circle at 52% 82%, rgba(244,114,182,0.18), transparent 38%);
    filter: blur(48px) saturate(115%);
    animation: auraDrift 18s ease-in-out infinite alternate;
}

@keyframes auraDrift {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(0, -2%, 0) scale(1.05); }
}

/* ─── CANVAS ─── */
#cosmos {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
}

/* ─── LAYOUT ─── */
.page {
    position: relative;
    z-index: 1;
}

/* ─── NAV ─── */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 1.5rem 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(to bottom, rgba(2,2,5,0.85) 0%, transparent 100%);
    backdrop-filter: blur(0px);
}

.nav-logo {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: white;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--dim);
    text-decoration: none;
    font-size: 0.85rem;
    font-family: 'DM Mono', monospace;
    letter-spacing: 0.08em;
    transition: color 0.3s;
}

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

.nav-auth {
    font-family: 'DM Mono', monospace;
    font-size: 0.8rem;
    padding: 0.6rem 1.4rem;
    border-radius: 100px;
    border: 1px solid var(--card-border);
    color: white;
    background: var(--card-bg);
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-auth:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.15);
}

/* ─── HERO ─── */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 2rem 6rem;
    position: relative;
}

.hero-tag {
    font-family: 'DM Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.25em;
    color: var(--accent);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    opacity: 0;
    animation: fadeUp 1s ease 0.3s forwards;
}

.hero-tag::before,
.hero-tag::after {
    content: '';
    display: block;
    width: 2rem;
    height: 1px;
    background: var(--accent);
    opacity: 0.5;
}

.hero-name {
    font-size: clamp(5rem, 14vw, 13rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 0.88;
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.5) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    animation: fadeUp 1s ease 0.5s forwards;
    position: relative;
    cursor: default;
}

.hero-name::after {
    content: 'EVXRST';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 50%, var(--accent3) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    transition: opacity 0.4s;
}

.hero-name:hover::after { opacity: 0.15; }

.hero-sub {
    margin-top: 2rem;
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--dim);
    font-weight: 400;
    letter-spacing: 0.02em;
    opacity: 0;
    animation: fadeUp 1s ease 0.7s forwards;
}

.hero-sub em {
    font-style: normal;
    color: rgba(255,255,255,0.7);
}

.hero-scroll {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    animation: fadeUp 1s ease 1.5s forwards;
}

.hero-scroll span {
    font-family: 'DM Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    color: var(--dim);
}

.scroll-line {
    width: 1px;
    height: 3rem;
    background: linear-gradient(to bottom, var(--dim), transparent);
    animation: scrollPulse 2s ease infinite;
}

@keyframes scrollPulse {
    0%, 100% { transform: scaleY(1); opacity: 0.5; }
    50% { transform: scaleY(0.6); opacity: 1; }
}

/* ─── SECTION ─── */
section {
    padding: 8rem 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.section-label {
    font-family: 'DM Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    color: var(--accent);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.section-label::after {
    content: '';
    flex: 1;
    max-width: 4rem;
    height: 1px;
    background: var(--accent);
    opacity: 0.4;
}

.section-title {
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin-bottom: 1.5rem;
}

.section-title span {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─── IDENTITY SECTION ─── */
.identity-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 4rem;
}

.identity-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 2.5rem;
    backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
}

.identity-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(600px circle at var(--mx,50%) var(--my,50%), rgba(167,139,250,0.06), transparent 40%);
    opacity: 0;
    transition: opacity 0.3s;
}

.identity-card:hover::before { opacity: 1; }

.identity-card:hover {
    border-color: rgba(167,139,250,0.2);
    transform: translateY(-4px);
    box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}

.identity-card.wide {
    grid-column: 1 / -1;
}

.ic-icon {
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 1.5rem;
    opacity: 0.7;
}

.ic-num {
    font-family: 'DM Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    color: var(--dim);
    margin-bottom: 0.75rem;
}

.ic-title {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.6rem;
}

.ic-desc {
    font-size: 0.9rem;
    color: var(--dim);
    line-height: 1.7;
    font-weight: 400;
}

/* ─── PROJECTS ─── */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 4rem;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 28px;
    padding: 2.5rem;
    text-decoration: none;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
    transform-style: preserve-3d;
    perspective: 800px;
}

/* ── 3D tilt layer ── */
.project-card-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100%;
    transition: transform 0.1s ease;
}

.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s;
}

.project-card.setka::before {
    background: radial-gradient(ellipse at 0% 0%, rgba(96,165,250,0.08) 0%, transparent 60%);
}

.project-card.hackaton::before {
    background: radial-gradient(ellipse at 100% 0%, rgba(167,139,250,0.08) 0%, transparent 60%);
}

.project-card.rawbox::before {
    background: radial-gradient(ellipse at 50% 100%, rgba(244,114,182,0.06) 0%, transparent 60%);
}

.project-card:hover::before { opacity: 1; }

/* Holographic shimmer overlay */
.project-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 28px;
    background: linear-gradient(
        105deg,
        transparent 40%,
        rgba(167,139,250,0.04) 50%,
        rgba(96,165,250,0.04) 55%,
        transparent 65%
    );
    background-size: 200% 200%;
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.project-card:not(.coming):hover::after {
    opacity: 1;
    animation: holographicShimmer 2s linear infinite;
}

@keyframes holographicShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.project-card.coming {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}

.project-card:not(.coming):hover {
    transform: translateY(-6px) scale(1.01);
    border-color: rgba(255,255,255,0.12);
    box-shadow: 0 40px 100px rgba(0,0,0,0.7), 0 0 0 1px rgba(167,139,250,0.1);
}

.projects-dynamic {
    margin-top: 1.8rem;
    padding: 1.2rem;
    border-radius: 24px;
    border: 1px solid var(--card-border);
    background: linear-gradient(145deg, rgba(255,255,255,0.045), rgba(255,255,255,0.02));
    position: relative;
    overflow: hidden;
}

.projects-dynamic::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.35;
    background: linear-gradient(120deg, transparent 30%, rgba(167,139,250,0.07) 45%, rgba(96,165,250,0.08) 52%, transparent 68%);
    background-size: 220% 100%;
    animation: dynamicSheen 6s linear infinite;
}

@keyframes dynamicSheen {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.projects-dynamic-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.9rem;
    position: relative;
    z-index: 1;
}

.projects-dynamic-head h3 {
    font-size: 1.2rem;
}

.projects-type-controls {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.project-type-chip {
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.03);
    color: var(--dim);
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
    font-family: 'DM Mono', monospace;
    font-size: 0.68rem;
    letter-spacing: 0.07em;
    cursor: pointer;
}

.project-type-chip.active {
    color: white;
    border-color: rgba(167,139,250,0.45);
    background: rgba(167,139,250,0.12);
}

.active-projects-btn {
    margin-bottom: 0.9rem;
    position: relative;
    z-index: 1;
}

.projects-live-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    position: relative;
    z-index: 1;
}

.project-live-item {
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 16px;
    padding: 0.85rem;
    background: rgba(255,255,255,0.02);
    min-height: 100%;
}

.project-live-item h4 {
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
}

.project-live-meta {
    color: var(--dim);
    font-family: 'DM Mono', monospace;
    font-size: 0.7rem;
    margin-bottom: 0.5rem;
}

.project-live-item p {
    color: var(--dim);
    font-size: 0.83rem;
    line-height: 1.6;
}

.project-live-item a {
    margin-top: 0.65rem;
    display: inline-flex;
    color: var(--accent2);
    text-decoration: none;
    font-family: 'DM Mono', monospace;
    font-size: 0.72rem;
}

.game-servers-section {
    margin-top: 1.1rem;
    position: relative;
    z-index: 1;
}

.game-servers-section h3 {
    margin-bottom: 0.7rem;
    font-size: 1.05rem;
}

.pc-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.pc-tag {
    font-family: 'DM Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.18em;
    padding: 0.35rem 0.8rem;
    border-radius: 100px;
    border: 1px solid var(--card-border);
    color: var(--dim);
}

.pc-tag.live {
    border-color: rgba(96,165,250,0.3);
    color: var(--accent2);
    background: rgba(96,165,250,0.08);
    animation: livePulse 2s ease infinite;
}

@keyframes livePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(96,165,250,0.3); }
    50% { box-shadow: 0 0 0 6px rgba(96,165,250,0); }
}

.pc-tag.active {
    border-color: rgba(167,139,250,0.3);
    color: var(--accent);
    background: rgba(167,139,250,0.08);
}

.pc-tag.wip {
    border-color: rgba(244,114,182,0.3);
    color: var(--accent3);
    background: rgba(244,114,182,0.08);
}

.pc-arrow {
    width: 1.5rem;
    height: 1.5rem;
    opacity: 0.3;
    transition: all 0.3s;
}

.project-card:not(.coming):hover .pc-arrow {
    opacity: 1;
    transform: translate(3px, -3px);
}

.pc-body {
    flex: 1;
}

.pc-name {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 0.6rem;
}

.pc-desc {
    font-size: 0.9rem;
    color: var(--dim);
    line-height: 1.7;
    font-weight: 400;
}

.pc-foot {
    font-family: 'DM Mono', monospace;
    font-size: 0.72rem;
    color: var(--dim);
    letter-spacing: 0.08em;
}

/* Main featured project */
.project-card.featured {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    gap: 3rem;
    padding: 3rem;
}

.project-card.featured .pc-body { flex: 1; }
.project-card.featured .pc-name { font-size: 2.8rem; }

.project-card.featured .project-card-inner {
    flex-direction: row;
    align-items: center;
    gap: 3rem;
    width: 100%;
}

.pc-visual {
    width: 140px;
    height: 140px;
    flex-shrink: 0;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    background: rgba(96,165,250,0.07);
    border: 1px solid rgba(96,165,250,0.12);
    transition: all 0.4s;
    position: relative;
    overflow: hidden;
}

.pc-visual::after {
    content: '';
    position: absolute;
    inset: -50%;
    background: conic-gradient(from 0deg, transparent, rgba(96,165,250,0.15), transparent 60%);
    animation: visualSpin 4s linear infinite;
    opacity: 0;
    transition: opacity 0.4s;
}

.project-card:not(.coming):hover .pc-visual::after { opacity: 1; }

@keyframes visualSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ─── QUANTUM PARTICLE BUTTON ─── */
.quantum-btn-wrap {
    position: relative;
    display: inline-flex;
}

.quantum-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.6rem;
    border-radius: 100px;
    border: 1px solid rgba(167,139,250,0.25);
    background: rgba(167,139,250,0.06);
    color: var(--accent);
    font-family: 'DM Mono', monospace;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
    text-decoration: none;
    z-index: 1;
    user-select: none;
}

.quantum-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--bx,50%) var(--by,50%), rgba(167,139,250,0.18), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.quantum-btn:hover::before { opacity: 1; }
.quantum-btn:hover {
    border-color: rgba(167,139,250,0.5);
    box-shadow: 0 0 20px rgba(167,139,250,0.2), 0 8px 30px rgba(0,0,0,0.4);
    transform: translateY(-2px);
}

.quantum-btn:active { transform: scale(0.96) translateY(0); }

/* particle canvas overlay per card */
.card-particles-canvas {
    position: absolute;
    inset: 0;
    border-radius: 28px;
    pointer-events: none;
    z-index: 10;
}

/* ─── GLITCH TEXT ─── */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}

.glitch:hover::before {
    opacity: 0.7;
    color: var(--accent2);
    clip-path: polygon(0 20%, 100% 20%, 100% 40%, 0 40%);
    transform: translate(-2px, 0);
    animation: glitchA 0.4s steps(2) infinite;
}

.glitch:hover::after {
    opacity: 0.7;
    color: var(--accent3);
    clip-path: polygon(0 60%, 100% 60%, 100% 80%, 0 80%);
    transform: translate(2px, 0);
    animation: glitchB 0.4s steps(2) 0.1s infinite;
}

@keyframes glitchA {
    0%,100% { transform: translate(-2px, 0); clip-path: polygon(0 20%, 100% 20%, 100% 40%, 0 40%); }
    50%      { transform: translate(2px, -1px); clip-path: polygon(0 25%, 100% 25%, 100% 35%, 0 35%); }
}

@keyframes glitchB {
    0%,100% { transform: translate(2px, 0); clip-path: polygon(0 60%, 100% 60%, 100% 80%, 0 80%); }
    50%      { transform: translate(-2px, 1px); clip-path: polygon(0 65%, 100% 65%, 100% 75%, 0 75%); }
}

/* ─── WAVEFORM BAR (bottom of hero) ─── */
.hero-waveform {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    padding-bottom: 8px;
    opacity: 0.18;
    pointer-events: none;
}

.wave-bar {
    width: 2px;
    border-radius: 2px;
    background: linear-gradient(to top, var(--accent), var(--accent2));
    animation: waveDance 1.4s ease-in-out infinite;
}

@keyframes waveDance {
    0%, 100% { transform: scaleY(0.3); }
    50% { transform: scaleY(1); }
}

/* ─── SCANLINE OVERLAY ─── */
.scanlines {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 2px,
        rgba(0,0,0,0.03) 2px,
        rgba(0,0,0,0.03) 4px
    );
    opacity: 0.4;
}

/* ─── QUANTUM COUNTER ─── */
.quantum-stats {
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
}

.q-stat {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.q-stat-value {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.q-stat-label {
    font-family: 'DM Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    color: var(--dim);
}

/* ─── ENTANGLEMENT LINES (SVG) ─── */
#entangle-svg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.35;
}

/* ─── CATALOG BUTTON ─── */
.catalog-btn-wrap {
    margin-top: 3rem;
    text-align: center;
}

.psychedelic-catalog-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    width: 100%;
    padding: 1rem 2.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    color: white;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.1em;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    backdrop-filter: blur(10px);
}

.psychedelic-catalog-btn:hover {
    background: rgba(167, 139, 250, 0.15);
    border-color: rgba(167, 139, 250, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(167, 139, 250, 0.2);
}

/* ─── CATALOG TRIGGER WRAP ─── */
.catalog-trigger-wrap {
    position: relative;
    width: 100%;
    margin-top: 2rem;
}

.popular-projects-popup {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    transform: translateY(-10px);
    background: rgba(10, 10, 15, 0.95);
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(20px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 1000;
    pointer-events: none;
}

.popular-projects-popup::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid rgba(167, 139, 250, 0.2);
}

.popular-projects-popup::after {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 7px solid rgba(10, 10, 15, 0.95);
}

.popular-projects-popup.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
}

.popup-close {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--dim);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.popup-projects {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.popup-project-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    transition: all 0.3s;
    text-decoration: none;
}

.popup-project-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.popup-project-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #a78bfa, #60a5fa);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.popup-project-info {
    flex: 1;
}

.popup-project-name {
    font-family: 'Syne', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    color: white;
}

.popup-project-likes {
    font-family: 'DM Mono', monospace;
    font-size: 0.7rem;
    color: var(--dim);
}

/* ─── AUTH SECTION ─── */
.auth-section {
    padding: 8rem 2rem;
    text-align: center;
}

.auth-card-wrap {
    max-width: 500px;
    margin: 4rem auto 0;
}

.auth-card-main {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 36px;
    padding: 3rem;
    backdrop-filter: blur(30px);
    box-shadow: 0 60px 120px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.04);
}

.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    width: 100%;
    padding: 1.2rem;
    border-radius: 18px;
    background: white;
    color: black;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 10px 40px rgba(255,255,255,0.1);
    letter-spacing: -0.01em;
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.3) 50%, transparent 60%);
    transform: translateX(-100%);
    transition: transform 0s;
}

.btn-primary:hover::after {
    transform: translateX(100%);
    transition: transform 0.5s ease;
}

.btn-primary:hover {
    transform: scale(0.97);
    box-shadow: 0 6px 20px rgba(255,255,255,0.06);
}

/* ─── FOOTER ─── */
footer {
    border-top: 1px solid var(--card-border);
    padding: 4rem 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1100px;
    margin: 0 auto;
}

.footer-left .f-logo {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

.footer-left .f-sub {
    font-size: 0.8rem;
    color: var(--dim);
    font-family: 'DM Mono', monospace;
}

.footer-right {
    text-align: right;
}

.footer-right p {
    font-size: 0.8rem;
    color: var(--dim);
    font-family: 'DM Mono', monospace;
    line-height: 1.8;
}

/* ─── MODAL ─── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(12px);
}

.modal-overlay.open { display: flex; }

.modal {
    width: 100%;
    max-width: 420px;
    background: #0c0c12;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 32px;
    padding: 2.5rem;
    box-shadow: 0 80px 160px rgba(0,0,0,0.9);
    position: relative;
    animation: modalIn 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

.modal-close {
    position: absolute;
    top: 1.5rem; right: 1.5rem;
    background: rgba(255,255,255,0.05);
    border: none;
    color: var(--dim);
    width: 2rem; height: 2rem;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover { background: rgba(255,255,255,0.1); color: white; }

.modal h2 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.4rem;
}

.modal-subtitle {
    font-size: 0.82rem;
    color: var(--dim);
    font-family: 'DM Mono', monospace;
    margin-bottom: 2rem;
}

.tab-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: rgba(255,255,255,0.03);
    padding: 0.3rem;
    border-radius: 14px;
}

.tab-btn {
    padding: 0.65rem;
    border: none;
    border-radius: 10px;
    font-family: 'Syne', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    background: transparent;
    color: var(--dim);
    transition: all 0.2s;
}

.tab-btn.active {
    background: white;
    color: black;
}

.field {
    margin-bottom: 1rem;
}

.field label {
    display: block;
    font-family: 'DM Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    color: var(--dim);
    margin-bottom: 0.5rem;
}

.field input {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    color: white;
    font-family: 'DM Mono', monospace;
    font-size: 0.88rem;
    outline: none;
    transition: border-color 0.2s;
}

.field input:focus {
    border-color: rgba(167,139,250,0.4);
}

.field input::placeholder { color: rgba(255,255,255,0.2); }

.modal .btn-primary { margin-top: 1.5rem; }

#authStatus {
    font-family: 'DM Mono', monospace;
    font-size: 0.78rem;
    margin-top: 1rem;
    min-height: 1.2em;
    color: var(--dim);
}

#authStatus.error { color: #f87171; }

.account-box {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.account-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    object-fit: cover;
}

.account-name {
    font-weight: 700;
    font-size: 0.95rem;
}

.account-id {
    font-family: 'DM Mono', monospace;
    font-size: 0.7rem;
    color: var(--dim);
    margin-top: 0.1rem;
}

.btn-logout {
    margin-top: 1rem;
    width: 100%;
    padding: 0.85rem;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    color: var(--dim);
    font-family: 'Syne', sans-serif;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-logout:hover { background: rgba(255,255,255,0.05); color: white; }

.auth-avatar-mini {
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 50%;
    object-fit: cover;
}

/* ─── ANIMATIONS ─── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ─── NOISE TEXTURE ─── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 180px;
}

/* ─── QUANTUM FIELD LINES ─── */
.quantum-field {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    border-radius: 28px;
}

.quantum-field-line {
    position: absolute;
    height: 1px;
    left: -10%;
    right: -10%;
    background: linear-gradient(90deg, transparent, rgba(167,139,250,0.15), transparent);
    transform-origin: left center;
    animation: fieldPulse 3s ease-in-out infinite;
    opacity: 0;
}

@keyframes fieldPulse {
    0% { opacity: 0; transform: scaleX(0) translateY(0); }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; transform: scaleX(1.1) translateY(2px); }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
    nav { padding: 1.25rem 1.5rem; }
    .nav-links { display: none; }
    .hero { padding: 7rem 1.5rem 5rem; }
    section { padding: 5rem 1.5rem; }
    .identity-grid { grid-template-columns: 1fr; }
    .identity-card.wide { grid-column: auto; }
    .projects-grid { grid-template-columns: 1fr; }
    .project-card.featured { flex-direction: column; grid-column: auto; gap: 2rem; }
    .project-card.featured .pc-name { font-size: 2.2rem; }
    .project-card.featured .project-card-inner { flex-direction: column; }
    .pc-visual { width: 100px; height: 100px; }
    footer { flex-direction: column; gap: 2rem; text-align: center; padding: 3rem 1.5rem; }
    .footer-right { text-align: center; }
    .auth-section { padding: 5rem 1.5rem; }
    .quantum-stats { gap: 1.5rem; }
    .projects-live-list { grid-template-columns: 1fr; }
    .projects-dynamic-head { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
    .hero-name { letter-spacing: -0.06em; }
}
