/* Base Styles and Variables */
:root {
    --primary-color: #ff2e2e;
    --secondary-color: #b90000;
    --dark-color: #0f0f0f;
    --darker-color: #080808;
    --light-color: #f8f8f8;
    --gray-color: #333333;
    --transition: all 0.3s ease;
    --glow-shadow: 0 0 10px rgba(255, 46, 46, 0.5), 0 0 20px rgba(255, 46, 46, 0.3);
    --font-main: 'Rajdhani', sans-serif;
    --font-code: 'JetBrains Mono', monospace;
}

/* Importing Web Fonts */
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@100;200;300;400;500;600;700&display=swap');

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

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--dark-color);
}

body {
    font-family: var(--font-main);
    background-color: var(--dark-color);
    color: var(--light-color);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Entry Screen */
.entry-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 5, 5, 0.98);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    overflow: hidden;
    transition: opacity 0.8s ease;
    cursor: pointer;
}

/* Prevent scrolling when entry screen is visible */
body.entry-active {
    overflow: hidden;
    height: 100%;
    position: fixed;
    width: 100%;
}

/* Main content transitions */
#main-content {
    transition: opacity 0.8s ease;
}

.entry-content {
    position: relative;
    text-align: center;
    z-index: 1;
    padding: 30px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.entry-logo {
    font-size: 4.5rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 20px;
    text-shadow: 0 0 15px rgba(255, 46, 46, 0.8);
    animation: pulse-glow 3s infinite;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    animation: fade-in-up 1.5s ease forwards, pulse-glow 3s infinite 1.5s;
}

.entry-text {
    font-family: var(--font-code);
    font-size: 1.8rem;
    margin-bottom: 30px;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.9);
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    animation: fade-in-up 1.5s ease 0.5s forwards, text-glitch 8s infinite 2s;
}

.entry-prompt {
    font-family: var(--font-code);
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
    opacity: 0;
    animation: fade-pulse 2s infinite 2s;
}

.circuit-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(to right, rgba(255, 0, 0, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 0, 0, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.2;
    z-index: -2;
    animation: grid-move 20s linear infinite;
}

.pulse-rings {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    z-index: -3;
}

.pulse-rings::before,
.pulse-rings::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(255, 0, 0, 0.5);
    border-radius: 50%;
    animation: pulse-ring 4s linear infinite;
}

.pulse-rings::after {
    animation-delay: 2s;
}

.entry-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.6;
    background-image: radial-gradient(circle at center, rgba(255, 0, 0, 0.1) 1px, transparent 1px);
    background-size: 15px 15px;
    animation: particles-fade 4s ease-in-out infinite alternate;
}

.entry-glitch-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255, 0, 0, 0.05), transparent 70%);
    z-index: -4;
    opacity: 0;
    animation: glitch-background 10s ease-in-out infinite;
    pointer-events: none;
}

.entry-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    mix-blend-mode: screen;
    filter: blur(2px) contrast(1.2);
    z-index: -5;
    animation: image-pulse 8s ease-in-out infinite;
}

/* Entry screen animations */
@keyframes fade-in-up {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        text-shadow: 0 0 15px rgba(255, 46, 46, 0.8);
    }
    50% {
        text-shadow: 0 0 25px rgba(255, 46, 46, 1), 0 0 40px rgba(255, 46, 46, 0.6);
    }
}

@keyframes fade-pulse {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.8;
    }
}

@keyframes grid-move {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(40px);
    }
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.5);
        opacity: 1;
    }
    100% {
        transform: scale(20);
        opacity: 0;
    }
}

@keyframes particles-fade {
    0% {
        opacity: 0.3;
        background-size: 12px 12px;
    }
    100% {
        opacity: 0.6;
        background-size: 16px 16px;
    }
}

@keyframes glitch-background {
    0%, 100% {
        opacity: 0;
    }
    5%, 9% {
        opacity: 0.3;
        transform: translate(-5px, 0);
    }
    10%, 14% {
        opacity: 0.3;
        transform: translate(5px, 0);
    }
    15% {
        opacity: 0;
    }
    50%, 54% {
        opacity: 0.3;
        transform: translate(0, -5px);
    }
    55%, 59% {
        opacity: 0.3;
        transform: translate(0, 5px);
    }
    60% {
        opacity: 0;
    }
}

@keyframes image-pulse {
    0%, 100% {
        opacity: 0.1;
        filter: blur(2px) contrast(1.1);
    }
    50% {
        opacity: 0.2;
        filter: blur(1.5px) contrast(1.3);
    }
}

