@font-face {
    font-family: 'Ahsing';
    src: url('../fonts/ahsing-regular.otf') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Casa';
    src: url('../fonts/casa-Regular.otf') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Barbra';
    src: url('../fonts/barbra-font/Barbra-Regular.otf') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Coterie';
    src: url('../fonts/coterie-regular.ttf') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Migra';
    src: url('../fonts/migra-font-familygimlet-superfamily-font/migra-bold.otf') format('woff');
    font-weight: normal;
    font-style: normal;
}

h1 {
    font-family: 'Barbra', sans-serif;
}

h2 {
    font-family: 'Barbra', sans-serif;
}

h3 {
    font-family: 'Migra', sans-serif;
}

.custom-font {
    font-family: 'Ahsing', sans-serif;
}

.custom-font-migra {
    font-family: 'Migra', sans-serif;
}

.custom-font-barbra {
    font-family: 'Barbra', sans-serif;
}

/* Personalizar Tailwind */
@layer utilities {
    .bg-grid-pattern {
        background-image:
            radial-gradient(circle at 25% 25%, rgba(10, 201, 244, 0.1) 2px, transparent 0),
            radial-gradient(circle at 75% 75%, rgba(10, 201, 244, 0.05) 1px, transparent 0);
        background-size: 50px 50px, 100px 100px;
    }

    .card-spotlight::before {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
                rgba(255, 255, 255, 0.08),
                transparent 40%);
        opacity: 0;
        transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 1;
    }

    .card-spotlight:hover::before {
        opacity: 1;
    }
}

/* Efectos globales */
body {
    /* Mobile: subtle dark gradient background */
    background: linear-gradient(180deg, #000000 0%, #ffffff 10%, #000000 90%);
    background-attachment: scroll;
}

/* Desktop: use the background image with parallax effect */
@media (min-width: 769px) {
    body {
        background-image: url(/assets/img/backgrounds/2.jpg);
        background-size: cover;
        background-attachment: fixed;
        background-position: center center;
        background-repeat: no-repeat;
    }
}

/* Stack Panel mejorado */
.stack-panel {
    position: relative;
    margin: 4rem auto;
    max-width: 1000px;
    border-left: 0px solid rgba(255, 255, 255, 0.1);
    border-right: 0px solid rgba(255, 255, 255, 0.1);
}

.stack-panel::before,
.stack-panel::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.stack-panel::before {
    top: 0;
}

.stack-panel::after {
    bottom: 0;
}

.panel-body {
    padding: 4rem 2rem;
    background:
        radial-gradient(circle at center, rgba(10, 201, 244, 0.05) 1px, transparent 1px),
        radial-gradient(circle at center, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px, 25px 25px;
    background-position: center center;
    position: relative;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Translucent green accent for the whole Tech Stack panel on hover
   Adds a subtle green overlay and slight border/shadow tint when hovering the stack container */
.stack-panel .panel-body::before {
    /* Unified spotlight foundation */
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
            rgba(255, 255, 255, 0.08),
            transparent 40%);
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
}

.stack-panel .panel-body>* {
    position: relative;
    z-index: 2;
    /* ensure content stays above the beam */
}

.stack-panel:hover .panel-body::before {
    opacity: 1;
}

.stack-panel:hover .panel-body {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow:
        0 30px 60px -12px rgba(0, 0, 0, 0.5),
        inset 0 0 40px rgba(255, 255, 255, 0.02);
}

/* Marquee Styles */
.marquee-container {
    overflow: hidden;
    position: relative;
    width: 100%;
    padding: 2rem 0;
    /* Masking gradient for smooth edges */
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-content {
    display: flex;
    gap: 1.25rem;
    width: max-content;
    animation: scroll 10s linear infinite;
}

/* SVG styling in tech cards */
.tech-card svg {
    width: 2rem;
    height: 2rem;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.tech-card:hover svg {
    transform: scale(1.1) rotate(3deg);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
}

/* Pause animation on hover */
.marquee-container:hover .marquee-content {
    animation-play-state: paused;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.tech-card {
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    padding: 1.5rem 2.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    min-height: 80px;
    /* Smaller height */
    min-width: 100px;
    /* Smaller width */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 1rem 1.5rem;
    /* Reduced padding */
}

.tech-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.04);
}

/* Contenedor de puntos mejorado */
.tech-dots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 6px;
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
    position: relative;
}

.tech-dots::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 12.5% 12.5%, rgba(255, 255, 255, 0.3) 2px, transparent 3px),
        radial-gradient(circle at 37.5% 12.5%, rgba(255, 255, 255, 0.3) 2px, transparent 3px),
        radial-gradient(circle at 62.5% 12.5%, rgba(255, 255, 255, 0.3) 2px, transparent 3px),
        radial-gradient(circle at 87.5% 12.5%, rgba(255, 255, 255, 0.3) 2px, transparent 3px),
        radial-gradient(circle at 12.5% 37.5%, rgba(255, 255, 255, 0.3) 2px, transparent 3px),
        radial-gradient(circle at 37.5% 37.5%, rgba(255, 255, 255, 0.3) 2px, transparent 3px),
        radial-gradient(circle at 62.5% 37.5%, rgba(166, 21, 21, 0.3) 2px, transparent 3px),
        radial-gradient(circle at 87.5% 37.5%, rgba(223, 223, 223, 0.3) 2px, transparent 3px),
        radial-gradient(circle at 12.5% 62.5%, rgba(255, 255, 255, 0.3) 2px, transparent 3px),
        radial-gradient(circle at 37.5% 62.5%, rgba(255, 255, 255, 0.3) 2px, transparent 3px),
        radial-gradient(circle at 62.5% 62.5%, rgba(255, 255, 255, 0.3) 2px, transparent 3px),
        radial-gradient(circle at 87.5% 62.5%, rgba(203, 22, 22, 0.3) 2px, transparent 3px),
        radial-gradient(circle at 12.5% 87.5%, rgba(255, 255, 255, 0.3) 2px, transparent 3px),
        radial-gradient(circle at 37.5% 87.5%, rgba(255, 255, 255, 0.3) 2px, transparent 3px),
        radial-gradient(circle at 62.5% 87.5%, rgba(255, 255, 255, 0.3) 2px, transparent 3px),
        radial-gradient(circle at 87.5% 87.5%, rgba(255, 255, 255, 0.3) 2px, transparent 3px);
    background-size: 100% 100%;
    transition: all 0.6s ease;
}

