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

html {
    background: #0a0a0f;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

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

section[id] {
    scroll-margin-top: 1.5rem;
    /* keep off-screen slide-in elements from widening the page on phones */
    overflow-x: clip;
}

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

:root {
    --primary: #8b5cf6;
    --secondary: #a78bfa;
    --accent: #06b6d4;
    --success: #34d399;
    --warning: #fbbf24;
    --error: #f87171;
    --dark: #0a0a0f;
    --light: #1a1a2e;
    --glass: rgba(20, 20, 35, 0.7);
    --glass-border: rgba(139, 92, 246, 0.2);
    --text-primary: #f0f0f5;
    --text-secondary: rgba(240, 240, 245, 0.8);
    --text-muted: rgba(240, 240, 245, 0.5);
    --timeline-line: rgba(139, 92, 246, 0.2);
    --timeline-current: #34d399;
}

body {
    font-family: 'Inter', sans-serif;
    background: radial-gradient(ellipse at top, #1a1a2e 0%, #0a0a0f 50%, #000000 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    overflow-x: hidden;
    overflow-x: clip;
    position: relative;
}

body.no-scroll {
    overflow: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(6, 182, 212, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(167, 139, 250, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

/* Loading Screen */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0f;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease;
}

.loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader {
    width: 80px;
    height: 80px;
    border: 4px solid rgba(139, 92, 246, 0.2);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Custom Cursor - Hidden on Mobile */
.cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.6), 0 0 40px rgba(6, 182, 212, 0.3);
    display: none;
}

.cursor-follower {
    position: fixed;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 2px solid rgba(139, 92, 246, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transition: opacity 0.3s ease;
    opacity: 0.6;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
    display: none;
}

/* Particle Background */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(139, 92, 246, 0.8);
    border-radius: 50%;
    animation: float 20s infinite linear;
    opacity: 0;
    box-shadow: 0 0 4px rgba(139, 92, 246, 0.8), 0 0 8px rgba(139, 92, 246, 0.4);
}

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

/* Navigation */
nav {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--glass);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 0.8rem 1.5rem;
    z-index: 1000;
    transition: all 0.3s ease;
    width: 90%;
    max-width: 640px;
}

nav.scrolled {
    background: rgba(0, 0, 0, 0.9);
    -webkit-backdrop-filter: blur(30px);
    backdrop-filter: blur(30px);
    transform: translateX(-50%) scale(0.95);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
    background: rgba(139, 92, 246, 0.2);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    background: rgba(139, 92, 246, 0.2);
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: rgba(10, 10, 15, 0.98);
    -webkit-backdrop-filter: blur(30px);
    backdrop-filter: blur(30px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 2rem;
    cursor: pointer;
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.mobile-menu-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 1rem 2rem;
    border-radius: 25px;
}

.mobile-menu-links a:hover {
    background: var(--glass);
    transform: scale(1.1);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 2;
    padding: 6rem 0 2rem;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.hero-text h1 {
    font-size: clamp(2.5rem, 8vw, 6rem);
    font-weight: 900;
    line-height: 0.9;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, var(--text-primary), var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1rem, 4vw, 1.5rem);
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero-description {
    font-size: clamp(1rem, 3vw, 1.2rem);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.hero-stat {
    text-align: center;
}

.hero-stat-number {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
}

.hero-stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.2rem;
}

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

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.5);
}

.btn-secondary {
    background: var(--glass);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(139, 92, 246, 0.2);
    transform: translateY(-3px);
}

/* Profile Card */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-3d {
    width: 100%;
    max-width: 400px;
    position: relative;
}

.profile-card {
    width: 100%;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--glass);
    -webkit-backdrop-filter: blur(30px);
    backdrop-filter: blur(30px);
    border: 2px solid var(--glass-border);
    border-radius: 30px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary), var(--accent), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 900;
    margin: 0 auto 1.5rem;
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.4);
}

.profile-info h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.profile-info p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.tech-orbs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.tech-orb {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--glass);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.tech-orb:hover {
    transform: scale(1.1);
    background: var(--primary);
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.4);
}

/* Timeline Section */
.timeline-section {
    padding: 5rem 0;
    position: relative;
}

.timeline-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    font-style: italic;
}

