.nav-btn {
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.4rem 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: color 0.25s, background-color 0.25s, transform 0.2s;
}

.nav-btn { color: #6b7280; }
.nav-btn:hover { color: #111827; background: #f3f4f6; }
.nav-btn.active { color: #111827; background: #e5e7eb; font-weight: 600; }

.page-section {
    display: none;
    opacity: 0;
}

.page-section.active {
    display: block;
    animation: fadeInSection 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes fadeInSection {
    from { opacity: 0; transform: translateY(20px) scale(0.99); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.page-section.active .stagger-child {
    opacity: 0;
    transform: translateY(16px);
    animation: staggerFadeIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.page-section.active .stagger-child:nth-child(1) { animation-delay: 0.06s; }
.page-section.active .stagger-child:nth-child(2) { animation-delay: 0.12s; }
.page-section.active .stagger-child:nth-child(3) { animation-delay: 0.18s; }
.page-section.active .stagger-child:nth-child(4) { animation-delay: 0.24s; }
.page-section.active .stagger-child:nth-child(5) { animation-delay: 0.30s; }
.page-section.active .stagger-child:nth-child(6) { animation-delay: 0.36s; }
.page-section.active .stagger-child:nth-child(7) { animation-delay: 0.42s; }
.page-section.active .stagger-child:nth-child(8) { animation-delay: 0.48s; }
.page-section.active .stagger-child:nth-child(9) { animation-delay: 0.54s; }
.page-section.active .stagger-child:nth-child(10) { animation-delay: 0.60s; }
.page-section.active .stagger-child:nth-child(11) { animation-delay: 0.66s; }
.page-section.active .stagger-child:nth-child(12) { animation-delay: 0.72s; }
.page-section.active .stagger-child:nth-child(13) { animation-delay: 0.78s; }
.page-section.active .stagger-child:nth-child(14) { animation-delay: 0.84s; }
.page-section.active .stagger-child:nth-child(15) { animation-delay: 0.90s; }
.page-section.active .stagger-child:nth-child(16) { animation-delay: 0.96s; }
.page-section.active .stagger-child:nth-child(17) { animation-delay: 1.02s; }

@keyframes staggerFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.slider-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.slider-track img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    flex-shrink: 0;
    transition: transform 0.4s ease;
}

.group:hover .slider-track img {
    transform: scale(1.02);
}

.slider-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) scale(0.85);
    z-index: 10;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    opacity: 0;
    transition: opacity 0.3s, background 0.2s, transform 0.3s;
    background: rgba(0,0,0,0.5);
    color: #fff;
}

.group:hover .slider-nav-btn {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.slider-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s, width 0.3s;
    background: rgba(255,255,255,0.35);
}

.slider-dot.active {
    background: #fff;
    transform: scale(1.4);
}

.project-card {
    border-radius: 0.75rem;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
    background: #fff;
    border: 1px solid #e5e7eb;
}

@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.project-card.card-animate {
    animation: cardFadeIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.project-card:hover {
    border-color: #d1d5db;
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(0,0,0,0.08);
}

.dark .project-card {
    background: #18181b;
    border-color: #27272a;
}
.dark .project-card:hover {
    border-color: #3f3f46;
    box-shadow: 0 12px 24px -8px rgba(0,0,0,0.3);
}

.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.project-card-header h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    transition: color 0.2s;
}

.project-card:hover .project-card-header h3 {
    color: #111827;
}
.dark .project-card:hover .project-card-header h3 {
    color: #fff;
}

.project-card-lang {
    font-size: 0.625rem;
    padding: 0.15rem 0.5rem;
    border-radius: 0.25rem;
    transition: background 0.2s;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #6b7280;
}
.dark .project-card-lang {
    background: #27272a;
    border-color: #3f3f46;
    color: #71717a;
}

.project-card p {
    font-size: 0.8125rem;
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.project-card p { color: #6b7280; }
.dark .project-card p { color: #9ca3af; }

.project-card-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 0.6rem;
}
.project-card-links { border-top: 1px solid #f3f4f6; }
.dark .project-card-links { border-top-color: #27272a; }

.project-card-links a {
    text-decoration: none;
    font-size: 0.8125rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: color 0.2s, transform 0.2s;
}
.project-card-links a { color: #9ca3af; }
.project-card-links a:hover { color: #111827; transform: translateX(2px); }
.dark .project-card-links a:hover { color: #fff; }

header {
    animation: headerSlideDown 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes headerSlideDown {
    from { opacity: 0; transform: translateY(-16px); }
    to   { opacity: 1; transform: translateY(0); }
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
.dark ::-webkit-scrollbar-thumb { background: #3f3f46; }

#commission-overlay {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.skill-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid;
    transition: transform 0.2s, box-shadow 0.2s;
}
.skill-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px -4px rgba(0,0,0,0.1);
}
.skill-level {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.1rem 0.35rem;
    border-radius: 0.25rem;
    margin-left: 0.15rem;
}
.skill-pro {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}
.skill-pro .skill-level {
    background: #dcfce7;
    color: #15803d;
}
.skill-mid {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}
.skill-mid .skill-level {
    background: #dbeafe;
    color: #1d4ed8;
}
.skill-beg {
    background: #fefce8;
    border-color: #fde68a;
    color: #92400e;
}
.skill-beg .skill-level {
    background: #fef9c3;
    color: #a16207;
}
.dark .skill-pro {
    background: rgba(34,197,94,0.08);
    border-color: rgba(34,197,94,0.2);
    color: #4ade80;
}
.dark .skill-pro .skill-level {
    background: rgba(34,197,94,0.15);
    color: #86efac;
}
.dark .skill-mid {
    background: rgba(59,130,246,0.08);
    border-color: rgba(59,130,246,0.2);
    color: #60a5fa;
}
.dark .skill-mid .skill-level {
    background: rgba(59,130,246,0.15);
    color: #93bbfd;
}
.dark .skill-beg {
    background: rgba(234,179,8,0.08);
    border-color: rgba(234,179,8,0.2);
    color: #facc15;
}
.dark .skill-beg .skill-level {
    background: rgba(234,179,8,0.15);
    color: #fde047;
}

/* Mobile nav */
.mobile-nav-btn {
    width: 100%;
    text-align: left;
    padding: 0.6rem 1rem;
    border-radius: 0.5rem;
}

/* Dark mode nav-btn states */
.dark .nav-btn { color: #9ca3af; }
.dark .nav-btn:hover { color: #f3f4f6; background: #27272a; }
.dark .nav-btn.active { color: #f3f4f6; background: #3f3f46; }

/* Responsive adjustments */
@media (max-width: 767px) {
    .slider-track img {
        height: 160px;
    }

    .skill-tag {
        font-size: 0.65rem;
        padding: 0.3rem 0.55rem;
        gap: 0.25rem;
    }

    .skill-level {
        font-size: 0.5rem;
        padding: 0.05rem 0.25rem;
    }

    .project-card {
        padding: 1rem;
    }

    .project-card-header h3 {
        font-size: 0.85rem;
    }

    .project-card p {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .slider-track img {
        height: 140px;
    }
}
