:root {
    --accent-primary: #6366f1;
    --accent-secondary: #22d3ee;
    --gradient-brand: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --bg-light: #ffffff;
    --text-main: #1a1a1a;
    --text-muted: #666666;
}

html {
    scrollbar-gutter: stable;
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ── Loading Screen ── */
#loading-screen {
    position: fixed;
    inset: 0;
    background: #0a0a0f;
    z-index: 999999; /* Increased z-index */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    pointer-events: all;
}

.reveal {
    opacity: 0;
    visibility: hidden;
    will-change: transform, opacity;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.loading-name {
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.04em;
    opacity: 0;
    transform: translateY(30px);
}

.loading-bar-wrapper {
    width: 200px;
    height: 2px;
    background: rgba(255,255,255,0.1);
    border-radius: 99px;
    overflow: hidden;
    margin-top: 0.5rem;
}

#loading-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #6366f1, #a78bfa);
    border-radius: 99px;
}

.loading-counter {
    font-size: 0.7rem;
    font-weight: 700;
    color: rgba(255,255,255,0.3);
    letter-spacing: 0.2em;
}

.container {
    width: 100%;
    padding: 0 5%;
    margin: 0;
}

section {
    padding: 140px 0; /* More breathing room */
    margin: 0;
    width: 100%;
    position: relative;
    scroll-margin-top: 0;
}

/* Typography */
.huge-text {
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.04em;
    padding-bottom: 0.4em;
    display: block;
    overflow: visible;
}

/* Ensure containers don't clip descenders */
.reveal, .hero, .journey-content, header {
    overflow: visible !important;
}

.typewriter-cursor {
    display: inline-block;
    color: var(--accent-primary);
    font-weight: 300;
    animation: blink-cursor 0.7s step-end infinite;
    margin-left: 2px;
}

@keyframes blink-cursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.gradient-text {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    display: inline-block;
}

/* Navigation */
nav {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1400px;
    margin: 0;
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 99px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    visibility: visible !important;
}

/* Scrolled state refinement */
nav.scrolled {
    padding: 0.6rem 2rem;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.nav-logo {
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    font-size: 1.2rem;
    letter-spacing: -0.05em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--accent-primary);
    animation: pulse-glow 2s infinite;
}

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

.nav-links {
    display: flex;
    gap: 2.5rem;
    margin-left: auto;
    margin-right: 1.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
    padding: 0.5rem 0;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.nav-links a:hover {
    letter-spacing: 0.2em;
    color: var(--accent-primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 10;
    background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.03) 0%, transparent 70%);
}

.hero-subheader {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.social-icons {
    display: flex;
    gap: 2rem;
    margin-top: 3rem;
}

.social-icons a {
    display: block;
    transition: transform 0.3s ease, color 0.3s ease;
    color: var(--text-muted);
}

.social-icons img, .social-svg {
    width: 24px;
    height: 24px;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    transform: translateY(-5px);
    color: var(--accent-primary);
}

.social-icons a:hover img,
.social-icons a:hover .social-svg {
    /* color change handled via parent's color property */
}

/* Scroll Indicator — Mouse + Rotating Ring */
.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    right: 4rem;
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    animation: rotate-infinite 12s linear infinite;
}

@keyframes rotate-infinite {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.scroll-mouse {
    width: 22px;
    height: 34px;
    border: 2.5px solid #6366f1;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    padding-top: 5px;
    position: relative;
    z-index: 2;
}

.scroll-wheel {
    width: 3px;
    height: 7px;
    background: #6366f1;
    border-radius: 2px;
    animation: wheel-scroll 1.6s ease-in-out infinite;
}

@keyframes wheel-scroll {
    0%   { transform: translateY(0);    opacity: 1; }
    60%  { transform: translateY(8px);  opacity: 0; }
    61%  { transform: translateY(0);    opacity: 0; }
    100% { transform: translateY(0);    opacity: 1; }
}

/* Glassmorphism */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
}

.horizontal-scroll-section {
    position: relative;
    background: #fafafa;
    padding: 0 !important; /* Eliminate excessive top/bottom whitespace */
}

