


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

:root {
    --red:        #f43f5e; 
    --red-dark:   #dc2626; 
    --bg:         #020617; 
    --bg-card:    rgba(30, 41, 59, 0.5); 
    --bg-dark:    #0f172a; 
    --border:     rgba(255, 255, 255, 0.1);
    --text:       #ffffff;
    --text-muted: #94a3b8; 
    --text-light: #cbd5e1; 
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Outfit', 'Inter', sans-serif;
    background-color: var(--bg);
    
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    background-position: center;
    color: var(--text);
    line-height: 1.6;
    position: relative;
}


body::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 100vh;
    background: radial-gradient(circle at 15% 50%, rgba(244, 63, 94, 0.08), transparent 50%),
                radial-gradient(circle at 85% 30%, rgba(59, 130, 246, 0.08), transparent 50%);
    pointer-events: none;
    z-index: -1;
}

body.loading-active {
    overflow: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
strong { color: var(--text); }


.red          { color: var(--red); }
.red-icon     { color: var(--red); font-size: 1.4rem; flex-shrink: 0; }


#header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(2, 6, 23, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

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

.nav-logo {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.3px;
    transition: all 0.3s;
    font-family: 'Outfit', monospace;
}
.logo-bracket {
    color: var(--red);
    font-weight: 400;
}
.nav-logo:hover { color: var(--red); }

.nav-pill {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    padding: 4px 6px;
    position: relative;
    backdrop-filter: blur(10px);
}

.nav-pill-indicator {
    position: absolute;
    height: calc(100% - 8px);
    border-radius: 50px;
    background: rgba(244, 63, 94, 0.15);
    border: 1px solid rgba(244, 63, 94, 0.3);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 0;
    pointer-events: none;
}

.nav-link {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.3s;
    position: relative;
    z-index: 1;
    padding: 8px 16px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.nav-link i {
    font-size: 0.75rem;
    transition: color 0.3s;
}

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

.nav-link.active i {
    color: var(--red);
}

.nav-cta-btn {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    background: var(--red);
    padding: 10px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.3);
}
.nav-cta-btn:hover {
    background: #e11d48;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 63, 94, 0.4);
}
.nav-cta-btn i {
    font-size: 0.75rem;
    transition: transform 0.3s;
}
.nav-cta-btn:hover i {
    transform: translateX(3px);
}


.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: 0.4s;
    display: block;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(4px,-4px); }


.hero {
    min-height: 100vh;
    padding-top: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
    display: flex;
    align-items: center;
    gap: 60px;
}

.hero-left {
    flex: 1;
    max-width: 580px;
}

.hero-label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 16px;
}

.hero-title {
    font-size: clamp(2.8rem, 5.5vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 24px;
    color: var(--text);
}


.word-rotator {
    display: inline-flex;
    flex-wrap: nowrap;
    overflow: hidden;
    vertical-align: bottom;
    height: 1.1em;
    color: var(--text-light);
}

.word-rotator-inner {
    display: flex;
    flex-direction: column;
    animation: wordSpin 8s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}

.word-rotator-inner span {
    height: 1.1em;
    line-height: 1.1em;
    display: flex;
    align-items: center;
}

@keyframes wordSpin {
    0%, 20% { transform: translateY(0); }
    28%, 53% { transform: translateY(-25%); }
    61%, 86% { transform: translateY(-50%); }
    94%, 100% { transform: translateY(-75%); }
}

.hero-desc {
    font-size: 1.05rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 28px;
    max-width: 500px;
}


.blink-cursor {
    display: inline-block;
    width: 2px;
    background: var(--red);
    animation: blink 0.9s step-end infinite;
    vertical-align: text-bottom;
    height: 1.1em;
    margin-left: 1px;
}
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:0; } }


.skill-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 32px;
}

.pill {
    padding: 6px 16px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-light);
    transition: all 0.25s;
}
.pill:hover { border-color: var(--red); color: var(--red); }


.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.btn-red {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.4);
}
.btn-red:hover { 
    transform: translateY(-3px) scale(1.05); 
    box-shadow: 0 10px 30px rgba(244, 63, 94, 0.6), 0 0 15px rgba(244, 63, 94, 0.4); 
    filter: brightness(1.2);
}
.btn-red.btn-full { width: 100%; justify-content: center; font-size: 1rem; padding: 15px; }

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    backdrop-filter: blur(8px);
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}
.btn-ghost:hover { 
    background: rgba(255, 255, 255, 0.08); 
    border-color: rgba(255, 255, 255, 0.2); 
    transform: translateY(-2px); 
}


.hero-socials {
    display: flex;
    gap: 14px;
}
.hero-socials a {
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(4px);
    font-size: 1.2rem;
    color: var(--text-muted);
    transition: all 0.3s;
}
.hero-socials a:hover { 
    border-color: var(--red); 
    color: var(--red); 
    transform: translateY(-3px); 
    background: rgba(244, 63, 94, 0.1);
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.2);
}


.hero-right {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
}

.spline-container {
    width: 100%;
    height: 500px; 
    position: relative;
    z-index: 2;
    border-radius: 20px;
    overflow: hidden;
}

.spline-container iframe,
.spline-container spline-viewer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100% + 120px); 
    mix-blend-mode: screen; 
}

.hero-glow {
    position: absolute;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(244, 63, 94, 0.2) 0%, transparent 60%);
    border-radius: 50%;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    pointer-events: none;
    filter: blur(40px);
}


.section {
    padding: 100px 24px;
}

.section-dark {
    background: var(--bg-dark);
}

.section-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.section-eyebrow {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 10px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    letter-spacing: -1px;
    margin-bottom: 60px;
    line-height: 1.15;
}


.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-visual {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.dev-illustration-wrap {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.dev-illustration {
    width: 100%;
    max-width: 420px;
    border-radius: 20px;
    animation: devFloat 4s ease-in-out infinite;
    filter: drop-shadow(0 10px 40px rgba(244, 63, 94, 0.25));
    position: relative;
    z-index: 2;
}

@keyframes devFloat {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-12px); }
}

.dev-glow-ring {
    position: absolute;
    width: 320px; height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(244, 63, 94, 0.15) 0%, transparent 65%);
    animation: ringPulse 4s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes ringPulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50%       { transform: scale(1.1); opacity: 1; }
}

.floating-badge {
    position: absolute;
    background: rgba(15, 15, 25, 0.85);
    border: 1px solid rgba(244, 63, 94, 0.35);
    backdrop-filter: blur(12px);
    border-radius: 40px;
    padding: 8px 16px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    z-index: 5;
    box-shadow: 0 4px 20px rgba(244, 63, 94, 0.2);
}

.floating-badge i { color: var(--red); }

.badge-1 {
    top: 10%; left: -10%;
    animation: badgeFloat1 5s ease-in-out infinite;
}
.badge-2 {
    top: 50%; right: -12%;
    animation: badgeFloat2 6s ease-in-out infinite;
}
.badge-3 {
    bottom: 5%; left: 5%;
    animation: badgeFloat3 4.5s ease-in-out infinite;
}

@keyframes badgeFloat1 {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50%       { transform: translateY(-8px) rotate(0deg); }
}
@keyframes badgeFloat2 {
    0%, 100% { transform: translateY(0) rotate(2deg); }
    50%       { transform: translateY(-10px) rotate(-1deg); }
}
@keyframes badgeFloat3 {
    0%, 100% { transform: translateY(0) rotate(1deg); }
    50%       { transform: translateY(-6px) rotate(-2deg); }
}

.info-cards-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
}



.about-text p {
    color: var(--text-light);
    line-height: 1.9;
    margin-bottom: 20px;
    font-size: 1.02rem;
}

.about-stats {
    display: flex;
    gap: 30px;
    margin-top: 36px;
    flex-wrap: wrap;
}

.stat-box {
    text-align: center;
    padding: 24px 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}

.stat-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(244, 63, 94, 0.08), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
}

.stat-box:hover::before { opacity: 1; }

.stat-box:hover {
    border-color: rgba(244, 63, 94, 0.2);
    transform: translateY(-6px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.stat-icon {
    font-size: 1.2rem;
    color: var(--red);
    margin-bottom: 10px;
    opacity: 0.7;
}

.stat-num {
    font-size: 2.4rem;
    font-weight: 900;
    color: var(--red);
    letter-spacing: -1px;
    line-height: 1;
    position: relative;
}

.stat-lbl {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* About intro badge */
.about-intro-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(244, 63, 94, 0.08);
    border: 1px solid rgba(244, 63, 94, 0.15);
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--red);
    letter-spacing: 1px;
    font-family: 'Consolas', 'Monaco', monospace;
    margin-bottom: 24px;
}

/* Highlight items */
.about-highlights {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 8px;
    margin-bottom: 12px;
}

.about-highlight-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

.about-highlight-item:hover {
    border-color: rgba(244, 63, 94, 0.2);
    background: rgba(244, 63, 94, 0.03);
    transform: translateX(6px);
}

.highlight-icon {
    width: 42px; height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.12), rgba(244, 63, 94, 0.04));
    border: 1px solid rgba(244, 63, 94, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--red);
    font-size: 1rem;
    flex-shrink: 0;
}

.about-highlight-item h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.about-highlight-item p {
    font-size: 0.82rem !important;
    color: var(--text-muted) !important;
    line-height: 1.5 !important;
    margin-bottom: 0 !important;
}

/* Code block decoration */
.about-code-block {
    background: rgba(5, 5, 15, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    overflow: hidden;
    font-family: 'Consolas', 'Monaco', monospace;
}

.code-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.code-dots {
    display: flex;
    gap: 6px;
}

.c-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
}

