:root {
    --primary-color: #00f3ff;
    --secondary-color: #bc13fe;
    --accent-color: #ff0055;
    --bg-color: #050505;
    --bg-darker: #020202;
    --text-color: #e0e0e0;
    --text-muted: #888;
    --glass-bg: rgba(20, 20, 20, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: 20px;
    --font-main: 'Roboto', sans-serif;
    --font-tech: 'Orbitron', sans-serif;
    --font-code: 'JetBrains Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
}

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

/* Background Canvas */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Typography Helpers */
.highlight {
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}

.section-title {
    font-family: var(--font-tech);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 4rem;
    font-size: 1.1rem;
}

/* Layout Helpers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 100px 0;
}

.bg-darker {
    background-color: rgba(0, 0, 0, 0.3);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    background: rgba(5, 5, 5, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-tech);
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    letter-spacing: 2px;
}

.logo .dot {
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 1rem;
    position: relative;
}

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

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

.nav-link:hover {
    color: var(--primary-color);
}

.btn-contact {
    padding: 8px 20px;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    color: var(--primary-color);
}

.btn-contact:hover {
    background: var(--primary-color);
    color: #000;
}

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

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: #fff;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding-top: 60px;
}

.hero-content {
    z-index: 1;
}

.avatar-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 30px;
}

.hero-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--bg-color);
    position: relative;
    z-index: 2;
}

.cyber-ring {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    border-top-color: transparent;
    border-left-color: transparent;
    animation: spin 3s linear infinite;
}

.cyber-ring-2 {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    border: 2px dashed var(--secondary-color);
    border-radius: 50%;
    animation: spin-reverse 8s linear infinite;
}

@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes spin-reverse { 100% { transform: rotate(-360deg); } }

.glitch-text {
    font-family: var(--font-tech);
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 10px;
    position: relative;
    color: #fff;
}

.typing-container {
    font-family: var(--font-code);
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    min-height: 1.6em;
}

.cursor {
    animation: blink 1s step-end infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.hero-desc {
    max-width: 600px;
    margin: 0 auto 40px;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.hero-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn {
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: var(--font-tech);
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.3);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.5);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
}

.btn-outline:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.scroll-down span {
    width: 15px;
    height: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
    border-right: 2px solid rgba(255, 255, 255, 0.5);
    transform: rotate(45deg);
    margin: -5px;
    animation: scroll 2s infinite;
}

.scroll-down span:nth-child(2) { animation-delay: .2s; }
.scroll-down span:nth-child(3) { animation-delay: .4s; }

@keyframes scroll {
    0% { opacity: 0; transform: rotate(45deg) translate(-20px, -20px); }
    50% { opacity: 1; }
    100% { opacity: 0; transform: rotate(45deg) translate(20px, 20px); }
}

/* Glass Panel Utility */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.about-card {
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease;
}

.about-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.05);
}

.icon-box {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.about-card h3 {
    margin-bottom: 15px;
    font-family: var(--font-tech);
}

.about-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    height: 100%;
}

