:root {
    --bg-color: #0d1117;
    --card-bg: #161b22;
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --accent-blue: #58a6ff;
    --accent-neon: #00f0ff;

    --youtube-color: #ff0000;
    --discord-color: #5865F2;
    --roblox-color: #b0b0b0;

    --font-main: 'Space Grotesk', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(0, 240, 255, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(88, 166, 255, 0.1) 0%, transparent 20%);
    overflow-x: hidden;
    /* Prevent horizontal scroll */
}

/* Matrix Background Canvas */
#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
}

.container {
    width: 100%;
    max-width: 480px;
    text-align: center;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
header {
    margin-bottom: 2rem;
}

.profile-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Braces removed - now part of the image */

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    /* Changed from 50% to rounded square to show full image */
    object-fit: contain;
    /* Ensure full image is visible */
    transform: none;
    border: 3px solid var(--accent-blue);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
    transition: transform 0.3s ease;
    z-index: 10;
    background-color: transparent;
}

.profile-container:hover .profile-img {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.5);
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, var(--accent-neon));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Links */
.links {
    display: flex;
    flex-direction: row;
    /* Changed to row */
    justify-content: center;
    gap: 1.5rem;
    /* Increased gap for better spacing */
    flex-wrap: wrap;
    /* Allow wrapping on very small screens */
}

.link-card {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    width: 60px;
    /* Fixed width */
    height: 60px;
    /* Fixed height for square shape */
    background-color: var(--card-bg);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    border: 1px solid rgba(240, 246, 252, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.link-card:hover {
    transform: translateY(-5px);
    /* Slightly larger lift */
    border-color: rgba(240, 246, 252, 0.3);
}

.icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0;
    /* Removed margin */
}

.icon svg {
    width: 32px;
    /* Slightly larger icons */
    height: 32px;
    stroke-width: 1.5;
}

.label {
    display: none;
    /* Hide label for square button look */
}

/* Brand Colors with Impressive Hover Effects */
.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.youtube:hover {
    background-color: rgba(255, 0, 0, 0.15);
    /* More visible background */
    border-color: var(--youtube-color);
    box-shadow:
        0 0 20px rgba(255, 0, 0, 0.4),
        0 0 40px rgba(255, 0, 0, 0.2),
        inset 0 0 10px rgba(255, 0, 0, 0.1);
    /* Inner glow */
    transform: translateY(-8px) scale(1.1);
    /* Bigger pop */
}

.youtube .icon {
    color: var(--youtube-color);
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.discord:hover {
    background-color: rgba(88, 101, 242, 0.15);
    border-color: var(--discord-color);
    box-shadow:
        0 0 20px rgba(88, 101, 242, 0.4),
        0 0 40px rgba(88, 101, 242, 0.2),
        inset 0 0 10px rgba(88, 101, 242, 0.1);
    transform: translateY(-8px) scale(1.1);
}

.discord .icon {
    color: var(--discord-color);
    text-shadow: 0 0 10px rgba(88, 101, 242, 0.5);
}

.roblox:hover {
    background-color: rgba(176, 176, 176, 0.15);
    border-color: var(--roblox-color);
    box-shadow:
        0 0 20px rgba(176, 176, 176, 0.4),
        0 0 40px rgba(176, 176, 176, 0.2),
        inset 0 0 10px rgba(176, 176, 176, 0.1);
    transform: translateY(-8px) scale(1.1);
}

.roblox .icon {
    color: var(--roblox-color);
    text-shadow: 0 0 10px rgba(176, 176, 176, 0.5);
}


/* Footer */
footer {
    margin-top: 3rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Portfolio Section */
.portfolio {
    width: 100%;
    margin-top: 3rem;
    animation: fadeIn 1s ease-out;
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    /* Decrease min width from 280px */
    gap: 1.5rem;
    justify-content: center;
    max-width: 800px;
    /* Limit grid width */
    margin: 0 auto;
}

.game-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(88, 166, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 320px;
    /* Limit card width */
    margin: 0 auto;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.15);
    border-color: var(--accent-blue);
}

.game-thumb {
    width: 100%;
    height: 140px;
    /* Reduced height from 160px */
    overflow: hidden;
}

.game-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game-card:hover .game-thumb img {
    transform: scale(1.1);
}

.game-content {
    padding: 1.2rem;
    text-align: left;
}

.game-content h3 {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.game-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1.2rem;
    line-height: 1.4;
}

.play-btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-neon));
    color: #000;
    font-weight: 700;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
}

.play-btn:hover {
    filter: brightness(1.2);
    box-shadow: 0 0 15px var(--accent-neon);
    transform: scale(1.02);
}