/* ================================================================
   PORTFOLIO FRONTEND STYLES
================================================================ */
:root {
    --p-primary: #2D6A4F;
    --p-primary-light: #40916C;
    --p-dark: #1a1a2e;
    --p-darker: #16213e;
    --p-accent: #D97706;
    --p-text: #333;
    --p-text-light: #666;
    --p-bg: #ffffff;
    --p-bg-alt: #f8f9fa;
    --p-border: #e5e7eb;
}

[data-theme="dark"] {
    --p-text: #f9fafb;
    --p-text-light: #d1d5db;
    --p-bg: #1f2937;
    --p-bg-alt: #111827;
    --p-border: #374151;
}

body.portfolio {
    font-family: 'Nunito', sans-serif;
    background: var(--p-bg);
    color: var(--p-text);
    overflow-x: hidden;
}

/* ─── Hero ───────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-slider {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease;
}

.hero-slide.active {
    opacity: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
    width: 100%;
}

.hero-text-wrap {
    position: relative;
    min-height: 280px;
}

.hero-text-item {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    transform: translateY(20px);
    transition: all .8s ease;
    pointer-events: none;
}

.hero-text-item.active {
    opacity: 1;
    transform: translateY(0);
    position: relative;
    pointer-events: auto;
}

.hero-text-item .hero-title,
.hero-text-item .hero-subtitle,
.hero-text-item .hero-btns {
    animation: fadeInUp .8s ease forwards;
}

.hero-nav-dots {
    display: flex;
    gap: .5rem;
    justify-content: center;
    margin-top: 2rem;
}

.hero-nav-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .4);
    border: none;
    cursor: pointer;
    transition: all .3s;
}

.hero-nav-dot.active {
    background: #fff;
    width: 28px;
    border-radius: 5px;
}

.hero-scroll {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    z-index: 3;
    animation: bounce 2s infinite;
}

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

.hero-scroll-wheel {
    width: 3px;
    height: 8px;
    background: rgba(255, 255, 255, .8);
    border-radius: 2px;
    animation: scrollWheel 1.5s infinite;
}

@keyframes scrollWheel {
    0% {
        opacity: 1;
        transform: translateY(0)
    }

    100% {
        opacity: 0;
        transform: translateY(10px)
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0)
    }

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

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, .85);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-btn {
    padding: .875rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: .95rem;
    transition: all .3s;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}

.hero-btn-primary {
    background: #fff;
    color: var(--p-primary);
}

.hero-btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
}

.hero-btn-outline {
    border: 2px solid #fff;
    color: #fff;
    background: transparent;
}

.hero-btn-outline:hover {
    background: #fff;
    color: var(--p-primary);
    transform: scale(1.05);
}

/* Particles */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, .3);
    border-radius: 50%;
    animation: floatUp 15s infinite linear;
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0
    }

    10% {
        opacity: 1
    }

    90% {
        opacity: 1
    }

    100% {
        transform: translateY(-100px) scale(1);
        opacity: 0
    }
}

/* ─── Section common ─────────────────────────────── */
.section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--p-text);
    margin-bottom: .5rem;
}

.section-subtitle {
    color: var(--p-text-light);
    font-size: 1rem;
}

.section-divider {
    width: 60px;
    height: 4px;
    background: var(--p-primary);
    border-radius: 2px;
    margin: 1rem auto;
}

/* ─── About ──────────────────────────────────────── */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: center;
}

.about-img {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.about-img img {
    width: 100%;
    height: auto;
}

.about-text h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.about-text p {
    color: var(--p-text-light);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.about-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.about-info-item {
    display: flex;
    flex-direction: column;
}

.about-info-item label {
    font-size: .8rem;
    color: var(--p-text-light);
}

.about-info-item span {
    font-weight: 600;
}

/* ─── Services ───────────────────────────────────── */
.services-grid {
    display: grid;
    align-items: center;
    justify-content: center;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.service-card {
    background: var(--p-bg);
    border: 1px solid var(--p-border);
    border-radius: 16px;
    padding: 2rem;
    transition: all .3s;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, .1);
    border-color: var(--p-primary);
}

.service-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--p-primary), var(--p-primary-light));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 1.5rem;
    transition: transform .3s;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.service-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: .75rem;
}

