/* CSS Variables for Neon Cyberpunk Theme */
:root {
    --bg-color: #050505;
    --panel-bg: rgba(10, 15, 20, 0.7);
    --border-color: rgba(0, 255, 204, 0.3);
    
    --neon-cyan: #00ffcc;
    --neon-blue: #00b3ff;
    --neon-magenta: #ff00ff;
    --neon-green: #39ff14;
    
    --text-main: #e0e0e0;
    --text-dim: #888;
    
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Fira Code', monospace;
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.4s ease;
}

/* Custom Cursor */
body, a, button, .cyber-btn, .burger-menu, .project-card, .carousel-indicator {
    cursor: none !important;
}

.cursor-dot {
    width: 6px;
    height: 6px;
    background-color: var(--neon-cyan);
    position: fixed;
    top: 0;
    left: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s;
    box-shadow: 0 0 10px var(--neon-cyan);
}

.cursor-outline {
    width: 30px;
    height: 30px;
    border: 1px solid var(--neon-magenta);
    position: fixed;
    top: 0;
    left: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.5);
}

.cursor-hover .cursor-dot {
    width: 10px;
    height: 10px;
    background-color: var(--neon-magenta);
    box-shadow: 0 0 15px var(--neon-magenta);
}

.cursor-hover .cursor-outline {
    width: 50px;
    height: 50px;
    background-color: rgba(255, 0, 255, 0.1);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 25px rgba(0, 255, 204, 0.5);
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

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

/* Canvas Background */
#cyber-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    opacity: 0.6;
}

/* Typography Headings */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    letter-spacing: 2px;
}

/* Glitch Effect Generic */
.glitch {
    position: relative;
    color: white;
}

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

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

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--neon-cyan);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(61px, 9999px, 52px, 0); }
    5% { clip: rect(33px, 9999px, 144px, 0); }
    10% { clip: rect(121px, 9999px, 115px, 0); }
    15% { clip: rect(144px, 9999px, 162px, 0); }
    20% { clip: rect(62px, 9999px, 180px, 0); }
    25% { clip: rect(34px, 9999px, 42px, 0); }
    30% { clip: rect(147px, 9999px, 179px, 0); }
    35% { clip: rect(99px, 9999px, 63px, 0); }
    40% { clip: rect(188px, 9999px, 122px, 0); }
    45% { clip: rect(154px, 9999px, 14px, 0); }
    50% { clip: rect(63px, 9999px, 37px, 0); }
    55% { clip: rect(161px, 9999px, 147px, 0); }
    60% { clip: rect(109px, 9999px, 175px, 0); }
    65% { clip: rect(157px, 9999px, 88px, 0); }
    70% { clip: rect(173px, 9999px, 131px, 0); }
    75% { clip: rect(62px, 9999px, 71px, 0); }
    80% { clip: rect(24px, 9999px, 153px, 0); }
    85% { clip: rect(138px, 9999px, 40px, 0); }
    90% { clip: rect(79px, 9999px, 136px, 0); }
    95% { clip: rect(68px, 9999px, 60px, 0); }
    100% { clip: rect(14px, 9999px, 85px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(29px, 9999px, 83px, 0); }
    5% { clip: rect(65px, 9999px, 116px, 0); }
    10% { clip: rect(66px, 9999px, 116px, 0); }
    15% { clip: rect(186px, 9999px, 60px, 0); }
    20% { clip: rect(10px, 9999px, 77px, 0); }
    25% { clip: rect(122px, 9999px, 57px, 0); }
    30% { clip: rect(106px, 9999px, 192px, 0); }
    35% { clip: rect(81px, 9999px, 86px, 0); }
    40% { clip: rect(16px, 9999px, 199px, 0); }
    45% { clip: rect(198px, 9999px, 133px, 0); }
    50% { clip: rect(167px, 9999px, 14px, 0); }
    55% { clip: rect(61px, 9999px, 7px, 0); }
    60% { clip: rect(127px, 9999px, 189px, 0); }
    65% { clip: rect(148px, 9999px, 49px, 0); }
    70% { clip: rect(27px, 9999px, 2px, 0); }
    75% { clip: rect(134px, 9999px, 74px, 0); }
    80% { clip: rect(171px, 9999px, 194px, 0); }
    85% { clip: rect(25px, 9999px, 16px, 0); }
    90% { clip: rect(10px, 9999px, 148px, 0); }
    95% { clip: rect(117px, 9999px, 107px, 0); }
    100% { clip: rect(31px, 9999px, 182px, 0); }
}

/* Glass Panels & Borders */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.05);
}

.cyber-border {
    position: relative;
    border: 1px solid #333;
    transition: var(--transition-normal);
}

.cyber-border:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.3), inset 0 0 15px rgba(0, 255, 204, 0.1);
}

/* Reusable Buttons */
.cyber-btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    font-family: var(--font-heading);
    font-size: 1rem;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 700;
    transition: var(--transition-fast);
    cursor: pointer;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.primary-btn {
    background: transparent;
    color: var(--neon-cyan);
    border: 2px solid var(--neon-cyan);
    text-shadow: 0 0 5px var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.2);
}

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

