/* --- CSS RESET E VARIÁVEIS --- */
:root {

    /* Paleta Principal */
    --primary: #004b87;
    /* Azul Escuro Corporativo */
    --primary-light: #0077c8;
    /* Azul Intermediário */
    --primary-dark: #003360;
    /* Azul Profundo para contrastes */
    --tech-blue: #0077c8;

    /* Paleta Secundária (Cinzas Industriais) */
    --gray-900: #1a1e23;
    --gray-800: #2c3e50;
    --gray-600: #64748b;
    --gray-400: #94a3b8;
    --gray-100: #f1f5f9;
    --white: #ffffff;

    /* Utilidades */
    --font-main: 'Inter', sans-serif;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.15);
    --radius: 8px;
    --container: 1200px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--gray-800);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
}

/* --- TIPOGRAFIA --- */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
    letter-spacing: -1px;
}

h2 {
    font-size: 2.5rem;
    letter-spacing: -0.5px;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
    color: var(--gray-600);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

.container {
    width: 90%;
    max-width: var(--container);
    margin: 0 auto;
}

/* --- BOTÕES --- */
.btn-primary,
.btn-primary-outline,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    box-shadow: 0 4px 14px rgba(0, 119, 200, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 119, 200, 0.4);
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: var(--white);
}

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

.btn-primary-outline:hover {
    background: var(--primary-light);
    color: var(--white);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-color: var(--white);
    color: var(--white);
}

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

.w-100 {
    width: 100%;
}

.mt-4 {
    margin-top: 1.5rem;
}

/* --- HEADER (GLASSMORPHISM) --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-sm);
}

.header.scrolled {
    padding: 0.7rem 0;
    background: rgba(255, 255, 255, 0.98);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-img {
    height: 80px;
    width: auto;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--gray-800);
}

.logo-text strong {
    color: var(--primary-light);
    font-weight: 700;
}

.nav-menu ul {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-menu a:not(.btn-primary-outline) {
    font-weight: 500;
    color: var(--gray-800);
    position: relative;
}

.nav-menu a:not(.btn-primary-outline)::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-light);
    transition: var(--transition);
}

.nav-menu a:not(.btn-primary-outline):hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
}

/* --- HERO SECTION --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    background: url('assets/hero-bg.png') center/cover no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 51, 96, 0.95) 0%, rgba(0, 119, 200, 0.75) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--white);
    max-width: 800px;
}

.hero h1 {
    color: var(--white);
    margin-bottom: 1.5rem;
}

.hero p {
    color: var(--gray-100);
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
}

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

/* --- COMMON SECTION LAYOUT --- */
.section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.section-header p {
    font-size: 1.1rem;
}

.bg-light {
    background-color: var(--gray-100);
}

/* --- SERVICES --- */
.services-badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 60px;
}

.service-badge {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary-light);
    transition: var(--transition);
    height: 100%;
}

.service-badge:hover {
    transform: translateX(5px) translateY(-2px);
    box-shadow: var(--shadow-md);
    border-left-color: var(--primary);
}

.service-badge i {
    font-size: 1.5rem;
    color: var(--primary-light);
    width: 50px;
    height: 50px;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    flex-shrink: 0;
}

.service-badge span {
    font-weight: 600;
    color: var(--gray-900);
    font-size: 1.05rem;
    line-height: 1.3;
}

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

