/* DESIGN SYSTEM: MINIMALIST & BRUTALIST (Inspired by romeomancini.com) */
:root {
    --bg-color: #000000;
    --text-main: #ffffff;
    --text-muted: #888888;
    --border-color: #222222;
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', 'Helvetica Neue', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-sans);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* SITE LOGO */
.site-logo {
    position: fixed;
    top: 2rem;
    left: 2rem;
    z-index: 1000;
}

#main-logo {
    height: 105px; /* Designed for an elegant, scalable size - Increased by 200% */
    width: auto;
    display: block;
    transition: opacity 0.3s ease;
}

.site-logo:hover #main-logo {
    opacity: 0.7;
}

/* LANGUAGE SWITCHER */
.lang-switcher {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    transition: color 0.3s;
}

.lang-btn.active, .lang-btn:hover {
    color: var(--text-main);
}

/* LAYOUT & SECTIONS */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 8rem 0;
    border-bottom: 1px solid var(--border-color);
}

.serif-text {
    font-family: var(--font-serif);
    font-weight: 400;
}

/* HERO SECTION */
#hero {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
}

#hero h1 {
    font-size: clamp(3.5rem, 8vw, 7rem);
    line-height: 1;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

#hero p {
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    color: var(--text-muted);
    max-width: 800px;
    line-height: 1.4;
}

.domain-link {
    margin-top: 3rem;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    text-decoration: none;
    text-transform: uppercase;
}

/* ABOUT SECTION */
.section-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.about-main {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    line-height: 1.4;
    max-width: 950px;
}

.about-sub {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 800px;
    border-left: 1px solid var(--text-muted);
    padding-left: 1.5rem;
    margin-top: 2rem;
}

/* INFINITE TICKER (30+ Certifications) */
.ticker-wrapper {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden;
    background: #050505;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.ticker {
    display: flex;
    width: max-content;
    animation: ticker-loop 60s linear infinite;
}

.ticker-item {
    padding: 0 3rem;
    font-size: 0.9rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ticker-item img {
    max-height: 120px;
    width: auto;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.ticker-item img:hover {
    filter: grayscale(0%);
}

@keyframes ticker-loop {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

/* CORE EXPERTISE */
.expertise-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 4rem;
}

.exp-item h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.exp-item p {
    color: var(--text-muted);
    line-height: 1.5;
}

/* FEATURED PROJECTS */
.project-block {
    margin-bottom: 6rem;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.project-title {
    font-size: clamp(1.8rem, 4vw, 3rem);
    letter-spacing: -0.02em;
}

.project-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-desc {
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--text-main);
    max-width: 900px;
}

.project-note {
    margin-top: 1.5rem;
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 800px;
}

/* WORK WITH ME CAROUSEL / GRID */
.cta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.cta-card {
    border: 1px solid var(--border-color);
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #030303;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cta-card:hover {
    border-color: var(--text-main);
    background: #070707;
    transform: translateY(-4px);
}

.cta-card h3 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}

.cta-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.4;
}

.cta-details {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 3rem;
}

.cta-details ul {
    list-style: none;
}

.cta-details li {
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 1rem;
}

.cta-details li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: var(--text-muted);
}

.cta-btn {
    display: inline-block;
    width: 100%;
    text-align: center;
    padding: 1.2rem;
    background: var(--text-main);
    color: var(--bg-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: background 0.3s;
}

.cta-btn:hover {
    background: var(--text-muted);
}

/* FOOTER */
footer {
    padding: 10rem 0 4rem 0;
}

.footer-h2 {
    font-size: clamp(2.5rem, 6vw, 5rem);
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
}

.footer-p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 4rem;
    line-height: 1.5;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
}

