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

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    background-color: #000;
    color: #00ff00;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* Matrix background canvas */
#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.3;
}

/* Fade-in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 1.2s ease-out forwards;
    opacity: 0;
}

/* Navigation bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 255, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    z-index: 1000;
}

.nav-btn {
    background: transparent;
    color: #00ff00;
    border: 1px solid rgba(0, 255, 0, 0.3);
    padding: 0.8rem 1.5rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-btn:hover {
    background: rgba(0, 255, 0, 0.1);
    border-color: #00ff00;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

/* Main content */
.main-content {
    margin-top: 70px;
    padding: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Profile section */
.profile-section {
    background: rgba(0, 20, 0, 0.8);
    border: 1px solid rgba(0, 255, 0, 0.3);
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 3rem;
    backdrop-filter: blur(10px);
}

.profile-header {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.profile-image {
    flex-shrink: 0;
}

.profile-image img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px solid #00ff00;
    object-fit: cover;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 2.5rem;
    font-weight: 700;
    color: #00ff00;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.profile-title {
    font-size: 1.3rem;
    color: #00cc00;
    margin-bottom: 1rem;
    font-weight: 500;
}

.profile-bio {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #ccffcc;
}

/* Social links */
.social-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    max-width: 100%;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem;
    background: rgba(0, 40, 0, 0.6);
    border: 1px solid rgba(0, 255, 0, 0.2);
    border-radius: 8px;
    color: #00ff00;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    min-width: 200px; /* Maintains consistent button sizes */
    flex: 0 0 calc(33.333% - 0.67rem); /* 3 items per row on larger screens */
}

.social-link:hover {
    background: rgba(0, 255, 0, 0.1);
    border-color: #00ff00;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 0, 0.2);
}

.social-link svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.social-link img {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    filter: brightness(0) saturate(100%) invert(50%) sepia(100%) saturate(2000%) hue-rotate(90deg) brightness(1.2);
}

/* Technologies section */
.technologies h3 {
    font-size: 1.5rem;
    color: #00ff00;
    margin-bottom: 1rem;
    text-align: center;
}

.tech-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
}

.tech-tag {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid rgba(0, 255, 0, 0.3);
    color: #00ff00;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-family: 'Fira Code', monospace;
    transition: all 0.3s ease;
}

