/* ===== CSS Variables ===== */
:root {
    --bg-primary: #09090b;
    --bg-surface: #18181b;
    --bg-surface-hover: #27272a;
    --border-color: #27272a;
    --border-hover: #3f3f46;
    --text-primary: #fafafa;
    --text-secondary: #d4d4d8;
    --text-muted: #a1a1aa;
    --accent: #a855f7;
    --accent-light: #c084fc;
    --accent-dark: #7c3aed;
    --nav-height: 64px;
}

/* ===== Reset ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-secondary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(9, 9, 11, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    z-index: 1000;
    transition: border-color 0.3s;
}

.navbar.scrolled {
    border-bottom-color: var(--border-color);
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.logo-icon {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.5rem;
    transition: transform 0.3s;
}

.nav-logo:hover .logo-icon {
    transform: rotate(45deg);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

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

.cmd-k-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.cmd-k-hint:hover {
    border-color: var(--border-hover);
    color: var(--text-secondary);
}

.cmd-k-hint kbd {
    font-size: 0.8rem;
    font-family: inherit;
    color: var(--text-muted);
}

.cmd-k-hint i {
    font-size: 0.8rem;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.bar {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: 0.3s;
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--nav-height);
    position: relative;
    overflow: hidden;
}

.hero-particles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.hero-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 4rem;
    position: relative;
    z-index: 1;
}

.hero-content {
    flex: 1;
    max-width: 680px;
}

/* Hero fade-up animations */
.fade-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.6s ease forwards;
    animation-delay: var(--delay, 0s);
}

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

.hero-skills {
    flex-shrink: 0;
    position: relative;
    width: 420px;
    height: 420px;
}

.skills-glow {
    position: absolute;
    inset: -30px;
    background: radial-gradient(ellipse at center, rgba(168, 85, 247, 0.12) 0%, transparent 70%);
    z-index: -1;
    border-radius: 50%;
    filter: blur(25px);
    animation: skillsGlowPulse 4s ease-in-out infinite alternate;
}

@keyframes skillsGlowPulse {
    0% { opacity: 0.4; transform: scale(1); }
    100% { opacity: 0.8; transform: scale(1.05); }
}

.skill-cloud {
    width: 100%;
    height: 100%;
    position: relative;
    perspective: 800px;
}

.skill-tag {
    position: absolute;
    padding: 6px 14px;
    background: rgba(24, 24, 27, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    cursor: default;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    left: 50%;
    top: 50%;
}

/* Dim non-hovered skills */
.skill-cloud.has-hover .skill-tag:not(.skill-active) {
    opacity: 0.15 !important;
    filter: blur(1px);
}

.skill-tag.skill-active {
    z-index: 100 !important;
    opacity: 1 !important;
}

/* Skill categories */
.skill-tag.skill-ai {
    border-color: rgba(168, 85, 247, 0.4);
    color: #c084fc;
}

.skill-tag.skill-lang {
    border-color: rgba(56, 189, 248, 0.4);
    color: #38bdf8;
}

.skill-tag.skill-devops {
    border-color: rgba(74, 222, 128, 0.4);
    color: #4ade80;
}

.skill-tag.skill-framework {
    border-color: rgba(251, 191, 36, 0.4);
    color: #fbbf24;
}

.skill-tag.skill-ai.skill-active {
    background: rgba(168, 85, 247, 0.2);
    border-color: #c084fc;
    color: #e0b0ff;
    box-shadow: 0 0 24px rgba(168, 85, 247, 0.3);
}

.skill-tag.skill-lang.skill-active {
    background: rgba(56, 189, 248, 0.2);
    border-color: #38bdf8;
    color: #7dd3fc;
    box-shadow: 0 0 24px rgba(56, 189, 248, 0.3);
}

.skill-tag.skill-devops.skill-active {
    background: rgba(74, 222, 128, 0.2);
    border-color: #4ade80;
    color: #86efac;
    box-shadow: 0 0 24px rgba(74, 222, 128, 0.3);
}

.skills-hint {
    text-align: center;
    font-size: 0.8rem;
    color: var(--accent-light);
    margin-top: 0.75rem;
    padding: 6px 16px;
    background: rgba(168, 85, 247, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 20px;
    display: inline-block;
    width: auto;
    margin-left: auto;
    margin-right: auto;
    animation: hintPulse 2s ease-in-out 3;
    animation-delay: 2s;
}

.skills-hint i {
    margin-right: 6px;
    font-size: 0.75rem;
}

@keyframes hintPulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); border-color: rgba(168, 85, 247, 0.5); }
}

