:root {
    --ink: #1f2937;
    --muted: #5b6472;
    --paper: #ffffff;
    --surface: #f7f9fc;
    --line: #e2e8f0;
    --field: #ffffff;
    --primary: #6d28d9;
    --primary-dark: #4c1d95;
    --accent: #0f766e;
    --warm: #f59e0b;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --motion-fast: 180ms;
    --motion-medium: 360ms;
    --motion-slow: 700ms;
}

[data-theme="dark"] {
    --ink: #f8fafc;
    --muted: #cbd5e1;
    --paper: #111827;
    --surface: #0b1120;
    --line: #334155;
    --field: #172033;
    --primary: #a78bfa;
    --primary-dark: #c4b5fd;
    --accent: #5eead4;
    --warm: #fbbf24;
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--surface);
    color: var(--ink);
    margin: 0;
    line-height: 1.65;
    transition: background var(--motion-medium) ease, color var(--motion-medium) ease;
}

img,
video {
    max-width: 100%;
    height: auto;
}

:focus-visible {
    outline: 3px solid var(--warm);
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 100;
    padding: 0.65rem 0.9rem;
    border-radius: 8px;
    background: var(--warm);
    color: #111827;
    font-weight: 900;
    transform: translateY(-140%);
    transition: transform var(--motion-fast) ease;
}

.skip-link:focus {
    transform: translateY(0);
}

::selection {
    background: rgba(109, 40, 217, 0.9);
    color: #fff;
}

[data-theme="dark"] ::selection {
    background: rgba(94, 234, 212, 0.85);
    color: #0b1120;
}

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

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

@keyframes fadeSlideLeft {
    from {
        opacity: 0;
        transform: translateX(-24px);
    }

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

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

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

@keyframes glowPulse {
    0%,
    100% {
        box-shadow: 0 20px 55px rgba(0, 0, 0, 0.38);
    }

    50% {
        box-shadow: 0 24px 68px rgba(109, 40, 217, 0.34);
    }
}

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

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

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

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

a:hover,
a:focus {
    color: var(--primary-dark);
    text-decoration: underline;
    outline: none;
}

header {
    background:
        linear-gradient(135deg, rgba(31, 41, 55, 0.96), rgba(76, 29, 149, 0.9)),
        url("images/myimage.jpg") center/cover;
    background-size: 160% 160%, cover;
    color: #fff;
    padding: 1rem clamp(1rem, 4vw, 3rem) 5rem;
    animation: gradientShift 14s ease infinite;
}

.page-header {
    padding-bottom: 4rem;
}

.page-hero {
    width: min(1120px, 100%);
    margin: 0 auto;
    padding: clamp(1.25rem, 4vw, 3rem);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    background: rgba(17, 24, 39, 0.32);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
    animation: fadeSlideUp 800ms ease 100ms both;
}

.page-hero h1 {
    max-width: 850px;
    margin: 0 0 1rem;
    color: #fff;
    font-size: clamp(2.2rem, 6vw, 4.2rem);
    line-height: 1;
}

.page-hero p:not(.eyebrow) {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.08rem;
}

nav {
    position: sticky;
    top: 0.75rem;
    z-index: 10;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-width: 1100px;
    margin: 0 auto 3rem;
    padding: 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    background: rgba(17, 24, 39, 0.42);
    backdrop-filter: blur(14px);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.18);
    animation: fadeSlideUp var(--motion-slow) ease both;
}

.nav-brand {
    margin-right: auto;
    background: rgba(255, 255, 255, 0.12);
    letter-spacing: 0;
    font-weight: 900;
}

.nav-brand span {
    color: #fde68a;
}

nav a {
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.7rem;
    border-radius: 8px;
    font-weight: 600;
    white-space: nowrap;
    transition: background var(--motion-fast) ease, transform var(--motion-fast) ease, color var(--motion-fast) ease;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 38px;
    padding: 0.45rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    transition: background var(--motion-fast) ease, transform var(--motion-fast) ease, color var(--motion-fast) ease;
}

.theme-toggle i {
    transition: transform var(--motion-medium) ease;
}

nav a:hover,
nav a:focus,
nav a[aria-current="page"],
.theme-toggle:hover,
.theme-toggle:focus {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    outline: none;
}