.tech-card:hover .tech-dots::before {
    animation: dotColorWave 1.5s ease-in-out infinite;
}

@keyframes dotColorWave {

    0%,
    100% {
        background:
            radial-gradient(circle at 12.5% 12.5%, #fbfbfb 2px, transparent 3px),
            radial-gradient(circle at 37.5% 12.5%, rgba(255, 255, 255, 0.3) 2px, transparent 3px),
            radial-gradient(circle at 62.5% 12.5%, rgba(255, 255, 255, 0.3) 2px, transparent 3px),
            radial-gradient(circle at 87.5% 12.5%, rgba(255, 255, 255, 0.3) 2px, transparent 3px),
            radial-gradient(circle at 12.5% 37.5%, rgba(255, 255, 255, 0.3) 2px, transparent 3px),
            radial-gradient(circle at 37.5% 37.5%, #ffffff 2px, transparent 3px),
            radial-gradient(circle at 62.5% 37.5%, rgba(255, 255, 255, 0.3) 2px, transparent 3px),
            radial-gradient(circle at 87.5% 37.5%, rgba(255, 255, 255, 0.3) 2px, transparent 3px),
            radial-gradient(circle at 12.5% 62.5%, rgba(255, 255, 255, 0.3) 2px, transparent 3px),
            radial-gradient(circle at 37.5% 62.5%, rgba(255, 255, 255, 0.3) 2px, transparent 3px),
            radial-gradient(circle at 62.5% 62.5%, #ececec 2px, transparent 3px),
            radial-gradient(circle at 87.5% 62.5%, rgba(255, 255, 255, 0.3) 2px, transparent 3px),
            radial-gradient(circle at 12.5% 87.5%, rgba(255, 255, 255, 0.3) 2px, transparent 3px),
            radial-gradient(circle at 37.5% 87.5%, rgba(255, 255, 255, 0.3) 2px, transparent 3px),
            radial-gradient(circle at 62.5% 87.5%, rgba(255, 255, 255, 0.3) 2px, transparent 3px),
            radial-gradient(circle at 87.5% 87.5%, #f7f7f7 2px, transparent 3px);
    }

    50% {
        background:
            radial-gradient(circle at 12.5% 12.5%, rgba(255, 255, 255, 0.3) 2px, transparent 3px),
            radial-gradient(circle at 37.5% 12.5%, #e8e8e8 2px, transparent 3px),
            radial-gradient(circle at 62.5% 12.5%, rgba(255, 255, 255, 0.3) 2px, transparent 3px),
            radial-gradient(circle at 87.5% 12.5%, rgba(255, 255, 255, 0.3) 2px, transparent 3px),
            radial-gradient(circle at 12.5% 37.5%, rgba(255, 255, 255, 0.3) 2px, transparent 3px),
            radial-gradient(circle at 37.5% 37.5%, rgba(255, 255, 255, 0.3) 2px, transparent 3px),
            radial-gradient(circle at 62.5% 37.5%, #ffffff 2px, transparent 3px),
            radial-gradient(circle at 87.5% 37.5%, rgba(255, 255, 255, 0.3) 2px, transparent 3px),
            radial-gradient(circle at 12.5% 62.5%, rgba(255, 255, 255, 0.3) 2px, transparent 3px),
            radial-gradient(circle at 37.5% 62.5%, rgba(255, 255, 255, 0.3) 2px, transparent 3px),
            radial-gradient(circle at 62.5% 62.5%, rgba(255, 255, 255, 0.3) 2px, transparent 3px),
            radial-gradient(circle at 87.5% 62.5%, #ffffff 2px, transparent 3px),
            radial-gradient(circle at 12.5% 87.5%, #fafeff 2px, transparent 3px),
            radial-gradient(circle at 37.5% 87.5%, rgba(255, 255, 255, 0.3) 2px, transparent 3px),
            radial-gradient(circle at 62.5% 87.5%, rgba(255, 255, 255, 0.3) 2px, transparent 3px),
            radial-gradient(circle at 87.5% 87.5%, rgba(255, 255, 255, 0.3) 2px, transparent 3px);
    }
}

.tech-label {
    font-size: 1.1rem;
    color: #ffffff;
    font-weight: 600;
    transition: color 0.3s ease;
}

.tech-card:hover .tech-label {
    color: #b9b9b9;
}

/* Línea decorativa */
.panel-decoration {
    position: relative;
    height: 2rem;
    width: 100%;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.panel-decoration::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 300%;
    height: 100%;
    background: repeating-linear-gradient(90deg,
            transparent,
            transparent 10px,
            rgba(70, 171, 15, 0.3) 10px,
            rgba(193, 244, 10, 0.3) 20px);
    animation: slideLine 2s linear infinite;
}

@keyframes slideLine {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(33.33%);
    }
}

/* Efecto de cursor personalizado: letra 'S' rápida y centrada */
.cursor-follower {
    position: fixed;
    left: 0;
    top: 0;
    width: 28px;
    height: 28px;
    pointer-events: none;
    z-index: 99999;
    mix-blend-mode: normal;
    transition: transform 120ms cubic-bezier(.22, .8, .22, 1), opacity 160ms, box-shadow 120ms;
    transform: translate(-50%, -50%) scale(1);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    /* keep background transparent so only the letter shows */
}

.cursor-letter {
    color: #ffffff;
    font-family: 'Migra', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    user-select: none;
    pointer-events: none;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

/* Hide native cursor in favor of the custom follower. Restore cursor for interactive elements */
body {
    cursor: none;
}

a,
button,
input,
textarea,
select {
    cursor: auto;
}

/* Animaciones suaves */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* Responsive */
@media (max-width: 768px) {
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .tech-card {
        padding: 1.5rem 1rem;
        min-height: 120px;
    }

    .tech-dots {
        width: 60px;
        height: 60px;
        gap: 4px;
    }

    .panel-body {
        padding: 2rem 1rem;
    }
}

/* Mobile-specific improvements */
@media (max-width: 640px) {

    /* Hide navigation links on mobile to prevent overflow */
    header nav.social-links {
        display: none;
    }

    /* Reduce header padding */
    header {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }

    /* Smaller avatar on mobile */
    .avatar-container img {
        width: 3rem !important;
        height: 3rem !important;
    }

    /* Reduce section padding */
    section {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    /* Smaller panel padding */
    .panel-body {
        padding: 1.5rem 1rem !important;
    }

    /* Reduce tech grid to 2 columns max */
    .tech-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }

    /* Smaller tech cards */
    .tech-card {
        padding: 1rem 0.75rem !important;
        min-height: 100px !important;
    }

    .tech-dots {
        width: 50px !important;
        height: 50px !important;
    }

    .tech-label {
        font-size: 0.9rem !important;
    }
}

/* Disable custom cursor on touch devices */
@media (hover: none) and (pointer: coarse) {
    body {
        cursor: auto !important;
    }

    .cursor-follower {
        display: none !important;
    }

    a,
    button,
    input,
    textarea,
    select {
        cursor: pointer !important;
    }
}

/* Mobile menu styles */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(10px);
    z-index: 40;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu nav {
    width: 100%;
    max-width: 500px;
}

.mobile-menu-link {
    font-family: 'Migra', sans-serif;
    letter-spacing: 0.05em;
    display: block;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu-link:last-child {
    border-bottom: none;
}

#mobile-menu-btn {
    transition: transform 0.3s ease;
}

#mobile-menu-btn.active {
    transform: rotate(90deg);
}

#mobile-menu-btn.active i:before {
    content: "\f00d";
    /* Font Awesome X icon */
}

/* Hobbies card with animated moving dots */
.hobby-card {
    position: relative;
    display: flex;
    gap: 0;
    width: 100%;
    max-width: 520px;
    height: 250px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), inset 0 0 40px rgba(255, 255, 255, 0.02);
}

.hobby-card .hobby-item {
    flex: 1 1 50%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: #0b0b0b;
}

.hobby-card .hobby-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hobby-card .hobby-title-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.75rem;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.hobby-title {
    color: #ffffff;
    font-weight: 600;
}

.hobby-dots-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    mix-blend-mode: screen;
}

.hobby-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.9);
    /* teal-ish */
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
    opacity: 0.95;
    animation: hobbyFloat 4s ease-in-out infinite;
}

@keyframes hobbyFloat {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0.9;
    }

    25% {
        transform: translate(12px, -8px) scale(1.2);
        opacity: 1;
    }

    50% {
        transform: translate(-8px, 10px) scale(0.9);
        opacity: 0.7;
    }

    75% {
        transform: translate(6px, -6px) scale(1.05);
        opacity: 1;
    }

    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.9;
    }
}

