/* ===========================================
   CSS Variables & Base Styles
   =========================================== */
:root {
    /* Color Palette */
    --primary-color: #00f5ff;
    --secondary-color: #ff6b35;
    --accent-color: #00e676;
    --warning-color: #ffc107;
    --danger-color: #f44336;
    
    /* Background Colors */
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-overlay: rgba(0, 0, 0, 0.9);
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #666666;
    
    /* Borders & Shadows */
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-primary: 0 10px 30px rgba(0, 245, 255, 0.2);
    --shadow-secondary: 0 5px 15px rgba(0, 0, 0, 0.3);
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Layout */
    --container-max-width: 1200px;
    --section-padding: 100px 0;
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile-first responsive variables */
@media (max-width: 768px) {
    :root {
        --section-padding: 60px 0;
        --border-radius: 8px;
    }
}

@media (max-width: 480px) {
    :root {
        --section-padding: 40px 0;
        --border-radius: 6px;
    }
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: all 0.3s ease;
    min-height: 100vh;
    opacity: 1;
}

body.loaded section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Responsive Elements */
img {
    max-width: 100%;
    height: auto;
}

.hero-subtitle-name {
    display: inline-block;
}

/* Mobile Navigation */
.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 3px 0;
    transition: var(--transition);
    border-radius: 2px;
}

.btn-text {
    transition: var(--transition);
}

/* ===========================================
   Loading Screen
   =========================================== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    transform: scale(1.1);
}

.loading-content {
    text-align: center;
    animation: slideInUp 0.8s ease-out;
}

.terminal-loading {
    background: #111111;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    min-width: 450px;
    max-width: 90vw;
    box-shadow: 0 10px 30px rgba(0, 245, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.terminal-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 245, 255, 0.05), transparent);
    animation: shimmer 2s infinite;
}

.terminal-header {
    color: #00f5ff;
    font-family: 'Courier New', monospace;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.terminal-header::before {
    content: '🛡️';
    animation: pulse 2s infinite;
}

.loading-text {
    font-family: 'Courier New', monospace;
    color: #ffffff;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.typing-text {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid #00f5ff;
    animation: typewriter 2s steps(35) infinite, blink 1s infinite;
}

.loading-progress {
    height: 4px;
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    margin-top: 20px;
}

.loading-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #00f5ff, #00e676);
    transform: translateX(-100%);
    animation: loadingBar 1.5s ease-in-out infinite;
}

.loading-status {
    color: #b3b3b3;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    margin-top: 15px;
    animation: fadeInOut 3s infinite;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes typewriter {
    0%, 90% { width: 0; }
    45%, 55% { width: 100%; }
}

@keyframes blink {
    0%, 50% { border-color: #00f5ff; }
    51%, 100% { border-color: transparent; }
}

@keyframes loadingBar {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ===========================================
   Navigation
   =========================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition);
    border-bottom: 1px solid var(--border-color);
}

.navbar.scrolled {
    background: rgba(10, 10, 10, 0.98);
    box-shadow: var(--shadow-secondary);
}

.nav-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav-logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.2rem;
}

.nav-logo i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background: rgba(0, 245, 255, 0.1);
}

.nav-link i {
    font-size: 0.9rem;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.nav-toggle .bar {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: var(--transition);
    border-radius: 2px;
}

/* ===========================================
   Hero Section
   =========================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(0, 245, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 107, 53, 0.1) 0%, transparent 50%);
    z-index: 1;
}

.hero-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 0.8fr;
    gap: 60px;
    align-items: center;
    min-height: 80vh;
}

.hero-text {
    max-width: 600px;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    font-weight: 500;
    margin-bottom: 25px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.highlight {
    color: var(--primary-color);
    font-weight: 600;
}

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

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--bg-primary);
}

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

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--bg-primary);
    transform: translateY(-2px);
}

/* ===========================================
   Terminal Window
   =========================================== */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.terminal-window {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-secondary);
    overflow: hidden;
    width: 100%;
    max-width: 500px;
    font-family: var(--font-mono);
    animation: float 6s ease-in-out infinite;
    position: relative;
}