.timeline-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.timeline-line {
    position: absolute;
    left: 40px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--timeline-line);
    border-radius: 1px;
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    display: flex;
    align-items: flex-start;
    gap: 2rem;
}

.timeline-marker {
    position: relative;
    z-index: 3;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--glass);
    -webkit-backdrop-filter: blur(30px);
    backdrop-filter: blur(30px);
    border: 3px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.timeline-marker:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
}

.current-marker {
    background: linear-gradient(45deg, var(--timeline-current), var(--success));
    border-color: var(--timeline-current);
    animation: pulse-current 2s infinite;
}

@keyframes pulse-current {
    0%, 100% { box-shadow: 0 0 20px rgba(52, 211, 153, 0.4); }
    50% { box-shadow: 0 0 30px rgba(52, 211, 153, 0.8); }
}

.timeline-marker-icon {
    font-size: 1.8rem;
}

.timeline-content {
    flex: 1;
    background: var(--glass);
    -webkit-backdrop-filter: blur(30px);
    backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
}

.timeline-content::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 30px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 10px 10px 0;
    border-color: transparent var(--glass-border) transparent transparent;
}

.timeline-content:hover {
    transform: translateX(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.current .timeline-content {
    border-color: var(--timeline-current);
    background: linear-gradient(135deg, var(--glass), rgba(52, 211, 153, 0.1));
}

.timeline-date {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.current .timeline-date {
    color: var(--timeline-current);
}

.timeline-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.timeline-company {
    margin-bottom: 1rem;
}

.company-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.company-location {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.2rem;
}

.employment-type {
    display: inline-block;
    background: rgba(139, 92, 246, 0.2);
    color: var(--text-secondary);
    padding: 0.2rem 0.8rem;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.5rem;
}

.current .employment-type {
    background: rgba(52, 211, 153, 0.2);
    color: var(--timeline-current);
}

.timeline-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.timeline-description:has(+ .timeline-achievements) {
    margin-bottom: 1rem;
}

.timeline-achievements {
    list-style: none;
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.timeline-achievements li {
    position: relative;
    padding-left: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

.timeline-achievements li::before {
    content: '';
    position: absolute;
    left: 0.25rem;
    top: 0.6em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary), var(--accent));
}

.current .timeline-achievements li::before {
    background: var(--timeline-current);
}

.timeline-achievements strong {
    color: var(--text-primary);
    font-weight: 600;
}

.timeline-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.timeline-skills .skill-tag {
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid var(--glass-border);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.timeline-skills .skill-tag:hover {
    background: var(--primary);
    transform: scale(1.05);
}

/* Career Stats */
.career-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.career-stat-item {
    background: var(--glass);
    -webkit-backdrop-filter: blur(30px);
    backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.career-stat-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.3);
}

.career-stat-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.career-stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.career-stat-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Resume Download Section */
.resume-download-section {
    max-width: 600px;
    margin: 0 auto;
}

.resume-card-mini {
    background: var(--glass);
    -webkit-backdrop-filter: blur(30px);
    backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
}

.resume-card-mini:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.3);
}

.resume-icon-mini {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--success), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.resume-info {
    flex: 1;
}

.resume-info h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.resume-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.resume-download-btn-mini {
    background: linear-gradient(45deg, var(--success), var(--accent));
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.resume-download-btn-mini:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(52, 211, 153, 0.4);
}

/* Sections */
.section {
    padding: 4rem 0;
    position: relative;
    z-index: 2;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section-title {
    text-align: center;
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 900;
    margin-bottom: 3rem;
    background: linear-gradient(45deg, var(--text-primary), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 2rem;
}

.skill-card {
    background: var(--glass);
    -webkit-backdrop-filter: blur(30px);
    backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(139, 92, 246, 0.3);
}

.skill-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

.skill-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.skill-tag {
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid var(--glass-border);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: var(--primary);
    transform: scale(1.05);
}

/* Projects Section */
.projects-grid {
    /* flex so a part-filled last row stays centred: 3 per row, 2 on tablet, 1 on phone */
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.projects-grid > .project-card {
    --card-width: calc((100% - 4rem) / 3);
    flex: 0 1 var(--card-width);
    max-width: var(--card-width);
}

@media (max-width: 1024px) {
    .projects-grid > .project-card {
        --card-width: calc((100% - 2rem) / 2);
    }
}

@media (max-width: 700px) {
    .projects-grid > .project-card {
        --card-width: 100%;
    }
}

.project-card {
    background: var(--glass);
    -webkit-backdrop-filter: blur(30px);
    backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(139, 92, 246, 0.3);
}

.project-image {
    width: 100%;
    height: 240px;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.project-card:hover .project-image {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* Project Screenshots (phone fan) */
.project-shots {
    position: relative;
    overflow: hidden;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: zoom-in;
    background:
        radial-gradient(circle at 50% 120%, rgba(255, 255, 255, 0.18), transparent 60%),
        linear-gradient(160deg, var(--shots-bg, var(--primary)), var(--dark));
}

.project-card:hover .project-shots {
    transform: none;
}

.project-shots img {
    position: absolute;
    top: 28px;
    left: 50%;
    width: 120px;
    height: auto;
    aspect-ratio: 9 / 16;
    object-fit: cover;
    border-radius: 14px;
    border: 3px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
    transform: translateX(-50%);
    transition: transform 0.4s ease;
    z-index: 3;
}

.project-shots img:nth-of-type(2) {
    top: 44px;
    z-index: 2;
    transform: translateX(-140%) rotate(-8deg);
}

.project-shots img:nth-of-type(3) {
    top: 44px;
    z-index: 2;
    transform: translateX(40%) rotate(8deg);
}

.project-shots img:nth-of-type(n + 4) {
    display: none;
}

.project-card:hover .project-shots img:nth-of-type(1) {
    transform: translateX(-50%) translateY(-8px);
}

.project-card:hover .project-shots img:nth-of-type(2) {
    transform: translateX(-155%) rotate(-11deg);
}

.project-card:hover .project-shots img:nth-of-type(3) {
    transform: translateX(55%) rotate(11deg);
}

/* Web variant: one screenshot in a browser frame */
.project-shots.project-shots--web img {
    top: 32px;
    width: 86%;
    aspect-ratio: 16 / 10;
    object-position: top left;
    border-radius: 10px 10px 0 0;
    border: none;
    border-top: 18px solid #1e1e2a;
    transform: translateX(-50%);
}

.project-shots.project-shots--web::before {
    /* browser window dots */
    content: '';
    position: absolute;
    top: 38px;
    left: calc(7% + 8px);
    z-index: 4;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f87171;
    box-shadow: 10px 0 #fbbf24, 20px 0 #34d399;
    transition: transform 0.4s ease;
}

.project-shots.project-shots--plain img {
    border-top: none;
    border-radius: 12px;
    object-position: center;
}

.project-shots.project-shots--plain::before {
    display: none;
}

.project-shots.project-shots--web img:nth-of-type(n + 2) {
    display: none;
}

.project-card:hover .project-shots--web img:nth-of-type(1) {
    transform: translateX(-50%) translateY(-8px);
}

.project-card:hover .project-shots--web::before {
    transform: translateY(-8px);
}

.project-shots-hint {
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.55);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

.project-shots:hover .project-shots-hint,
.project-shots:focus-visible .project-shots-hint {
    opacity: 1;
}

.project-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-content .project-links {
    margin-top: auto;
}

.project-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.project-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--success);
    border-radius: 999px;
    background: rgba(52, 211, 153, 0.12);
    color: var(--success);
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.3s ease;
}

.project-badge:hover {
    background: rgba(52, 211, 153, 0.22);
}

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

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    background: linear-gradient(45deg, var(--primary), var(--accent));
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

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

.project-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

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

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.contact-info-section, .contact-form-section {
    background: var(--glass);
    -webkit-backdrop-filter: blur(30px);
    backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.contact-section-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 15px;
}

.contact-method-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.contact-method-info {
    flex: 1;
}

.contact-method-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.contact-method-detail {
    color: var(--text-secondary);
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

a.contact-method-detail {
    text-decoration: none;
    transition: color 0.3s ease;
}

a.contact-method-detail:hover {
    color: var(--accent);
}

.contact-method-btn {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: rgba(6, 182, 212, 0.1);
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    display: inline-block;
}

.contact-method-btn:hover {
    background: var(--accent);
    color: white;
}

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

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--glass);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.35rem;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: linear-gradient(45deg, var(--accent), var(--primary));
    transform: translateY(-3px);
}

/* Contact Form */
.contact-form {
    width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-input, .form-textarea {
    width: 100%;
    font-family: inherit;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent);
}

.form-input::placeholder, .form-textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
    opacity: 1;
}

.form-input::-webkit-input-placeholder, .form-textarea::-webkit-input-placeholder {
    color: rgba(255, 255, 255, 0.7);
    opacity: 1;
}

.form-input::-moz-placeholder, .form-textarea::-moz-placeholder {
    color: rgba(255, 255, 255, 0.7);
    opacity: 1;
}

.form-input:-ms-input-placeholder, .form-textarea:-ms-input-placeholder {
    color: rgba(255, 255, 255, 0.7);
    opacity: 1;
}

.form-input:focus::placeholder, .form-textarea:focus::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-submit-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    border: none;
    border-radius: 25px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.3);
}