.c-red { background: #ff5f57; }
.c-yellow { background: #ffbd2e; }
.c-green { background: #28c940; }

.code-filename {
    font-size: 0.7rem;
    color: #555;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.code-body {
    padding: 18px 20px;
}

.code-body code {
    font-size: 0.78rem;
    line-height: 1.8;
    color: #8b8fa3;
}

.code-kw { color: #c084fc; }
.code-var { color: #60a5fa; }
.code-prop { color: #f472b6; }
.code-str { color: #34d399; }
.code-bool { color: #fbbf24; }
.code-num { color: #f97316; }

.about-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 24px;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.info-card:hover {
    border-color: rgba(244, 63, 94, 0.4);
    transform: translateX(6px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), inset 0 0 0 1px rgba(244, 63, 94, 0.1);
}

.info-card h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
}

.info-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}


.tech-logo-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.skill-group-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: -20px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.skill-group-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border), transparent);
}

.tech-logo-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.tech-logo-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100px;
    height: 100px;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 16px;
    cursor: default;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.tech-logo-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, color-mix(in srgb, var(--icon-color) 20%, transparent), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.tech-logo-card:hover::before {
    opacity: 1;
}

.tech-logo-card:hover {
    transform: translateY(-8px) scale(1.05);
    border-color: color-mix(in srgb, var(--icon-color) 60%, transparent);
    box-shadow: 0 15px 30px rgba(0,0,0,0.4), 0 0 20px color-mix(in srgb, var(--icon-color) 20%, transparent);
    background: rgba(30, 41, 59, 0.7);
}

.tech-logo-card i {
    font-size: 2.2rem;
    color: var(--icon-color, var(--text-muted));
    transition: all 0.3s;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.tech-logo-card:hover i {
    color: var(--icon-color, #fff); 
    transform: scale(1.15);
    filter: drop-shadow(0 0 8px color-mix(in srgb, var(--icon-color) 50%, transparent));
}

.tech-logo-card span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    position: relative;
    z-index: 1;
    transition: color 0.3s;
    line-height: 1;
}

.tech-logo-card:hover span {
    color: #fff;
}

@media (max-width: 768px) {
    .tech-logo-card { width: 85px; height: 85px; }
    .tech-logo-card i { font-size: 1.8rem; }
}


.skills-grid {

    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.skill-category {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px;
    transition: border-color 0.25s;
}

.skill-category:hover {
    border-color: rgba(239,68,68,0.3);
}

.skill-cat-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.skill-cat-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    padding: 6px 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--text-light);
    transition: all 0.2s;
}

.skill-tag:hover {
    border-color: var(--red);
    color: var(--text);
    background: rgba(239,68,68,0.08);
}

.skill-tag i { color: var(--red); font-size: 0.9em; }


.filter-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 24px;
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Outfit', 'Inter', sans-serif;
}

.filter-btn:hover,
.filter-btn.active {
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.3);
}

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

/* ---- PROJECT CARD — PREMIUM REDESIGN ---- */
.project-card {
    position: relative;
    background: linear-gradient(165deg, rgba(20, 25, 45, 0.95), rgba(10, 12, 28, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1),
                border-color 0.4s ease,
                box-shadow 0.5s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.project-card:hover {
    transform: translateY(-12px);
    border-color: rgba(244, 63, 94, 0.35);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5),
                0 0 40px rgba(244, 63, 94, 0.08),
                inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Animated border gradient on hover */
.card-border-glow {
    position: absolute;
    inset: 0;
    border-radius: 20px;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.card-border-glow::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 30px;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transform: rotate(25deg);
    animation: none;
}

.project-card:hover .card-border-glow {
    opacity: 1;
}

.project-card:hover .card-border-glow::before {
    animation: cardShineSlide 1.8s ease-in-out infinite;
}

@keyframes cardShineSlide {
    0% { left: -50%; }
    100% { left: 150%; }
}

/* Background glow that follows hover */
.card-glow {
    position: absolute;
    width: 300px; height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(244, 63, 94, 0.15), transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s;
    z-index: 0;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    filter: blur(40px);
}

.project-card:hover .card-glow {
    opacity: 1;
}

/* Card Number */
.card-number {
    position: absolute;
    top: 16px; left: 16px;
    font-size: 3.5rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.03);
    line-height: 1;
    z-index: 1;
    pointer-events: none;
    transition: color 0.5s;
    letter-spacing: -2px;
}

.project-card:hover .card-number {
    color: rgba(244, 63, 94, 0.1);
}

/* ---- IMAGE AREA (visible top section) ---- */
.project-img-wrap {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    z-index: 1;
    flex-shrink: 0;
}

.project-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.7s cubic-bezier(0.23, 1, 0.32, 1),
                filter 0.5s ease;
    filter: brightness(0.85) saturate(1);
}

.project-card:hover .project-img-wrap img {
    transform: scale(1.06);
    filter: brightness(0.95) saturate(1.1);
}

/* Overlay on hover */
.project-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(2, 6, 23, 0.1) 0%,
        rgba(2, 6, 23, 0.35) 50%,
        rgba(2, 6, 23, 0.6) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-card:hover .project-img-overlay {
    opacity: 1;
}

.overlay-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transform: translateY(20px);
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.project-card:hover .overlay-content {
    transform: translateY(0);
}

.overlay-icon {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: rgba(244, 63, 94, 0.2);
    border: 1px solid rgba(244, 63, 94, 0.5);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    transition: transform 0.3s, background 0.3s;
}

.project-card:hover .overlay-icon {
    animation: overlayPop 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes overlayPop {
    0% { transform: scale(0.6); opacity: 0; }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

.overlay-text {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
}

/* Year badge inside image */
.card-year-badge {
    position: absolute;
    top: 14px; right: 14px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 0.7rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 5;
    letter-spacing: 0.5px;
}

.card-year-badge i {
    color: var(--red);
    font-size: 0.65rem;
}

/* Status indicator */
.card-status {
    position: absolute;
    bottom: 14px; left: 14px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.68rem;
    font-weight: 700;
    color: #22c55e;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 5;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.card-status:hover {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.5);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
    transform: translateY(-1px);
}

/* ---- PROJECT DESCRIPTION ---- */
.project-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.status-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px #22c55e;
    animation: statusBlink 2s ease-in-out infinite;
}

@keyframes statusBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ---- CARD BODY ---- */
.project-body {
    padding: 28px 32px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
    position: relative;
    z-index: 2;
    background: linear-gradient(165deg, rgba(20, 25, 45, 0.98), rgba(10, 12, 28, 1));
}

.project-tech-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.tech-badge {
    padding: 4px 12px;
    background: rgba(244, 63, 94, 0.08);
    color: var(--red);
    border: 1px solid rgba(244, 63, 94, 0.15);
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.3s;
}

.project-card:hover .tech-badge {
    background: rgba(244, 63, 94, 0.12);
    border-color: rgba(244, 63, 94, 0.3);
}

.project-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--text);
    letter-spacing: -0.3px;
    transition: color 0.3s;
}

.project-card:hover .project-title {
    background: linear-gradient(90deg, #fff, var(--red));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ---- CARD ACTION BUTTONS ---- */
.card-actions {
    margin-top: auto;
    padding-top: 18px;
    display: flex;
    gap: 10px;
}

.card-btn {
    flex: 1;
    padding: 10px 14px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
    border: none;
    font-family: 'Outfit', 'Inter', sans-serif;
}

.card-btn-live {
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: #fff;
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.25);
}
.card-btn-live:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(244, 63, 94, 0.45);
    filter: brightness(1.1);
}

.project-link {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--red);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.3s, color 0.3s;
}
.project-link:hover { gap: 12px; filter: brightness(1.2); }

/* ---- ACTION BUTTONS REDESIGN ---- */
.project-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
    flex-wrap: wrap;
}

.p-btn {
    padding: 10px 18px;
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.p-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.p-btn:hover::before {
    opacity: 1;
}

.p-live {
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: #fff;
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.3);
}

.p-live:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(244, 63, 94, 0.5), 0 0 15px rgba(244, 63, 94, 0.3);
}

.p-source {
    background: rgba(30, 41, 59, 0.6);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
}

.p-source:hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}


.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-intro {
    font-size: 1.05rem;
    color: var(--text-light);
    line-height: 1.9;
    margin-bottom: 40px;
    max-width: 420px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
}

.contact-icon-box {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: all 0.3s;
}
.contact-icon-box:hover { 
    border-color: var(--red); 
    color: var(--red); 
    background: rgba(244, 63, 94, 0.1);
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.2);
}
.contact-icon-box.red-bg { 
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.15), rgba(220, 38, 38, 0.15)); 
    border-color: rgba(244, 63, 94, 0.3); 
    color: var(--red); 
}

.contact-lbl { font-size: 0.75rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.contact-val { font-size: 1rem; font-weight: 600; color: var(--text-light); transition: color 0.2s; }
.contact-val:hover { color: #fff; }
.contact-val.red { color: var(--red); }


.contact-form {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
    padding: 14px 18px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: var(--text);
    font-size: 1rem;
    font-family: 'Outfit', 'Inter', sans-serif;
    outline: none;
    transition: all 0.3s;
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(148, 163, 184, 0.5); }

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--red);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.15);
}

.form-group textarea {
    height: 140px;
    resize: vertical;
}


footer {
    border-top: 1px solid var(--border);
    padding: 32px 24px;
}

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

.footer-socials {
    display: flex;
    gap: 12px;
}

.footer-socials a {
    width: 38px; height: 38px;
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1rem;
    transition: all 0.2s;
}
.footer-socials a:hover { border-color: var(--red); color: var(--red); }

.footer-copy {
    font-size: 0.85rem;
    color: var(--text-muted);
}


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


.spline-wrapper {
    width: 100%;
    max-width: 520px;
    height: 460px;
    position: relative;
    z-index: 2;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(239,68,68,0.15);
    box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}

.spline-wrapper spline-viewer {
    width: 100%;
    height: 100%;
}


.skills-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.skill-tab-btn {
    padding: 9px 24px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.skill-tab-btn:hover,
.skill-tab-btn.active {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}


.skill-panel {
    display: none;
}
.skill-panel.active {
    display: block;
}


.skill-bar-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 40px;
}

.skill-bar-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skill-bar-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-light);
}

.skill-bar-info i {
    color: var(--red);
    margin-right: 6px;
}

.skill-pct {
    color: var(--red);
    font-weight: 700;
    font-size: 0.85rem;
}

.skill-bar-track {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.07);
    border-radius: 99px;
    overflow: hidden;
}

.skill-bar-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--red-dark), var(--red));
    border-radius: 99px;
    transition: width 1.2s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.skill-bar-fill.animated {
    width: var(--pct);
}







/* ====================================================
   LOADING SCREEN — PREMIUM REDESIGN
   ==================================================== */
.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #06060e;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1s cubic-bezier(0.7, 0, 0.3, 1),
                transform 1s cubic-bezier(0.7, 0, 0.3, 1),
                filter 1s ease,
                visibility 1s ease;
    overflow: hidden;
}

.loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    transform: scale(1.05);
    filter: blur(10px);
}

