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

:root {
    /* Dark Theme Colors */
    --bg-primary: #1e1e1e;
    --bg-secondary: #252526;
    --bg-tertiary: #2d2d30;
    --bg-quaternary: #3c3c3c;
    
    /* Text Colors */
    --text-primary: #d4d4d4;
    --text-secondary: #9cdcfe;
    --text-muted: #6a9955;
    --text-comment: #6a9955;
    --text-string: #ce9178;
    --text-number: #b5cea8;
    --text-keyword: #569cd6;
    --text-type: #4ec9b0;
    --text-variable: #9cdcfe;
    --text-method: #dcdcaa;
    --text-class: #4ec9b0;
    --text-enum: #c586c0;
    
    /* Accent Colors */
    --accent-blue: #007acc;
    --accent-green: #4ec9b0;
    --accent-orange: #ce9178;
    --accent-purple: #c586c0;
    --accent-yellow: #dcdcaa;
    
    /* Section Colors */
    --hero-bg: #1e1e1e;
    --skills-bg: #1a1a2e;
    --about-bg: #16213e;
    --projects-bg: #0f3460;
    --contact-bg: #533483;
    
    /* UI Colors */
    --border-color: #3c3c3c;
    --scrollbar-bg: #3c3c3c;
    --scrollbar-thumb: #6a6a6a;
    --selection-bg: #264f78;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.5);
    
    /* Typography */
    --font-mono: 'Fira Code', 'JetBrains Mono', 'Consolas', 'Monaco', monospace;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

body {
    font-family: var(--font-mono);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
    min-height: 100vh;
}

/* ===== LOADING SCREEN ===== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    color: var(--text-primary);
}

.loading-logo {
    position: relative;
    margin-bottom: var(--space-8);
}

.logo-circle {
    width: 80px;
    height: 80px;
    border: 3px solid var(--accent-blue);
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--space-4);
}

.logo-text {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--accent-blue);
}

.loading-bar {
    width: 200px;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto var(--space-4);
}

.loading-progress {
    height: 100%;
    background: var(--accent-blue);
    border-radius: 2px;
    animation: loading 2s ease-in-out infinite;
}

.loading-text {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes loading {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

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

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(37, 37, 38, 0.8);
    border-bottom: 1px solid rgba(60, 60, 60, 0.3);
    padding: var(--space-3) 0;
    z-index: 1000;
    backdrop-filter: blur(15px);
    height: 80px;
    transition: all 0.3s ease;
}

.navbar:hover {
    background: rgba(37, 37, 38, 0.95);
    border-bottom: 1px solid rgba(60, 60, 60, 0.5);
}

.navbar.scrolled {
    background: rgba(37, 37, 38, 0.9);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

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

.nav-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-decoration: none;
    color: var(--text-primary);
    min-width: 280px;
    margin-right: var(--space-4);
}

.brand-text {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--accent-blue);
}

.brand-subtitle {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
    margin-left: var(--space-2);
}

.nav-menu {
    display: flex;
    gap: var(--space-4);
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    padding: var(--space-2) var(--space-4);
    border-radius: 4px;
    transition: all var(--transition-fast);
    font-weight: 500;
    position: relative;
}

.nav-link:hover {
    background: rgba(60, 60, 60, 0.3);
    color: var(--accent-blue);
    transform: translateY(-1px);
}

.nav-link.active {
    background: rgba(0, 122, 204, 0.2);
    color: var(--accent-blue);
    border: 1px solid rgba(0, 122, 204, 0.3);
}

.layout-toggle {
    background: rgba(0, 122, 204, 0.8);
    color: white;
    border: 1px solid rgba(0, 122, 204, 0.3);
    border-radius: 6px;
    padding: var(--space-2) var(--space-4);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-weight: 600;
    font-size: var(--font-size-sm);
    backdrop-filter: blur(5px);
}

.layout-toggle:hover {
    background: rgba(0, 122, 204, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 122, 204, 0.3);
    border-color: rgba(0, 122, 204, 0.5);
}

/* Responsive adjustments for layout toggle */
@media (max-width: 768px) {
    .layout-toggle {
        font-size: var(--font-size-xs);
        padding: var(--space-1) var(--space-3);
    }
}

/* Fallback layout styles */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 100px 0;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.hero-description {
    font-size: 1.1rem;
    opacity: 0.8;
    line-height: 1.6;
}

.profile-image {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.about-section,
.skills-section,
.projects-section,
.contact-section {
    padding: 80px 0;
    background: white;
}

.about-section h2,
.skills-section h2,
.projects-section h2,
.contact-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    color: #333;
}

@media (max-width: 576px) {
    .layout-toggle {
        font-size: var(--font-size-xs);
        padding: var(--space-1) var(--space-2);
        margin-left: var(--space-1);
    }
}

.mobile-menu-icon {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 25px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.mobile-menu-icon span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

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

.mobile-menu-icon.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-icon.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ===== HERO SECTION ===== */
.hero-section {
    background: var(--hero-bg);
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2);
    padding-top: 140px;
}

.hero-container {
    max-width: 1400px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-8);
    padding: var(--space-8);
    flex-wrap: wrap;
    margin-top: var(--space-6);
}

