* {
    font-family: 'Space Grotesk', sans-serif;
    scroll-behavior: smooth;
}

.orbitron {
    font-family: 'Orbitron', monospace;
}

body {
    background: radial-gradient(ellipse at center, #0f172a 0%, #020617 100%);
    overflow-x: hidden;
    counter-reset: section;
}

/* Accessibility Improvements */
:focus-visible {
    outline: 2px solid #06b6d4;
    outline-offset: 3px;
}

/* Matrix Animation */
.matrix-code {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.1;
}

/* Cyber Grid - Performance Optimized */
.cyber-grid {
    background-image:
        linear-gradient(rgba(6, 182, 212, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(6, 182, 212, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    will-change: transform;
}

/* Hologram Effect with GPU Acceleration */
.hologram {
    background: rgba(6, 182, 212, 0.05);
    border: 1px solid rgba(6, 182, 212, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
    transform: translateZ(0);
}

/* Neon Text with Better Contrast */
.neon-text {
    color: #06b6d4;
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.7);
}

/* Floating Orbs - Optimized Animation */
.floating-orb {
    position: fixed;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
    will-change: transform;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-30px) rotate(180deg);
    }
}

/* Performance Optimized Pulse Ring */
.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(6, 182, 212, 0.5);
    border-radius: 50%;
    animation: pulse 3s ease-out infinite;
    will-change: transform, opacity;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* Reduced Motion Variant */
@media (prefers-reduced-motion: reduce) {

    .pulse-ring,
    .floating-orb,
    .fade-in {
        animation: none !important;
    }
}

/* Skill Bars with Accessibility */
.skill-bar {
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.skill-progress {
    background: linear-gradient(90deg, #06b6d4, #0891b2);
    height: 100%;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    transition: width 1s ease-in-out;
}

.skill-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Project Cards with Better Hover */
.project-card {
    background: rgba(6, 182, 212, 0.05);
    border: 1px solid rgba(6, 182, 212, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    will-change: transform;
}

.project-card:hover {
    border-color: rgba(6, 182, 212, 0.5);
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.3);
    transform: translateY(-5px) scale(1.02);
}

/* Typing Animation - Reduced Motion Support */
@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

.typing {
    width: 0;
    animation: typing 3s steps(40, end), blink 0.75s step-end infinite;
    white-space: nowrap;
    overflow: hidden;
    border-right: 3px solid #06b6d4;
}

@media (prefers-reduced-motion: reduce) {
    .typing {
        animation: none;
        white-space: normal;
        border-right: none;
        width: auto;
    }
}

/* Scroll Animations - Optimized */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Contact Form Improvements */
.cyber-input {
    background: rgba(6, 182, 212, 0.05);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: white;
    transition: all 0.3s ease;
}

.cyber-input:focus {
    outline: none;
    border-color: #06b6d4;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
}

.cyber-input.valid {
    border-color: #10b981;
}

.cyber-input.invalid {
    border-color: #ef4444;
}

/* Timeline - Responsive Improvements */
.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background-color: #06b6d4;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
}

.timeline-container {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-container::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    right: -17px;
    background-color: #020617;
    border: 4px solid #06b6d4;
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.left {
    left: 0;
}

.right {
    left: 50%;
}

.left::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    right: 30px;
    border: medium solid #06b6d4;
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent #06b6d4;
}

.right::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    left: 30px;
    border: medium solid #06b6d4;
    border-width: 10px 10px 10px 0;
    border-color: transparent #06b6d4 transparent transparent;
}

.right::after {
    left: -16px;
}

.timeline-content {
    padding: 20px 30px;
    background-color: rgba(6, 182, 212, 0.05);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 6px;
}

/* Mobile Responsiveness */
@media screen and (max-width: 768px) {
    .hero-section {
        padding-top: 6rem;
    }

    .orbitron.text-6xl {
        font-size: 3.5rem;
        line-height: 1.2;
    }

    .grid-cols-2,
    .grid-cols-3 {
        grid-template-columns: 1fr;
    }

    .timeline::after {
        left: 31px;
    }

    .timeline-container {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-container::before {
        left: 60px;
        border: medium solid #06b6d4;
        border-width: 10px 10px 10px 0;
        border-color: transparent #06b6d4 transparent transparent;
    }

    .left::after,
    .right::after {
        left: 15px;
    }

    .right {
        left: 0%;
    }

    #typing-text {
        height: auto;
        white-space: normal;
    }
}

/* Print Styles */
@media print {
    body {
        background: white !important;
        color: black !important;
    }

    .matrix-code,
    .cyber-grid,
    .floating-orb,
    .pulse-ring {
        display: none !important;
    }

    a::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        font-weight: normal;
    }
}

.project-slider {
    position: relative;
}

.slides {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slides img {
    flex: 0 0 100%;
    object-fit: cover;
}

.slider-prev,
.slider-next {
    z-index: 10;
}

.absolute.bottom-2 span {
    transition: opacity 0.3s ease;
}

.absolute.bottom-2 span.opacity-100 {
    opacity: 1;
}

.absolute.bottom-2 span.opacity-50 {
    opacity: 0.5;
}

/* Floating animation */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Skill bar animation */
.skill-progress {
    background: linear-gradient(90deg, rgba(56, 182, 255, 0.6), rgba(124, 58, 237, 0.6));
    position: relative;
    transition: width 1.5s ease-out;
}

.skill-progress::after {
    content: attr(data-projects);
    position: absolute;
    right: 10px;
    top: -25px;
    font-size: 0.75rem;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.skill-bar:hover .skill-progress::after {
    opacity: 1;
}

/* Glow effect on hover */
.skill-card:hover {
    box-shadow: 0 0 15px rgba(56, 182, 255, 0.3);
}

/* Border animation */
.skill-card {
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to bottom right,
            rgba(56, 182, 255, 0) 0%,
            rgba(56, 182, 255, 0) 45%,
            rgba(56, 182, 255, 0.1) 48%,
            rgba(56, 182, 255, 0.1) 52%,
            rgba(56, 182, 255, 0) 55%,
            rgba(56, 182, 255, 0) 100%);
    transform: rotate(30deg);
    animation: borderLight 6s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.skill-card:hover::before {
    opacity: 1;
}

@keyframes borderLight {
    0% {
        transform: rotate(30deg) translate(-30%, -30%);
    }

    100% {
        transform: rotate(30deg) translate(30%, 30%);
    }
}

/* Add these styles to your CSS */
.project-card {
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.project-card:hover {
    box-shadow: 0 10px 25px -5px rgba(34, 211, 238, 0.1);
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fade-in {
    animation: fadeIn 0.5s ease-in forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Delay animations for each card */
.project-card:nth-child(1) {
    animation-delay: 0.1s;
}

.project-card:nth-child(2) {
    animation-delay: 0.2s;
}

.project-card:nth-child(3) {
    animation-delay: 0.3s;
}

.project-card:nth-child(4) {
    animation-delay: 0.4s;
}

.project-card:nth-child(5) {
    animation-delay: 0.5s;
}

.project-card:nth-child(6) {
    animation-delay: 0.6s;
}