/* Styles.css */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Navbar */
.navbar {
    position: sticky;
    top: 35px;
    left: 0;
    right: 0;
    height: 35px;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    z-index: 100;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 0;
    height: 100%;
    width: 100%;
    padding: 0 16px;
}

.nav-item {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 8px 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
    text-decoration: none;
}

a.nav-item {
    text-decoration: none;
}

.nav-item:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-item.active {
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
}

/* Terminal */
.terminal-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 400px;
    background-color: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.3);
    font-family: 'JetBrains Mono', monospace;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    visibility: hidden;
}

.terminal-container.active {
    transform: translateY(0);
    visibility: visible;
}

.terminal-header {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 35px;
}

.terminal-controls {
    display: flex;
    gap: 6px;
    align-items: center;
}

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

.terminal-dot.close {
    background-color: #ff5f57;
}

.terminal-dot.minimize {
    background-color: #ffbd2e;
}

.terminal-dot.maximize {
    background-color: #28ca42;
}

.terminal-title {
    flex: 1;
    color: var(--text-secondary);
    font-size: 12px;
    text-align: center;
}

.terminal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.terminal-close:hover {
    color: var(--text-primary);
}

.terminal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: var(--bg-primary);
}

.terminal-output {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    font-family: 'JetBrains Mono', 'Consolas', 'Courier New', monospace;
}

.terminal-line {
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.terminal-prompt {
    color: var(--prompt-color);
    font-weight: 600;
    flex-shrink: 0;
}

.terminal-text {
    color: var(--text-primary);
    flex: 1;
    word-wrap: break-word;
    white-space: pre-wrap;
    font-family: 'JetBrains Mono', 'Consolas', 'Courier New', monospace;
}

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

.terminal-text.success {
    color: #58a6ff;
}

.terminal-input-line {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

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

.terminal-input::placeholder {
    color: var(--text-secondary);
}

:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --bg-hover: #1c2128;
    --text-primary: #c9d1d9;
    --text-secondary: #8b949e;
    --text-accent: #58a6ff;
    --border-color: #30363d;
    --prompt-color: #58a6ff;
    --link-color: #58a6ff;
    --link-hover: #79c0ff;
    --section-number: #6e7681;
    --arrow-color: #f0883e;
    --string-color: #a5d6ff;
    --keyword-color: #ff7b72;
    --comment-color: #8b949e;
    --function-color: #d2a8ff;
    --number-color: #79c0ff;
    --line-number-color: #6e7681;
    --selection-bg: #264f78;
}

body {
    font-family: 'JetBrains Mono', 'Consolas', 'Courier New', monospace;
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(88, 166, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(210, 168, 255, 0.03) 0%, transparent 50%);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 14px;
    overflow-x: hidden;
    transition: margin-left 0.3s ease, padding-bottom 0.3s ease;
    position: relative;
    padding-top: 0;
}

body.terminal-open {
    padding-bottom: 400px;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(88, 166, 255, 0.02) 2px,
            rgba(88, 166, 255, 0.02) 4px
        );
    pointer-events: none;
    z-index: 1;
    animation: scanline 8s linear infinite;
    opacity: 0.3;
}

@keyframes scanline {
    0% { transform: translateY(0); }
    100% { transform: translateY(100vh); }
}

body.sidebar-open {
    margin-left: 280px;
}

@media (max-width: 768px) {
    body.sidebar-open {
        margin-left: 0;
    }
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-left: none;
    border-radius: 0 8px 8px 0;
    padding: 12px 8px;
    cursor: pointer;
    z-index: 1500;
    color: var(--text-primary);
    transition: all 0.3s ease;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
}

.sidebar-toggle:hover {
    background-color: var(--bg-tertiary);
    color: var(--link-color);
    transform: translateY(-50%) translateX(2px);
    box-shadow: 4px 0 12px rgba(88, 166, 255, 0.3);
}

/* Hide toggle button when sidebar is open */
body.sidebar-open .sidebar-toggle {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    z-index: 2000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: row;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.3);
}

.sidebar.open {
    transform: translateX(0);
}

