* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'JetBrains Mono', monospace;
    background: #000000;
    color: #ffffff;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 110%;
    height: 110%;
    background: url('src/background.jpg') center/cover;
    filter: brightness(0.4) grayscale(100%);
    z-index: -2;
    transition: transform 0.3s ease-out;
    transform: translate(-5%, -5%);
}

/* Neural Network Overlay */
.neural-network {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.15;
}

.neural-network canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Container */
.container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    padding-left: 120px;
}

/* Terminal */
.terminal {
    width: 100%;
    max-width: 700px;
    background: #000000;
    border: 1px solid #333333;
    border-radius: 6px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    animation: glitchTerminal 0.1s infinite;
}

@keyframes glitchTerminal {
    0%, 98% { transform: translateX(0); }
    99% { transform: translateX(1px); }
    100% { transform: translateX(-1px); }
}

.terminal-header {
    background: #1a1a1a;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #333333;
}

.buttons {
    display: flex;
    gap: 8px;
    margin-right: 16px;
}

.btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #666666;
}

.btn.close { background: #666666; }
.btn.minimize { background: #666666; }
.btn.maximize { background: #666666; }

.title {
    color: #cccccc;
    font-size: 14px;
    font-weight: 400;
}

.terminal-body {
    padding: 20px;
    background: #000000;
    min-height: 600px;
}

/* Avatar */
.avatar-section {
    text-align: center;
    margin-bottom: 30px;
}

.avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    object-fit: cover;
    filter: grayscale(100%);
    transition: all 0.3s ease;
}

.avatar:hover {
    transform: scale(1.05);
}

/* Terminal Output */
.output {
    line-height: 1.6;
}

.line {
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.prompt {
    color: #ffffff;
    font-weight: 500;
    font-size: 14px;
}

.command {
    color: #cccccc;
    animation: glitchType 0.1s infinite;
    font-size: 14px;
}

@keyframes glitchType {
    0%, 95% { transform: translateX(0); filter: brightness(1); }
    96% { transform: translateX(0.5px); filter: brightness(1.2); }
    97% { transform: translateX(-0.5px); filter: brightness(0.8); }
    98% { transform: translateX(0.3px); filter: brightness(1.3); }
    99% { transform: translateX(-0.3px); filter: brightness(0.9); }
    100% { transform: translateX(0); filter: brightness(1); }
}

.cursor {
    color: #ffffff;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Info Block */
.info-block {
    margin: 20px 0 30px 0;
    padding-left: 20px;
}

.info-line {
    margin: 8px 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.key {
    color: #888888;
    width: 80px;
    font-weight: 500;
    font-size: 13px;
    flex-shrink: 0;
}

.value {
    color: #ffffff;
    flex: 1;
    font-size: 13px;
}

/* Skills Block */
.skills-block {
    margin: 20px 0 30px 0;
    padding-left: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #cccccc;
    padding: 8px;
    transition: all 0.3s ease;
    border-radius: 4px;
    font-size: 13px;
}

.skill-item:hover {
    background: #1a1a1a;
    color: #ffffff;
    transform: translateX(5px);
}

.skill-item i {
    font-size: 18px;
    width: 24px;
    text-align: center;
    color: #ffffff;
    flex-shrink: 0;
}

/* Social Block */
.social-block {
    margin: 20px 0 30px 0;
    padding-left: 20px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #cccccc;
    text-decoration: none;
    margin: 10px 0;
    padding: 8px;
    transition: all 0.3s ease;
    border-radius: 4px;
    font-size: 13px;
}

.social-link:hover {
    background: #1a1a1a;
    color: #ffffff;
    transform: translateX(5px);
}

.social-link i {
    font-size: 16px;
    width: 24px;
    text-align: center;
    color: #ffffff;
    flex-shrink: 0;
}

/* Fade In Animation */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: glitchFadeIn 2s ease-out forwards;
}

.fade-in:nth-child(2) { animation-delay: 0.3s; }
.fade-in:nth-child(4) { animation-delay: 0.8s; }
.fade-in:nth-child(6) { animation-delay: 1.3s; }

@keyframes glitchFadeIn {
    0% { 
        opacity: 0; 
        transform: translateY(20px) translateX(0); 
    }
    10% { 
        opacity: 0.3; 
        transform: translateY(15px) translateX(2px); 
        filter: brightness(2);
    }
    15% { 
        opacity: 0.1; 
        transform: translateY(18px) translateX(-2px); 
    }
    20% { 
        opacity: 0.8; 
        transform: translateY(10px) translateX(1px); 
    }
    25% { 
        opacity: 0.2; 
        transform: translateY(12px) translateX(-1px); 
    }
    30% { 
        opacity: 1; 
        transform: translateY(5px) translateX(0); 
    }
    100% { 
        opacity: 1; 
        transform: translateY(0) translateX(0); 
        filter: brightness(1);
    }
}

/* Tablet Responsive */
@media (max-width: 1024px) {
    .container {
        padding-left: 60px;
        padding-right: 60px;
    }
    
    .skills-block {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 10px;
    }
    
    .terminal-body {
        min-height: 500px;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
        justify-content: center;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .terminal {
        max-width: 100%;
        border-radius: 8px;
    }
    
    .terminal-header {
        padding: 10px 12px;
    }
    
    .terminal-body {
        padding: 15px;
        min-height: auto;
    }
    
    .buttons {
        gap: 6px;
    }
    
    .btn {
        width: 10px;
        height: 10px;
    }
    
    .title {
        font-size: 12px;
    }
    
    .skills-block {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 8px;
        padding-left: 10px;
    }
    
    .info-block {
        padding-left: 10px;
    }
    
    .social-block {
        padding-left: 10px;
    }
    
    .key {
        width: 70px;
        font-size: 12px;
    }
    
    .value {
        font-size: 12px;
    }
    
    .prompt {
        font-size: 12px;
    }
    
    .command {
        font-size: 12px;
    }
    
    .skill-item {
        font-size: 12px;
        padding: 6px;
    }
    
    .skill-item i {
        font-size: 16px;
        width: 20px;
    }
    
    .social-link {
        font-size: 12px;
        padding: 6px;
    }
    
    .social-link i {
        font-size: 14px;
        width: 20px;
    }
    
    .avatar {
        width: 80px;
        height: 80px;
    }
    
    .avatar-section {
        margin-bottom: 20px;
    }
    
    .line {
        margin: 10px 0;
        gap: 8px;
    }
    
    .info-line {
        margin: 6px 0;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .terminal-body {
        padding: 12px;
    }
    
    .skills-block {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .key {
        width: 60px;
        font-size: 11px;
    }
    
    .value {
        font-size: 11px;
    }
    
    .prompt {
        font-size: 11px;
    }
    
    .command {
        font-size: 11px;
    }
    
    .skill-item {
        font-size: 11px;
        padding: 5px;
    }
    
    .skill-item i {
        font-size: 14px;
        width: 18px;
    }
    
    .social-link {
        font-size: 11px;
        padding: 5px;
    }
    
    .social-link i {
        font-size: 12px;
        width: 18px;
    }
    
    .avatar {
        width: 70px;
        height: 70px;
    }
    
    .terminal-header {
        padding: 8px 10px;
    }
    
    .title {
        font-size: 11px;
    }
    
    /* Disable glitch effects on small screens for better performance */
    .terminal {
        animation: none;
    }
    
    .command {
        animation: none;
    }
}

/* Very Small Mobile Devices */
@media (max-width: 360px) {
    .info-line {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    
    .key {
        width: auto;
        color: #888888;
    }
    
    .skills-block {
        grid-template-columns: 1fr;
    }
    
    .line {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* Landscape Mobile Orientation */
@media (max-height: 500px) and (orientation: landscape) {
    .container {
        padding: 10px;
    }
    
    .terminal-body {
        padding: 10px;
        min-height: auto;
    }
    
    .avatar {
        width: 60px;
        height: 60px;
    }
    
    .avatar-section {
        margin-bottom: 15px;
    }
    
    .line {
        margin: 8px 0;
    }
    
    .info-line {
        margin: 4px 0;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .skill-item:hover,
    .social-link:hover,
    .avatar:hover {
        transform: none;
        background: transparent;
    }
    
    .skill-item:active {
        background: #1a1a1a;
        transform: scale(0.98);
    }
    
    .social-link:active {
        background: #1a1a1a;
        transform: scale(0.98);
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #000000;
}

::-webkit-scrollbar-thumb {
    background: #333333;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555555;
}

/* Mobile scrollbar */
@media (max-width: 768px) {
    ::-webkit-scrollbar {
        width: 4px;
    }
}