@keyframes text-glitch {
    0%, 100% {
        clip-path: none;
        transform: none;
        text-shadow: 0 0 5px rgba(255, 46, 46, 0.6);
    }
    5% {
        clip-path: inset(26% 0 55% 0);
        transform: translate(-2px, 0);
        text-shadow: 0 0 5px rgba(255, 46, 46, 0.6), -2px 0 red;
    }
    10% {
        clip-path: inset(80% 0 9% 0);
        transform: translate(2px, 0);
        text-shadow: 0 0 5px rgba(255, 46, 46, 0.6), 2px 0 blue;
    }
    15% {
        clip-path: none;
        transform: none;
        text-shadow: 0 0 5px rgba(255, 46, 46, 0.6);
    }
    74% {
        clip-path: none;
        transform: none;
        text-shadow: 0 0 5px rgba(255, 46, 46, 0.6);
    }
    75% {
        clip-path: inset(40% 0 43% 0);
        transform: translate(-2px, 0);
        text-shadow: 0 0 5px rgba(255, 46, 46, 0.6), -2px 0 red;
    }
    80% {
        clip-path: inset(24% 0 29% 0);
        transform: translate(2px, 0);
        text-shadow: 0 0 5px rgba(255, 46, 46, 0.6), 2px 0 blue;
    }
    85% {
        clip-path: none;
        transform: none;
        text-shadow: 0 0 5px rgba(255, 46, 46, 0.6);
    }
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--darker-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: 0.6s;
}

.loader {
    display: flex;
    gap: 5px;
}

.loader span {
    display: block;
    width: 10px;
    height: 30px;
    background-color: var(--primary-color);
    animation: loader 1.5s infinite ease-in-out;
    transform-origin: center bottom;
    box-shadow: 0 0 5px rgba(255, 46, 46, 0.7);
}

.loader span:nth-child(2) {
    animation-delay: 0.1s;
}

.loader span:nth-child(3) {
    animation-delay: 0.2s;
}

.loader span:nth-child(4) {
    animation-delay: 0.3s;
}

@keyframes loader {
    0%, 100% {
        height: 30px;
    }
    50% {
        height: 60px;
    }
}

/* Custom Cursor */
.cursor {
    position: fixed;
    width: 5px;
    height: 5px;
    background-color: var(--primary-color);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    transition: width 0.2s, height 0.2s, opacity 0.3s;
    mix-blend-mode: screen;
    box-shadow: 0 0 8px var(--primary-color), 0 0 12px rgba(255, 0, 0, 0.7);
    opacity: 0.85;
}

.cursor-follower {
    position: fixed;
    width: 25px;
    height: 25px;
    border: 1px solid rgba(255, 0, 0, 0.4);
    background: radial-gradient(circle, rgba(255, 0, 0, 0.1) 0%, rgba(255, 0, 0, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9998;
    transition: 0.15s;
    opacity: 0.6;
    mix-blend-mode: screen;
    filter: blur(1px);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.8rem;
}

p {
    margin-bottom: 1.5rem;
}

a {
    color: var(--light-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-color);
}

/* Section Styles */
section {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

section::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: linear-gradient(45deg, rgba(255, 0, 0, 0.03) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: -1;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-header h2 {
    display: inline-block;
    font-size: 2.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.section-line {
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 20px auto 0;
    position: relative;
}

.section-line::before, .section-line::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: var(--primary-color);
    top: -3px;
    transform: rotate(45deg);
}

.section-line::before {
    left: -5px;
}

.section-line::after {
    right: -5px;
}

/* Header & Navigation */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    transition: var(--transition);
    background-color: rgba(8, 8, 8, 0.9);
    backdrop-filter: blur(5px);
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.accent {
    color: var(--primary-color);
    position: relative;
}

.accent::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
    border-radius: 50%;
    bottom: 0;
    right: -5px;
    box-shadow: 0 0 10px rgba(255, 46, 46, 0.8);
}

nav ul {
    display: flex;
    list-style: none;
}

nav li {
    margin: 0 20px;
}

.nav-link {
    font-size: 1.1rem;
    position: relative;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    bottom: -5px;
    left: 0;
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--light-color);
    margin: 5px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: 100px;
    background: linear-gradient(
        rgba(8, 8, 8, 0.8),
        rgba(8, 8, 8, 0.8)
    ),
    url('../images/hero-bg.jpg') no-repeat center center / cover;
    position: relative; /* Ensure position context for z-index */
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle at center,
        rgba(255, 0, 0, 0.15) 0%,
        rgba(15, 15, 15, 0) 70%
    );
    pointer-events: none;
    z-index: 1; /* Ensure it's below interactive elements */
}

.circuit-lines {
    position: absolute;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent 10%, var(--primary-color) 50%, transparent 90%);
    margin: 10px 0;
    opacity: 0.5;
    overflow: hidden;
}

