@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap');

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

body {
    background-color: #2c0922;
    font-family: 'JetBrains Mono', Consolas, 'Courier New', 'Lucida Console', monospace;
    height: 100vh;
    margin: 0;
    padding: 0;
}

/* Windows-specific styling */
body.windows-device {
    font-family: monospace, 'Courier New', Consolas;
}

body.windows-device .terminal,
body.windows-device #cli-input,
body.windows-device .terminal-output,
body.windows-device .prompt,
body.windows-device .command-output,
body.windows-device .ascii-art,
body.windows-device .log-text {
    font-family: monospace, 'Courier New', Consolas;
}

/* Mobile device specific styles */
body.mobile-device {
    font-size: 14px; /* Smaller base font size for mobile */
}

body.mobile-device .terminal {
    padding: 10px;
    font-size: 13px;
}

body.mobile-device .ascii-art {
    font-size: 10px;
    line-height: 1.2;
    white-space: pre;
    overflow-x: auto;
}

body.mobile-device .bio-container {
    padding: 10px;
}

/* Weather specific mobile styles */
body.mobile-device .weather-day-header {
    font-weight: bold;
    color: #ffcc00;
    margin-top: 8px;
    margin-bottom: 5px;
}

/* Fixed-width container for weather output to prevent responsive layout changes - override for mobile */
body.mobile-device .weather-container {
    min-width: auto;
    width: 100%;
    overflow-x: auto;
}

/* Page Layout */
.page-container {
    display: flex;
    flex-direction: row-reverse;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* Bio Container Styling */
.bio-container {
    width: 300px;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    position: sticky;
    top: 0;
    border-left: 1px solid #98c379;
}

/* Profile Image Styling */
.profile-image-container {
    width: 100%;
    height: auto;
    border: 2px solid #98c379;
    overflow: hidden;
    margin-bottom: 20px;
    aspect-ratio: 1 / 1;
}

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

/* Social Media Links */
.social-links {
    display: flex;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
    margin-bottom: 20px;
}

.social-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: transparent;
    border: 1px solid;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #98c379;
    font-size: 24px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: transparent;
    transform: scale(1.1);
}

.github {
    border-color: #6e5494;
    color: #6e5494;
}

.github:hover {
    color: #8a75a4;
}

.linkedin {
    border-color: #0077b5;
    color: #0077b5;
}

.linkedin:hover {
    color: #1a8bc8;
}

.instagram {
    border-color: #e1306c;
    color: #e1306c;
}

.instagram:hover {
    color: #e45a8a;
}

/* Bio Text Styling */
.bio-text {
    color: #98c379;
    font-size: 14px;
    line-height: 1.5;
    width: 100%;
    position: relative;
    text-align: left !important;
}

#typed-bio {
    display: inline;
}

.cursor {
    display: inline-block;
    margin-left: 1px;
    width: 10px;
    height: 20px;
    background-color: #98c379;
    animation: blink 1s infinite;
}

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

/* Make terminal take full left side */
.terminal {
    flex: 1; /* Takes up all available space */
    background-color: rgba(0, 0, 0, 0.9);
    padding: 16px;
    display: flex;
    flex-direction: column;
    user-select: text;
    cursor: text; /* Indicates the area is text-editable */
    position: relative; /* For proper click handling */
    width: 100%; /* Ensure it takes full width */
    height: 100%; /* Ensure it takes full height */
    min-width: 0; /* Allows flex child to shrink below content size if needed */
}

.terminal-output {
    color: #98c379;
    overflow-y: auto;
    padding-bottom: 16px;
    user-select: text;
}

.prompt {
    color: #d19a66;
}

#cli-input {
    background: transparent;
    border: none;
    color: #98c379;
    font-family: inherit;
    font-size: inherit;
    outline: none;
    margin-left: 4px;
    width: calc(100% - 20px);
    display: inline-block;
    caret-color: transparent;
    position: relative;
    z-index: 1;
}

.input-wrapper {
    position: relative;
    display: inline-flex;
    width: calc(100% - 200px);
}

