/* ==========================================================================
   Base Layout Styles
   ========================================================================== */
html,
body {
    padding: 0;
    margin: 0;
    height: auto;
    min-height: 100vh;
}

/* ==========================================================================
   Golden Border Container Effect
   Adds a subtle golden border around the main content area
   ========================================================================== */
body {
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0.3%;
    left: 1%;
    right: 1%;
    bottom: 0%;
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
    height: 100%;
}

/* ==========================================================================
   Background Effects & Canvas
   Controls the tech-themed background and its positioning
   ========================================================================== */
.tech-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

#canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow-x: hidden;
}

/* ==========================================================================
   Content Layout
   Main content container styling
   ========================================================================== */
.content {
    position: relative;
    z-index: 2;
    padding: 2.5rem;
    text-align: center;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: visible; /* Allow content to breathe */
}

/* ==========================================================================
   Hexagon Grid Animation
   Creates floating hexagon shapes in background
   ========================================================================== */
.hexagon {
    position: absolute;
    width: 20px;
    height: 34.64px;
    background-color: rgba(58, 123, 213, 0.05);
    border: 1px solid rgba(58, 123, 213, 0.1);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    z-index: -1;
    animation: float 20s infinite linear;
}

/* ==========================================================================
   Scanner Effect
   Creates circular scanning animation effect
   ========================================================================== */
.circle-scanner {
    border-radius: 50%;
    border: 1px solid rgba(58, 123, 213, 0.2);
    box-shadow: 0 0 10vh rgba(58, 123, 213, 0.05);
}

.dark .circle-scanner {
    border: 1px solid rgba(147, 112, 219, 0.2);
    box-shadow: 0 0 10vh rgba(147, 112, 219, 0.05);
}

/* ==========================================================================
   Grid Lines Effect
   Creates horizontal and vertical lines for tech grid effect
   ========================================================================== */
.horizontal-line,
.vertical-line {
    position: absolute;
    z-index: -1;
}

.horizontal-line {
    height: 1px;
    width: 100%;
    background: linear-gradient(90deg, transparent, rgba(58, 123, 213, 0.2), transparent);
}

.vertical-line {
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, transparent, rgba(58, 123, 213, 0.2), transparent);
}

/* Dark mode variations */
.dark .horizontal-line {
    background: linear-gradient(90deg, transparent, rgba(147, 112, 219, 0.2), transparent);
}

.dark .vertical-line {
    background: linear-gradient(180deg, transparent, rgba(147, 112, 219, 0.2), transparent);
}

/* ==========================================================================
   Theme-Specific Background Patterns
   Light Mode (Sage Mode) and Dark Mode (Rinnegan) inspired patterns
   ========================================================================== */
/* Light mode - Sage Mode inspired */
.hex-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(120deg, rgba(255, 165, 0, 0.01) 0%, rgba(255, 255, 255, 0.05) 100%),
        url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='rgba(255, 165, 0, 0.25)'%3E%3Ccircle cx='40' cy='40' r='35'/%3E%3Ccircle cx='40' cy='40' r='25'/%3E%3Ccircle cx='40' cy='40' r='15'/%3E%3Cpath d='M40 5L40 75M5 40L75 40' stroke-width='0.5'/%3E%3C/g%3E%3C/svg%3E"),
        radial-gradient(circle at 50% 50%, rgba(255, 165, 0, 0.05) 0%, transparent 60%);
    background-size: 100% 100%, 60px 60px, 100% 100%;
    animation: rinneganPulse 5s 1 linear;
}

.hex-grid::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='50' cy='50' r='45' fill='none' stroke='rgba(255, 140, 0, 0.15)' stroke-width='0.5'%3E%3Canimate attributeName='r' /%3E%3C/circle%3E%3C/svg%3E");
    background-size: 100px 100px;
    animation: rinneganSpin 2s 1 linear;
}

/* Dark mode - Rinnegan inspired */
.dark .hex-grid {
    background:
        linear-gradient(120deg, rgba(138, 43, 226, 0.05) 0%, rgba(75, 0, 130, 0.05) 100%),
        url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='rgba(147, 112, 219, 0.1)'%3E%3Ccircle cx='40' cy='40' r='35'/%3E%3Ccircle cx='40' cy='40' r='25'/%3E%3Ccircle cx='40' cy='40' r='15'/%3E%3Cpath d='M40 5L40 75M5 40L75 40' stroke-width='0.5'/%3E%3C/g%3E%3C/svg%3E"),
        radial-gradient(circle at 50% 50%, rgba(138, 43, 226, 0.08) 0%, transparent 70%);
    background-size: 100% 100%, 80px 80px, 100% 100%;
    animation: rinneganPulse 5s 1 linear;
}

.dark .hex-grid::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='rgba(147, 112, 219, 0.05)'%3E%3Ccircle cx='60' cy='60' r='50'/%3E%3Ccircle cx='60' cy='60' r='40'/%3E%3Ccircle cx='60' cy='60' r='30'/%3E%3Ccircle cx='60' cy='60' r='20'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 120px 120px;
    animation: rinneganSpin 2s 1 linear;
}

/* ==========================================================================
   UI Component Styles
   Reusable component styles with neo-morphic effects
   ========================================================================== */
.neo-glass {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(24px);
}

