/* ============================================================
   RESET & ROOT VARIABLES
   ============================================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    body {
        /* Premium mesh gradient background for mobile (replaces heavy JS effects) */
        background: radial-gradient(circle at 10% 20%, rgba(6, 182, 212, 0.05) 0%, transparent 40%),
                    radial-gradient(circle at 90% 80%, rgba(168, 85, 247, 0.05) 0%, transparent 40%),
                    #030303;
        background-attachment: fixed;
    }

    .grain-overlay {
        display: none !important; /* Grain is heavy on mobile GPU */
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.2s !important; /* Faster transitions for mobile */
        box-shadow: none !important; /* Shadows are expensive to paint */
    }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 100000;
    padding: 12px 24px;
    background: var(--accent);
    color: #000;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 0 0 8px 8px;
    text-decoration: none;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
}

:root {
    --bg-color: #030303;
    --text-main: #ffffff;
    --text-sec: #a1a1aa;
    --accent: #06b6d4;
    --accent-purple: #a855f7;
    --accent-glow: rgba(6, 182, 212, 0.4);
    --glass-bg: rgba(10, 10, 10, 0.85);
    --glass-border: rgba(255, 255, 255, 0.1);
    --radius: 1rem;
    --radius-lg: 2rem;
    --transition: 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    --font-main: 'Inter', sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    scrollbar-gutter: stable; /* Fix CLS: prevent jump when scrollbar appears */
}

body {
    background: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-main);
    overflow-x: hidden;
    /* FIX: line-height for readability (WCAG AA) */
    line-height: 1.5;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
}

/* FIX: focus-visible for keyboard nav — previously no visible focus states */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

/* ============================================================
   PRELOADER
   ============================================================ */
body.pl-active {
    overflow: hidden !important;
}

#preloader-new {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #050505;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    opacity: 1;
    transition: opacity 1s ease-out, visibility 1s;
}

#preloader-new.pl-hide {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none;
}

#quantum-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.pl-core {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

.pl-rings {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pl-ring-outer {
    position: absolute;
    inset: 0;
    border: 3px solid transparent;
    border-top-color: #06b6d4;
    border-right-color: #06b6d4;
    border-radius: 50%;
    animation: pl-cw 2.5s linear infinite;
    box-shadow: 0 0 18px rgba(6, 182, 212, 0.35);
}

.pl-ring-inner {
    position: absolute;
    inset: 18px;
    border: 2px solid transparent;
    border-bottom-color: #a855f7;
    border-left-color: #a855f7;
    border-radius: 50%;
    animation: pl-ccw 1.8s linear infinite;
    box-shadow: 0 0 22px rgba(168, 85, 247, 0.4);
}

.pl-counter {
    display: flex;
    align-items: baseline;
    gap: 2px;
    font-family: var(--font-display);
    font-size: 3.8rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 25px rgba(6, 182, 212, 0.5);
    letter-spacing: -2px;
}

.pl-pct {
    font-size: 1.1rem;
    font-weight: 700;
    color: #06b6d4;
    margin-left: 3px;
}

#status-msg {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 900;
    color: #06b6d4;
    letter-spacing: 0.45em;
    text-transform: uppercase;
    text-shadow: 0 0 12px rgba(6, 182, 212, 0.5);
    transition: color 0.4s ease, text-shadow 0.4s ease;
}

.pl-bar-track {
    width: 220px;
    height: 2px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.pl-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #06b6d4, #a855f7);
    border-radius: 2px;
    transition: width 0.1s linear;
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.4);
}

@keyframes pl-cw {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pl-ccw {
    to {
        transform: rotate(-360deg);
    }
}

/* ============================================================
   MAIN CONTENT REVEAL
   ============================================================ */
.main-hidden {
    opacity: 0;
    pointer-events: none;
}

.main-visible {
    opacity: 1;
    pointer-events: auto;
    animation: mainFadeIn 1s ease forwards;
}

@keyframes mainFadeIn {
    from {
        opacity: 0;
        transform: scale(0.98);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.simple-footer {
    scroll-snap-align: start;
}

.section-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 1;
    pointer-events: auto;
}

/* ============================================================
   ANIMATED BACKGROUND CANVAS
   ============================================================ */
#bgCanvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

/* ============================================================
   HOME SECTION
   ============================================================ */
#home,
#stack,
#projects,
#achievements {
    background: transparent;
}


#achievements {
    margin-top: 15rem;
}

@media (max-width: 768px) {
    #achievements {
        margin-top: 5rem;
    }
}


.home-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    padding: 60px 48px;
    max-width: 1300px;
    width: 100%;
    position: relative;
    z-index: 2;
}

.home-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.section-label {
    font-family: var(--font-main);
    font-size: 1.5rem;
    color: var(--accent);
    display: block;
    font-weight: 600;
    letter-spacing: 0.1em;
}

.main-h {
    font-size: 4rem !important;
    padding-right: 6rem;
}

/* SVG Headings */
.svg-heading {
    display: block;
    overflow: visible;
    filter: drop-shadow(0 0 12px rgba(6, 182, 212, 0.4));
    max-width: 100%;
}

.svg-heading--im {
    width: 200px;
    height: 80px;
    margin-bottom: 4px;
}

.svg-heading--tech {
    width: 380px;
    max-width: 90vw;
    height: 70px;
    margin-bottom: 1rem;
}

.svg-heading--mile {
    width: 340px;
    max-width: 90vw;
    height: 80px;
}

@keyframes svgGradientShift {
    0% {
        stop-color: #06b6d4;
    }

    50% {
        stop-color: #a855f7;
    }

    100% {
        stop-color: #06b6d4;
    }
}

.svg-heading stop:first-child {
    animation: svgGradientShift 4s ease infinite;
}

.svg-heading stop:last-child {
    animation: svgGradientShift 4s ease infinite reverse;
}

.home-name {
    display: flex;
    flex-direction: column;
    line-height: 0.85;
    opacity: 0;
    animation: fadeSlideUp 0.8s ease 0.3s forwards;
}

.name-first {
    font-family: var(--font-display);
    font-size: clamp(4rem, 9vw, 7rem);
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.04em;
}

.name-last {
    font-family: var(--font-display);
    font-size: clamp(4rem, 9vw, 7rem);
    font-weight: 900;
    color: var(--accent);
    letter-spacing: -0.04em;
    margin-left: 60px;
    text-shadow: 0 0 40px rgba(6, 182, 212, 0.4);
}

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

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

#roller-container {
    width: 100%;
    height: 70px;
    position: relative;
    margin-top: 1rem;
}

.roller-item {
    position: absolute;
    top: -50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    opacity: 0;
    filter: blur(8px);
    display: flex;
    align-items: center;
    gap: 16px;
}

.roller-item.active {
    top: 50%;
    opacity: 1;
    filter: blur(0);
    transition: top 1.1s cubic-bezier(0.65, 0, 0.35, 1), opacity 1.1s ease, filter 1.1s ease;
}

.roller-item.out {
    top: 150%;
    opacity: 0;
    filter: blur(8px);
    transition: top 1.1s cubic-bezier(0.65, 0, 0.35, 1), opacity 1.1s ease, filter 1.1s ease;
}