.profile-image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    min-width: 200px;
}

.profile-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent-blue);
    box-shadow: 0 8px 32px rgba(0, 122, 204, 0.3);
    transition: all 0.3s ease;
}

.profile-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(0, 122, 204, 0.4);
    border-color: var(--accent-green);
}

/* ===== PROFILE CARD ===== */
.profile-card {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(0, 122, 204, 0.05) 100%);
    border: 2px solid var(--accent-blue);
    border-radius: 16px;
    padding: var(--space-8);
    box-shadow: 0 12px 40px rgba(0, 122, 204, 0.3);
    min-width: 300px;
    max-width: 350px;
    text-align: center;
    animation: fadeInUp 0.8s ease-out;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-green));
    z-index: 1;
}

.profile-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto var(--space-6);
    border: 4px solid var(--accent-blue);
    box-shadow: 0 12px 32px rgba(0, 122, 204, 0.4);
    animation: float 6s ease-in-out infinite, pulse 4s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

.profile-image::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--accent-blue), var(--accent-green), var(--accent-blue));
    z-index: -1;
    animation: rotate 3s linear infinite;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.profile-image:hover img {
    transform: scale(1.1);
}

.profile-info {
    color: var(--text-primary);
}

.profile-name {
    font-size: var(--font-size-2xl);
    font-weight: 800;
    margin-bottom: var(--space-4);
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-green));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.profile-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: var(--space-4);
    color: var(--accent-green);
    line-height: 1.2;
    text-shadow: 0 0 12px rgba(78, 201, 176, 0.4);
    letter-spacing: 0.5px;
}

.profile-location {
    font-size: var(--font-size-md);
    margin-bottom: var(--space-3);
    color: var(--text-secondary);
    line-height: 1.4;
    font-weight: 500;
}

.profile-email {
    font-size: var(--font-size-md);
    color: var(--text-primary);
    word-break: break-all;
    line-height: 1.4;
    padding: var(--space-3);
    background: linear-gradient(135deg, rgba(0, 122, 204, 0.1), rgba(78, 201, 176, 0.1));
    border-radius: 8px;
    border: 1px solid rgba(0, 122, 204, 0.3);
    font-weight: 500;
    transition: all 0.3s ease;
}

.profile-email:hover {
    background: linear-gradient(135deg, rgba(0, 122, 204, 0.2), rgba(78, 201, 176, 0.2));
    border-color: var(--accent-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 122, 204, 0.3);
}

/* ===== CODE EDITOR STYLES ===== */
.code-editor {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(0, 122, 204, 0.02) 100%);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 122, 204, 0.3);
    overflow: hidden;
    border: 1px solid var(--accent-blue);
    width: 100%;
    max-width: 1400px;
    height: 85vh;
    margin: 0 auto;
    backdrop-filter: blur(10px);
}

.hero-editor {
    flex: 1;
    height: 600px;
    min-width: 800px;
    max-width: 1200px;
    box-shadow: 0 16px 48px rgba(0, 122, 204, 0.4);
    border-radius: 12px;
    border: 2px solid var(--accent-blue);
}

.editor-header {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, rgba(0, 122, 204, 0.1) 100%);
    padding: var(--space-3) var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    border-bottom: 2px solid var(--accent-blue);
    height: 45px;
    backdrop-filter: blur(10px);
}

