/* ==========================================================================
   William Trindade — Design System
   Minimalista, monocromático, tipografia Inter. Construído sobre Bootstrap 5.3.
   Documentação visual: /design-system.html
   ========================================================================== */

/* --- TOKENS --- */
:root {
    /* Cores */
    --text: #111111;
    --text-hover: #333333;
    --text-muted: #6b6b6b;
    --text-inverse: #ffffff;
    --border: #e5e5e5;
    --border-strong: #d4d4d4;
    --bg: #ffffff;
    --bg-soft: #fafafa;

    /* Tipografia */
    --font-sans: 'Inter', sans-serif;
    --fs-h1: 2.5rem;
    --fs-h2: 1.75rem;
    --fs-h3: 1.4rem;
    --fs-h4: 1.25rem;
    --fs-h5: 1.05rem;
    --fs-h6: 1rem;
    --fs-lg: 1.1rem;
    --fs-base: 1rem;
    --fs-sm: 0.9rem;
    --fs-xs: 0.8rem;
    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --lh-base: 1.6;
    --lh-tight: 1.4;
    --tracking-tight: -0.02em;
    --tracking-wide: 1px;

    /* Espaçamento */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 3rem;
    --space-8: 4rem;
    --space-9: 5rem;

    /* Forma */
    --radius: 8px;
    --radius-pill: 50px;
    --radius-round: 50%;
    --border-width: 1px;

    /* Movimento */
    --transition: 0.15s ease;

    /* Layout */
    --nav-height: 70px;

    /* Integração com Bootstrap */
    --bs-body-font-family: var(--font-sans);
    --bs-body-color: var(--text);
    --bs-body-bg: var(--bg);
    --bs-border-color: var(--border);
    --bs-secondary-color: var(--text-muted);
}

@media (max-width: 768px) {
    :root {
        --fs-h1: 2rem;
        --fs-h2: 1.5rem;
    }
}

/* --- BASE --- */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--bg);
    padding-top: var(--nav-height);
    line-height: var(--lh-base);
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    color: var(--text);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--tracking-tight);
    line-height: 1.3;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }
h5 { font-size: var(--fs-h5); }
h6 { font-size: var(--fs-h6); }

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

:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 2px;
}

/* --- UTILITÁRIOS --- */
.text-secondary, .text-muted { color: var(--text-muted) !important; }
.bg-light { background-color: var(--bg-soft) !important; }

/* Destaque: apenas peso, sem cor */
.gradient-text,
.text-highlight {
    color: var(--text);
    font-weight: var(--fw-semibold);
}

.text-lg { font-size: var(--fs-lg); }
.text-sm { font-size: var(--fs-sm); }
.text-xs { font-size: var(--fs-xs); }

.line-clamp-2,
.line-clamp-3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-2 { -webkit-line-clamp: 2; }
.line-clamp-3 { -webkit-line-clamp: 3; }

/* --- NAVBAR --- */
.navbar {
    background: var(--bg);
    border-bottom: var(--border-width) solid var(--border);
    padding: 12px 0;
}
.navbar-brand { font-size: 1.1rem; }
.nav-link {
    font-weight: var(--fw-medium);
    color: var(--text-muted);
    font-size: var(--fs-sm);
    margin-left: 20px;
}
.nav-link:hover, .nav-link.active { color: var(--text); }

/* --- BOTÕES --- */
.btn-primary-custom,
.btn-outline-custom,
.ds-btn-primary,
.ds-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    border-radius: var(--radius);
    font-weight: var(--fw-medium);
    font-size: var(--fs-sm);
    border: var(--border-width) solid var(--text);
    transition: background-color var(--transition), border-color var(--transition), color var(--transition);
}
.btn-primary-custom,
.ds-btn-primary { background: var(--text); color: var(--text-inverse); }
.btn-primary-custom:hover,
.btn-primary-custom:active,
.ds-btn-primary:hover,
.ds-btn-primary:active { background: var(--text-hover); border-color: var(--text-hover); color: var(--text-inverse); }

.btn-outline-custom,
.ds-btn-outline { background: transparent; color: var(--text); }
.btn-outline-custom:hover,
.btn-outline-custom:active,
.ds-btn-outline:hover,
.ds-btn-outline:active { background: var(--bg-soft); border-color: var(--text); color: var(--text); }