.roller-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.8rem;
    filter: drop-shadow(0 0 12px var(--accent));
    flex-shrink: 0;
}

.roller-text {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: 700;
    color: #e2e8f0;
    letter-spacing: 0.02em;
}

/* FIX: download-cv-btn is now a <button>, reset browser defaults */
.download-cv-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    margin-top: 24px;
    transition: all var(--transition);
    width: fit-content;
    opacity: 0;
    animation: fadeSlideUp 0.8s ease 0.6s forwards;
    cursor: pointer;
    text-transform: uppercase;
}

.download-cv-btn:hover {
    background: rgba(6, 182, 212, 0.15);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(6, 182, 212, 0.2);
}

.home-image {
    flex-shrink: 0;
    opacity: 0;
    animation: fadeSlideUp 0.8s ease 0.4s forwards;
}

.image-frame {
    position: relative;
    width: clamp(260px, 30vw, 400px);
}

@media (min-width: 769px) {
    .image-frame {
        animation: floating 6s ease-in-out infinite;
    }
}

@keyframes floating {

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

    50% {
        transform: translateY(-18px) rotate(1deg);
    }
}

.image-accent {
    position: absolute;
    top: -16px;
    left: -16px;
    width: 80px;
    height: 80px;
    background: rgba(6, 182, 212, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 12px;
    z-index: 0;
}

.image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4/5;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(6, 182, 212, 0.1);
    z-index: 1;
}

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

.dot-pattern {
    position: absolute;
    width: 100px;
    height: 100px;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.2) 1.5px, transparent 1.5px);
    background-size: 16px 16px;
    z-index: 5;
    pointer-events: none;
}

.home-dots {
    bottom: 80px;
    left: 48px;
}

/* ============================================================
   TECH STACK
   ============================================================ */
.section-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
}

.section-header {
    margin-bottom: 48px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 900;
    color: var(--text-main);
    line-height: 1;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, #06b6d4, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.tech-card {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1.5rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    cursor: default;
    position: relative;
    overflow: hidden;
    /* Optimized transition and will-change behavior */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

/* FIX: staggered float animation using CSS custom property approach */
@media (min-width: 769px) {
    .tech-card {
        animation: float 5s ease-in-out infinite;
    }
}

.tech-card:nth-child(2) {
    animation-delay: 0.5s;
}

.tech-card:nth-child(3) {
    animation-delay: 1.0s;
}

.tech-card:nth-child(4) {
    animation-delay: 1.5s;
}

.tech-card:nth-child(5) {
    animation-delay: 2.0s;
}

.tech-card:nth-child(6) {
    animation-delay: 0.8s;
}

.tech-card:nth-child(7) {
    animation-delay: 1.3s;
}

.tech-card:nth-child(8) {
    animation-delay: 0.3s;
}

.tech-card:nth-child(9) {
    animation-delay: 1.8s;
}

.tech-card:nth-child(10) {
    animation-delay: 2.3s;
}

@keyframes float {

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

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

.tech-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, currentColor, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    mix-blend-mode: screen;
}

.tech-card:hover::before {
    opacity: 0.06;
}

.tech-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-10px) scale(1.04);
    border-color: currentColor;
    box-shadow: 0 12px 32px -8px currentColor, 0 0 20px rgba(0, 0, 0, 0.5);
    animation-play-state: paused;
    will-change: transform;
}

.tech-card i,
.tech-card svg {
    font-size: 2.5rem;
    width: 2.5rem;
    height: 2.5rem;
    color: inherit;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 4px transparent);
}

.tech-card:hover i,
.tech-card:hover svg {
    filter: drop-shadow(0 0 14px currentColor);
    transform: scale(1.1);
}

.tech-card span {
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: inherit;
    opacity: 0.75;
    transition: opacity 0.3s;
}

.tech-card:hover span {
    opacity: 1;
}

/* ============================================================
   PROJECTS
   ============================================================ */
.project-search {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    max-width: 500px;
    margin-bottom: 24px;
    transition: border-color var(--transition);
}

.project-search:focus-within {
    border-color: var(--accent);
}

.project-search i {
    color: #9ca3af;
    font-size: 0.9rem;
}

.project-search input {
    border: none;
    outline: none;
    background: none;
    width: 100%;
    font-size: 0.9rem;
    font-family: inherit;
    color: #fff;
}

.project-search input::placeholder {
    color: #6b7280;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-sec);
    transition: all var(--transition);
    cursor: pointer;
}

.chip:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.chip.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
}

.chip[aria-pressed="true"] {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
}

.chip i,
.chip svg {
    font-size: 0.85rem;
    width: 16px;
    height: 16px;
}

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

@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* FIX: project-card is now an <article> with tabindex — style focus ring */
.project-card {
    border-radius: 2rem;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.project-card:hover,
.project-card:focus-visible {
    border-color: rgba(168, 85, 247, 0.35);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    outline: none;
}

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

.project-media-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    border-radius: 1.5rem 1.5rem 0 0;
    overflow: hidden;
    background: #111;
}

.media-slider {
    display: flex;
    width: 200%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.project-card:hover .media-slider,
.project-card.show-video-state .media-slider {
    /* We will handle this via JS for multiple slides */
}

.media-slide {
    width: 50%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.media-slide img,
.media-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s ease;
}

.project-card:hover .media-slide img,
.project-card:hover .media-slide video,
.project-card.show-video-state .media-slide img,
.project-card.show-video-state .media-slide video {
    transform: scale(1.05);
}

.media-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    opacity: 0.6;
}

.contributor-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 30;
    display: flex;
    padding-left: 8px;
}

.contributor-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #fff;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background: #222;
    margin-left: -8px;
    transition: transform 0.3s ease, margin 0.3s ease;
}

.contributor-avatar:hover {
    transform: translateY(-4px) scale(1.1);
    z-index: 10;
}

.contributor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-stack-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    z-index: 25;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s ease;
}

.project-card:hover .project-stack-overlay,
.project-card.show-stack-focus-state .project-stack-overlay {
    opacity: 1;
}

.project-card.show-stack-focus-state .project-stack-overlay {
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
}

.project-card.show-stack-focus-state .media-slider {
    filter: grayscale(0.5);
    transform: translateX(0);
    /* Return to image side */
}

.stack-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 1.25rem;
    transform: translateY(10px);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.project-card:hover .contributor-badge,
.project-card.show-video-state .contributor-badge {
    transform: translateY(0);
    opacity: 1;
}

.project-card.show-stack-focus-state .contributor-badge {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
}

.project-card:hover .stack-items,
.project-card.show-video-state .stack-items {
    transform: translateY(0);
}

.project-card.show-stack-focus-state .stack-items {
    transform: scale(1.15) translateY(0);
    justify-content: center;
    padding: 2rem;
}

.stack-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: #1f2937;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    white-space: nowrap;
}

.stack-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.stack-item.more {
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.1);
}

.project-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    border-radius: 1.5rem 1.5rem 0 0;
    overflow: hidden;
    background: #111;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.project-card:hover .project-image img,