/* Icon Bar (Left side of sidebar) */
.sidebar-icon-bar {
    width: 48px;
    background-color: var(--bg-tertiary);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 0;
    border-right: 1px solid var(--border-color);
}

.sidebar-icon {
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, color 0.2s ease;
    margin: 2px 0;
    border-radius: 4px;
}

.sidebar-icon:hover {
    background-color: var(--bg-secondary);
}

.sidebar-icon.active {
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    border-left: 2px solid var(--link-color);
}

/* Content Wrapper (Right side of sidebar) */
.sidebar-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    height: 35px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
}

.sidebar-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.sidebar-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    opacity: 0;
}

.sidebar-header:hover .sidebar-close {
    opacity: 1;
}

.sidebar-close:hover {
    color: var(--text-primary);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 0;
}

/* File Tree */
.file-tree {
    padding: 0;
    user-select: none;
}

.file-item,
.folder-item {
    display: flex;
    align-items: center;
    height: 22px;
    padding: 0 8px;
    cursor: pointer;
    transition: background-color 0.1s ease;
    position: relative;
    font-size: 13px;
}

.file-item:hover,
.folder-item:hover {
    background-color: var(--bg-tertiary);
}

.file-item.active {
    background-color: rgba(78, 201, 176, 0.1);
}

.folder-arrow {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--text-secondary);
    margin-right: 2px;
    transition: transform 0.2s ease;
}

.folder-item.expanded .folder-arrow {
    transform: rotate(90deg);
}