.outline-btn {
    background: transparent;
    color: var(--neon-magenta);
    border: 1px solid var(--neon-magenta);
}

.outline-btn:hover {
    background: rgba(255, 0, 255, 0.1);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.4);
}

.icon-btn {
    padding: 0.8rem;
    color: var(--text-main);
    border: 1px solid #444;
}

.icon-btn:hover {
    color: var(--neon-cyan);
    border-color: var(--neon-cyan);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 255, 204, 0.1);
}

.navbar .logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 900;
    color: var(--neon-cyan);
}

.navbar nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.navbar nav a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.navbar nav a:hover {
    color: var(--neon-cyan);
    text-shadow: 0 0 8px var(--neon-cyan);
}

.burger-menu {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--neon-cyan);
}

/* Structure Sections */
.page-glitch {
    animation: page-transition-glitch 0.2s cubic-bezier(.25, .46, .45, .94);
}

@keyframes page-transition-glitch {
    0% { transform: translate(0); filter: hue-rotate(0deg) contrast(100%); }
    20% { transform: translate(-10px, 5px); filter: hue-rotate(90deg) contrast(150%); }
    40% { transform: translate(10px, -5px); filter: hue-rotate(-90deg) contrast(150%); }
    60% { transform: translate(-5px, 10px); filter: hue-rotate(45deg) contrast(120%); }
    80% { transform: translate(5px, -10px); filter: hue-rotate(-45deg) contrast(120%); }
    100% { transform: translate(0); filter: hue-rotate(0deg) contrast(100%); }
}

main > section {
    display: none; /* Hidden by default for SPA */
    animation: fadeIn 0.4s ease forwards;
}

main > section.active {
    display: flex;
}

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

.section {
    padding: 6rem 5% 4rem;
    min-height: 100vh;
    flex-direction: column;
    justify-content: center;
}

.section-title {
    font-size: 2.5rem;
    color: var(--neon-cyan);
    margin-bottom: 3rem;
    border-bottom: 2px solid #222;
    padding-bottom: 0.5rem;
    display: inline-block;
    align-self: flex-start;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 0 5%;
}

.terminal-window {
    width: 100%;
    max-width: 800px;
    background: rgba(10, 10, 10, 0.9);
    border-radius: 8px;
    border: 1px solid #333;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8), 0 0 20px rgba(0, 255, 204, 0.1);
}

.terminal-header {
    background: #1a1a1a;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #333;
}

.terminal-header span[class^="btn-"] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.btn-close { background: #ff5f56; }
.btn-min { background: #ffbd2e; }
.btn-max { background: #27c93f; }

.terminal-title {
    color: #888;
    font-size: 0.8rem;
    margin-left: auto;
    margin-right: auto;
}

.terminal-body {
    padding: 2rem;
    min-height: 300px;
}

.prompt {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.prompt .user { color: var(--neon-green); }
.prompt .dir { color: var(--neon-blue); }
.prompt .cursor {
    display: inline-block;
    width: 10px;
    height: 1.2rem;
    background: var(--text-main);
    vertical-align: middle;
    animation: blink 1s step-end infinite;
}

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

.hidden-content {
    opacity: 0;
    transition: opacity 1s ease-in;
    margin-top: 2rem;
}

.hidden-content.visible {
    opacity: 1;
}

.glitch-title {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: white;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-dim);
    margin-bottom: 2rem;
    font-family: var(--font-body);
}

/* About Overlay */
.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.about-text h3 {
    color: var(--neon-magenta);
    margin-bottom: 1rem;
    font-family: var(--font-body);
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.about-text strong {
    color: var(--neon-cyan);
}

.btn-group {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.about-stats {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    text-align: center;
}

.stat-item .stat-number {
    display: block;
    font-size: 2.5rem;
    color: var(--neon-green);
    font-family: var(--font-heading);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.4);
}

.stat-item .stat-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Skills matrix */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.skill-category h3 {
    font-size: 1.2rem;
    color: var(--neon-cyan);
    margin-bottom: 1.5rem;
    border-bottom: 1px dashed #444;
    padding-bottom: 0.5rem;
}

.skill-category i {
    margin-right: 10px;
}

.skill-list {
    list-style: none;
}

.skill-list li {
    margin-bottom: 1.2rem;
}

.skill-list .keyword {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #222;
    border-radius: 3px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-magenta), var(--neon-cyan));
    border-radius: 3px;
    box-shadow: 0 0 10px var(--neon-magenta);
}

/* Distinct styling for Languages and Soft Skills */
.skill-category.special-panel {
    background: rgba(15, 5, 20, 0.6);
    border-color: rgba(255, 0, 255, 0.3);
    grid-column: 1 / -1; /* Make it stretch across the full width */
}

.skill-category.special-panel h3 {
    color: var(--neon-magenta);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cyber-tag {
    background: rgba(0, 255, 204, 0.1);
    color: var(--neon-cyan);
    border: 1px solid var(--neon-cyan);
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
}

.cyber-tag:hover {
    background: var(--neon-cyan);
    color: #000;
    box-shadow: 0 0 10px var(--neon-cyan);
}

.lang-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Better scaling for full width */
    gap: 15px;
}

.lang-item {
    display: flex;
    flex-direction: column;
    padding: 10px;
    border-left: 2px solid var(--neon-magenta);
    background: rgba(255, 0, 255, 0.05);
}

.lang-item span {
    font-weight: bold;
    color: white;
}

.lang-item small {
    color: var(--text-dim);
    font-size: 0.8rem;
}

/* Projects Carousel */
.carousel-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 0 40px;
}

.carousel-track-container {
    overflow: hidden;
    width: 100%;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    gap: 2rem;
    align-items: stretch;
}

.carousel-track .project-card {
    flex: 0 0 calc(33.333% - 1.33rem); /* 3 items per view minus gap allocation */
    min-width: 0;
    height: auto;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    z-index: 10;
    transition: var(--transition-fast);
    display: flex;
    justify-content: center;
    align-items: center;
}

.carousel-btn:hover {
    background: var(--neon-cyan);
    color: #000;
    box-shadow: 0 0 15px var(--neon-cyan);
}

.prev-btn { left: 0px; }
.next-btn { right: 0px; }

.carousel-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 2rem;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    transition: var(--transition-fast);
}

