/* ==========================================================================
   Leonardo Moitinho - Portfólio Profissional (Redes, Infra & Automação)
   Design System & Styling
   ========================================================================== */

:root {
    /* Color Palette */
    --bg-primary: #0a0e17;
    --bg-secondary: #0f172a;
    --bg-card: rgba(17, 24, 39, 0.75);
    --bg-card-hover: rgba(30, 41, 59, 0.85);
    --bg-glass: rgba(15, 23, 42, 0.65);
    
    /* Brand & Accent Colors */
    --accent-cyan: #00d2ff;
    --accent-blue: #3a86ff;
    --accent-indigo: #6366f1;
    --accent-emerald: #10b981;
    --accent-purple: #8b5cf6;
    
    /* Text Colors */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Borders & Lines */
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(0, 210, 255, 0.3);
    --border-glow: rgba(58, 134, 255, 0.4);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #00d2ff 0%, #3a86ff 50%, #6366f1 100%);
    --gradient-text: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, #94a3b8 100%);
    --gradient-accent-text: linear-gradient(135deg, #00d2ff 0%, #3a86ff 100%);
    --gradient-card: linear-gradient(180deg, rgba(30, 41, 59, 0.5) 0%, rgba(15, 23, 42, 0.8) 100%);
    --gradient-glow: radial-gradient(circle at 50% 0%, rgba(0, 210, 255, 0.15), transparent 70%);
    
    /* Typography & Spacing */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 25px rgba(0, 210, 255, 0.2);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-family);
    overflow-x: hidden;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-family);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Global Background Mesh Effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: 
        radial-gradient(circle at 15% 20%, rgba(0, 210, 255, 0.07) 0%, transparent 45%),
        radial-gradient(circle at 85% 80%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(58, 134, 255, 0.04) 0%, transparent 60%);
    pointer-events: none;
    z-index: -1;
}

/* Containers & Sections */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
    position: relative;
}

.section-dark {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.section-header {
    margin-bottom: 3.5rem;
    text-align: center;
}

.section-tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent-cyan);
    margin-bottom: 0.75rem;
    padding: 0.35rem 1rem;
    background: rgba(0, 210, 255, 0.1);
    border: 1px solid rgba(0, 210, 255, 0.25);
    border-radius: var(--radius-full);
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.75rem;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================================================
   HEADER & NAVBAR
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition-normal);
    background: transparent;
}

.header.scrolled {
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

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

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.logo span {
    color: var(--accent-cyan);
    text-shadow: 0 0 12px rgba(0, 210, 255, 0.6);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links li a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
    padding: 0.25rem 0;
}

.nav-links li a:hover,
.nav-links li a.active {
    color: var(--text-primary);
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: var(--transition-fast);
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.6rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition-fast);
}

.menu-toggle:hover {
    color: var(--accent-cyan);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 2rem 5rem;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    position: relative;
}

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.eyebrow {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--accent-cyan);
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero h1 {
    font-size: 3.8rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.hero h1 span {
    background: var(--gradient-accent-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(0, 210, 255, 0.25);
}

.hero h2 {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2.2rem;
    max-width: 540px;
}

.hero-buttons {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.8rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-normal);
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #ffffff;
    border: 1px solid transparent;
    box-shadow: 0 4px 20px rgba(0, 210, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 210, 255, 0.45);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.hero-tech {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.hero-tech span {
    padding: 0.4rem 0.9rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.hero-tech span:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    transform: translateY(-1px);
    background: rgba(0, 210, 255, 0.05);
}

/* ==========================================================================
   HERO VISUAL & PROFILE PHOTO & TOPOLOGY
   ========================================================================== */
.hero-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    position: relative;
    width: 100%;
}

.profile-card {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-lg);
    background: radial-gradient(circle, rgba(0, 210, 255, 0.35) 0%, rgba(58, 134, 255, 0.15) 50%, transparent 70%);
    filter: blur(25px);
    z-index: 0;
    animation: pulse-glow 4s ease-in-out infinite alternate;
}

@keyframes pulse-glow {
    0% { transform: scale(0.95); opacity: 0.7; }
    100% { transform: scale(1.1); opacity: 1; }
}

.profile-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 2px solid rgba(0, 210, 255, 0.3);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 25px rgba(0, 210, 255, 0.2);
    z-index: 1;
    background: var(--bg-card);
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform var(--transition-normal);
}

.profile-card:hover .profile-img {
    transform: scale(1.04);
}

.profile-border-line {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.15);
    pointer-events: none;
}

/* Floating Badges */
.floating-badge {
    position: absolute;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid var(--border-hover);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-md);
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 210, 255, 0.15);
    z-index: 3;
    animation: float 3s ease-in-out infinite alternate;
}

.badge-exp {
    top: -15px;
    right: -25px;
}

.badge-status {
    bottom: -15px;
    left: -20px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--accent-emerald);
    animation-delay: 1.5s;
}

.badge-icon {
    font-size: 1.4rem;
}

.badge-info strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.badge-info small {
    display: block;
    font-size: 0.75rem;
    color: var(--accent-cyan);
    font-weight: 600;
}

@keyframes float {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-8px); }
}

.network-card {
    width: 100%;
    max-width: 380px;
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.75rem;
    box-shadow: var(--shadow-card), var(--shadow-glow);
    backdrop-filter: blur(16px);
    position: relative;
    overflow: hidden;
}

.network-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-glow);
    pointer-events: none;
}