.hero-skills {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.skill-tag.skill-framework.skill-active {
    background: rgba(251, 191, 36, 0.2);
    border-color: #fbbf24;
    color: #fcd34d;
    box-shadow: 0 0 24px rgba(251, 191, 36, 0.3);
}

.hero-greeting {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.hero-name {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title {
    font-size: 1.25rem;
    color: var(--accent-light);
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.hero-credibility {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.hero-credibility span {
    color: var(--text-secondary);
}

.hero-cta {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.hero-cta .btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-light);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-ghost:hover {
    background: var(--bg-surface);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

/* ===== About Section ===== */
.about {
    padding: 6rem 0;
    border-top: 1px solid var(--border-color);
}

.about-content {
    max-width: 920px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.about-content p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* ===== Projects Section ===== */
.projects {
    padding: 6rem 0;
    border-top: 1px solid var(--border-color);
}

.section-header {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
}

/* ===== Bento Grid ===== */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(180px, auto);
    gap: 1rem;
}

.bento-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.bento-item:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.bento-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.03) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.bento-item:hover::before {
    opacity: 1;
}

/* Bento sizes */
.bento-item.large {
    grid-column: span 2;
    grid-row: span 2;
}

.bento-item.medium {
    grid-column: span 1;
    grid-row: span 2;
}

.bento-item.small {
    grid-column: span 1;
    grid-row: span 1;
}

/* Project card content */
.project-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.project-header .project-title {
    margin: 0;
    font-size: 1.05rem;
}

.project-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-dark), var(--accent));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

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

.project-tag {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    background: var(--bg-primary);
    color: var(--text-muted);
    border-radius: 4px;
    font-weight: 500;
}

.project-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.project-body .project-description {
    flex: 1;
}
}

.project-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.project-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.bento-item.small .project-description {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Video container in bento */
.project-video {
    flex: 1;
    min-height: 0;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-primary);
    margin-bottom: 1rem;
    position: relative;
}

.project-video iframe {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    border: none;
}

.video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-surface));
}

.video-placeholder i {
    font-size: 2.5rem;
    color: var(--accent);
    transition: transform 0.2s, color 0.2s;
}

.video-placeholder:hover i {
    transform: scale(1.1);
    color: var(--accent-light);
}

.bento-item.small .project-video {
    display: none;
}

/* Project links */
.project-links {
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
    position: relative;
    z-index: 1;
}

.project-link {
    font-size: 0.8rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    transition: color 0.2s;
}

.project-link:hover {
    color: var(--accent-light);
}

/* ===== Apps Section ===== */
.apps {
    padding: 6rem 0;
    border-top: 1px solid var(--border-color);
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
}

.app-showcase {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.app-showcase.visible {
    opacity: 1;
    transform: translateY(0);
}

.app-showcase:last-child {
    border-bottom: none;
}

.app-icon-wrapper {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--accent-dark), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(168, 85, 247, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.app-showcase:hover .app-icon-wrapper {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(168, 85, 247, 0.3);
}

.app-icon-wrapper i {
    font-size: 1.5rem;
    color: white;
}

.app-details {
    flex: 1;
    min-width: 0;
}

.app-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.app-description {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.app-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.app-meta .project-tag {
    font-size: 0.7rem;
}

.app-store-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.app-store-badge:hover {
    color: var(--accent-light);
}

.app-store-badge i {
    font-size: 1rem;
}

/* ===== Articles Section ===== */
.articles {
    padding: 6rem 0;
    border-top: 1px solid var(--border-color);
}

.articles-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 2rem;
    position: relative;
    padding-left: 2rem;
}

.articles-list::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent), var(--accent-dark), transparent);
    border-radius: 1px;
}

.article-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem 0;
    text-decoration: none;
    position: relative;
    transition: all 0.2s ease;
}

.article-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 1.85rem;
    width: 10px;
    height: 10px;
    background: var(--bg-primary);
    border: 2px solid var(--accent);
    border-radius: 50%;
    transform: translateX(-4px);
    transition: all 0.2s ease;
}

.article-item:hover::before {
    background: var(--accent);
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.4);
}

.article-item + .article-item {
    border-top: 1px solid var(--border-color);
}

.article-date {
    font-size: 0.75rem;
    color: var(--accent-light);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    padding-top: 0.2rem;
    min-width: 80px;
}

.article-content {
    flex: 1;
}

.article-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
    line-height: 1.4;
    transition: color 0.2s;
}

.article-item:hover .article-title {
    color: var(--accent-light);
}