.circuit-lines::before, 
.circuit-lines::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--primary-color);
    top: -3px;
    filter: blur(1px);
    box-shadow: 0 0 4px var(--primary-color), 0 0 8px rgba(255, 0, 0, 0.5);
    animation: circuit-dot 6s infinite alternate ease-in-out;
}

.circuit-lines::before {
    left: 30%;
    animation-delay: 0.5s;
}

.circuit-lines::after {
    right: 30%; 
    animation-delay: 1.5s;
}

@keyframes circuit-dot {
    0% { transform: translateX(-100px); opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translateX(100px); opacity: 0; }
}

.hero::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h20v20H0V0zm10 17.5c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5-1.5.67-1.5 1.5.67 1.5 1.5 1.5zm5 0c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5-1.5.67-1.5 1.5.67 1.5 1.5 1.5zM5 12.5c.83 0 1.5-.67 1.5-1.5S5.83 9.5 5 9.5 3.5 10.17 3.5 11s.67 1.5 1.5 1.5z' fill='rgba(255,255,255,0.05)' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
}

.glitch-container {
    margin-bottom: 40px;
    position: relative;
    z-index: 2; /* Ensure text is above background elements but below buttons */
    pointer-events: none; /* Make sure it doesn't block clicks */
}

.glitch-container::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: linear-gradient(45deg, rgba(255, 0, 0, 0.1), transparent 60%);
    z-index: -1;
    filter: blur(10px);
    animation: pulse-bg 8s ease infinite;
}

@keyframes pulse-bg {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.2; }
}

.glitch {
    position: relative;
    color: var(--light-color);
    text-shadow: 0 0 10px rgba(255, 46, 46, 0.5);
    letter-spacing: 2px;
    font-weight: 700;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 var(--primary-color);
    animation: glitch-anim-1 2s infinite linear alternate-reverse;
    clip-path: inset(0 33% 0 0);
    opacity: 0.8;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 var(--secondary-color);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
    clip-path: inset(0 0 0 33%);
    opacity: 0.8;
}

@keyframes glitch-anim-1 {
    0% {
        clip-path: inset(30% 0 36% 0);
    }
    20% {
        clip-path: inset(88% 0 1% 0);
    }
    40% {
        clip-path: inset(23% 0 62% 0);
    }
    60% {
        clip-path: inset(75% 0 19% 0);
    }
    80% {
        clip-path: inset(13% 0 75% 0);
    }
    100% {
        clip-path: inset(50% 0 36% 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip-path: inset(38% 0 42% 0);
    }
    20% {
        clip-path: inset(92% 0 2% 0);
    }
    40% {
        clip-path: inset(29% 0 70% 0);
    }
    60% {
        clip-path: inset(80% 0 15% 0);
    }
    80% {
        clip-path: inset(18% 0 79% 0);
    }
    100% {
        clip-path: inset(55% 0 30% 0);
    }
}

.typewriter {
    overflow: hidden;
    white-space: nowrap;
    margin-top: 20px;
    font-family: var(--font-code);
    font-weight: 300;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.9);
    border-right: 2px solid var(--primary-color);
    width: 100%; /* Set to 100% width by default */
    text-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
    position: relative;
    padding: 5px 0;
    font-size: 1.2rem;
    animation: blink-caret 0.75s step-end infinite;
}

/* No JavaScript Fallback */
.no-js .typewriter {
    width: 100%;
    animation: blink-caret 0.75s step-end infinite;
}

.typewriter::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 1px;
    width: 100%;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    opacity: 0.4;
}

/* Force the typewriter text to be visible in all cases */
.js .typewriter {
    visibility: visible !important;
    opacity: 1 !important;
}

@keyframes typing {
    0% { width: 0; }
    90%, 100% { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--primary-color) }
}

.cta-buttons {
    margin-top: 40px;
    display: flex;
    gap: 20px;
    position: relative;
    z-index: 10; /* Ensure buttons are above other elements */
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border: 2px solid var(--primary-color);
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    z-index: 10; /* Higher z-index to ensure visibility */
    transition: var(--transition);
    cursor: pointer; /* Ensure cursor shows it's clickable */
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    transition: var(--transition);
    z-index: -1;
}