/* Grid background */
.load-grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(244, 63, 94, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(244, 63, 94, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
    z-index: 0;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Floating particles */
.load-particle {
    position: absolute;
    border-radius: 50%;
    background: var(--red);
    opacity: 0.15;
    z-index: 0;
    filter: blur(1px);
}

.load-p1 { width: 4px; height: 4px; top: 15%; left: 10%; animation: loadFloat 8s ease-in-out infinite; }
.load-p2 { width: 6px; height: 6px; top: 70%; left: 80%; animation: loadFloat 12s ease-in-out infinite 2s; }
.load-p3 { width: 3px; height: 3px; top: 40%; left: 90%; animation: loadFloat 10s ease-in-out infinite 4s; }
.load-p4 { width: 5px; height: 5px; top: 80%; left: 20%; animation: loadFloat 9s ease-in-out infinite 1s; }
.load-p5 { width: 4px; height: 4px; top: 25%; left: 65%; animation: loadFloat 11s ease-in-out infinite 3s; }

@keyframes loadFloat {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0.15; }
    25% { transform: translateY(-30px) translateX(15px); opacity: 0.3; }
    50% { transform: translateY(-10px) translateX(-10px); opacity: 0.15; }
    75% { transform: translateY(-40px) translateX(5px); opacity: 0.25; }
}

.loading-content {
    background: linear-gradient(165deg, rgba(15, 12, 20, 0.92), rgba(8, 6, 14, 0.97));
    border: 1px solid rgba(244, 63, 94, 0.08);
    border-radius: 24px;
    width: 92%;
    max-width: 1100px;
    padding: 36px 40px;
    position: relative;
    z-index: 2;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6),
                inset 0 1px 0 rgba(255, 255, 255, 0.04);
    animation: contentFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes contentFadeIn {
    from { opacity: 0; transform: translateY(30px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Top bar */
.loading-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.loading-header {
    display: flex;
    gap: 10px;
}

.l-badge {
    padding: 5px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #777;
    text-transform: uppercase;
    transition: border-color 0.3s;
}

.l-badge i { color: var(--red); font-size: 0.6rem; }

.dot-red {
    width: 7px; height: 7px;
    background: var(--red);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 10px var(--red);
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { box-shadow: 0 0 6px var(--red); }
    50% { box-shadow: 0 0 16px var(--red), 0 0 30px rgba(244, 63, 94, 0.3); }
}

.loading-main {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 40px;
}

.loading-left {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Greeting line */
.load-greeting {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 12px;
    opacity: 0;
    animation: fadeSlideIn 0.6s 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.loading-title {
    font-size: clamp(2.8rem, 5.5vw, 4.5rem);
    line-height: 1.05;
    margin-bottom: 20px;
    font-weight: 900;
    letter-spacing: -2px;
}

.load-line {
    display: block;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeSlideIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.load-line-1 { animation-delay: 0.5s; }
.load-line-2 { animation-delay: 0.7s; }

.load-dot {
    color: var(--red);
}

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

.loading-desc {
    color: #666;
    max-width: 420px;
    line-height: 1.7;
    margin-bottom: 30px;
    font-size: 0.95rem;
    opacity: 0;
    animation: fadeSlideIn 0.7s 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Progress bar */
.loading-progress-wrap {
    margin-bottom: 24px;
    opacity: 0;
    animation: fadeSlideIn 0.7s 1.1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.loading-progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.l-lbl {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #555;
}

.load-pct {
    color: var(--red);
}

.loading-progress-track {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    overflow: hidden;
}

.loading-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--red-dark), var(--red), #ff6b9d);
    border-radius: 10px;
    box-shadow: 0 0 12px rgba(244, 63, 94, 0.4);
    transition: width 0.1s linear;
}

/* Terminal */
.loading-terminal {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    margin-top: auto;
    opacity: 0;
    animation: fadeSlideIn 0.7s 1.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.t-dot {
    width: 9px; height: 9px;
    border-radius: 50%;
}

.t-dot-red { background: #ff5f57; }
.t-dot-yellow { background: #ffbd2e; }
.t-dot-green { background: #28c940; }

.terminal-title {
    font-size: 0.65rem;
    font-weight: 600;
    color: #555;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.terminal-body {
    padding: 14px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.72rem;
    color: #555;
    max-height: 80px;
    overflow: hidden;
}

.terminal-line {
    margin-bottom: 4px;
    opacity: 0;
    animation: termLine 0.4s ease forwards;
}

.terminal-line:nth-child(1) { animation-delay: 1.5s; }
.terminal-line:nth-child(2) { animation-delay: 2s; }
.terminal-line:nth-child(3) { animation-delay: 2.5s; }
.terminal-line:nth-child(4) { animation-delay: 3s; }

@keyframes termLine {
    to { opacity: 1; }
}

.t-prompt {
    color: var(--red);
    margin-right: 8px;
    font-weight: 700;
}

.t-success { color: #28c940; }

/* Loading Right — System Monitor */
.loading-right {
    flex: 1;
    max-width: 380px;
}

.system-monitor {
    background: linear-gradient(180deg, rgba(10, 8, 18, 0.6), rgba(5, 4, 12, 0.8));
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.s-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #555;
    margin-bottom: 24px;
}

.s-top i { color: var(--red); margin-right: 6px; }

.s-online {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #28c940;
}

.s-online-dot {
    width: 6px; height: 6px;
    background: #28c940;
    border-radius: 50%;
    box-shadow: 0 0 8px #28c940;
    animation: dotPulse 2s ease-in-out infinite;
}

.s-circles {
    position: relative;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 24px;
}

.circle-outer, .circle-middle, .circle-inner {
    position: absolute;
    border-radius: 50%;
}

.circle-outer {
    width: 180px; height: 180px;
    border: 1px solid rgba(244, 63, 94, 0.12);
    animation: spin 20s linear infinite;
}

.circle-middle {
    width: 140px; height: 140px;
    border: 1px dashed rgba(244, 63, 94, 0.08);
    animation: spin 25s linear infinite reverse;
}

.circle-inner {
    width: 100px; height: 100px;
    border: 1px solid rgba(244, 63, 94, 0.06);
    animation: spin 15s linear infinite;
}

.center-pulse {
    width: 60px; height: 60px;
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.15), rgba(244, 63, 94, 0.05));
    border: 1px solid rgba(244, 63, 94, 0.25);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 30px rgba(244, 63, 94, 0.15),
                inset 0 0 20px rgba(244, 63, 94, 0.1);
    animation: centerPulse 3s ease-in-out infinite;
    z-index: 3;
}

.center-pulse-icon {
    font-size: 1.1rem;
    color: var(--red);
}

@keyframes centerPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 30px rgba(244, 63, 94, 0.15); }
    50% { transform: scale(1.08); box-shadow: 0 0 50px rgba(244, 63, 94, 0.3); }
}

.orbit-icon {
    position: absolute;
    width: 30px; height: 30px;
    background: rgba(15, 10, 20, 0.9);
    border: 1px solid rgba(244, 63, 94, 0.2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.7rem;
    color: var(--red);
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.icon-1 { top: 0; left: 50%; transform: translate(-50%, -50%); }
.icon-2 { bottom: 0; left: 50%; transform: translate(-50%, 50%); }
.icon-3 { top: 50%; left: 0; transform: translate(-50%, -50%); }
.icon-4 { top: 50%; right: 0; transform: translate(50%, -50%); }

@keyframes spin { 100% { transform: rotate(360deg); } }

.s-stats {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.s-stat-box {
    flex: 1;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: border-color 0.3s;
}

.s-stat-box:hover {
    border-color: rgba(244, 63, 94, 0.15);
}

.s-stat-box .s-lbl {
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #555;
    margin-bottom: 6px;
}

.s-stat-box .s-val {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
}

.s-unit {
    font-size: 0.65rem;
    font-weight: 600;
    color: #666;
}

.s-val-ok {
    color: #28c940 !important;
    font-size: 1.1rem !important;
}

.s-stat-box .s-sub {
    font-size: 0.62rem;
    color: #444;
    margin-top: 2px;
}

.bg-welcome-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28vw;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.015);
    white-space: nowrap;
    z-index: 1;
    pointer-events: none;
    letter-spacing: -8px;
}

@media (max-width: 900px) {
    .loading-main { flex-direction: column; }
    .loading-right { max-width: 100%; margin-top: 24px; }
    .loading-topbar { flex-direction: column; gap: 10px; align-items: flex-start; }
    .loading-title { font-size: clamp(2rem, 5vw, 3rem); }
}


.p-details {
    display: none;
}



/* ====================================================
   PROJECT MODAL — PREMIUM REDESIGN
   ==================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(2, 2, 10, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    padding: 20px;
}

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

.modal-card {
    background: linear-gradient(180deg, #0d1120, #080a16);
    border: 1px solid rgba(244, 63, 94, 0.1);
    border-radius: 28px;
    width: 100%;
    max-width: 880px;
    max-height: 92vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    transform: translateY(50px) scale(0.95);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7),
                0 0 0 1px rgba(244, 63, 94, 0.06),
                0 0 80px rgba(244, 63, 94, 0.04);
    scrollbar-width: thin;
    scrollbar-color: rgba(244, 63, 94, 0.2) transparent;
}

.modal-card::-webkit-scrollbar { width: 4px; }
.modal-card::-webkit-scrollbar-track { background: transparent; }
.modal-card::-webkit-scrollbar-thumb { background: rgba(244, 63, 94, 0.25); border-radius: 99px; }

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

.project-card:focus-visible,
.modal-close:focus-visible,
.gallery-arrow:focus-visible,
.project-gallery-thumbs button:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 3px;
}

.modal-card.has-gallery { max-width: 1020px; }
.has-gallery .modal-hero { height: auto; }
.has-gallery .modal-hero-img,
.has-gallery .modal-hero-overlay { display: none; }
.has-gallery .modal-hero-info { position: static; padding: 24px 74px 18px 28px; }
.has-gallery .modal-badges-row { margin-bottom: 8px; }
.has-gallery .modal-badges-row:not(:has(> :not([hidden]))) { display: none; }

.modal-gallery {
    padding: 0 28px 10px;
}

.project-gallery-figure { margin: 0; }

.project-gallery-stage {
    position: relative;
    display: grid;
    place-items: center;
    height: clamp(220px, 53dvh, 560px);
    padding: 12px 58px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    background: #070a13;
    transition-property: none;
}

.project-gallery-stage img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: contain;
}

.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: #171b2b;
    color: #fff;
    cursor: pointer;
}

.gallery-arrow:hover { background: #282d42; }
.gallery-previous { left: 8px; }
.gallery-next { right: 8px; }
.gallery-arrow svg { width: 23px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.project-gallery-caption {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 14px;
    padding: 10px 0;
    color: #e7e9f2;
    font-size: 0.9rem;
}

#projectGalleryCount { white-space: nowrap; color: #a8aec4; font-variant-numeric: tabular-nums; }

.project-gallery-thumbs {
    position: relative;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 5px 4px 9px;
    scrollbar-width: thin;
}

.project-gallery-thumbs button {
    flex: 0 0 108px;
    padding: 2px;
    border: 2px solid transparent;
    border-radius: 9px;
    background: #171b2b;
    cursor: pointer;
}

.project-gallery-thumbs button[aria-pressed="true"] { border-color: var(--red); }
.project-gallery-thumbs img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 5px; }

@media (max-width: 600px) {
    .has-gallery .modal-hero-info { padding: 17px 67px 14px 14px; }
    .modal-gallery { padding: 0 12px 6px; }
    .project-gallery-stage { height: clamp(205px, 44dvh, 430px); padding: 8px 0; border-radius: 12px; }
    .project-gallery-stage.is-portrait { height: clamp(250px, 54dvh, 500px); }
    .gallery-arrow { background: rgba(15, 18, 31, 0.92); }
    .gallery-previous { left: 5px; }
    .gallery-next { right: 5px; }
    .project-gallery-thumbs button { flex-basis: 80px; }
}

/* Glow effect */
.modal-glow-effect {
    position: absolute;
    top: -1px; left: 20%; right: 20%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--red), transparent);
    border-radius: 99px;
    opacity: 0.6;
    z-index: 10;
}

/* Close button */
.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #888;
    width: 44px; height: 44px;
    border-radius: 14px;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 20;
    backdrop-filter: blur(10px);
}

.modal-close:hover {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
    transform: rotate(90deg) scale(1.05);
    box-shadow: 0 4px 20px rgba(244, 63, 94, 0.4);
}

.modal-close > span { color: #e7e9f2; font-size: 1.55rem; line-height: 1; }

/* Hero image */
.modal-hero {
    position: relative;
    width: 100%;
    height: 320px;
    overflow: hidden;
    border-radius: 28px 28px 0 0;
}

.modal-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    filter: brightness(0.85);
}

.modal-card:hover .modal-hero-img {
    transform: scale(1.05);
    filter: brightness(0.95);
}

.modal-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(13, 17, 32, 0.4) 50%,
        rgba(13, 17, 32, 0.98) 100%
    );
}

.modal-hero-info {
    position: absolute;
    bottom: 28px;
    left: 36px;
    right: 70px;
}

.modal-badges-row {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.modal-year-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(244, 63, 94, 0.12);
    border: 1px solid rgba(244, 63, 94, 0.25);
    color: var(--red);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 8px;
    backdrop-filter: blur(8px);
}

.modal-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #22c55e;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 8px;
    backdrop-filter: blur(8px);
}

.modal-status-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px #22c55e;
    animation: statusBlink 2s ease-in-out infinite;
}

.modal-hero-info h2 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 900;
    letter-spacing: -0.5px;
    color: #fff;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

/* Modal body */
.modal-body {
    padding: 36px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.modal-section {
    padding: 24px 0;
}

.modal-section:first-child {
    padding-top: 0;
}

.modal-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.modal-section-icon {
    width: 34px; height: 34px;
    border-radius: 10px;
    background: rgba(244, 63, 94, 0.1);
    border: 1px solid rgba(244, 63, 94, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--red);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.modal-section-title {
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 0;
}

.modal-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(244, 63, 94, 0.15), rgba(255, 255, 255, 0.04), transparent);
}

.modal-section p {
    color: var(--text-muted);
    line-height: 1.9;
    font-size: 0.98rem;
}

/* Features list */
.modal-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.modal-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    transition: all 0.3s;
}

.modal-features li:hover {
    background: rgba(244, 63, 94, 0.05);
    border-color: rgba(244, 63, 94, 0.15);
}

.modal-features li i {
    color: var(--red);
    margin-top: 3px;
    flex-shrink: 0;
    font-size: 0.8rem;
}

/* Tech stack in modal */
.modal-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.modal-tech .tech-badge {
    padding: 8px 16px;
    font-size: 0.78rem;
    background: rgba(244, 63, 94, 0.06);
    border: 1px solid rgba(244, 63, 94, 0.12);
    border-radius: 10px;
    transition: all 0.3s;
}

.modal-tech .tech-badge:hover {
    background: rgba(244, 63, 94, 0.15);
    border-color: rgba(244, 63, 94, 0.35);
    transform: translateY(-2px);
}

/* CTA buttons */
.modal-cta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    padding: 28px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    margin-top: 4px;
}

