/* ========== IMPORT FIRA CODE FONT ========== */
/* Font will be loaded dynamically after user consent to cookies (see RGPD banner).
   Keeping the family declaration but the import is injected via JavaScript when accepted. */


/* ========== DESIGN SYSTEM ========== */
:root {
    --bg-color: rgba(29, 29, 29, 1);
    --light-gray: rgba(186, 186, 186, 1);
    --main-blue: rgba(0, 243, 255, 1);
    --gradient-blue: linear-gradient(to right, #6C63FF, #67E8F9);
    --main-green: rgba(49, 255, 135, 1);
    --main-purple: rgba(183, 36, 255, 1);
    --main-orange: rgba(237, 83, 0, 1);
    --main-pink: rgba(255, 0, 208, 1);
    --card-bg: rgba(255, 255, 255, 0.1);
    --border-card: rgba(255, 255, 255, 0.2);
}

/* ========== COOKIE BANNER ========== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(29,29,29,0.95);
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    z-index: 1000;
}
.cookie-banner p {
    margin: 0 0.5rem 0.5rem 0;
    flex: 1 1 300px;
}
.cookie-banner button {
    background: var(--main-blue);
    border: none;
    color: dark;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}

/* ========== RESET ========== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

*:not(dialog) {
    margin: 0;
}

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

@media (prefers-reduced-motion: no-preference) {
    html {
        interpolate-size: allow-keywords;
        scroll-behavior: smooth;
    }
}

body {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    background-color: var(--bg-color);
    background-image: radial-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px);
    background-size: 28px 28px;
    background-attachment: fixed;
    font-family: 'Fira Code', monospace;
    overflow-x: clip;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

input,
button,
textarea,
select {
    font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}

p {
    text-wrap: pretty;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    text-wrap: balance;
}

li {
    list-style: none;
}

#root,
#__next {
    isolation: isolate;
}

/* ========== UTILITIES ========== */
.text-gray   { color: var(--light-gray); }
.text-blue   { color: var(--main-blue); }
.text-green  { color: var(--main-green); }
.text-purple { color: var(--main-purple); }
.text-orange { color: var(--main-orange); }
.text-pink   { color: var(--main-pink); }

.text-gradient {
    background: var(--gradient-blue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.card-heading {
    color: white;
    font-size: 1rem;
    font-weight: 700;
}

.section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 0 4rem;
}

.section-title {
    font-size: 3rem;
}

.section > .section-title {
    width: 80%;
    text-align: left;
    padding-left: 1.5rem;
    margin-bottom: 2rem;
}

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

/* ========== FADE-IN SCROLL ========== */
.fade-in {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== NAVBAR ========== */
.navbar {
    background-color: rgba(29, 29, 29, 0.45);
    border-bottom: rgba(255, 255, 255, 0.1) 1px solid;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}

.nav-logo {
    border-radius: 50%;
    height: 50px;
    margin: 6px;
}

.nav-title {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.navbar nav a {
    color: var(--light-gray);
    text-decoration: none;
    font-weight: 800;
    font-size: 1.2rem;
    transition: color 0.2s;
}

.navbar nav a:hover {
    color: var(--main-blue);
}

/* ========== NAV SOCIAL ========== */
.nav-social {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-left: 1.5rem;
    margin-left: 0.5rem;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.nav-social-link {
    color: var(--light-gray);
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.nav-social-link:hover {
    color: var(--main-blue);
}

/* ========== BURGER BUTTON ========== */
.nav-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 101;
}

.nav-burger span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--light-gray);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.navbar.is-open .nav-burger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.navbar.is-open .nav-burger span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.navbar.is-open .nav-burger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ========== SECTION HERO ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(32px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 62px);
    gap: 100px;
}

.hero-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: fit-content;
    animation: fadeInUp 0.7s ease-out both;
}

.profile-picture {
    border-radius: 50%;
    height: 20rem;
}

.location {
    display: flex;
}

.skills {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeInUp 0.7s ease-out 0.2s both;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    max-width: 480px;
}

.skill-tag {
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    font-size: 0.9rem;
    border: 1px solid;
}

.tag-blue   { color: var(--main-blue);   border-color: rgba(0, 243, 255, 0.35);   background-color: rgba(0, 243, 255, 0.08); }
.tag-purple { color: var(--main-purple); border-color: rgba(183, 36, 255, 0.35);  background-color: rgba(183, 36, 255, 0.08); }
.tag-orange { color: var(--main-orange); border-color: rgba(237, 83, 0, 0.35);    background-color: rgba(237, 83, 0, 0.08); }
.tag-pink   { color: var(--main-pink);   border-color: rgba(255, 0, 208, 0.35);   background-color: rgba(255, 0, 208, 0.08); }
.tag-green  { color: var(--main-green);  border-color: rgba(49, 255, 135, 0.35);  background-color: rgba(49, 255, 135, 0.08); }

/* ========== SECTION PROJETS ========== */
.section-projects {
    padding-bottom: 4rem;
    position: relative;
    overflow-x: clip;
}

.section-projects::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(103, 232, 249, 0.15) 0%, transparent 70%);
    top: -100px;
    right: -150px;
    pointer-events: none;
    z-index: 0;
}