.service-card p {
    color: var(--p-text-light);
    font-size: .9rem;
    line-height: 1.6;
}

/* ─── Skills ─────────────────────────────────────── */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.skill-item {
    background: var(--p-bg);
    border: 1px solid var(--p-border);
    border-radius: 12px;
    padding: 1.25rem;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .75rem;
}

.skill-name {
    font-weight: 600;
    font-size: .95rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.skill-name i {
    color: var(--p-primary);
}

.skill-percent {
    font-size: .85rem;
    font-weight: 700;
    color: var(--p-primary);
}

.skill-bar {
    height: 8px;
    background: var(--p-bg-alt);
    border-radius: 4px;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--p-primary), var(--p-primary-light));
    border-radius: 4px;
    transition: width 1.5s ease;
}

/* ─── Experience timeline ────────────────────────── */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--p-border);
}

.timeline-item {
    position: relative;
    padding-left: 80px;
    padding-bottom: 2rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: 21px;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--p-primary);
    border: 3px solid var(--p-bg);
    box-shadow: 0 0 0 3px var(--p-primary);
}

.timeline-content {
    background: var(--p-bg);
    border: 1px solid var(--p-border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all .3s;
}

.timeline-content:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, .08);
    transform: translateX(4px);
}

.timeline-period {
    font-size: .8rem;
    font-weight: 600;
    color: var(--p-primary);
    margin-bottom: .5rem;
}

.timeline-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: .25rem;
}

.timeline-company {
    font-size: .95rem;
    color: var(--p-text-light);
    margin-bottom: .75rem;
}

.timeline-desc {
    font-size: .9rem;
    color: var(--p-text-light);
    line-height: 1.6;
    white-space: pre-line;
}

/* ─── Portfolio ──────────────────────────────────── */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.portfolio-card {
    background: var(--p-bg);
    border: 1px solid var(--p-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all .3s;
}

.portfolio-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, .12);
}

.portfolio-img {
    height: 220px;
    overflow: hidden;
    background: var(--p-bg-alt);
}

.portfolio-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s;
}

.portfolio-card:hover .portfolio-img img {
    transform: scale(1.08);
}

.portfolio-body {
    padding: 1.5rem;
}

.portfolio-cat {
    font-size: .75rem;
    font-weight: 600;
    color: var(--p-primary);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: .5rem;
}

.portfolio-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: .5rem;
}

.portfolio-card p {
    font-size: .9rem;
    color: var(--p-text-light);
    line-height: 1.5;
    margin-bottom: .75rem;
}

.portfolio-tech {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: .75rem;
}

.portfolio-tech span {
    font-size: .7rem;
    padding: .2rem .6rem;
    border-radius: 20px;
    background: var(--p-bg-alt);
    color: var(--p-text-light);
    font-weight: 600;
}

.portfolio-links {
    display: flex;
    gap: .75rem;
}

.portfolio-links a {
    font-size: .85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    color: var(--p-primary);
}

.portfolio-links a:hover {
    color: var(--p-primary-light);
}

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

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-info-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--p-primary), var(--p-primary-light));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.contact-info-item h4 {
    font-size: .9rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.contact-info-item p {
    font-size: .85rem;
    color: var(--p-text-light);
}

.contact-form {
    background: var(--p-bg);
    border: 1px solid var(--p-border);
    border-radius: 16px;
    padding: 2rem;
}

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

.contact-form .form-group {
    margin-bottom: 1rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: .75rem 1rem;
    border: 1px solid var(--p-border);
    border-radius: 10px;
    background: var(--p-bg);
    color: var(--p-text);
    font-size: 14px;
    font-family: inherit;
    transition: all .2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--p-primary);
    box-shadow: 0 0 0 3px rgba(45, 106, 79, .12);
}

/* ─── Social links ───────────────────────────────── */
.social-links {
    display: flex;
    gap: .75rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--p-bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--p-text-light);
    transition: all .3s;
}