.file-icon,
.folder-icon {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* File type icons using CSS */
.file-item[data-type="html"] .file-icon::before {
    content: '</>';
    color: #e34c26;
    font-size: 12px;
    font-weight: 600;
}

.file-item[data-type="css"] .file-icon::before {
    content: '#';
    color: #1572b6;
    font-size: 14px;
    font-weight: 600;
}

.file-item[data-type="js"] .file-icon::before {
    content: 'JS';
    color: #f7df1e;
    font-size: 10px;
    font-weight: 600;
    background-color: #f7df1e;
    color: #1e1e1e;
    width: 16px;
    height: 16px;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-item[data-type="md"] .file-icon::before {
    content: 'M';
    color: #083fa1;
    font-size: 12px;
    font-weight: 600;
    background-color: #083fa1;
    color: white;
    width: 16px;
    height: 16px;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-item[data-type="txt"] .file-icon::before {
    content: '';
    width: 14px;
    height: 16px;
    border: 1px solid var(--text-secondary);
    background: linear-gradient(to bottom, transparent 0%, transparent 20%, var(--text-secondary) 20%, var(--text-secondary) 25%, transparent 25%, transparent 40%, var(--text-secondary) 40%, var(--text-secondary) 45%, transparent 45%, transparent 60%, var(--text-secondary) 60%, var(--text-secondary) 65%, transparent 65%);
    border-radius: 1px;
}

.file-item[data-type="py"] .file-icon::before {
    content: 'py';
    color: #3776ab;
    font-size: 9px;
    font-weight: 600;
    background-color: #3776ab;
    color: white;
    width: 16px;
    height: 16px;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-item[data-type="ts"] .file-icon::before {
    content: 'TS';
    color: #3178c6;
    font-size: 9px;
    font-weight: 600;
    background-color: #3178c6;
    color: white;
    width: 16px;
    height: 16px;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-item[data-type="jsx"] .file-icon::before {
    content: '</>';
    color: #61dafb;
    font-size: 10px;
    font-weight: 600;
    background-color: #61dafb;
    color: #000;
    width: 16px;
    height: 16px;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-item[data-type="img"] .file-icon::before {
    content: '🖼';
    font-size: 12px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.folder-icon::before {
    content: '';
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23858585' d='M1.75 1A1.75 1.75 0 000 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0016 13.25v-8.5A1.75 1.75 0 0014.25 3H7.5a.25.25 0 01-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.file-name,
.folder-name {
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-tree-children {
    display: none;
}

.folder-item.expanded + .file-tree-children {
    display: block;
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}


/* File Header */
.file-header {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 101;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.window-controls {
    display: flex;
    gap: 6px;
    align-items: center;
}

.control-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.control-dot.close {
    background-color: #ff5f57;
}

.control-dot.minimize {
    background-color: #ffbd2e;
}

.control-dot.maximize {
    background-color: #28ca42;
}

.file-name {
    flex: 1;
    text-align: center;
    color: var(--text-primary);
    font-weight: 500;
}

.timestamp {
    color: var(--text-secondary);
    font-size: 12px;
}

/* Status Indicator */
.status-indicator {
    padding: 6px 16px;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 70px;
    z-index: 99;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #28ca42;
    animation: pulse 2s infinite;
    box-shadow: 0 0 8px rgba(40, 202, 66, 0.5);
}

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

/* Container */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
    background-color: var(--bg-primary);
    min-height: 100vh;
}

/* Section */
.section {
    margin-bottom: 80px;
    display: flex;
    gap: 30px;
    position: relative;
    padding: 20px 0;
}

.section::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, 
        transparent 0%, 
        var(--border-color) 10%, 
        var(--border-color) 90%, 
        transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.section:hover::before {
    opacity: 1;
}

.section-number {
    color: var(--section-number);
    font-size: 14px;
    font-weight: 600;
    min-width: 30px;
    padding-top: 2px;
    position: relative;
    padding-right: 20px;
}

.section-number::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 0;
    bottom: -80px;
    width: 1px;
    background-color: var(--border-color);
}

.section-content {
    flex: 1;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-family: 'JetBrains Mono', monospace;
    position: relative;
}

/* Profile Card */
.profile-card {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    padding: 24px;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
    border-radius: 0;
    box-shadow: 0 0 20px rgba(88, 166, 255, 0.2), inset 0 0 20px rgba(88, 166, 255, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.profile-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(88, 166, 255, 0.4), inset 0 0 30px rgba(88, 166, 255, 0.1);
}

.profile-image-wrapper {
    flex-shrink: 0;
}

.profile-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    object-fit: cover;
    transition: all 0.3s ease;
    display: block;
}

.profile-image:hover {
    border-color: var(--link-color);
    box-shadow: 0 0 20px rgba(78, 201, 176, 0.2);
}

.profile-card .info-list {
    flex: 1;
    margin-bottom: 0;
}

/* Command Prompt */
.command-prompt {
    background-color: var(--bg-secondary);
    padding: 10px 16px;
    border-left: 3px solid var(--prompt-color);
    margin-bottom: 16px;
    font-family: 'JetBrains Mono', monospace;
    border-radius: 0 4px 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.command-prompt::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(88, 166, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
}

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

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

.command-text {
    color: var(--text-primary);
    flex: 1;
}

.command-cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background-color: var(--prompt-color);
    animation: blink 1s infinite;
    margin-left: 4px;
}

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

/* File Output (cat command result) with line numbers */
.file-output-wrapper {
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 0;
    margin-bottom: 24px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 10px rgba(88, 166, 255, 0.1), inset 0 0 10px rgba(88, 166, 255, 0.05);
}

.file-output-header {
    background-color: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    font-size: 11px;
    color: var(--text-secondary);
    min-height: 32px;
    position: relative;
}

.file-output-header::before {
    content: '';
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff5f57;
    box-shadow: 20px 0 0 #ffbd2e, 40px 0 0 #28ca42;
    flex-shrink: 0;
    z-index: 1;
}

.file-output-header::after {
    content: attr(data-filename);
    color: var(--text-secondary);
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 0;
}

.file-output {
    display: flex;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-primary);
    white-space: pre-wrap;
    min-height: 50px;
    overflow-x: auto;
}

.file-output-line-numbers {
    background-color: var(--bg-tertiary);
    border-right: 1px solid var(--border-color);
    padding: 16px 12px;
    color: var(--line-number-color);
    user-select: none;
    text-align: right;
    min-width: 50px;
    font-size: 12px;
    line-height: 1.8;
}

.file-output-line-numbers > div {
    min-height: 1.8em;
}

.file-output-content {
    padding: 16px 20px;
    flex: 1;
    overflow-x: auto;
}

.file-output-content > div {
    min-height: 1.8em;
}

.file-output .file-key {
    color: var(--text-secondary);
}

.file-output .file-section {
    color: var(--function-color);
    font-weight: 600;
}

.file-output .file-list-item {
    color: var(--text-primary);
    display: block;
}

.file-output .file-link {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.file-output .file-link:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

.file-output .file-string {
    color: var(--string-color);
}

.file-output .file-keyword {
    color: var(--keyword-color);
}

.file-output .file-comment {
    color: var(--comment-color);
    font-style: italic;
}

/* Info List */
.info-list {
    margin-bottom: 24px;
}

.info-item {
    margin-bottom: 12px;
    display: flex;
    align-items: baseline;
    gap: 8px;
    text-shadow: 0 0 3px rgba(88, 166, 255, 0.3);
}

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

.label {
    color: var(--text-secondary);
    min-width: 80px;
}

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

/* Description */
.description {
    margin-bottom: 32px;
    color: var(--text-primary);
    line-height: 1.8;
    padding: 16px;
    background-color: rgba(22, 27, 34, 0.5);
    border-left: 3px solid var(--link-color);
    border-radius: 4px;
}

.description p {
    margin-bottom: 12px;
}

.description p:last-child {
    margin-bottom: 0;
}

/* Navigation Links */
.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 32px;
}

.nav-link {
    color: var(--link-color);
    text-decoration: none;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    background-color: rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    display: inline-block;
    border-radius: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    text-shadow: 0 0 5px rgba(88, 166, 255, 0.5);
    position: relative;
    overflow: hidden;
}

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

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover {
    background-color: rgba(13, 17, 23, 0.7);
    border-color: var(--link-color);
    color: var(--link-hover);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(88, 166, 255, 0.6), inset 0 0 20px rgba(88, 166, 255, 0.1);
    text-shadow: 0 0 10px rgba(88, 166, 255, 1);
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.skill-item {
    padding: 12px 16px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    text-align: center;
    transition: all 0.3s ease;
    border-radius: 4px;
    font-weight: 500;
}

.skill-item:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--link-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(88, 166, 255, 0.15);
    color: var(--link-color);
}

/* Project Item */
.project-item {
    margin-top: 24px;
    padding: 20px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.project-item:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--link-color);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(88, 166, 255, 0.2);
}

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

.project-link {
    color: var(--link-color);
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    transition: color 0.3s ease;
}

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

.project-tag {
    background-color: var(--bg-tertiary);
    color: var(--text-accent);
    padding: 4px 12px;
    border: 1px solid var(--border-color);
    font-size: 12px;
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Projects Container */
.projects-container {
    margin-top: 24px;
}

.project-loading {
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
}

.project-error {
    padding: 20px;
    text-align: center;
    color: var(--keyword-color);
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

/* Load More Button */
.load-more-btn {
    padding: 12px 24px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--link-color);
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.load-more-btn:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--link-color);
    color: var(--link-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(88, 166, 255, 0.2);
}

.load-more-btn:active {
    transform: translateY(0);
}

.gallery-image {
    cursor: pointer;
}

.gallery-image:hover {
    background-color: var(--bg-tertiary);
    color: var(--link-color);
}

/* Search Panel */
.search-panel {
    padding: 12px;
}

.search-input-wrapper {
    position: relative;
    margin-bottom: 16px;
}

.search-input {
    width: 100%;
    padding: 8px 32px 8px 12px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--link-color);
    box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.1);
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.search-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

.search-results {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.search-placeholder {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
}

.search-results-header {
    padding: 8px 0;
    margin-bottom: 12px;
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.search-result-item {
    padding: 12px;
    margin-bottom: 8px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-result-item:hover {
    background-color: var(--bg-hover);
    border-color: var(--link-color);
    transform: translateX(2px);
}

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

.search-result-name {
    color: var(--link-color);
    font-weight: 600;
    font-size: 13px;
    flex: 1;
}

.search-result-tag {
    padding: 2px 8px;
    border: 1px solid;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.search-result-description {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 8px;
    max-height: 3em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.search-result-meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: var(--text-secondary);
}

.search-no-results {
    padding: 60px 20px;
    text-align: center;
}

.search-no-results-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.search-no-results-text {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.search-no-results-hint {
    color: var(--text-secondary);
    font-size: 12px;
}

.projects-container .project-item {
    margin-bottom: 16px;
}

.projects-container .project-item:last-child {
    margin-bottom: 0;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.gallery-item {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* Creates 1:1 aspect ratio */
    overflow: hidden;
    border: 1px dashed var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-secondary);
    transition: all 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    border-color: var(--link-color);
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(88, 166, 255, 0.2);
}

.gallery-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Crops image to 1:1 */
    object-position: center;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Image Modal/Popup */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.image-modal.active {
    opacity: 1;
    visibility: visible;
}

.image-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(4px);
}

.image-modal-content {
    position: relative;
    z-index: 10001;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.image-modal.active .image-modal-content {
    transform: scale(1);
}

.image-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.3s ease;
    z-index: 10002;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.image-modal-close:hover {
    background: var(--bg-tertiary);
    border-color: var(--link-color);
    color: var(--link-color);
    transform: rotate(90deg);
}

.image-modal-image-wrapper {
    position: relative;
    max-width: 100%;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.image-modal-image-wrapper .image-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10003;
}

.image-modal-image-wrapper img {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    display: block;
}

.image-modal-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.image-modal-download {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--link-color);
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-modal-download:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--link-color);
    color: var(--link-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(88, 166, 255, 0.3);
}

.image-modal-download:active {
    transform: translateY(0);
}

.image-modal-download svg {
    flex-shrink: 0;
}

/* Responsive for mobile */
@media (max-width: 768px) {
    .image-modal-content {
        max-width: 95vw;
        max-height: 95vh;
        padding: 10px;
    }
    
    .image-modal-close {
        top: 8px;
        right: 8px;
        width: 36px;
        height: 36px;
    }
    
    .image-modal-image-wrapper .image-modal-close {
        top: 8px;
        right: 8px;
    }
    
    .image-modal-image-wrapper {
        max-height: 70vh;
        padding: 8px;
    }
    
    .image-modal-image-wrapper img {
        max-height: 70vh;
    }
    
    .image-modal-download {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* Contact List */
.contact-list {
    margin-top: 24px;
    padding: 16px;
    background-color: var(--bg-secondary);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.contact-item {
    margin-bottom: 16px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.contact-item .label {
    min-width: 100px;
}

.link {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.link:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Navbar horizontal scroll on mobile */
    .navbar {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: var(--border-color) transparent;
        padding: 0;
        background-color: var(--bg-secondary);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        position: sticky;
        top: 35px;
        z-index: 100;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    
    .navbar::-webkit-scrollbar {
        height: 4px;
    }
    
    .navbar::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .navbar::-webkit-scrollbar-thumb {
        background-color: var(--border-color);
        border-radius: 2px;
    }
    
    .navbar-nav {
        min-width: max-content;
        display: flex;
        flex-wrap: nowrap;
        padding: 0 12px;
    }
    
    .nav-item {
        white-space: nowrap;
        font-size: 12px;
        padding: 8px 12px;
        flex-shrink: 0;
    }
    
    .terminal-container {
        height: 300px;
    }
    
    body.terminal-open {
        padding-bottom: 300px;
    }
    
    .section {
        flex-direction: column;
        gap: 10px;
    }

    .section-number {
        min-width: auto;
        padding-right: 0;
    }

    .section-number::after {
        display: none;
    }

    .section-title {
        font-size: 20px;
    }

    .container {
        padding: 20px 16px;
    }

    .nav-links {
        flex-direction: column;
    }

    .nav-link {
        width: 100%;
        text-align: center;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .roadmap-container {
        padding: 20px 16px;
        margin-top: 20px;
    }

    .roadmap-timeline {
        flex-direction: column;
        align-items: flex-start;
        padding: 0;
        min-height: auto;
        gap: 0;
    }

    .roadmap-line {
        display: none;
    }

    .roadmap-stage {
        max-width: 100%;
        width: 100%;
        margin-bottom: 16px;
        flex-direction: row;
        align-items: flex-start;
        justify-content: flex-start;
        padding-left: 32px;
        position: relative;
        padding-top: 4px;
    }

    .roadmap-stage:last-child {
        margin-bottom: 0;
    }

    .roadmap-marker {
        position: absolute;
        left: 8px;
        top: 8px;
        width: 10px;
        height: 10px;
        margin-top: 0;
    }

    .roadmap-connector {
        display: none;
    }

    .roadmap-content {
        margin-top: 0;
        text-align: left;
        padding: 0;
        flex: 1;
    }

    .roadmap-level {
        font-size: 14px;
        margin-bottom: 2px;
        line-height: 1.4;
    }

    .roadmap-name {
        font-size: 12px;
        line-height: 1.4;
    }

    .profile-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }

    .profile-image {
        width: 100px;
        height: 100px;
    }

    .profile-card .info-list {
        width: 100%;
    }

    /* Sidebar responsive */
    body.sidebar-open {
        margin-left: 0;
    }

    .sidebar {
        width: 100%;
        max-width: 280px;
    }

    .sidebar-toggle {
        position: fixed;
        top: 70px;
        left: 0;
        transform: none;
        z-index: 1500;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Roadmap Container */
.roadmap-container {
    margin-top: 40px;
    padding: 60px 40px;
    position: relative;
    background-color: transparent;
}

.roadmap-timeline {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0;
    min-height: 250px;
}

.roadmap-line {
    position: absolute;
    top: 50px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(to right, #58a6ff, #79c0ff, #58a6ff);
    z-index: 1;
    box-shadow: 0 0 10px rgba(88, 166, 255, 0.8);
}

.roadmap-stage {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
    max-width: 180px;
    padding: 0 10px;
}

.roadmap-marker {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--bg-primary);
    border: 2px solid #58a6ff;
    position: relative;
    z-index: 3;
    margin-top: 43px;
    transition: all 0.3s ease;
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15);
}

.roadmap-marker::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #58a6ff;
}

.roadmap-stage:hover .roadmap-marker {
    transform: scale(1.4);
    box-shadow: 0 0 0 5px rgba(88, 166, 255, 0.3);
    border-color: #79c0ff;
}

.roadmap-connector {
    width: 1px;
    height: 80px;
    border-left: 1px dashed rgba(255, 255, 255, 0.25);
    margin-top: 8px;
    position: relative;
}

.roadmap-content {
    margin-top: 20px;
    text-align: center;
    padding: 0 5px;
    width: 100%;
}

.roadmap-level {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: 'JetBrains Mono', monospace;
}

.roadmap-name {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
    word-wrap: break-word;
    font-family: 'JetBrains Mono', monospace;
}

/* Music Embed */
.music-embed {
    margin-top: 24px;
    width: 100%;
}

.music-embed iframe {
    border-radius: 12px;
}

/* Selection */
::selection {
    background-color: var(--selection-bg);
    color: var(--text-primary);
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 5px;
    border: 2px solid var(--bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-color);
}

/* Code Editor-like focus states */
.file-item.active,
.folder-item.active {
    background-color: rgba(88, 166, 255, 0.15);
    border-left: 2px solid var(--link-color);
}

/* Terminal-like styling improvements */
.section-title {
    position: relative;
    padding-left: 12px;
}

.section-title::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--link-color);
    font-weight: 600;
}

/* Enhanced file tree styling */
.file-tree {
    padding: 8px 0;
}

.file-item,
.folder-item {
    padding-left: 20px;
    position: relative;
}

.file-item::before,
.folder-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: transparent;
    transition: background-color 0.2s ease;
}

.file-item:hover::before,
.folder-item:hover::before {
    background-color: var(--link-color);
}

/* Additional polish */
.info-item {
    transition: transform 0.2s ease;
}

.info-item:hover {
    transform: translateX(4px);
}

.project-tag {
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Code editor-like focus ring */
*:focus-visible {
    outline: 2px solid var(--link-color);
    outline-offset: 2px;
    border-radius: 2px;
}
