/* ============================================
   DESIGN SYSTEM - Gabriel Aragao Santos
   Portfolio Profissional
   ============================================ */

/* --- CSS Reset --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

/* --- Custom Properties (Dark Theme Default) --- */
:root {
    --bg-primary: #0a0f1c;
    --bg-secondary: #111827;
    --bg-tertiary: #1e293b;
    --accent-primary: #3b82f6;
    --accent-secondary: #06b6d4;
    --accent-gradient: linear-gradient(135deg, #3b82f6, #06b6d4);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #1e293b;
    --card-bg: #111827;
    --card-border: #1e293b;
    --card-hover-border: #3b82f6;
    --tag-bg: rgba(59, 130, 246, 0.1);
    --tag-text: #60a5fa;
    --tag-expert-bg: rgba(6, 182, 212, 0.15);
    --tag-expert-text: #22d3ee;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
    --shadow-accent: 0 8px 30px rgba(59, 130, 246, 0.15);

    --font-heading: 'Inter', system-ui, -apple-system, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    --max-width: 1200px;
    --nav-height: 72px;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --transition: 0.3s ease;
}

/* --- Light Theme --- */
[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --accent-primary: #2563eb;
    --accent-secondary: #0891b2;
    --accent-gradient: linear-gradient(135deg, #2563eb, #0891b2);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --card-hover-border: #2563eb;
    --tag-bg: rgba(37, 99, 235, 0.08);
    --tag-text: #2563eb;
    --tag-expert-bg: rgba(8, 145, 178, 0.1);
    --tag-expert-text: #0891b2;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.1);
    --shadow-accent: 0 8px 30px rgba(37, 99, 235, 0.1);
}

/* --- Base Styles --- */
body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color var(--transition), color var(--transition);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
    color: var(--accent-secondary);
}

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

ul {
    list-style: none;
}

/* --- Skip Link --- */
.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: var(--accent-primary);
    color: #fff;
    border-radius: var(--border-radius);
    z-index: 1000;
    font-weight: 600;
}

.skip-link:focus {
    top: var(--space-md);
}

/* --- Container --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 clamp(1rem, 5vw, 3rem);
}

/* --- Section --- */
.section {
    padding: clamp(3rem, 8vw, 6rem) 0;
}

.section__title {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: var(--space-3xl);
    position: relative;
}

.section__title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent-gradient);
    margin: var(--space-md) auto 0;
    border-radius: 2px;
}

.section__subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.125rem;
    max-width: 600px;
    margin: calc(-1 * var(--space-xl)) auto var(--space-3xl);
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 100;
    transition: background-color var(--transition), box-shadow var(--transition);
}

.nav--scrolled {
    background-color: rgba(10, 15, 28, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
}

[data-theme="light"] .nav--scrolled {
    background-color: rgba(248, 250, 252, 0.85);
}

.nav__container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 clamp(1rem, 5vw, 3rem);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav__logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.nav__logo:hover {
    color: var(--text-primary);
}

.nav__logo-accent {
    color: var(--accent-primary);
}

.nav__list {
    display: flex;
    gap: var(--space-xl);
}

.nav__link {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: var(--space-xs) 0;
    position: relative;
    transition: color var(--transition);
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width var(--transition);
}

.nav__link:hover,
.nav__link--active {
    color: var(--text-primary);
}

.nav__link:hover::after,
.nav__link--active::after {
    width: 100%;
}

.nav__actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition);
}

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

.theme-toggle:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.theme-toggle__icon {
    width: 18px;
    height: 18px;
}

[data-theme="dark"] .theme-toggle__icon--moon { display: none; }
[data-theme="light"] .theme-toggle__icon--sun { display: none; }

/* Hamburger */
.nav__hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
    z-index: 110;
}

.nav__hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition);
    border-radius: 1px;
}

.nav__hamburger--active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav__hamburger--active span:nth-child(2) {
    opacity: 0;
}

.nav__hamburger--active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   HERO
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: var(--nav-height) var(--space-xl) var(--space-xl);
}

.hero__grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
}

[data-theme="light"] .hero__grid-bg {
    background-image:
        linear-gradient(rgba(37, 99, 235, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 99, 235, 0.06) 1px, transparent 1px);
}

.hero__content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero__greeting {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--accent-primary);
    font-weight: 500;
    margin-bottom: var(--space-sm);
    letter-spacing: 0.05em;
}