/* --- HERO --- */
.hero-section {
    padding: 4rem 0;
    min-height: 75vh;
    display: flex;
    align-items: center;
}
.hero-label {
    letter-spacing: var(--tracking-wide);
    color: var(--text-muted);
}
.hero-img {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 1;
    border-radius: var(--radius-round);
    object-fit: cover;
    border: var(--border-width) solid var(--border);
}
.hero-social-link,
.ds-social-link {
    font-size: 1.4rem;
    color: var(--text-muted);
    transition: color var(--transition);
}
.hero-social-link:hover,
.ds-social-link:hover { color: var(--text); }

@media (max-width: 991px) {
    .hero-content { text-align: center; margin-bottom: 3rem; }
    .hero-btns { justify-content: center; }
    .hero-img { max-width: 240px; margin: 0 auto; display: block; }
}

/* --- SEÇÕES --- */
.section-padding,
.ds-section { padding: var(--space-9) 0; }
.section-header,
.ds-section-header { margin-bottom: var(--space-7); }
.section-header h2,
.ds-section-header h2 { margin-bottom: var(--space-2); }
.section-header p,
.ds-section-header p { color: var(--text-muted); font-size: var(--fs-base); }

/* --- CARDS & BENTO --- */
.bento-card,
.custom-card,
.expert-card,
.academic-badge-card,
.exp-card-modern,
.medium-card,
.ds-card {
    background: var(--bg);
    border: var(--border-width) solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-6);
    height: 100%;
}
.bento-card { position: relative; overflow: hidden; }

.bento-title,
.category-title,
.ds-eyebrow {
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    color: var(--text-muted);
    font-weight: var(--fw-semibold);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.bento-title i,
.category-title i,
.ds-eyebrow i { color: var(--text); }

.icon-box,
.ds-icon {
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 1rem;
    display: inline-block;
}

.study-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: var(--border-width) solid var(--border);
}
.study-item:last-child { border-bottom: none; }

.video-card-wrapper,
.ds-card-media {
    padding: 0 !important;
    background: #000;
    border: none;
    position: relative;
}

/* --- ACADÊMICO --- */
.academic-section {
    padding: 4rem 0;
    border-top: var(--border-width) solid var(--border);
    border-bottom: var(--border-width) solid var(--border);
}
.academic-icon {
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 1rem;
}
.institution-tag {
    font-size: 0.75rem;
    font-weight: var(--fw-semibold);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    display: block;
    margin-bottom: 0.5rem;
}

/* --- TECH PILLS & BADGES --- */
.tech-pill,
.ds-pill {
    display: inline-block;
    padding: 4px 12px;
    margin: 0 4px 8px 0;
    background: var(--bg-soft);
    color: var(--text);
    border: var(--border-width) solid var(--border);
    border-radius: var(--radius-pill);
    font-size: var(--fs-xs);
    font-weight: var(--fw-medium);
}

.ds-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg-soft);
    color: var(--text-muted);
    border: var(--border-width) solid var(--border);
    border-radius: var(--radius);
    font-size: var(--fs-xs);
    font-weight: var(--fw-medium);
}

/* --- PROJETOS (CAROUSEL) --- */
#projectCarousel .row.g-0 {
    --bs-gutter-x: 0;
    --bs-gutter-y: 0;
    margin: 0;
}
#projectCarousel .carousel-inner {
    border: var(--border-width) solid var(--border);
    border-radius: var(--radius);
}
.project-img-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 420px;
    overflow: hidden;
    border-right: var(--border-width) solid var(--border);
}
.project-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.carousel-indicators-custom {
    position: static;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.carousel-indicators-custom button {
    width: 8px !important;
    height: 8px !important;
    border-radius: var(--radius-round) !important;
    border: none !important;
    background-color: var(--border-strong) !important;
    opacity: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
}
.carousel-indicators-custom button.active { background-color: var(--text) !important; }

.nav-arrow,
.ds-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-round);
    border: var(--border-width) solid var(--border);
    background: var(--bg);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color var(--transition);
}
.nav-arrow:hover,
.ds-icon-btn:hover { background: var(--bg-soft); }

