/* ===== CSS Variables ===== */
:root {
    --color-bg: #0f0f14;
    --color-surface: #1a1a24;
    --color-surface-light: #24243a;
    --color-text: #e8e8f0;
    --color-text-muted: #9090a8;
    --color-primary: #6c63ff;
    --color-primary-light: #8b83ff;
    --color-accent: #00d4aa;
    --color-border: #2a2a3a;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Fira Code', monospace;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s ease;
    --nav-h: 64px;
}

/* ===== Block flow: one section per screen, side rail jumps between them ===== */
.block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: calc(var(--nav-h) + 2rem);
    padding-bottom: 2rem;
    position: relative;
    width: 100%;
}

/* Fixed right-side rail — flows down the page, always visible */
.rail {
    position: fixed;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
    z-index: 100;
    padding: 0.9rem 0.55rem;
    background: rgba(26, 26, 36, 0.75);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    backdrop-filter: blur(8px);
}

.rail__dot {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    line-height: 0;
}

.rail__dot span {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-text-muted);
    opacity: 0.45;
    transition: var(--transition);
}

.rail__dot:hover span {
    opacity: 1;
    transform: scale(1.25);
}

.rail__dot.is-active span {
    background: var(--color-primary);
    opacity: 1;
    transform: scale(1.35);
    box-shadow: 0 0 10px rgba(108, 99, 255, 0.7);
}

.rail__line {
    width: 1px;
    height: 28px;
    background: linear-gradient(to bottom, var(--color-primary), transparent);
    opacity: 0.6;
}

.rail__down {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(108, 99, 255, 0.45);
    background: rgba(108, 99, 255, 0.12);
    color: var(--color-text);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: blockBounce 2.2s ease-in-out infinite;
}

.rail__down:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(108, 99, 255, 0.5);
    animation-play-state: paused;
}

@keyframes blockBounce {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 6px; }
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

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

ul {
    list-style: none;
}

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

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn--primary {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.btn--primary:hover {
    background: var(--color-primary-light);
    border-color: var(--color-primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(108, 99, 255, 0.4);
}

.btn--outline {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn--outline:hover {
    background: rgba(108, 99, 255, 0.1);
    transform: translateY(-2px);
}

.btn--large {
    padding: 1rem 2.5rem;
    font-size: 1.05rem;
}

/* ===== Navigation ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: rgba(15, 15, 20, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
}

.nav__logo {
    display: flex;
    align-items: center;
}

.nav__logo-img {
    height: 40px;
    width: auto;
    border-radius: 6px;
}

.nav__links {
    display: flex;
    gap: 2rem;
}

.nav__links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-muted);
    transition: var(--transition);
    position: relative;
}

.nav__links a:hover {
    color: var(--color-text);
}

.nav__links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: var(--transition);
}

.nav__links a:hover::after {
    width: 100%;
}

/* ===== Hero Section — clean single card ===== */
.hero {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--nav-h) + 2rem) 2rem 3rem;
    position: relative;
    width: 100%;
}

.hero__card {
    max-width: 640px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 2.5rem 2rem 2rem;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero__card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
}

.hero__photo {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--color-primary);
    box-shadow: 0 0 24px rgba(108, 99, 255, 0.35);
    margin-bottom: 1rem;
}

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-accent);
    background: rgba(0, 212, 170, 0.08);
    border: 1px solid rgba(0, 212, 170, 0.25);
    border-radius: 999px;
    padding: 0.3rem 0.9rem;
    margin-bottom: 1rem;
}

.hero__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-accent);
    box-shadow: 0 0 8px var(--color-accent);
    animation: heroPulse 2s ease-in-out infinite;
}