.project-card:focus-visible .project-image img {
    transform: scale(1.06);
}

.project-tech-badges {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 10;
    display: flex;
    gap: 6px;
}

.badge {
    padding: 5px 12px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.95);
    color: #000;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(8px);
}

.project-hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}

.project-card:hover .project-hover-overlay,
.project-card:focus-visible .project-hover-overlay {
    opacity: 1;
}

.project-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-view {
    background: #fff;
    color: #000;
}

.btn-view:hover {
    background: var(--accent);
    color: #fff;
    transform: scale(1.05);
}

.btn-code {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-code:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.project-info {
    padding: 1.5rem 0.75rem 1.5rem;
    background: transparent;
}

.project-info h3 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

/* FIX: minimum contrast ratio 4.5:1 — #94a3b8 on #030303 is ~5.8:1, good */
.project-info p {
    font-size: 0.9rem;
    color: #94a3b8;
    line-height: 1.6;
}

.hidden-card {
    display: none !important;
}

.project-empty {
    grid-column: 1/-1;
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.project-empty.hidden {
    display: none;
}

.project-empty i {
    font-size: 3rem;
    opacity: 0.3;
    margin-bottom: 16px;
    display: block;
}

.project-empty h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
}

/* ============================================================
   ACHIEVEMENTS
   ============================================================ */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 768px) {
    .achievements-grid {
        grid-template-columns: 1fr;
    }
}

.achievement-card {
    position: relative;
    padding: 40px;
    border-radius: 2.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.achievement-card::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, transparent, rgba(6, 182, 212, 0.5), rgba(168, 85, 247, 0.5), transparent);
    background-size: 200% 200%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: gradientMove 3s linear infinite;
    pointer-events: none;
}

.achievement-card:hover,
.achievement-card:focus-visible {
    transform: translateY(-12px) scale(1.02);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(6, 182, 212, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(6, 182, 212, 0.2);
    outline: none;
}

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

.achievement-card:hover::after,
.achievement-card:focus-visible::after {
    opacity: 1;
}

/* FIX: replaced Tailwind flex utility classes with plain CSS */
.ach-card-inner {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: 100%;
}

.ach-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.achievement-card.special-glow {
    border: 1px solid rgba(6, 182, 212, 0.3);
    background: linear-gradient(180deg, rgba(6, 182, 212, 0.05) 0%, rgba(3, 3, 3, 1) 100%);
    animation: achievementPulse 4s ease-in-out infinite;
    z-index: 2;
}

.achievement-card.special-glow::after {
    background: linear-gradient(135deg, #06b6d4, #a855f7, #06b6d4);
    background-size: 200% 200%;
    opacity: 0.6;
}

.achievement-card.special-glow .ach-icon-wrap {
    background: rgba(6, 182, 212, 0.2) !important;
    border-color: #06b6d4 !important;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
}

.achievement-card.special-glow:hover {
    border-color: #06b6d4;
    box-shadow: 0 0 50px rgba(6, 182, 212, 0.3), 0 0 100px rgba(168, 85, 247, 0.15);
}

.achievement-card.special-glow:hover::after {
    opacity: 1;
    animation-duration: 1.5s;
}

@keyframes achievementPulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(6, 182, 212, 0.1);
    }

    50% {
        box-shadow: 0 0 40px rgba(6, 182, 212, 0.25);
    }
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.ach-glow {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    border-radius: inherit;
}

.achievement-card:hover .ach-glow {
    opacity: 1;
}

.ach-icon-wrap {
    width: 76px;
    height: 76px;
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid;
    transition: transform 0.3s ease;
}

.achievement-card:hover .ach-icon-wrap {
    transform: scale(1.08) rotate(3deg);
}

.ach-badge-wrap {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
}

.ach-tag {
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 8px;
}

.ach-title {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    line-height: 1.1;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
}

.ach-sub {
    color: #9ca3af;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 4px;
}

/* ============================================================
   SIDE SOCIALS
   ============================================================ */
.side-socials {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.side-socials.visible {
    opacity: 1;
}

.side-socials a {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--text-sec);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    transition: all var(--transition);
}

.side-socials a:hover {
    color: var(--accent);
    transform: scale(1.1) translateX(-2px);
    border-color: rgba(6, 182, 212, 0.4);
    box-shadow: 0 4px 16px rgba(6, 182, 212, 0.15);
}

/* ============================================================
   BOTTOM NAVIGATION
   ============================================================ */
.bottom-nav {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.bottom-nav.nav-hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(40px);
    pointer-events: none;
}

.bottom-nav.nav-visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.bottom-nav ul {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px;
    border-radius: var(--radius-lg);
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    list-style: none;
}

.nav-divider {
    width: 1px;
    height: 32px;
    background: var(--glass-border);
    margin: 0 4px;
}

.nav-btn {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    font-size: 1.1rem;
    color: var(--text-sec);
    transition: all var(--transition);
}

.nav-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.07);
    transform: scale(1.1);
}

.nav-btn.active {
    color: var(--accent);
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(6, 182, 212, 0.25);
}

.nav-hud-label {
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6rem;
    font-weight: 700;
    white-space: nowrap;
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    pointer-events: none;
    letter-spacing: 0.05em;
    backdrop-filter: blur(8px);
}

.nav-btn:hover .nav-hud-label {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
}

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    background: #0f0f14;
    border-radius: var(--radius-lg);
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    transform: scale(0.92) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-overlay.open .modal-card {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(168, 85, 247, 0.15);
    padding: 10px 20px;
    border-radius: 12px;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.modal-title-row i,
.modal-title-row span {
    color: #a855f7;
    font-weight: 900;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-sec);
    transition: all var(--transition);
    background: rgba(255, 255, 255, 0.05);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
    color: #fff;
}

/* CV */
.cv-modal-card {
    max-width: 900px;
}

.cv-content {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 40px;
    padding: 32px;
}

@media (max-width: 640px) {
    .cv-content {
        grid-template-columns: 1fr;
    }
}

/* FIX: cv-name is now an h2 (inside dialog, so h2 is correct heading level) */
.cv-name {
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--text-main);
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: 8px;
}

.cv-name-accent {
    color: var(--accent);
}

.cv-role {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 16px;
}

.cv-contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.78rem;
    color: var(--text-sec);
    margin-bottom: 24px;
}

.cv-contact-info i {
    margin-right: 6px;
    color: #6b7280;
}

.cv-section {
    margin-bottom: 20px;
}

.cv-section-title {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    color: var(--accent);
    margin-bottom: 8px;
}

.cv-section p {
    font-size: 0.82rem;
    line-height: 1.7;
    color: var(--text-sec);
}

.cv-project-list {
    list-style: none;
}

.cv-project-list li {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-main);
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cv-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cv-tags span {
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.68rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cv-impact-list {
    list-style: none;
}

.cv-impact-list li {
    font-size: 0.82rem;
    color: var(--text-sec);
    padding: 4px 0;
    line-height: 1.6;
}

.cv-impact-list strong {
    color: var(--text-main);
}

.cv-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cv-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-main);
    transition: color var(--transition);
}

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

.cv-links a i {
    color: #6b7280;
}

