* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #f8f8f8;
    --text-color: #333;
    --btn-bg-color: #333;
    --btn-text-color: white;
    --btn-hover-color: #555;
    --footer-color: #777;
    --toggle-bg: #ddd;
    --toggle-circle: #333;
    --menu-bg: #0d1117;
    --menu-border: rgba(48, 54, 61, 1);
    --menu-text: #c9d1d9;
    --menu-header-bg: #161b22;
    --menu-item-hover: rgba(255, 255, 255, 0.05);
    --menu-link-color: #c9d1d9;
}

body.dark-mode {
    --bg-color: #121212;
    --text-color: #f8f8f8;
    --btn-bg-color: #f8f8f8;
    --btn-text-color: #121212;
    --btn-hover-color: #e0e0e0;
    --footer-color: #a0a0a0;
    --toggle-bg: #444;
    --toggle-circle: #f8f8f8;
    --menu-bg: #0d1117;
    --menu-border: rgba(48, 54, 61, 1);
    --menu-text: #c9d1d9;
    --menu-header-bg: #161b22;
    --menu-item-hover: rgba(255, 255, 255, 0.05);
    --menu-link-color: #c9d1d9;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 2rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.ascii-art {
    font-family: monospace;
    white-space: pre;
    font-size: 8px;
    line-height: 1;
    text-align: center;
    margin: 2rem 0;
}

@media (min-width: 768px) {
    .ascii-art {
        font-size: 12px;
    }
}

@media (min-width: 1024px) {
    .ascii-art {
        font-size: 14px;
    }
}

.btn {
    display: inline-block;
    background-color: var(--btn-bg-color);
    color: var(--btn-text-color);
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 2px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    margin-top: 2rem;
}

.btn:hover {
    background-color: var(--btn-hover-color);
}

footer {
    margin-top: 4rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--footer-color);
}

.theme-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
}

.theme-toggle-label {
    margin-right: 0.5rem;
    font-size: 0.875rem;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--toggle-bg);
    transition: .4s;
    border-radius: 3px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: var(--toggle-circle);
    transition: .4s;
    border-radius: 2px;
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

#d3d, #projects-menu {
    position: fixed;
    top: 100px;
    width: 320px;
    background: var(--menu-bg);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--menu-border);
    overflow: hidden;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-out;
}

#d3d {
    left: 35%;
    transform: translateX(-50%);
}

#projects-menu {
    left: 65%;
    transform: translateX(-50%);
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--menu-header-bg);
    border-bottom: 1px solid var(--menu-border);
    cursor: move;
    user-select: none;
}

.menu-header h3 {
    margin: 0;
    color: var(--menu-text);
    font-size: 0.9rem;
    font-weight: 500;
}

#close-menu, #close-projects-menu {
    background: none;
    border: none;
    color: var(--menu-text);
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    opacity: 0.8;
    transition: opacity 0.2s;
}

#close-menu:hover, #close-projects-menu:hover {
    opacity: 1;
}

.menu-content {
    padding: 8px 0;
}

.menu-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-content ul li {
    padding: 0;
    margin: 0;
}

.menu-content ul li a {
    color: var(--menu-link-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 16px;
    font-size: 14px;
    transition: background-color 0.2s;
}

.menu-content ul li a:hover {
    background-color: var(--menu-item-hover);
}

.menu-content ul li a .icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

#d3d.menu-visible, #projects-menu.menu-visible {
    opacity: 1;
    visibility: visible;
}

.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

@keyframes webAppear {
    from {
        opacity: 0;
        stroke-dashoffset: 100;
    }
    to {
        opacity: 1;
        stroke-dashoffset: 0;
    }
}

@keyframes webFlow {
    0% {
        stroke-dashoffset: 30;
    }
    100% {
        stroke-dashoffset: -30;
    }
}

.web-effect line {
    stroke-dasharray: 8,6;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.web-effect line.active {
    opacity: 1;
    animation: webFlow 2s linear infinite;
}

#social-web.active {
    animation-delay: 0s;
}

#projects-web.active {
    animation-delay: 1s;
}

/* Add glow effect to the XC button when menus are active */
.btn.xc-btn {
    transition: all 0.3s ease;
}

.btn.xc-btn.active {
    box-shadow: 0 0 15px rgba(0, 170, 255, 0.5);
    text-shadow: 0 0 10px rgba(0, 170, 255, 0.5);
} 