.editor-controls {
    display: flex;
    gap: var(--space-2);
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.control.close {
    background: #ff5f56;
}

.control.minimize {
    background: #ffbd2e;
}

.control.maximize {
    background: #27ca3f;
}

.control:hover {
    transform: scale(1.1);
}

.file-tab {
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    font-weight: 500;
    margin-left: var(--space-4);
}

.editor-content {
    display: flex;
    height: calc(100% - 50px);
}

.line-numbers {
    background: var(--bg-quaternary);
    padding: var(--space-4) var(--space-2);
    border-right: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    text-align: right;
    min-width: 50px;
    user-select: none;
}

.line-numbers span {
    display: block;
    line-height: 1.0;
    padding: 0;
}

.code-content {
    flex: 1;
    padding: var(--space-4);
    font-family: var(--font-mono);
    font-size: 0.85em;
    line-height: 1.0;
    color: var(--text-primary);
    white-space: nowrap;
    overflow-x: auto;
}

.code-line {
    display: block;
    margin-bottom: 1px;
    white-space: nowrap;
    color: var(--text-primary);
    padding: 0;
}

.code-line.indent-1 {
    padding-left: var(--space-6);
}

.code-line.indent-2 {
    padding-left: var(--space-12);
}

.code-line.indent-3 {
    padding-left: var(--space-18);
}

/* ===== SYNTAX HIGHLIGHTING ===== */
.comment {
    color: var(--text-comment);
    font-style: italic;
}

.keyword {
    color: var(--text-keyword);
    font-weight: 600;
    display: inline;
    text-shadow: 0 0 8px rgba(86, 156, 214, 0.3);
    transition: all 0.3s ease;
}

.keyword:hover {
    color: #569cd6;
    text-shadow: 0 0 12px rgba(86, 156, 214, 0.5);
    transform: scale(1.01);
}

.type {
    color: var(--text-type);
    font-weight: 500;
    display: inline;
    text-shadow: 0 0 6px rgba(78, 201, 176, 0.3);
    transition: all 0.3s ease;
}

.type:hover {
    color: #4ec9b0;
    text-shadow: 0 0 10px rgba(78, 201, 176, 0.4);
    transform: scale(1.01);
}

.string {
    color: var(--text-string);
    display: inline;
    text-shadow: 0 0 6px rgba(206, 145, 120, 0.3);
    transition: all 0.3s ease;
}

.string:hover {
    color: #ce9178;
    text-shadow: 0 0 10px rgba(206, 145, 120, 0.4);
    transform: scale(1.01);
}

.number {
    color: var(--text-number);
    display: inline;
}

.variable {
    color: var(--text-variable);
    display: inline;
}

.method {
    color: var(--text-method);
    display: inline;
}

.class-name {
    color: var(--text-class);
    font-weight: 600;
    display: inline;
    text-shadow: 0 0 10px rgba(78, 201, 176, 0.3);
    transition: all 0.3s ease;
    position: relative;
}

.class-name:hover {
    color: #4ec9b0;
    text-shadow: 0 0 15px rgba(78, 201, 176, 0.5);
    transform: scale(1.02);
}

.enum-value {
    color: var(--text-enum);
    font-weight: 500;
    display: inline;
    text-shadow: 0 0 8px rgba(198, 120, 221, 0.3);
    transition: all 0.3s ease;
}

.enum-value:hover {
    color: #c678dd;
    text-shadow: 0 0 12px rgba(198, 120, 221, 0.5);
    transform: scale(1.01);
}

/* ===== CUSTOM CLASS NAMES ===== */
.class-name.pessoa {
    color: #ff6b6b !important;
    font-weight: 700 !important;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
}

.class-name.pessoa:hover {
    color: #ff5252 !important;
    text-shadow: 0 0 15px rgba(255, 107, 107, 0.5);
}

.variable.instance {
    color: #ffd93d !important;
    font-weight: 600 !important;
    text-shadow: 0 0 8px rgba(255, 217, 61, 0.3);
    transition: all 0.3s ease;
}

.variable.instance:hover {
    color: #ffeb3b !important;
    text-shadow: 0 0 12px rgba(255, 217, 61, 0.5);
    transform: scale(1.01);
}

/* ===== ADDITIONAL CODE STYLING ===== */
.code-content span {
    display: inline;
}

.code-line span {
    display: inline;
}



/* ===== SECTIONS ===== */
.skills-section {
    background: var(--skills-bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-8) var(--space-4);
}

.skills-container {
    max-width: 1200px;
    width: 100%;
}

.skills-editor {
    background: var(--bg-secondary);
    border: 2px solid var(--accent-green);
    box-shadow: 0 0 30px rgba(78, 201, 176, 0.2);
    height: 600px;
}

.about-section {
    background: var(--about-bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-8) var(--space-4);
}

.about-container {
    max-width: 1200px;
    width: 100%;
}

.about-editor {
    background: var(--bg-secondary);
    border: 2px solid var(--accent-blue);
    box-shadow: 0 0 30px rgba(0, 122, 204, 0.2);
    height: 600px;
}

.projects-section {
    background: var(--projects-bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-8) var(--space-4);
}

.projects-container {
    max-width: 1200px;
    width: 100%;
}

.projects-editor {
    background: var(--bg-secondary);
    border: 2px solid var(--accent-orange);
    box-shadow: 0 0 30px rgba(206, 145, 120, 0.2);
}

.contact-section {
    background: var(--contact-bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-8) var(--space-4);
}

.contact-container {
    max-width: 1200px;
    width: 100%;
}

.contact-editor {
    background: var(--bg-secondary);
    border: 2px solid var(--accent-purple);
    box-shadow: 0 0 30px rgba(197, 134, 192, 0.2);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: var(--space-12) var(--space-4) var(--space-6);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-8);
    flex-wrap: wrap;
    gap: var(--space-6);
}