/* Animation Classes */
/* Reveal uses the `translate` property so hover `transform`s on the same element still work */
.fade-in,
.slide-in-left,
.slide-in-right {
    opacity: 0;
    transition: opacity 0.8s ease, translate 0.8s ease, transform 0.3s ease,
        box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.fade-in {
    translate: 0 50px;
}

.slide-in-left {
    translate: -100px 0;
}

.slide-in-right {
    translate: 100px 0;
}

.fade-in.visible,
.slide-in-left.visible,
.slide-in-right.visible {
    opacity: 1;
    translate: 0 0;
}

.skill-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

/* Footer */
.footer {
    position: relative;
    z-index: 2;
    border-top: 1px solid var(--glass-border);
    padding: 2rem 0;
    margin-top: 2rem;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-top {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.2rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.footer-top:hover {
    background: linear-gradient(45deg, var(--primary), var(--accent));
    transform: translateY(-3px);
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(5, 5, 10, 0.92);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.lightbox[hidden] {
    display: none;
}

.lightbox.open {
    opacity: 1;
}

.lightbox-figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    max-width: 100%;
    max-height: 100%;
    margin: 0;
}

.lightbox-img {
    max-height: calc(100vh - 6rem);
    max-height: calc(100dvh - 6rem);
    max-width: min(88vw, 1200px);
    width: auto;
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    touch-action: pan-y;
}

.lightbox-caption {
    max-width: min(88vw, 1200px);
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
}

.lightbox-close,
.lightbox-nav {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: var(--glass);
    color: var(--text-primary);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lightbox-close:hover,
.lightbox-nav:hover {
    background: rgba(139, 92, 246, 0.4);
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    .nav-links {
        gap: 0.25rem;
    }

    .nav-links a {
        padding: 0.5rem 0.75rem;
    }
}

@media (max-width: 768px) {
    .hero {
        padding-top: 5.5rem;
    }

    .slide-in-left {
        translate: -40px 0;
    }

    .slide-in-right {
        translate: 40px 0;
    }

    .form-input,
    .form-textarea {
        font-size: 16px; /* prevents iOS zoom on focus */
    }

    .footer-content {
        flex-direction: column-reverse;
        text-align: center;
    }

    .lightbox {
        padding: 4.5rem 0.5rem 5.5rem;
    }

    .lightbox-nav {
        position: absolute;
        bottom: 1.25rem;
    }

    .lightbox-prev {
        left: calc(50% - 64px);
    }

    .lightbox-next {
        right: calc(50% - 64px);
    }

    .lightbox-img {
        max-height: calc(100vh - 13rem);
        max-height: calc(100dvh - 13rem);
    }

    .cursor, .cursor-follower {
        display: none;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
        padding: 1rem;
    }

    .hero-stats {
        justify-content: center;
        gap: 1rem;
    }

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

    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    .profile-3d {
        max-width: 300px;
    }

    .profile-card {
        min-height: 340px;
        padding: 1.5rem;
    }

    .profile-avatar {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }

    /* Timeline Mobile */
    .timeline-container {
        padding-left: 1rem;
    }

    .timeline-line {
        left: 35px; /* centre of the 60px marker */
    }

    .timeline-item {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 2rem;
    }

    .timeline-marker {
        width: 60px;
        height: 60px;
        align-self: flex-start;
        margin-left: -10px;
    }

    .timeline-marker-icon {
        font-size: 1.3rem;
    }

    .timeline-content {
        margin-left: 0;
    }

    .timeline-content::before {
        display: none;
    }

    .career-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .career-stat-item {
        padding: 1.5rem 1rem;
    }

    .career-stat-number {
        font-size: 2rem;
    }

    .resume-card-mini {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .resume-download-btn-mini {
        justify-content: center;
    }

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

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

    .contact-container {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 3rem 0;
    }

    .skill-card,
    .project-card,
    .contact-info-section,
    .contact-form-section {
        padding: 1.5rem;
    }

    .social-links {
        flex-wrap: wrap;
    }

    .tech-orbs {
        gap: 0.3rem;
    }

    .tech-orb {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-description {
        font-size: 0.9rem;
    }

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

    .btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }

    .profile-3d {
        max-width: 280px;
    }

    .profile-card {
        min-height: 0;
    }

    .timeline-item {
        margin-bottom: 1.5rem;
    }

    .timeline-content {
        padding: 1.5rem;
    }

    .timeline-skills .skill-tag {
        font-size: 0.6rem;
        padding: 0.2rem 0.6rem;
    }

    .career-stats {
        gap: 0.75rem;
    }

    .career-stat-item {
        padding: 1.25rem 0.5rem;
    }

    .career-stat-label {
        font-size: 0.75rem;
    }

    .resume-card-mini {
        padding: 1.5rem;
    }

    .skill-card,
    .project-card {
        padding: 1.2rem;
    }

    .contact-method {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .contact-method-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .social-links {
        gap: 0.5rem;
    }

    .social-link {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Utilities */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 640px;
    margin: -2rem auto 3rem;
}

/* Brand logos (brand color is baked into each SVG) */
.tech-logo {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

/* Hero Typing Effect */
.hero-subtitle {
    min-height: 1.6em;
}

.typed-caret {
    display: inline-block;
    width: 3px;
    height: 1em;
    margin-left: 4px;
    vertical-align: -0.12em;
    background: var(--primary);
    animation: caret-blink 1s steps(1) infinite;
}

@keyframes caret-blink {
    50% {
        opacity: 0;
    }
}

/* Hero Phone */
.hero-stage {
    position: relative;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 2rem 0 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-stage::before {
    content: '';
    position: absolute;
    top: 45%;
    left: 50%;
    width: 340px;
    height: 340px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(139, 92, 246, 0.35), rgba(6, 182, 212, 0.15) 45%, transparent 70%);
    filter: blur(20px);
    pointer-events: none;
}

.hero-phone {
    position: relative;
    z-index: 1;
    width: 260px;
    padding: 10px;
    border-radius: 42px;
    background: linear-gradient(145deg, #2a2a3d, #0d0d14);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6), 0 0 0 2px rgba(139, 92, 246, 0.25);
    animation: phone-float 6s ease-in-out infinite;
}

.hero-phone::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    z-index: 3;
    width: 64px;
    height: 18px;
    transform: translateX(-50%);
    border-radius: 20px;
    background: #0a0a0f;
}

.hero-phone-screen {
    position: relative;
    aspect-ratio: 9 / 16;
    border-radius: 32px;
    overflow: hidden;
    background: #ebe9d8;
}

.hero-phone-screen img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-phone-screen img.active {
    opacity: 1;
}

@keyframes phone-float {
    0%, 100% {
        transform: translateY(0) rotate(-2deg);
    }
    50% {
        transform: translateY(-12px) rotate(-2deg);
    }
}

.hero-phone-dots {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 6px;
    margin-top: 1.5rem;
}

.hero-phone-dots span {
    width: 6px;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.25);
    transition: all 0.3s ease;
}

.hero-phone-dots span.active {
    width: 18px;
    background: var(--primary);
}

.hero-chip {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.9rem;
    border-radius: 16px;
    background: var(--glass);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    color: var(--text-secondary);
    font-size: 0.78rem;
    line-height: 1.35;
    text-align: left;
    white-space: nowrap;
    animation: chip-float 7s ease-in-out infinite;
}

.hero-chip strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.hero-chip-avatar {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    font-weight: 900;
    background: linear-gradient(45deg, var(--primary), var(--accent));
}

.hero-chip--role {
    top: 14%;
    left: -6%;
}

.hero-chip--location {
    top: 52%;
    right: -6%;
    animation-delay: -2.5s;
}

.hero-chip--app {
    bottom: 12%;
    left: -4%;
    animation-delay: -5s;
}

@keyframes chip-float {
    0%, 100% {
        translate: 0 0;
    }
    50% {
        translate: 0 -8px;
    }
}

.hero-stage .tech-orbs {
    position: absolute;
    inset: 0;
    z-index: 2;
    margin: 0;
    display: block;
    pointer-events: none;
}

.hero-stage .tech-orb {
    position: absolute;
    width: 44px;
    height: 44px;
    pointer-events: auto;
    animation: chip-float 6s ease-in-out infinite;
}

.hero-stage .tech-orb:nth-child(1) {
    top: 4%;
    right: 10%;
}

.hero-stage .tech-orb:nth-child(2) {
    top: 32%;
    right: 2%;
    animation-delay: -1.5s;
}

.hero-stage .tech-orb:nth-child(3) {
    top: 40%;
    left: 4%;
    animation-delay: -3s;
}

.hero-stage .tech-orb:nth-child(4) {
    bottom: 4%;
    right: 14%;
    animation-delay: -4.5s;
}

/* Tech Logo Marquee */
.tech-marquee {
    overflow: hidden;
    margin: -1rem 0 3rem;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.tech-track {
    list-style: none;
    display: flex;
    gap: 0.75rem;
    width: max-content;
    padding: 0.5rem 0;
    animation: marquee 50s linear infinite;
}

.tech-marquee:hover .tech-track {
    animation-play-state: paused;
}

@keyframes marquee {
    to {
        transform: translateX(calc(-50% - 0.375rem));
    }
}

.tech-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.1rem;
    border-radius: 50px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.tech-item:hover {
    color: var(--text-primary);
    background: rgba(139, 92, 246, 0.2);
}

.skill-icon i {
    font-size: 1.6rem;
    color: white;
}

/* How I Ship */
.pipeline {
    position: relative;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
    margin-bottom: 3rem;
}

.pipeline::before,
.pipeline::after {
    content: '';
    position: absolute;
    top: 28px;
    left: 8%;
    height: 2px;
}

.pipeline::before {
    right: 8%;
    background: var(--timeline-line);
}

.pipeline::after {
    width: 0;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--success));
    transition: width 2.4s ease 0.3s;
}

.pipeline.visible::after {
    width: 84%;
}

.pipeline-step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    text-align: center;
}

.pipeline-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--text-muted);
    background: #14141f;
    border: 2px solid var(--glass-border);
    transition: all 0.4s ease;
}

.pipeline.visible .pipeline-icon {
    color: white;
    border-color: transparent;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.35);
}

.pipeline.visible .pipeline-step:last-child .pipeline-icon {
    background: linear-gradient(45deg, var(--success), var(--accent));
    box-shadow: 0 10px 25px rgba(52, 211, 153, 0.35);
}

.pipeline-step:nth-child(1) .pipeline-icon { transition-delay: 0.3s; }
.pipeline-step:nth-child(2) .pipeline-icon { transition-delay: 0.7s; }
.pipeline-step:nth-child(3) .pipeline-icon { transition-delay: 1.1s; }
.pipeline-step:nth-child(4) .pipeline-icon { transition-delay: 1.5s; }
.pipeline-step:nth-child(5) .pipeline-icon { transition-delay: 1.9s; }
.pipeline-step:nth-child(6) .pipeline-icon { transition-delay: 2.3s; }

.pipeline-step strong {
    color: var(--text-primary);
    font-size: 0.95rem;
}

.pipeline-step > span:last-child {
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.4;
}

.ship-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.ship-fact {
    background: var(--glass);
    -webkit-backdrop-filter: blur(30px);
    backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
}

.ship-fact-number,
.activity-stat-number {
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ship-fact-number {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.ship-fact-label {
    color: var(--text-primary);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.ship-fact p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.ship-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

/* Coding Activity */
.live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 0.3rem;
    border-radius: 50%;
    vertical-align: middle;
    background: var(--success);
    animation: live-pulse 2s infinite;
}

@keyframes live-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
    }
    70%, 100% {
        box-shadow: 0 0 0 8px rgba(52, 211, 153, 0);
    }
}

.activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
    gap: 2rem;
}

.activity-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: var(--glass);
    -webkit-backdrop-filter: blur(30px);
    backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    padding: 2rem;
}