.hero__name {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--space-lg);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__title {
    font-size: clamp(1rem, 2vw, 1.375rem);
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
    min-height: 2em;
}

.hero__typing {
    color: var(--accent-secondary);
    font-weight: 600;
}

.hero__cursor {
    color: var(--accent-primary);
    animation: blink 1s step-end infinite;
    font-weight: 300;
}

.hero__subtitle {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: var(--space-2xl);
    letter-spacing: 0.1em;
}

.hero__cta {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

.hero__scroll-indicator {
    position: absolute;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.hero__scroll-line {
    width: 1px;
    height: 40px;
    background: var(--accent-gradient);
    animation: scroll-line 2s ease-in-out infinite;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.75rem;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn--primary {
    background: var(--accent-gradient);
    color: #ffffff;
    border-color: transparent;
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-accent);
    color: #ffffff;
}

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

.btn--outline:hover {
    background: var(--accent-primary);
    color: #ffffff;
    transform: translateY(-2px);
}

.btn--sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.8125rem;
}

.btn--lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* ============================================
   TAGS
   ============================================ */
.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--tag-bg);
    color: var(--tag-text);
    border-radius: 20px;
    white-space: nowrap;
}

.tag--expert {
    background: var(--tag-expert-bg);
    color: var(--tag-expert-text);
    border: 1px solid var(--tag-expert-text);
}

.tag--accent {
    background: var(--accent-gradient);
    color: #ffffff;
}

.tag--sm {
    padding: 0.15rem 0.5rem;
    font-size: 0.6875rem;
}

/* ============================================
   SOBRE (About)
   ============================================ */
.sobre__grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-3xl);
    align-items: start;
}

.sobre__photo-wrapper {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--border-color);
    position: relative;
    margin: 0 auto;
}

.sobre__photo-wrapper::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: var(--accent-gradient) border-box;
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: xor;
    z-index: 1;
}

.sobre__photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 25%;
}

.sobre__text {
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    font-size: 1rem;
    line-height: 1.8;
}

.sobre__stats {
    display: flex;
    gap: var(--space-xl);
    margin-top: var(--space-2xl);
    padding-top: var(--space-2xl);
    border-top: 1px solid var(--border-color);
}

.sobre__stat {
    text-align: center;
}

.sobre__stat-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-primary);
    line-height: 1;
}

.sobre__stat-plus {
    font-size: 1.5rem;
    color: var(--accent-secondary);
}

.sobre__stat-label {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
    font-weight: 500;
}

/* ============================================
   HABILIDADES (Skills)
   ============================================ */
.habilidades__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
}

.skill-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    padding: var(--space-2xl);
    transition: all var(--transition);
}

.skill-card:hover {
    transform: translateY(-4px);
    border-color: var(--card-hover-border);
    box-shadow: var(--shadow-accent);
}

.skill-card__icon {
    width: 48px;
    height: 48px;
    color: var(--accent-primary);
    margin-bottom: var(--space-lg);
}

.skill-card__icon svg {
    width: 100%;
    height: 100%;
}

.skill-card__title {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: var(--space-lg);
}

.skill-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

/* ============================================
   EXPERIENCIA (Timeline)
   ============================================ */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 40px;
}

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

.timeline__item {
    position: relative;
    margin-bottom: var(--space-2xl);
}

.timeline__dot {
    position: absolute;
    left: -33px;
    top: 8px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-primary);
    border: 3px solid var(--bg-primary);
    z-index: 1;
}

.timeline__dot--pulse {
    animation: pulse-dot 2s ease-in-out infinite;
}

.timeline__card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    padding: var(--space-xl);
    transition: all var(--transition);
}

.timeline__card:hover {
    border-color: var(--card-hover-border);
    box-shadow: var(--shadow-md);
}

.timeline__period {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--accent-secondary);
    font-weight: 500;
}

.timeline__role {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin: var(--space-sm) 0;
}

.timeline__company {
    color: var(--accent-primary);
    font-weight: 600;
    margin-bottom: var(--space-md);
}

.timeline__list {
    margin-bottom: var(--space-md);
}

.timeline__list li {
    position: relative;
    padding-left: var(--space-lg);
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.timeline__list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-secondary);
}

.timeline__tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

/* ============================================
   PROJETOS (Projects)
   ============================================ */