.btn:hover::before {
    left: 0;
}

.btn.primary {
    background-color: var(--primary-color);
    color: var(--light-color);
}

.btn.primary:hover {
    box-shadow: var(--glow-shadow);
}

.btn.secondary {
    background-color: transparent;
    color: var(--light-color);
}

.btn.secondary:hover {
    color: var(--light-color);
    box-shadow: var(--glow-shadow);
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 5; /* Lower z-index than buttons */
    pointer-events: none; /* Ensure it doesn't block clicks */
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 10px;
    background-color: var(--primary-color);
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
    animation: scroll-wheel 1.5s infinite;
}

@keyframes scroll-wheel {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
}

.arrow {
    margin-top: 15px;
    animation: bounce 2s infinite;
}

.arrow span {
    display: block;
    width: 15px;
    height: 15px;
    border-bottom: 2px solid var(--primary-color);
    border-right: 2px solid var(--primary-color);
    transform: rotate(45deg);
    margin: -5px;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* About Section */
.about {
    background-color: var(--darker-color);
    padding-top: 100px;
    padding-bottom: 100px;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.about-text {
    flex: 1;
}

.about-image {
    flex: 1;
    position: relative;
}

.image-container {
    width: 100%;
    height: 400px;
    background: url('/images/lain5.gif') no-repeat center / cover;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
}

.image-glitch-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.8;
    animation: glitch-image 8s infinite;
}

@keyframes glitch-image {
    0% {
        transform: translate(0);
        filter: hue-rotate(0deg);
    }
    10% {
        transform: translate(-2px, 2px);
        filter: hue-rotate(45deg);
    }
    20% {
        transform: translate(2px, -2px);
        filter: hue-rotate(90deg);
    }
    30% {
        transform: translate(-2px, 2px);
        filter: hue-rotate(135deg);
    }
    40% {
        transform: translate(0);
        filter: hue-rotate(180deg);
    }
    50% {
        transform: translate(0);
        filter: hue-rotate(180deg);
    }
    60% {
        transform: translate(2px, -2px);
        filter: hue-rotate(225deg);
    }
    70% {
        transform: translate(-2px, 2px);
        filter: hue-rotate(270deg);
    }
    80% {
        transform: translate(0);
        filter: hue-rotate(315deg);
    }
    90% {
        transform: translate(-2px, -2px);
        filter: hue-rotate(360deg);
    }
    100% {
        transform: translate(0);
        filter: hue-rotate(0deg);
    }
}

.stats {
    display: flex;
    gap: 30px;
    margin-top: 30px;
}

.stat {
    text-align: center;
}

.stat h3 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0;
}

/* Projects Section */
.projects {
    background-color: var(--dark-color);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.project-card {
    background-color: rgba(20, 20, 20, 0.6);
    border-radius: 5px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(255, 46, 46, 0.2);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3), 0 0 15px rgba(255, 46, 46, 0.3);
}

.project-img {
    height: 200px;
    background-color: var(--gray-color);
    position: relative;
    background-image: linear-gradient(45deg, rgba(255, 46, 46, 0.1), transparent);
    background-size: cover;
    background-position: center;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .overlay {
    opacity: 1;
}

.project-links {
    display: flex;
    gap: 20px;
}

.project-link, .project-github {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--light-color);
    transition: var(--transition);
}

.project-link:hover, .project-github:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 46, 46, 0.7);
}

.project-info {
    padding: 20px;
}

.project-info h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.project-info p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 15px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.project-tags span {
    background-color: rgba(255, 46, 46, 0.2);
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-family: var(--font-code);
}

.center-btn {
    text-align: center;
    margin-top: 50px;
}

/* Skills Section */
.skills {
    background-color: var(--darker-color);
}

.skills-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.skill-category {
    margin-bottom: 40px;
}

.skill-category h3 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 46, 46, 0.3);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.skill-item {
    background-color: rgba(20, 20, 20, 0.6);
    border-radius: 5px;
    padding: 20px;
    transition: var(--transition);
    position: relative;
    border: 1px solid rgba(255, 46, 46, 0.1);
}

.skill-item::before {
    content: attr(data-skill);
    position: absolute;
    bottom: -10px;
    right: 10px;
    font-family: var(--font-code);
    font-size: 0.7rem;
    color: rgba(255, 46, 46, 0.3);
    z-index: -1;
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2), 0 0 10px rgba(255, 46, 46, 0.2);
}

