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

:root {
    --terminal-bg: #0a0e27;
    --terminal-text: #00ff88;
    --terminal-prompt: #5af78e;
    --terminal-error: #ff6b6b;
    --terminal-info: #4ecdc4;
    --terminal-warning: #ffd93d;
    --terminal-success: #00ff88;
    --terminal-header: #1a1f3a;
    --terminal-border: #2d3561;
    --terminal-shadow: rgba(0, 255, 136, 0.1);
    
    --gui-bg: #0f0f23;
    --gui-card: #1a1a2e;
    --gui-accent: #00ff88;
    --gui-text: #e0e0e0;
    --gui-border: #2d3561;
}

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

body {
    font-family: 'JetBrains Mono', monospace;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 100%);
    color: var(--terminal-text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-x: hidden;
}

/* ============================================
   TERMINAL MODE STYLES
   ============================================ */

.terminal-container {
    width: 100%;
    max-width: 1200px;
    background: var(--terminal-bg);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 255, 136, 0.15),
                0 0 100px rgba(0, 255, 136, 0.05);
    overflow: hidden;
    border: 1px solid var(--terminal-border);
    animation: terminalBoot 0.5s ease-out;
}

@keyframes terminalBoot {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.terminal-header {
    background: var(--terminal-header);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--terminal-border);
}

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

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

.btn-close {
    background: #ff5f56;
    box-shadow: 0 0 5px rgba(255, 95, 86, 0.5);
}

.btn-minimize {
    background: #ffbd2e;
    box-shadow: 0 0 5px rgba(255, 189, 46, 0.5);
}

.btn-maximize {
    background: #27c93f;
    box-shadow: 0 0 5px rgba(39, 201, 63, 0.5);
}

.terminal-title {
    font-size: 13px;
    color: #8b92b0;
    font-weight: 500;
}

.terminal-actions .help-btn {
    background: transparent;
    border: 1px solid var(--terminal-border);
    color: var(--terminal-info);
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.terminal-actions .help-btn:hover {
    background: var(--terminal-info);
    color: var(--terminal-bg);
    border-color: var(--terminal-info);
}

.terminal-body {
    padding: 20px;
    min-height: 500px;
    max-height: 70vh;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.6;
}

.terminal-body::-webkit-scrollbar {
    width: 8px;
}

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

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

.terminal-body::-webkit-scrollbar-thumb:hover {
    background: var(--terminal-prompt);
}

.terminal-output {
    margin-bottom: 10px;
}

/* Boot Sequence */
.boot-line {
    color: #5af78e;
    opacity: 0;
    animation: fadeInLine 0.3s ease-out forwards;
}

.boot-line:nth-child(1) { animation-delay: 0.1s; }
.boot-line:nth-child(2) { animation-delay: 0.3s; }
.boot-line:nth-child(3) { animation-delay: 0.5s; }
.boot-line:nth-child(4) { animation-delay: 0.7s; }

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

.loading-bar {
    display: inline-block;
    width: 100px;
    height: 10px;
    background: var(--terminal-bg);
    border: 1px solid var(--terminal-prompt);
    position: relative;
    vertical-align: middle;
}

.loading-bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: var(--terminal-prompt);
    animation: loadBar 1s ease-out forwards;
}

@keyframes loadBar {
    to { width: 100%; }
}

.success {
    color: var(--terminal-success);
}

.welcome-banner {
    color: var(--terminal-prompt);
    margin: 20px 0;
    font-size: 11px;
    line-height: 1.2;
    opacity: 0;
    animation: fadeInLine 0.5s ease-out 0.9s forwards;
}

.info-line {
    color: var(--terminal-info);
    margin: 5px 0;
}

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

/* Command Input */
.input-line {
    display: flex;
    align-items: center;
    gap: 10px;
}

.prompt {
    color: var(--terminal-prompt);
    font-weight: 600;
    user-select: none;
}

.command-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--terminal-text);
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    outline: none;
    caret-color: var(--terminal-text);
}

/* Command Output Styles */
.command-output {
    margin: 10px 0;
    padding-left: 0;
}

.command-executed {
    color: var(--terminal-prompt);
    margin-bottom: 5px;
}

.output-text {
    color: var(--terminal-text);
    white-space: pre-wrap;
}

.output-error {
    color: var(--terminal-error);
}

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

.output-info {
    color: var(--terminal-info);
}

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

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}

table th {
    text-align: left;
    color: var(--terminal-prompt);
    border-bottom: 1px solid var(--terminal-border);
    padding: 8px 12px;
}

table td {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(45, 53, 97, 0.3);
}