.sticky-wrapper {
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.progress-wrapper {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    pointer-events: none;
    opacity: 0;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(8px);
    padding: 0.75rem 2rem;
    border-radius: 99px;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.progress-label {
    font-size: 0.6rem;
    font-weight: 800;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.25em;
}
.progress-track {
    width: 200px;
    height: 3px;
    background: #e5e7eb;
    border-radius: 99px;
    overflow: hidden;
}
#projectProgress {
    height: 100%;
    width: 0;
    background: var(--accent-primary);
    border-radius: 99px;
}

/* Fix for horizontal container clipping on some browsers */
.horizontal-container {
    display: flex;
    padding-left: 2vw;
    padding-right: 5vw;
    gap: 0;
    align-items: center;
    will-change: transform;
    overflow: visible !important;
}

.project-slide {
    flex: 0 0 70vw; /* Reduced from 85vw */
    height: 70vh; /* Reduced from 75vh */
    border-radius: 40px;
    padding: 4rem 5rem; /* Slightly tighter padding */
    margin: 0 2vw;
    display: grid;
    grid-template-columns: 1fr 1fr; /* Equal columns for better balance at smaller width */
    gap: 4rem;
    position: relative;
    color: var(--text-main);
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.03);
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.project-slide > * {
    min-width: 0;
}

.project-slide h3 {
    font-size: clamp(2.5rem, 6vw, 5.5rem);
    font-weight: 800;
    line-height: 0.95;
    color: var(--text-main);
    letter-spacing: -0.03em;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Extend gradient paint box so descenders (y, g) aren't clipped by the tight line-height */
.project-slide h3 .gradient-text {
    padding-bottom: 0.18em;
    margin-bottom: -0.18em;
}

.project-slide:hover h3 {
    letter-spacing: -0.01em;
    transform: translateX(10px);
}

.project-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
}

.project-meta {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.project-description {
    font-size: 1.15rem; /* Slightly smaller for better fit */
    color: #444;
    line-height: 1.5;
    font-weight: 400;
}

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

.tech-tag {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: #f8fafc;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #475569;
    position: relative;
    overflow: hidden;
}

.tech-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    transform: skewX(-25deg);
    transition: none;
    pointer-events: none;
}

.tech-tag:hover::before {
    left: 150%;
    transition: all 0.8s ease;
}

.project-metric {
    padding-top: 2rem;
    border-top: 1px solid #f1f5f9;
}

.project-metric-val {
    font-size: 2.5rem; /* Slightly smaller */
    font-weight: 900;
    color: var(--text-main);
}

.project-metric-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ── Career Section Redesign ── */
.career-section {
    padding: 140px 0 0;
    background: #fff;
}

.career-header {
    margin-bottom: 4rem;
    padding-top: 2rem; /* Fix heading clipping */
}

.career-eyebrow {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.3em;
    margin-bottom: 1.25rem;
}

.career-heading {
    font-size: clamp(3.5rem, 8vw, 6.5rem);
    font-weight: 950;
    letter-spacing: -0.05em;
    line-height: 0.9;
}

.career-list {
    display: flex;
    flex-direction: column;
    position: relative;
    padding-left: 50px; /* Better left balance */
}

.timeline-line {
    position: absolute;
    left: 8px; /* Perfectly aligned with nodes */
    top: 0;
    width: 2px;
    height: 0;
    background: linear-gradient(to bottom, 
        rgba(99, 102, 241, 0), 
        rgba(99, 102, 241, 1) 10%, 
        rgba(34, 211, 238, 1) 90%, 
        rgba(34, 211, 238, 0)
    );
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
    z-index: 1;
}

.career-node {
    position: absolute;
    left: -46px; /* Positioned exactly on the line */
    top: 3.5rem; /* Aligned with Role title */
    width: 10px;
    height: 10px;
    background: #fff;
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 10px var(--accent-primary);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.career-item {
    display: grid;
    grid-template-columns: 200px 1.2fr 1.5fr; /* Balanced distribution */
    gap: 4rem;
    padding: 3rem 0; /* Tighter vertical spacing */
    position: relative;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: default;
    z-index: 2;
}

.career-item > * {
    min-width: 0;
}

.career-item {
    overflow-x: hidden;
    border-bottom: 1px solid rgba(0,0,0,0.07);
}

.career-item:hover {
    padding-left: 2rem;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.03) 0%, transparent 100%);
}

