@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600&family=Inter:wght@300;400;600;800&display=swap');

:root {
    --bg-color: #080b12;
    --text-color: #e2e8f0;
    --text-muted: #8b9bb4;
    --accent: #4d7cff;
    --accent-rgb: 77, 124, 255;
    --accent-glow: rgba(var(--accent-rgb), 0.2);
    --card-bg: rgba(var(--accent-rgb), 0.03);
    --card-border: rgba(var(--accent-rgb), 0.15);
    --font-mono: 'Fira Code', 'Courier New', monospace;
    --font-sans: 'Inter', 'Segoe UI', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

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

/* Background Cyber Grid effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: -1;
    pointer-events: none;
}

/* CRT Scanlines Overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    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;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.15;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s, text-shadow 0.3s;
}

a:hover {
    color: #fff;
    text-shadow: 0 0 8px var(--accent-glow);
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* Navbar */
@keyframes navbar-slide-down {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--card-border);
    z-index: 100;
    animation: navbar-slide-down 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.scroll-progress-container {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: transparent;
}

.scroll-progress-bar {
    position: relative;
    height: 100%;
    width: 0%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow), 0 0 20px var(--accent-glow);
    transition: width 0.1s;
}

/* The Cyberpunk "Laser Head" */
.scroll-progress-bar::after {
    content: '';
    position: absolute;
    top: -1px;
    right: 0;
    width: 10px;
    height: 4px;
    background: #fff;
    border-radius: 2px;
    box-shadow: 0 0 10px #fff, 0 0 20px var(--accent);
    animation: laser-pulse 1s infinite alternate;
}