@keyframes heroPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero__name {
    font-size: clamp(2.2rem, 7vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -1px;
    background: linear-gradient(135deg, var(--color-text) 0%, var(--color-primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__title {
    font-size: clamp(1.05rem, 3.5vw, 1.5rem);
    font-weight: 600;
    color: var(--color-text);
    margin-top: 0.6rem;
}

.hero__tagline {
    font-size: 0.98rem;
    color: var(--color-text-muted);
    margin-top: 0.75rem;
    max-width: 500px;
}

.hero__actions {
    display: flex;
    gap: 0.9rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.hero__trust {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--color-border);
    width: 100%;
    font-size: 0.78rem;
    color: var(--color-text-muted);
    letter-spacing: 0.2px;
}

/* ===== Sections ===== */
.section {
    padding: 1rem 2rem;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.section__header {
    text-align: center;
    margin-bottom: 1.25rem;
}

.section__title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.section__divider {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    border-radius: 2px;
    margin: 0 auto;
}

.section__subtitle {
    color: var(--color-text-muted);
    font-size: 0.98rem;
    margin-top: 0.6rem;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== About Section (pretty card) ===== */
.about__card {
    position: relative;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 1.5rem 2rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    max-width: 900px;
    margin: 0 auto;
}

.about__card-glow {
    position: absolute;
    top: -80px;
    right: -80px;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(108, 99, 255, 0.18) 0%, rgba(0, 212, 170, 0.1) 50%, transparent 70%);
    pointer-events: none;
}

.about__bio {
    position: relative;
    max-width: 720px;
    margin: 0 auto 1.25rem;
    text-align: center;
}

.about__bio p {
    color: var(--color-text-muted);
    font-size: 0.98rem;
    margin-bottom: 0.75rem;
}

.about__lead {
    font-size: 1.1rem !important;
    color: var(--color-text) !important;
    line-height: 1.55;
}

.about__lead strong {
    color: var(--color-accent);
}

.about__points {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
    text-align: left;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.about__points li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: rgba(0, 212, 170, 0.06);
    border: 1px solid rgba(0, 212, 170, 0.18);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.9rem;
    font-size: 0.88rem;
    color: var(--color-text);
}

.about__points li span {
    flex-shrink: 0;
}

/* Compact about stats + skills strip (fits one viewport block) */
.about__stats {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.about__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}

.about__stat strong {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
}

.about__stat span {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.about__skills-strip {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Legacy highlight grid (kept for reference) */
.about__highlights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.highlight-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem 1rem;
    text-align: center;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.highlight-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-primary);
    box-shadow: var(--shadow);
}

.highlight-card__number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
}

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

.highlight-card__icon {
    font-size: 1.75rem;
    line-height: 1;
}

.highlight-card--stack {
    position: relative;
    overflow: hidden;
}

.highlight-card--stack::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    opacity: 0;
    transition: var(--transition);
}

.highlight-card--stack:hover::before {
    opacity: 1;
}

.highlight-card--stack .highlight-card__label {
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.95rem;
}

.highlight-card__tech {
    font-size: 0.78rem;
    line-height: 1.6;
    color: var(--color-text-muted);
}

/* ===== Projects Section ===== */
.projects--compact {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.projects--compact .section__header {
    margin-bottom: 1.25rem;
}

.projects__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
    padding: 0.85rem 1.25rem;
    background: rgba(108, 99, 255, 0.06);
    border: 1px solid rgba(108, 99, 255, 0.2);
    border-radius: var(--radius);
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.projects__cta p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.about--after-work {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.projects__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.projects__grid--single {
    grid-template-columns: minmax(320px, 480px);
    justify-content: center;
}

.projects__grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 1100px;
    margin: 0 auto;
    align-items: stretch;
}

.projects__grid--two .project-card--feature {
    max-width: none;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.projects__grid--two .project-card--feature .project-card__content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.projects__grid--two .project-card--feature .project-card__meta {
    margin-top: auto;
    padding-top: 0.5rem;
}

.projects__grid--four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 1100px;
    margin: 0 auto;
    align-items: stretch;
}

.projects__grid--four .project-card--feature {
    max-width: none;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.projects__grid--four .project-card--feature .project-card__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.25rem;
}

.projects__grid--four .project-card--feature .project-card__meta {
    margin-top: auto;
    padding-top: 0.5rem;
    flex-direction: column;
    align-items: center;
}

.projects__grid--four .project-card__tags {
    justify-content: center;
}

/* ===== Projects Carousel ===== */
.carousel {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.carousel__viewport {
    flex: 1;
    overflow: hidden;
    border-radius: var(--radius);
    min-width: 0;
}

.carousel__track {
    display: flex;
    gap: 1.5rem;
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.carousel__slide {
    flex: 0 0 calc((100% - 3rem) / 3);
    min-width: 0;
    max-width: none;
    margin: 0;
    display: flex;
    flex-direction: column;
}

/* Compact project cards */
.project-card--feature .project-card__banner {
    padding: 1.75rem 1.25rem;
    gap: 0.5rem;
}

.carousel__slide .project-card__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.25rem 1.25rem 1.1rem;
}

.carousel__slide .project-card__meta {
    margin-top: auto;
    padding-top: 0.5rem;
    flex-direction: column;
    align-items: center;
}

.carousel__slide .project-card__tags {
    justify-content: center;
}

.carousel__arrow {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.carousel__arrow:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(108, 99, 255, 0.4);
}

.carousel__arrow:disabled {
    opacity: 0.3;
    cursor: default;
    transform: none;
    box-shadow: none;
    background: var(--color-surface);
    border-color: var(--color-border);
    color: var(--color-text);
}

.carousel__dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.9rem;
}

.carousel__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: var(--color-border);
    cursor: pointer;
    padding: 0;
    transition: var(--transition);
}

.carousel__dot:hover {
    background: var(--color-text-muted);
}

.carousel__dot--active {
    background: var(--color-primary);
    transform: scale(1.25);
}

.project-card__banner--travel {
    background: linear-gradient(135deg, #3b1d5e 0%, #8b2f5c 50%, #e07b39 100%);
}

.project-card__banner--afro {
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a3a 50%, #6c63ff 100%);
}

.project-card__banner--blavity {
    background: linear-gradient(135deg, #5e1a1a 0%, #a03a2a 50%, #e09b39 100%);
}

.project-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-6px);
    border-color: var(--color-primary);
    box-shadow: var(--shadow);
}

.project-card__image {
    background: var(--color-surface-light);
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-card__placeholder {
    font-size: 4rem;
}

.project-card__content {
    padding: 1.5rem;
}

.project-card__image--sm {
    padding: 1.5rem 2rem;
}

.project-card__image--sm .project-card__placeholder {
    font-size: 2.5rem;
}

/* Featured single project: polished centered card */
.project-card--feature {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
    box-shadow: var(--shadow);
}

.project-card--feature:hover {
    transform: translateY(-4px);
}

.project-card__banner {
    background: linear-gradient(135deg, #1c2a4a 0%, #123b4f 50%, #0e5a55 100%);
    padding: 1.75rem 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

.project-card__emoji {
    font-size: 2.5rem;
    line-height: 1;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

.project-card__site {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(0, 0, 0, 0.3);
    padding: 0.35rem 1rem;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.project-card--feature .project-card__content {
    padding: 1.25rem 1.25rem 1.1rem;
}

.project-card--feature .project-card__title {
    font-size: 1.3rem;
}

.project-card--feature .project-card__desc {
    max-width: 480px;
    margin: 0 auto 1rem;
    font-size: 0.92rem;
}

.project-card--feature .project-card__meta {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.project-card--feature .project-card__tags {
    justify-content: center;
    margin-bottom: 0;
}

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

.project-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.project-card__title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.project-card__desc {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.project-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.tag {
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    background: rgba(108, 99, 255, 0.12);
    color: var(--color-primary-light);
    border-radius: 20px;
    font-weight: 500;
}

.project-card__links {
    display: flex;
    gap: 1.5rem;
}

.project-card__link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-accent);
    transition: var(--transition);
}

.project-card__link:hover {
    color: var(--color-primary-light);
}

/* ===== Contact + Footer Combined ===== */
.footer-contact {
    border-top: 1px solid var(--color-border);
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--nav-h) + 2rem) 2rem 3rem;
    text-align: center;
    width: 100%;
}

.footer-contact__inner {
    max-width: 760px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-contact__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.footer-contact__title {
    font-size: 1.25rem;
    font-weight: 600;
}

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

.footer-contact__links a {
    transition: var(--transition);
}

.footer-contact__links a:hover {
    color: var(--color-text);
}

.footer-contact__sep {
    opacity: 0.4;
}

/* ===== Footer (legacy) ===== */
.footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* ===== Responsive ===== */
@media (max-width: 1150px) {
    .carousel__slide {
        flex-basis: calc((100% - 1.5rem) / 2);
    }
}

/* Short viewports: nothing special needed — normal flow always works */

/* Reduced motion: disable bounce + carousel glide */
@media (prefers-reduced-motion: reduce) {
    .rail__down,
    .hero__dot {
        animation: none;
    }

    .carousel__track {
        transition: none;
    }
}

@media (max-width: 820px) {
    .carousel {
        gap: 0.5rem;
    }

    .carousel__slide {
        flex-basis: 100%;
    }

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

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

@media (max-width: 768px) {
    .nav__links {
        gap: 1rem;
    }

    .nav__links a {
        font-size: 0.8rem;
    }

    .about__card {
        padding: 1.75rem 1.25rem;
    }

    .about__points li {
        font-size: 0.88rem;
    }

    .footer-contact__cta {
        flex-direction: column;
        gap: 1rem;
    }

    .section {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hero {
        padding-left: 1rem;
        padding-right: 1rem;
        min-height: 100svh;
    }

    .hero__card {
        padding: 1.75rem 1.25rem 1.5rem;
        border-radius: 16px;
    }

    .hero__photo {
        width: 92px;
        height: 92px;
    }

    .hero__name {
        font-size: clamp(1.9rem, 9vw, 2.4rem);
    }

    .hero__title {
        font-size: 1.05rem;
        line-height: 1.4;
    }

    .hero__tagline {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .hero__actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .hero__actions .btn {
        width: 100%;
        padding: 0.9rem 1rem;
    }

    .hero__trust {
        font-size: 0.72rem;
        line-height: 1.6;
    }

    /* Projects: stack carousel vertically, full-width cards */
    .carousel {
        flex-direction: column;
        gap: 1rem;
    }

    .carousel__viewport {
        width: 100%;
    }

    .carousel__track {
        gap: 1rem;
    }

    /* Overlay prev/next on the card edges instead of squeezing beside it */
    .carousel__arrow {
        position: absolute;
        top: 34%;
        z-index: 3;
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
        background: rgba(26, 26, 36, 0.9);
        backdrop-filter: blur(6px);
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
    }

    .carousel__arrow--prev {
        left: 0.35rem;
    }

    .carousel__arrow--next {
        right: 0.35rem;
    }

    .carousel {
        position: relative;
    }

    .project-card__banner {
        padding: 1.4rem 1rem;
    }

    .project-card__emoji {
        font-size: 2rem;
    }

    .project-card--feature .project-card__title {
        font-size: 1.15rem;
    }

    .project-card--feature .project-card__desc {
        font-size: 0.85rem;
        line-height: 1.6;
    }

    .projects__cta {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .projects__cta .btn {
        width: 100%;
    }

    /* About: tighter, thumb-friendly */
    .about__stats {
        gap: 1.25rem;
    }

    .about__stat strong {
        font-size: 1.35rem;
    }

    .about__skills-strip {
        gap: 0.4rem;
    }

    .tag {
        font-size: 0.75rem;
        padding: 0.3rem 0.7rem;
    }

    /* Hide the side rail on phones — thumb + nav links cover it */
    .rail {
        display: none;
    }

    .block,
    .hero,
    .footer-contact {
        padding-right: 1rem;
    }

    /* Footer: stack contact links cleanly */
    .footer-contact__links {
        flex-direction: column;
        gap: 0.6rem;
    }

    .footer-contact__sep {
        display: none;
    }

    .footer-contact__cta .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .nav {
        padding: 0.75rem 1rem;
    }

    .nav__logo-img {
        width: 36px;
        height: 36px;
    }

    .nav__links {
        gap: 0.75rem;
    }

    .nav__links a {
        font-size: 0.75rem;
    }

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

    /* Small phones: keep type readable, kill horizontal scroll */
    body {
        overflow-x: hidden;
    }

    .hero__card {
        padding: 1.5rem 1rem 1.25rem;
    }

    .hero__eyebrow {
        font-size: 0.72rem;
        padding: 0.25rem 0.75rem;
    }

    .about__points li {
        font-size: 0.82rem;
        padding: 0.55rem 0.75rem;
    }

    .about__stats {
        gap: 1rem;
    }

    .btn {
        font-size: 0.9rem;
    }

    .section__title {
        font-size: 1.4rem;
    }

    .section__subtitle {
        font-size: 0.88rem;
    }
}