/* Add variety: different durations/delays will be set inline on each .hobby-dot */

@media (max-width: 768px) {
    .hobby-card {
        height: 160px;
        max-width: 420px;
    }

    .hobby-card .hobby-item img {
        object-position: center;
    }

    .hobby-title-row {
        max-width: 420px;
    }
}

/* Section divider used under Languages / Hobbies */
.section-divider {
    height: 2px;
    width: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border-radius: 2px;
    margin: 0.5rem 0;
}

/* Replace moving dots with a subtle noise overlay */
.hobby-card::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 6;
    opacity: 0.06;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
    background-size: cover;
    mix-blend-mode: overlay;
}

/* Hide any leftover dot elements if present */
.hobby-dots-overlay {
    display: none !important;
}

/* Make hobby GIFs black & white */
#pianoGif,
#photoGif {
    filter: grayscale(100%) contrast(0.98) brightness(0.95);
}

/* Optional: on hover restore a little color (if you want) */
.hobby-card:hover #pianoGif,
.hobby-card:hover #photoGif {
    filter: grayscale(100%) contrast(1) brightness(1);
}

/* Education photo square (1:1) */
.edu-photo {
    width: 96px;
    aspect-ratio: 1 / 1;
    flex: 0 0 96px;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    /* white background for photos */
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 4px;
    /* small padding so image doesn't touch edge */
}

