:root {
    --primary: #00ffff;
    --secondary: #ff00ff;
    --accent: #ffff00;
    --bg-color: #050505;
    --bg-panel: #0a0a0a;
    --text-main: #e0e0e0;
    --text-dim: #a0a0a0;
    --glass-bg: rgba(10, 10, 10, 0.75);
    --glass-border: 1px solid rgba(0, 255, 255, 0.2);
    --font-mono: 'Share Tech Mono', monospace;
    --font-display: 'Rajdhani', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-mono);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 2px;
}

/* Background Effects */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0),
            rgba(255, 255, 255, 0) 50%,
            rgba(0, 0, 0, 0.1) 50%,
            rgba(0, 0, 0, 0.1));
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.6;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
    pointer-events: none;
    z-index: 999;
}

/* Typography & Glitch */
h1,
h2,
h3 {
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.glitch {
    position: relative;
    color: var(--text-main);
}

.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 var(--primary);
    clip: rect(24px, 9999px, 90px, 0);
    animation: glitch-anim-1 2.5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 var(--secondary);
    clip: rect(85px, 9999px, 140px, 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

.glitch-large {
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary);
    position: relative;
    display: inline-block;
}

/* Glitch Animations Keyframes */
@keyframes glitch-anim-1 {
    0% {
        clip: rect(20px, 9999px, 81px, 0);
    }

    20% {
        clip: rect(10px, 9999px, 90px, 0);
    }

    40% {
        clip: rect(60px, 9999px, 86px, 0);
    }

    60% {
        clip: rect(35px, 9999px, 11px, 0);
    }

    80% {
        clip: rect(94px, 9999px, 44px, 0);
    }

    100% {
        clip: rect(48px, 9999px, 62px, 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip: rect(65px, 9999px, 94px, 0);
    }

    20% {
        clip: rect(10px, 9999px, 2px, 0);
    }

    40% {
        clip: rect(26px, 9999px, 16px, 0);
    }

    60% {
        clip: rect(4px, 9999px, 81px, 0);
    }

    80% {
        clip: rect(98px, 9999px, 34px, 0);
    }

    100% {
        clip: rect(35px, 9999px, 72px, 0);
    }
}

/* Layout */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(5px);
    border-bottom: 1px solid var(--primary);
}

.cyber-nav .logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-item {
    color: var(--text-main);
    text-decoration: none;
    position: relative;
    padding: 5px 10px;
    transition: 0.3s;
}

.nav-item:hover {
    color: var(--primary);
    text-shadow: 0 0 8px var(--primary);
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}

.nav-item:hover::after {
    width: 100%;
}

main {
    padding-top: 80px;
    /* Header offset */
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* Sections */
section {
    padding: 80px 0;
    min-height: 80vh;
    /* Changed from 100vh to ensure content fits */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-section {
    text-align: center;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-dim);
    margin: 20px 0;
    border-right: 2px solid var(--primary);
    display: inline-block;
    padding-right: 5px;
    animation: blink 0.75s step-end infinite;
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

.cyber-button {
    display: inline-block;
    padding: 15px 30px;
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-top: 20px;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.1);
}

.cyber-button:hover {
    background: var(--primary);
    color: var(--bg-color);
    box-shadow: 0 0 20px var(--primary);
}

.content-section h2 {
    font-size: 2.5rem;
    border-bottom: 2px solid var(--secondary);
    padding-bottom: 10px;
    margin-bottom: 40px;
    display: inline-block;
}

.glass-panel {
    background: var(--glass-bg);
    border: var(--glass-border);
    padding: 30px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    /* Slight rounded corners */
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.skill-card {
    background: var(--bg-panel);
    border: 1px solid #333;
    padding: 20px;
    transition: transform 0.3s;
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

.skill-bar {
    height: 10px;
    background: #333;
    margin: 10px 0;
    position: relative;
    overflow: hidden;
}

.skill-bar .fill {
    height: 100%;
    background: var(--secondary);
    box-shadow: 0 0 10px var(--secondary);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.project-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: 0.3s;
}

.project-card:hover {
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.3);
    border-color: var(--secondary);
}

.project-image {
    height: 200px;
    width: 100%;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid #333;
}

.project-info {
    padding: 20px;
}

.project-links {
    margin-top: 15px;
    display: flex;
    gap: 15px;
}

.text-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    border-bottom: 1px dashed var(--primary);
}

.text-link:hover {
    color: var(--secondary);
    border-color: var(--secondary);
}

/* Form */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--primary);
}

input,
textarea {
    width: 100%;
    padding: 10px;
    background: #111;
    border: 1px solid #333;
    color: var(--text-main);
    font-family: var(--font-mono);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 5px var(--primary);
}

footer {
    text-align: center;
    padding: 40px 0;
    margin-top: 50px;
    border-top: 1px solid #333;
    color: var(--text-dim);
    font-size: 0.8rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .glitch-large {
        font-size: 2.5rem;
    }

    header {
        flex-direction: column;
        padding: 15px;
    }

    .nav-links {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        gap: 15px;
    }

    main {
        padding-top: 120px;
        padding-left: 15px;
        padding-right: 15px;
    }

    section {
        min-height: auto;
        padding: 50px 0;
    }

    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }
}