.terminal-header {
    background: linear-gradient(135deg, #2d2d2d, #1a1a1a);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.terminal-buttons {
    display: flex;
    gap: 8px;
}

.terminal-buttons span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: block;
}

.btn-close { background: #ff5f57; }
.btn-minimize { background: #ffbd2e; }
.btn-maximize { background: #28ca42; }

.terminal-title {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

.terminal-body {
    padding: 16px;
    background: var(--bg-primary);
    min-height: 250px;
    max-height: 300px;
    overflow-y: auto;
    font-size: 0.75rem;
    line-height: 1.3;
}

.terminal-line {
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.prompt {
    color: var(--accent-color);
    margin-right: 6px;
    font-weight: 600;
    flex-shrink: 0;
    font-size: 0.75rem;
}

.command {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.75rem;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    width: 0;
    border-right: 1px solid var(--primary-color);
    padding-right: 2px;
    animation: typewriter 1.5s steps(25) 0.5s forwards, 
               removeCursor 0.1s ease-out 2.0s forwards;
}

.loading-dots {
    margin: 8px 0 4px 0;
    opacity: 0;
    animation: fadeIn 0.3s ease-out 2.0s forwards, fadeOut 0.3s ease-out 2.7s forwards;
}

.dot {
    color: var(--primary-color);
    font-size: 0.8rem;
    animation: blink 0.8s infinite;
}

.dot:nth-child(1) { animation-delay: 0s; }
.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }

.terminal-output {
    margin-top: 6px;
}

.output-line {
    color: var(--text-secondary);
    margin-bottom: 1px;
    font-size: 0.7rem;
    line-height: 1.2;
    opacity: 0;
    transform: translateX(-10px);
    animation: slideInOutput 0.3s ease-out forwards;
}

/* Timing realista para execução do nmap */
.output-line:nth-child(1) { 
    animation-delay: 2.8s; /* Starting Nmap - pequena pausa após digitar comando */
}

.output-line:nth-child(2) { 
    animation-delay: 3.0s; /* Scan report */
}

.output-line:nth-child(3) { 
    animation-delay: 3.3s; /* Host is up */
}

.output-line:nth-child(4) { 
    animation-delay: 4.5s; /* PORT STATE header - pausa para scanning */
}

.output-line:nth-child(5) { 
    animation-delay: 4.8s; /* SSH port */
}

.output-line:nth-child(6) { 
    animation-delay: 5.1s; /* HTTP port */
}

.output-line:nth-child(7) { 
    animation-delay: 5.4s; /* HTTPS port */
}

.output-line:nth-child(8) { 
    animation-delay: 5.7s; /* MySQL port */
}

.output-line:nth-child(9) { 
    animation-delay: 6.0s; /* MySQL info */
}

.output-line:nth-child(10) { 
    animation-delay: 7.5s; /* Nmap done - pausa final */
}

/* Prompts finais após execução */
.terminal-body > .terminal-line:nth-last-child(2) .prompt { 
    animation: fadeIn 0.5s ease-out 8.0s forwards;
    opacity: 0;
}

.terminal-body > .terminal-line:last-child .prompt { 
    animation: fadeIn 0.5s ease-out 8.2s forwards;
    opacity: 0;
}

.terminal-body > .terminal-line:last-child .cursor { 
    animation: blink 1s infinite;
}

.output-line.success {
    color: var(--accent-color);
}

.output-line.warning {
    color: var(--warning-color);
}

/* Animações personalizadas */
@keyframes typewriter {
    from {
        width: 0;
        opacity: 1;
    }
    to {
        width: 100%;
        opacity: 1;
    }
}

@keyframes removeCursor {
    from {
        border-right: 1px solid var(--primary-color);
        padding-right: 2px;
    }
    to {
        border-right: none;
        padding-right: 0;
    }
}

@keyframes slideInOutput {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}



@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

.cursor {
    color: var(--primary-color);
    font-weight: bold;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-arrow {
    color: var(--primary-color);
    font-size: 1.5rem;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* ===========================================
   Section Styles
   =========================================== */
section {
    padding: var(--section-padding);
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.section-title i {
    color: var(--primary-color);
    font-size: 0.9em;
}

.section-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    padding: 0 15px;
}

/* ===========================================
   About Section
   =========================================== */
.about {
    background: var(--bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.7;
}

.about-text strong {
    color: var(--primary-color);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.stat-item {
    text-align: center;
    padding: 25px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.about-image {
    position: relative;
}

.image-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 30px;
    position: relative;
    overflow: hidden;
}

.code-overlay {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: var(--bg-primary);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.code-overlay code {
    display: block;
    line-height: 1.6;
}

/* ===========================================
   Skills Section
   =========================================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.skill-category {
    background: var(--bg-card);
    padding: 30px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.category-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: var(--text-primary);
}

.category-title i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.skill-item {
    margin-bottom: 20px;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

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

.skill-percentage {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 600;
}

.skill-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 4px;
    width: 0;
    transition: width 1.5s ease-out;
    position: relative;
}

.skill-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: translateX(-100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ===========================================
   Projects Section
   =========================================== */
.projects {
    background: var(--bg-secondary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 25px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.project-card:hover::before {
    transform: scaleX(1);
}

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

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.project-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-primary);
    font-size: 1.2rem;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.active {
    background: rgba(0, 230, 118, 0.2);
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
}

.status-badge.development {
    background: rgba(255, 193, 7, 0.2);
    color: var(--warning-color);
    border: 1px solid var(--warning-color);
}

.project-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
}

.tech-tag {
    padding: 4px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.tech-tag:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.project-footer {
    display: flex;
    gap: 15px;
}

.project-link,
.project-demo {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.project-link {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.project-link:hover {
    background: var(--primary-color);
    color: var(--bg-primary);
}

.project-demo {
    background: rgba(0, 245, 255, 0.1);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.project-demo:hover {
    background: var(--primary-color);
    color: var(--bg-primary);
}

/* ===========================================
   GitHub Section
   =========================================== */
.github-content {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 60px;
    align-items: start;
}

.profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    position: sticky;
    top: 100px;
}

.profile-header {
    margin-bottom: 25px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 20px;
    border: 3px solid var(--primary-color);
    overflow: hidden;
    position: relative;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.profile-username {
    color: var(--primary-color);
    font-family: var(--font-mono);
    margin-bottom: 15px;
}

.profile-bio {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 25px 0;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--bg-primary);
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
}

.github-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
}

.github-repos {
    display: grid;
    gap: 20px;
}

.repo-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 25px;
    transition: var(--transition);
}

.repo-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color);
}

.repo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.repo-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.repo-name i {
    color: var(--primary-color);
}

.repo-visibility {
    padding: 2px 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.repo-description {
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.repo-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.repo-language {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.language-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.language-dot.c { background: #555555; }
.language-dot.shell { background: #89e051; }
.language-dot.python { background: #3572a5; }
.language-dot.yaml { background: #cb171e; }

.repo-stats {
    display: flex;
    gap: 15px;
}

.repo-stats .stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.repo-stats .stat i {
    font-size: 0.7rem;
}

/* ===========================================
   Contact Section - Professional Layout
   =========================================== */
.contact {
    background: var(--bg-secondary);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-item {
    display: flex;
    gap: 20px;
    padding: 25px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.contact-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 245, 255, 0.15);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-primary);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-details h4 {
    color: var(--text-primary);
    margin-bottom: 5px;
    font-size: 1.1rem;
    font-weight: 600;
}

.contact-details a,
.contact-details span {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
}

.contact-details a:hover {
    color: var(--primary-color);
}

.contact-cta {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 40px;
    text-align: center;
}

.contact-cta h3 {
    color: var(--text-primary);
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.contact-cta p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 30px;
    font-size: 1.05rem;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-buttons .btn {
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 500;
    min-width: 180px;
}

/* ===========================================
   Footer
   =========================================== */
.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.footer-logo i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.footer-description {
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 400px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.footer-section h4 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 8px;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary-color);
    color: var(--bg-primary);
    border-color: var(--primary-color);
}

/* ===========================================
   Scroll to Top Button
   =========================================== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
    border-radius: 50%;
    color: var(--bg-primary);
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-primary);
}

/* ===========================================
   Animations
   =========================================== */
@keyframes slide-in-left {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slide-in-right {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}



.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===========================================
   Responsive Design - REAL RESPONSIVENESS
   =========================================== */

/* Large Screens */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
        padding: 0 40px;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
}

/* Desktop */
@media (max-width: 1199px) and (min-width: 992px) {
    .container {
        max-width: 1140px;
        padding: 0 30px;
    }
}

/* Tablet Landscape */
@media (max-width: 991px) and (min-width: 769px) {
    .container {
        padding: 0 25px;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .hero-visual {
        order: -1;
        max-width: 600px;
        margin: 0 auto;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .education-section {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 25px;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .terminal-window {
        max-width: 550px;
    }
}

/* Tablet Portrait & Small Tablets */
@media (max-width: 768px) {
    /* Reset all potential conflicts */
    *, *::before, *::after {
        box-sizing: border-box;
    }
    
    html, body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
        max-width: 100vw;
    }
    
    /* Prevent horizontal overflow on all elements */
    * {
        max-width: 100%;
    }
    
    /* Exception for elements that need to be wider */
    .terminal-window,
    .hero-visual,
    .section-header,
    .container {
        max-width: none;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
        padding: 0 20px;
        margin: 0 auto;
    }
    
    /* Navigation */
    .navbar {
        padding: 15px 0;
        position: fixed;
        width: 100%;
        z-index: 9999;
    }
    
    .nav-container {
        padding: 0 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(5, 5, 5, 0.98);
        backdrop-filter: blur(20px);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 50px;
        gap: 25px;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-item {
        width: 80%;
        text-align: center;
    }
    
    .nav-link {
        padding: 15px 20px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        font-size: 1.1rem;
        width: 100%;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-toggle {
        display: flex !important;
        flex-direction: column;
        cursor: pointer;
        padding: 5px;
        z-index: 10000;
    }
    
    .nav-toggle.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-6px, 6px);
        background: var(--primary-color);
    }
    
    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-6px, -6px);
        background: var(--primary-color);
    }
    
    /* Hero Section */
    .hero {
        padding: 100px 0 60px;
        min-height: 100vh;
        display: flex;
        align-items: center;
    }
    
    .hero-container {
        width: 100%;
    }
    
    .hero-content {
        display: flex;
        flex-direction: column;
        gap: 40px;
        text-align: center;
    }
    
    .hero-visual {
        order: -1;
        width: 100%;
    }
    
    .hero-title {
        font-size: 2.2rem;
        line-height: 1.2;
        margin-bottom: 15px;
    }
    
    .hero-subtitle-name {
        font-size: 0.85em;
        display: block;
        margin-top: 5px;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 20px;
        line-height: 1.4;
    }
    
    .hero-description {
        font-size: 1rem;
        margin-bottom: 30px;
        max-width: 90%;
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 15px;
        align-items: center;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
        padding: 15px 20px;
        font-size: 1rem;
        justify-content: center;
    }
    
    /* Terminal */
    .terminal-window {
        width: 100%;
        max-width: none;
        margin: 0;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }
    
    .terminal-header {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .terminal-title {
        font-size: 0.8rem;
    }
    
    .terminal-body {
        padding: 15px;
        font-size: 0.75rem;
        min-height: 220px;
        max-height: 280px;
        overflow-y: auto;
    }
    
    .prompt {
        font-size: 0.75rem;
        margin-right: 5px;
    }
    
    .command {
        font-size: 0.75rem;
    }
    
    .output-line {
        font-size: 0.7rem;
        line-height: 1.3;
        margin: 2px 0;
    }
    
    /* Sections */
    .section-header {
        margin-bottom: 40px;
        padding: 0 10px;
    }
    
    .section-title {
        font-size: 2rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .section-subtitle {
        font-size: 1rem;
        padding: 0 10px;
    }
    
    /* About */
    .about-content {
        display: flex;
        flex-direction: column;
        gap: 30px;
    }
    
    .about-image {
        order: -1;
    }
    
    .about-stats {
        display: grid;
        grid-template-columns: 1fr;
        gap: 15px;
        margin-top: 30px;
    }
    
    .stat-item {
        padding: 20px 15px;
        text-align: center;
    }
    
    /* Skills */
    .skills-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .skill-category {
        width: 100%;
    }
    
    .category-title {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }
    
    .skill-item {
        padding: 15px;
    }
    
    /* Projects */
    .projects-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .project-card {
        padding: 25px 20px;
    }
    
    .project-footer {
        flex-direction: column;
        gap: 10px;
    }
    
    .project-footer a {
        width: 100%;
        text-align: center;
        padding: 12px;
    }
    
    /* Certifications */
    .education-section {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    .education-card {
        padding: 25px 20px;
    }
    
    /* Contact */
    .contact-content {
        display: flex;
        flex-direction: column;
        gap: 30px;
    }
    
    .contact-info {
        gap: 15px;
    }
    
    .contact-item {
        padding: 20px;
        text-align: center;
        flex-direction: column;
        gap: 10px;
    }
    
    .contact-cta {
        padding: 30px 20px;
        text-align: center;
    }
    
    .cta-buttons {
        display: flex;
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .cta-buttons .btn {
        width: 100%;
        max-width: 250px;
    }
    
    /* Footer */
    .footer-content {
        display: grid;
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .footer-links {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 90px 0 50px;
    }
    
    .hero-title {
        font-size: 1.9rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
    }
    
    .btn-text {
        display: none;
    }
    
    .btn i {
        margin-right: 0;
        font-size: 1.2rem;
    }
    
    .terminal-window {
        margin: 0 -15px;
        width: calc(100% + 30px);
        border-radius: 8px;
    }
    
    .terminal-header {
        padding: 10px 12px;
    }
    
    .terminal-title {
        font-size: 0.7rem;
    }
    
    .terminal-body {
        padding: 12px;
        font-size: 0.65rem;
        min-height: 180px;
        max-height: 220px;
    }
    
    .output-line {
        font-size: 0.6rem;
    }
    
    .prompt, .command {
        font-size: 0.65rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .section-subtitle {
        font-size: 0.95rem;
    }
    
    .about-stats {
        gap: 12px;
    }
    
    .stat-item {
        padding: 15px 10px;
    }
    
    .stat-number {
        font-size: 1.6rem;
    }
    
    .skill-item, .project-card, .education-card {
        padding: 20px 15px;
    }
    
    .contact-item {
        padding: 15px;
    }
    
    .contact-cta {
        padding: 25px 15px;
    }
    
    .contact-cta h3 {
        font-size: 1.3rem;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Extra Small Devices */
@media (max-width: 320px) {
    .container {
        padding: 0 10px;
    }
    
    .hero-title {
        font-size: 1.6rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .terminal-window {
        margin: 0 -10px;
        width: calc(100% + 20px);
    }
    
    .terminal-body {
        padding: 10px;
        font-size: 0.6rem;
        min-height: 160px;
        max-height: 200px;
    }
    
    .output-line {
        font-size: 0.55rem;
    }
    
    .prompt, .command {
        font-size: 0.6rem;
    }
} 