.card-content {
    padding: 40px;
    position: relative;
    z-index: 2;
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 25px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.service-card h3 {
    font-family: var(--font-tech);
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #fff;
}

.service-list {
    list-style: none;
    text-align: left;
}

.service-list li {
    margin-bottom: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
}

.service-list li i {
    color: var(--primary-color);
    font-size: 0.8rem;
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(0, 243, 255, 0.1), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.service-card:hover .card-glow {
    opacity: 1;
}

/* Skills Section */
.skills-wrapper {
    padding: 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: center;
}

.skill-category {
    flex: 1;
    min-width: 300px;
}

.skill-category h3 {
    font-family: var(--font-tech);
    color: var(--primary-color);
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    font-family: var(--font-code);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.tag:hover {
    background: rgba(0, 243, 255, 0.1);
    border-color: var(--primary-color);
    color: #fff;
    transform: scale(1.05);
}

.skill-divider {
    width: 1px;
    background: rgba(255, 255, 255, 0.1);
    display: none;
}

@media (min-width: 768px) {
    .skill-divider { display: block; }
}

/* Contact Section */
.contact-wrapper {
    max-width: 900px;
    margin: 0 auto;
    perspective: 1000px;
}

.cyber-card {
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 243, 255, 0.1);
    border-radius: 4px; /* Techy sharp corners */
    padding: 60px 40px;
    position: relative;
    text-align: center;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    /* Grid Background */
    background-image: 
        linear-gradient(rgba(0, 243, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
}

/* Card Decorations */
.card-decor {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    transition: all 0.3s ease;
}

.card-decor.top-left { top: 0; left: 0; border-right: none; border-bottom: none; }
.card-decor.top-right { top: 0; right: 0; border-left: none; border-bottom: none; }
.card-decor.bottom-left { bottom: 0; left: 0; border-right: none; border-top: none; }
.card-decor.bottom-right { bottom: 0; right: 0; border-left: none; border-top: none; }

.cyber-card:hover .card-decor {
    width: 30px;
    height: 30px;
    box-shadow: 0 0 10px var(--primary-color);
}

.glow-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    filter: drop-shadow(0 0 10px rgba(0, 243, 255, 0.5));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.glitch-title {
    font-family: var(--font-tech);
    font-size: 3rem;
    color: #fff;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

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

.glitch-title::before {
    left: 2px;
    text-shadow: -1px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch-title::after {
    left: -2px;
    text-shadow: -1px 0 #00fff9;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(38px, 9999px, 49px, 0); }
    20% { clip: rect(78px, 9999px, 91px, 0); }
    40% { clip: rect(15px, 9999px, 25px, 0); }
    60% { clip: rect(8px, 9999px, 98px, 0); }
    80% { clip: rect(32px, 9999px, 4px, 0); }
    100% { clip: rect(65px, 9999px, 83px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(12px, 9999px, 88px, 0); }
    20% { clip: rect(96px, 9999px, 24px, 0); }
    40% { clip: rect(54px, 9999px, 6px, 0); }
    60% { clip: rect(27px, 9999px, 16px, 0); }
    80% { clip: rect(73px, 9999px, 42px, 0); }
    100% { clip: rect(9px, 9999px, 55px, 0); }
}

.contact-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Cyber Button */
.cyber-btn {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 15px 40px;
    background: transparent;
    color: var(--primary-color);
    font-family: var(--font-tech);
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 1px solid var(--primary-color);
    overflow: hidden;
    transition: 0.5s;
    z-index: 1;
}

.cyber-btn:hover {
    color: #000;
    box-shadow: 0 0 20px var(--primary-color);
    background: var(--primary-color);
}

.btn-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-tag {
    position: absolute;
    right: 2px;
    bottom: 2px;
    font-size: 0.5rem;
    color: var(--primary-color);
    opacity: 0.5;
}

.cyber-btn:hover .btn-tag {
    color: #000;
}

/* Footer */
footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 40px 0;
    text-align: center;
    background: #020202;
}

.footer-logo {
    font-family: var(--font-tech);
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
}

.copyright {
    color: #666;
    font-size: 0.85rem;
}

/* Animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

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

.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }

/* Mobile Menu */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }

    .section-subtitle {
        font-size: 0.9rem;
        margin-bottom: 2rem;
    }

    .menu-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(5, 5, 5, 0.95);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 20px 0;
        backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        height: calc(100vh - 70px); /* Full height menu */
        justify-content: center;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 20px 0;
    }
    
    .nav-link {
        font-size: 1.2rem;
    }

    /* Hero Section Mobile */
    .hero-section {
        height: auto;
        min-height: 100vh;
        padding-top: 100px;
        padding-bottom: 60px;
    }

    .hero-content {
        width: 100%;
    }

    .avatar-wrapper {
        width: 140px;
        height: 140px;
    }

    .glitch-text {
        font-size: 2.2rem;
    }

    .typing-container {
        font-size: 1.1rem;
        min-height: 2.4em; /* Prevent layout shift */
    }

    .hero-btns {
        flex-direction: column;
        width: 100%;
        padding: 0 20px;
    }

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

    /* Grids Mobile */
    .about-grid, 
    .services-grid {
        grid-template-columns: 1fr;
    }

    /* Skills Mobile */
    .skills-wrapper {
        padding: 20px;
        gap: 30px;
    }

    .skill-category {
        min-width: 100%;
    }
    
    .skill-tags {
        justify-content: center;
    }

    /* Contact Mobile */
    .cyber-card {
        padding: 40px 20px;
    }

    .glitch-title {
        font-size: 2rem;
    }

    .glow-icon {
        font-size: 3rem;
    }
    
    .contact-desc {
        font-size: 1rem;
    }
    
    .cyber-btn {
        width: 100%;
        padding: 15px 20px;
    }
}

@media (max-width: 480px) {
    .glitch-text {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
}