.carousel-indicator.active {
    background: var(--neon-magenta);
    box-shadow: 0 0 10px var(--neon-magenta);
    transform: scale(1.2);
}

@media (max-width: 1024px) {
    .carousel-track .project-card {
        flex: 0 0 calc(50% - 1rem); /* 2 items per view */
    }
}
@media (max-width: 768px) {
    .carousel-track .project-card {
        flex: 0 0 100%; /* 1 item per view */
    }
    .carousel-container { padding: 0 30px; }
    .prev-btn { left: 0px; }
    .next-btn { right: 0px; }
}

.project-card {
    background: rgba(15, 15, 15, 0.8);
    backdrop-filter: blur(5px);
    border-radius: 6px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.project-header h3 {
    color: white;
    font-size: 1.3rem;
}

.project-header h3 i {
    color: var(--neon-cyan);
    margin-right: 8px;
}

.badge {
    background: rgba(0, 255, 204, 0.1);
    color: var(--neon-cyan);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    border: 1px solid var(--neon-cyan);
}

.project-body p {
    color: var(--text-dim);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.project-body ul {
    list-style-type: '>';
    padding-left: 1rem;
    color: #ccc;
    font-size: 0.9rem;
}

.project-body li {
    padding-left: 0.5rem;
    margin-bottom: 0.5rem;
}

.project-footer {
    margin-top: auto;
    padding-top: 1.5rem;
}

.cyber-link {
    color: var(--neon-green);
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.cyber-link:hover {
    text-shadow: 0 0 8px var(--neon-green);
    letter-spacing: 1px;
}

/* IT Timeline */
.timeline-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: #333;
    top: 0;
    bottom: 0;
    left: 20px;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 100%;
    margin-bottom: 2rem;
}

.timeline-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--neon-cyan);
    border-radius: 50%;
    left: 13px;
    top: 25px;
    z-index: 1;
    box-shadow: 0 0 10px var(--neon-cyan), 0 0 20px var(--neon-cyan);
}

.timeline-date {
    display: inline-block;
    color: var(--neon-magenta);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.timeline-content h3 {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 0.2rem;
}

.timeline-content h4 {
    color: var(--text-dim);
    font-family: var(--font-body);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.timeline-content ul {
    margin-left: 1.5rem;
    color: #ccc;
    font-size: 0.95rem;
    list-style-type: square;
}
.timeline-content li { margin-bottom: 0.5rem; }

/* Contact Forms */
.contact-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.contact-header {
    margin-bottom: 3rem;
}

.contact-header h3 {
    font-size: 1.8rem;
    color: var(--neon-cyan);
    margin-bottom: 1rem;
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #333;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-main);
    transition: var(--transition-normal);
    min-width: 250px;
    text-align: left;
}

.contact-item:hover {
    border-color: var(--neon-magenta);
    background: rgba(255, 0, 255, 0.05);
    transform: translateY(-5px);
}

.contact-item .icon-box {
    font-size: 1.5rem;
    color: var(--neon-magenta);
}

.contact-details {
    display: flex;
    flex-direction: column;
}

.contact-details .label {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
}

.social-links-big {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px dashed #333;
    background: #000;
}

footer p {
    font-family: var(--font-heading);
    color: var(--neon-cyan);
}

footer .minor {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: #555;
    margin-top: 0.5rem;
}

.blink {
    animation: blink 1s infinite;
}

/* Selection */
::selection {
    background: var(--neon-cyan);
    color: #000;
}

/* Responsive Variables */
@media (max-width: 900px) {
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .glitch-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .burger-menu {
        display: block;
    }
    
    .navbar nav {
        display: none; /* Can be toggled via JS */
    }
    
    .section {
        padding: 5rem 5% 3rem;
    }

    .contact-item {
        width: 100%;
    }
}
