:root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --text-muted: #888888;
    --accent-blue: #0044ff; /* Just for reference, image 2 underline */
    --accent-yellow: #facc15;
    --cta-color: #FF5C00;
    --border-color: rgba(255, 255, 255, 0.15);
    --hover-bg: rgba(255, 255, 255, 0.05);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Outfit', sans-serif;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    scrollbar-width: thin;
    scrollbar-color: var(--cta-color) transparent;
}

/* Custom Scrollbar — WebKit */
::-webkit-scrollbar {
    width: 3px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--cta-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #ff7a33;
}

/* Starfield canvas */
#starfield-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
}


.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* typography helpers */
.text-left { text-align: left; }
.text-muted { color: var(--text-muted); }
.mt-sm { margin-top: 1rem; }
.mt-md { margin-top: 2rem; }
.mt-xl { margin-top: 4rem; }
.mb-sm { margin-bottom: 1rem; }
.mb-md { margin-bottom: 2rem; }
.gap-md { gap: 2rem; }
.align-center { display: flex; align-items: center; justify-content: center; }

/* Russo One Display Elements */
h1.main-heading, h2, h3.box-title, .brand, .card-label, .profile-label, .header-cta, .ghost-btn, .lined-text {
    font-family: 'Russo One', sans-serif;
    font-weight: 400;
}

h1.main-heading { font-size: 3.5rem; letter-spacing: 1px; text-transform: uppercase; }
h2.sub-heading { font-size: 2rem; font-weight: 600; line-height: 1.3; }
.plain-text { font-size: 1.1rem; line-height: 1.6; font-weight: 300; }
.accent-yellow { color: var(--accent-yellow); }
.yellow-link { color: var(--accent-yellow); text-decoration: none; font-size: 1.2rem; display: inline-block; padding-bottom: 5px; border-bottom: 1px solid var(--accent-yellow); transition: opacity 0.3s ease; }
.yellow-link:hover { opacity: 0.7; }

.header-cta { transition: color 0.3s ease; }
.header-cta:hover { color: var(--cta-color); }

/* Buttons */
.ghost-btn {
    background: var(--cta-color);
    color: #ffffff;
    border: 1px solid var(--cta-color);
    padding: 14px 32px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 0;
    text-decoration: none;
    display: inline-block;
}
.ghost-btn:hover:not(.hero-slide-btn) {
    background: transparent;
    color: var(--cta-color);
}
.ghost-btn.highlight {
    background: transparent;
    color: var(--cta-color);
    border: 1px solid var(--cta-color);
}
.ghost-btn.highlight:hover:not(.hero-slide-btn) {
    background: var(--cta-color);
    color: #ffffff;
}

/* Infinite Text Slide Hover Effect (horizontal marquee) */
.hero-slide-btn {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Invisible span that gives the button its natural size */
.btn-sizer {
    visibility: hidden;
    white-space: nowrap;
    font-family: 'Russo One', sans-serif;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0 15px; /* Reduced padding to make words closer */
}

/* Absolutely positioned track — four texts side by side */
.btn-slide-track {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 400%; /* 4 items * 100% each */
    display: flex;
    align-items: center;
}

.slide-text {
    width: 25%; /* Exactly 1/4 of the 400% track = 100% of the button */
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    font-family: 'Russo One', sans-serif;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    height: 100%;
    padding: 0 15px; /* Match sizer padding */
}

/* On hover: slide left infinitely */
.hero-slide-btn:hover .btn-slide-track {
    animation: slideMarquee 1.2s linear infinite; /* Increased speed for more repetition */
}

@keyframes slideMarquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-25%); } /* Loop every 1/4 (since 4 copies) */
}

/* Removed hover color transitions for hero buttons as requested */
.hero-slide-btn.highlight:hover {
    /* Keep current state */
    background: transparent;
    color: var(--cta-color);
}
.hero-slide-btn:not(.highlight):hover {
    /* Keep current state */
    background: var(--cta-color);
    color: #ffffff;
}
.back-btn {
    position: absolute;
    top: 40px;
    left: 40px;
    background: transparent;
    color: var(--text-color);
    border: none;
    font-size: 2rem;
    cursor: pointer;
    z-index: 50;
    transition: transform 0.3s ease, color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}
.back-btn:hover { transform: translateX(-5px); color: var(--cta-color); }



/* --- Preloader --- */
#preloader {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-color);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}
#preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.preloader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 300px;
}
.preloader-text {
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-muted);
}
.preloader-bar-track {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}
.preloader-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--cta-color);
    animation: barLoad 2.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes barLoad {
    0%   { width: 0%; }
    60%  { width: 75%; }
    85%  { width: 92%; }
    100% { width: 100%; }
}