nav a[aria-current="page"] {
    box-shadow: inset 0 0 0 1px rgba(253, 230, 138, 0.32);
}

.theme-toggle:hover i,
.theme-toggle:focus i {
    transform: rotate(22deg) scale(1.12);
}

.profile-header {
    display: grid;
    grid-template-columns: minmax(180px, 260px) minmax(0, 720px);
    align-items: center;
    justify-content: center;
    gap: clamp(1.5rem, 4vw, 3rem);
    max-width: 1120px;
    margin: 0 auto;
    padding: clamp(1rem, 3vw, 2rem);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    background: rgba(17, 24, 39, 0.32);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
    animation: fadeSlideUp 800ms ease 100ms both;
}

.profile-header img {
    width: clamp(150px, 20vw, 220px);
    height: clamp(150px, 20vw, 220px);
    border-radius: 50%;
    object-fit: cover;
    background-color: #111827;
    padding: 7px;
    border: 3px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.38);
    animation: floatPhoto 5s ease-in-out infinite, glowPulse 5s ease-in-out infinite;
    transition: transform var(--motion-medium) ease, box-shadow var(--motion-medium) ease;
}

.profile-header img:hover {
    animation-play-state: paused;
    transform: translateY(-8px) scale(1.04) rotate(-1deg);
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.48);
}

.profile-info {
    max-width: 680px;
}

.eyebrow {
    display: inline-flex;
    margin: 0 0 0.6rem;
    color: #fde68a;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    animation: fadeSlideLeft 650ms ease 250ms both;
}

.profile-info h1 {
    font-size: clamp(2.4rem, 7vw, 4.8rem);
    line-height: 0.95;
    margin: 0 0 1rem;
    animation: fadeSlideUp 700ms ease 320ms both;
}

.profile-info p {
    margin: 0 0 0.7rem;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.08rem;
    max-width: 58ch;
    animation: fadeSlideUp 700ms ease 400ms both;
}

.profile-info h1,
.profile-info p,
h2,
h3,
p,
li,
a {
    overflow-wrap: anywhere;
}

.profile-info a {
    color: #fde68a;
    font-weight: 700;
}

.profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.4rem;
    animation: fadeSlideUp 700ms ease 520ms both;
}

.profile-highlights {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1.5rem;
    animation: fadeSlideUp 700ms ease 620ms both;
}

.profile-highlights span {
    display: grid;
    gap: 0.2rem;
    padding: 0.8rem;
    min-height: 74px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.9rem;
    transition: transform var(--motion-medium) ease, background var(--motion-medium) ease, border-color var(--motion-medium) ease;
}

.profile-highlights span:hover {
    transform: translateY(-5px);
    border-color: rgba(253, 230, 138, 0.5);
    background: rgba(255, 255, 255, 0.13);
}

.profile-highlights strong {
    color: #fff;
    font-size: 1.02rem;
}

.btn-cv,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 46px;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 800;
    text-decoration: none;
    transition: transform var(--motion-fast) ease, box-shadow var(--motion-fast) ease, background var(--motion-fast) ease;
}

.btn-cv {
    background: #fff;
    color: var(--primary-dark);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.22);
}

.btn-secondary {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.btn-cv:hover,
.btn-secondary:hover {
    transform: translateY(-3px);
    text-decoration: none;
}

.sponsor-button {
    align-self: center;
    border: 0;
    border-radius: 6px;
    color-scheme: light;
}

main {
    width: min(1120px, calc(100% - 2rem));
    margin: -3rem auto 0;
    padding: clamp(1.25rem, 3vw, 2.3rem);
    background: var(--paper);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 16px;
    box-shadow: var(--shadow);
    animation: fadeSlideUp 850ms ease 240ms both;
}

.overview-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    padding-top: 0;
}

.overview-card {
    position: relative;
    display: grid;
    gap: 0.35rem;
    min-height: 132px;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(109, 40, 217, 0.08), rgba(15, 118, 110, 0.08)), var(--paper);
    color: var(--ink);
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.overview-card::after {
    content: "";
    position: absolute;
    inset: auto -10% -45% 45%;
    height: 120px;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.1);
    transform: rotate(-12deg);
    transition: transform var(--motion-medium) ease;
}