@keyframes laser-pulse {
    0% { opacity: 0.8; width: 8px; box-shadow: 0 0 5px #fff, 0 0 10px var(--accent); }
    100% { opacity: 1; width: 15px; box-shadow: 0 0 15px #fff, 0 0 30px var(--accent); }
}

.logo {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 1.2rem;
    color: #fff;
    display: flex;
    align-items: center;
}

.logo::after {
    content: '█';
    color: var(--accent);
    margin-left: 6px;
    font-size: 1rem;
    animation: blink-cursor 1s step-start infinite;
}

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

@keyframes glitch-anim {

    0%,
    96% {
        transform: none;
        text-shadow: none;
        color: var(--accent);
    }

    97% {
        transform: translate(-2px, 1px);
        text-shadow: 2px 0 #00ffcc, -2px 0 #ff003c;
        color: #fff;
    }

    98% {
        transform: translate(2px, -1px);
        text-shadow: -2px 0 #00ffcc, 2px 0 #ff003c;
        color: #fff;
    }

    99% {
        transform: translate(-1px, 2px);
        text-shadow: 2px 0 #00ffcc, -2px 0 #ff003c;
        color: #fff;
    }

    100% {
        transform: none;
        text-shadow: none;
        color: var(--accent);
    }
}

.logo span {
    color: var(--accent);
    display: inline-block;
    animation: glitch-anim 3s infinite;
}

.nav-links a {
    margin-left: 20px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-color);
}

.nav-links a:hover {
    color: var(--accent);
}

/* Sections */
section {
    padding: 100px 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50%;
    height: 3px;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

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

.hero-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.hero-content {
    max-width: 600px;
}

.hero-image {
    width: 350px;
    height: 350px;
    position: relative;
    z-index: 1;
    border-radius: 50%;
    background: rgba(var(--accent-rgb), 0.05);
    border: 2px solid rgba(var(--accent-rgb), 0.3);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    animation: pulse-glow 4s ease-in-out infinite;
}

.hero-image img {
    width: 95%;
    height: auto;
    object-fit: contain;
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 15px var(--accent-glow);
    }

    50% {
        box-shadow: 0 0 35px var(--accent);
        border-color: var(--accent);
    }

    100% {
        box-shadow: 0 0 15px var(--accent-glow);
    }
}

.hero-subtitle {
    font-family: var(--font-mono);
    color: var(--accent);
    margin-bottom: 10px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    color: #fff;
}

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

/* Reveal Animations */
.reveal-on-type {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(20px);
}

.reveal-on-type.visible {
    animation: cyber-reveal 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.scroll-reveal {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, filter 0.8s ease-out, transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.scroll-reveal.visible {
    animation: scroll-glitch-anim 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes scroll-glitch-anim {
    0% { opacity: 0; filter: blur(10px); transform: translateY(30px); }
    70% { opacity: 1; filter: blur(0); transform: translateY(0); }
    75% { transform: translateX(-10px) skewX(10deg); filter: hue-rotate(90deg); }
    80% { transform: translateX(10px) skewX(-10deg); filter: hue-rotate(-90deg); }
    85% { transform: translateX(0) skewX(0); filter: hue-rotate(0); }
    100% { opacity: 1; filter: blur(0); transform: translateY(0); }
}

@keyframes cyber-reveal {
    0% {
        opacity: 0;
        filter: blur(10px);
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0);
    }
}

@keyframes cyber-reveal-centered {
    0% {
        opacity: 0;
        filter: blur(10px);
        transform: translateY(20px) translateX(-50%);
    }

    100% {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0) translateX(-50%);
    }
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background: transparent;
    color: var(--accent);
    font-family: var(--font-mono);
    border: 1px solid var(--accent);
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

@keyframes glitch-hover {
    0% {
        transform: translate(0);
        text-shadow: none;
    }

    20% {
        transform: translate(-2px, 1px);
        text-shadow: 2px 0 #00ffcc, -2px 0 #ff003c;
    }

    40% {
        transform: translate(2px, -1px);
        text-shadow: -2px 0 #00ffcc, 2px 0 #ff003c;
    }

    60% {
        transform: translate(-1px, 2px);
        text-shadow: 2px 0 #00ffcc, -2px 0 #ff003c;
    }

    80% {
        transform: translate(1px, -2px);
        text-shadow: -2px 0 #00ffcc, 2px 0 #ff003c;
    }

    100% {
        transform: translate(0);
        text-shadow: 0 0 8px var(--accent-glow);
    }
}

.btn:hover {
    background: var(--accent-glow);
    box-shadow: 0 0 25px var(--accent), 0 0 50px var(--accent-glow);
    color: #fff;
    border-color: #fff;
    animation: glitch-hover 0.3s forwards;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Skills Matrix */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-chip {
    padding: 8px 16px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: all 0.3s;
}

.skill-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 15px var(--accent), inset 0 0 10px var(--accent-glow);
}

/* Experience Timeline */
.timeline {
    position: relative;
    border-left: 2px solid var(--card-border);
    padding-left: 30px;
    margin-left: 15px;
}

.data-pulse {
    position: absolute;
    left: -2px;
    top: 0;
    width: 2px;
    height: 100px;
    background: #fff;
    box-shadow: 0 0 10px #fff, 0 0 20px var(--accent);
    animation: data-flow 4s infinite linear;
    z-index: 10;
}

@keyframes data-flow {
    0% { top: -100px; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -37px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg-color);
    border: 2px solid var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
}

.timeline-date {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.timeline-title {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 5px;
}

.timeline-company {
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.timeline-content ul {
    list-style-type: none;
}

.timeline-content li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
}

.timeline-content li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 25px;
    border-radius: 8px;
    transition: transform 0.1s ease, border-color 0.3s;
    display: flex;
    flex-direction: column;
    transform-style: preserve-3d;
}

.project-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 25px rgba(var(--accent-rgb), 0.15), inset 0 0 10px rgba(var(--accent-rgb), 0.05);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.project-icon {
    font-size: 2rem;
    color: var(--accent);
}

.project-links a {
    color: var(--text-muted);
    font-size: 1.2rem;
    margin-left: 10px;
}

.project-links a:hover {
    color: var(--accent);
}

.project-title {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 10px;
}

.project-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    flex-grow: 1;
    margin-bottom: 20px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent);
}

/* Highlights Section */
.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.highlights-column {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 30px;
    transition: transform 0.1s ease, border-color 0.3s, box-shadow 0.3s;
    transform-style: preserve-3d;
}

.highlights-column:hover {
    border-color: rgba(var(--accent-rgb), 0.3);
    box-shadow: 0 0 25px rgba(var(--accent-rgb), 0.15);
}

.highlight-title {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 25px;
    text-align: center;
    border-bottom: 1px solid var(--accent-glow);
    padding-bottom: 10px;
}

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

.highlight-list li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--card-border);
}

