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

:root {
    /* Default variables for minimal theme */
    --bg-color: #ffffff;
    --text-color: #1a1a1a;
    --accent-color: #000000;
    --hover-color: #666666;
    --font-main: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Theme: Pigeon */
body.theme-pigeon {
    --bg-color: #e2e8f0;
    --text-color: #475569;
    --accent-color: #ec4899;
    --hover-color: #be185d;
}

/* Theme: Vortex */
body.theme-vortex {
    --bg-color: #050510;
    --text-color: #e2e8f0;
    --accent-color: #38bdf8;
    --hover-color: #7dd3fc;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden; /* Prevent horizontal scrolling entirely */
    transition: background-color 0.8s ease, color 0.8s ease;
}

/* Defensive background layer */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Always behind everything */
    pointer-events: none;
}

.theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: rgba(128, 128, 128, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(128,128,128,0.2);
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    color: var(--text-color);
    z-index: 100; /* Ensure it stays on top */
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s, box-shadow 0.2s;
    /* Prevent tap highlight on mobile */
    -webkit-tap-highlight-color: transparent;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    background: var(--accent-color);
    color: var(--bg-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.container {
    text-align: center;
    z-index: 1;
    position: relative;
    padding: 2rem 2rem 2.5rem 2rem; /* Slightly larger bottom padding for visual balance */
    width: 90%;
    max-width: 600px;
    box-sizing: border-box;
    border-radius: 1.5rem;
    transition: all 0.5s ease;
}

/* Minimalist container adjustments */
body.theme-minimal .container {
    background: transparent;
}

/* Vortex glass */
body.theme-vortex .container {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}

/* Pigeon soft container */
body.theme-pigeon .container {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05), inset 0 0 0 1px rgba(255,255,255,0.8);
    border-radius: 3rem;
}

.name {
    /* Fluid typography ensures it never overflows on small screens */
    font-size: clamp(2.5rem, 10vw, 5rem);
    font-weight: 800;
    margin-top: 1rem;
    margin-bottom: 2rem;
    letter-spacing: -0.04em;
    line-height: 1.1;
    word-wrap: break-word;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap; /* Ensure links wrap on extremely small screens */
}

.social-button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 3.5rem;
    height: 3.5rem;
    color: var(--text-color);
    background: rgba(128,128,128,0.1);
    border-radius: 50%;
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.social-button:hover, .social-button:focus {
    transform: translateY(-5px) scale(1.1);
    color: var(--bg-color);
    background: var(--accent-color);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    outline: none;
}

.icon {
    width: 1.75rem;
    height: 1.75rem;
    fill: currentColor;
}