.overview-card i {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(109, 40, 217, 0.12);
    color: var(--primary);
    font-size: 1.1rem;
}

.overview-card span {
    color: var(--muted);
    font-weight: 800;
}

.overview-card strong {
    max-width: 18ch;
    font-size: 1.12rem;
    line-height: 1.25;
}

.overview-card:hover,
.overview-card:focus {
    color: var(--ink);
    text-decoration: none;
    transform: translateY(-6px);
    border-color: rgba(15, 118, 110, 0.45);
}

.overview-card:hover::after,
.overview-card:focus::after {
    transform: rotate(-8deg) translateY(-10px);
}

.page-main {
    margin-top: -2.5rem;
}

main > section {
    padding: 2rem 0 2.4rem;
    border-bottom: 1px solid var(--line);
    scroll-margin-top: 6rem;
}

main > section:last-child {
    border-bottom: 0;
}

h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--ink);
    font-size: 1.5rem;
    margin: 0 0 1.25rem;
    padding-bottom: 0;
    border-bottom: 0;
}

h2::before {
    content: "";
    width: 34px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width var(--motion-medium) ease;
}

section:hover h2::before,
footer:hover h2::before {
    width: 52px;
}

h3 {
    margin: 0 0 0.75rem;
    color: var(--ink);
    line-height: 1.3;
}

p {
    margin-top: 0;
}

.section-intro {
    max-width: 74ch;
    margin-bottom: 1.2rem;
    color: var(--muted);
    font-size: 1.03rem;
}

ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

ul li {
    margin-bottom: 0.55rem;
}

ul li i {
    color: var(--accent);
    min-width: 20px;
}

#about ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.6rem 1.2rem;
}

#about li {
    padding: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}

#work-experience h3 {
    color: var(--primary-dark);
}

#work-experience p {
    color: var(--muted);
    max-width: 80ch;
}

.timeline {
    position: relative;
    display: grid;
    gap: 1rem;
    padding-left: 1.5rem;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 0.43rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 2px;
    background: linear-gradient(var(--primary), var(--accent));
}

.experience-item {
    position: relative;
    padding: 1rem 1rem 1rem 1.15rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(135deg, var(--paper), var(--surface));
}

.experience-item p {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -1.42rem;
    top: 1.35rem;
    width: 0.8rem;
    height: 0.8rem;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
    transition: transform var(--motion-medium) ease, box-shadow var(--motion-medium) ease;
}

.experience-item:hover .timeline-dot {
    transform: scale(1.2);
    box-shadow: 0 0 0 6px rgba(15, 118, 110, 0.14);
}

.project-grid,
.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

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

.project-card,
.topic-card,
.flex-sections > section,
.overview-card {
    position: relative;
    overflow: hidden;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 1.15rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    transition: transform var(--motion-medium) ease, box-shadow var(--motion-medium) ease, border-color var(--motion-medium) ease;
}

.project-card {
    display: flex;
    flex-direction: column;
}

.project-card::after,
.topic-card::after,
.flex-sections > section::after {
    content: "";
    position: absolute;
    inset: 0;
    border-top: 3px solid transparent;
    border-image: linear-gradient(90deg, var(--primary), var(--accent), var(--warm)) 1;
    opacity: 0;
    transition: opacity var(--motion-medium) ease;
    pointer-events: none;
}

.project-card:hover,
.topic-card:hover,
.flex-sections > section:hover {
    transform: translateY(-7px);
    border-color: rgba(15, 118, 110, 0.45);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.1);
}

.project-card:hover::after,
.topic-card:hover::after,
.flex-sections > section:hover::after {
    opacity: 1;
}

.project-card p,
.topic-card p {
    color: var(--muted);
    margin-bottom: 1rem;
}

.project-card h3 i {
    color: #ff2d20;
    margin-right: 0.35rem;
}

.project-card h3 .fa-python {
    color: #ca8a04;
}

.project-card h3 .fa-users-gear {
    color: var(--accent);
}

.featured-project {
    background: linear-gradient(135deg, rgba(109, 40, 217, 0.08), rgba(15, 118, 110, 0.08)), var(--paper);
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: auto;
}

.chip-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1rem;
    font-weight: 800;
}

.card-link i {
    transition: transform var(--motion-fast) ease;
}