.social-link:hover {
    background: var(--p-primary);
    color: #fff;
    transform: translateY(-3px);
}

/* ─── Footer ─────────────────────────────────────── */
.p-footer {
    background: var(--p-darker);
    color: rgba(255, 255, 255, .7);
    padding: 2rem 0;
    text-align: center;
}

.p-footer a {
    color: #fff;
}

/* ─── Back to top ────────────────────────────────── */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--p-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: all .3s;
    z-index: 50;
    border: none;
    box-shadow: 0 4px 15px rgba(45, 106, 79, .3);
}

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

.back-to-top:hover {
    background: var(--p-primary-light);
}

/* ─── Nav ────────────────────────────────────────── */
.p-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 0;
    transition: all .3s;
}

.p-nav.scrolled {
    background: var(--p-bg);
    box-shadow: 0 2px 20px rgba(0, 0, 0, .08);
    padding: .5rem 0;
}

.p-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.p-nav-logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    transition: color .3s;
}

.p-nav.scrolled .p-nav-logo {
    color: var(--p-text);
}

.p-nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.p-nav-links a {
    font-size: .9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, .85);
    transition: color .3s;
}

.p-nav.scrolled .p-nav-links a {
    color: var(--p-text-light);
}

.p-nav-links a:hover {
    color: var(--p-primary);
}

.p-nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #fff;
    cursor: pointer;
}

.p-nav.scrolled .p-nav-toggle {
    color: var(--p-text);
}

@media (max-width:768px) {

    .about-grid,
    .contact-grid,
    .form-row {
        grid-template-columns: 1fr;
    }

    .p-nav-links {
        display: none;
    }

    .p-nav-toggle {
        display: block;
    }

    .p-nav-links.mobile-show {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--p-bg);
        flex-direction: column;
        padding: 1rem;
        gap: .5rem;
        box-shadow: 0 4px 20px rgba(0, 0, 0, .1);
    }

    .p-nav-links.mobile-show a {
        color: var(--p-text);
        padding: .5rem 0;
    }

    .hero-title {
        font-size: 2rem;
    }

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

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

    .timeline::before {
        left: 15px;
    }

    .timeline-item {
        padding-left: 50px;
    }

    .timeline-dot {
        left: 6px;
    }
}

/* ─── SillonSchool-inspired portfolio surface ─────────────── */
body.portfolio {
    background: var(--p-bg);
    color: var(--p-text);
}

.p-nav {
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid #eef1f0;
    padding: .75rem 0;
    backdrop-filter: blur(16px);
}

[data-theme="dark"] .p-nav {
    background: rgba(31, 41, 55, .96);
    border-color: var(--p-border);
}

.p-nav-inner {
    max-width: 1280px;
    height: 60px;
}

.p-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .7rem;
    color: var(--p-text);
    font-size: 1.15rem;
    font-weight: 800;
}

.p-brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--p-primary), var(--p-primary-light));
    box-shadow: 0 8px 18px rgba(45, 106, 79, .2);
}

.p-nav-links a {
    color: var(--p-text-light);
    font-size: .86rem;
}

.p-nav-links a:hover {
    color: var(--p-primary);
}