.projetos__featured {
    display: grid;
    gap: var(--space-2xl);
    margin-bottom: var(--space-3xl);
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: all var(--transition);
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: var(--card-hover-border);
    box-shadow: var(--shadow-accent);
}

.project-card--featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.project-card__image {
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    position: relative;
    overflow: hidden;
}

.project-card__image::after {
    content: attr(data-placeholder);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    padding: var(--space-md);
}

.project-card__image--sm {
    min-height: 160px;
}

.project-card__overlay {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    z-index: 1;
}

.project-card__content {
    padding: var(--space-xl);
}

.project-card__title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.project-card__desc {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: var(--space-md);
    line-height: 1.7;
}

.project-card__tech {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

/* Project Card Year Badge */
.project-card__year {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-secondary);
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.25);
    padding: 2px 8px;
    border-radius: 12px;
    margin-bottom: var(--space-sm);
}

/* Project Card Partners (logos) */
.project-card__partners {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
    padding: var(--space-xs) 0;
    flex-wrap: wrap;
}

.project-card__partner-logo {
    height: 28px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.7;
    transition: opacity var(--transition);
}

.project-card__partner-logo--color {
    filter: none;
    opacity: 0.85;
}

.project-card__partner-logo--lg {
    height: 48px;
}

.project-card__partner-logo:hover {
    opacity: 1;
}

[data-theme="light"] .project-card__partner-logo {
    filter: none;
}

/* Project Card Note */
.project-card__note {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
    line-height: 1.6;
    font-style: italic;
}

.project-card__note code {
    font-family: var(--font-mono);
    background: rgba(59, 130, 246, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--accent-primary);
    font-style: normal;
    font-size: 0.8125rem;
}

/* Project Gallery in grid cards */
.project-gallery--grid {
    min-height: 200px;
}

.project-gallery--grid .project-gallery__dots {
    max-width: 90%;
    flex-wrap: wrap;
    justify-content: center;
}

.project-gallery--grid .project-gallery__dot {
    width: 6px;
    height: 6px;
}

/* Project Card Links (Autodesk Viewer, etc.) */
.project-card__links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
}

.project-card__links-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-right: var(--space-xs);
}

.project-card__link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 0.8125rem;
    font-family: var(--font-mono);
    color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    transition: all var(--transition);
}

.project-card__link:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--accent-primary);
    transform: translateY(-1px);
}

.project-card__link svg {
    flex-shrink: 0;
}

/* Project Gallery / Carousel */
.project-gallery {
    position: relative;
    min-height: 280px;
    padding: 0;
}

.project-gallery::after {
    display: none;
}

.project-gallery .project-card__overlay {
    z-index: 3;
}

.project-gallery__track {
    display: flex;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.project-gallery__slide {
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
    display: none;
    position: absolute;
    top: 0;
    left: 0;
}

.project-gallery__slide:first-child,
.project-gallery__slide.active {
    display: block;
}

.project-gallery__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
    opacity: 0;
}

.project-gallery:hover .project-gallery__btn {
    opacity: 1;
}

.project-gallery__btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.project-gallery__btn--prev {
    left: 8px;
}

.project-gallery__btn--next {
    right: 8px;
}

.project-gallery__dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}

.project-gallery__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: background var(--transition);
    padding: 0;
}

.project-gallery__dot--active,
.project-gallery__dot:hover {
    background: rgba(255, 255, 255, 0.95);
}

.projetos__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-xl);
}

/* ============================================
   FORMACAO (Education)
   ============================================ */
.formacao__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
}

.formacao__card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    padding: var(--space-xl);
    border-left: 4px solid var(--accent-primary);
    transition: all var(--transition);
}

.formacao__card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.formacao__icon {
    width: 40px;
    height: 40px;
    color: var(--accent-primary);
    margin-bottom: var(--space-md);
}

.formacao__icon--pos {
    color: var(--accent-secondary);
}

.formacao__icon--cert {
    color: #f59e0b;
}

.formacao__icon svg {
    width: 100%;
    height: 100%;
}

