/* ============================================================
   ROOT & RESET
============================================================ */
:root {
    --bg: #080810;
    --bg-2: #0e0e1a;
    --card-bg: #13131f;
    --card-border: rgba(124, 58, 237, 0.15);
    --accent: #7c3aed;
    --accent-2: #38bdf8;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --gradient: linear-gradient(135deg, #7c3aed, #38bdf8);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
}

/* ============================================================
   UTILS
============================================================ */
.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 6rem 0;
}

.section-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent-2);
    margin-bottom: 0.75rem;
}

section h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 3rem;
}

/* ============================================================
   SCROLL REVEAL
============================================================ */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ============================================================
   NAV
============================================================ */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 5%;
    background: rgba(8, 8, 16, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.3s;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 40px;
    width: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.logo-text {
    font-weight: 600;
    font-size: 1rem;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
}

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

.nav-cta {
    background: var(--gradient);
    color: var(--text) !important;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-weight: 600 !important;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s;
}

/* ============================================================
   HERO
============================================================ */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    padding: 8rem 10% 4rem;
    background:
        radial-gradient(ellipse at 70% 50%, rgba(124, 58, 237, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 20% 80%, rgba(56, 189, 248, 0.06) 0%, transparent 50%);
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: var(--accent-2);
    padding: 0.4rem 1rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.hero-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--accent-2);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.75); }
}

#hero h1 {
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 700;
    line-height: 1.05;
    margin-bottom: 0.75rem;
}

.hero-subtitle {
    font-family: 'Space Mono', monospace;
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

#hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 520px;
    margin-bottom: 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.85rem 2rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    font-family: 'Space Grotesk', sans-serif;
}

.btn-primary {
    background: var(--gradient);
    color: var(--text);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    border-color: var(--accent-2);
    color: var(--accent-2);
}

.hero-image {
    flex-shrink: 0;
}

.image-ring {
    position: relative;
    width: 280px;
    height: 280px;
}

.image-ring::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: var(--gradient);
    z-index: 0;
    animation: spin 8s linear infinite;
}

.image-ring::after {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: var(--gradient);
    opacity: 0.2;
    z-index: 0;
    filter: blur(8px);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.image-ring img {
    position: relative;
    z-index: 1;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid var(--bg);
}

/* ============================================================
   ABOUT
============================================================ */
#about {
    background: var(--bg-2);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.stat {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    transition: border-color 0.3s, transform 0.3s;
}

.stat:hover {
    border-color: rgba(124, 58, 237, 0.4);
    transform: translateY(-3px);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ============================================================
   SKILLS
============================================================ */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.skill-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.75rem;
    transition: border-color 0.3s, transform 0.3s;
}

.skill-card:hover {
    border-color: rgba(124, 58, 237, 0.5);
    transform: translateY(-4px);
}

.skill-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.skill-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

/* ============================================================
   GAMES
============================================================ */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.game-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    display: block;
    position: relative;
}

.game-card:hover {
    transform: translateY(-6px);
    border-color: rgba(124, 58, 237, 0.5);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.game-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.card-content {
    padding: 1.25rem;
}

.card-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.repo-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.25rem 1rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent-2);
    opacity: 0.7;
    transition: opacity 0.2s;
}

.game-card:hover .repo-link {
    opacity: 1;
}

.wip-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(251, 191, 36, 0.9);
    color: #000;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 100px;
    letter-spacing: 0.03em;
}

/* ============================================================
   TAG (shared)
============================================================ */
.tag {
    background: rgba(124, 58, 237, 0.15);
    color: var(--accent-2);
    border: 1px solid rgba(56, 189, 248, 0.2);
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 500;
}

/* ============================================================
   CONTACT
============================================================ */
#contact {
    background: var(--bg-2);
    text-align: center;
}

.contact-intro {
    color: var(--text-muted);
    max-width: 500px;
    margin: -1.5rem auto 3rem;
    font-size: 1.05rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
    text-align: left;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.2s, transform 0.2s;
}

.contact-card:hover {
    border-color: rgba(56, 189, 248, 0.5);
    transform: translateX(4px);
}

.contact-card img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}

.contact-card div {
    display: flex;
    flex-direction: column;
}

.contact-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.contact-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

/* ============================================================
   FOOTER
============================================================ */
footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 2rem 5%;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-logo img {
    height: 36px;
    width: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.footer-logo span {
    font-weight: 600;
}

footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 768px) {
    #hero {
        flex-direction: column-reverse;
        padding: 7rem 5% 4rem;
        text-align: center;
        gap: 2rem;
    }

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

    #hero p {
        margin-left: auto;
        margin-right: auto;
    }

    .image-ring,
    .image-ring img {
        width: 200px;
        height: 200px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .menu-toggle {
        display: flex;
    }

    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(8, 8, 16, 0.98);
        padding: 1.5rem;
        gap: 1.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    nav ul.open {
        display: flex;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-logo {
        justify-content: center;
    }
}