.p-nav-actions {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.p-theme-toggle {
    width: 42px;
    height: 42px;
    border: 1px solid var(--p-border);
    border-radius: 50%;
    background: var(--p-bg);
    color: var(--p-text);
    cursor: pointer;
    font-size: 1.1rem;
}

.p-theme-toggle:hover {
    color: var(--p-primary);
    border-color: var(--p-primary);
}

.p-nav-cta {
    background: var(--p-primary);
    color: #fff;
    border-radius: 12px;
    padding: .75rem 1.1rem;
    font-size: .85rem;
    font-weight: 700;
    transition: all .25s;
}

.p-nav-cta:hover {
    background: var(--p-primary-light);
    color: #fff;
    transform: translateY(-2px);
}

.p-nav-toggle {
    color: var(--p-text);
}

.hero {
    min-height: 720px;
    padding: 125px 1.5rem 70px;
    background: var(--p-bg);
}

.hero-slider {
    opacity: .05;
}

.hero-slide {
    background-position: center;
    background-size: cover;
}

.p-hero-grid {
    max-width: 1080px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr .9fr;
    gap: 5rem;
    align-items: center;
    text-align: left;
}

.p-hero-copy {
    min-width: 0;
}

.p-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem .85rem;
    background: rgba(45, 106, 79, .1);
    color: var(--p-primary);
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.hero-title {
    color: var(--p-text);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.1;
    letter-spacing: -.04em;
    margin-bottom: 1.25rem;
}

.hero-title span {
    color: var(--p-primary);
}

.hero-subtitle {
    color: var(--p-text-light);
    font-size: 1rem;
    line-height: 1.8;
    max-width: 580px;
    margin: 0 0 1.75rem;
}

.hero-btns {
    justify-content: flex-start;
    gap: .8rem;
}

.hero-btn {
    border-radius: 12px;
    padding: .9rem 1.25rem;
    font-size: .88rem;
}

.hero-btn-primary {
    color: #fff;
    background: var(--p-primary);
    box-shadow: 0 10px 22px rgba(45, 106, 79, .2);
}

.hero-btn-primary:hover {
    background: var(--p-primary-light);
    color: #fff;
    transform: translateY(-2px);
}

.hero-btn-outline {
    border: 1px solid var(--p-border);
    color: var(--p-text);
    background: var(--p-bg);
}

.hero-btn-outline:hover {
    color: var(--p-primary);
    border-color: var(--p-primary);
    background: rgba(45, 106, 79, .05);
}

.hero-text-wrap {
    min-height: 330px;
}

.hero-text-item {
    text-align: left;
}

.p-hero-social {
    margin-top: 1.5rem;
}

.p-hero-visual {
    position: relative;
    min-height: 390px;
    display: grid;
    place-items: center;
}

.p-visual-tilt {
    position: absolute;
    width: 94%;
    height: 82%;
    border-radius: 30px;
    background: rgba(45, 106, 79, .1);
    transform: rotate(4deg);
}

.p-profile-card {
    position: relative;
    width: min(100%, 430px);
    border: 1px solid var(--p-border);
    border-radius: 26px;
    background: var(--p-bg);
    box-shadow: 0 25px 60px rgba(15, 23, 42, .12);
    overflow: hidden;
    transform: rotate(-2deg);
    transition: transform .4s;
}

.p-profile-card:hover {
    transform: rotate(0) translateY(-6px);
}

.p-profile-window {
    height: 48px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 1.1rem;
    border-bottom: 1px solid var(--p-border);
    color: var(--p-text-light);
}

.p-profile-window span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #fca5a5;
}

.p-profile-window span:nth-child(2) {
    background: #fcd34d
}

.p-profile-window span:nth-child(3) {
    background: #86efac
}

.p-profile-window small {
    margin-left: .5rem;
    font-size: .72rem
}

.p-profile-body {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
}

.p-profile-image {
    width: 108px;
    height: 108px;
    border-radius: 24px;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: rgba(45, 106, 79, .1);
    color: var(--p-primary);
    font-size: 3rem;
    flex-shrink: 0;
}

.p-profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.p-profile-body strong {
    display: block;
    font-size: 1.25rem
}

.p-profile-body p {
    color: var(--p-text-light);
    font-size: .85rem;
    margin-top: .35rem;
    line-height: 1.5
}

.p-profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--p-border);
    border-top: 1px solid var(--p-border);
}

.p-profile-stats div {
    background: var(--p-bg);
    padding: 1.1rem;
    text-align: center
}

.p-profile-stats strong {
    display: block;
    color: var(--p-primary);
    font-size: 1.35rem
}

.p-profile-stats span {
    display: block;
    color: var(--p-text-light);
    font-size: .72rem;
    margin-top: .2rem
}

.hero-scroll {
    display: none;
}

.section {
    padding: 5.5rem 0;
}

.section-header {
    margin-bottom: 2.5rem
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--p-text);
    margin-bottom: .5rem;
    text-align: center;
}

.section-divider {
    height: 4px;
    width: 48px
}