.cv-edu-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.cv-edu-item strong {
    font-size: 0.9rem;
    color: var(--text-main);
    display: block;
    margin-bottom: 2px;
}

.cv-edu-item p {
    font-size: 0.78rem;
    margin: 0;
    color: var(--text-sec);
}

.cv-edu-date {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--accent);
    background: rgba(6, 182, 212, 0.1);
    padding: 4px 10px;
    border-radius: 50px;
    white-space: nowrap;
}

/* Contact */
.contact-modal-card {
    max-width: 520px;
}

.contact-form {
    padding: 24px 32px 32px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-sec);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: border-color 0.3s;
}

.input-wrapper:focus-within {
    border-color: var(--accent);
}

.input-wrapper i {
    color: #6b7280;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.input-wrapper input,
.contact-form textarea {
    border: none;
    outline: none;
    background: none;
    width: 100%;
    font-size: 0.9rem;
    font-family: inherit;
    color: #fff;
}

.contact-form textarea {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    resize: vertical;
    font-size: 0.9rem;
    transition: border-color 0.3s;
    min-height: 100px;
}

.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--accent), #a855f7);
    border-radius: 12px;
    color: #fff;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition);
    letter-spacing: 0.05em;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(6, 182, 212, 0.3);
}

/* ============================================================
   OVERLAYS
   ============================================================ */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.overlay-slide-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.55s ease;
}

.overlay-slide-img.active {
    opacity: 1;
}

.ov-wrap {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.ov-wrap.ov-open {
    opacity: 1;
    pointer-events: auto;
}

.ov-box {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: 85vh;
    background: rgba(12, 12, 18, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 40px;
    display: flex;
    overflow: hidden;
    box-shadow: 0 50px 100px rgba(0,0,0,0.7);
    transform: translateY(30px) scale(0.98);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.ov-wrap.ov-open .ov-box {
    transform: translateY(0) scale(1);
}

.ov-left-panel {
    flex: 1.4;
    position: relative;
    overflow: hidden;
}

.ov-slider {
    width: 100%; height: 100%;
    position: relative;
}

.ov-img-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(12,12,18,1) 0%, rgba(12,12,18,0.4) 30%, transparent 60%);
    z-index: 2;
    pointer-events: none;
}

.ov-img-text {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 50px;
    z-index: 5;
}

.ov-fast-report-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 999px;
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: #c084fc;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 20px;
}

.ov-title {
    font-size: 3.5rem;
    font-weight: 900;
    color: white;
    line-height: 1;
    letter-spacing: -0.04em;
    text-transform: uppercase;
    margin-bottom: 20px;
}
.ov-desc-text {
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.6);
    max-width: 450px;
}

.ov-arrow {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    width: 48px; height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 10;
    transition: all 0.3s ease;
}
.ov-arrow:hover { background: rgba(255, 255, 255, 0.15); border-color: white; }
.ov-arrow-l { left: 24px; }
.ov-arrow-r { right: 24px; }

.ov-right-panel {
    flex: 1;
    padding: 60px 45px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    scrollbar-width: none;
    background: rgba(15, 15, 22, 0.5);
}
.ov-right-panel::-webkit-scrollbar { display: none; }

.ov-close {
    position: absolute;
    top: 30px; right: 30px;
    width: 44px; height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.3s;
    z-index: 20;
}
.ov-close:hover { background: rgba(255, 255, 255, 0.1); color: white; transform: rotate(90deg); }

.ov-lead-label {
    font-size: 0.7rem; font-weight: 800;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase; letter-spacing: 0.2em;
    margin-bottom: 20px;
}
.ov-lead-row { display: flex; align-items: center; gap: 16px; margin-bottom: 40px; }
.ov-lead-avatar {
    width: 56px; height: 56px;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
}
.ov-lead-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ov-lead-name { font-size: 1.1rem; font-weight: 800; color: white; }
.ov-lead-role { font-size: 0.75rem; color: #60a5fa; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; }

.ov-metrics {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 15px; margin: 30px 0;
}
.ov-metric { text-align: center; }
.ov-metric-val { font-size: 2rem; font-weight: 900; color: white; letter-spacing: -0.02em; }
.ov-metric-label { font-size: 0.6rem; font-weight: 700; color: rgba(255,255,255,0.3); text-transform: uppercase; letter-spacing: 0.15em; margin-top: 4px; }

.ov-tech-section { margin-bottom: 40px; }
.ov-tech-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.ov-tech-chip {
    padding: 10px 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem; font-weight: 600;
    transition: all 0.3s;
}
.ov-tech-chip:hover { background: rgba(96, 165, 250, 0.1); border-color: rgba(96, 165, 250, 0.3); color: #60a5fa; }

.ov-cta {
    margin-top: auto;
    height: 64px;
    background: white;
    color: #0a0a0f;
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    gap: 12px;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.ov-cta:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(255, 255, 255, 0.15); }

@media (max-width: 1024px) {
    .ov-box { flex-direction: column; height: 95vh; }
    .ov-left-panel { flex: none; height: 40%; }
    .ov-right-panel { flex: 1; padding: 40px 30px; }
    .ov-title { font-size: 2.5rem; }
}

/* ============================================================
   PREMIUM PROJECT OVERLAY STYLES
   ============================================================ */
.premium-proj-box {
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    position: relative;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.premium-proj-box::-webkit-scrollbar {
    display: none;
}

.proj-bg-blur {
    position: fixed;
    inset: -50px;
    background-size: cover;
    background-position: center;
    filter: blur(80px) brightness(0.25);
    opacity: 0.6;
    z-index: -1;
    transition: background-image 1.2s ease;
}

.proj-modal-close {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.proj-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.proj-container {
    padding: 40px;
    max-width: 1200px;
    margin: 80px auto;
}

.ov-proj-img {
    position: relative;
    width: 100%;
    height: 300px;
    flex-shrink: 0;
    overflow: hidden;
    background: #111;
}

@media (min-width: 768px) {
    .ov-proj-img {
        height: 380px;
    }
}

.ov-img-gradient-top {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(9, 9, 15, 1) 0%, rgba(9, 9, 15, 0.4) 50%, rgba(0, 0, 0, 0.1) 100%);
    z-index: 2;
    pointer-events: none;
}

.ov-img-gradient-top::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(9, 9, 15, 0.5) 0%, transparent 50%);
}

.ov-proj-img-meta {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 28px 36px;
    z-index: 3;
}

.ov-intelligence-tag {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 900;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(6, 182, 212, 0.4);
    padding-bottom: 6px;
}

.ov-proj-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    line-height: 0.95;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.8);
}