.modal-cta-btn {
    flex: 1;
    min-width: 160px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 28px;
    font-size: 0.92rem;
    font-weight: 700;
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: pointer;
    letter-spacing: 0.3px;
}

.modal-cta-primary {
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: #fff;
    box-shadow: 0 6px 20px rgba(244, 63, 94, 0.35);
    border: none;
}

.modal-cta-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(244, 63, 94, 0.5), 0 0 20px rgba(244, 63, 94, 0.2);
}

.modal-cta-secondary {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
}

.modal-cta-secondary:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .modal-hero { height: 220px; }
    .modal-body { padding: 24px; }
    .modal-features { grid-template-columns: 1fr; }
    .modal-hero-info { left: 20px; right: 50px; bottom: 20px; }
    .modal-cta-btn { min-width: 100%; }
    .modal-badges-row { flex-wrap: wrap; }
}



/* ====================================================
   RESPONSIVE — All Breakpoints
   ==================================================== */

/* Large screens → cap layout nicely */
@media (max-width: 1200px) {
    .projects-grid { grid-template-columns: repeat(2, 1fr); }
    .tech-logo-card { width: 88px; height: 88px; }
}

/* Tablets */
@media (max-width: 992px) {
    .hero { gap: 40px; }
    .about-grid { grid-template-columns: 1fr; gap: 40px; }
    .dev-illustration-wrap { max-width: 400px; margin: 0 auto; }
    .badge-1 { left: 0; }
    .badge-2 { right: 0; }
    .contact-grid { grid-template-columns: 1fr; gap: 40px; }
    .loading-main { flex-direction: column; }
    .loading-right { max-width: 100%; border-left: none; padding-left: 0; margin-top: 30px; }
    .spline-container { height: 420px; }
}

/* Mobile */
@media (max-width: 768px) {
    /* Nav */
    .nav-pill {
        position: fixed;
        top: 64px; right: -100%;
        width: 78%;
        height: calc(100vh - 64px);
        background: rgba(10,10,10,0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 16px;
        transition: right 0.4s cubic-bezier(0.165,0.84,0.44,1);
        border-left: 1px solid var(--border);
        z-index: 999;
        border-radius: 0;
        padding: 20px;
    }
    .nav-pill.open { right: 0; }
    .nav-pill-indicator { display: none; }
    .nav-link { font-size: 1.15rem; }
    .nav-cta-btn { display: none; }
    .hamburger { display: flex; }

    /* Hero */
    .hero {
        flex-direction: column;
        padding-top: 90px;
        gap: 36px;
        text-align: center;
    }
    .hero-left { max-width: 100%; }
    .hero-desc { margin: 0 auto 28px; max-width: 100%; }
    .skill-pills { justify-content: center; }
    .hero-cta { justify-content: center; flex-wrap: wrap; }
    .hero-socials { justify-content: center; }
    .hero-right { width: 100%; }
    .spline-container { display: none; }
    .hero-right { display: none; }

    /* About */
    .about-grid { grid-template-columns: 1fr; gap: 32px; }
    .about-visual { align-items: center; }
    .dev-illustration-wrap { max-width: 320px; margin: 0 auto; }
    .dev-illustration { max-width: 280px; }
    .badge-1 { top: 5%; left: -5%; font-size: 0.7rem; padding: 6px 10px; }
    .badge-2 { top: 45%; right: -5%; font-size: 0.7rem; padding: 6px 10px; }
    .badge-3 { bottom: 0%; left: 5%; font-size: 0.7rem; padding: 6px 10px; }
    .about-stats { justify-content: center; gap: 20px; }

    /* Projects */
    .projects-grid { grid-template-columns: 1fr; gap: 30px; }
    .project-img-wrap { height: 250px; }
    .filter-tabs { justify-content: center; }

    /* Skills */
    .skill-bar-list { grid-template-columns: 1fr; }
    .tech-logo-card { width: 80px; height: 80px; }
    .tech-logo-card i { font-size: 1.8rem; }

    /* Contact */
    .contact-grid { grid-template-columns: 1fr; gap: 32px; }
    .form-row { grid-template-columns: 1fr; }

    /* Footer */
    .footer-inner { flex-direction: column; align-items: center; gap: 20px; text-align: center; }
    .footer-socials { justify-content: center; }

    /* Modal */
    .modal-card { max-width: 100%; border-radius: 14px; }
    .modal-img-wrap { height: 220px; }
    .modal-content { padding: 24px; }
    .modal-content h3 { font-size: 1.5rem; }
    .modal-actions { flex-direction: column; }
    .modal-actions .btn-red,
    .modal-actions .btn-ghost { width: 100%; justify-content: center; }

    /* Loading */
    .loading-content { padding: 24px 18px; }
    .loading-topbar { flex-direction: column; gap: 8px; margin-bottom: 24px; padding-bottom: 14px; }
    .loading-title { font-size: 2rem; letter-spacing: -1px; }
    .loading-main { flex-direction: column; gap: 20px; }
    .loading-right { max-width: 100%; }
    .s-circles { height: 150px; }
    .circle-outer { width: 130px; height: 130px; }
    .circle-middle { width: 100px; height: 100px; }
    .circle-inner { width: 70px; height: 70px; }
    .center-pulse { width: 48px; height: 48px; }
    .center-pulse-icon { font-size: 0.85rem; }
    .orbit-icon { width: 24px; height: 24px; font-size: 0.55rem; }
    .loading-terminal { display: none; }
    .load-greeting { font-size: 0.7rem; }

    /* About */
    .about-code-block { display: none; }
    .about-highlight-item { padding: 14px; }
    .highlight-icon { width: 36px; height: 36px; font-size: 0.85rem; }
    .about-intro-badge { font-size: 0.7rem; padding: 5px 12px; }
}

/* Small Mobile */
@media (max-width: 480px) {
    .hero { padding-left: 16px; padding-right: 16px; }
    .section-inner { padding: 0 16px; }
    .btn-red, .btn-ghost { padding: 11px 20px; font-size: 0.9rem; }
    .spline-container { display: none; }
    .hero-right { display: none; }
    .dev-illustration-wrap { max-width: 260px; }
    .badge-1, .badge-2, .badge-3 { display: none; }
    .tech-logo-card { width: 72px; height: 72px; gap: 8px; border-radius: 12px; }
    .tech-logo-card span { font-size: 0.68rem; }
    .tech-logo-card i { font-size: 1.5rem; }
    .stat-num { font-size: 1.8rem; }
    .projects-grid { gap: 18px; }
    .project-body { padding: 14px 16px; }
    .card-number { font-size: 2.5rem; top: 10px; left: 10px; }
    .card-year-badge { top: 10px; right: 10px; padding: 4px 8px; font-size: 0.62rem; }
    .card-status { bottom: 10px; left: 10px; font-size: 0.6rem; padding: 3px 8px; }
    .card-view-hint { padding-top: 10px; font-size: 0.72rem; }
    .modal-img-wrap { height: 160px; }
    .loading-title { font-size: 1.6rem; }
    .section-title { font-size: 1.8rem; }
    .l-badge { font-size: 0.62rem; padding: 4px 10px; }
    .footer-socials a { width: 38px; height: 38px; }
}


/* ====================================================
   MARQUEE BANNERS
   ==================================================== */
.marquee-banner {
    overflow: hidden;
    white-space: nowrap;
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.08), rgba(15, 23, 42, 0.95));
    border-top: 1px solid rgba(244, 63, 94, 0.15);
    border-bottom: 1px solid rgba(244, 63, 94, 0.15);
    padding: 18px 0;
    position: relative;
}