.service-card,
.skill-item,
.timeline-content,
.portfolio-card,
.contact-form {
    box-shadow: 0 8px 25px rgba(15, 23, 42, .04)
}

.service-card:hover,
.portfolio-card:hover {
    box-shadow: 0 18px 35px rgba(15, 23, 42, .1)
}

/* ─── Références : scroll horizontal ───────────────── */

.services-grid.references-scroll {
    display: block;
    overflow: hidden;
    width: 100%;
    position: relative;
}

.references-scroll-track {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    width: max-content;
    animation: references-scroll-right 70s linear infinite;
}

.references-scroll-track .service-card {
    flex: 0 0 340px;
    width: 340px;
    min-width: 340px;
}

/* Défilement lent */
@keyframes references-scroll-right {
    from {
        transform: translateX(-var(--scroll-distance, 50%));
    }

    to {
        transform: translateX(0);
    }
}

/* Pause au survol */
.services-grid.references-scroll:hover .references-scroll-track {
    animation-play-state: paused;
}

/* Sur mobile */
@media (max-width: 768px) {

    .references-scroll-track {
        animation-duration: 55s;
    }

    .references-scroll-track .service-card {
        flex: 0 0 300px;
        width: 300px;
        min-width: 300px;
    }
}

@media(max-width:768px) {
    .p-nav-cta {
        display: none
    }

    .p-nav-inner {
        height: 52px
    }

    .p-nav {
        padding: .5rem 0
    }

    .p-nav-links.mobile-show {
        top: 100%;
        border-top: 1px solid var(--p-border)
    }

    .hero {
        padding: 110px 1rem 55px;
        min-height: auto
    }

    .p-hero-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center
    }

    .p-hero-copy {
        text-align: center
    }

    .p-eyebrow {
        margin-bottom: 1rem
    }

    .hero-title {
        font-size: 2.65rem
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto
    }

    .hero-btns {
        justify-content: center
    }

    .p-hero-social {
        justify-content: center
    }

    .p-hero-visual {
        min-height: 320px
    }

    .hero-text-wrap {
        min-height: 360px
    }

    .p-profile-card {
        max-width: 390px
    }

    .p-profile-body {
        text-align: left
    }

    .p-nav-links.mobile-show a {
        color: var(--p-text);
        padding: .7rem 0
    }
}
/* ─── Public page wrapper & footer ───────────────────────────── */

.p-page-wrap {
    min-height: 70vh;
    padding-top: 90px;
    position: relative;
    overflow: hidden;
}


/* ─── Public page hero ───────────────────────────────────────── */

.p-page-hero {
    position: relative;
    padding: 4.5rem 1.5rem 3.5rem;
    text-align: center;
    background:
        radial-gradient(
            circle at 50% 0%,
            color-mix(in srgb, var(--p-primary) 10%, transparent),
            transparent 45%
        ),
        var(--p-bg-alt);
    overflow: hidden;
}

/* Lumière décorative */
.p-page-hero::before {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    top: -250px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--p-primary);
    opacity: .06;
    filter: blur(80px);
    border-radius: 50%;
    pointer-events: none;
}

/* Petite ligne décorative */
.p-page-hero::after {
    content: "";
    position: absolute;
    width: 80px;
    height: 3px;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        var(--p-primary),
        var(--p-primary-light)
    );
    animation: pageHeroLine 1s ease-out both;
}


.p-page-hero .p-eyebrow {
    position: relative;
    z-index: 1;
    margin: 0 auto 1rem;
    animation: pageFadeUp .7s ease both;
}


.p-page-hero h1 {
    position: relative;
    z-index: 1;

    font-size: clamp(2.1rem, 5vw, 3.4rem);
    font-weight: 800;
    line-height: 1.1;

    color: var(--p-text);
    letter-spacing: -.04em;

    margin: 0 0 .75rem;

    animation: pageFadeUp .7s ease .1s both;
}


.p-page-hero p {
    position: relative;
    z-index: 1;

    color: var(--p-text-light);
    font-size: 1rem;
    line-height: 1.7;

    max-width: 620px;
    margin: 0 auto;

    animation: pageFadeUp .7s ease .2s both;
}