.edu-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(100%) contrast(0.98) brightness(0.95);
    /* force B/W */
}

@media (max-width: 768px) {
    .edu-photo {
        width: 72px;
        flex: 0 0 72px;
        margin-bottom: 0.75rem;
    }
}

/* IMT specific fine-tune: slightly shrink to fit the 1:1 box */
.edu-photo-img.imt-photo {
    object-position: center center;
    object-fit: contain;
    width: 82%;
    height: auto;
    transform: none;
}

/* Global card hover: border turns white and a soft interior white light (beam) appears */
.rounded-2xl.border {
    position: relative;
    /* needed for ::after */
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.rounded-2xl.border::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
            rgba(255, 255, 255, 0.1),
            transparent 40%);
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.rounded-2xl.border:hover {
    border-color: rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.rounded-2xl.border:hover::after {
    opacity: 1;
}

/* Slightly stronger effect for inner panels with darker background */
.panel-body.rounded-2xl.border:hover::after,
.bg-gray-900\/50.rounded-2xl.border:hover::after {
    filter: blur(14px) saturate(1.1);
    opacity: 1;
}

/* Project buttons (GitHub & itch.io) */
.project-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.project-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
    color: #ffffff;
    text-decoration: none;
    transition: transform 0.22s ease, box-shadow 0.25s ease, border-color 0.22s ease;
}