.marquee-banner::before,
.marquee-banner::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    width: 100px;
    z-index: 2;
    pointer-events: none;
}
.marquee-banner::before {
    left: 0;
    background: linear-gradient(90deg, var(--bg), transparent);
}
.marquee-banner::after {
    right: 0;
    background: linear-gradient(270deg, var(--bg), transparent);
}

.marquee-track {
    display: inline-flex;
    align-items: center;
    gap: 40px;
    animation: marqueeScroll 25s linear infinite;
}

.marquee-reverse .marquee-track {
    animation: marqueeScrollReverse 25s linear infinite;
}

.marquee-item {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.3s, text-shadow 0.3s;
}

.marquee-item:hover {
    color: var(--red);
    text-shadow: 0 0 20px rgba(244, 63, 94, 0.6);
}

.marquee-star {
    color: var(--red);
    font-size: 0.6rem;
    opacity: 0.6;
    animation: starPulse 2s ease-in-out infinite;
}

@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes marqueeScrollReverse {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

@keyframes starPulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.4); }
}


/* ====================================================
   GLITCH TEXT EFFECT
   ==================================================== */
.glitch-text {
    position: relative;
    display: inline-block;
    color: var(--text);
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
}

.glitch-text:hover::before {
    animation: glitch1 0.3s cubic-bezier(.25,.46,.45,.94) infinite;
    color: #0ff;
    opacity: 0.8;
    clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
}

.glitch-text:hover::after {
    animation: glitch2 0.3s cubic-bezier(.25,.46,.45,.94) infinite reverse;
    color: var(--red);
    opacity: 0.8;
    clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
}

@keyframes glitch1 {
    0% { transform: translate(0); }
    20% { transform: translate(-3px, 3px); }
    40% { transform: translate(-3px, -3px); }
    60% { transform: translate(3px, 3px); }
    80% { transform: translate(3px, -3px); }
    100% { transform: translate(0); }
}

@keyframes glitch2 {
    0% { transform: translate(0); }
    20% { transform: translate(3px, -3px); }
    40% { transform: translate(3px, 3px); }
    60% { transform: translate(-3px, -3px); }
    80% { transform: translate(-3px, 3px); }
    100% { transform: translate(0); }
}


/* ====================================================
   CURSOR PARTICLE TRAIL
   ==================================================== */
#cursorCanvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 9998;
}


/* ====================================================
   GRADIENT ANIMATED TEXT ON SECTION TITLES
   ==================================================== */
.section-title .red {
    background: linear-gradient(270deg, var(--red), #ff6b9d, #c084fc, var(--red));
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 4s ease-in-out infinite;
}

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


/* ====================================================
   SCROLL REVEAL ANIMATIONS
   ==================================================== */
.reveal-up {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}


/* ====================================================
   MAGNETIC BUTTON HOVER GLOW
   ==================================================== */
.btn-red,
.btn-ghost {
    position: relative;
    overflow: hidden;
}

.btn-red::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 0; height: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.3), transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.btn-red:hover::after {
    width: 300px;
    height: 300px;
}


/* ====================================================
   FLOATING TECH CARDS STAGGER
   ==================================================== */
.tech-logo-card {
    animation: cardFloat 3s ease-in-out infinite;
}

.tech-logo-card:nth-child(odd) { animation-delay: 0s; }
.tech-logo-card:nth-child(even) { animation-delay: 1.5s; }
.tech-logo-card:nth-child(3n) { animation-delay: 0.8s; }
.tech-logo-card:nth-child(4n) { animation-delay: 2s; }

@keyframes cardFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.tech-logo-card:hover {
    animation: none;
    transform: translateY(-8px) scale(1.05);
}


/* ====================================================
   STAT COUNTER GLOW
   ==================================================== */
.stat-num {
    text-shadow: 0 0 20px rgba(244, 63, 94, 0.4);
    transition: text-shadow 0.3s;
}

.stat-box:hover .stat-num {
    text-shadow: 0 0 40px rgba(244, 63, 94, 0.8), 0 0 80px rgba(244, 63, 94, 0.4);
}

.stat-box {
    transition: transform 0.3s;
}

.stat-box:hover {
    transform: scale(1.1);
}


/* ====================================================
   HERO LABEL SHIMMER
   ==================================================== */
.hero-label {
    background: linear-gradient(90deg, var(--red), #ff6b9d, var(--red));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}


/* ====================================================
   PILL STAGGER ANIMATION
   ==================================================== */
.skill-pills .pill {
    animation: pillPop 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.skill-pills .pill:nth-child(1) { animation-delay: 0.1s; }
.skill-pills .pill:nth-child(2) { animation-delay: 0.2s; }
.skill-pills .pill:nth-child(3) { animation-delay: 0.3s; }
.skill-pills .pill:nth-child(4) { animation-delay: 0.4s; }
.skill-pills .pill:nth-child(5) { animation-delay: 0.5s; }
.skill-pills .pill:nth-child(6) { animation-delay: 0.6s; }
.skill-pills .pill:nth-child(7) { animation-delay: 0.7s; }

@keyframes pillPop {
    0% { opacity: 0; transform: scale(0.5) translateY(20px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.pill:hover {
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 8px 25px rgba(244, 63, 94, 0.3);
}


/* ====================================================
   FOOTER WAVE LINE
   ==================================================== */
footer {
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 300%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--red), transparent);
    animation: footerLine 4s linear infinite;
}

@keyframes footerLine {
    0% { transform: translateX(0); }
    100% { transform: translateX(33.33%); }
}


/* ====================================================
   NAV LOGO PULSE
   ==================================================== */
.nav-logo .logo-bracket {
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { text-shadow: 0 0 0px transparent; }
    50% { text-shadow: 0 0 12px rgba(244, 63, 94, 0.5); }
}


/* ====================================================
   PROJECT CARD IMAGE SHINE SWEEP
   ==================================================== */
.project-img-wrap::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%; height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.08),
        transparent
    );
    transform: skewX(-15deg);
    transition: left 0.8s ease;
    z-index: 3;
    pointer-events: none;
}

.project-card:hover .project-img-wrap::after {
    left: 150%;
}


/* ====================================================
   CONTACT FORM INPUT GLOW PULSE
   ==================================================== */
.form-group input:focus,
.form-group textarea:focus {
    animation: inputGlow 2s ease-in-out infinite;
}

@keyframes inputGlow {
    0%, 100% { box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.15); }
    50% { box-shadow: 0 0 0 6px rgba(244, 63, 94, 0.3), 0 0 20px rgba(244, 63, 94, 0.1); }
}


/* ====================================================
   SOCIAL ICON BOUNCE ON HOVER
   ==================================================== */
.hero-socials a:hover,
.footer-socials a:hover {
    animation: socialBounce 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes socialBounce {
    0% { transform: translateY(0); }
    30% { transform: translateY(-8px); }
    50% { transform: translateY(-4px); }
    70% { transform: translateY(-6px); }
    100% { transform: translateY(-3px); }
}


/* ====================================================
   SECTION EYEBROW TYPING DASH
   ==================================================== */
.section-eyebrow {
    overflow: hidden;
    border-right: 2px solid var(--red);
    animation: eyebrowBlink 1s step-end infinite;
    display: inline-block;
}

@keyframes eyebrowBlink {
    0%, 100% { border-color: var(--red); }
    50% { border-color: transparent; }
}


/* ====================================================
   CUSTOM CURSOR
   ==================================================== */
body a, body button, body input, body textarea, body select { cursor: none; }

@media (max-width: 768px) {
    body { cursor: auto; }
    body a, body button, body input, body textarea, body select { cursor: auto; }
}


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


/* ====================================================
   SCROLL PROGRESS BAR
   ==================================================== */
.scroll-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--red-dark), var(--red), #ff6b9d, var(--red));
    background-size: 300% 100%;
    animation: progressGradient 3s linear infinite;
    z-index: 10001;
    transition: width 0.05s linear;
    box-shadow: 0 0 10px rgba(244, 63, 94, 0.5);
}

@keyframes progressGradient {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}


/* ====================================================
   BACK TO TOP BUTTON
   ==================================================== */