/* ─── Public footer ─────────────────────────────────────────── */

.p-footer {
    position: relative;

    background:
        radial-gradient(
            circle at 15% 20%,
            rgba(37, 99, 235, .12),
            transparent 30%
        ),
        radial-gradient(
            circle at 85% 80%,
            rgba(22, 163, 74, .08),
            transparent 30%
        ),
        #16213e;

    color: rgba(255, 255, 255, .7);

    padding: 4rem 0 1.5rem;
    margin-top: 4rem;

    overflow: hidden;
}


/* ─── Ligne lumineuse supérieure ───────────────────────────── */

.p-footer::before {
    content: "";

    position: absolute;
    top: 0;
    left: 0;

    width: 100%;
    height: 2px;

    background: linear-gradient(
        90deg,
        transparent,
        var(--p-primary),
        var(--p-primary-light),
        var(--p-primary),
        transparent
    );

    background-size: 200% 100%;

    animation: footerLine 6s linear infinite;
}


/* ─── Lumière décorative ───────────────────────────────────── */

.p-footer::after {
    content: "";

    position: absolute;

    width: 500px;
    height: 500px;

    right: -250px;
    bottom: -300px;

    background: var(--p-primary);

    opacity: .04;

    border-radius: 50%;

    filter: blur(80px);

    pointer-events: none;
}


/* ─── Footer dark mode ─────────────────────────────────────── */

[data-theme="dark"] .p-footer {
    background:
        radial-gradient(
            circle at 15% 20%,
            rgba(37, 99, 235, .14),
            transparent 30%
        ),
        radial-gradient(
            circle at 85% 80%,
            rgba(22, 163, 74, .08),
            transparent 30%
        ),
        #111827;
}


/* ─── Footer grid ──────────────────────────────────────────── */

.p-footer-grid {
    position: relative;
    z-index: 1;

    display: grid;

    grid-template-columns:
        minmax(280px, 2fr)
        minmax(140px, 1fr)
        minmax(140px, 1fr);

    gap: 3rem;

    margin-bottom: 2.5rem;
}


/* ─── Footer headings ──────────────────────────────────────── */

.p-footer h4 {
    color: #fff;

    font-size: .9rem;
    font-weight: 700;

    margin: 0 0 1rem;

    letter-spacing: .01em;
}


/* ─── Footer links ─────────────────────────────────────────── */

.p-footer a,
.p-footer span {
    display: block;

    color: rgba(255, 255, 255, .6);

    font-size: .85rem;
    line-height: 1.6;

    margin-bottom: .55rem;

    text-decoration: none;

    transition:
        color .25s ease,
        transform .25s ease;
}


.p-footer a:hover {
    color: var(--p-primary-light);

    transform: translateX(4px);
}


/* ─── Footer bio ───────────────────────────────────────────── */

.p-footer-bio {
    font-size: .85rem;
    line-height: 1.75;

    max-width: 340px;

    color: rgba(255, 255, 255, .62);
}


/* ─── Social links ─────────────────────────────────────────── */

.p-footer .social-link {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    margin: .2rem .35rem .2rem 0;

    border: 1px solid rgba(255, 255, 255, .08);

    border-radius: 10px;

    background: rgba(255, 255, 255, .06);

    color: rgba(255, 255, 255, .72);

    transition:
        transform .3s ease,
        background .3s ease,
        color .3s ease,
        border-color .3s ease,
        box-shadow .3s ease;
}


.p-footer .social-link:hover {
    background: var(--p-primary);

    color: #fff;

    border-color: var(--p-primary);

    transform:
        translateY(-4px)
        scale(1.05);

    box-shadow:
        0 10px 25px
        rgba(0, 0, 0, .2);
}


/* ─── Icônes contact ───────────────────────────────────────── */

.p-footer a i,
.p-footer span i {
    margin-right: .35rem;
    opacity: .8;

    transition:
        opacity .25s ease,
        transform .25s ease;
}


.p-footer a:hover i {
    opacity: 1;
}