.dark .neo-glass {
    background-color: rgba(26, 32, 44, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.gradient-bg {
    background: linear-gradient(to bottom right, #f3f4f6, #e5e7eb);
    background-size: 200% 200%;
    animation: gradient 15s ease 1;
}

.dark .gradient-bg {
    background: linear-gradient(to bottom right, #1f2937, #374151);
}

.glass-card {
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-radius: 0.75rem;
}

.dark .glass-card {
    background-color: rgba(26, 32, 44, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   Custom Scrollbar Styling
   Enhanced scrollbar styling for both light and dark modes
   ========================================================================== */
/* Base scrollbar styles */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

/* Light mode scrollbar */
::-webkit-scrollbar-track {
    background: linear-gradient(to bottom, rgba(59, 130, 246, 0.05), rgba(147, 197, 253, 0.05));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #60a5fa, #93c5fd);
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #3b82f6, #60a5fa);
    border: 2px solid rgba(255, 255, 255, 0.9);
}

::-webkit-scrollbar-corner {
    background: transparent;
}

/* Dark mode scrollbar (update existing) */
.dark ::-webkit-scrollbar-track {
    background: linear-gradient(to bottom, rgba(59, 130, 246, 0.1), rgba(29, 78, 216, 0.1));
    border-radius: 10px;
}

.dark ::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #3b82f6, #1d4ed8);
    border: 2px solid rgba(30, 41, 59, 0.8);
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #2563eb, #1e40af);
    border: 2px solid rgba(30, 41, 59, 0.9);
}

/* Add smooth hover animation for scrollbar */
::-webkit-scrollbar-thumb:active {
    transform: scale(0.95);
}

/* Add shine effect on hover */
::-webkit-scrollbar-thumb::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg,
            transparent 25%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 75%);
    background-size: 200% 200%;
    animation: shine 3s linear 1;
}

/* Custom styling for horizontal scrollbar */
::-webkit-scrollbar:horizontal {
    height: 8px;
}

::-webkit-scrollbar-thumb:horizontal {
    background: linear-gradient(90deg, #60a5fa, #93c5fd);
}

.dark ::-webkit-scrollbar-thumb:horizontal {
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
}

/* Add scrollbar corner styling */
::-webkit-scrollbar-corner {
    background: transparent;
    border-radius: 10px;
}

/* ==========================================================================
   Interactive Elements
   Button and card hover effects
   ========================================================================== */
.neo-button {
    background: linear-gradient(45deg, #3b82f6, #1d4ed8);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.neo-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.neo-button:hover::before {
    left: 100%;
}

.hover-card {
    transition: all 300ms ease-in-out 150ms;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.hover-card:hover {
    transform: translateY(-5px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

/* Add this to ensure content appears above background */
.container {
    position: relative;
    z-index: 1;
}

/* Ensure form sections appear above background */
.form-section {
    position: relative;
    z-index: 1;
}

/* Update nav z-index */


/* ==========================================================================
   Animations
   All animation keyframes
   ========================================================================== */
@keyframes float {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-1000px) rotate(360deg); }
}

@keyframes shine {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.1;
    }

    100% {
        transform: scale(0.8);
        opacity: 0.3;
    }
}

@keyframes natureSage {
    0% {
        background-position: 0% 0%, 0 0, center;
    }

    100% {
        background-position: 100% 100%, 60px 60px, center;
    }
}

@keyframes chakraPulse {
    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.7;
    }
}

@keyframes rinneganPulse {
    0% {
        background-position: 0% 0%, 0 0, center;
    }

    100% {
        background-position: -100% -100%, 80px 80px, center;
    }
}

@keyframes rinneganSpin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes chakraFloat {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Additional chakra particles effect */
.tech-background::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 166, 0, 0.18) 0%, transparent 10%),
        radial-gradient(circle at 70% 60%, rgba(255, 166, 0, 0.18) 0%, transparent 10%),
        radial-gradient(circle at 40% 80%, rgba(255, 165, 0, 0.18) 0%, transparent 10%);
    filter: blur(4px);
    animation: shine 2s 1 ease-in-out;
}

.dark .tech-background::after {
    background:
        radial-gradient(circle at 30% 20%, rgba(147, 112, 219, 0.1) 0%, transparent 10%),
        radial-gradient(circle at 70% 60%, rgba(138, 43, 226, 0.1) 0%, transparent 10%),
        radial-gradient(circle at 40% 80%, rgba(147, 112, 219, 0.1) 0%, transparent 10%);
}

/* Add shine effect on hover */
::-webkit-scrollbar-thumb::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg,
            transparent 25%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 75%);
    background-size: 200% 200%;
    animation: shine 3s linear 1;
}

/* Custom styling for horizontal scrollbar */
::-webkit-scrollbar:horizontal {
    height: 8px;
}

::-webkit-scrollbar-thumb:horizontal {
    background: linear-gradient(90deg, #60a5fa, #93c5fd);
}

.dark ::-webkit-scrollbar-thumb:horizontal {
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
}

/* Add scrollbar corner styling */
::-webkit-scrollbar-corner {
    background: transparent;
    border-radius: 10px;
}

/* Theme transition */
.theme-transition {
    transition: all 0.3s ease;
}

/* Section Title Animations */
.section-title {
    position: relative;
    padding-left: 1rem;
    transition: transform 300ms ease-in-out 150ms, color 300ms ease-in-out 150ms;
    transform-origin: left;
}

.hover-card:hover .section-title {
    transform: translateY(-5px);
    color: #60a5fa;
}

/* Animated underline effect */
.section-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 1rem;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #60a5fa, #3b82f6);
    transition: width 1s ease;
}

.hover-card:hover .section-title::after {
    width: calc(100% - 1rem);
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

a {
    cursor: pointer;
}