/* --- Header & Nav --- */
.home-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-transform: uppercase;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 1px;
    z-index: 1100;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.main-nav {
    display: flex;
    gap: 30px;
}
.main-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}
.main-nav a:hover {
    color: var(--cta-color);
}

/* ============================================
   HAMBURGER BUTTON
   ============================================ */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 1200;
    position: relative;
}
.ham-line {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--text-color);
    border-radius: 2px;
    transition: transform 0.35s ease, opacity 0.25s ease, width 0.3s ease;
    transform-origin: center;
}
/* Estado aberto — vira X */
.hamburger-btn.open .ham-line:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}
.hamburger-btn.open .ham-line:nth-child(2) {
    opacity: 0;
    width: 0;
}
.hamburger-btn.open .ham-line:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* Nav mobile overlay */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1050;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}
.nav-overlay.active {
    opacity: 1;
}

/* --- Page Sections --- */
.page-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
    padding-top: 80px; /* Header offset */
}
.section-content {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px;
}

/* --- Hero Section --- */
.hero-typing-container {
    font-size: 4rem;
    line-height: 1.2;
    text-transform: none;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}
.hero-cta-group {
    display: flex;
    gap: 20px;
    margin-top: 3rem;
    justify-content: center;
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.5s forwards;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}
.cursor {
    display: inline-block;
    color: var(--cta-color);
    animation: blink 1s step-end infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Section with dark background (alternating) */
.section-dark-bg {
    background-color: #141414;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

/* Content Layouts */
.split-layout { display: flex; width: 100%; min-height: 80vh; }
.split-layout .left-col, .split-layout .right-col { width: 50%; padding: 40px; display: flex; flex-direction: column; justify-content: center; }
.split-layout.reverse { flex-direction: row-reverse; }

.center-layout { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 80vh; }

/* Page Layout for Skills */
.page-layout { padding: 10px 0; text-align: left; }
#section-skills .section-content { transform: translateY(-30px); } /* Subi mais 10px */
#section-skills .skills-grid { margin-top: 1rem; } /* Reduzi de 2rem para 1rem */
#section-skills .education-box { margin-top: 1rem; }
#section-skills .mt-xl { margin-top: 2.5rem; } /* Reduzi o espaço antes de Escolaridade */

/* --- Projects section --- */
.projects-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    padding: 60px 40px;
    gap: 0;
}
.projects-heading {
    font-size: 2.6rem;
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 2.5rem;
    text-align: center;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    width: 100%;
    max-width: 1100px;
    margin-bottom: 2.5rem;
}
.projects-btn-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- Section 1: About --- */
.profile-frame {
    border: 1px solid var(--text-color);
    padding: 20px;
    display: inline-block;
    position: relative;
}
.profile-frame img {
    height: 550px;
    width: auto;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.2);
}
.profile-label {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-color);
    color: var(--bg-color);
    padding: 10px 20px;
    font-weight: 800;
    text-transform: uppercase;
}
.lined-text {
    font-size: 1.2rem;
    margin-bottom: 25px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 300;
}


/* --- Section 2: Contact --- */
.contact-sub {
    font-size: 1.5rem;
    line-height: 1.8;
    color: var(--text-muted);
    font-weight: 300;
    max-width: 700px;
    margin-top: 1.5rem;
}
.social-dots { display: flex; gap: 40px; margin: 60px 0; }
.dot {
    width: 70px;
    height: 70px;
    background: transparent;
    border: 1px solid var(--text-muted);
    border-radius: 50%;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
}
.dot:hover {
    background: var(--cta-color);
    color: #ffffff;
    border-color: var(--cta-color);
    transform: scale(1.1);
}
/* Tooltip for dots */
.dot::after {
    content: attr(data-tooltip);
    position: absolute;
    top: -45px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-color);
    color: var(--bg-color);
    padding: 4px 8px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    pointer-events: none;
}
.dot:hover::after { opacity: 1; visibility: visible; }
.dot svg { width: 32px; height: 32px; }
.footer-area { margin-top: auto; padding-top: 60px; }
.copyright { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 15px; }

/* --- Section 3: Projects (Cards) --- */
.project-card {
    position: relative;
    width: 100%;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.35s ease;
}
.project-card:hover { transform: translateY(-6px); }

/* Estado padrão: cinza */
.project-card .video-card video,
.project-card .card-image {
    filter: grayscale(100%) brightness(0.75);
    transition: filter 0.4s ease;
}
/* Hover: colorido */
.project-card:hover .video-card video,
.project-card:hover .card-image {
    filter: grayscale(0%) brightness(1);
}

