/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:           #eef2f7;
    --bg-alt:       #eef2f7;
    --surface:      #ffffff;
    --border:       #e2e8f0;
    --primary:      #1e3a5f;
    --accent:       #2563eb;
    --accent-light: #dbeafe;
    --text:         #1e293b;
    --text-muted:   #64748b;
    --text-light:   #94a3b8;
    --radius:       12px;
    --radius-lg:    20px;
    --shadow:       0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
    --shadow-md:    0 4px 24px rgba(30,58,95,.08), 0 1px 4px rgba(0,0,0,.06);
    --shadow-lg:    0 12px 40px rgba(30,58,95,.14);
    --transition:   background .3s, color .3s, border-color .3s, box-shadow .3s;
}

/* ===== DARK MODE ===== */
[data-theme="dark"] {
    --bg:           #0f172a;
    --bg-alt:       #1e293b;
    --surface:      #1e293b;
    --border:       #334155;
    --primary:      #f1f5f9;
    --accent:       #60a5fa;
    --accent-light: rgba(96,165,250,.15);
    --text:         #f1f5f9;
    --text-muted:   #94a3b8;
    --text-light:   #8094b0;
    --shadow:       0 1px 3px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.3);
    --shadow-md:    0 4px 24px rgba(0,0,0,.4);
    --shadow-lg:    0 12px 40px rgba(0,0,0,.5);
}

[data-theme="dark"] .nav {
    background: rgba(15,23,42,.92);
    border-bottom-color: #1e293b;
}