.footer-logo span {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--accent-blue);
}

.footer-logo p {
    color: var(--text-muted);
    margin: 0;
}

.footer-links {
    display: flex;
    gap: var(--space-6);
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent-blue);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-6);
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #8a8a8a;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

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

@keyframes glow {
    0%, 100% { box-shadow: 0 0 30px rgba(0, 122, 204, 0.2); }
    50% { box-shadow: 0 0 50px rgba(0, 122, 204, 0.4); }
}

@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

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

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

.code-editor {
    animation: fadeInUp 0.8s ease-out, glow 3s ease-in-out infinite;
}

.code-editor:hover {
    animation: pulse 0.5s ease-in-out;
}

.nav-link {
    transition: all 0.3s ease;
}

.nav-link:hover {
    animation: bounce 0.6s ease-in-out;
}

.profile-image {
    animation: float 6s ease-in-out infinite, pulse 4s ease-in-out infinite;
}

.profile-image:hover {
    animation: rotate 2s linear infinite;
}

.control {
    transition: all 0.3s ease;
}

.control:hover {
    animation: pulse 0.3s ease-in-out;
    transform: scale(1.2);
}





@keyframes blink {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .mobile-menu-icon {
        display: flex !important;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(37, 37, 38, 0.95);
        backdrop-filter: blur(15px);
        border-top: 1px solid rgba(60, 60, 60, 0.3);
        flex-direction: column;
        padding: var(--space-4);
        z-index: 1000;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-link {
        padding: var(--space-3) var(--space-4);
        border-bottom: 1px solid rgba(60, 60, 60, 0.2);
        text-align: center;
        transition: all 0.3s ease;
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    .nav-link:hover {
        background: rgba(0, 122, 204, 0.2);
        transform: none;
    }
    
    .nav-brand {
        min-width: 180px;
        margin-right: var(--space-2);
    }
    
    .brand-subtitle {
        max-width: 160px;
        font-size: var(--font-size-xs);
    }
    
    .layout-toggle {
        margin-top: var(--space-2);
        width: 100%;
        text-align: center;
    }
    
    .hero-container {
        flex-direction: column;
        padding: var(--space-4);
        gap: var(--space-6);
        margin-top: var(--space-2);
    }
    
    .profile-photo {
        width: 160px;
        height: 160px;
    }
    
    .hero-editor {
        height: 500px;
        min-width: auto;
        width: 100%;
        max-width: 100%;
    }
    
    .code-editor {
        margin: var(--space-2);
        border-radius: 8px;
    }
    
    .editor-content {
        min-height: 250px;
    }
    
    .code-content {
        font-size: 0.75em;
        padding: var(--space-2);
        line-height: 1.0;
        white-space: nowrap;
        overflow-x: auto;
    }
    
    .line-numbers {
        min-width: 35px;
        padding: var(--space-2) var(--space-1);
        font-size: 0.7em;
        line-height: 1.0;
    }
    
    .code-line.indent-1 {
        padding-left: var(--space-3);
    }
    
    .code-line.indent-2 {
        padding-left: var(--space-6);
    }
    
    .code-line.indent-3 {
        padding-left: var(--space-9);
    }
    
    .about-editor,
    .projects-editor,
    .skills-editor,
    .contact-editor {
        height: 450px;
    }
    
    .hero-section {
        padding: var(--space-6) var(--space-2);
        padding-top: 120px;
        min-height: auto;
    }
    
    .skills-section,
    .about-section,
    .projects-section,
    .contact-section {
        padding: var(--space-6) var(--space-2);
        min-height: auto;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: var(--space-4);
    }
    
    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (max-width: 576px) {
    .nav-brand {
        min-width: 140px;
        margin-right: var(--space-1);
    }
    
    .brand-subtitle {
        max-width: 110px;
        font-size: var(--font-size-xs);
        margin-left: 0;
    }
    
    .hero-container {
        padding: var(--space-2);
        gap: var(--space-4);
        margin-top: var(--space-1);
    }
    
    .profile-photo {
        width: 140px;
        height: 140px;
    }
    
    .hero-editor {
        height: 400px;
        min-width: auto;
        width: 100%;
    }
    
    .code-editor {
        margin: var(--space-1);
        border-radius: 6px;
    }
    
    .editor-content {
        min-height: 200px;
    }
    
    .code-content {
        font-size: 0.7em;
        padding: var(--space-1);
        line-height: 1.0;
        white-space: nowrap;
        overflow-x: auto;
    }
    
    .line-numbers {
        min-width: 30px;
        padding: var(--space-1);
        font-size: 0.65em;
        line-height: 1.0;
    }
    
    .code-line.indent-1 {
        padding-left: var(--space-2);
    }
    
    .code-line.indent-2 {
        padding-left: var(--space-4);
    }
    
    .code-line.indent-3 {
        padding-left: var(--space-6);
    }
    
    .about-editor,
    .projects-editor,
    .skills-editor,
    .contact-editor {
        height: 400px;
    }
    
    .hero-section {
        padding: var(--space-4) var(--space-1);
        padding-top: 100px;
    }
    
    .skills-section,
    .about-section,
    .projects-section,
    .contact-section {
        padding: var(--space-4) var(--space-1);
    }
}

/* ===== EXTRA SMALL SCREENS ===== */
@media (max-width: 480px) {
    .hero-container {
        gap: var(--space-3);
        padding: var(--space-1);
        margin-top: var(--space-1);
    }
    
    .profile-photo {
        width: 120px;
        height: 120px;
    }
    
    .hero-editor {
        height: 350px;
        min-width: auto;
    }
    
    .about-editor,
    .projects-editor,
    .skills-editor,
    .contact-editor {
        height: 350px;
    }
    
    .code-content {
        font-size: 0.65em;
        padding: var(--space-1);
        white-space: nowrap;
        overflow-x: auto;
    }
    
    .line-numbers {
        min-width: 25px;
        padding: var(--space-1);
        font-size: 0.6em;
    }
    
    .code-line.indent-1 {
        padding-left: var(--space-1);
    }
    
    .code-line.indent-2 {
        padding-left: var(--space-2);
    }
    
    .code-line.indent-3 {
        padding-left: var(--space-3);
    }
}

/* ===== VERY SMALL SCREENS ===== */
@media (max-width: 360px) {
    .hero-section {
        padding-top: 90px;
    }
    
    .hero-container {
        gap: var(--space-2);
        padding: var(--space-1);
    }
    
    .profile-photo {
        width: 100px;
        height: 100px;
    }
    
    .hero-editor {
        height: 300px;
    }
    
    .about-editor,
    .projects-editor,
    .skills-editor,
    .contact-editor {
        height: 300px;
    }
    
    .code-content {
        font-size: 0.6em;
    }
    
    .line-numbers {
        min-width: 20px;
        font-size: 0.55em;
    }
    
    .code-line.indent-1 {
        padding-left: var(--space-1);
    }
    
    .code-line.indent-2 {
        padding-left: var(--space-1);
    }
    
    .code-line.indent-3 {
        padding-left: var(--space-2);
    }
}

/* ===== UTILITY CLASSES ===== */
.text-gradient {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-green));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bg-gradient {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-green));
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* ===== LAYOUT MANAGER LOADING SCREEN ===== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.5s ease-in-out;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-text {
    font-size: 18px;
    font-weight: 500;
    color: #e2e8f0;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}