.back-to-top {
    position: fixed;
    bottom: 30px; right: 30px;
    width: 48px; height: 48px;
    border-radius: 50%;
    background: rgba(10, 10, 20, 0.85);
    border: 1px solid rgba(244, 63, 94, 0.2);
    backdrop-filter: blur(12px);
    color: var(--red);
    font-size: 0.9rem;
    cursor: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
    box-shadow: 0 8px 30px rgba(244, 63, 94, 0.4);
    transform: translateY(-4px);
}

.btt-ring {
    position: absolute;
    inset: -3px;
    width: calc(100% + 6px);
    height: calc(100% + 6px);
    transform: rotate(-90deg);
}

.btt-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 2;
}

.btt-ring-fill {
    fill: none;
    stroke: var(--red);
    stroke-width: 2;
    stroke-dasharray: 100.53;
    stroke-dashoffset: 100.53;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.1s linear;
}


/* ====================================================
   SPOTLIGHT CANVAS
   ==================================================== */
#spotlightCanvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.4;
}


/* ====================================================
   HERO GREETING
   ==================================================== */
.hero-greeting {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    opacity: 0;
    animation: fadeSlideIn 0.8s 0.2s ease forwards;
}

.hero-greeting .greeting-wave {
    display: inline-block;
    animation: wave 2s ease-in-out infinite;
    transform-origin: 70% 70%;
}

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    10% { transform: rotate(14deg); }
    20% { transform: rotate(-8deg); }
    30% { transform: rotate(14deg); }
    40% { transform: rotate(-4deg); }
    50% { transform: rotate(10deg); }
    60% { transform: rotate(0deg); }
}


/* ====================================================
   AVAILABILITY BADGE
   ==================================================== */
.hero-available {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    margin-top: 24px;
    background: rgba(34, 197, 94, 0.06);
    border: 1px solid rgba(34, 197, 94, 0.15);
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #22c55e;
    letter-spacing: 0.3px;
    animation: fadeSlideIn 0.8s 1s ease forwards;
    opacity: 0;
}

.avail-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 10px #22c55e;
    animation: statusBlink 2s ease-in-out infinite;
    flex-shrink: 0;
}


/* ====================================================
   SCROLL DOWN INDICATOR
   ==================================================== */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    animation: scrollFade 2s ease-in-out infinite;
    z-index: 5;
}

.scroll-mouse {
    width: 24px; height: 38px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    display: flex;
    justify-content: center;
    padding-top: 6px;
}

.scroll-wheel {
    width: 3px; height: 8px;
    background: var(--red);
    border-radius: 3px;
    animation: scrollWheel 2s ease-in-out infinite;
}

@keyframes scrollWheel {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(10px); opacity: 0.2; }
}

@keyframes scrollFade {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.scroll-indicator span {
    font-size: 0.65rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 600;
}

@media (max-width: 768px) {
    .scroll-indicator { display: none; }
}


/* ====================================================
   CUSTOM SELECTION
   ==================================================== */
::selection {
    background: rgba(244, 63, 94, 0.3);
    color: #fff;
}

::-moz-selection {
    background: rgba(244, 63, 94, 0.3);
    color: #fff;
}


/* ====================================================
   SECTION CLIP REVEAL
   ==================================================== */
.section {
    position: relative;
}

.section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(244, 63, 94, 0.1), rgba(255, 255, 255, 0.03), transparent);
}


/* ====================================================
   FOOTER REDESIGN
   ==================================================== */
footer {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding: 48px 24px 32px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, var(--bg), rgba(5, 5, 15, 1));
}

footer::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 300%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--red), transparent);
    animation: footerLine 4s linear infinite;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.footer-top {
    text-align: center;
}

.footer-logo {
    font-size: 1.4rem !important;
    display: inline-block;
    margin-bottom: 8px;
}

.footer-dot { color: var(--red); }

.footer-tagline {
    font-size: 0.88rem;
    color: var(--text-muted);
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.6;
}

.footer-middle {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

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

.footer-copy {
    font-size: 0.8rem;
    color: #444;
}

.footer-made {
    font-size: 0.8rem;
    color: #444;
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-heart {
    color: var(--red);
    animation: heartbeat 1.5s ease-in-out infinite;
    display: inline-block;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    15% { transform: scale(1.3); }
    30% { transform: scale(1); }
    45% { transform: scale(1.2); }
    60% { transform: scale(1); }
}

@media (max-width: 768px) {
    .footer-middle { flex-direction: column; gap: 20px; }
    .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
    .footer-socials { justify-content: center; }
}


/* ====================================================
   TEXT SCRAMBLE ON SECTION TITLES
   ==================================================== */
.scramble-text {
    display: inline-block;
}


/* ====================================================
   PARALLAX SUBTLE FLOAT ON HERO
   ==================================================== */
.hero {
    position: relative;
}

.hero-left .pill:hover {
    animation: none;
}




/* ====================================================
   SMOOTH SCROLLBAR STYLING
   ==================================================== */
body::-webkit-scrollbar {
    width: 6px;
}

body::-webkit-scrollbar-track {
    background: var(--bg);
}

body::-webkit-scrollbar-thumb {
    background: rgba(244, 63, 94, 0.3);
    border-radius: 10px;
}

body::-webkit-scrollbar-thumb:hover {
    background: rgba(244, 63, 94, 0.5);
}

body {
    scrollbar-width: thin;
    scrollbar-color: rgba(244, 63, 94, 0.3) var(--bg);
}


/* ====================================================
   IMAGE LAZY LOAD FADE-IN
   ==================================================== */
.project-img-wrap img {
    opacity: 0;
    animation: imgFadeIn 0.8s 0.2s ease forwards;
}

@keyframes imgFadeIn {
    to { opacity: 1; }
}

.project-img-wrap img[onerror] {
    opacity: 1;
}


/* ====================================================
   CONTACT FORM FLOATING LABELS
   ==================================================== */
.form-group {
    position: relative;
}

.form-group label {
    transition: all 0.3s;
}

.form-group input:focus ~ label,
.form-group textarea:focus ~ label {
    color: var(--red);
}


/* ====================================================
   TECH CARD RIPPLE ON CLICK
   ==================================================== */
.tech-logo-card {
    position: relative;
}

.tech-logo-card .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(244, 63, 94, 0.3);
    transform: scale(0);
    animation: rippleEffect 0.6s linear;
    pointer-events: none;
}

@keyframes rippleEffect {
    to { transform: scale(4); opacity: 0; }
}


/* ====================================================
   HERO SECTION PARALLAX DEPTH
   ==================================================== */
.hero .spline-container {
    transition: transform 0.1s ease-out;
}


/* ====================================================
   STAGGER ANIMATION FOR ABOUT HIGHLIGHTS
   ==================================================== */
.about-highlight-item:nth-child(1) { transition-delay: 0.1s; }
.about-highlight-item:nth-child(2) { transition-delay: 0.2s; }
.about-highlight-item:nth-child(3) { transition-delay: 0.3s; }


/* ====================================================
   TOP MARQUEE BANNER — FIXED UNDER HEADER
   ==================================================== */
.marquee-top-banner {
    margin-top: 64px;
    background: linear-gradient(90deg, rgba(244, 63, 94, 0.12), rgba(124, 58, 237, 0.08), rgba(244, 63, 94, 0.12));
    border-top: 1px solid rgba(244, 63, 94, 0.2);
    border-bottom: 1px solid rgba(124, 58, 237, 0.15);
    padding: 12px 0;
}

.marquee-top-banner .marquee-item {
    font-size: 0.85rem;
    letter-spacing: 6px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 700;
}

.marquee-top-banner .marquee-star {
    color: var(--red);
    font-size: 0.5rem;
}


/* ====================================================
   NEON MARQUEE — BEFORE PROJECTS
   ==================================================== */
.marquee-neon {
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.05), rgba(0, 0, 0, 0.9), rgba(124, 58, 237, 0.05));
    border-top: 1px solid rgba(244, 63, 94, 0.3);
    border-bottom: 1px solid rgba(244, 63, 94, 0.3);
    padding: 20px 0;
    position: relative;
    overflow: hidden;
}

.marquee-neon::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(244, 63, 94, 0.05) 25%,
        rgba(124, 58, 237, 0.05) 50%,
        rgba(244, 63, 94, 0.05) 75%,
        transparent 100%);
    animation: neonSweep 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes neonSweep {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.neon-text {
    color: rgba(244, 63, 94, 0.7) !important;
    text-shadow: 0 0 10px rgba(244, 63, 94, 0.3), 0 0 40px rgba(244, 63, 94, 0.1);
    font-size: 1.3rem !important;
    letter-spacing: 8px !important;
}

.neon-text:hover {
    color: #f43f5e !important;
    text-shadow: 0 0 20px rgba(244, 63, 94, 0.6), 0 0 60px rgba(244, 63, 94, 0.3), 0 0 100px rgba(244, 63, 94, 0.1);
}

.marquee-track-fast {
    animation-duration: 18s !important;
}

.marquee-neon .marquee-star {
    color: #7c3aed;
    font-size: 0.7rem;
    opacity: 0.8;
}


/* ====================================================
   GRADIENT MARQUEE — BEFORE FOOTER
   ==================================================== */
.marquee-gradient {
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.1), rgba(124, 58, 237, 0.1));
    border-top: 1px solid rgba(124, 58, 237, 0.2);
    border-bottom: 1px solid rgba(244, 63, 94, 0.2);
    padding: 16px 0;
}

.marquee-gradient .marquee-item {
    background: linear-gradient(135deg, #f43f5e, #c084fc, #f43f5e);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s linear infinite;
    font-weight: 900 !important;
    letter-spacing: 5px;
}

@keyframes gradientShift {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.marquee-gradient .marquee-star {
    color: #c084fc;
    animation: starSpin 3s linear infinite;
}

@keyframes starSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* ====================================================
   FEATURED PROJECT CARD
   ==================================================== */
.featured-card {
    position: relative;
}

.featured-card::before {
    content: 'FEATURED';
    position: absolute;
    top: 16px;
    right: -32px;
    background: linear-gradient(135deg, #f43f5e, #e11d48);
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 2px;
    padding: 6px 40px;
    transform: rotate(45deg);
    z-index: 10;
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.4);
}




/* ====================================================
   PROJECT CARD FLOATING PARTICLES
   ==================================================== */
.project-card .card-particles {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.project-card .card-particles span {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--red);
    border-radius: 50%;
    opacity: 0;
}

.project-card:hover .card-particles span {
    animation: floatParticle 2s ease-out forwards;
}

.project-card .card-particles span:nth-child(1) { left: 20%; top: 80%; animation-delay: 0s; }
.project-card .card-particles span:nth-child(2) { left: 50%; top: 70%; animation-delay: 0.2s; }
.project-card .card-particles span:nth-child(3) { left: 80%; top: 85%; animation-delay: 0.4s; }
.project-card .card-particles span:nth-child(4) { left: 35%; top: 90%; animation-delay: 0.1s; }
.project-card .card-particles span:nth-child(5) { left: 65%; top: 75%; animation-delay: 0.3s; }

@keyframes floatParticle {
    0% { opacity: 0; transform: translateY(0) scale(1); }
    30% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-120px) scale(0); }
}


