/* --- Hero --- */
.hero-static {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    text-align: center;
    pointer-events: none;
}

.hero-static h1 {
    font-size: 5rem;
    font-weight: 800;
    letter-spacing: -2px;
    background: linear-gradient(to bottom right, #fff, #94a3b8);
    -webkit-background-clip: text;
    color: transparent;
    margin-bottom: 10px;

    /* Base Shadow */
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));

    /* Enable Hover Interactions */
    pointer-events: auto;
    cursor: default;

    /* Transitions */
    transition: letter-spacing 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s ease;

    /* Idle Animation (Floating) */
    animation: float-y 6s ease-in-out infinite;
}

/* --- HOVER EFFECT --- */
.hero-static h1:hover {
    /* Expand letters */
    letter-spacing: 8px;

    /* Strong Blue Glow */
    filter: drop-shadow(0 0 25px rgba(59, 130, 246, 0.8));

    /* Shake Animation */
    animation: tremor-shake 0.3s infinite linear;
}

.hero-static p {
    display: inline-block;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    padding: 8px 20px;
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);

    /* Also animate the subtitle slightly */
    animation: float-y 6s ease-in-out infinite;
    animation-delay: 1s;
    /* Offset from title */
}

/* --- ANIMATION KEYFRAMES --- */

/* 1. Gentle Floating */
@keyframes float-y {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* 2. Rapid Shaking (Tremor) */
@keyframes tremor-shake {
    0% {
        transform: translate(1px, 1px) rotate(0deg);
    }

    10% {
        transform: translate(-1px, -2px) rotate(-1deg);
    }

    20% {
        transform: translate(-3px, 0px) rotate(1deg);
    }

    30% {
        transform: translate(3px, 2px) rotate(0deg);
    }

    40% {
        transform: translate(1px, -1px) rotate(1deg);
    }

    50% {
        transform: translate(-1px, 2px) rotate(-1deg);
    }

    60% {
        transform: translate(-3px, 1px) rotate(0deg);
    }

    70% {
        transform: translate(3px, 1px) rotate(-1deg);
    }

    80% {
        transform: translate(-1px, -1px) rotate(1deg);
    }

    90% {
        transform: translate(1px, 2px) rotate(0deg);
    }

    100% {
        transform: translate(1px, -2px) rotate(-1deg);
    }
}


/* --- Filter Dock --- */
.filter-dock {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    z-index: 200;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 90vw;
    overflow-x: auto;
}

.filter-dock.dock-hidden {
    opacity: 0;
    transform: translate(-50%, 60px);
    pointer-events: none;
}

.filter-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: 0.2s;
    white-space: nowrap;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--accent-blue);
    color: #fff;
}

/* --- Modals (General) --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-card {
    background: #1e293b;
    width: 90%;
    max-width: 600px;
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--glass-border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-card {
    transform: translateY(0);
}

.btn-close {
    position: absolute;
    top: 15px;
    right: 20px;
    cursor: pointer;
    color: #fff;
    font-size: 1.5rem;
    transition: 0.2s;
    z-index: 10;
}

.btn-close:hover {
    color: var(--accent-blue);
}

/* --- Modal Content --- */
.modal-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.modal-img {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    background: transparent;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.25));
    /* Glow for transparent icons */
    transition: 0.3s;
}

.modal-title {
    font-size: 2rem;
    font-weight: bold;
    color: #fff;
}

.modal-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
}

.modal-desc {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 1rem;
    margin-bottom: 25px;
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn-primary {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s;
    background: var(--accent-blue);
    color: white;
    border: none;
}

.btn-primary:hover {
    background: #2563eb;
    box-shadow: 0 0 15px var(--accent-glow);
}

/* --- Settings Modal Specifics --- */
.settings-card {
    max-width: 400px;
}

.settings-body {
    margin-top: 20px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.setting-item span {
    font-size: 1rem;
    color: var(--text-main);
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #334155;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked+.slider {
    background-color: var(--accent-blue);
}

input:checked+.slider:before {
    transform: translateX(24px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* --- Project Page Styles --- */
body.project-mode {
    overflow-y: auto;
    overflow-x: hidden;
}

.project-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 60px 20px;
    position: relative;
    z-index: 5;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 40px;
}

.back-link:hover {
    color: #fff;
}

.project-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
}

.content-section {
    margin-bottom: 30px;
}

.section-title {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
}

.text-body {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 1.05rem;
}

.code-block {
    background: #0f172a;
    border: 1px solid var(--glass-border);
    padding: 15px;
    border-radius: 8px;
    color: #e2e8f0;
    font-family: monospace;
    overflow-x: auto;
    margin-top: 10px;
}

.sidebar-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--glass-border);
    padding: 20px;
    border-radius: 12px;
    position: sticky;
    top: 20px;
}

.link-btn {
    display: flex;
    justify-content: space-between;
    padding: 12px 15px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    transition: 0.2s;
}

.link-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-blue);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.tech-tag {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .hero-static h1 {
        font-size: 3rem;
    }

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