.activity-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.activity-icon {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    background: linear-gradient(45deg, var(--primary), var(--accent));
}

.activity-card h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 700;
}

.activity-card-header p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.activity-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.activity-stat {
    padding: 1.1rem 0.75rem;
    border-radius: 15px;
    text-align: center;
    background: rgba(139, 92, 246, 0.1);
}

.activity-stat-number {
    font-size: 1.9rem;
}

.activity-stat-label {
    margin-top: 0.4rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
    line-height: 1.3;
}

.activity-highlights {
    list-style: none;
    display: grid;
    gap: 0.6rem;
}

.activity-highlights li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.activity-highlights i {
    color: var(--accent);
    font-size: 1.15rem;
}

.activity-card > .project-link {
    margin-top: auto;
}

.repo-list {
    list-style: none;
    display: grid;
    gap: 0.75rem;
}

.repo-item {
    padding: 0.9rem 1rem;
    border-radius: 15px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.repo-item:hover {
    border-color: var(--glass-border);
}

.repo-item a {
    color: var(--text-primary);
    font-weight: 600;
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: color 0.3s ease;
}

.repo-item a:hover {
    color: var(--accent);
}

.repo-item p {
    margin: 0.25rem 0 0.4rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
}

.repo-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.repo-lang {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--lang, var(--primary));
}