.card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #111;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}
.video-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

/* Overlay sutil "Ver Projeto" no hover */
.card-hover-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.35);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}
.project-card:hover .card-hover-overlay { opacity: 1; }
.card-hover-label {
    font-family: 'Russo One', sans-serif;
    font-size: 1rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.6);
    padding: 10px 24px;
}

.button-group { display: flex; gap: 20px; }

/* ============================================
   PROJECT OVERLAY
   ============================================ */
.project-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}
.project-overlay.active {
    opacity: 1;
    visibility: visible;
}
.overlay-panel {
    background: #111;
    border: 1px solid rgba(255,255,255,0.12);
    padding: 50px 48px 48px;
    max-width: 580px;
    width: 90%;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.35s ease;
}
.project-overlay.active .overlay-panel {
    transform: translateY(0);
}
.overlay-close-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}
.overlay-close-btn:hover {
    color: var(--cta-color);
    transform: rotate(90deg);
}
.overlay-title {
    font-family: 'Russo One', sans-serif;
    font-size: 1.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-color);
    margin-bottom: 18px;
    line-height: 1.2;
}
.overlay-desc {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-muted);
    font-weight: 300;
    margin-bottom: 36px;
}
.overlay-access-btn {
    display: inline-block;
}

/* ============================================
   PROJECTS SIDEBAR
   ============================================ */
.sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1500;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}
.sidebar-backdrop.active {
    opacity: 1;
    visibility: visible;
}
.projects-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 520px;
    max-width: 95vw;
    height: 100vh;
    background: #0e0e0e;
    border-left: 1px solid rgba(255,255,255,0.1);
    z-index: 1600;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.projects-sidebar.active {
    transform: translateX(0);
}
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 32px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-title {
    font-family: 'Russo One', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-muted);
}
.sidebar-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, transform 0.2s ease;
    padding: 4px;
}
.sidebar-close-btn:hover {
    color: var(--text-color);
    transform: rotate(90deg);
}
.sidebar-project-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-project-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 32px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    cursor: default;
    transition: background 0.25s ease;
}
.sidebar-project-item:not(.placeholder):hover {
    background: rgba(255,255,255,0.04);
}
.sidebar-project-item.placeholder {
    opacity: 0.4;
    cursor: default;
}
.sidebar-proj-name {
    font-family: 'Russo One', sans-serif;
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-color);
    flex: 1;
}
.sidebar-proj-cat {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    min-width: 140px;
    text-align: center;
}
.sidebar-proj-year {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    min-width: 40px;
    text-align: right;
}

/* --- Section 4: Skills --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.border-box {
    border: 1px solid var(--border-color);
    padding: 30px;
}
.box-title { font-size: 1.2rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 20px; color: var(--text-color); }
.tags-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 15px; }
.empty-tag {
    border: 1px solid var(--text-color);
    padding: 10px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    transition: 0.3s;
    cursor: default;
}
.empty-tag:hover { border-color: var(--cta-color); color: var(--cta-color); }
.education-box { display: flex; align-items: flex-start; justify-content: space-between; gap: 40px; }
.edu-item { flex: 1; }
.edu-separator { width: 1px; height: 100px; background: var(--border-color); margin-top: 10px; }
.edu-title { margin-bottom: 10px; }
.edu-desc { line-height: 1.6; }

/* ============================================
   RESPONSIVE — TABLET (≤1024px)
   ============================================ */