.article-excerpt {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.article-tags {
    display: flex;
    gap: 0.5rem;
}

.article-read {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 500;
}

.article-item:hover .article-read {
    color: var(--accent-light);
}

.article-item:hover .article-read i {
    transform: translateX(3px);
    display: inline-block;
    transition: transform 0.2s;
}

.articles-view-all {
    text-align: center;
    padding-left: 2rem;
}

/* ===== Media Section ===== */
.media {
    padding: 6rem 0;
    border-top: 1px solid var(--border-color);
}

.media-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.media-image {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    aspect-ratio: 4 / 3;
    transition: all 0.3s ease;
}

.media-image:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.media-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== Contact Section ===== */
.contact {
    padding: 6rem 0;
    border-top: 1px solid var(--border-color);
}

.contact-content {
    text-align: center;
    max-width: 480px;
    margin: 0 auto;
}

.contact-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.contact-subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-link {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.125rem;
    text-decoration: none;
    transition: all 0.2s;
}

.social-link:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    transform: translateY(-2px);
}

/* ===== Footer ===== */
.footer {
    padding: 2rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.footer-links a {
    color: var(--text-muted);
    font-size: 1rem;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent-light);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
    }

    .hero-skills {
        width: 340px;
        height: 340px;
        order: -1;
    }

    .hero-cta {
        justify-content: center;
    }

    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bento-item.large {
        grid-column: span 2;
        grid-row: span 2;
    }

    .bento-item.medium {
        grid-column: span 1;
        grid-row: span 1;
    }

    .media-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .media-gallery .media-image:last-child {
        grid-column: span 2;
    }
}

@media (max-width: 640px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--bg-surface);
        border-bottom: 1px solid var(--border-color);
        flex-direction: column;
        padding: 1.5rem;
        gap: 0;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-menu li {
        padding: 0.75rem 0;
    }

    .nav-link {
        font-size: 1rem;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero-skills {
        width: 340px;
        height: 340px;
    }

    .skill-tag {
        font-size: 0.7rem;
        padding: 5px 10px;
    }

    .bento-grid {
        grid-template-columns: 1fr;
    }

    .bento-item.large,
    .bento-item.medium {
        grid-column: span 1;
        grid-row: span 1;
    }

    .bento-item.large .project-video {
        height: 200px;
        flex: none;
    }

    .hero-name {
        font-size: 2.25rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .btn {
        justify-content: center;
    }

    .media-gallery {
        grid-template-columns: 1fr;
    }

    .media-gallery .media-image:last-child {
        grid-column: span 1;
    }

    .apps-grid {
        grid-template-columns: 1fr;
    }

    .articles-list {
        padding-left: 1.5rem;
    }

    .article-item {
        flex-direction: column;
        gap: 0.5rem;
    }

    .article-date {
        min-width: auto;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
    }
}

/* ===== Accessibility ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ===== Animations ===== */
.bento-item {
    opacity: 0;
    transform: translateY(20px);
}

.bento-item.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* ===== Command Palette ===== */
.cmd-palette {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.cmd-palette.open {
    display: block;
}

.cmd-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.cmd-modal {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 560px;
    max-width: 90vw;
    background: var(--bg-surface);
    border: 1px solid var(--border-hover);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(168, 85, 247, 0.08);
    animation: cmdSlideIn 0.15s ease;
}

@keyframes cmdSlideIn {
    from {
        opacity: 0;
        transform: translateX(-50%) scale(0.96) translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) scale(1) translateY(0);
    }
}

.cmd-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
}

.cmd-search-icon {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.cmd-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
}

.cmd-input::placeholder {
    color: var(--text-muted);
}

.cmd-kbd {
    font-size: 0.65rem;
    padding: 3px 6px;
    background: var(--bg-primary);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
}

.cmd-results {
    max-height: 320px;
    overflow-y: auto;
    padding: 6px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-hover) transparent;
}

.cmd-results::-webkit-scrollbar {
    width: 6px;
}

.cmd-results::-webkit-scrollbar-track {
    background: transparent;
}

.cmd-results::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: 3px;
}

.cmd-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.1s;
}

.cmd-item i {
    width: 18px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.cmd-item.active {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}

.cmd-item.active i {
    color: var(--accent-light);
}

.cmd-external {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* ===== Section Title Reveal ===== */
.title-reveal {
    position: relative;
    display: inline-block;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.title-reveal::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.6s ease 0.3s;
}

.title-reveal.title-visible {
    opacity: 1;
    transform: translateY(0);
}

.title-reveal.title-visible::after {
    width: 100%;
}

/* ===== 3D Tilt Cards ===== */
.bento-item {
    transform-style: preserve-3d;
    will-change: transform;
}