.tech-tag:hover {
    background: rgba(0, 255, 0, 0.2);
    border-color: #00ff00;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

/* Projects section */
.projects-section {
    animation-delay: 0.3s;
}

.section-title {
    font-size: 2.5rem;
    color: #00ff00;
    text-align: center;
    margin-bottom: 3rem;
    text-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
}

.project-card {
    display: flex;
    background: rgba(0, 20, 0, 0.8);
    border: 1px solid rgba(0, 255, 0, 0.3);
    border-radius: 10px;
    margin-bottom: 2rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.project-card:hover {
    border-color: #00ff00;
    box-shadow: 0 10px 30px rgba(0, 255, 0, 0.2);
    transform: translateY(-5px);
}

.project-image {
    flex-shrink: 0;
    width: 300px;
}

.project-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-right: 1px solid rgba(0, 255, 0, 0.3);
}

.project-image-nextup {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border-right: 1px solid rgba(0, 255, 0, 0.3);
}

.project-image-nextup img {
    object-fit: contain;
    border: 0;
}

.project-content {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.project-title {
    font-size: 1.8rem;
    color: #00ff00;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 600;
}

.project-description {
    color: #ccffcc;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-tech .tech-tag {
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
}

.project-link {
    align-self: flex-start;
    background: transparent;
    color: #00ff00;
    border: 2px solid #00ff00;
    padding: 0.8rem 2rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-link:hover {
    background: #00ff00;
    color: #000;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
}

.project-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Copyright footer */
.copyright {
    background-color: transparent;
    height: 60px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #00ff00;
    padding: 1rem;
    transition: 0.5s;
    font-size: 0.9rem;
    border-top: 1px solid rgba(0, 255, 0, 0.2);
    margin-top: 3rem;
    animation-delay: 0.6s;
}

.copyright:hover {
    background-color: rgba(0, 255, 0, 0.1);
    color: #00ff00;
}

/* Responsive design */
@media (max-width: 768px) {
    .navbar {
        padding: 0 1rem;
    }
    
    .nav-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .profile-image img {
        width: 120px;
        height: 120px;
    }
    
    .profile-name {
        font-size: 2rem;
    }
    
    .social-links {
        grid-template-columns: 1fr;
    }
    
    .project-card {
        flex-direction: column;
    }
    
    .project-image {
        width: 100%;
    }
    
    .project-image img {
        height: 200px;
        border-right: none;
        border-bottom: 1px solid rgba(0, 255, 0, 0.3);
    }

    .project-image-nextup {
        border-right: none;
        border-bottom: 1px solid rgba(0, 255, 0, 0.3);
    }

    .project-image-nextup img {
        border: 0;
    }
    
    .project-content {
        padding: 1.5rem;
    }
    
    .project-title {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .profile-section,
    .project-card {
        margin-left: -1rem;
        margin-right: -1rem;
        border-radius: 0;
    }
    
    .tech-grid {
        gap: 0.5rem;
    }
    
    .tech-tag {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Slow, seamless technology display bar. */
.tech-display{max-width:100%;min-width:0;overflow:hidden;border-block:1px solid #00ff0030;padding:18px 0;mask-image:linear-gradient(to right,transparent,#000 4%,#000 96%,transparent)}
.tech-track{display:flex;width:max-content;animation:tech-scroll 110s linear infinite}
.tech-display .tech-grid{display:flex;flex-wrap:nowrap;justify-content:flex-start;gap:12px;flex:none;margin:0;padding:0 12px 0 0}
.tech-display .tech-tag{flex:none;white-space:nowrap}
.tech-display:hover .tech-track,.tech-display:focus-visible .tech-track,.tech-display:has(:focus-visible) .tech-track,.tech-scroll-paused .tech-track{animation-play-state:paused}
.tech-scroll-toggle{display:block;margin:10px auto 0;background:transparent;border:1px solid #00ff0040;border-radius:20px;padding:6px 12px;color:#00ff00;font:inherit;font-size:11px;cursor:pointer}
.tech-scroll-toggle:focus-visible,.tech-display:focus-visible{outline:2px solid #00ff00;outline-offset:4px}
@keyframes tech-scroll{to{transform:translateX(-50%)}}
@media(prefers-reduced-motion:reduce){.tech-display{overflow-x:auto;mask-image:none}.tech-track{animation:none}.tech-track>.tech-grid[aria-hidden="true"]{display:none}.tech-scroll-toggle{display:none}}

/* Standalone background control below, and outside, the navigation bar. */
.matrix-pause{position:fixed;top:86px;left:16px;z-index:999;padding:8px 12px;border:1px solid #00ff0055;border-radius:18px;background:#001000e8;color:#00ff00;font:11px 'Fira Code',monospace;cursor:pointer;backdrop-filter:blur(8px)}
.matrix-pause:hover{border-color:#00ff00;background:#002000}
.matrix-pause:focus-visible{outline:2px solid #00ff00;outline-offset:3px}
@media(max-width:600px){.matrix-pause{left:8px;top:80px;font-size:10px;padding:6px 9px}}

.matrix-pause{width:34px;height:34px;padding:7px;display:grid;place-items:center;border-radius:50%}
.matrix-pause svg{width:18px;height:18px;fill:currentColor;grid-area:1/1}
.matrix-pause .matrix-play-icon{display:none}
.matrix-pause[aria-pressed="true"] .matrix-pause-icon{display:none}
.matrix-pause[aria-pressed="true"] .matrix-play-icon{display:block}
@media(max-width:600px){.matrix-pause{width:34px;height:34px;padding:7px}}

/* Keep the technology controls closer to the profile card edge. */
.profile-section{padding-bottom:16px}
.tech-scroll-toggle{margin-top:8px}

/* Manual ticker navigation appears without changing the bar's dimensions. */
.tech-display{position:relative;mask-image:none}
.tech-track{animation:none}
.tech-scroll-arrow{position:absolute;top:50%;transform:translateY(-50%);z-index:2;width:32px;height:36px;display:grid;place-items:center;border:1px solid #00ff0060;border-radius:8px;background:#001000f5;color:#00ff00;cursor:pointer;opacity:0;pointer-events:none;transition:opacity .18s ease,background .18s ease}
.tech-scroll-prev{left:4px}.tech-scroll-next{right:4px}
.tech-scroll-arrow svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.tech-display:hover .tech-scroll-arrow,.tech-display:focus-within .tech-scroll-arrow,.tech-scroll-paused .tech-scroll-arrow{opacity:1;pointer-events:auto}
.tech-scroll-arrow:hover{background:#003000}.tech-scroll-arrow:focus-visible{outline:2px solid #00ff00;outline-offset:2px}
@media(prefers-reduced-motion:reduce){.tech-scroll-arrow{display:none}}
@media(hover:none){.tech-scroll-arrow{opacity:1;pointer-events:auto}}

/* Navigation links remain crawlable and retain their button appearance. */
.nav-btn{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}

/* Fade the tags behind the ticker controls instead of overlapping their outlines. */
.tech-display::before,.tech-display::after{content:"";position:absolute;top:0;bottom:0;width:76px;z-index:1;pointer-events:none;opacity:0;transition:opacity .2s ease}
.tech-display::before{left:0;background:linear-gradient(90deg,#000 0%,#000e 35%,#0000 100%)}
.tech-display::after{right:0;background:linear-gradient(270deg,#000 0%,#000e 35%,#0000 100%)}
.tech-display:hover::before,.tech-display:hover::after,.tech-display:focus-within::before,.tech-display:focus-within::after,.tech-scroll-paused::before,.tech-scroll-paused::after{opacity:1}
.tech-scroll-arrow{width:30px;height:34px;border-color:#00ff0035;border-radius:9px;background:#000b;box-shadow:0 0 16px #0009;backdrop-filter:blur(6px)}
.tech-scroll-prev{left:8px}.tech-scroll-next{right:8px}
.tech-scroll-arrow svg{width:17px;height:17px;stroke-width:1.8}
.tech-scroll-arrow:hover{background:#071707;border-color:#00ff0090;box-shadow:0 0 14px #00ff0010}
@media(hover:none){.tech-display::before,.tech-display::after{opacity:1}}
@media(prefers-reduced-motion:reduce){.tech-display::before,.tech-display::after{display:none}}

/* Balance the pause control between the ticker and the card bottom edge. */
.tech-scroll-toggle{margin-top:16px}

/* Align the standalone background control with the Home link center. */
.matrix-pause{transform:translateX(-50%)}

/* Mobile places the background control midway between the navigation links. */
@media(max-width:768px){.matrix-pause{top:35px;z-index:1001;transform:translate(-50%,-50%)}}