/* FULL-WIDTH SECTION DIVIDERS */
.section-divider {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    height: 400px;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Parallax effect */
    display: flex;
    align-items: center;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.divider-hero {
    background-image: url('../assets/img/backgrounds/cristian-tovo-executive-roma.webp');
    background-position: center right;
}

.divider-about {
    background-image: url('../assets/img/backgrounds/cristian-tovo-vision-coaching.webp');
    background-position: center right;
}

.divider-projects {
    background-image: url('../assets/img/backgrounds/cristian-tovo-holding-ventures.webp');
    background-position: center right;
}

.divider-footer {
    background-image: url('../assets/img/backgrounds/inspiration.webp');
    background-position: center center;
}

.divider-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.divider-content {
    position: relative;
    z-index: 2;
    padding: 0 4rem;
    max-width: 600px;
}

.divider-content p {
    font-size: 1.5rem;
    font-style: italic;
    font-family: var(--font-serif);
    color: #fff;
    line-height: 1.5;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
}

@media (max-width: 768px) {
    .section-divider {
        background-attachment: scroll; /* fixes buggy rendering on iOS */
        height: 300px;
    }
    .divider-content {
        padding: 0 2rem;
    }
    .divider-content p {
        font-size: 1.2rem;
    }
}

/* TIMELINE / ROADMAP STYLES */
.timeline-container {
    max-width: 900px;
    margin: 0 auto;
    padding-left: 2rem;
    border-left: 2px solid var(--border-color);
}
.timeline-item {
    position: relative;
    padding-left: 2rem;
    padding-bottom: 2rem;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.35rem; /* center on the 2px border */
    top: 0.3rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--bg-color);
    border: 2px solid var(--text-main);
}
.timeline-item:last-child {
    padding-bottom: 0;
}
.timeline-year {
    font-size: 0.9rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    font-weight: 600;
    margin-right: 1rem;
    display: inline-block;
}
.timeline-text {
    font-size: 1.1rem;
    line-height: 1.4;
    display: inline;
}
.timeline-title {
    font-weight: 600;
    color: var(--text-main);
}

/* --- MODAL STYLES --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content-wrapper {
    position: relative;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    background: #050505;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 10;
}

.modal-close-btn:hover {
    color: var(--text-main);
}

.modal-content-body {
    padding: 40px;
    overflow-y: auto;
    color: var(--text-main);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .modal-content-body {
        padding: 25px;
    }
}

/* --- ZEN READER FULL SCREEN OVERLAY --- */

.zen-reader-content {
    max-width: 750px;
    margin: 10rem auto 4rem auto;
    padding: 0 2rem;
    font-size: 1.25rem;
    line-height: 1.9;
    color: #222;
}

.zen-reader-content p {
    margin-bottom: 2rem;
}

.zen-reader-content ul {
    margin-bottom: 2rem;
    padding-left: 1.5rem;
}

.zen-reader-content li {
    margin-bottom: 1rem;
}

.zen-reader-cta {
    max-width: 800px;
    margin: 0 auto 8rem auto;
    padding: 4rem 2rem;
    text-align: center;
    border-top: 1px solid #eaeaea;
}

.zen-reader-cta h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.zen-reader-cta p {
    color: #666;
    margin-bottom: 2rem;
}

.zr-form {
    display: flex;
    gap: 1rem;
    justify-content: center;
    max-width: 500px;
    margin: 0 auto;
}

.zr-form input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    background: #fff;
    color: #111;
}

.zr-form input:focus {
    outline: 2px solid #111;
}

.zr-form button {
    padding: 1rem 2rem;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.zr-form button:hover {
    background: #333;
}

@media (max-width: 768px) {
    .zen-reader-header {
        padding: 1rem 1.5rem;
    }
    .zen-reader-title {
        display: none;
    }
    .zen-reader-content {
        margin-top: 6rem;
        font-size: 1.15rem;
    }
    .zr-form {
        flex-direction: column;
    }
}

.modal-content-body::-webkit-scrollbar {
    width: 8px;
}
.modal-content-body::-webkit-scrollbar-track {
    background: #111;
    border-radius: 4px;
}
.modal-content-body::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

/* Modal Content Specific Styles */
.book-preview-container p {
    color: #ccc;
    margin-bottom: 1rem;
}
.book-preview-container ul, .book-preview-container ol {
    color: #ccc;
    margin-bottom: 1.5rem;
}
.preview-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}
.preview-table th, .preview-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
.preview-table th {
    background: #111;
    font-weight: 600;
    color: var(--text-main);
}
.preview-table tr:hover {
    background: #0a0a0a;
}
.checklist-preview li {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.checklist-preview input[type="checkbox"] {
    margin-top: 5px;
    accent-color: #555;
    cursor: default;
}