.card-link:hover i,
.card-link:focus i {
    transform: translateX(4px);
}

.topic-card i {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: 0.85rem;
    border-radius: 8px;
    background: rgba(15, 118, 110, 0.12);
    color: var(--accent);
    font-size: 1.15rem;
    transition: transform var(--motion-medium) ease, background var(--motion-medium) ease;
}

.topic-card:hover > i {
    transform: translateY(-3px) rotate(-4deg) scale(1.08);
}

.topic-card:nth-child(2n) i {
    background: rgba(109, 40, 217, 0.12);
    color: var(--primary);
}

.topic-card:nth-child(3n) i {
    background: rgba(245, 158, 11, 0.16);
    color: #b45309;
}

.flex-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
}

#skills li,
#tools li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.45rem;
    border-radius: 6px;
    transition: background var(--motion-fast) ease, transform var(--motion-fast) ease;
}

#skills li:hover,
#tools li:hover {
    background: rgba(15, 118, 110, 0.08);
    transform: translateX(4px);
}

footer {
    background: #111827;
    color: #e5e7eb;
    padding: 3rem 1rem 2rem;
    margin-top: 3rem;
}

.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    width: min(1120px, 100%);
    margin: 0 auto 1.5rem;
    align-items: start;
}

.contact-copy h2 {
    color: #fff;
}

.contact-copy h2::before {
    background: linear-gradient(90deg, #fde68a, var(--accent));
}

.contact-copy p,
footer > p {
    max-width: 760px;
    margin: 0 0 1rem;
}

.page-main .contact-copy h2 {
    color: var(--ink);
}

.page-main .contact-copy p {
    color: var(--muted);
}

.page-main .contact-form {
    background: linear-gradient(135deg, rgba(109, 40, 217, 0.08), rgba(15, 118, 110, 0.08)), var(--paper);
    border-color: var(--line);
}

.page-main .contact-form label {
    color: var(--ink);
}

.page-main .contact-form input,
.page-main .contact-form textarea {
    background: var(--field);
    border-color: var(--line);
    color: var(--ink);
}

.contact-page-panel {
    border-bottom: 0;
}

footer > p {
    width: min(1120px, 100%);
    margin: 0 auto;
    text-align: center;
}

.contact-form {
    display: grid;
    gap: 0.65rem;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
    transition: transform var(--motion-medium) ease, box-shadow var(--motion-medium) ease, border-color var(--motion-medium) ease;
}

.contact-form:hover,
.contact-form:focus-within {
    transform: translateY(-4px);
    border-color: rgba(253, 230, 138, 0.35);
    box-shadow: 0 24px 52px rgba(0, 0, 0, 0.24);
}

.contact-form label {
    color: #fff;
    font-weight: 800;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    color: #111827;
    font: inherit;
    padding: 0.75rem 0.85rem;
    outline: none;
    transition: border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease, transform var(--motion-fast) ease;
}

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

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #fde68a;
    box-shadow: 0 0 0 3px rgba(253, 230, 138, 0.22);
    transform: translateY(-2px);
}

.btn-send {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 46px;
    padding: 0.75rem 1rem;
    border: 0;
    border-radius: 8px;
    background: #fde68a;
    color: #111827;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
    transition: transform var(--motion-fast) ease, background var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}

.btn-send:hover,
.btn-send:focus {
    background: #facc15;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(250, 204, 21, 0.22);
    outline: none;
}

