/* Navigation */
.site-nav {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 0.5rem;
    padding: 0.6rem 0.8rem;
    border-radius: 999px;
    background: rgba(7, 10, 18, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.nav-link {
    color: #e9eef7;
    text-decoration: none;
    font-size: 0.95rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    transition: background 0.25s ease, color 0.25s ease;
}

.nav-link:hover {
    background: rgba(0, 212, 255, 0.14);
    color: #fff;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 1;
    /* Ensure hero content is above canvas */
}

#star-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    /* Canvas stays in background */
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 5rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.hero p {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
    min-height: 1.6em;
    /* Prevent layout shift from typing */
}

#typing-text::after {
    content: '|';
    animation: blink 1s infinite;
    color: var(--accent-color);
    margin-left: 2px;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.skills-category {
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.skills-category h3 {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 1.25rem;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Logo Grid (Languages & Tools) */
.logo-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 0.8rem;
    align-items: center;
}

.skill-groups-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 0.9rem;
    align-items: stretch;
    width: 100%;
    max-width: 900px;
    justify-content: center;
}

.skill-group {
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.025));
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 16px;
    padding: 1rem 0.9rem 1.1rem;
    height: 100%;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
    display: flex;
    flex-direction: column;
}

.skill-group h4 {
    text-align: center;
    color: #fff;
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.skill-group .logo-grid {
    justify-content: center;
    gap: 0.7rem 0.8rem;
    width: 100%;
}

.skill-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    transition: transform 0.25s ease, filter 0.25s ease;
    filter: grayscale(100%);
    opacity: 0.75;
}

.skill-logo:hover {
    transform: translateY(-2px) scale(1.05);
    filter: grayscale(0%);
    opacity: 1;
}

/* ZBrush Icon Fix: Invert colors to make black visible on dark bg */
.skill-logo.invert-icon {
    filter: grayscale(100%) invert(1);
}

.skill-logo.invert-icon:hover {
    filter: grayscale(0%) invert(1);
}

.skill-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 70px;
}

.skill-item span {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.74rem;
    color: #cfd7e3;
    opacity: 1;
    transition: opacity 0.25s ease, color 0.25s ease;
    text-align: center;
    width: 100%;
    font-weight: 600;
}

.skill-item:hover span {
    color: #fff;
}

/* Concept cards */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
    width: 100%;
    max-width: 900px;
    justify-content: center;
    align-content: center;
}

.concept-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 18px;
    padding: 1rem 1.1rem;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.concept-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 212, 255, 0.45);
    box-shadow: 0 12px 24px rgba(0, 212, 255, 0.12);
}

.concept-card span {
    font-weight: 600;
    color: #f5f7fb;
    font-size: 0.92rem;
    line-height: 1.3;
}

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

.project-card {
    background: #111;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #222;
    display: block;
    position: relative;
    /* Ensure clickability */
    z-index: 2;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 212, 255, 0.1);
    border-color: var(--accent-color);
}

.compact-project-card {
    max-width: 480px;
    margin: 0 auto;
}

.compact-project-card .project-info {
    padding: 1.1rem 1.2rem;
}

.compact-project-card .project-tags {
    margin: 0.45rem 0 0.6rem;
}

.project-thumb {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: filter 0.3s ease;
}

.project-info {
    padding: 1.5rem;
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    margin: 0.5rem 0;
    flex-wrap: wrap;
}

.tag {
    background: #222;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8rem;
    color: var(--accent-color);
}

.project-btn {
    display: inline-block;
    margin-top: 1rem;
    background: var(--accent-color);
    color: #000;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    width: 100%;
    text-align: center;
}

.project-btn:hover {
    background: #00d4ff;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
    transform: scale(1.02);
}

/* Highlighted CTA for 3D portfolio */
.btn-highlight {
    background: linear-gradient(135deg, var(--accent-color), #7b61ff);
    color: #050505;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 10px 25px rgba(0, 212, 255, 0.35);
    transform: translateY(-2px);
    font-weight: 700;
    padding: 1rem 1.8rem;
    border: 1px solid rgba(255,255,255,0.2);
    margin-top: 1rem;
}

.btn-highlight:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.45);
}

.btn-with-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.btn-with-icon i {
    color: #ffffff;
    font-size: 1rem;
    transition: color 0.25s ease;
}

.btn-with-icon:hover i {
    color: #000000;
}

/* Contact / Footer */
.discord-contact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
    font-size: 1.2rem;
    color: #7289da;
}

.discord-icon {
    width: 30px;
    height: 30px;
    fill: currentColor;
}

/* Gallery Grid */
.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    padding: 1rem 0;
}

@media (max-width: 900px) {
    .skill-groups-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .skill-group {
        padding: 0.9rem 0.75rem 1rem;
    }

    .skill-logo {
        width: 46px;
        height: 46px;
    }
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid #222;
    cursor: pointer;
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #111;
    max-width: 350px;
    max-height: 350px;
    padding: 10px;
}

.gallery-item img {
    max-width: 100%;
    max-height: 100%;
    height: auto;
    width: auto;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.1);
    z-index: 10;
}

.gallery-item:hover img {
    transform: scale(1.1);
}