/* ====================================================
   PROJECT NUMBER GLOW
   ==================================================== */
.project-card:hover .card-number {
    color: var(--red);
    text-shadow: 0 0 30px rgba(244, 63, 94, 0.4);
    transform: scale(1.1);
    transition: all 0.4s ease;
}


/* ====================================================
   ENHANCED PROJECT TITLE UNDERLINE ANIMATION
   ==================================================== */
.project-title {
    position: relative;
    display: inline-block;
}

.project-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--red), #c084fc);
    border-radius: 2px;
    transition: width 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.project-card:hover .project-title::after {
    width: 100%;
}


/* ====================================================
   TECH BADGE HOVER GLOW
   ==================================================== */
.project-tech-row .tech-badge {
    transition: all 0.3s ease;
}

.project-card:hover .tech-badge {
    border-color: rgba(244, 63, 94, 0.3);
    box-shadow: 0 0 8px rgba(244, 63, 94, 0.15);
}

.project-card:hover .tech-badge:hover {
    background: rgba(244, 63, 94, 0.15);
    color: var(--red);
    transform: translateY(-2px);
}


/* ====================================================
   LIVE STATUS DOT PULSE
   ==================================================== */
.card-status .status-dot {
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); }
    50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}




/* ====================================================
   GLOWING SECTION EYEBROW
   ==================================================== */
.section-eyebrow {
    position: relative;
}

.section-eyebrow::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, rgba(244, 63, 94, 0.15), transparent);
    border-radius: 50%;
    animation: eyebrowGlow 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes eyebrowGlow {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(2); opacity: 1; }
}


/* ====================================================
   FLOATING CODE LINES — PROJECT SECTION BG
   ==================================================== */
#projects {
    position: relative;
    overflow: hidden;
}

.floating-code-line {
    position: absolute;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: rgba(244, 63, 94, 0.06);
    white-space: nowrap;
    pointer-events: none;
    z-index: 0;
    animation: floatCodeLine 15s linear infinite;
    letter-spacing: 1px;
}

@keyframes floatCodeLine {
    0% { transform: translateX(-100px) translateY(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateX(100px) translateY(-60px); opacity: 0; }
}


/* ====================================================
   PROJECT CARD VISIBLE STATE (stagger)
   ==================================================== */
.project-card {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.project-card.card-visible {
    opacity: 1;
    transform: translateY(0);
}


/* ====================================================
   PROJECTS GRID Z-INDEX FIX
   ==================================================== */
.projects-grid {
    position: relative;
    z-index: 1;
}


/* ====================================================
   PROJECT ACTION BUTTONS ENHANCED
   ==================================================== */
.project-actions .p-btn {
    position: relative;
    overflow: hidden;
}

.project-actions .p-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

.project-actions .p-btn:hover::before {
    left: 100%;
}


/* ====================================================
   ANIMATED BACKGROUND BLOBS
   ==================================================== */
.bg-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: -2;
    opacity: 0.4;
}

.blob-1 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(244, 63, 94, 0.15), transparent);
    top: 10%; left: -5%;
    animation: blobFloat1 20s ease-in-out infinite;
}

.blob-2 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.12), transparent);
    top: 50%; right: -10%;
    animation: blobFloat2 25s ease-in-out infinite;
}

.blob-3 {
    width: 350px; height: 350px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1), transparent);
    bottom: 10%; left: 30%;
    animation: blobFloat3 18s ease-in-out infinite;
}

@keyframes blobFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(80px, 50px) scale(1.1); }
    66% { transform: translate(-30px, -40px) scale(0.9); }
}

@keyframes blobFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-60px, -30px) scale(1.15); }
    66% { transform: translate(40px, 60px) scale(0.85); }
}

@keyframes blobFloat3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(50px, -50px) scale(1.1); }
}


/* ====================================================
   HERO BIG TITLE + GRADIENT TEXT
   ==================================================== */
.hero-big-title {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 16px;
    letter-spacing: -2px;
}

.hero-line {
    display: block;
}

.hero-gradient-text {
    background: linear-gradient(135deg, #f43f5e, #c084fc, #3b82f6, #f43f5e);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: heroGradient 6s ease infinite;
}

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

.hero-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-label-dot {
    width: 8px; height: 8px;
    background: var(--red);
    border-radius: 50%;
    display: inline-block;
    animation: labelDotPulse 2s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(244, 63, 94, 0.6);
}

@keyframes labelDotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.7); }
}


/* ====================================================
   SERVICES / WHAT I DO SECTION
   ==================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 48px;
}

.service-card {
    background: linear-gradient(165deg, rgba(20, 25, 45, 0.9), rgba(10, 12, 28, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 36px 28px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--red), #c084fc);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: rgba(244, 63, 94, 0.2);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 30px rgba(244, 63, 94, 0.05);
}

.service-icon-wrap {
    position: relative;
    width: 60px; height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: var(--red);
    background: rgba(244, 63, 94, 0.08);
    border-radius: 16px;
    border: 1px solid rgba(244, 63, 94, 0.15);
}

.service-icon-glow {
    position: absolute;
    width: 100%; height: 100%;
    background: radial-gradient(circle, rgba(244, 63, 94, 0.2), transparent);
    border-radius: 16px;
    opacity: 0;
    transition: opacity 0.4s;
}

.service-card:hover .service-icon-glow {
    opacity: 1;
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

.service-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text);
}

.service-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 16px;
}

.service-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.service-tags span {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--red);
    background: rgba(244, 63, 94, 0.08);
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(244, 63, 94, 0.15);
    letter-spacing: 0.5px;
}

/* Service card number watermark */
.service-card:nth-child(1)::after { content: '01'; }
.service-card:nth-child(2)::after { content: '02'; }
.service-card:nth-child(3)::after { content: '03'; }
.service-card:nth-child(4)::after { content: '04'; }

.service-card::after {
    position: absolute;
    bottom: 12px; right: 16px;
    font-size: 3.5rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.02);
    pointer-events: none;
    line-height: 1;
}

.service-card:hover::after {
    color: rgba(244, 63, 94, 0.06);
    transition: color 0.4s;
}


/* ====================================================
   FUN FACTS TICKER BAR
   ==================================================== */
.fun-facts-bar {
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.06), rgba(124, 58, 237, 0.06));
    border-top: 1px solid rgba(244, 63, 94, 0.1);
    border-bottom: 1px solid rgba(124, 58, 237, 0.1);
    padding: 20px 0;
    overflow: hidden;
}

.fun-facts-track {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.fun-fact {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.fun-fact i {
    color: var(--red);
    font-size: 1.1rem;
}

.fun-fact-num {
    color: var(--text);
    font-weight: 800;
    font-size: 1.1rem;
}


/* ====================================================
   EXPERIENCE TIMELINE
   ==================================================== */
.timeline-section {
    background: var(--bg-dark);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 48px auto 0;
    padding: 20px 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--red), rgba(244, 63, 94, 0.1));
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    width: 45%;
    margin-bottom: 40px;
}

.timeline-item.timeline-right {
    margin-left: auto;
}

.timeline-dot {
    position: absolute;
    width: 44px; height: 44px;
    background: var(--bg-dark);
    border: 2px solid var(--red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--red);
    font-size: 0.85rem;
    z-index: 2;
    top: 0;
    transition: all 0.3s;
}

.timeline-item .timeline-dot {
    right: -66px;
}

.timeline-item.timeline-right .timeline-dot {
    left: -66px;
    right: auto;
}

.timeline-item:hover .timeline-dot {
    background: var(--red);
    color: white;
    box-shadow: 0 0 20px rgba(244, 63, 94, 0.4);
    transform: scale(1.1);
}

.timeline-content {
    background: linear-gradient(165deg, rgba(20, 25, 45, 0.9), rgba(10, 12, 28, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s;
}

.timeline-item:hover .timeline-content {
    border-color: rgba(244, 63, 94, 0.2);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(-4px);
}

.timeline-date {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--red);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: inline-block;
    background: rgba(244, 63, 94, 0.08);
    padding: 4px 12px;
    border-radius: 20px;
}

.timeline-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.timeline-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 12px;
}

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

.timeline-tags span {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Timeline mobile */
@media (max-width: 768px) {
    .timeline-line {
        left: 22px;
    }
    .timeline-item,
    .timeline-item.timeline-right {
        width: calc(100% - 60px);
        margin-left: 50px;
    }
    .timeline-item .timeline-dot,
    .timeline-item.timeline-right .timeline-dot {
        left: -50px;
        right: auto;
    }
}


/* ====================================================
   TOOLS ICON MARQUEE
   ==================================================== */
.marquee-tools {
    background: rgba(15, 23, 42, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding: 16px 0;
}

.marquee-track-slow {
    animation-duration: 35s !important;
}

.marquee-tool {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.25);
    padding: 8px 20px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 30px;
    transition: all 0.3s;
    white-space: nowrap;
}

.marquee-tool i {
    font-size: 1rem;
    color: rgba(244, 63, 94, 0.4);
}

.marquee-tool:hover {
    color: var(--text);
    border-color: rgba(244, 63, 94, 0.3);
    background: rgba(244, 63, 94, 0.05);
}

.marquee-tool:hover i {
    color: var(--red);
}


/* ====================================================
   CONTACT SECTION GLOW BACKGROUND
   ==================================================== */
#contact {
    position: relative;
}

#contact::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(244, 63, 94, 0.04), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: contactGlow 6s ease-in-out infinite;
}

@keyframes contactGlow {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}


/* ====================================================
   CONTACT FORM INPUT FOCUS GLOW
   ==================================================== */