.form-status {
    min-height: 1.5rem;
    margin: 0;
    color: #fde68a;
    font-size: 0.95rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

footer a {
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 40px;
    padding: 0.45rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    transition: transform var(--motion-fast) ease, color var(--motion-fast) ease, background var(--motion-fast) ease;
}

footer a:hover {
    color: #fde68a;
    text-decoration: none;
    transform: translateY(-2px);
}

.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity var(--motion-slow) ease, transform var(--motion-slow) ease;
    transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.project-card.reveal.is-visible:hover,
.topic-card.reveal.is-visible:hover,
.flex-sections > section.reveal.is-visible:hover {
    transform: translateY(-7px);
}

.contact-form.reveal.is-visible:hover,
.contact-form.reveal.is-visible:focus-within {
    transform: translateY(-4px);
}

.whatsapp-float {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 30;
    display: inline-grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    font-size: 1.8rem;
    box-shadow: 0 16px 35px rgba(37, 211, 102, 0.35);
    text-decoration: none;
    transition: transform var(--motion-fast) ease, box-shadow var(--motion-fast) ease, background var(--motion-fast) ease;
}

.whatsapp-float:hover,
.whatsapp-float:focus {
    background: #1ebe5d;
    color: #fff;
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 20px 45px rgba(37, 211, 102, 0.45);
    text-decoration: none;
    outline: none;
}

@media (max-width: 980px) {
    header {
        padding-inline: 1rem;
    }

    nav {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        max-width: 100%;
        margin-bottom: 2rem;
        scrollbar-width: thin;
    }

    .nav-brand {
        margin-right: 0;
    }

    .profile-header {
        grid-template-columns: minmax(140px, 190px) minmax(0, 1fr);
        gap: 1.5rem;
    }

    .page-hero {
        padding: 1.5rem;
    }

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

    .overview-strip {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 720px) {
    header {
        padding: 0.75rem 0.75rem 3rem;
    }

    nav {
        position: relative;
        top: 0;
        justify-content: flex-start;
        margin-bottom: 2rem;
        border-radius: 10px;
        padding: 0.35rem;
    }

    .profile-header {
        grid-template-columns: 1fr;
        text-align: left;
        border-radius: 14px;
        padding: 1rem;
    }

    .page-header {
        padding: 0.75rem 0.75rem 3rem;
    }

    .page-hero {
        border-radius: 14px;
        padding: 1.25rem;
    }

    .profile-header img {
        width: 150px;
        height: 150px;
        justify-self: center;
    }

    .profile-info h1 {
        font-size: clamp(2.1rem, 13vw, 3.25rem);
    }

    .page-hero h1 {
        font-size: clamp(2rem, 12vw, 3.1rem);
    }

    .profile-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .profile-highlights {
        grid-template-columns: 1fr;
    }

    main {
        width: min(100% - 1rem, 1120px);
        padding: 1rem;
        border-radius: 8px;
    }

    main > section {
        padding: 1.5rem 0 1.8rem;
    }

    .timeline {
        padding-left: 1rem;
    }

    .flex-sections,
    .topic-grid,
    #about ul {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    body {
        line-height: 1.55;
    }

    nav a,
    .theme-toggle {
        min-height: 36px;
        padding: 0.4rem 0.55rem;
        font-size: 0.9rem;
    }

    .nav-brand {
        min-width: max-content;
    }

    .profile-header img {
        width: 128px;
        height: 128px;
    }

    .profile-info p,
    .section-intro {
        font-size: 0.98rem;
    }

    .btn-cv,
    .btn-secondary,
    .btn-send {
        width: 100%;
    }

    main {
        width: min(100% - 0.5rem, 1120px);
        padding: 0.85rem;
        margin-top: -2rem;
    }

    .page-main {
        margin-top: -2rem;
    }

    .project-card,
    .topic-card,
    .flex-sections > section,
    .experience-item,
    .overview-card {
        padding: 1rem;
    }

    .chip-row span {
        font-size: 0.78rem;
    }

    footer {
        padding-inline: 0.75rem;
    }

    .footer-links {
        justify-content: stretch;
    }

    footer a {
        flex: 1 1 135px;
        justify-content: center;
    }

    .whatsapp-float {
        right: 0.9rem;
        bottom: 0.9rem;
        width: 52px;
        height: 52px;
        font-size: 1.55rem;
    }

    .contribution-container {
        padding: 0.75rem;
    }
}

/* Contribution Graph Section */
#contributions {
    background: var(--paper);
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 12px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

#contributions h2 {
    color: var(--ink);
    margin-bottom: 0.5rem;
    font-size: 1.875rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#contributions h2 i {
    color: var(--primary);
}

#contributions .section-intro {
    color: var(--muted);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.contribution-container {
    display: flex;
    justify-content: center;
    padding: 1.5rem;
    background: var(--surface);
    border-radius: 8px;
    border: 1px solid var(--line);
    margin-top: 1rem;
    overflow: auto;
}

.contribution-graph {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    transition: transform var(--motion-medium) ease;
}

.contribution-graph:hover {
    transform: scale(1.02);
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 1ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