.ov-close-top {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

.ov-proj-body {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 0;
    background: #09090f;
}

@media (max-width: 768px) {
    .ov-proj-body {
        grid-template-columns: 1fr;
    }
}

.ov-proj-left {
    padding: 36px 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

@media (max-width: 768px) {
    .ov-proj-left {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }
}

.ov-challenge-card {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 1.25rem;
    padding: 22px;
}

.ov-card-tag {
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    border-left: 3px solid;
    padding-left: 10px;
    margin-bottom: 12px;
}

.ov-card-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.75;
    font-style: italic;
}

.ov-solution-text {
    color: rgba(255, 255, 255, 0.82);
    font-style: normal;
    font-weight: 500;
}

.ov-proj-right {
    padding: 36px 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ov-stack-card {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 1.25rem;
    padding: 20px;
}

.ov-proj-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 1.25rem;
    overflow: hidden;
}

.ov-proj-metric {
    padding: 16px 12px;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.ov-proj-metric:last-child {
    border-right: none;
}

.ov-proj-metric-val {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 4px;
}

.ov-proj-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
}

.ov-ghost-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 22px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s ease;
}

.ov-ghost-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.ov-ghost-btn i {
    font-size: 1rem;
}

/* Cursor */
#project-cursor {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
}

.cursor-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(6, 182, 212, 0.3);
    border: 2px solid var(--accent);
    backdrop-filter: blur(4px);
}

.cursor-label {
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    color: var(--accent);
    white-space: nowrap;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .home-content {
        gap: 40px;
        padding: 40px 32px;
    }

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

@media (max-width: 768px) {
    .home-content {
        flex-direction: column;
        padding: 80px 24px 40px;
        gap: 32px;
    }

    .home-image {
        order: -1;
    }

    .image-frame {
        width: 220px;
    }

    .main-h {
        padding-right: 0 !important;
    }

    .name-last {
        margin-left: 30px;
    }

    .home-dots {
        display: none;
    }

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

    .side-socials {
        display: none;
    }

    .section-container {
        padding: 0 16px;
    }

    .cv-content {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   FOOTER
   ==========================================================/* ============================================================
   SIMPLE FOOTER
   ============================================================ */
.simple-footer {
    padding: 60px 24px;
    position: relative;
    z-index: 10;
    margin-top: 100px;
    scroll-snap-align: start;
}

.footer-divider {
    max-width: 1200px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    margin: 0 auto 40px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.footer-logo-small {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: 1px;
}

.footer-logo-small span {
    color: var(--accent);
}

.footer-copyright {
    font-size: 0.8rem;
    color: var(--text-sec);
    margin-top: 5px;
    opacity: 0.6;
}

.footer-right {
    display: flex;
    gap: 25px;
}

.footer-right a {
    font-size: 0.85rem;
    color: var(--text-sec);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.footer-right a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.footer-right a:hover {
    color: #fff;
}

.footer-right a:hover::after {
    width: 100%;
}

@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .footer-right {
        gap: 15px;
        justify-content: center;
    }
}

/* ============================================================
   PREMIUM PROJECT OVERLAY STYLES
   ==========================================================/* ============================================================
   PREMIUM PROJECT OVERLAY STYLES (REFINED)
   ============================================================ */
.ov-wrap {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.ov-wrap.ov-open {
    opacity: 1;
    pointer-events: all;
}

/* ─── Modal Box ─── */
.premium-proj-box {
    position: relative;
    width: 100%;
    max-width: 1200px;
    max-height: 90vh;
    background: rgba(12, 12, 18, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 36px;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    box-shadow: 0 60px 120px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.04);
    transform: translateY(40px) scale(0.97);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.ov-wrap.ov-open .premium-proj-box {
    transform: translateY(0) scale(1);
}
.premium-proj-box::-webkit-scrollbar { display: none; }

/* ─── Animated Background ─── */
.proj-bg-blur {
    position: absolute;
    inset: -100px;
    background: radial-gradient(ellipse at 30% 20%, rgba(96,165,250,0.15) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 80%, rgba(139,92,246,0.1) 0%, transparent 60%);
    filter: blur(60px);
    z-index: 0;
    pointer-events: none;
}

/* ─── Close Button ─── */
.proj-modal-close {
    position: sticky;
    top: 24px;
    float: right;
    margin: 24px 24px -60px auto;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.proj-modal-close:hover {
    background: rgba(255,255,255,0.12);
    transform: rotate(90deg) scale(1.1);
    border-color: rgba(255,255,255,0.2);
}

/* ─── Inner Container ─── */
.proj-container {
    padding: 70px 50px 50px;
    position: relative;
    z-index: 2;
    clear: both;
}

/* ─── Video Player ─── */
.proj-player-wrap {
    width: 100%;
    border-radius: 26px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 50px;
    position: relative;
}
.proj-video-container {
    position: relative;
    aspect-ratio: 16/9;
    width: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* ─── Media Background Blur (Premium Effect) ─── */
.proj-media-viewer::before {
    content: '';
    position: absolute;
    inset: -20px;
    background-image: var(--media-bg, none);
    background-size: cover;
    background-position: center;
    filter: blur(40px) brightness(0.3);
    z-index: 0;
    opacity: 0.5;
}
.proj-main-video {
    width: 100%; height: 100%;
    object-fit: contain;
    display: block;
}
.proj-video-overlay-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%);
    pointer-events: none;
    z-index: 3;
}
.proj-video-controls-main {
    position: absolute;
    inset: 0;
    z-index: 4;
}
.proj-play-btn-large {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 72px; height: 72px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(20px);
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.18);
    display: flex; align-items: center; justify-content: center;
    color: white; cursor: pointer; font-size: 1.2rem;
    transition: 0.3s cubic-bezier(0.16,1,0.3,1);
}
.proj-play-btn-large:hover { transform: translate(-50%,-50%) scale(1.12); background: rgba(255,255,255,0.16); }

.proj-bottom-controls {
    position: absolute;
    bottom: 18px; left: 20px; right: 20px;
    z-index: 10;
    display: flex; flex-direction: column; gap: 10px;
}
.proj-progress-bar {
    width: 100%; height: 32px;
    display: flex; align-items: center;
    cursor: pointer;
}
.proj-progress-rail {
    width: 100%; height: 4px;
    background: rgba(255,255,255,0.12);
    border-radius: 10px; position: relative;
}
.proj-progress-fill {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, #60a5fa, #a78bfa);
    border-radius: 10px;
    transition: width 0.1s linear;
}
.proj-progress-knob {
    position: absolute;
    top: 50%; left: 0%;
    transform: translate(-50%,-50%);
    width: 12px; height: 12px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(96,165,250,0.6);
    opacity: 0;
    transition: opacity 0.2s ease;
}
.proj-progress-bar:hover .proj-progress-knob { opacity: 1; }

.proj-control-row { display: flex; align-items: center; justify-content: flex-end; }
.proj-control-group { display: flex; gap: 8px; }
.proj-mini-btn {
    width: 34px; height: 34px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: rgba(255,255,255,0.8);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem;
    transition: background 0.2s;
}
.proj-mini-btn:hover { background: rgba(255,255,255,0.14); }

/* ─── Details Grid ─── */
.proj-details-grid {
    display: grid;
    grid-template-columns: 1.7fr 1fr;
    gap: 30px;
    align-items: start;
}

/* ─── Cards ─── */
.proj-main-info-card,
.proj-blueprint-card,
.proj-team-card,
.proj-stats-card {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 28px;
    padding: 32px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}
.proj-main-info-card::before,
.proj-blueprint-card::before {
    content: '';
    position: absolute;
    top: -1px; left: 20px; right: 20px; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(96,165,250,0.4), transparent);
}

/* Tags row */
.proj-tags-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}
.proj-detail-tag {
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #60a5fa;
    background: rgba(96,165,250,0.1);
    border: 1px solid rgba(96,165,250,0.2);
    padding: 6px 14px;
    border-radius: 999px;
    font-weight: 600;
}
.proj-dot-sep {
    width: 4px; height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
}
.proj-id-tag {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.35);
    letter-spacing: 0.08em;
    font-family: 'Space Grotesk', monospace;
}

/* Title */
.proj-main-title {
    font-size: 3rem;
    font-weight: 900;
    color: white;
    letter-spacing: -0.04em;
    margin-bottom: 20px;
    text-transform: uppercase;
    line-height: 1;
}
.proj-description-text {
    font-size: 1rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.6);
    border-left: 3px solid rgba(96,165,250,0.5);
    padding-left: 20px;
    font-weight: 400;
}

/* Section title */
.proj-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255,255,255,0.4);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

