/* ============================================
   CSS VARIABLES & RESET
   ============================================ */
:root {
    --cyan: #00FFFF;
    --magenta: #FF00FF;
    --dark-bg: #0a0a0f;
    --darker-bg: #050508;
    --card-bg: #12121a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --gradient: linear-gradient(135deg, var(--cyan), var(--magenta));
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Space Mono', monospace;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ============================================
   CURSOR TRAIL
   ============================================ */
#cursor-trail {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* ============================================
   FLOATING PIXELS
   ============================================ */
.pixel-float {
    position: fixed;
    width: 10px;
    height: 10px;
    background: var(--cyan);
    box-shadow: 0 0 20px var(--cyan);
    opacity: 0.6;
    z-index: 1;
}

.pixel-1 {
    top: 20%;
    left: 10%;
    animation: float 6s ease-in-out infinite;
}

.pixel-2 {
    top: 60%;
    right: 15%;
    animation: float 8s ease-in-out infinite 1s;
    background: var(--magenta);
    box-shadow: 0 0 20px var(--magenta);
}

.pixel-3 {
    bottom: 30%;
    left: 20%;
    animation: float 7s ease-in-out infinite 2s;
}

.pixel-4 {
    top: 40%;
    right: 25%;
    animation: float 9s ease-in-out infinite 0.5s;
    background: var(--magenta);
    box-shadow: 0 0 20px var(--magenta);
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(20px, -20px) rotate(90deg); }
    50% { transform: translate(-10px, 15px) rotate(180deg); }
    75% { transform: translate(15px, 10px) rotate(270deg); }
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
    position: fixed;
    top: 30px;
    right: 30px;
    display: flex;
    gap: 20px;
    z-index: 1000;
    background: rgba(18, 18, 26, 0.8);
    padding: 15px 25px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.nav-link {
    font-family: 'Silkscreen', cursive;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 40px;
    position: relative;
}

.hero-content {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1200px;
    width: 100%;
    text-align: center;
}

.hero-title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2.5rem, 6vw, 6rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    cursor: pointer;
    transition: transform 0.2s;
}

.hero-title:hover {
    transform: scale(1.02);
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.glitch {
    position: relative;
    display: inline-block;
}

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

.glitch:hover::before {
    animation: glitch-1 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite;
    color: var(--cyan);
    z-index: -1;
}

.glitch:hover::after {
    animation: glitch-2 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) reverse both infinite;
    color: var(--magenta);
    z-index: -2;
}

@keyframes glitch-1 {
    0%, 100% { transform: translate(0); }
    33% { transform: translate(-2px, 2px); }
    66% { transform: translate(2px, -2px); }
}

@keyframes glitch-2 {
    0%, 100% { transform: translate(0); }
    33% { transform: translate(2px, -2px); }
    66% { transform: translate(-2px, 2px); }
}

.hero-subtitle {
    font-family: 'Silkscreen', cursive;
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* ============================================
   PIXEL FRAME
   ============================================ */
.pixel-frame {
    position: relative;
    padding: 20px;
}

.pixel-corner {
    position: absolute;
    width: 30px;
    height: 30px;
}

.pixel-corner::before,
.pixel-corner::after {
    content: '';
    position: absolute;
    background: var(--cyan);
    box-shadow: 0 0 10px var(--cyan);
}

.pixel-corner.tl { top: 0; left: 0; }
.pixel-corner.tr { top: 0; right: 0; }
.pixel-corner.bl { bottom: 0; left: 0; }
.pixel-corner.br { bottom: 0; right: 0; }

.pixel-corner.tl::before { width: 30px; height: 3px; top: 0; left: 0; }
.pixel-corner.tl::after { width: 3px; height: 30px; top: 0; left: 0; }

.pixel-corner.tr::before { width: 30px; height: 3px; top: 0; right: 0; }
.pixel-corner.tr::after { width: 3px; height: 30px; top: 0; right: 0; }

.pixel-corner.bl::before { width: 30px; height: 3px; bottom: 0; left: 0; }
.pixel-corner.bl::after { width: 3px; height: 30px; bottom: 0; left: 0; }

.pixel-corner.br::before { width: 30px; height: 3px; bottom: 0; right: 0; }
.pixel-corner.br::after { width: 3px; height: 30px; bottom: 0; right: 0; }

.image-container {
    width: 400px;
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.image-container:hover {
    transform: scale(1.05);
}

.placeholder-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2), rgba(255, 0, 255, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Silkscreen', cursive;
    font-size: 1.5rem;
    color: var(--text-secondary);
}

/* ============================================
   PROJECTS SECTION
   ============================================ */
.projects {
    padding: 100px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 60px;
    text-align: center;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.project-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(30px);
}

.project-card.reveal {
    animation: reveal 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes reveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-gradient-border {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.3s;
}

.project-card:hover .project-gradient-border {
    opacity: 1;
    animation: gradient-flow 2s linear infinite;
}

@keyframes gradient-flow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.project-content {
    padding: 40px;
}

.project-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 25px;
    line-height: 1.7;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.tag {
    font-family: 'Silkscreen', cursive;
    font-size: 0.75rem;
    padding: 6px 14px;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid var(--cyan);
    border-radius: 20px;
    color: var(--cyan);
}

.project-link {
    font-family: 'Silkscreen', cursive;
    color: var(--magenta);
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.project-link::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--magenta);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ============================================
   BIO SECTION
   ============================================ */
.bio {
    padding: 100px 40px;
    max-width: 900px;
    margin: 0 auto;
}

.bio-content {
    margin-top: 40px;
}

.bio-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.9;
    margin-bottom: 30px;
}

.drop-cap .first-letter {
    font-family: 'Syne', sans-serif;
    font-size: 4rem;
    font-weight: 800;
    float: left;
    line-height: 0.8;
    margin: 10px 10px 0 0;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-divider {
    height: 2px;
    width: 100%;
    background: var(--gradient);
    margin: 40px 0;
    opacity: 0.3;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact {
    padding: 100px 40px;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.contact-content {
    margin-top: 40px;
}

.contact-text {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 50px;
}

.contact-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.contact-link {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.contact-link:hover {
    border-color: var(--cyan);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.2);
}

.link-label {
    font-family: 'Silkscreen', cursive;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.link-value {
    font-size: 1.1rem;
    color: var(--cyan);
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    background: var(--gradient);
    border: none;
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.5);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    padding: 60px 40px;
    text-align: center;
    border-top: 1px solid rgba(0, 255, 255, 0.1);
}

.footer-text {
    font-family: 'Silkscreen', cursive;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 968px) {
    .hero-content,
    .projects-grid,
    .contact-links {
        grid-template-columns: 1fr;
    }

    .nav {
        top: 20px;
        right: 20px;
        flex-direction: column;
        gap: 10px;
    }

    .hero {
        padding: 80px 20px;
    }

    .image-container {
        width: 100%;
        max-width: 350px;
        height: 350px;
        margin: 0 auto;
    }

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

    .projects,
    .bio,
    .contact {
        padding: 60px 20px;
    }
}