[data-theme="dark"] .contact-section { background: #020617; }

[data-theme="dark"] .contact-section .section-tag {
    background: rgba(96,165,250,.12);
    color: #93c5fd;
}

[data-theme="dark"] .visual-card { background: #1e2d47; border-color: #2d4270; }
[data-theme="dark"] .vc-label { color: #e2e8f0; }
[data-theme="dark"] .vc-value { color: #93b0cf; }
[data-theme="dark"] .vc-1 { border-left-color: #3b82f6; }
[data-theme="dark"] .vc-2 { border-left-color: #a78bfa; }
[data-theme="dark"] .vc-3 { border-left-color: #34d399; }
[data-theme="dark"] .vc-4 { border-left-color: #fbbf24; }

[data-theme="dark"] .tag { background: #0f172a; color: #94a3b8; }

[data-theme="dark"] .skill-tag { background: #0f172a; color: #94a3b8; }
[data-theme="dark"] .skill-tag.primary { background: rgba(96,165,250,.12); color: #93c5fd; border-color: rgba(96,165,250,.3); }

[data-theme="dark"] .timeline::before { background: #334155; }

[data-theme="dark"] .edu-status { background: rgba(96,165,250,.15); color: #93c5fd; }

[data-theme="dark"] .section-tag { background: rgba(96,165,250,.15); color: #93c5fd; }

[data-theme="dark"] .hero-badge { background: rgba(96,165,250,.15); color: #93c5fd; }

[data-theme="dark"] .chip:hover { border-color: #60a5fa; color: #60a5fa; }

[data-theme="dark"] .modal { background: #1e293b; border-color: #334155; }

[data-theme="dark"] .modal-close { background: #0f172a; border-color: #334155; color: #94a3b8; }
[data-theme="dark"] .modal-close:hover { background: #334155; color: #f1f5f9; }

[data-theme="dark"] .modal-section-title { color: #94a3b8; }

[data-theme="dark"] .modal-action { background: #0f172a; border-color: #334155; color: #94a3b8; }
[data-theme="dark"] .modal-action:hover { border-color: #60a5fa; color: #60a5fa; }

[data-theme="dark"] .cert-item { border-color: #334155; }
[data-theme="dark"] .cert-placeholder { background: #0f172a; }

[data-theme="dark"] .nav-links a:hover,
[data-theme="dark"] .nav-links a.active { background: rgba(96,165,250,.12); color: #60a5fa; }

/* ===== THEME TOGGLE ===== */
.nav-right {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.lang-toggle {
    padding: .375rem .75rem;
    border-radius: 20px;
    background: var(--accent);
    border: none;
    cursor: pointer;
    font-size: .75rem; font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
    transition: all .2s;
    font-family: inherit;
    box-shadow: 0 2px 8px rgba(37,99,235,.3);
}
.lang-toggle:hover { background: #1d4ed8; box-shadow: 0 3px 12px rgba(37,99,235,.4); transform: translateY(-1px); }
[data-theme="dark"] .lang-toggle { background: #3b82f6; }
[data-theme="dark"] .lang-toggle:hover { background: #2563eb; }

.theme-toggle {
    width: 36px; height: 36px;
    border-radius: 8px;
    background: var(--bg-alt);
    border: 1.5px solid var(--border);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
    transition: all .2s;
    flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* Show correct icon */
.icon-moon { display: none; }
[data-theme="dark"] .icon-sun  { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--bg);
    background-image: radial-gradient(#b8cce0 1.2px, transparent 1.2px);
    background-size: 28px 28px;
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background-color .3s, color .3s;
}

[data-theme="dark"] body {
    background-image: radial-gradient(#1e3a5f 1.2px, transparent 1.2px);
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

/* ===== NAV ===== */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(248,250,252,.92);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow .3s, background .3s, border-color .3s;
}
.nav.scrolled { box-shadow: var(--shadow-md); }

.nav-container {
    max-width: 1200px; margin: 0 auto; padding: 0 2rem;
    height: 64px; display: flex; align-items: center; justify-content: space-between;
}

.nav-logo { font-size: 1.5rem; font-weight: 800; color: var(--primary); letter-spacing: -1px; }
.nav-logo span { color: var(--accent); }

.nav-links { display: flex; align-items: center; gap: .125rem; }
.nav-links a {
    padding: .5rem .75rem; border-radius: 8px;
    font-size: .8125rem; font-weight: 500; color: var(--text-muted);
    transition: all .2s;
}
.nav-links a:hover,
.nav-links a.active { background: var(--accent-light); color: var(--accent); }

.nav-cta {
    background: var(--accent) !important;
    color: #fff !important;
    padding: .5rem 1rem !important;
}
.nav-cta:hover { background: #1d4ed8 !important; color: #fff !important; }
[data-theme="dark"] .nav-cta { background: #3b82f6 !important; }
[data-theme="dark"] .nav-cta:hover { background: #2563eb !important; }

.nav-toggle {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-toggle span {
    display: block; width: 22px; height: 2px;
    background: var(--text); border-radius: 2px; transition: all .3s;
}

/* ===== HERO ===== */
.hero {
    display: flex; flex-direction: column;
    align-items: center; justify-content: flex-start;
    position: relative; overflow: hidden;
    padding: calc(64px + 5rem) 0 5rem;
    background-image: none;
}

.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-grid { display: none; }

.hero-canvas {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    pointer-events: none;
}

.hero-container {
    position: relative; z-index: 1;
    max-width: 1200px; width: 100%; margin: 0 auto;
    padding: 4rem 2rem;
    display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
}

.hero-badge {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .375rem .875rem; background: var(--accent-light); color: var(--accent);
    border-radius: 100px; font-size: .8125rem; font-weight: 600; margin-bottom: 1.25rem;
    transition: var(--transition);
}

.hero-name {
    font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 800; color: var(--primary);
    line-height: 1.1; letter-spacing: -2px; margin-bottom: .5rem;
}
.hero-name span { color: var(--accent); }

.hero-title { font-size: clamp(1.125rem,2.5vw,1.5rem); font-weight: 400; color: var(--text-muted); margin-bottom: 1.5rem; }

.hero-desc { font-size: 1rem; color: var(--text-muted); line-height: 1.75; max-width: 480px; margin-bottom: 2rem; }

.hero-actions { display: flex; gap: .875rem; margin-bottom: 2.5rem; flex-wrap: wrap; }

.btn {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .75rem 1.5rem; border-radius: 10px;
    font-size: .9375rem; font-weight: 600; transition: all .2s; cursor: pointer; border: none;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 4px 16px rgba(37,99,235,.28); }
.btn-primary:hover { background: #1d4ed8; box-shadow: 0 6px 20px rgba(37,99,235,.38); transform: translateY(-1px); }
.btn-secondary { background: var(--surface); color: var(--text); border: 1.5px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

.hero-stats { display: flex; gap: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.hero-stat { display: flex; flex-direction: column; }
.stat-number { font-size: 1.375rem; font-weight: 800; color: var(--primary); letter-spacing: -.5px; }
.stat-number.stat-studying { color: #e8741a; }
.stat-label  { font-size: .75rem; color: var(--text-light); font-weight: 500; margin-top: .125rem; }

.hero-visual { display: flex; justify-content: flex-end; }
.hero-card-stack { display: flex; flex-direction: column; gap: .875rem; width: 100%; max-width: 360px; }

.visual-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: .875rem 1.125rem;
    box-shadow: var(--shadow); opacity: 0;
    animation: slideInRight .6s ease forwards;
    transition: background .3s, border-color .3s, box-shadow .3s;
    border-left: 3px solid var(--accent);
}
.visual-card:hover { box-shadow: var(--shadow-md); }
.vc-1 { animation-delay: .15s; border-left-color: #2563eb; }
.vc-2 { animation-delay: .3s;  border-left-color: #7c3aed; }
.vc-3 { animation-delay: .45s; border-left-color: #059669; }
.vc-4 { animation-delay: .6s;  border-left-color: #d97706; }
.vc-5 { animation-delay: .75s; border-left-color: #e05729; }
[data-theme="dark"] .vc-5 { border-left-color: #f97316; }

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

.vc-label { font-size: .8125rem; font-weight: 700; color: var(--text); margin-bottom: .35rem; }
.vc-value { font-size: .75rem; color: var(--text-light); }

.visual-card[data-id] { cursor: pointer; }
.visual-card[data-id]:hover { box-shadow: var(--shadow-md); transform: translateX(4px); }
.vc-arrow { opacity: 0; margin-left: .25rem; transition: opacity .2s, transform .2s; display: inline-block; }
.visual-card[data-id]:hover .vc-arrow { opacity: 1; transform: translateX(3px); }

.scroll-indicator {
    position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: .5rem;
    color: var(--text-light); font-size: .75rem; font-weight: 500;
    animation: bounce 2.2s ease-in-out infinite; z-index: 1;
}
.scroll-arrow {
    width: 20px; height: 20px;
    border-right: 2px solid var(--text-light); border-bottom: 2px solid var(--text-light);
    transform: rotate(45deg); margin-top: -10px;
}
@keyframes bounce {
    0%,100% { transform: translateX(-50%) translateY(0); }
    50%      { transform: translateX(-50%) translateY(7px); }
}

/* ===== SCROLL ZOOM ===== */
#projetos {
    transform-origin: top center;
    will-change: transform, border-radius;
    overflow: hidden;
    box-shadow: 0 -16px 60px rgba(30,58,95,.10);
}

/* ===== SECTIONS ===== */
.section { padding: 5rem 0; }
.section-alt { background-color: transparent; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-tag { display: none; }
.section-title { font-size: clamp(1.75rem,3vw,2.25rem); font-weight: 800; color: var(--primary); letter-spacing: -1px; }

/* ===== ABOUT ===== */
.about-grid { display: grid; grid-template-columns: auto 1fr; gap: 4rem; align-items: start; }
.about-photo { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.photo-placeholder {
    width: 160px; height: 160px; border-radius: 50%;
    background: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem; font-weight: 800; color: white;
    box-shadow: var(--shadow-lg); flex-shrink: 0; overflow: hidden;
}
.profile-photo { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; border-radius: 50%; }
.about-chips { display: flex; flex-direction: column; gap: .5rem; width: 100%; }
.chip {
    display: flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .375rem .875rem; background: var(--surface);
    border: 1.5px solid var(--border); border-radius: 8px;
    font-size: .8125rem; font-weight: 600; color: var(--text-muted);
    transition: all .2s; white-space: nowrap;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.about-text p { color: var(--text-muted); line-height: 1.8; margin-bottom: 1rem; }
.about-lead { font-size: 1.125rem !important; font-weight: 600 !important; color: var(--text) !important; }

/* ===== PROJECTS ===== */
.projects-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.25rem; }

/* --- Neon border beam — luz percorrendo toda a borda do card em destaque --- */
@property --neon-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}
.card-neon-wrap {
    position: relative;
    border-radius: var(--radius-lg);
    isolation: isolate;
}
/* Anel de borda: teal constante + cometa branco-brilhante girando */
.card-neon-wrap::before,
.card-neon-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 3px;
    background: conic-gradient(from var(--neon-angle),
        rgba(20,184,166,.30) 0deg,
        rgba(20,184,166,.30) 210deg,
        #2dd4bf 280deg,
        #5eead4 310deg,
        #ffffff 330deg,
        #99f6e4 345deg,
        rgba(20,184,166,.30) 360deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    animation: neon-rotate 3s linear infinite;
    pointer-events: none;
}
.card-neon-wrap::before { z-index: 2; }                               /* anel nítido sobre a borda */
.card-neon-wrap::after  { z-index: 0; filter: blur(11px); opacity: 1; }  /* glow difuso e forte ao redor */
.card-neon-wrap > .project-card {
    position: relative;
    z-index: 1;
    border: none;
    height: 100%;
}
@keyframes neon-rotate {
    to { --neon-angle: 360deg; }
}

/* --- Selo "Projeto principal · Em andamento" --- */
.project-badge-live {
    display: inline-flex; align-items: center; gap: .5rem;
    align-self: flex-start;
    background: rgba(13,148,136,.1);
    color: #0d9488;
    border: 1px solid rgba(13,148,136,.28);
    font-size: .7rem; font-weight: 700; letter-spacing: .04em;
    text-transform: uppercase;
    padding: .35rem .7rem; border-radius: 999px;
    margin-bottom: .875rem;
}
[data-theme="dark"] .project-badge-live { background: rgba(45,212,191,.12); color: #5eead4; border-color: rgba(45,212,191,.3); }
.live-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: #10b981; flex-shrink: 0;
    box-shadow: 0 0 0 0 rgba(16,185,129,.6);
    animation: live-ping 1.6s ease-out infinite;
}
@keyframes live-ping {
    0%   { box-shadow: 0 0 0 0 rgba(16,185,129,.55); }
    70%  { box-shadow: 0 0 0 7px rgba(16,185,129,0); }
    100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}
@media (prefers-reduced-motion: reduce) {
    .card-neon-wrap::before, .card-neon-wrap::after, .live-dot { animation: none; }
}

.project-card {
    background: var(--surface); border-radius: var(--radius-lg);
    overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border);
    transition: all .3s; display: flex; flex-direction: column; cursor: pointer;
}
.project-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: transparent; }
.project-accent { height: 4px; width: 100%; background: var(--c1); }
.project-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.project-tags { display: flex; flex-wrap: wrap; gap: .375rem; margin-bottom: .875rem; }
.tag {
    padding: .2rem .625rem; background: var(--bg-alt);
    border-radius: 6px; font-size: .75rem; font-weight: 600; color: var(--text-muted);
    transition: var(--transition);
}
.project-title    { font-size: 1rem; font-weight: 700; color: var(--primary); margin-bottom: .25rem; line-height: 1.3; }
.project-subtitle { font-size: .8125rem; color: var(--text-light); margin-bottom: .75rem; font-weight: 500; }
.project-desc     { font-size: .875rem; color: var(--text-muted); line-height: 1.7; flex: 1; margin-bottom: 1rem; }
.project-highlights {
    display: flex; gap: 1.5rem;
    padding-top: 1rem; border-top: 1px solid var(--border); margin-top: auto;
}
.highlight { display: flex; flex-direction: column; }
.highlight-num   { font-size: 1.125rem; font-weight: 800; color: var(--primary); letter-spacing: -.5px; }
.highlight-label { font-size: .7rem; color: var(--text-light); font-weight: 500; }

.btn-project {
    display: inline-flex; align-items: center; gap: .375rem;
    margin-top: 1rem; padding: .375rem 0;
    background: none; border: none;
    font-size: .875rem; font-weight: 600; color: var(--accent);
    cursor: pointer; transition: gap .2s, color .2s;
    font-family: inherit;
}
.btn-project:hover { gap: .625rem; }

/* ===== TIMELINE ===== */
.timeline { position: relative; max-width: 860px; margin: 0 auto; }
.timeline::before {
    content: ''; position: absolute;
    left: 20px; top: 10px; bottom: 0; width: 2px; background: var(--border);
    transition: background .3s;
}
.timeline-item { position: relative; padding-left: 60px; margin-bottom: 2.5rem; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-marker {
    position: absolute; left: 12px; top: 10px;
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--surface); border: 2.5px solid var(--border); z-index: 1;
}
.timeline-marker.current {
    border-color: var(--accent); background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-light);
}
.timeline-content {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.5rem;
    box-shadow: var(--shadow); transition: box-shadow .3s, background .3s, border-color .3s;
}
.timeline-content:hover { box-shadow: var(--shadow-md); }
.timeline-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 1rem; margin-bottom: 1rem;
}
.timeline-role    { font-size: 1rem; font-weight: 700; color: var(--primary); margin-bottom: .2rem; }
.timeline-company { font-size: .875rem; color: var(--accent); font-weight: 600; }
.timeline-date    {
    font-size: .8125rem; color: var(--text-light); font-weight: 500;
    white-space: nowrap; padding: .25rem .625rem;
    background: var(--bg-alt); border-radius: 6px; flex-shrink: 0;
    transition: var(--transition);
}
.timeline-bullets { margin-bottom: 1rem; }
.timeline-bullets li {
    font-size: .875rem; color: var(--text-muted);
    padding-left: 1.125rem; position: relative;
    margin-bottom: .4rem; line-height: 1.65;
}
.timeline-bullets li::before {
    content: '→'; position: absolute; left: 0;
    color: var(--accent); font-size: .75rem; top: 2px;
}
.timeline-tags { display: flex; flex-wrap: wrap; gap: .375rem; }

/* ===== SKILLS ===== */
.skills-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.25rem; }
.skill-category {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem 1.5rem;
    box-shadow: var(--shadow); transition: all .3s;
}
.skill-category:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.skill-cat-title { font-size: .9375rem; font-weight: 700; color: var(--primary); margin-bottom: .875rem; }

.skill-azulejo {
    width: 46px; height: 46px;
    color: var(--accent);
    margin-bottom: .875rem;
    display: block;
    opacity: .85;
    transition: opacity .2s, color .3s;
}
.skill-category:hover .skill-azulejo { opacity: 1; }
.skill-tags       { display: flex; flex-wrap: wrap; gap: .375rem; }
.skill-tag {
    padding: .25rem .625rem; background: var(--bg-alt);
    border-radius: 6px; font-size: .75rem; font-weight: 600; color: var(--text-muted);
    border: 1px solid transparent; transition: var(--transition);
}
.skill-tag.primary { background: var(--accent-light); color: var(--accent); border-color: #bfdbfe; }
[data-theme="dark"] .skill-tag.primary { border-color: rgba(96,165,250,.3); }

/* ===== EDUCATION ===== */
.edu-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1.25rem; max-width: 860px; margin: 0 auto; }
.edu-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.5rem;
    box-shadow: var(--shadow); position: relative; transition: box-shadow .3s, background .3s, border-color .3s;
}
.edu-card:hover { box-shadow: var(--shadow-md); }
.current-edu { border-color: var(--accent); border-width: 2px; }
.edu-status {
    position: absolute; top: 1rem; right: 1rem;
    padding: .2rem .625rem; background: var(--accent-light); color: var(--accent);
    border-radius: 100px; font-size: .7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .5px; transition: var(--transition);
}
.edu-icon {
    font-size: .625rem; font-weight: 800; letter-spacing: 2.5px;
    text-transform: uppercase; color: var(--accent); opacity: .7;
    margin-bottom: .875rem;
}
.edu-title  { font-size: .9375rem; font-weight: 800; color: var(--text); margin-bottom: .375rem; line-height: 1.4; }
.edu-school { font-size: .875rem; color: var(--accent); font-weight: 600; margin-bottom: .25rem; }
.edu-period { font-size: .8125rem; color: var(--text-light); font-weight: 500; }
.edu-desc   { font-size: .8125rem; color: var(--text-muted); margin-top: .375rem; }

/* ===== CERTIFICATES ===== */
.certs-hint { color: var(--text-light); font-size: .875rem; margin-top: .5rem; }

.certs-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.25rem; max-width: 900px; margin: 0 auto; }

.cert-item {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow); transition: all .3s; cursor: pointer;
}
.cert-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--accent); }

.cert-img-wrap {
    aspect-ratio: 4/3; overflow: hidden; background: var(--bg-alt);
    display: flex; align-items: center; justify-content: center;
    transition: background .3s;
}
.cert-img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.cert-item:hover .cert-img { transform: scale(1.04); }

.cert-placeholder {
    font-size: 3rem; width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-alt); transition: background .3s;
}

.cert-info { padding: .875rem 1rem; }
.cert-title  { font-size: .875rem; font-weight: 700; color: var(--primary); margin-bottom: .25rem; line-height: 1.35; }
.cert-school { font-size: .75rem; color: var(--text-light); font-weight: 500; }

/* ===== FOOTER CHART SVG ===== */
.footer-chart {
    position: absolute; bottom: 0; left: 0;
    width: 100%; height: 260px;
    pointer-events: none;
}

/* ===== CONTACT ===== */
.contact-section { background: var(--primary); transition: background .3s; position: relative; overflow: hidden; }
.contact-section .section-tag  { background: transparent; color: #93c5fd; letter-spacing: 1.5px; text-transform: uppercase; font-size: .75rem; }
.contact-section .section-title { color: #f8fafc; }
.contact-sub { color: #94a3b8; margin-top: .75rem; font-size: 1rem; }
/* ===== CONTACT ICONS ===== */
.social-icons-row { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 2.5rem auto 0; flex-wrap: wrap; }

.soc-btn {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    width: 56px; height: 56px; border-radius: 16px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    color: rgba(255,255,255,.5);
    transition: all .25s; text-decoration: none;
}

/* Tooltip */
.soc-btn::before {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 12px); left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #0f172a;
    color: #e2e8f0;
    padding: .35rem .8rem;
    border-radius: 8px;
    font-size: .75rem; font-weight: 600;
    white-space: nowrap;
    opacity: 0; pointer-events: none;
    transition: opacity .2s, transform .2s;
    border: 1px solid rgba(255,255,255,.1);
    z-index: 10;
}
.soc-btn::after {
    content: '';
    position: absolute;
    bottom: calc(100% + 6px); left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #0f172a;
    opacity: 0; transition: opacity .2s; z-index: 10;
}
.soc-btn:hover { transform: translateY(-4px); }
.soc-btn:hover::before { opacity: 1; transform: translateX(-50%) translateY(0); }
.soc-btn:hover::after  { opacity: 1; }

.soc-email:hover     { background: rgba(239,68,68,.2);   color: #fca5a5; border-color: rgba(239,68,68,.35); }
.soc-linkedin:hover  { background: rgba(0,119,181,.25);  color: #7dd3fc; border-color: rgba(0,119,181,.35); }
.soc-github:hover    { background: rgba(255,255,255,.15); color: #f1f5f9; border-color: rgba(255,255,255,.3); }
.soc-instagram:hover { background: rgba(225,48,108,.2);  color: #f9a8d4; border-color: rgba(225,48,108,.3); }
.soc-phone:hover     { background: rgba(34,197,94,.2);   color: #86efac; border-color: rgba(34,197,94,.3); }

/* ===== FOOTER ILLUSTRATION ===== */
.footer-illustration {
    background: var(--bg);
    border-top: 1px solid var(--border);
    overflow: hidden;
    line-height: 0;
    transition: background .3s, border-color .3s;
}

.footer-bull-bear { width: 100%; height: auto; display: block; }

.bg-hatch-line  { stroke: var(--border); }
.animal-hatch-line { stroke: var(--primary); opacity: .28; }
.animal-outline { fill: none; stroke: var(--primary); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; transition: stroke .3s; }
.grid-line      { stroke: var(--border); stroke-width: .5; opacity: .6; }
.ground-line    { stroke: var(--border); stroke-width: 1; }
.chart-line     { fill: none; stroke: var(--accent); stroke-width: 1.8; opacity: .7; }
.chart-dot      { fill: var(--accent); opacity: .7; }
.impact-group line { stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; opacity: .9; }
.illus-label    { font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 3px; fill: var(--text-light); transition: fill .3s; }
.vs-text        { font-family: 'Inter', sans-serif; font-size: 28px; font-weight: 900; fill: var(--accent); opacity: .22; }

[data-theme="dark"] .animal-hatch-line { stroke: #60a5fa; opacity: .18; }
[data-theme="dark"] .animal-outline    { stroke: #60a5fa; }

/* ===== FOOTER ===== */
.footer {
    background: #1e3a5f;
    color: #f1f5f9;
    padding: 2rem 0 1.5rem;
}
[data-theme="dark"] .footer { background: #020617; }

.footer-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 2rem; flex-wrap: wrap;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.footer-brand { display: flex; flex-direction: column; }
.footer-logo-img { height: 32px; width: auto; object-fit: contain; filter: brightness(0) invert(1); opacity: .9; }
.footer-tagline { font-size: .8125rem; color: #64748b; margin-top: .25rem; font-style: italic; }

.footer-nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-nav a { font-size: .875rem; color: #94a3b8; font-weight: 500; transition: color .2s; }
.footer-nav a:hover { color: #f1f5f9; }

.footer-social { display: flex; gap: .625rem; align-items: center; }
.footer-social-link {
    width: 36px; height: 36px; border-radius: 8px;
    background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1);
    display: flex; align-items: center; justify-content: center;
    color: #94a3b8; font-size: .875rem; font-weight: 700;
    transition: all .2s; text-decoration: none;
}
.footer-social-link:hover { background: rgba(255,255,255,.15); color: #f1f5f9; }

.footer-copy { padding-top: 1.25rem; text-align: center; }
.footer-copy p { font-size: .8125rem; color: #94a3b8; }

@media (max-width: 768px) {
    .footer-inner { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
    .footer-nav   { gap: 1rem; }
}

/* ===== FADE-IN ===== */
.fade-in { opacity: 0; transform: translateY(22px); transition: opacity .65s ease, transform .65s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    z-index: 200; display: flex; align-items: flex-start; justify-content: center;
    padding: 3rem 1rem 2rem; overflow-y: auto;
    opacity: 0; pointer-events: none; transition: opacity .3s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); max-width: 860px; width: 100%;
    margin: auto; box-shadow: var(--shadow-lg);
    transform: translateY(24px); transition: transform .35s, background .3s, border-color .3s;
    position: relative; overflow: hidden;
}
.modal-overlay.open .modal { transform: translateY(0); }

.modal-close {
    position: absolute; top: 1rem; right: 1rem;
    width: 36px; height: 36px; border-radius: 8px;
    background: var(--bg-alt); border: 1.5px solid var(--border);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); z-index: 10; transition: all .2s;
}
.modal-close:hover { background: var(--border); color: var(--text); }

.modal-header {
    height: 6px; width: 100%;
}

.modal-body { padding: 2rem; }

.modal-tags { display: flex; flex-wrap: wrap; gap: .375rem; margin-bottom: 1rem; }

.modal-title {
    font-size: 1.375rem; font-weight: 800; color: var(--primary);
    letter-spacing: -.5px; margin-bottom: .25rem;
}
.modal-subtitle { font-size: .9375rem; color: var(--text-muted); margin-bottom: 1.25rem; }

.modal-desc { font-size: .9375rem; color: var(--text-muted); line-height: 1.75; margin-bottom: 1.5rem; }

.modal-metrics {
    display: flex; gap: 1.5rem;
    padding: 1rem 1.25rem; background: var(--bg-alt);
    border-radius: 10px; margin-bottom: 1.5rem;
    transition: background .3s;
}
.modal-metric { display: flex; flex-direction: column; }
.modal-metric-num   { font-size: 1.25rem; font-weight: 800; color: var(--primary); }
.modal-metric-label { font-size: .75rem; color: var(--text-light); font-weight: 500; }

.modal-section-title {
    font-size: .75rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .8px; color: var(--text-light); margin-bottom: .875rem;
}

.modal-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.modal-action {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .625rem 1.125rem; border-radius: 8px;
    border: 1.5px solid var(--border); background: var(--surface);
    font-size: .875rem; font-weight: 600; color: var(--text-muted);
    cursor: pointer; text-decoration: none; transition: all .2s; font-family: inherit;
}
.modal-action:hover { border-color: var(--accent); color: var(--accent); }
.modal-action.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.modal-action.primary:hover { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }

.modal-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: .875rem; margin-bottom: 1.5rem; }
.modal-gallery-img {
    width: 100%; aspect-ratio: 16/9; object-fit: cover;
    border-radius: 8px; cursor: pointer; border: 1px solid var(--border);
    transition: transform .2s, box-shadow .2s;
}
.modal-gallery-img:hover { transform: scale(1.02); box-shadow: var(--shadow-md); }

.modal-video { width: 100%; aspect-ratio: 16/9; border-radius: 10px; border: none; margin-bottom: 1.5rem; }

.modal-embed-wrap {
    position: relative; width: 100%; margin-bottom: 1.5rem;
    padding-bottom: 62.25%; height: 0; border-radius: 10px; overflow: hidden;
    border: 1px solid var(--border);
}
.modal-embed {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%; border: none;
}

.modal-empty {
    padding: 2rem; text-align: center; border: 2px dashed var(--border);
    border-radius: 10px; color: var(--text-light); font-size: .875rem;
    margin-bottom: 1.5rem;
}
.modal-empty strong { display: block; margin-bottom: .25rem; color: var(--text-muted); font-weight: 600; }

/* ===== LIGHTBOX ===== */
.lightbox {
    position: fixed; inset: 0; background: rgba(0,0,0,.93);
    z-index: 300; display: flex; flex-direction: column;
    align-items: center; justify-content: center; padding: 2rem;
    opacity: 0; pointer-events: none; transition: opacity .3s;
}
.lightbox.open { opacity: 1; pointer-events: all; }

.lightbox-close {
    position: absolute; top: 1.25rem; right: 1.25rem;
    width: 40px; height: 40px; border-radius: 10px;
    background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background .2s;
}
.lightbox-close:hover { background: rgba(255,255,255,.2); }

.lightbox-img { max-width: 100%; max-height: 80vh; border-radius: 10px; object-fit: contain; }
.lightbox-caption { color: rgba(255,255,255,.6); font-size: .875rem; margin-top: 1rem; text-align: center; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .projects-grid { grid-template-columns: repeat(2,1fr); }
    .skills-grid   { grid-template-columns: repeat(2,1fr); }
    .certs-grid    { grid-template-columns: repeat(3,1fr); }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-links.open {
        display: flex; flex-direction: column; gap: .25rem;
        position: fixed; top: 64px; left: 0; right: 0;
        background: var(--surface); padding: 1rem 1rem 1.25rem;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-md); z-index: 99;
        overflow-y: auto; max-height: calc(100vh - 64px);
    }
    .nav-links.open .nav-cta { margin-top: .25rem; display: block; text-align: center; }
    .nav-toggle { display: flex; }

    .hero-container { grid-template-columns: 1fr; gap: 2rem; padding: 2rem 1.5rem; }
    .hero-visual { display: none; }
    .hero-stats  { gap: 1.25rem; flex-wrap: wrap; }

    .about-grid { grid-template-columns: 1fr; gap: 2rem; }
    .about-photo { flex-direction: row; align-items: center; gap: 1.5rem; }
    .about-chips { flex-direction: row; flex-wrap: wrap; width: auto; }

    .projects-grid { grid-template-columns: 1fr; }
    .skills-grid   { grid-template-columns: 1fr; }
    .edu-grid      { grid-template-columns: 1fr; }
    .certs-grid    { grid-template-columns: repeat(2,1fr); }
    .social-icons-row { gap: .75rem; }

    .timeline::before { left: 10px; }
    .timeline-item    { padding-left: 40px; }
    .timeline-marker  { left: 2px; }
    .timeline-header  { flex-direction: column; align-items: flex-start; gap: .5rem; }
    .timeline-date    { align-self: flex-start; }

    .section   { padding: 3.5rem 0; }
    .container { padding: 0 1.25rem; }

    .modal-overlay { padding: 1rem .5rem; }
    .modal-body    { padding: 1.5rem 1.25rem; }
    .modal-gallery { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .hero-name    { letter-spacing: -1.5px; }
    .hero-actions { flex-direction: column; }
    .btn          { justify-content: center; }
    .about-photo  { flex-direction: column; }
    .about-chips  { flex-direction: column; width: 100%; }
    .certs-grid   { grid-template-columns: 1fr; }
}