.network-status {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--accent-emerald);
    margin-bottom: 2.5rem;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-emerald);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-emerald);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.network-lines {
    position: relative;
    height: 220px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.node {
    position: absolute;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    z-index: 2;
    transition: var(--transition-normal);
}

.node:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.4);
    transform: scale(1.08);
}

.node-main {
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 44px;
    background: linear-gradient(135deg, rgba(0, 210, 255, 0.15), rgba(58, 134, 255, 0.2));
    border-color: var(--accent-cyan);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.3);
}

.node-1 {
    bottom: 15%;
    left: 10%;
    width: 68px;
    height: 38px;
}

.node-2 {
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    width: 68px;
    height: 38px;
}

.node-3 {
    bottom: 15%;
    right: 10%;
    width: 68px;
    height: 38px;
}

/* Connecting Lines */
.line {
    position: absolute;
    background: linear-gradient(90deg, rgba(0, 210, 255, 0.2), rgba(58, 134, 255, 0.4));
    z-index: 1;
    transform-origin: top center;
}

.line-1 {
    top: 35%;
    left: 50%;
    width: 2px;
    height: 90px;
    transform: rotate(38deg);
    transform-origin: top left;
}

.line-2 {
    top: 35%;
    left: 50%;
    width: 2px;
    height: 65px;
    transform: translateX(-50%);
}

.line-3 {
    top: 35%;
    left: 50%;
    width: 2px;
    height: 90px;
    transform: rotate(-38deg);
    transform-origin: top right;
}

/* ==========================================================================
   ABOUT SECTION
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    color: var(--text-secondary);
    font-size: 1.08rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    border-radius: var(--radius-md);
    text-align: center;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card strong {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-accent-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.35rem;
    letter-spacing: -0.02em;
}

.stat-card span {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ==========================================================================
   SPECIALTIES / CARDS GRID
   ========================================================================== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.specialty-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2.25rem 1.75rem;
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
    position: relative;
}

.specialty-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-card), 0 0 20px rgba(0, 210, 255, 0.1);
    background: var(--bg-card-hover);
}

.card-icon {
    font-size: 2.2rem;
    margin-bottom: 1.25rem;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.specialty-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.specialty-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tags span {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.65rem;
    background: rgba(0, 210, 255, 0.08);
    color: var(--accent-cyan);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 210, 255, 0.2);
}

/* ==========================================================================
   PROJECTS SECTION
   ========================================================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.25rem;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.25rem;
    display: flex;
    flex-direction: column;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-card), 0 0 25px rgba(0, 210, 255, 0.15);
}

.project-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.project-number {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--accent-cyan);
    letter-spacing: -0.02em;
}

.project-type {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
}

.project-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.project-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.75rem;
    flex-grow: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
}

.project-tech span {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.65rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
}

.project-button {
    background: transparent;
    border: none;
    color: var(--accent-cyan);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    transition: var(--transition-fast);
    align-self: flex-start;
}

.project-button:hover {
    color: #ffffff;
    transform: translateX(4px);
}

/* ==========================================================================
   TECH STACK GRID
   ========================================================================== */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1rem;
}

.tech-grid div {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.tech-grid div:hover {
    color: var(--text-primary);
    border-color: var(--accent-cyan);
    background: rgba(0, 210, 255, 0.05);
    transform: translateY(-2px);
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */
.contact-section {
    text-align: center;
    background: radial-gradient(circle at 50% 50%, rgba(0, 210, 255, 0.06) 0%, transparent 70%);
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-content h2 {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.contact-content p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.contact-buttons {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
    padding: 2.5rem 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    background: var(--bg-primary);
}

.footer span {
    color: var(--accent-cyan);
    margin: 0 0.5rem;
}

/* ==========================================================================
   MODAL DIALOG
   ========================================================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 8, 15, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: #0f172a;
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 650px;
    padding: 2.5rem;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 30px rgba(0, 210, 255, 0.2);
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 1.5rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.modal-close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-cyan);
}

.modal-header-tag {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-cyan);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1.2rem;
}

.modal-description {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.modal-section-subtitle {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-list {
    list-style: none;
    margin-bottom: 1.5rem;
}

.modal-list li {
    position: relative;
    padding-left: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.modal-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent-cyan);
    font-weight: bold;
}

/* Modal Gallery */
.modal-gallery {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
    margin-top: 1rem;
}

.modal-gallery-item {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition-normal);
}

.modal-gallery-item:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 10px 30px rgba(0, 210, 255, 0.2);
}

.modal-gallery-img {
    width: 100%;
    height: auto;
    display: block;
    border-bottom: 1px solid var(--border-color);
    transition: transform var(--transition-normal);
}

.modal-gallery-item:hover .modal-gallery-img {
    transform: scale(1.02);
}

.modal-gallery-caption {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: rgba(10, 14, 23, 0.8);
    font-weight: 500;
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 992px) {
    .hero {
        grid-template-columns: 1fr;
        padding-top: 7rem;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-content {
        align-items: center;
    }
    
    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-tech {
        justify-content: center;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(10, 14, 23, 0.96);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--border-color);
        transform: translateY(-150%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
    }
    
    .nav-links.active {
        transform: translateY(0);
    }
    
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        padding: 1.75rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .profile-card {
        width: 230px;
        height: 230px;
    }
    
    .badge-exp {
        right: -10px;
        top: -10px;
        padding: 0.45rem 0.75rem;
    }
    
    .badge-status {
        left: -10px;
        bottom: -10px;
        padding: 0.45rem 0.75rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
    }
    
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