.project-btn i,
.project-btn .itch-icon {
    font-size: 18px;
    display: inline-block;
    color: inherit;
}

.project-btn:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.06), inset 0 0 30px rgba(255, 255, 255, 0.02);
}

/* Make project card images appear in black & white by default, with a gentle transition to color on hover
   NOTE: project containers are direct children of the grid inside #projects, so target those elements */
#projects .grid>div img {
    filter: grayscale(100%) contrast(95%);
    transition: filter 260ms ease, transform 260ms ease;
    will-change: filter, transform;
}

/* On hovering an individual project card (the grid child), restore color */
#projects .grid>div:hover img {
    filter: grayscale(0%) contrast(100%);
}

/* Animated perimeter beam overlay for project cards */
#projects .grid>div {
    position: relative;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: visible;
}

.project-beam {
    position: absolute;
    inset: -6px;
    width: calc(100% + 12px);
    height: calc(100% + 12px);
    pointer-events: none;
    z-index: 4;
    opacity: 1;
    transition: opacity 220ms ease, transform 220ms ease;
}

/* Hide the animated beam on hover and show solid white border on the card */
#projects .grid>div:hover .project-beam {
    opacity: 0;
}

#projects .grid>div:hover {
    border-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 18px 40px rgba(255, 255, 255, 0.06), inset 0 0 30px rgba(255, 255, 255, 0.02);
    transform: translateY(-6px);
}

/* Small accessible label hidden visually */
.glow-lime {
    position: relative;
    display: inline-block;
    color: #eaff66;
    /* brighter, fluorescent lime */
    background-color: rgba(180, 255, 120, 0.08);
    /* subtle lighter translucent background */
    border: 1px solid rgba(196, 255, 106, 0.12);
    box-shadow: 0 8px 22px rgba(166, 255, 110, 0.12), 0 0 18px rgba(180, 255, 120, 0.06);
    transition: box-shadow 240ms ease, transform 180ms ease, filter 240ms ease;
    z-index: 0;
}

.glow-lime::after {
    content: "";
    position: absolute;
    left: -6px;
    right: -6px;
    top: -4px;
    bottom: -4px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, rgba(196, 255, 106, 0.34), rgba(196, 255, 106, 0.12) 20%, rgba(196, 255, 106, 0.06) 40%, rgba(196, 255, 106, 0.00) 60%);
    filter: blur(10px) saturate(1.15);
    opacity: 0.95;
    z-index: -1;
    pointer-events: none;
    transition: opacity 300ms ease, transform 300ms ease;
}

.glow-lime:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 14px 34px rgba(166, 255, 110, 0.18), 0 0 34px rgba(180, 255, 120, 0.12);
    filter: drop-shadow(0 8px 18px rgba(180, 255, 120, 0.12));
}

@media (prefers-reduced-motion: reduce) {
    .glow-lime::after {
        transition: none;
        filter: none;
        opacity: 0.75;
    }

    .glow-lime {
        transition: none;
    }
}

.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}