.career-item:hover .career-num {
    opacity: 1;
    transform: scale(1.1);
    text-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

.career-item:hover .career-role {
    transform: translateX(10px);
    color: var(--text-main);
}

.career-num {
    font-size: 0.75rem;
    font-weight: 900;
    color: var(--accent-primary);
    letter-spacing: 0.1em;
    padding-top: 0.5rem;
    opacity: 0.5;
    transition: all 0.4s ease;
}

.career-period {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.75rem;
}

.career-role {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.career-company {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.career-desc {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: 1.5rem;
}

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

.career-tag {
    display: inline-block;
    padding: 0.35rem 1rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 99px;
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.04);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.career-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transform: skewX(-25deg);
    transition: none;
    pointer-events: none;
}

.career-tag:hover::before {
    left: 150%;
    transition: all 0.8s ease;
}

.career-tag:hover {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
}

.career-item--edu .career-num {
    color: #8b5cf6;
}

.career-item--edu .career-period {
    color: #8b5cf6;
}



/* ── Skills Section — Dark Premium Redesign ── */
.skills-section {
    padding: 100px 0;
    background: #0a0a0f;
    color: #fff;
    overflow: hidden;
}

.skills-header {
    margin-bottom: 1.5rem;
}

.skills-eyebrow {
    font-size: 0.7rem;
    font-weight: 800;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    margin-bottom: 1rem;
}

.skills-heading {
    font-size: clamp(3rem, 6vw, 5.5rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1;
    color: #fff;
}

.skills-heading .gradient-text {
    background: linear-gradient(135deg, #6366f1, #a78bfa, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Category rows */
.skills-grid {
    display: flex;
    flex-direction: column;
}

.skill-group {
    display: grid;
    grid-template-columns: 48px 200px 1fr;
    gap: 2.5rem;
    padding: 2.25rem 0;
    border-top: 1px solid rgba(255,255,255,0.06);
    align-items: center;
    position: relative;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.skill-group > * {
    min-width: 0;
}

.skill-group:last-child {
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.skill-group:hover {
    background: linear-gradient(90deg, rgba(255,255,255,0.02) 0%, transparent 100%);
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    border-radius: 20px;
}

.skill-group::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(400px circle at var(--mouse-x) var(--mouse-y), rgba(255,255,255,0.03), transparent 40%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
    z-index: 1;
}

.skill-group:hover::after {
    opacity: 1;
}

.skill-group:hover .skill-group-num {
    color: var(--pill-color, #6366f1);
    text-shadow: 0 0 15px var(--pill-color, #6366f1);
}

.skill-group:hover .skill-group-label {
    color: #fff;
    transform: translateX(10px);
}

/* Hover interaction focused on individual chips (see .skill-pill:hover) */

.skill-group-num {
    font-size: 0.65rem;
    font-weight: 900;
    color: rgba(255,255,255,0.2);
    letter-spacing: 0.1em;
}

.skill-group-label {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255,255,255,0.4);
    margin-bottom: 0;
    transition: all 0.4s ease;
}

.skill-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Color-coded pills per category */
.skill-group:nth-child(1) .skill-pill { --pill-color: #6366f1; }
.skill-group:nth-child(2) .skill-pill { --pill-color: #06b6d4; }
.skill-group:nth-child(3) .skill-pill { --pill-color: #10b981; }
.skill-group:nth-child(4) .skill-pill { --pill-color: #f59e0b; }
.skill-group:nth-child(5) .skill-pill { --pill-color: #ec4899; }
.skill-group:nth-child(6) .skill-pill { --pill-color: #8b5cf6; }

.skill-pill {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: default;
    position: relative;
    overflow: hidden;
}

.skill-pill:hover {
    background: var(--pill-color, #6366f1);
    color: #fff;
    border-color: var(--pill-color, #6366f1);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px -5px var(--pill-color, #6366f1);
    letter-spacing: 0.1em;
}



.skill-pill::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: skewX(-25deg);
    transition: none;
}

.skill-pill:hover::before {
    left: 150%;
    transition: all 0.8s ease;
}



/* Expertise Grid */
.expertise-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.expertise-grid > * {
    min-width: 0;
}

/* Per-box accent colors */
.expertise-grid .expertise-box:nth-child(1) { --exp-color: #6366f1; --exp-tint: rgba(99, 102, 241, 0.09);  --exp-glow: rgba(99, 102, 241, 0.18); }
.expertise-grid .expertise-box:nth-child(2) { --exp-color: #06b6d4; --exp-tint: rgba(6, 182, 212, 0.09);   --exp-glow: rgba(6, 182, 212, 0.18); }
.expertise-grid .expertise-box:nth-child(3) { --exp-color: #a855f7; --exp-tint: rgba(168, 85, 247, 0.09);  --exp-glow: rgba(168, 85, 247, 0.18); }
.expertise-grid .expertise-box:nth-child(4) { --exp-color: #f97316; --exp-tint: rgba(249, 115, 22, 0.09);  --exp-glow: rgba(249, 115, 22, 0.18); }

.expertise-box {
    position: relative;
    padding: 2rem;
    background: #fafafa;
    border-radius: 28px;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    border: 1px solid rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

/* Accent edge line, revealed on hover */
.expertise-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--exp-color, #6366f1), transparent 70%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.expertise-box:hover::before {
    transform: scaleX(1);
}

/* Mouse-follow tinted spotlight (driven by JS --mouse-x/y like .skill-group) */
.expertise-box::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(300px circle at var(--mouse-x) var(--mouse-y), var(--exp-tint, rgba(99, 102, 241, 0.08)), transparent 55%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.expertise-box:hover::after {
    opacity: 1;
}

.expertise-box:hover {
    background: #ffffff;
    border-color: var(--exp-color, var(--accent-primary));
    transform: translateY(-8px);
    box-shadow: 0 30px 60px -18px var(--exp-glow, rgba(0, 0, 0, 0.08)), 0 8px 25px rgba(0, 0, 0, 0.04);
}

.exp-num {
    position: absolute;
    top: 1.6rem;
    right: 1.8rem;
    font-size: 0.7rem;
    font-weight: 900;
    color: rgba(0, 0, 0, 0.15);
    letter-spacing: 0.12em;
    transition: all 0.4s ease;
}

.expertise-box:hover .exp-num {
    color: var(--exp-color, #6366f1);
}

.exp-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--exp-tint, rgba(99, 102, 241, 0.09));
    color: var(--exp-color, #6366f1);
    margin-bottom: 1.5rem;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.exp-icon svg {
    width: 22px;
    height: 22px;
}

.expertise-box:hover .exp-icon {
    background: var(--exp-color, #6366f1);
    color: #fff;
    transform: scale(1.08) rotate(-5deg);
    box-shadow: 0 10px 25px -6px var(--exp-glow, rgba(99, 102, 241, 0.3));
}

.expertise-box h4 {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
}

.expertise-box p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.65;
}

body.dark-mode .exp-num {
    color: rgba(255, 255, 255, 0.18);
}

/* Premium Footer */
/* Consolidating Footer and Reveal in next chunks */

.footer-cta {
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -0.05em;
    margin-bottom: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
    padding-top: 6rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-link {
    display: block;
    font-size: 1.2rem;
    color: #888;
    text-decoration: none;
    margin-bottom: 1rem;
    transition: color 0.3s;
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #444;
}

/* Background Decoration */
.magic-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(150px); /* Increased blur for subtlety */
    z-index: -1;
    opacity: 0.03; /* Drastically reduced opacity */
    pointer-events: none;
    animation: float 25s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(100px, -50px); }
    66% { transform: translate(-50px, 100px); }
}

/* Reveal */

.btn-primary {
    display: inline-block;
    padding: 1.2rem 2.5rem;
    background: var(--gradient-brand);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.2);
    transition: all 0.3s ease;
}

/* Consolidating Responsive Stabilization */

/* ── Premium Cinematic Footer ── */
.footer {
    background: #000;
    padding: 60px 0 40px;
    position: relative;
    overflow: hidden;
    scroll-margin-top: 0;
}

.footer-form-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 40px;
    padding: 2rem;
    position: relative;
    z-index: 10;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.footer-form-card:hover {
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: 
        0 40px 100px rgba(0,0,0,0.6),
        0 0 50px rgba(99, 102, 241, 0.05);
}

.footer-form-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(255, 255, 255, 0.04), transparent 40%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
    z-index: 1;
}

.footer-form-card:hover::after {
    opacity: 1;
}

.footer-form-card input,
.footer-form-card textarea {
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.footer-form-card input::placeholder,
.footer-form-card textarea::placeholder {
    color: #444;
}

.footer-form-card input:focus,
.footer-form-card textarea:focus {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.1);
}

.footer-form-card label {
    display: block;
    margin-bottom: 0.5rem;
}

/* Button Refinement */
#submit-btn {
    position: relative;
    overflow: hidden;
}

#submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: skewX(-25deg);
    transition: none;
}

#submit-btn:hover::before {
    left: 150%;
    transition: all 0.8s ease;
}

/* ── Responsive Stabilization ── */

@media (max-width: 1200px) {
    .container {
        padding: 0 3rem;
    }
    
    .project-slide {
        flex: 0 0 80vw;
        padding: 4rem;
        gap: 3rem;
    }
}

@media (max-width: 1024px) {
    .career-item {
        grid-template-columns: 60px 1fr;
        gap: 2rem;
    }
    
    .career-right {
        grid-column: 2;
    }

    .skill-group {
        grid-template-columns: 48px 1fr;
        gap: 1.5rem;
    }
    
    .skill-pills {
        grid-column: 2;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    section {
        padding: 100px 0;
    }

    nav {
        padding: 1rem 1.5rem;
        width: calc(100% - 2rem);
    }

    .nav-links {
        display: none; /* Mobile menu would go here */
    }

    /* Hero — push content down from nav, not mid-screen */
    .hero {
        justify-content: flex-start;
        padding-top: 7rem;
        height: 100svh; /* excludes browser address bar so content fits in visible area */
    }

    /* Scroll indicator — pull out of absolute, flow at bottom of hero */
    .scroll-indicator {
        position: relative;
        bottom: auto;
        right: auto;
        align-self: flex-end;
        margin-top: auto;
        padding-bottom: 1rem;
        width: 70px;
        height: 70px;
    }

    .hero-subheader {
        font-size: 0.8rem;
        letter-spacing: 0.2em;
    }

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

    /* Work section — fix overlap: make intro panel full-screen width so card is hidden off-screen at start */
    .horizontal-container > div:first-child {
        width: 90vw !important;
        flex-shrink: 0;
        padding-left: 0 !important;
        padding-right: 2rem !important;
    }

    .horizontal-container > div:first-child h2 {
        font-size: 3rem !important;
        line-height: 1 !important;
    }

    .progress-wrapper {
        padding: 0.6rem 1.25rem;
        bottom: 1rem;
    }

    .progress-track {
        width: 140px;
    }

    .project-slide {
        flex: 0 0 90vw;
        height: auto;
        min-height: 80vh;
        grid-template-columns: 1fr;
        padding: 2.5rem 2rem;
        gap: 1.5rem;
        border-radius: 24px;
        margin: 0 !important;
    }

    .project-slide h3 {
        font-size: 2.2rem;
    }

    .project-metric-val {
        font-size: 2rem;
    }

    /* Career section — reduce top padding */
    .career-section {
        padding: 80px 0 0;
    }

    .career-item {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 2.5rem 0;
    }

    .career-num, .career-right {
        grid-column: 1;
    }

    /* Skills — reset to single-column stack on mobile */
    .skill-group {
        grid-template-columns: 1fr;
        gap: 0.6rem;
        padding: 1.5rem 0;
        align-items: start;
    }

    .skill-group:hover {
        padding-left: 0;
        margin-left: 0;
        margin-right: 0;
        padding-right: 0;
    }

    .skill-group-label {
        transform: none !important;
    }

    .skill-pills {
        grid-column: 1;
        margin-top: 0.25rem;
    }

    /* Social icons — bigger tap target */
    .social-icons a {
        padding: 0.75rem;
        margin: -0.75rem;
    }

    /* Mobile tap feedback */
    .mobile-link:active {
        background: rgba(99, 102, 241, 0.12);
        color: var(--accent-primary);
    }

    .skill-pill:active {
        opacity: 0.7;
        transform: scale(0.95);
    }

    .footer-submit-btn:active {
        transform: scale(0.97);
    }

    .footer-cta {
        font-size: 4rem;
    }

    .footer-form-card {
        padding: 2rem;
        border-radius: 32px;
    }
}

/* Remove Android blue tap highlight on all interactive elements */
a, button, .mobile-link, .skill-pill, .tech-tag, .hamburger {
    -webkit-tap-highlight-color: transparent;
}


@media (max-width: 480px) {
    .huge-text {
        font-size: 2.8rem;
    }

    .horizontal-container > div:first-child h2 {
        font-size: 2.5rem !important;
    }

    .project-slide {
        flex: 0 0 92vw;
    }
}

/* ── Edge / CDN-fallback layout ── */
/* These ensure core grids work if Tailwind CDN is slow or blocked.
   When Tailwind does load, its utility classes override these with equal or
   higher specificity (injected <style> tag comes after this <link>). */

#about .container {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

#about .container > .grid {
    display: grid;
    gap: 4rem;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    width: 100%;
    grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
    #about .container > .grid {
        grid-template-columns: 1fr 1fr;
    }
}

.footer .container > .grid {
    display: grid;
    gap: 4rem;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: start;
    grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
    .footer .container > .grid {
        grid-template-columns: 1fr 1.1fr;
        gap: 6rem;
    }
}

.footer-form-card .grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .footer-form-card .grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ── Open to Work Status Badge ── */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1.1rem;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 99px;
    font-size: 0.65rem;
    font-weight: 800;
    color: #10b981;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: 1.5rem;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    flex-shrink: 0;
    animation: pulse-status 2s ease-in-out infinite;
}

@keyframes pulse-status {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
    50% { box-shadow: 0 0 0 5px rgba(16, 185, 129, 0); }
}

/* ── Hamburger Button ── */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    transform-origin: center;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile Menu ── */
.mobile-menu {
    display: none;
    position: fixed;
    top: 5.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 2rem);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
    z-index: 999;
    padding: 1rem;
    flex-direction: column;
    gap: 0.25rem;
}

.mobile-menu.open {
    display: flex;
}

.mobile-link {
    display: block;
    padding: 0.85rem 1.25rem;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 14px;
    transition: all 0.25s ease;
}

.mobile-link:hover {
    background: rgba(99, 102, 241, 0.06);
    color: var(--accent-primary);
}

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

@media (min-width: 769px) {
    .hamburger {
        display: none !important;
    }
}

/* ── New Contact / Footer — Vibrant Gradient Dark ── */
.footer-new {
    background: linear-gradient(145deg, #0d0618 0%, #090a14 50%, #060d1c 100%);
    padding: 90px 0 48px;
    position: relative;
    overflow: hidden;
    scroll-margin-top: 0;
}

/* Aurora orb — left/top purple glow */
.footer-new::before {
    content: '';
    position: absolute;
    top: -15%;
    left: -8%;
    width: 60%;
    height: 80%;
    background: radial-gradient(ellipse, rgba(99, 102, 241, 0.22) 0%, rgba(168, 85, 247, 0.1) 40%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Aurora orb — right/bottom cyan glow */
.footer-new::after {
    content: '';
    position: absolute;
    bottom: -10%;
    right: -5%;
    width: 40%;
    height: 55%;
    background: radial-gradient(ellipse, rgba(34, 211, 238, 0.12) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
}

.footer-bg-dots {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 36px 36px;
    opacity: 0.6;
    pointer-events: none;
}

.footer-new-inner {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 4rem;
    align-items: center;
    padding-bottom: 2rem;
}

.footer-new-eyebrow {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4em;
    color: #a78bfa;
    margin-bottom: 0.75rem;
}

.footer-new-heading {
    font-size: clamp(2.2rem, 4vw, 3.6rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.2;
    color: #fff;
    margin-bottom: 1rem;
    overflow: visible;
    padding-bottom: 0.1em;
}

.footer-new-heading .gradient-text {
    background: linear-gradient(135deg, #6366f1 0%, #a78bfa 50%, #22d3ee 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-new-desc {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.7;
    max-width: 380px;
    margin-bottom: 1.5rem;
}

.footer-contact-list {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

/* Brand colors per contact icon: rest color / tinted bg / border / hover glow */
.footer-contact-item.email    { --fc-color: #ea4335; --fc-bg: rgba(234, 67, 53, 0.1);   --fc-border: rgba(234, 67, 53, 0.35);  --fc-glow: rgba(234, 67, 53, 0.35); }
.footer-contact-item.whatsapp { --fc-color: #25d366; --fc-bg: rgba(37, 211, 102, 0.1);  --fc-border: rgba(37, 211, 102, 0.35); --fc-glow: rgba(37, 211, 102, 0.35); }
.footer-contact-item.linkedin { --fc-color: #4e9ff0; --fc-bg: rgba(10, 102, 194, 0.16); --fc-border: rgba(78, 159, 240, 0.4);  --fc-glow: rgba(10, 102, 194, 0.45); }
.footer-contact-item.github   { --fc-color: #e8e8f5; --fc-bg: rgba(255, 255, 255, 0.07); --fc-border: rgba(255, 255, 255, 0.25); --fc-glow: rgba(255, 255, 255, 0.18); }
.footer-contact-item.resume   { --fc-color: #a78bfa; --fc-bg: rgba(139, 92, 246, 0.14); --fc-border: rgba(167, 139, 250, 0.4); --fc-glow: rgba(139, 92, 246, 0.45); }

.footer-contact-item {
    width: 46px;
    height: 46px;
    border: 1px solid var(--fc-border, rgba(255, 255, 255, 0.12));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fc-color, rgba(255, 255, 255, 0.55));
    background: var(--fc-bg, transparent);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    flex-shrink: 0;
}

.footer-contact-item:hover {
    background: var(--fc-color, #6366f1);
    border-color: var(--fc-color, #6366f1);
    color: #fff;
    transform: translateY(-4px) scale(1.06);
    box-shadow: 0 10px 25px var(--fc-glow, rgba(99, 102, 241, 0.3));
}

/* GitHub fills white — flip icon to dark for contrast */
.footer-contact-item.github:hover {
    color: #0a0a0f;
}

/* Form card (glass) */
.footer-form-new {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 1.75rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
    position: relative;
}

.footer-form-new::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 28px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.4), rgba(168, 85, 247, 0.2), rgba(34, 211, 238, 0.15));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.footer-form-new:hover::before { opacity: 1; }

.footer-form-new:hover {
    box-shadow: 0 0 80px rgba(99, 102, 241, 0.1), 0 0 160px rgba(168, 85, 247, 0.06);
}

/* Form */
.footer-form-new form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-new-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.form-new-field {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.form-new-field label {
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: rgba(255, 255, 255, 0.3);
}

.form-new-field input,
.form-new-field textarea {
    background: rgba(255, 255, 255, 0.04);
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    padding: 0.85rem 0;
    outline: none;
    transition: border-color 0.3s ease;
    width: 100%;
    text-align: center;
}

.form-new-field textarea { resize: none; line-height: 1.6; }

.form-new-field input::placeholder,
.form-new-field textarea::placeholder { color: rgba(255, 255, 255, 0.2); }

.form-new-field input:focus,
.form-new-field textarea:focus {
    border-bottom-color: #6366f1;
}

.footer-submit-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1.1rem 1.75rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    border-radius: 14px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}

.footer-submit-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #8b5cf6 0%, #22d3ee 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.footer-submit-btn:hover::after { opacity: 1; }

.footer-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.45), 0 0 60px rgba(139, 92, 246, 0.2);
}

.footer-submit-btn > * { position: relative; z-index: 1; }

.footer-btn-arrow {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.footer-submit-btn:hover .footer-btn-arrow { transform: translateX(6px); }

.footer-bottom-new {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: rgba(255, 255, 255, 0.25);
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom-right {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.footer-top-link {
    color: rgba(255, 255, 255, 0.25);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-top-link:hover { color: #a78bfa; }

@media (max-width: 1024px) {
    .footer-new-inner { gap: 3rem; }
}

@media (max-width: 768px) {
    .footer-new { padding: 100px 0 36px; }

    .footer-new-inner {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding-bottom: 3rem;
    }

    .footer-form-new { padding: 1.75rem; }

    .form-new-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-bottom-new {
        flex-direction: column;
        text-align: center;
    }

    .footer-bottom-right {
        flex-direction: column;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .footer-new-heading { font-size: 2.8rem; }
    .footer-form-new { padding: 1.5rem; border-radius: 20px; }
}

/* ── Custom Cursor Dot ── */
.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 7px;
    height: 7px;
    background: var(--accent-primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    will-change: left, top;
}

@media (hover: none), (pointer: coarse) {
    .cursor-dot { display: none; }
}

/* ── Active Nav Link ── */
.nav-links a.active {
    color: var(--accent-primary);
}

/* ── Theme Smooth Transitions ── */
body,
section,
nav,
.expertise-box,
.career-section,
.project-slide,
.mobile-menu,
.progress-wrapper {
    transition: background-color 0.4s ease,
                color 0.3s ease,
                border-color 0.3s ease;
}

/* ── Theme Toggle Button ── */
.theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid rgba(0, 0, 0, 0.12);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--text-main);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.theme-toggle svg { width: 16px; height: 16px; }

.icon-sun { display: none; }
.icon-moon { display: block; }

/* ── Dark Mode ── */
body.dark-mode {
    --bg-light: #111118;
    --text-main: #e8e8f5;
    --text-muted: #9090aa;
    background: #111118;
    color: #e8e8f5;
}

/* All sections get dark background */
body.dark-mode section { background: #111118; }

/* Nav */
body.dark-mode nav {
    background: rgba(17, 17, 24, 0.92);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

body.dark-mode nav.scrolled { background: rgba(17, 17, 24, 0.97); }

/* Mobile menu */
body.dark-mode .mobile-menu {
    background: rgba(17, 17, 24, 0.97);
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .mobile-link { color: #e8e8f5; }

/* Theme toggle in dark */
body.dark-mode .theme-toggle {
    border-color: rgba(255, 255, 255, 0.12);
    color: #e8e8f5;
}

body.dark-mode .icon-sun { display: block; }
body.dark-mode .icon-moon { display: none; }

/* All headings → light in dark mode */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4 { color: #e8e8f5; }

/* Keep gradient-text transparent so gradient shows through */
body.dark-mode .gradient-text {
    color: transparent !important;
    -webkit-text-fill-color: transparent;
}

/* Tailwind text-color class overrides */
body.dark-mode .text-gray-500,
body.dark-mode p.text-xl { color: rgba(200, 200, 225, 0.6) !important; }
body.dark-mode .text-gray-400 { color: rgba(200, 200, 225, 0.45) !important; }
body.dark-mode .text-black { color: #e8e8f5 !important; }
body.dark-mode .text-indigo-500 { color: #a78bfa !important; }
body.dark-mode .text-cyan-500 { color: #22d3ee !important; }
body.dark-mode .text-purple-500 { color: #c084fc !important; }
body.dark-mode .text-orange-500 { color: #fb923c !important; }

/* Icon box backgrounds (about section) */
body.dark-mode .bg-indigo-50 { background: rgba(99, 102, 241, 0.15) !important; }
body.dark-mode .bg-cyan-50 { background: rgba(34, 211, 238, 0.12) !important; }
body.dark-mode .bg-purple-50 { background: rgba(168, 85, 247, 0.12) !important; }
body.dark-mode .bg-orange-50 { background: rgba(249, 115, 22, 0.12) !important; }

/* Expertise boxes */
body.dark-mode .expertise-box {
    background: #1a1a28;
    border-color: rgba(255, 255, 255, 0.07);
}

body.dark-mode .expertise-box:hover {
    background: #1e1e32;
    border-color: rgba(99, 102, 241, 0.4);
}

/* Status badge */
body.dark-mode .status-badge { background: rgba(16, 185, 129, 0.12); }

/* Career */
body.dark-mode .career-section { background: #111118; }
body.dark-mode .career-node { background: #111118; }
body.dark-mode .career-item { border-bottom-color: rgba(255, 255, 255, 0.07); }

/* Work / Horizontal scroll */
body.dark-mode .horizontal-scroll-section { background: #0e0e18; }

body.dark-mode .project-slide {
    background: #1a1a28;
    border-color: rgba(255, 255, 255, 0.04);
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.55);
}

body.dark-mode .project-slide h3 { color: #e8e8f5; }
body.dark-mode .project-description { color: rgba(200, 200, 225, 0.65); }

body.dark-mode .tech-tag {
    background: rgba(255, 255, 255, 0.07);
    color: rgba(200, 200, 225, 0.75);
}

body.dark-mode .project-metric { border-top-color: rgba(255, 255, 255, 0.07); }
body.dark-mode .project-metric-val { color: #e8e8f5; }

/* Progress bar pill */
body.dark-mode .progress-wrapper {
    background: rgba(17, 17, 24, 0.92);
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .progress-label { color: rgba(255, 255, 255, 0.35); }
body.dark-mode .progress-track { background: rgba(255, 255, 255, 0.08); }

/* ── Responsive extras ── */
@media (max-width: 768px) {
    .theme-toggle { width: 32px; height: 32px; }
}

@media (max-width: 480px) {
    .huge-text { font-size: 2.4rem; }
    section { padding: 90px 0; }
}

/* ── Hero Actions (Resume CTA + Socials) ── */
.hero-actions {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.hero-actions .social-icons {
    margin-top: 0;
}

.resume-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.95rem 2rem;
    background: var(--gradient-brand);
    color: #fff;
    border-radius: 99px;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.25);
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}

.resume-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transform: skewX(-25deg);
    transition: none;
    pointer-events: none;
}

.resume-btn:hover::before {
    left: 150%;
    transition: all 0.8s ease;
}

.resume-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 35px rgba(99, 102, 241, 0.4);
}

.resume-btn svg {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.resume-btn:hover svg {
    transform: translateY(2px);
}

/* ── Certifications Section — Light Premium ── */
.certs-section {
    padding: 140px 0;
    background:
        radial-gradient(900px 500px at 85% 0%, rgba(99, 102, 241, 0.05), transparent 60%),
        radial-gradient(700px 450px at 0% 100%, rgba(34, 211, 238, 0.05), transparent 60%),
        #fafafa;
    overflow: hidden;
    position: relative;
}

.certs-header {
    margin-bottom: 4rem;
}

.certs-eyebrow {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.3em;
    margin-bottom: 1.25rem;
}

.certs-heading {
    font-size: clamp(2.6rem, 7vw, 5.5rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 0.95;
}

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

.certs-grid > * {
    min-width: 0;
}

/* Per-card brand colors: accent / spotlight tint / glow shadow */
.certs-grid .cert-card:nth-child(1) { --cert-color: #0f62fe; --cert-tint: rgba(15, 98, 254, 0.05);  --cert-glow: rgba(15, 98, 254, 0.16); }
.certs-grid .cert-card:nth-child(2) { --cert-color: #ff9d00; --cert-tint: rgba(255, 157, 0, 0.06);  --cert-glow: rgba(255, 157, 0, 0.18); }
.certs-grid .cert-card:nth-child(3) { --cert-color: #0f62fe; --cert-tint: rgba(15, 98, 254, 0.05);  --cert-glow: rgba(15, 98, 254, 0.16); }
.certs-grid .cert-card:nth-child(4) { --cert-color: #20beff; --cert-tint: rgba(32, 190, 255, 0.06); --cert-glow: rgba(32, 190, 255, 0.2); }
.certs-grid .cert-card:nth-child(5) { --cert-color: #0a0a23; --cert-tint: rgba(10, 10, 35, 0.04);   --cert-glow: rgba(10, 10, 35, 0.14); }

.cert-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 2.25rem 2rem;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 26px;
    color: var(--text-main);
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: hidden;
}

/* Mouse-follow brand-tinted spotlight (driven by JS --mouse-x/y like .skill-group) */
.cert-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(380px circle at var(--mouse-x) var(--mouse-y), var(--cert-tint, rgba(99, 102, 241, 0.05)), transparent 50%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.cert-card:hover::after {
    opacity: 1;
}

/* Brand-colored top edge line, revealed on hover */
.cert-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--cert-color, #6366f1), transparent 70%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

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

a.cert-card:hover {
    transform: translateY(-8px);
    border-color: var(--cert-color, #6366f1);
    box-shadow: 0 30px 60px -18px var(--cert-glow, rgba(99, 102, 241, 0.16)), 0 8px 25px rgba(0, 0, 0, 0.04);
}

.cert-num {
    position: absolute;
    top: 1.7rem;
    right: 1.9rem;
    font-size: 0.7rem;
    font-weight: 900;
    color: rgba(0, 0, 0, 0.14);
    letter-spacing: 0.12em;
    transition: all 0.4s ease;
}

.cert-card:hover .cert-num {
    color: var(--cert-color, #6366f1);
}

.cert-badge {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.07);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.cert-badge img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: block;
}

a.cert-card:hover .cert-badge {
    transform: scale(1.08) rotate(-4deg);
    box-shadow: 0 10px 25px -5px var(--cert-glow, rgba(0, 0, 0, 0.1));
    border-color: var(--cert-color, #6366f1);
}

.cert-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cert-name {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.3;
    color: var(--text-main);
}

.cert-meta {
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
}

.cert-link {
    margin-top: auto;
    padding-top: 1.1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.66rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--cert-color, var(--accent-primary));
}

.cert-link--static {
    color: rgba(0, 0, 0, 0.25);
}

.cert-link-arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}

a.cert-card:hover .cert-link-arrow {
    transform: translate(4px, -4px);
}

/* Certifications — dark mode */
body.dark-mode .certs-section {
    background:
        radial-gradient(900px 500px at 85% 0%, rgba(99, 102, 241, 0.08), transparent 60%),
        radial-gradient(700px 450px at 0% 100%, rgba(34, 211, 238, 0.06), transparent 60%),
        #111118;
}

body.dark-mode .cert-card {
    background: #1a1a28;
    border-color: rgba(255, 255, 255, 0.07);
    box-shadow: none;
}

body.dark-mode a.cert-card:hover {
    border-color: var(--cert-color, #6366f1);
    box-shadow: 0 30px 60px -18px rgba(0, 0, 0, 0.6), 0 0 35px -12px var(--cert-glow, rgba(99, 102, 241, 0.2));
}

body.dark-mode .cert-num {
    color: rgba(255, 255, 255, 0.15);
}

/* Logo tiles stay white in dark mode so brand marks remain visible */
body.dark-mode .cert-badge {
    background: #fff;
    border-color: rgba(255, 255, 255, 0.12);
}

body.dark-mode .cert-link {
    border-top-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .cert-link--static {
    color: rgba(255, 255, 255, 0.3);
}

/* freeCodeCamp navy is invisible on dark cards — brighten accent in dark mode */
body.dark-mode .certs-grid .cert-card:nth-child(5) {
    --cert-color: #a78bfa;
    --cert-glow: rgba(167, 139, 250, 0.25);
}

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

@media (max-width: 768px) {
    .certs-section {
        padding: 100px 0;
    }

    .certs-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .cert-card {
        padding: 1.75rem 1.5rem;
        border-radius: 22px;
    }

    .hero-actions {
        gap: 1.75rem;
        margin-top: 2.5rem;
    }

    .resume-btn {
        padding: 0.85rem 1.6rem;
        font-size: 0.72rem;
    }

    /* Typewriter fix: reserve space for the longest cycling word so the
       hero doesn't reflow and squash the scroll indicator on each cycle */
    .huge-text {
        min-height: 4.7em;
    }

    .scroll-indicator {
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .huge-text {
        min-height: 6.2em;
    }
}