.section-projects::after {
    content: '';
    position: absolute;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(237, 83, 0, 0.18) 0%, transparent 70%);
    bottom: -100px;
    left: -100px;
    pointer-events: none;
    z-index: 0;
}

.section-projects > * {
    position: relative;
    z-index: 1;
}

.projects-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 80%;
}

.project-card {
    display: flex;
    flex-direction: row;
    gap: 2.5rem;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: default;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(108, 99, 255, 0.2);
    border-color: rgba(108, 99, 255, 0.5);
}

.project-card-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    min-width: 220px;
    max-width: 240px;
}

.project-logo-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 12px;
    padding: 0.75rem 1rem;
}

.project-logo {
    height: 40px;
    width: 40px;
}

.project-name {
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
}

.project-type {
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.project-status {
    font-size: 0.85rem;
    color: var(--main-orange);
}

.project-stack-label {
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    margin-top: 0.4rem;
}

.project-stack {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    font-size: 0.8rem;
}

.project-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.project-features {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.9rem;
}

.project-features li::before {
    content: '• ';
}

/* ========== SECTION CONTACT ========== */
.section-contact {
    padding-bottom: 6rem;
    position: relative;
    overflow-x: clip;
}

.section-contact::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(237, 83, 0, 0.2) 0%, transparent 70%);
    bottom: -200px;
    right: -150px;
    pointer-events: none;
    z-index: 0;
}

.section-contact::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(183, 36, 255, 0.15) 0%, transparent 70%);
    top: 0;
    left: -100px;
    pointer-events: none;
    z-index: 0;
}

.section-contact > * {
    position: relative;
    z-index: 1;
}

.contact-card {
    width: 80%;
    padding: 2.5rem;
}

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

/* feedback message area shown after form submission */
.form-feedback {
    min-height: 2rem;
    color: var(--light-gray);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

/* hide honeypot field visually but keep it in markup */
.honeypot-group {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.honeypot-group input {
    pointer-events: none;
}

.form-feedback.success {
    color: var(--main-green);
}

.form-feedback.error {
    color: var(--main-orange);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: var(--light-gray);
    font-size: 1rem;
    font-weight: 600;
}

.required {
    color: red;
}

.form-group input,
.form-group textarea {
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-card);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    color: white;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    outline: none;
}

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

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--main-blue);
}

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

.btn-send {
    align-self: center;
    background-color: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    padding: 0.75rem 3rem;
    font-size: 1.1rem;
    font-weight: 700;
    background-image: var(--gradient-blue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
    transition: border-color 0.2s;
}

.btn-send:hover {
    border-color: var(--main-blue);
}

/* ========== FOOTER ========== */
.footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 80%;
    margin: 0 auto;
}

.footer-name {
    font-weight: 700;
    font-size: 1rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-link {
    color: var(--light-gray);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--main-blue);
}

.footer-copy {
    font-size: 0.85rem;
}

/* ========== RESPONSIVE ========== */

/* Tablet */
@media (max-width: 1024px) {
    .hero {
        gap: 3rem;
        padding: 0 2rem;
    }

    .profile-picture {
        height: 15rem;
    }

    .project-card-sidebar {
        min-width: 180px;
        max-width: 200px;
    }
}

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

    /* Navbar */
    .navbar nav {
        padding: 0 1rem;
    }

    .nav-title span {
        display: none;
    }

    .nav-social {
        display: none;
    }

    .nav-burger {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: center;
        gap: 0;
        background-color: rgba(29, 29, 29, 0.97);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 1rem 0;
    }

    .navbar.is-open .nav-links {
        display: flex;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .navbar nav a {
        display: block;
        padding: 0.75rem 2rem;
        font-size: 1.1rem;
    }

    /* Hero */
    .hero {
        flex-direction: column;
        gap: 2rem;
        padding: 2rem 1rem;
        min-height: auto;
        margin-top: 0;
    }

    .profile-picture {
        height: 10rem;
    }

    .skills {
        text-align: center;
    }

    .skills-list {
        max-width: 100%;
    }

    /* Sections */
    .section {
        padding: 2rem 1rem 3rem;
    }

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

    .section-subtitle {
        font-size: 1.1rem;
    }

    .section > .section-title {
        width: 100%;
        padding-left: 0;
        text-align: center;
    }

    .projects-list {
        width: 100%;
    }

    /* Project card */
    .project-card {
        flex-direction: column;
    }

    .project-card-sidebar {
        min-width: unset;
        max-width: 100%;
    }

    /* Contact */
    .contact-card {
        width: 100%;
        padding: 1.5rem;
    }

    /* Footer */
    .footer-inner {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        width: 100%;
    }
}