.skill-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.skill-name {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.skill-bar {
    height: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.skill-level {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 3px;
    position: relative;
    animation: skill-bar-fill 2s ease-out forwards;
    transform-origin: left;
    transform: scaleX(0);
}

@keyframes skill-bar-fill {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

/* Initiatives Section */
.initiatives {
    background-color: var(--dark-color);
    position: relative;
    overflow: hidden;
}

.initiatives-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.initiative-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
    gap: 30px;
}

.initiative-card {
    display: flex;
    background-color: rgba(20, 20, 20, 0.7);
    border-radius: 5px;
    padding: 30px;
    transition: var(--transition);
    border: 1px solid rgba(255, 46, 46, 0.2);
    gap: 20px;
    position: relative;
    overflow: hidden;
}

.initiative-card::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: linear-gradient(45deg, rgba(255, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: -1;
}

.initiative-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3), 0 0 15px rgba(255, 46, 46, 0.3);
}

.initiative-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 5px;
}

.initiative-content h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--light-color);
}

.initiative-content p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.6;
}

@media screen and (max-width: 768px) {
    .initiative-grid {
        grid-template-columns: 1fr;
    }
}

/* Contact Section with Terminal */
.contact {
    background-color: var(--dark-color);
}

.terminal-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
}

/* Terminal Styling */
.terminal-header {
    background-color: #2d2d2d;
    height: 25px;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    position: relative;
}

.terminal-buttons {
    display: flex;
    gap: 6px;
}

.terminal-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-button.close {
    background-color: #ff5f56;
}

.terminal-button.minimize {
    background-color: #ffbd2e;
}

.terminal-button.maximize {
    background-color: #27c93f;
}

.terminal-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    font-family: var(--font-code);
    color: rgba(255, 255, 255, 0.8);
}

.terminal-body {
    background-color: rgba(20, 20, 20, 0.9);
    padding: 20px;
    font-family: var(--font-code);
    color: rgb(230, 230, 230);
    height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 46, 46, 0.3);
}

.terminal-output {
    flex-grow: 1;
    margin-bottom: 10px;
}

.terminal-output .line {
    padding: 3px 0;
    line-height: 1.2;
    word-break: break-word;
    color: rgb(230, 230, 230);
}

.terminal-output .line.error {
    color: #ff5f56;
}

.terminal-output .line.success {
    color: #27c93f;
}

.terminal-output .line.info {
    color: #ffbd2e;
}

.terminal-output .line.system-message {
    color: #56c7ff;
}

/* Blinking cursor for auto typing terminal */
.blinking-cursor {
    display: inline-block;
    width: 8px;
    height: 15px;
    color: var(--primary-color);
    animation: cursor-blink 1s step-end infinite;
    margin-left: 1px;
    vertical-align: middle;
}

.typing-text {
    color: rgb(230, 230, 230);
    font-family: var(--font-code);
}

/* Command line output styles */
.command-output {
    color: rgba(230, 230, 230, 0.8);
    margin-left: 20px;
    font-size: 0.9em;
}

.command-success {
    color: #27c93f;
}

.command-warning {
    color: #ffbd2e;
}

.command-error {
    color: #ff5f56;
}

@keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Terminal Contact Info */
.terminal-contact-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding: 20px;
    background-color: rgba(20, 20, 20, 0.6);
    border-radius: 5px;
    border: 1px solid rgba(255, 46, 46, 0.2);
}

.contact-method {
    display: flex;
    gap: 15px;
    align-items: center;
}

.contact-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 46, 46, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.contact-method:hover .contact-icon {
    background-color: var(--primary-color);
    color: var(--light-color);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 46, 46, 0.5);
}

.contact-detail h3 {
    font-size: 1.1rem;
    margin-bottom: 3px;
}

.contact-detail p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0;
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3), 0 0 10px rgba(255, 46, 46, 0.5);
}

/* Terminal media queries */
@media screen and (max-width: 768px) {
    .terminal-contact-info {
        flex-direction: column;
        gap: 20px;
    }
    
    .contact-method {
        width: 100%;
    }
    
    .social-links {
        margin-top: 15px;
    }
}