/* Blueprint grid */
.proj-blueprint-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.proj-tech-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: rgba(255,255,255,0.03);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.06);
    transition: border-color 0.3s, background 0.3s;
}
.proj-tech-card:hover { background: rgba(255,255,255,0.06); border-color: rgba(96,165,250,0.2); }

.proj-tech-icon-wrap {
    width: 36px; height: 36px;
    background: rgba(96, 165, 250, 0.12);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #60a5fa; font-size: 1rem; flex-shrink: 0;
}
.proj-tech-icon { width: 100%; height: 100%; object-fit: contain; }
.proj-tech-name { font-size: 0.85rem; color: rgba(255,255,255,0.8); font-weight: 500; }

/* Actions row */
.proj-actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}
.proj-btn-primary {
    height: 62px;
    background: white;
    color: #0a0a0f;
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    gap: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: transform 0.3s, box-shadow 0.3s;
    letter-spacing: 0.02em;
}
.proj-btn-primary:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(255,255,255,0.15); }
.proj-btn-secondary {
    height: 62px;
    background: rgba(255,255,255,0.04);
    color: white;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    gap: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: transform 0.3s, background 0.3s;
}
.proj-btn-secondary:hover { transform: translateY(-4px); background: rgba(255,255,255,0.08); }

/* Team card */
.proj-team-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px;
}
.proj-team-title-wrap {
    display: flex; align-items: center; gap: 10px;
}
.proj-accent-bar {
    width: 3px; height: 18px;
    background: linear-gradient(180deg, #60a5fa, #a78bfa);
    border-radius: 2px;
}
.proj-team-title-wrap h3 {
    font-size: 0.85rem; font-weight: 700;
    color: white; letter-spacing: 0.05em;
    text-transform: uppercase;
}
.proj-count-tag {
    font-size: 0.65rem;
    color: #60a5fa;
    background: rgba(96,165,250,0.1);
    border: 1px solid rgba(96,165,250,0.2);
    padding: 4px 10px;
    border-radius: 999px;
    font-family: monospace;
    letter-spacing: 0.1em;
}
.proj-team-list { display: flex; flex-direction: column; gap: 12px; }
.proj-member-card {
    display: flex; align-items: center; gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 0;
}
.proj-member-avatar {
    width: 38px; height: 38px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.proj-member-avatar img { width: 100%; height: 100%; object-fit: cover; }
.proj-member-name { font-size: 0.85rem; color: white; font-weight: 600; }
.proj-member-role { font-size: 0.7rem; color: rgba(255,255,255,0.35); margin-top: 2px; }

/* Stats card */
.proj-stats-title {
    font-size: 0.75rem; font-weight: 700;
    color: rgba(255,255,255,0.4);
    letter-spacing: 0.15em; text-transform: uppercase;
    margin-bottom: 20px;
}
.proj-stats-grid {
    display: grid; grid-template-columns: repeat(2,1fr);
    gap: 12px; margin-bottom: 20px;
}
.proj-stat-item {
    background: rgba(255,255,255,0.03);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.05);
    padding: 16px;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.proj-stat-val {
    font-size: 1.6rem; font-weight: 900;
    color: white; line-height: 1;
}
.proj-stat-label { font-size: 0.65rem; color: rgba(255,255,255,0.35); letter-spacing: 0.1em; text-transform: uppercase; }

.proj-stats-bar {
    height: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: 999px;
    overflow: hidden;
}
.proj-stats-fill {
    height: 100%; width: 62%;
    background: linear-gradient(90deg, #60a5fa, #a78bfa);
    border-radius: 999px;
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
    .proj-container { padding: 50px 24px 36px; }
    .proj-details-grid { grid-template-columns: 1fr; }
    .proj-main-title { font-size: 2.2rem; }
    .proj-blueprint-grid { grid-template-columns: 1fr; }
}
@media (max-width: 500px) {
    .ov-wrap { padding: 10px; }
    .premium-proj-box { border-radius: 24px; }
    .proj-actions-row { grid-template-columns: 1fr; }
}

/* ─── Media Viewer ─── */
.proj-media-viewer {
    width: 100%; height: 100%;
    position: relative;
    z-index: 1;
}
.proj-main-img {
    width: 100%; height: 100%;
    object-fit: contain;
    display: block;
}

.proj-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px; height: 56px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    z-index: 100;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0.4;
}
.proj-video-container:hover .proj-nav-btn { opacity: 1; }
.proj-nav-btn:hover { 
    background: var(--accent); 
    border-color: var(--accent); 
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.4);
}
.proj-nav-btn.prev { left: 25px; }
.proj-nav-btn.next { right: 25px; }

/* ─── Card Manual Navigation ─── */
.card-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) scale(0.8);
    width: 40px; height: 40px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    z-index: 40;
    opacity: 0;
    transition: all 0.3s ease;
}
.project-card:hover .card-nav-btn { opacity: 1; transform: translateY(-50%) scale(1); }
.card-nav-btn:hover { background: var(--accent); color: white; border-color: var(--accent); }
.card-nav-prev { left: 12px; }
.card-nav-next { right: 12px; }

.proj-media-dots {
    position: absolute;
    bottom: 25px;
    left: 25px;
    display: flex;
    gap: 6px;
    z-index: 20;
}
.proj-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}
.proj-dot.active {
    background: #60a5fa;
    width: 24px;
    border-radius: 4px;
}

.media-type-image .proj-video-controls-main,
.media-type-image .proj-video-overlay-gradient {
    display: none !important;
}

@media (max-width: 900px) {
    .proj-nav-btn { opacity: 1; width: 40px; height: 40px; }
}
@media (max-width: 500px) {
    .proj-nav-btn { display: none; }
}

/* ============================================================
   GRAIN OVERLAY - Adds texture and depth
   ============================================================ */
.grain-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* ============================================================
   MAGNETIC BUTTON EFFECT
   ============================================================ */
.magnetic-btn {
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
}

.magnetic-btn::after {
    content: '';
    position: absolute;
    inset: -20px;
    z-index: -1;
    border-radius: inherit;
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
#toast-container {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 14px 24px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    opacity: 0;
    animation: toastIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
}