@media screen and (max-width: 1024px) {

    /* Header */
    .home-header { padding: 16px 24px; }
    .main-nav { display: none; } /* Esconde nav desktop */
    .hamburger-btn { display: flex; }
    .nav-overlay { display: block; pointer-events: none; }
    .nav-overlay.active { pointer-events: auto; }

    /* Nav Mobile — drawer */
    .main-nav.mobile-open {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0;
        position: fixed;
        top: 0;
        right: 0;
        width: min(320px, 80vw);
        height: 100vh;
        background: #0a0a0a;
        border-left: 1px solid rgba(255,255,255,0.08);
        z-index: 1100;
        padding: 80px 0 40px;
        animation: slideInRight 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }
    .main-nav.mobile-open a {
        width: 100%;
        text-align: center;
        font-family: 'Russo One', sans-serif;
        font-size: 1.1rem;
        letter-spacing: 3px;
        text-transform: uppercase;
        padding: 20px 24px;
        border-bottom: 1px solid rgba(255,255,255,0.06);
        color: var(--text-color);
        transition: color 0.2s ease, background 0.2s ease;
    }
    .main-nav.mobile-open a:first-child { border-top: 1px solid rgba(255,255,255,0.06); }
    .main-nav.mobile-open a:hover { color: var(--cta-color); background: rgba(255,92,0,0.06); }

    @keyframes slideInRight {
        from { transform: translateX(100%); }
        to   { transform: translateX(0); }
    }

    /* Layout geral */
    .split-layout { flex-direction: column; height: auto; }
    .split-layout.reverse { flex-direction: column; }
    .split-layout .left-col,
    .split-layout .right-col { width: 100%; height: auto; padding: 20px 0; }

    .page-section { padding-top: 100px; }
    .section-content { padding: 20px; max-width: 100%; }

    /* Hero */
    .hero-typing-container { font-size: 2.2rem; padding: 0 20px; text-align: center; }
    .hero-content { padding: 0 16px; }
    .hero-cta-group { flex-direction: column; align-items: center; gap: 12px; }
    .hero-cta-group .ghost-btn { width: 100%; max-width: 320px; justify-content: center; }

    /* Tipografia */
    h1.main-heading { font-size: 2rem; }
    h2.sub-heading  { font-size: 1.5rem; }

    /* About */
    .profile-frame { width: 100%; box-sizing: border-box; }
    .profile-frame img { max-height: 380px; width: 100%; object-fit: cover; }
    .text-block { padding: 0 8px; }
    .lined-text { font-size: 1rem; }

    /* Projects */
    .projects-grid { grid-template-columns: 1fr; gap: 16px; }
    .projects-layout { padding: 40px 16px; min-height: auto; }
    .projects-heading { font-size: 1.8rem; }
    .projects-btn-group { flex-direction: column; align-items: center; width: 100%; gap: 12px; }
    .projects-btn-group .ghost-btn { width: 100%; max-width: 320px; justify-content: center; }
    .project-card { width: 100%; margin-bottom: 0; }

    /* Overlay */
    .overlay-panel { padding: 40px 24px 32px; }
    .overlay-title { font-size: 1.4rem; }

    /* Sidebar */
    .projects-sidebar { width: 100%; max-width: 100%; }
    .sidebar-project-item { padding: 18px 20px; flex-wrap: wrap; gap: 8px; }
    .sidebar-proj-cat { min-width: auto; }

    /* Skills */
    .skills-grid { grid-template-columns: 1fr; gap: 20px; }
    .tags-grid { grid-template-columns: 1fr 1fr; }
    .page-layout { padding: 10px 0; }
    #section-skills .section-content { transform: none; padding: 20px; }
    #section-skills .mt-xl { margin-top: 2rem; }

    .education-box { flex-direction: column; gap: 20px; }
    .edu-separator { width: 100%; height: 1px; margin: 10px 0; }

    /* Buttons */
    .button-group { flex-direction: column; width: 100%; }
    .button-group button { width: 100%; }

    /* Contact */
    #section-contact .section-content {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        padding: 20px;
    }
    .contact-sub { font-size: 1.1rem; }
    .social-dots { gap: 16px; justify-content: center; flex-wrap: wrap; }
    .dot { width: 54px; height: 54px; }
    .dot svg { width: 24px; height: 24px; }
    .footer-area { margin-top: 40px; padding-top: 0; position: relative; bottom: auto; }

    .back-btn { top: 15px; left: 15px; font-size: 1.6rem; }
}

/* ============================================
   RESPONSIVE — MOBILE (≤480px)
   ============================================ */
@media screen and (max-width: 480px) {
    .home-header { padding: 14px 16px; }
    .brand { font-size: 0.95rem; }

    .hero-typing-container { font-size: 1.7rem; line-height: 1.3; }
    h1.main-heading { font-size: 1.6rem; }
    .projects-heading { font-size: 1.5rem; letter-spacing: 1px; }
    .overlay-title { font-size: 1.2rem; }

    .ghost-btn { font-size: 0.85rem; padding: 12px 20px; }
    .btn-sizer { font-size: 0.85rem; }
    .slide-text { font-size: 0.85rem; }

    .profile-label { font-size: 0.8rem; padding: 8px 14px; }
    .lined-text { font-size: 0.95rem; }

    .sidebar-proj-name { font-size: 0.85rem; }
    .sidebar-proj-cat,
    .sidebar-proj-year { font-size: 0.75rem; }

    .tags-grid { grid-template-columns: 1fr 1fr; }
    .empty-tag { font-size: 0.75rem; height: 36px; }
    .box-title { font-size: 1rem; }

    .social-dots { gap: 12px; }
    .dot { width: 48px; height: 48px; }
    .dot svg { width: 20px; height: 20px; }
    .contact-sub { font-size: 1rem; }
}