@media (max-width: 991px) {
    .project-img-wrapper {
        min-height: 250px;
        height: 250px;
        border-right: none;
        border-bottom: var(--border-width) solid var(--border);
    }
    #projectCarousel .col-lg-5 { padding: 2rem !important; }
    #projectCarousel h3 { font-size: 1.25rem; }
}

/* --- EXPERIÊNCIA --- */
.exp-logo {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    object-fit: contain;
    padding: 6px;
    border: var(--border-width) solid var(--border);
    background: var(--bg);
}
.exp-list,
.ds-list { list-style: none; padding-left: 0; }
.exp-list li,
.ds-list li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.75rem;
    font-size: var(--fs-sm);
}
.exp-list li::before,
.ds-list li::before {
    content: "–";
    position: absolute;
    left: 0;
    color: var(--text-muted);
}

/* --- ARTIGOS (MEDIUM) --- */
.medium-card {
    position: relative;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.medium-img-container { height: 180px; border-bottom: var(--border-width) solid var(--border); }
.medium-img { width: 100%; height: 100%; object-fit: cover; }
.medium-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.medium-date,
.ds-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
.medium-title {
    font-size: 1.05rem;
    line-height: var(--lh-tight);
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.medium-card:hover .medium-title a { text-decoration: underline !important; }
.medium-snippet {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1.25rem;
}
.medium-link {
    margin-top: auto;
    font-weight: var(--fw-medium);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* --- CITAÇÃO --- */
.quote-section {
    padding: 4rem 0;
    text-align: center;
    border-top: var(--border-width) solid var(--border);
}
.quote-text { font-size: 1.35rem; font-style: italic; color: var(--text); }
.quote-author {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 1rem;
    display: block;
}

/* --- FOOTER --- */
footer {
    background: var(--bg-soft);
    color: var(--text-muted);
    padding: 4rem 0 2rem;
    font-size: var(--fs-sm);
    border-top: var(--border-width) solid var(--border);
}
.footer-brand h5 { font-size: 1.25rem; margin-bottom: 0.25rem; }
.footer-role { letter-spacing: 2px; }
.footer-contact-info { list-style: none; padding: 0; margin: 1.5rem 0; }
.footer-contact-info li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.footer-contact-info a:hover { color: var(--text); }
.social-group {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 2rem 0;
}
.social-btn { font-size: 1.2rem; color: var(--text-muted); transition: color var(--transition); }
.social-btn:hover { color: var(--text); }
.footer-divider,
.ds-divider { height: var(--border-width); background: var(--border); margin: 2rem 0; border: 0; }
.footer-bottom { font-size: 0.8rem; }

#scrollTop {
    position: fixed; bottom: 20px; right: 20px;
    width: 40px; height: 40px;
    background: var(--bg);
    color: var(--text);
    border: var(--border-width) solid var(--border);
    border-radius: var(--radius-round);
    display: none;
    align-items: center; justify-content: center;
    z-index: 999; cursor: pointer;
    transition: background-color var(--transition);
}
#scrollTop:hover { background: var(--bg-soft); }

/* --- VÍDEOS (YOUTUBE) --- */
.yt-track {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
}
.yt-track::-webkit-scrollbar { display: none; }
.yt-card {
    flex: 0 0 calc((100% - 3rem) / 3);
    scroll-snap-align: start;
    color: var(--text);
}
.yt-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border: var(--border-width) solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
}
.yt-title {
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    line-height: var(--lh-tight);
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.yt-card:hover .yt-title { text-decoration: underline; }
.yt-date { font-size: 0.75rem; color: var(--text-muted); }

@media (max-width: 991px) {
    .yt-card { flex-basis: calc((100% - 1.5rem) / 2); }
}
@media (max-width: 576px) {
    .yt-card { flex-basis: 85%; }
}

/* --- MOBILE --- */
@media (max-width: 991px) {
    .study-list-mobile-fix { max-height: none !important; overflow: visible !important; }
    .bento-card { margin-bottom: 1rem; }
    .video-card-wrapper { min-height: 220px !important; }
    .row { margin-right: 0 !important; margin-left: 0 !important; }
    .container { padding-left: 16px !important; padding-right: 16px !important; }
}