.toast.toast-out {
    animation: toastOut 0.3s ease forwards;
}

.toast i {
    color: var(--accent);
    font-size: 1rem;
}

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

@keyframes toastOut {
    to { transform: translateY(-10px); opacity: 0; }
}

/* ============================================================
   ENHANCED PROJECT CARD 3D TILT
   ============================================================ */
.project-card {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.project-card:hover {
    transform: translateY(-4px) rotateX(2deg) rotateY(-2deg);
}

/* ============================================================
   RARITY BADGES
   ============================================================ */
.ach-badge-wrap.rarity-legendary {
    background: rgba(255, 215, 0, 0.15);
    border-color: rgba(255, 215, 0, 0.4);
    color: #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
}

.ach-badge-wrap.rarity-epic {
    background: rgba(168, 85, 247, 0.15);
    border-color: rgba(168, 85, 247, 0.4);
    color: #a855f7;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.2);
}

.ach-badge-wrap.rarity-rare {
    background: rgba(6, 182, 212, 0.15);
    border-color: rgba(6, 182, 212, 0.4);
    color: #06b6d4;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
}

/* Timeline dot on cards */
.ach-timeline-dot {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.achievement-card:hover .ach-timeline-dot {
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent);
}

/* ============================================================
   ENHANCED OVERLAYS - SCANLINES & HUD EFFECTS
   ============================================================ */
.ov-scanlines,
.proj-scanlines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(255, 255, 255, 0.03) 2px,
        rgba(255, 255, 255, 0.03) 4px
    );
    opacity: 0.4;
    animation: scanlineMove 8s linear infinite;
}

@keyframes scanlineMove {
    0% { background-position: 0 0; }
    100% { background-position: 0 100px; }
}

/* ============================================================
   ACHIEVEMENT OVERLAY ENHANCEMENTS
   ============================================================ */
.achievement-ov-wrap .ov-box {
    max-width: 1200px;
    height: 85vh;
}

/* Rarity badge in overlay */
.ov-rarity-badge {
    position: absolute;
    top: 30px;
    right: 90px;
    padding: 8px 20px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    z-index: 20;
    overflow: hidden;
    transition: all 0.3s ease;
}

.ov-rarity-badge .rarity-label {
    position: relative;
    z-index: 2;
}

.ov-rarity-badge.rarity-legendary-style {
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.4);
    color: #ffd700;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.2);
}

.ov-rarity-badge.rarity-epic-style {
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.4);
    color: #a855f7;
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.2);
}

.ov-rarity-badge.rarity-rare-style {
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.4);
    color: #06b6d4;
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.2);
}

.rarity-particles {
    position: absolute;
    inset: -20px;
    z-index: 1;
    pointer-events: none;
}

/* Timeline track */
.ov-timeline-track {
    position: absolute;
    bottom: 30px;
    left: 50px;
    right: 50px;
    height: 3px;
    z-index: 10;
}

.ov-timeline-line {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.ov-timeline-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--accent-purple));
    border-radius: 3px;
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

/* Share buttons */
.ov-share-row {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.ov-share-btn,
.ov-copy-btn {
    flex: 1;
    padding: 12px 20px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ov-share-btn:hover,
.ov-copy-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Animated metric values */
.ov-metric-val {
    transition: all 0.3s ease;
}

.ov-metric-val.counting {
    color: var(--accent);
    text-shadow: 0 0 20px rgba(6, 182, 212, 0.5);
}

/* ============================================================
   PROJECT OVERLAY ENHANCEMENTS
   ============================================================ */
.project-ov-wrap .premium-proj-box {
    max-width: 1200px;
    max-height: 90vh;
}

/* Media counter */
.proj-media-counter {
    position: absolute;
    right: 25px;
    top: 25px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.7rem;
    font-weight: 700;
    font-family: var(--font-display);
    letter-spacing: 0.1em;
    z-index: 50;
}

/* Features card */
.proj-features-card {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 28px;
    padding: 32px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.proj-features-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.4), transparent);
}

.proj-features-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.proj-features-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

.proj-features-list li:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(6, 182, 212, 0.2);
    transform: translateX(4px);
}

.proj-features-list li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--accent);
    font-size: 0.8rem;
}

/* Share card */
.proj-share-card {
    margin-top: 16px;
}

.proj-share-btn {
    width: 100%;
    padding: 14px 24px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.proj-share-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateY(-2px);
}

/* Animated stat values */
.proj-stat-val {
    transition: all 0.3s ease;
}

.proj-stat-val.counting {
    color: var(--accent);
    text-shadow: 0 0 20px rgba(6, 182, 212, 0.5);
}

/* Stats progress bar animation */
.proj-stats-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #60a5fa, #a78bfa);
    border-radius: 999px;
    transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Firefox backdrop-filter fallback */
@supports not (backdrop-filter: blur(16px)) {
    .modal-overlay {
        background: rgba(0, 0, 0, 0.85);
    }
}

@supports not (backdrop-filter: blur(12px)) {
    .ov-wrap {
        background: rgba(0, 0, 0, 0.95);
    }
}

/* Hide scanlines for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .grain-overlay,
    .ov-scanlines,
    .proj-scanlines {
        display: none !important;
    }
}

/* ============================================================
   ADVANCED RESPONSIVE FIXES
   ============================================================ */

/* --- Tablet & Smaller Desktop (under 1100px) --- */
@media (max-width: 1100px) {
    .achievement-ov-wrap .ov-box {
        flex-direction: column;
        height: 90vh;
        width: 95vw;
        overflow-y: auto;
    }
    .ov-left {
        width: 100%;
        height: 350px !important;
        flex: none;
    }
    .ov-right-panel {
        width: 100% !important;
        padding: 30px !important;
        flex: none;
    }
    .ov-rarity-badge {
        top: 20px;
        right: 70px;
    }
}

/* --- Mobile Landscape & Large Tablets (under 900px) --- */
@media (max-width: 900px) {
    .proj-main-title { font-size: 2rem !important; }
    .proj-details-grid { grid-template-columns: 1fr !important; }
    .proj-container { padding: 40px 20px 30px !important; }
    .proj-player-wrap { margin-bottom: 30px; }
    
    /* Project HUD Scaling */
    .proj-nav-btn { width: 44px; height: 44px; opacity: 1; }
    .proj-nav-btn.prev { left: 15px; }
    .proj-nav-btn.next { right: 15px; }
    .proj-media-counter { top: 15px; right: 15px; font-size: 0.6rem; }
    .proj-media-dots { bottom: 15px; left: 15px; }
}