/* Footer */
footer {
    background-color: var(--darker-color);
    padding: 50px 0 20px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 40px;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 700;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Animation Classes */
.reveal-element {
    opacity: 0;
    transform: translateY(50px);
    transition: 0.6s all ease;
}

.reveal-element.active {
    opacity: 1;
    transform: translateY(0);
}

/* Forces the elements to be visible immediately if JS fails */
@media (prefers-reduced-motion: reduce) {
    .reveal-element {
        opacity: 1;
        transform: translateY(0);
        transition: none;
    }
}

/* Counter Animation */
.counter {
    display: inline-block;
}

/* Info Panel Styles */
.info-panel {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: 300px;
    height: auto;
    max-height: 80vh;
    background-color: rgba(15, 15, 15, 0.9);
    border-left: 2px solid var(--primary-color);
    box-shadow: -5px 0 15px rgba(255, 0, 0, 0.2);
    z-index: 10000;
    transition: all 0.3s ease;
    overflow-y: auto;
    transform: translateX(300px) translateY(-50%);
    font-family: var(--font-code);
    backdrop-filter: blur(5px);
}

.info-panel.active {
    transform: translateX(0) translateY(-50%);
}

.info-panel-handle {
    position: absolute;
    top: 50%;
    left: -30px;
    width: 30px;
    height: 50px;
    background-color: rgba(15, 15, 15, 0.9);
    border-radius: 5px 0 0 5px;
    border: 2px solid var(--primary-color);
    border-right: none;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: -3px 0 10px rgba(255, 0, 0, 0.2);
}

.info-panel-handle i {
    color: var(--primary-color);
    font-size: 18px;
    transition: transform 0.3s ease;
}

.info-panel.active .info-panel-handle i {
    transform: rotate(180deg);
}

.info-panel-content {
    padding: 20px;
}

.info-section {
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 30, 30, 0.3);
    padding-bottom: 20px;
}

.info-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.info-section h3 {
    color: var(--primary-color);
    font-size: 16px;
    margin-bottom: 15px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 0 5px rgba(255, 30, 30, 0.5);
}

.info-row {
    margin-bottom: 10px;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #aaa;
}

.info-label {
    font-weight: 500;
    color: #ccc;
}

.info-value {
    color: #fff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
    font-family: var(--font-code);
}

/* Media Controls */
.media-control {
    margin-bottom: 15px;
}

.volume-control {
    display: flex;
    align-items: center;
    margin-top: 5px;
}

.volume-icon {
    color: var(--primary-color);
    margin-right: 10px;
    font-size: 14px;
    width: 15px;
}

.volume-slider {
    flex: 1;
    -webkit-appearance: none;
    height: 5px;
    background: linear-gradient(to right, var(--primary-color) 0%, var(--primary-color) 35%, #444 35%, #444 100%);
    border-radius: 2px;
    outline: none;
    margin-right: 10px;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 0 5px rgba(255, 0, 0, 0.8);
    transition: all 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(255, 0, 0, 1);
}

.volume-slider::-moz-range-thumb {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 0 5px rgba(255, 0, 0, 0.8);
    transition: all 0.2s ease;
    border: none;
}

.volume-value {
    font-size: 12px;
    color: #ccc;
    width: 40px;
    text-align: right;
}

.media-buttons {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.media-btn {
    background-color: rgba(30, 30, 30, 0.7);
    border: 1px solid rgba(255, 30, 30, 0.3);
    color: #ccc;
    width: 40px;
    height: 30px;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.media-btn:hover {
    background-color: rgba(50, 50, 50, 0.7);
    box-shadow: 0 0 8px rgba(255, 0, 0, 0.5);
}

.media-btn.active {
    background-color: rgba(255, 30, 30, 0.2);
    color: var(--primary-color);
    box-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
}

.now-playing {
    font-size: 12px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
}

.track-name {
    font-style: italic;
    color: var(--primary-color);
    animation: blink 3s ease infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Responsive Styles */
@media screen and (max-width: 992px) {
    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2.2rem;
    }

    .about-content, .contact-container {
        flex-direction: column;
    }

    .contact-container {
        gap: 60px;
    }
    
    .info-panel {
        width: 250px;
        transform: translateX(250px) translateY(-50%);
    }
}

@media screen and (max-width: 768px) {
    header {
        padding: 20px 5%;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--darker-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: var(--transition);
        z-index: 99;
    }

    nav.active {
        right: 0;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    }

    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav li {
        margin: 15px 0;
    }

    .menu-toggle {
        display: block;
        z-index: 100;
    }

    .menu-toggle.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media screen and (max-width: 576px) {
    section {
        padding: 70px 0;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .stats {
        flex-direction: column;
        gap: 20px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
}