.formacao__degree {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.formacao__course {
    font-family: var(--font-heading);
    font-size: 1.0625rem;
    font-weight: 700;
    margin: var(--space-sm) 0;
    line-height: 1.4;
}

.formacao__institution {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.formacao__status {
    display: inline-block;
    margin-top: var(--space-sm);
    padding: 0.15rem 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
    border-radius: 20px;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.formacao__status--done {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border-color: rgba(34, 197, 94, 0.3);
}

/* ============================================
   CONTATO (Contact)
   ============================================ */
.contato__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: start;
}

.contato__item {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
    margin-bottom: var(--space-xl);
}

.contato__item svg {
    width: 24px;
    height: 24px;
    min-width: 24px;
    color: var(--accent-primary);
    margin-top: 2px;
}

.contato__label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    margin-bottom: 2px;
}

.contato__value {
    color: var(--text-primary);
    font-weight: 500;
}

a.contato__value:hover {
    color: var(--accent-primary);
}

.contato__social {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    align-items: flex-start;
}

.contato__social-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-xl);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-weight: 500;
    transition: all var(--transition);
    width: 100%;
}

.contato__social-link:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateX(4px);
}

.contato__social-link svg {
    width: 24px;
    height: 24px;
    min-width: 24px;
}

.contato__cta {
    margin-top: var(--space-md);
    justify-content: center;
    width: 100%;
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox--open {
    opacity: 1;
    visibility: visible;
}

.lightbox__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    cursor: pointer;
}

.lightbox__content {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox__img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox--open .lightbox__img {
    transform: scale(1);
}

.lightbox__close {
    position: absolute;
    top: 16px;
    right: 24px;
    z-index: 2;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px 12px;
    border-radius: 50%;
    transition: background 0.2s;
}

.lightbox__close:hover {
    background: rgba(255, 255, 255, 0.15);
}

.lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.lightbox__nav:hover {
    background: rgba(255, 255, 255, 0.25);
}

.lightbox__nav--prev {
    left: 16px;
}

.lightbox__nav--next {
    right: 16px;
}

.lightbox__counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: rgba(255, 255, 255, 0.7);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
}

/* Make gallery slides clickable */
.project-gallery__slide {
    cursor: pointer;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    padding: var(--space-2xl) 0;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.footer__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.footer__copy {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer__tech {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.footer__social {
    display: flex;
    gap: var(--space-md);
}

.footer__social a {
    color: var(--text-muted);
    transition: color var(--transition);
}

.footer__social a:hover {
    color: var(--accent-primary);
}

.footer__social svg {
    width: 20px;
    height: 20px;
}

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

/* Tablet */
@media (max-width: 1024px) {
    .sobre__grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .sobre__stats {
        justify-content: center;
    }

    .project-card--featured {
        grid-template-columns: 1fr;
    }

    .contato__grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .nav__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg-secondary);
        padding: calc(var(--nav-height) + var(--space-xl)) var(--space-xl) var(--space-xl);
        transition: right var(--transition);
        box-shadow: var(--shadow-lg);
        z-index: 105;
    }

    .nav__menu--open {
        right: 0;
    }

    .nav__list {
        flex-direction: column;
        gap: var(--space-lg);
    }

    .nav__link {
        font-size: 1.125rem;
    }

    .nav__hamburger {
        display: flex;
    }

    .sobre__stats {
        flex-wrap: wrap;
        gap: var(--space-lg);
    }

    .sobre__stat {
        min-width: 80px;
    }

    .habilidades__grid {
        grid-template-columns: 1fr;
    }

    .timeline {
        padding-left: 30px;
    }

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

    .timeline__dot {
        left: -27px;
        width: 10px;
        height: 10px;
    }

    .projetos__grid {
        grid-template-columns: 1fr;
    }

    .formacao__grid {
        grid-template-columns: 1fr;
    }

    .footer__content {
        flex-direction: column;
        text-align: center;
    }

    .hero__name {
        font-size: clamp(2rem, 8vw, 3rem);
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .hero__cta {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .sobre__photo-placeholder {
        width: 180px;
        height: 180px;
        font-size: 3rem;
    }
}

/* --- Body scroll lock for mobile menu --- */
body.menu-open {
    overflow: hidden;
}

/* --- Mobile menu overlay --- */
.nav__overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 104;
}

.nav__overlay--visible {
    display: block;
}

/* ============================================
   KEYFRAMES
   ============================================ */
@keyframes blink {
    50% { opacity: 0; }
}

@keyframes scroll-line {
    0% { transform: scaleY(0); transform-origin: top; }
    50% { transform: scaleY(1); transform-origin: top; }
    51% { transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(59, 130, 246, 0); }
}