/* ─── Footer bottom ────────────────────────────────────────── */

.p-footer-bottom {
    position: relative;
    z-index: 1;

    border-top: 1px solid rgba(255, 255, 255, .08);

    padding-top: 1.5rem;

    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 1rem;
}


.p-footer-bottom p {
    font-size: .8rem;
    line-height: 1.5;

    color: rgba(255, 255, 255, .5);

    margin: 0;
}


/* ─── Animation du footer ──────────────────────────────────── */

.p-footer.footer-ready .p-footer-grid > div,
.p-footer.footer-ready .p-footer-bottom {
    opacity: 0;

    transform: translateY(18px);
}


.p-footer.footer-visible .p-footer-grid > div,
.p-footer.footer-visible .p-footer-bottom {
    opacity: 1;

    transform: translateY(0);

    transition:
        opacity .7s ease,
        transform .7s ease;
}


.p-footer.footer-visible .p-footer-grid > div:nth-child(1) {
    transition-delay: .05s;
}


.p-footer.footer-visible .p-footer-grid > div:nth-child(2) {
    transition-delay: .15s;
}


.p-footer.footer-visible .p-footer-grid > div:nth-child(3) {
    transition-delay: .25s;
}


.p-footer.footer-visible .p-footer-bottom {
    transition-delay: .35s;
}


/* ─── Animation ligne supérieure ───────────────────────────── */

@keyframes footerLine {

    0% {
        background-position: 200% 0;
    }

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

}


/* ─── Animation page hero ──────────────────────────────────── */

@keyframes pageFadeUp {

    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

}


@keyframes pageHeroLine {

    from {
        width: 0;
        opacity: 0;
    }

    to {
        width: 80px;
        opacity: 1;
    }

}


/* ─── Responsive tablette ──────────────────────────────────── */

@media (max-width: 900px) {

    .p-footer-grid {
        grid-template-columns:
            1.5fr 1fr;

        gap: 2.5rem;
    }

}


/* ─── Responsive mobile ───────────────────────────────────── */

@media (max-width: 768px) {

    .p-page-wrap {
        padding-top: 70px;
    }


    .p-page-hero {
        padding:
            3.5rem 1.25rem
            2.75rem;
    }


    .p-page-hero h1 {
        font-size: clamp(
            1.9rem,
            9vw,
            2.6rem
        );
    }


    .p-page-hero p {
        font-size: .9rem;
        line-height: 1.65;
    }


    .p-footer {
        padding:
            3.5rem 0
            1.25rem;

        margin-top: 3rem;
    }


    .p-footer-grid {
        grid-template-columns: 1fr;

        gap: 2.2rem;

        text-align: center;
    }


    .p-footer-bio {
        margin-left: auto;
        margin-right: auto;
    }


    .p-footer a:hover {
        transform: none;
    }


    .p-footer .social-link {
        margin-left: .2rem;
        margin-right: .2rem;
    }


    .p-footer-bottom {
        flex-direction: column;

        justify-content: center;

        text-align: center;

        gap: .75rem;

        padding-top: 1.25rem;
    }

}


/* ─── Très petits écrans ───────────────────────────────────── */

@media (max-width: 420px) {

    .p-page-hero {
        padding:
            3rem 1rem
            2.5rem;
    }


    .p-page-hero h1 {
        font-size: 1.85rem;
    }


    .p-page-hero p {
        font-size: .85rem;
    }


    .p-footer {
        padding-top: 3rem;
    }


    .p-footer h4 {
        font-size: .85rem;
    }


    .p-footer-bio,
    .p-footer a,
    .p-footer span {
        font-size: .82rem;
    }

}


/* ─── Accessibilité ────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {

    .p-page-hero *,
    .p-footer::before,
    .p-footer .social-link,
    .p-footer a,
    .p-footer.footer-ready .p-footer-grid > div,
    .p-footer.footer-ready .p-footer-bottom,
    .p-footer.footer-visible .p-footer-grid > div,
    .p-footer.footer-visible .p-footer-bottom {
        animation: none !important;

        transition: none !important;

        transform: none !important;

        opacity: 1 !important;
    }

}