.highlight-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.highlight-list>li>i {
    font-size: 1.5rem;
    color: var(--accent);
    margin-top: 5px;
    min-width: 30px;
}

.highlight-list h4 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

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

/* Contact */
.contact-section {
    text-align: center;
    padding-bottom: 100px;
}

.contact-section .section-title::after {
    left: 25%;
    width: 50%;
}

.contact-section p {
    max-width: 600px;
    margin: 0 auto 30px;
    color: var(--text-muted);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.social-links a {
    font-size: 1.5rem;
    color: var(--text-muted);
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--accent);
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    border-top: 1px solid var(--card-border);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block !important;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: rgba(5, 5, 5, 0.95);
        backdrop-filter: blur(15px);
        padding: 20px 0;
        border-bottom: 1px solid var(--card-border);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        margin: 15px 0;
        text-align: center;
        width: 100%;
    }

    .hero {
        height: auto;
        min-height: 100vh;
        padding-top: 120px;
        padding-bottom: 60px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-container {
        flex-direction: column-reverse;
        text-align: center;
    }

    .hero-image {
        width: 180px;
        height: 180px;
        margin: 0 auto 30px auto;
    }

    .scroll-indicator {
        display: none !important;
    }

    .hero-buttons {
        justify-content: center;
    }

    .company-logo {
        width: 45px;
        height: 45px;
    }

    .timeline-title {
        font-size: 1.1rem;
    }

    .timeline-company {
        font-size: 0.9rem;
    }

    .timeline-date {
        font-size: 0.8rem;
    }

    .experience-header-left {
        gap: 12px;
    }

    section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .contact-section .btn {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* About Section Grid */
.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
    align-items: flex-start;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--accent);
    font-size: 2rem;
    animation: bounce 2s infinite;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.scroll-indicator.reveal-on-type {
    transform: translateY(20px) translateX(-50%);
    animation: none;
}

.scroll-indicator.reveal-on-type.visible {
    animation: cyber-reveal-centered 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards, bounce 2s infinite 0.6s;
}

.scroll-indicator:hover {
    opacity: 1;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0) translateX(-50%);
    }

    40% {
        transform: translateY(-15px) translateX(-50%);
    }

    60% {
        transform: translateY(-7px) translateX(-50%);
    }
}

/* Skills Grid Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.skill-category-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 25px;
    transition: transform 0.3s, border-color 0.3s;
}

.skill-category-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 5px 15px var(--accent-glow);
}

.skill-category-title {
    font-family: var(--font-mono);
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 10px;
}

@media (min-width: 768px) {
    .span-2 {
        grid-column: span 2;
    }
}

/* Experience Accordion */
.experience-accordion {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    margin-top: 10px;
    padding: 20px;
    transition: all 0.3s;
}

.experience-accordion[open] {
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(var(--accent-rgb), 0.1);
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    list-style: none;
    /* Hide default triangle */
}

.experience-header::-webkit-details-marker {
    display: none;
}

.experience-header:hover h3 {
    color: var(--accent);
}

.accordion-icon i {
    transition: transform 0.3s;
    color: var(--text-muted);
}

.experience-accordion[open] .accordion-icon i {
    transform: rotate(180deg);
    color: var(--accent);
}

.timeline-content {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--card-border);
}

.experience-header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.company-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    opacity: 0.9;
    border-radius: 4px;
    /* Slight rounding in case the images have solid edges */
}
