:root {
    --bg-color: #050505;
    --text-color: #e0e0e0;
    --accent-color: #00ffc3; /* Cyberpunk Teal */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Space Grotesk', sans-serif;
    overflow: hidden; /* Prevent scrollbars */
    height: 100vh;
    width: 100vw;
}

/* Canvas covers the screen behind content */
#canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Content Container */
.container {
    position: relative;
    z-index: 2; /* Above canvas */
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem;
    pointer-events: none; /* Let mouse pass through to canvas... */
}

/* But re-enable clicks on links */
a, h1 {
    pointer-events: auto;
}

/* Typography */
h1 {
    font-size: 5rem;
    font-weight: 700;
    letter-spacing: -0.05em;
    line-height: 0.9;
    margin-bottom: 1rem;
    position: relative;
    mix-blend-mode: difference; /* Cool interaction with background */
}

.roles {
    font-family: 'Space Mono', monospace;
    font-size: 1.1rem;
    opacity: 0.7;
    margin-bottom: 4rem;
}

.roles span {
    color: var(--accent-color);
}

/* Navigation */
.links ul {
    list-style: none;
}

.links li {
    margin-bottom: 1rem;
}

.link-item {
    text-decoration: none;
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 300;
    position: relative;
    transition: all 0.3s ease;
    display: inline-block;
}

.link-item .arrow {
    opacity: 0;
    transform: translateX(-10px);
    display: inline-block;
    transition: all 0.3s ease;
    font-family: 'Space Mono', monospace;
    color: var(--accent-color);
    font-size: 1rem;
    vertical-align: middle;
}

.link-item:hover {
    padding-left: 10px;
    letter-spacing: 2px;
}

.link-item:hover .arrow {
    opacity: 1;
    transform: translateX(5px);
}

footer {
    position: absolute;
    bottom: 2rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    opacity: 0.3;
}

/* Glitch Effect on Hover for Name */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 #00fff9;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

/* FLOATING BEER WIDGET */
.beer-widget {
    position: fixed;
    bottom: 30px;
    right: 30px; /* Or 'left: 30px' if on Heatlog to avoid the + button */
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--accent-color); /* Uses your site's active color */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    box-shadow: 0 0 15px rgba(0, 255, 195, 0.2); /* Adjust glow color as needed */
    z-index: 999;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy pop */
    backdrop-filter: blur(5px);
}

.beer-icon {
    font-size: 30px;
    line-height: 1;
    filter: drop-shadow(0 0 5px rgba(255, 200, 0, 0.5)); /* Glowy beer */
    transition: transform 0.3s;
}

/* HOVER EFFECT */
.beer-widget:hover {
    transform: scale(1.1) rotate(-10deg); /* Slight tilt like a "Cheers" motion */
    background: var(--accent-color);
    box-shadow: 0 0 25px var(--accent-color);
    border-color: #fff;
}

/* OPTIONAL: Tooltip Text on Hover */
.beer-widget::before {
    content: "Buy me a beer?";
    position: absolute;
    right: 70px; /* To the left of the button */
    background: #000;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    border: 1px solid #333;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    transform: translateX(10px);
    white-space: nowrap;
}

.beer-widget:hover::before {
    opacity: 1;
    transform: translateX(0);
}

/* --- PROTOCOLS LIGHT THEME OVERRIDE --- */
body.theme-protocols {
    /* Override global dark variables for this specific page */
    --bg: #f4f4f0; /* Off-white / Paper */
    --text: #111;
    --accent: #555; /* Subtle dark grey accent */
    background-color: var(--bg);
    color: var(--text);
    
    /* Elegant Noise Texture */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
}

/* Ensure links on the white background are visible */
body.theme-protocols .link-item {
    color: #333;
    font-weight: 500;
}
body.theme-protocols .link-item:hover {
    color: #000;
    letter-spacing: 3px; /* Slightly more dramatic hover */
}
body.theme-protocols footer {
    color: #666;
}

@keyframes glitch-anim {
    0% { clip: rect(30px, 9999px, 10px, 0); }
    5% { clip: rect(80px, 9999px, 90px, 0); }
    10% { clip: rect(10px, 9999px, 80px, 0); }
    15% { clip: rect(0, 0, 0, 0); }
    100% { clip: rect(0, 0, 0, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(0, 0, 0, 0); }
    15% { clip: rect(0, 0, 0, 0); }
    20% { clip: rect(60px, 9999px, 70px, 0); }
    25% { clip: rect(20px, 9999px, 30px, 0); }
    100% { clip: rect(0, 0, 0, 0); }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .container { padding: 2rem; }
    h1 { font-size: 3rem; }
    .link-item { font-size: 1.2rem; }
}