.contact-form input:focus,
.contact-form textarea:focus {
    box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.1), 0 4px 20px rgba(244, 63, 94, 0.05);
}


/* ====================================================
   ENHANCED SCROLL INDICATOR
   ==================================================== */
.scroll-indicator span {
    animation: scrollText 2s ease-in-out infinite;
}

@keyframes scrollText {
    0%, 100% { opacity: 0.5; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(4px); }
}


/* ====================================================
   SKILL PILLS GLOW ON HOVER
   ==================================================== */
.skill-pills .pill:hover {
    box-shadow: 0 0 15px rgba(244, 63, 94, 0.2), 0 0 30px rgba(244, 63, 94, 0.05);
    border-color: rgba(244, 63, 94, 0.4) !important;
}


/* ====================================================
   HERO SOCIALS HOVER ANIMATION
   ==================================================== */
.hero-socials a {
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.hero-socials a:hover {
    transform: translateY(-4px) scale(1.15);
    color: var(--red);
    text-shadow: 0 0 15px rgba(244, 63, 94, 0.5);
}


/* ====================================================
   TECH LOGO CARD HOVER ENHANCEMENT
   ==================================================== */
.tech-logo-card:hover {
    box-shadow: 0 0 25px rgba(244, 63, 94, 0.1), 0 8px 30px rgba(0, 0, 0, 0.3);
}

.tech-logo-card:hover i {
    filter: drop-shadow(0 0 8px var(--icon-color, var(--red)));
}


/* ====================================================
   FOOTER SOCIAL ICONS ENHANCED HOVER
   ==================================================== */
.footer-socials a {
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.footer-socials a:hover {
    transform: translateY(-4px) rotate(5deg);
    box-shadow: 0 8px 25px rgba(244, 63, 94, 0.3);
}


/* ====================================================
   SERVICES MOBILE
   ==================================================== */
@media (max-width: 640px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
    .fun-facts-track {
        justify-content: center;
    }
}


/* Responsive refinements */
.project-category { color: var(--red); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 8px; }
.project-tech-row { margin-bottom: 4px; }
.card-btn-github { color: var(--text); background: rgba(255,255,255,.06); border: 1px solid var(--border); }
.card-btn-github:hover { border-color: var(--red); }
[hidden] { display: none !important; }
.projects-grid > *, .about-grid > *, .contact-grid > *, .services-grid > * { min-width: 0; }
.project-desc { display: block; overflow: visible; }
.project-img-wrap { height: auto; aspect-ratio: 16 / 9; }
.project-img-wrap img { height: 100%; }
@media (max-width: 768px) {
    .section { padding: 64px 20px; }
    .section-inner { padding: 0; }
    .hero { min-height: auto; padding: 110px 20px 75px; }
    .hero-big-title { font-size: clamp(2rem, 8vw, 3.4rem); letter-spacing: -.04em; overflow-wrap: anywhere; }
    .nav-pill { right: 0; width: min(320px, 100%); height: calc(100dvh - 64px); transform: translateX(100%); visibility: hidden; overflow-y: auto; justify-content: flex-start; padding: 32px 20px; transition: transform .35s ease, visibility .35s; }
    .nav-pill.open { transform: translateX(0); visibility: visible; }
    .nav-link { width: 100%; min-height: 48px; justify-content: center; }
    .hamburger { min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
    .about-stats { gap: 10px; }
    .stat-box { flex: 1 1 110px; padding: 16px 10px; }
    .dev-illustration-wrap { width: min(100%, 280px); }
    .dev-illustration { width: 100%; height: auto; }
    .badge-1 { left: 0; } .badge-2 { right: 0; }
    .projects-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .contact-val { overflow-wrap: anywhere; }
    .scroll-indicator { display: none; }
    .footer-socials a { min-width: 44px; min-height: 44px; }
    .floating-code-line { display: none; }
}
@media (max-width: 480px) {
    .section { padding: 56px 16px; }
    .hero { padding-inline: 16px; }
    .hero-cta a { min-height: 44px; }
    .project-body { padding: 20px; }
    .card-actions { flex-wrap: wrap; }
    .card-btn { min-height: 44px; }
    .timeline-item, .timeline-item.timeline-right { width: calc(100% - 48px); margin-left: 48px; }
    .timeline-item .timeline-dot, .timeline-item.timeline-right .timeline-dot { left: -48px; }
    .timeline-content { padding: 18px; }
}
@media (hover: none), (prefers-reduced-motion: reduce) {
    .project-card:hover, .timeline-item:hover .timeline-content { transform: none; }
    .tech-logo-card { animation: none; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Keep decorative blobs inside the viewport. */
.bg-blob-container { position: fixed; inset: 0; overflow: clip; pointer-events: none; z-index: -2; }

/* Local technology logos match the existing icon sizing and hover treatment. */
.tech-logo-card .tech-logo { width: 2.2rem; height: 2.2rem; object-fit: contain; transition: transform .3s, filter .3s; }
.tech-logo-card:hover .tech-logo { transform: scale(1.15); filter: drop-shadow(0 0 8px var(--icon-color)); }
@media (max-width: 768px) { .tech-logo-card .tech-logo { width: 1.8rem; height: 1.8rem; } }
@media (max-width: 480px) { .tech-logo-card .tech-logo { width: 1.5rem; height: 1.5rem; } }

/* Phone layout: keep content readable and contained without page-level clipping. */
@media (max-width: 768px) {
    .nav-container { padding-inline: 18px; }
    .nav-pill {
        top: 64px; right: 0; left: 0; width: 100%; height: auto;
        max-height: calc(100dvh - 64px); padding: 12px 18px 22px;
        border-left: 0; border-bottom: 1px solid var(--border);
        transform: translateY(-8px); opacity: 0; pointer-events: none;
        transition: opacity .2s ease, transform .2s ease, visibility .2s;
    }
    .nav-pill.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
    .nav-link { justify-content: flex-start; padding: 12px 16px; }
    .hero { padding: 106px 20px 56px; }
    .hero-label { justify-content: center; font-size: .7rem; line-height: 1.5; letter-spacing: .12em; }
    .hero-label-dot { flex: 0 0 8px; }
    .hero-big-title { font-size: clamp(2rem, 8vw, 3.4rem); overflow-wrap: normal; }
    .hero-desc { font-size: 1rem; line-height: 1.7; }
    .skill-pills { gap: 8px; margin-bottom: 24px; }
    .pill { padding: 6px 12px; font-size: .8rem; }
    .hero-cta { gap: 10px; margin-bottom: 24px; }
    .hero-cta a { min-height: 46px; }
    .hero-socials { margin-bottom: 20px; }
    .section { padding: 56px 20px; scroll-margin-top: 64px; }
    .section-title { font-size: clamp(1.8rem, 7vw, 2.5rem); margin-bottom: 28px; }
    .about-text p { font-size: 1rem; line-height: 1.7; }
    .about-grid { gap: 24px; }
    .about-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 24px; }
    .stat-box { min-width: 0; padding: 14px 5px; }
    .stat-lbl { font-size: .68rem; overflow-wrap: anywhere; }
    .services-grid { margin-top: 24px; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
    .service-card { padding: 22px; }
    .tech-logo-grid { gap: 26px; }
    .skill-group-label { margin-bottom: -12px; }
    .tech-logo-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(78px, 1fr)); gap: 10px; }
    .tech-logo-card { width: 100%; height: auto; min-height: 88px; padding: 10px 4px; gap: 8px; }
    .tech-logo-card span { font-size: .7rem; line-height: 1.2; overflow-wrap: anywhere; }
    .contact-form { padding: 22px; gap: 18px; }
    .form-group input, .form-group textarea { width: 100%; min-width: 0; }
    .contact-item > div:last-child { min-width: 0; }
    .timeline { margin-top: 24px; }
    .project-body { padding: 22px; }
    .project-img-wrap { aspect-ratio: 16 / 9; }
    .project-card .card-actions { flex-wrap: wrap; }
    .card-btn { min-height: 44px; }
    .modal-overlay { padding: 12px; }
    .modal-card { max-height: calc(100dvh - 24px); }
    .modal-body { padding: 20px; }
    [data-aos] { opacity: 1 !important; transform: none !important; }
}
@media (max-width: 360px) {
    .hero { padding-inline: 16px; }
    .hero-cta a { flex: 1 1 100%; justify-content: center; }
    .section { padding-inline: 16px; }
    .tech-logo-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .contact-form { padding: 18px; }
}

/* Confine decorative glows to their sections and let form fields shrink. */
#contact::after { width: min(600px, 100%); height: auto; aspect-ratio: 1; animation: none; }
.dev-glow-ring { width: min(320px, 100%); height: auto; aspect-ratio: 1; animation: none; }
.form-row > *, .form-group input, .form-group textarea { min-width: 0; }
@media (max-width: 1200px) { .badge-1 { left: 0; } .badge-2 { right: 0; } }

/* Show the complete LifeOS screenshot without cropping. */
.lifeos-card .project-img-wrap { background: #f5f6f2; }
.lifeos-card .project-img-wrap img { object-fit: contain; object-position: center; }
.lifeos-card:hover .project-img-wrap img { transform: scale(1.02); }
.lifeos-subtitle { color: var(--text-light); font-size: .86rem; font-weight: 600; line-height: 1.5; margin-bottom: 10px; }
.lifeos-card .card-btn { min-height: 44px; }

/* Avoid expensive decorative effects on touch devices. */
@media (hover: none), (prefers-reduced-motion: reduce) {
    #cursorCanvas, #spotlightCanvas { display: none; }
    .bg-blob { animation: none; filter: blur(50px); }
}

/* Keep the full monitoring dashboard visible inside the portfolio thumbnail. */
.sentinel-card .project-img-wrap { background: #101923; }
.sentinel-card .project-img-wrap img { object-fit: contain; }
.sentinel-card .project-measurement { color: var(--text-light); font-size: .82rem; line-height: 1.6; margin-bottom: 14px; }
.sentinel-card .project-measurement strong { color: var(--text); }
.sentinel-card .card-btn { min-height: 44px; }

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .sentinel-card:hover { transform: translateY(-5px); }
    .sentinel-card:hover .project-img-wrap img { transform: scale(1.02); }
}

@media (hover: none), (prefers-reduced-motion: reduce) {
    .sentinel-card:hover .project-img-wrap img { transform: none; }
}