.terminal-cursor {
    display: inline-block;
    width: 10px;
    height: 18px;
    background-color: #98c379;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    animation: terminalBlink 1s infinite steps(1);
}

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

.terminal-input-line {
    display: flex;
    align-items: center;
    position: relative;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #3d3d3d;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #000000;
}

/* ASCII art and command output styling */
.ascii-art {
    white-space: pre;
    padding: 10px 0;
    color: #98c379;
    line-height: 1.2;
    overflow-x: auto;
    max-width: 100%;
    font-family: 'JetBrains Mono', Consolas, 'Courier New', 'Lucida Console', monospace;
}

.command-output {
    margin-top: 5px;
    margin-bottom: 10px;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'JetBrains Mono', Consolas, 'Courier New', 'Lucida Console', monospace;
    line-height: 1.4;
    font-size: 14px;
    color: #e5c07b;
}

.info-text {
    color: #61afef;
    user-select: text;
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.4;
}

.error-text {
    color: #e06c75;
    user-select: text;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.success-text {
    color: #98c379;
    user-select: text;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.command-text {
    color: #d19a66;
    font-weight: bold;
    user-select: text;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.log-text {
    color: #abb2bf;
    user-select: text;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'JetBrains Mono', Consolas, 'Courier New', 'Lucida Console', monospace;
}

.warning-text {
    color: #e5c07b;
    user-select: text;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Fixed-width container for weather output to prevent responsive layout changes */
.weather-container {
    display: inline-block;
    min-width: 800px;
    user-select: text;
}

/* Make sure pre elements are selectable for weather output */
pre {
    user-select: text;
}

/* Media Queries */
@media (max-width: 1024px) {
    .page-container {
        flex-direction: column;
        height: 100vh;
    }
    
    .bio-container {
        width: 100%;
        height: auto;
        order: 1;
        border-left: none;
        border-bottom: 1px solid #98c379;
        align-items: center;
        text-align: center;
        flex-shrink: 0;
    }
    
    .terminal {
        order: 2;
        height: auto;
        flex-grow: 1;
        overflow-y: auto;
    }
    
    .profile-image-container {
        width: 200px;
        height: 200px;
        aspect-ratio: 1;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .bio-text {
        text-align: center !important;
    }
}

@media (max-width: 800px) {
    .command-output {
        font-size: 12px;
    }
    
    #cli-output {
        overflow-x: auto;
    }
}

/* Mobile-friendly media queries */
@media (max-width: 767px) {
    .bio-container {
        width: 100%;
        max-height: none;
        padding: 20px 10px 16px 10px;
        overflow-y: visible;
        background: rgba(0,0,0,0.85);
        border-bottom: 1.5px solid #98c379;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    .profile-image-container {
        width: 100px;
        height: 100px;
        margin: 0 auto 12px auto;
    }
    .social-links {
        margin-bottom: 12px;
        gap: 16px;
    }
    .social-link {
        width: 30px;
        height: 30px;
        font-size: 18px;
    }
    .bio-text {
        font-size: 13px;
        margin-bottom: 0;
    }
    .terminal {
        height: calc(100vh - 160px);
    }
    
    .ascii-art {
        font-size: 10px;
        line-height: 1.2;
        white-space: pre;
        overflow-x: auto;
    }
    
    /* Fix scrolling for terminal output on small screens */
    .terminal-output {
        max-height: calc(100vh - 200px);
    }
    
    /* Adjust weather display for smaller screens */
    .weather-container {
        min-width: auto;
        width: 100%;
        overflow-x: auto;
    }
}

/* QR generator styles */
.qr-container {
    display: inline-flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.qr-title {
    color: #61afef;
}

.qr-img {
    width: 256px;
    height: 256px;
    image-rendering: pixelated;
    background: #ffffff;
    border: 1px solid #3d3d3d;
}

.qr-actions {
    display: flex;
    gap: 8px;
}

.qr-download-btn {
    display: inline-block;
    padding: 6px 10px;
    border: 1px solid #98c379;
    color: #98c379;
    text-decoration: none;
    border-radius: 4px;
}

.qr-download-btn:hover {
    background: rgba(152, 195, 121, 0.12);
}