/* Card Spotlight (follows the pointer) */
@media (hover: hover) and (pointer: fine) {
    .spotlight {
        position: relative;
    }

    .spotlight::after {
        content: '';
        position: absolute;
        inset: 0;
        z-index: 5;
        border-radius: inherit;
        pointer-events: none;
        background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(139, 92, 246, 0.16), transparent 45%);
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .spotlight:hover::after {
        opacity: 1;
    }
}

/* New sections: tablet & phone */
@media (max-width: 1024px) {
    .pipeline {
        grid-template-columns: repeat(3, 1fr);
        row-gap: 2rem;
    }

    .pipeline::before,
    .pipeline::after {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero-stage {
        max-width: 340px;
        padding-top: 1rem;
    }

    .hero-phone {
        width: 220px;
        border-radius: 36px;
    }

    .hero-phone-screen {
        border-radius: 27px;
    }

    .hero-chip {
        font-size: 0.7rem;
        padding: 0.45rem 0.7rem;
    }

    .hero-chip strong {
        font-size: 0.75rem;
    }

    .hero-chip-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }

    .hero-chip--role {
        left: 0;
    }

    .hero-chip--location {
        right: 0;
    }

    .hero-chip--app {
        left: 2%;
    }

    .hero-stage .tech-orb {
        width: 38px;
        height: 38px;
    }

    .hero-stage .tech-orb:nth-child(3) {
        left: 0;
    }

    .section-subtitle {
        margin-top: -1.5rem;
        font-size: 0.95rem;
    }

    /* Vertical pipeline */
    .pipeline {
        grid-template-columns: 1fr;
        row-gap: 1.25rem;
    }

    .pipeline::before,
    .pipeline::after {
        display: block;
        top: 28px;
        bottom: 28px;
        left: 27px;
        width: 2px;
        height: auto;
    }

    .pipeline::after {
        bottom: auto;
        height: 0;
        transition: height 2.4s ease 0.3s;
    }

    .pipeline.visible::after {
        width: 2px;
        height: calc(100% - 56px);
    }

    .pipeline-step {
        display: grid;
        grid-template-columns: 56px 1fr;
        column-gap: 1rem;
        align-items: center;
        text-align: left;
    }

    .pipeline-icon {
        grid-row: span 2;
        margin: 0;
    }

    .ship-fact,
    .activity-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-chip--location {
        display: none;
    }

    .hero-chip--role {
        top: 2%;
    }

    .hero-chip--app {
        bottom: 8%;
    }

    .activity-stat {
        padding: 0.9rem 0.4rem;
    }

    .activity-stat-number {
        font-size: 1.5rem;
    }

    .activity-stat-label {
        font-size: 0.7rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tech-track {
        width: auto;
        flex-wrap: wrap;
        justify-content: center;
        animation: none;
    }

    .tech-track [aria-hidden="true"] {
        display: none;
    }

    .tech-marquee {
        -webkit-mask-image: none;
        mask-image: none;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

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

    .particles {
        display: none;
    }
}