.service-card {
    background: var(--white);
    padding: 2.5rem 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-bottom: 4px solid transparent;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-bottom-color: var(--primary-light);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: var(--gray-100);
    color: var(--primary-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background: var(--primary-light);
    color: var(--white);
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

/* --- ABOUT SECTION --- */
/* .about h2 {
    text-align: center;
} */

.about h2 {
    /* font-size: 4.5rem; */
    font-weight: 900;
    letter-spacing: -1.5px;
    margin-bottom: 15px;
    text-transform: uppercase;
    background-color: var(--primary);
    /* background: linear-gradient(90deg, #4e67ad, #AAAAAA); */
    /* background: linear-gradient(90deg, #FFFFFF, #AAAAAA); */
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image-wrapper {
    position: relative;
}

.about-img {
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.experience-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    text-align: center;
}

.experience-badge .years {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.experience-badge .text {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.about-features {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.about-features li {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--gray-800);
    font-weight: 500;
}

.about-features li i {
    color: var(--primary-light);
    font-size: 1.2rem;
}

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

.testimonial-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.testimonial-card::before {
    content: '\201C';
    font-family: serif;
    position: absolute;
    top: -10px;
    right: 20px;
    font-size: 8rem;
    color: var(--gray-100);
    line-height: 1;
    z-index: 0;
}

.testimonial-card .stars {
    color: #f59e0b;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.testimonial-card .quote {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--gray-800);
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.client-info strong {
    display: block;
    color: var(--gray-900);
}

.client-info span {
    font-size: 0.9rem;
    color: var(--gray-600);
}

/* --- CONTACT SECTION --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.contact-info {
    padding: 4rem;
    background: var(--gray-100);
}

.info-items {
    margin-top: 3rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--primary-light);
    background: var(--white);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
}

.info-item strong {
    display: block;
    font-size: 1.1rem;
    color: var(--gray-900);
    margin-bottom: 0.2rem;
}

/* --- FORM --- */
.contact-form {
    padding: 4rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-800);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    max-width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(0, 119, 200, 0.1);
}

/* --- FOOTER --- */
.footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 2.5fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.services-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 992px) {
    .services-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .services-columns {
        grid-template-columns: 1fr;
    }
}

.footer-brand .logo-text {
    color: var(--white);
}

.footer-brand p {
    margin-top: 1rem;
    color: var(--gray-400);
}

.footer h4 {
    color: var(--white);
    margin-bottom: 1.5rem;
}

.footer-links ul li {
    margin-bottom: 0.8rem;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.9rem;
}

/* --- ANIMATIONS (Reveal on scroll) --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- MEDIA QUERIES (Responsivo) --- */
@media (max-width: 992px) {
    h1 {
        font-size: 2.8rem;
    }

    h2 {
        font-size: 2.2rem;
    }

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

    .about-image-wrapper {
        order: 2;
        margin-top: 2rem;
        max-width: 600px;
        margin-inline: auto;
    }

    .about-content {
        order: 1;
    }

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

    .contact-info,
    .contact-form {
        padding: 3rem 2rem;
    }

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

    .footer-brand {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 72px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 72px);
        background: var(--white);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 2rem;
        transition: 0.4s ease-in-out;
        box-shadow: var(--shadow-md);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu ul {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

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

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions a {
        width: 100%;
    }

    .about-features {
        grid-template-columns: 1fr;
    }

    .logo-img {
        height: 60px;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    /* --- Contact fix for mobile --- */
    .contact-info,
    .contact-form {
        padding: 2rem 1.25rem;
    }

    .contact-info h2 {
        font-size: 1.6rem;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .info-item {
        gap: 1rem;
    }

    .info-item p,
    .info-item strong {
        word-break: break-word;
        overflow-wrap: break-word;
    }

    /* --- Services grid fix for mobile --- */
    .services-badges-grid {
        grid-template-columns: 1fr;
    }

    /* --- Testimonials fix for mobile --- */
    .testimonial-card {
        padding: 1.5rem;
    }

    .testimonial-card .quote {
        font-size: 1rem;
    }

    /* --- Section header fix --- */
    .section-header h2 {
        word-break: break-word;
        overflow-wrap: break-word;
    }

    /* --- Portfolio section fix --- */
    .showcase-section {
        padding: 60px 0;
        min-height: auto;
    }

    .section-header {
        margin-bottom: 40px;
    }
}

/*  PORTIFOLIO */
/* --- Showcase Section --- */
.showcase-section {

    /* background-color: var(--bg-portfolio); */
    /* background-color: var(--white); */
    padding: 100px 0;
    min-height: 100vh;
    /* border-top: 1px solid #333; */
    /* border-bottom: 1px solid #333; */
}

/* Nota: .container principal definido no topo com width: 90% */

.section-header {
    text-align: left;
    margin-bottom: 80px;
    max-width: 800px;
    overflow-wrap: break-word;
    word-break: break-word;
}

.section-header h2 {
    /* font-size: 4.5rem; */
    font-weight: 900;
    letter-spacing: -1.5px;
    margin-bottom: 15px;
    text-transform: uppercase;
    background-color: var(--primary);
    /* background: linear-gradient(90deg, #4e67ad, #AAAAAA); */
    /* background: linear-gradient(90deg, #FFFFFF, #AAAAAA); */
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-header .subtitle {
    /* font-size: 1.25rem; */
    color: var(--text-secondary);
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 40px;
}

/* Filters */
.filters {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 40px;
}

@media (min-width: 768px) {
    .filters {
        display: flex;
        flex-wrap: wrap;
        gap: 15px;
        margin-bottom: 50px;
    }
}

.filter-btn {
    background: transparent;
    border: 1px solid #444;
    color: var(--text-secondary, #64748b);
    padding: 12px 5px;
    font-family: 'Roboto', sans-serif;
    border-radius: 5px;
    font-weight: 500;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    text-align: center;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (min-width: 768px) {
    .filter-btn {
        width: 160px;
        flex: 0 0 160px;
        font-size: 0.85rem;
        padding: 10px 10px;
    }
}

.filter-btn:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.filter-btn.active {
    background-color: var(--primary-light);
    border-color: var(--primary-light);
    border-radius: 5px;
    color: #FFF;
}

/* --- Masonry Grid --- */
.masonry-grid {
    column-count: 3;
    column-gap: 20px;
    perspective: 1000px;
    /* Para ajudar no parallax se for 3D */
}

@media (max-width: 1024px) {
    .masonry-grid {
        column-count: 2;
    }
}

@media (max-width: 768px) {
    .masonry-grid {
        column-count: 1;
    }

    .section-header h2 {
        font-size: 3rem;
    }
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    background-color: #000;
    cursor: pointer;
    /* Industrial sharp border */
    border: 1px solid transparent;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUpper 0.8s forwards;
}

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

/* Sizes base para criar a assimetria visual */
.masonry-item.size-large {
    height: auto;
}

.masonry-item.size-medium {
    height: auto;
}

.masonry-item.size-small {
    height: auto;
}

.masonry-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Hover Effect Sofisticado */
.masonry-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background-color: var(--primary);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    pointer-events: none;
}

.item-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    pointer-events: none;
}

.item-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #FFF;
    margin-bottom: 5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.item-category {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #FFF;
    opacity: 0.8;
}

/* Hover Interactions */
.masonry-item:hover {
    border: 1px solid var(--glow-yellow);
    box-shadow: 0 0 25px rgba(255, 214, 10, 0.2);
    z-index: 10;
}

.masonry-item:hover img {
    transform: scale(1.08);
    /* Zoom-in */
}

.masonry-item:hover::after {
    opacity: 0.65;
    /* Low opacity Tech Blue overlay */
}

.masonry-item:hover .item-overlay {
    opacity: 1;
    transform: translateY(0);
}

/* Ocultar para Filtros */
.masonry-item.hidden {
    display: none;
}

/* --- Lightbox Minimalista --- */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(5, 5, 5, 0.95);
    /* Deep Black */
    backdrop-filter: blur(8px);
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    z-index: 10000;
    display: flex;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    /* Borda viva */
    border: 1px solid #333;
    background-color: var(--bg-main);
}

.lightbox-content img {
    max-height: 90vh;
    max-width: 75vw;
    object-fit: contain;
    display: block;
}

.lightbox-info {
    position: absolute;
    bottom: 30px;
    right: 30px;
    background: rgba(10, 10, 10, 0.85);
    padding: 20px 30px;
    border-left: 2px solid var(--glow-yellow);
    backdrop-filter: blur(10px);
}

.lightbox-info h4 {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 5px;
    color: #FFF;
}

.lightbox-info p {
    font-size: 0.9rem;
    /* color: var(--text-secondary) */
    color: var(--primary-light);
    font-weight: 300;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #FFF;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: var(--glow-yellow);
}

@media (max-width: 768px) {
    .lightbox-content {
        flex-direction: column;
    }

    .lightbox-info {
        position: static;
        width: 100%;
        border-left: none;
        border-top: 2px solid var(--glow-yellow);
    }
}

/* --- Timeline Section --- */
.timeline-section {
    background-color: var(--bg-main);
    padding: 100px 0;
    position: relative;
    border-bottom: 1px solid #333;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 50px;
    /* Space for the line and dots */
}

/* Vertical line */
.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 10px;
    /* Slightly inside */
    width: 2px;
    background: linear-gradient(to bottom, var(--tech-blue), transparent);
}

.timeline-item {
    position: relative;
    margin-bottom: 60px;
    opacity: 0;
    transform: translateX(-30px);
    animation: slideInRight 1s forwards cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.timeline-item:nth-child(1) {
    animation-delay: 0.2s;
}

.timeline-item:nth-child(2) {
    animation-delay: 0.4s;
}

.timeline-item:nth-child(3) {
    animation-delay: 0.6s;
}

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

.timeline-dot {
    position: absolute;
    left: -46px;
    /* 10px line + 1px center - 7px half dot = 4px inside. From 50px padding, that is -46px */
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--bg-main);
    border: 2px solid var(--tech-blue);
    box-shadow: 0 0 10px rgba(10, 132, 255, 0.5);
    z-index: 2;
    transition: all 0.4s ease;
}

.timeline-item:hover .timeline-dot {
    background-color: var(--tech-blue);
    box-shadow: 0 0 20px var(--tech-blue);
    transform: scale(1.3);
}

.timeline-content {
    background: var(--bg-portfolio);
    border: 1px solid #333;
    padding: 35px 40px;
    border-radius: 2px;
    transition: all 0.4s ease;
    position: relative;
}

.timeline-item:hover .timeline-content {
    border-color: #555;
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.timeline-content h3 {
    color: var(--glow-yellow);
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.timeline-content h4 {
    font-size: 1.25rem;
    margin-bottom: 15px;
    color: #FFF;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.timeline-content p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-weight: 300;
    font-size: 1.05rem;
}

/* Timeline Responsive */
@media (max-width: 768px) {
    .timeline {
        padding-left: 40px;
    }

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

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

    .timeline-content {
        padding: 25px;
    }
}

/* --- Privacy Policy Modal --- */
.privacy-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.privacy-modal.active {
    opacity: 1;
    pointer-events: all;
}

.privacy-modal-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.privacy-modal-content {
    position: relative;
    background-color: #ffffff;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    display: flex;
    flex-direction: column;
}

.privacy-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: #333;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
    z-index: 10;
}

.privacy-modal-close:hover {
    color: var(--primary);
}

.privacy-modal-body {
    padding: 40px 30px;
    overflow-y: auto;
    color: #333;
    font-family: var(--font-main);
}

.privacy-modal-body h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--gray-900);
    padding-right: 30px;
}

.privacy-modal-body h3 {
    font-size: 1.2rem;
    margin-top: 25px;
    margin-bottom: 10px;
    color: var(--primary-dark);
}

.privacy-modal-body p,
.privacy-modal-body ul {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--gray-600);
    margin-bottom: 15px;
}

.privacy-modal-body ul {
    padding-left: 20px;
    list-style-type: disc;
}

.privacy-modal-body li {
    margin-bottom: 8px;
}

.privacy-modal-body::-webkit-scrollbar {
    width: 8px;
}

.privacy-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.privacy-modal-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.privacy-modal-body::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

@media (max-width: 768px) {
    .privacy-modal-body {
        padding: 30px 20px;
    }

    .privacy-modal-body h2 {
        font-size: 1.5rem;
    }

    .privacy-modal-body h3 {
        font-size: 1.1rem;
    }
}