table tr:hover {
    background: rgba(0, 255, 136, 0.05);
}

/* Links in terminal */
a.terminal-link {
    color: var(--terminal-info);
    text-decoration: none;
    border-bottom: 1px dashed var(--terminal-info);
    transition: all 0.2s;
}

a.terminal-link:hover {
    color: var(--terminal-text);
    border-bottom-color: var(--terminal-text);
}

/* ============================================
   GUI MODE STYLES
   ============================================ */

.gui-mode {
    font-family: 'Inter', sans-serif;
    width: 100%;
    max-width: 100%;
    background: var(--gui-bg);
    color: var(--gui-text);
    animation: fadeIn 0.5s ease-out;
}

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

.gui-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--gui-border);
    z-index: 1000;
}

.gui-nav .logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gui-accent);
}

.gui-nav .nav-links {
    display: flex;
    gap: 2rem;
}

.gui-nav .nav-links a {
    color: var(--gui-text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.gui-nav .nav-links a:hover {
    color: var(--gui-accent);
}

.gui-section {
    padding: 5rem 10%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.gui-section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--gui-accent);
    text-align: center;
}

/* Profile Section */
.profile-content {
    display: flex;
    align-items: center;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.profile-pic {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--gui-accent);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.3);
}

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

.profile-text h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: var(--gui-text);
}

.profile-text h2 {
    font-size: 1.5rem;
    color: var(--gui-accent);
    margin-bottom: 1rem;
    text-align: left;
}

.tagline {
    font-size: 1.1rem;
    color: #a0a0a0;
    margin-bottom: 2rem;
}

.gui-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.gui-btn {
    padding: 0.8rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
}

.gui-btn.primary {
    background: var(--gui-accent);
    color: var(--gui-bg);
}

.gui-btn.primary:hover {
    background: #00cc6a;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 255, 136, 0.3);
}

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

.gui-btn.secondary:hover {
    background: var(--gui-accent);
    color: var(--gui-bg);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: inline-block;
    padding: 8px;
    border-radius: 50%;
    background: var(--gui-card);
    border: 1px solid var(--gui-border);
    transition: all 0.3s;
}

.social-links a:hover {
    border-color: var(--gui-accent);
    transform: translateY(-2px);
}

.social-links img {
    width: 32px;
    height: 32px;
    display: block;
}

/* About Section */
.about-content {
    max-width: 1000px;
    margin: 0 auto;
}

.about-text {
    background: var(--gui-card);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--gui-border);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.skill-group {
    background: var(--gui-card);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--gui-border);
    transition: all 0.3s;
}

.skill-group:hover {
    border-color: var(--gui-accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.1);
}

.skill-group h3 {
    color: var(--gui-accent);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

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

.tags span {
    background: rgba(0, 255, 136, 0.1);
    color: var(--gui-accent);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid rgba(0, 255, 136, 0.2);
    transition: all 0.3s;
}

.tags span:hover {
    background: var(--gui-accent);
    color: var(--gui-bg);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background: var(--gui-card);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--gui-border);
    transition: all 0.3s;
}

.project-card:hover {
    border-color: var(--gui-accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 255, 136, 0.15);
}

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

.project-header h3 {
    color: var(--gui-text);
    font-size: 1.3rem;
}

.project-header a {
    color: var(--gui-accent);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.project-header a:hover {
    color: #00cc6a;
}

.project-card p {
    color: #a0a0a0;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-item {
    background: var(--gui-card);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--gui-border);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s;
}

.contact-item:hover {
    border-color: var(--gui-accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.1);
}

.contact-item img {
    width: 40px;
    height: 40px;
}

.contact-item a {
    color: var(--gui-accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.contact-item a:hover {
    color: #00cc6a;
}

/* Footer */
.gui-footer {
    background: var(--gui-card);
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--gui-border);
    color: #a0a0a0;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .terminal-container {
        border-radius: 8px;
    }

    .terminal-body {
        padding: 15px;
        font-size: 12px;
        max-height: 60vh;
    }

    .welcome-banner {
        font-size: 8px;
    }

    .gui-nav {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .gui-nav .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .profile-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .profile-pic {
        width: 200px;
        height: 200px;
    }

    .profile-text h1 {
        font-size: 2rem;
    }

    .profile-text h2 {
        font-size: 1.2rem;
        text-align: center;
    }

    .gui-buttons {
        flex-direction: column;
    }

    .social-links {
        justify-content: center;
    }

    .gui-section {
        padding: 4rem 5%;
    }

    .skills-container,
    .projects-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}