/* --- Standard Mobile (under 600px) --- */
@media (max-width: 600px) {
    /* Hero / Typography */
    .hero-title { font-size: 3rem !important; }
    .section-title { font-size: 2.5rem !important; }
    
    /* Project Overlay Mobile */
    .premium-proj-box {
        width: 100% !important;
        height: 100% !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        overflow-y: auto !important;
    }
    .proj-video-container {
        aspect-ratio: 4/3 !important; /* Taller on mobile for better visibility */
    }
    .proj-nav-btn { display: none !important; } /* Use swipe/dots on mobile */
    
    .proj-main-title { font-size: 1.6rem !important; }
    .proj-detail-tag { font-size: 0.6rem; padding: 4px 10px; }
    
    /* Cards padding */
    .proj-main-info-card, .proj-blueprint-card, .proj-features-card, .proj-team-card, .proj-stats-card {
        padding: 24px !important;
        border-radius: 20px !important;
    }
    
    /* Achievement Overlay Mobile */
    .ov-left { height: 250px !important; }
    .ov-title { font-size: 1.5rem !important; }
    .ov-desc-text { font-size: 0.85rem !important; }
    .ov-timeline-track { left: 20px; right: 20px; bottom: 20px; }
    
    /* Modals */
    .modal-card {
        width: 100% !important;
        height: 100% !important;
        border-radius: 0 !important;
        padding: 20px !important;
    }
    .cv-content { flex-direction: column !important; }
    .cv-left, .cv-right { width: 100% !important; padding: 0 !important; }
}

/* --- Fix for very small screens --- */
@media (max-width: 400px) {
    .filter-chips {
        gap: 6px;
        padding-bottom: 10px;
    }
    .chip {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
    .proj-tech-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ============================================================
   COMPREHENSIVE RESPONSIVE FIXES
   ============================================================ */

/* ── Tablet (≤ 1024px) ── */
@media (max-width: 1024px) {
    .home-content {
        gap: 40px;
        padding: 60px 32px;
    }

    .side-socials {
        right: 12px;
    }
}

/* ── Tablet / Large Mobile (≤ 900px) ── */
@media (max-width: 900px) {
    /* Allow sections to grow taller than viewport on mobile */
    .section {
        overflow: visible;
        min-height: 100svh;
    }

    /* section-content: switch from absolute overlay to normal flow */
    .section-content {
        position: relative;
        inset: auto;
        width: 100%;
        align-items: flex-start;
        padding: 80px 0 60px;
    }

    /* Home: stack image above text */
    .home-content {
        flex-direction: column-reverse;
        align-items: center;
        text-align: center;
        padding: 40px 24px 60px;
        gap: 32px;
    }

    .home-text {
        align-items: center;
        width: 100%;
    }

    .home-image {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .image-frame {
        width: clamp(200px, 55vw, 300px);
    }

    .home-dots {
        display: none;
    }

    /* Name adjustments */
    .name-last {
        margin-left: 24px;
    }

    /* Roller / subtitle */
    .roller-item {
        justify-content: center;
    }

    /* Download CV button — centre it */
    .download-cv-btn {
        align-self: center;
    }

    /* SVG headings — ensure they don't overflow */
    .svg-heading--tech {
        width: min(380px, 90vw);
    }

    .svg-heading--mile {
        width: min(340px, 90vw);
    }

    /* Hide side socials — they overlap content on mobile */
    .side-socials {
        display: none !important;
    }

    /* Stack section */
    .stack-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 1rem;
    }

    /* Achievements grid — 2 columns on tablet */
    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Achievement cards — reduce padding */
    .achievement-card {
        padding: 28px 24px;
    }

    /* Nav label tooltip — hide on touch */
    .nav-hud-label {
        display: none;
    }

    /* Bottom nav — bring a bit higher on small screens */
    .bottom-nav {
        bottom: 16px;
    }
}

/* ── Standard Mobile (≤ 640px) ── */
@media (max-width: 640px) {
    /* Home section */
    .home-content {
        padding: 32px 20px 70px;
        gap: 24px;
    }

    .name-last {
        margin-left: 0;
    }

    /* SVG "I'm" heading */
    .svg-heading--im {
        width: 140px;
        height: 56px;
    }

    /* Roller container */
    #roller-container {
        height: 60px;
    }

    /* Roller text */
    .roller-text {
        font-size: clamp(1rem, 4vw, 1.4rem);
    }

    /* Section header spacing */
    .section-header {
        margin-bottom: 32px;
    }

    /* Section container padding */
    .section-container {
        padding: 0 16px;
    }

    /* Tech stack */
    .stack-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }

    .tech-card {
        padding: 1rem;
        border-radius: 1rem;
    }

    .tech-card i,
    .tech-card svg {
        font-size: 2rem;
        width: 2rem;
        height: 2rem;
    }

    /* Projects */
    .project-search {
        max-width: 100%;
    }

    /* Achievements */
    .achievements-grid {
        grid-template-columns: 1fr;
    }

    .ach-title {
        font-size: 1.4rem;
    }

    /* Project overlay full-screen on mobile */
    .ov-wrap {
        padding: 0 !important;
    }

    .achievement-ov-wrap .ov-box {
        width: 100vw;
        height: 100dvh;
        height: 100vh;
        border-radius: 0;
    }

    .ov-left-panel {
        height: 42vh;
        flex: none;
    }

    .ov-title {
        font-size: 1.6rem;
    }

    .ov-right-panel {
        padding: 24px 20px;
    }

    .ov-close {
        top: 14px;
        right: 14px;
    }

    .ov-metrics {
        gap: 8px;
    }

    .ov-metric-val {
        font-size: 1.5rem;
    }

    /* Modals */
    .modal-overlay {
        padding: 12px;
    }

    .modal-card {
        max-height: 92dvh;
        max-height: 92vh;
    }

    .modal-header {
        padding: 16px 20px;
    }

    .contact-form {
        padding: 16px 20px 24px;
    }

    /* CV modal */
    .cv-modal-card {
        max-width: 100%;
    }

    .cv-content {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 24px;
    }

    .cv-name {
        font-size: 2rem;
    }

    /* Footer */
    .simple-footer {
        padding: 32px 20px;
    }
}

/* ── Small Mobile (≤ 480px) ── */
@media (max-width: 480px) {
    /* Home: tighten further */
    .home-content {
        padding: 24px 16px 80px;
    }

    /* Image frame smaller on very small screens */
    .image-frame {
        width: min(220px, 70vw);
    }

    /* Stack: 2 columns */
    .stack-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Bottom nav: slightly smaller */
    .bottom-nav ul {
        gap: 2px;
        padding: 6px;
    }

    .nav-btn {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }

    /* Section title font */
    .section-title {
        font-size: clamp(2.4rem, 8vw, 3.5rem);
    }

    /* Chips wrapping */
    .filter-chips {
        flex-wrap: wrap;
    }

    .chip {
        padding: 6px 12px;
        font-size: 0.73rem;
    }

    /* Reduce achievement card icon */
    .ach-icon-wrap {
        width: 60px;
        height: 60px;
    }

    /* Rarity badge position in overlay */
    .ov-rarity-badge {
        top: 14px;
        right: 60px;
        padding: 5px 12px;
        font-size: 0.6rem;
    }

    /* Toast bottom position above nav */
    #toast-container {
        bottom: 90px;
    }
}

/* ── Very Small (≤ 360px) ── */
@media (max-width: 360px) {
    .name-first,
    .name-last {
        font-size: clamp(3rem, 14vw, 4.5rem);
    }

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

    .bottom-nav ul {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .bottom-nav ul::-webkit-scrollbar {
        display: none;
    }
}
