:root {
    /* Dark mode colors (default) */
    --bg-color: #011627;
    --text-color: #E5E9F0;
    --accent-color: #4D5BCE;
    --secondary-color: #607B96;
    --hover-color: #1E2D3D;
    --success-green: #43D9AD;
    --string-pink: #E99287;
    --accent-hover-bg: rgba(77, 91, 206, 0.1);
    --accent-active-bg: rgba(77, 91, 206, 0.2);
    --project-tech-bg: rgba(233, 146, 135, 0.1);

    /* Light mode colors */
    --light-bg-color: #F2F5F9;
    --light-text-color: #1E2D3D;
    --light-accent-color: #4D5BCE;
    --light-secondary-color: #607B96;
    --light-hover-color: #E5E9F0;
    --light-tab-bg: #FFFFFF;
    --light-success-green: #3CA892;
    --light-string-pink: #C64F45;
    --light-accent-hover-bg: rgba(77, 91, 206, 0.1);
    --light-accent-active-bg: rgba(77, 91, 206, 0.15);
    --light-project-tech-bg: rgba(198, 79, 69, 0.1);
}

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

body {
    font-family: 'Fira Code', monospace;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

nav {
    background-color: var(--hover-color);
    padding: 0;
    border-bottom: 1px solid var(--secondary-color);
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    margin-right: 0;
    padding: 1rem;
    display: inline-block;
    border-right: 1px solid var(--secondary-color);
}

nav a.active {
    border-bottom: 2px solid var(--accent-color);
}

main {
    flex: 1;
    padding: 0;
}

.content {
    max-width: none;
    margin: 0;
    display: flex;
}

#hello {
    max-width: none;
    padding: 2rem;
    flex-direction: column;
}

#about-me {
    display: flex;
    height: calc(100vh - 89px);
}


.sidebar {
    width: 300px;
    background-color: var(--bg-color);
    padding: 0;
    flex-shrink: 0;
    margin-top: 55px;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: calc(100% - 300px);
}

.code-editor {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-color);
}

.editor-content {
    display: flex;
    overflow: auto;
}

.code-content {
    flex: 1;
    padding: 1rem;
    overflow: auto;
}

h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

h2 {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.role {
    color: var(--success-green);
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.code-block {
    background-color: var(--hover-color);
    padding: 1.5rem;
    border-radius: 4px;
    margin-top: 2rem;
}

.comment {
    color: var(--secondary-color);
    margin: 1.5rem 0 1rem;
}

.const {
    color: var(--accent-color);
}

.variable {
    color: var(--success-green);
}

.string {
    color: var(--string-pink);
}

/* File and Folder Navigation Styles */
.folder-group {
    margin-bottom: 0.5rem;
}

.folder-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.25rem 1rem;
    cursor: pointer;
    color: var(--text-color);
    user-select: none;
}

.folder-header:hover {
    background-color: var(--accent-hover-bg);
}

.folder-content {
    display: none;
    padding-left: 2.5rem;
}

.folder-content.open {
    display: block;
}

.arrow {
    color: var(--text-color);
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.folder-icon, .file-icon {
    font-size: 1rem;
    opacity: 0.7;
}

/* Base file styles */
.file {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.25rem 1rem;
    color: var(--text-color);
    cursor: pointer;
}

/* About-me section specific styles */
#about-me .file:hover {
    background-color: var(--accent-hover-bg);
}

#about-me .file.active {
    background-color: var(--accent-active-bg);
}

#about-me .file.active span {
    color: var(--accent-color);
}

#about-me .file a {
    color: var(--text-color);
    text-decoration: none;
    width: 100%;
}

#about-me .file:hover a {
    color: var(--accent-color);
}

/* Projects section specific styles */
#projects .file,
#projects .file span,
#projects .file:hover,
#projects .file:hover span,
#projects .file.active,
#projects .file.active span {
    color: var(--text-color) !important;
    background-color: transparent;
}

#projects .file.active {
    background-color: transparent;
}

#projects .file.active span {
    color: var(--accent-color);
}

#projects .line-numbers {
    border-right: none;
}

.editor-header {
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--secondary-color);
    padding: 0;
    display: flex;
    overflow-x: auto;
}

.tab {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: var(--hover-color);
    border-right: 1px solid var(--secondary-color);
    font-size: 0.9rem;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.tab:hover {
    background-color: var(--accent-hover-bg);
}

.tab.active {
    background-color: var(--bg-color);
    border-bottom: 2px solid var(--accent-color);
}

.tab-content {
    color: var(--text-color);
}

.close {
    margin-left: 1rem;
    color: var(--secondary-color);
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0.7;
}

.close:hover {
    opacity: 1;
    color: var(--text-color);
}

/* Light theme overrides */
body.light-theme .tab {
    background-color: var(--light-hover-color);
}

body.light-theme .tab:hover {
    background-color: var(--light-accent-hover-bg);
}

body.light-theme .tab.active {
    background-color: var(--light-bg-color);
}

.line-numbers {
    padding: 1rem;
    color: var(--secondary-color);
    background-color: var(--bg-color);
    border-left: 1px solid var(--secondary-color);
    border-right: 1px solid var(--secondary-color);
    user-select: none;
    font-size: 0.9rem;
    position: relative;
}

.vertical-rule {
    display: none;
}

.numbers {
    line-height: 1.4;
    text-align: right;
    padding-right: 1rem;
}

/* Skills section styles */
.skills-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(250px, 1fr));
    gap: 1rem 2rem;
    margin-top: 1rem;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 250px;
    white-space: nowrap;
    padding-right: 1rem;
    position: relative;
}

.skill-item input[type="checkbox"] {
    flex-shrink: 0;
}

.skill-item label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.skill-item input[type="checkbox"] {
    appearance: none;
    width: 1rem;
    height: 1rem;
    border: 1px solid var(--secondary-color);
    border-radius: 3px;
    position: relative;
    margin: 0;
    pointer-events: none;
    opacity: 0.8;
}

.skill-item input[type="checkbox"]:checked {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.skill-item input[type="checkbox"]:checked::after {
    content: "✓";
    position: absolute;
    color: white;
    font-size: 0.75rem;
    left: 1px;
    top: -1px;
}

.skill-item label {
    color: var(--text-color);
    font-size: 0.9rem;
    pointer-events: none;
}

/* Projects page styles */
#projects {
    display: flex;
    height: calc(100vh - 89px - 48px); /* Account for footer height */
    overflow: auto;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 2rem 4rem 2rem;
    overflow-y: auto;
    height: 100%;
}

.project-card {
    background-color: var(--hover-color);
    border-radius: 8px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    border: 1px solid var(--secondary-color);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.project-card:hover {
    transform: translateY(-2px);
}

.project-header {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.project-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.project-meta {
    flex: 1;
}

.project-meta h3 {
    color: var(--accent-color);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.project-subtitle {
    color: var(--secondary-color);
    font-size: 1rem;
}

.project-preview {
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.6;
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.project-tech {
    color: var(--string-pink);
    font-size: 0.9rem;
    padding: 0.3rem 0.8rem;
    background-color: var(--project-tech-bg);
    border-radius: 4px;
}

.project-link {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-link:hover {
    opacity: 0.8;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    background-color: var(--bg-color);
    margin: 5% auto;
    padding: 2rem;
    width: 90%;
    max-width: 1200px;
    border-radius: 8px;
    position: relative;
    border: 1px solid var(--secondary-color);
}

.close-modal {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    color: var(--secondary-color);
    cursor: pointer;
}

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

/* Light theme overrides */
body.light-theme .modal-content {
    background-color: var(--light-bg-color);
}

body.light-theme .project-preview {
    color: var(--light-text-color);
}

footer {
    background-color: var(--hover-color);
    padding: 1rem;
    border-top: 1px solid var(--secondary-color);
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.theme-switch {
    justify-self: start;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--secondary-color);
    cursor: pointer;
}

.theme-switch i {
    font-size: 1.2rem;
}

.copyright {
    color: var(--secondary-color);
    font-size: 0.9rem;
    text-align: center;
}

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

/* Theme switch styles */
.theme-switch input {
    display: none;
}

.theme-switch label {
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-switch label:hover {
    background-color: var(--accent-hover-bg);
}

.file-content {
    font-family: 'Fira Code', monospace;
    line-height: 1.5;
}

.file-content p {
    margin-bottom: 0.4rem;
}

.file.active {
    background-color: rgba(77, 91, 206, 0.1);
    border-radius: 4px;
}

.file.active span {
    color: var(--accent-color);
}

.indent {
    margin-left: 2rem;
}

.indent-2 {
    margin-left: 4rem;
}

/* Update existing styles */
.editor-header {
    background-color: var(--bg-color);
    padding: 0.5rem;
    border-bottom: 1px solid var(--secondary-color);
}

.tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 4px 4px 0 0;
    background-color: var(--hover-color);
    font-size: 0.9rem;
}

.tab i {
    color: var(--secondary-color);
}

/* LinkedIn widget styles */
.recommendations-wrapper {
    padding: 1rem;
    background-color: var(--bg-color);
}

.LI-profile-badge {
    background-color: var(--bg-color) !important;
    color: var(--text-color) !important;
}

.LI-profile-badge .LI-badge-container {
    background-color: var(--bg-color) !important;
    border: 1px solid var(--secondary-color) !important;
    border-radius: 4px;
}

.LI-profile-badge .LI-name {
    color: var(--text-color) !important;
}

.LI-profile-badge .LI-field {
    color: var(--secondary-color) !important;
}

@media screen and (max-height: 800px) {
    .file-content {
        font-size: 0.85rem;
        line-height: 1.4;
    }
}

/* Mobile menu button - hidden by default */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 100;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Light theme - Mobile menu button color */
body.light-theme .mobile-menu-btn {
    color: var(--light-text-color);
}

/* Mobile styles */
@media screen and (max-width: 768px) {
    #about-me, #projects {
        position: relative;
        overflow: hidden;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .sidebar {
        width: 100%;
        position: absolute;
        left: 0;
        top: 0;
        height: calc(100% - 10px);
        margin-top: 10px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        width: 100%;
        position: absolute;
        left: 0;
        top: 0;
        height: 100%;
        transform: translateX(0);
        transition: transform 0.3s ease;
    }
    
    .main-content.hide {
        transform: translateX(100%);
    }

    #projects {
        height: calc(100vh - 89px - 48px);
        overflow: auto;
    }

    #about-me {
        height: calc(100vh - 89px - 48px);
        overflow: auto;
    }


    .project-detail {
        padding: 2rem;
        color: var(--text-color);
        height: calc(100vh - 89px - 48px);
        overflow-y: auto;
    }

    .project-section {
        margin-bottom: 1.5rem;
    }
}

/* Light theme styles */
body.light-theme {
    background-color: var(--light-bg-color);
    color: var(--light-text-color);
}

body.light-theme nav,
body.light-theme .editor-header,
body.light-theme footer {
    background-color: var(--light-hover-color);
}

body.light-theme .code-block,
body.light-theme .project-card {
    background-color: var(--light-hover-color);
}

/* Menu and folder text colors */
body.light-theme .folder-header,
body.light-theme .folder-header span,
body.light-theme .file,
body.light-theme .file span,
body.light-theme .arrow {
    color: var(--light-text-color);
}

body.light-theme .comment {
    color: var(--light-secondary-color);
}

body.light-theme .role {
    color: var(--light-success-green);
}

body.light-theme .const {
    color: var(--light-accent-color);
}

body.light-theme .variable {
    color: var(--light-success-green);
}

body.light-theme .string {
    color: var(--light-string-pink);
}

body.light-theme .folder-header:hover,
body.light-theme .file:hover {
    background-color: var(--light-accent-hover-bg);
}

body.light-theme .file.active {
    background-color: var(--light-accent-active-bg);
}

body.light-theme .file.active span {
    color: var(--light-accent-color);
}

body.light-theme .project-tech {
    color: var(--light-string-pink);
    background-color: var(--light-project-tech-bg);
}

body.light-theme .code-editor,
body.light-theme .code-content,
body.light-theme .line-numbers,
body.light-theme .sidebar {
    background-color: var(--light-bg-color);
}

body.light-theme .tab {
    background-color: var(--light-tab-bg);
    border: 1px solid var(--light-secondary-color);
    border-bottom: none;
}

/* Update link colors for light theme */
body.light-theme a,
body.light-theme .file a {
    color: var(--light-text-color);
}

body.light-theme a:hover,
body.light-theme .file a:hover {
    color: var(--light-accent-color);
}

/* Tab and editor styles */
body.light-theme .tab-content {
    color: var(--light-text-color);
}

body.light-theme .close {
    color: var(--light-secondary-color);
}

/* Project icon styles */
body.light-theme .icon {
    fill: var(--light-accent-color);
}

body.light-theme .icon text {
    fill: var(--light-text-color);
}

body.light-theme .project-card h3 {
    color: var(--light-accent-color);
}

body.light-theme .project-card p {
    color: var(--light-secondary-color);
}

.copyright a {
    color: var(--text-color);
    text-decoration: none;
}

.copyright a:hover {
    opacity: 0.8;
}

.social-links a {
    color: var(--text-color);
    font-size: 1.2rem;
}

.social-links a:hover {
    opacity: 0.8;
}

/* Light theme overrides */
body.light-theme .copyright a {
    color: var(--light-text-color);
}

body.light-theme .social-links a {
    color: var(--light-text-color);
}


.profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 20px 0;
    border: 2px solid var(--secondary-color);
}

.project-detail {
    padding: 2rem;
    color: var(--text-color);
    height: 100%;
    overflow-y: auto;
}

.project-section {
    margin-bottom: 2rem;
}

.project-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.project-section h3 {
    font-size: 1.4rem;
    margin: 2rem 0 1rem;
    color: var(--text-color);
}

.project-section p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.project-section ul {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 1.5rem;
}

.project-section li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.project-section li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

.svg-placeholder {
    background-color: var(--hover-color);
    border: 1px dashed var(--secondary-color);
    border-radius: 8px;
    padding: 2rem;
    margin: 1.5rem 0;
    text-align: center;
    color: var(--text-color);
}

.modal-content {
    background-color: var(--bg-color);
    margin: 5vh auto;
    padding: 0;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border-radius: 8px;
    border: 1px solid var(--secondary-color);
}

.close-modal {
    position: sticky;
    top: 1rem;
    right: 1rem;
    float: right;
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1;
}

.close-modal:hover {
    color: var(--accent-color);
}

.modal-content h1 {
    font-size: 2.2rem;
    margin: 2rem 2rem 1rem;
    color: var(--text-color);
}

.modal-content .project-subtitle {
    font-size: 1.2rem;
    margin: 0 2rem 2rem;
    color: var(--secondary-color);
}

.svg-diagram {
    background-color: var(--hover-color);
    border: 1px solid var(--secondary-color);
    border-radius: 8px;
    padding: 2rem;
    margin: 1.5rem 0;
    text-align: center;
    overflow: visible;
}

.svg-diagram svg {
    width: 100%;
    height: auto;
    max-height: 300px;
}

.flow-item circle.icon-bg {
    fill: var(--bg-color);
    stroke: var(--accent-color);
    stroke-width: 2;
}

.flow-item:hover circle.icon-bg {
    fill: var(--accent-hover-bg);
}

.flow-item text.icon {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 24px;
    fill: var(--accent-color);
    text-anchor: middle;
}

.flow-item text.label {
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    fill: var(--text-color);
    text-anchor: middle;
}

.flow-line {
    stroke: var(--accent-color);
    stroke-width: 2;
    fill: none;
}

/* Light theme overrides */
body.light-theme .flow-item circle.icon-bg {
    fill: var(--light-bg-color);
}

body.light-theme .flow-item:hover circle.icon-bg {
    fill: var(--light-accent-hover-bg);
}

body.light-theme .flow-item text.icon {
    fill: var(--light-accent-color);
}

body.light-theme .flow-item text.label {
    fill: var(--light-text-color);
}

body.light-theme .flow-line {
    stroke: var(--light-accent-color);
}

.flow-item .box {
    fill: transparent;
    stroke: var(--accent-color);
    stroke-width: 2;
    rx: 4;
}

.flow-item:hover .box {
    fill: var(--accent-hover-bg);
}

.flow-item text.label {
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    fill: var(--text-color);
    text-anchor: middle;
}

.flow-line {
    stroke: var(--accent-color);
    stroke-width: 2;
    fill: none;
}

/* Light theme overrides */
body.light-theme .flow-item .box {
    fill: var(--light-bg-color);
    stroke: var(--light-accent-color);
}

body.light-theme .flow-item:hover .box {
    fill: var(--light-accent-hover-bg);
}

body.light-theme .flow-item text.label {
    fill: var(--light-text-color);
}

body.light-theme .flow-line {
    stroke: var(--light-accent-color);
}

.box {
    fill: transparent;
    stroke: var(--accent-color);
    stroke-width: 2;
    rx: 4;
}

.flow-line {
    stroke: var(--accent-color);
    stroke-width: 2;
}

text {
    fill: var(--text-color);
    font-family: 'Fira Code', monospace;
    font-size: 14px;
}

#projects .line-numbers {
    border-right: none;
}

#projects .file,
#projects .file span,
#projects .file:hover,
#projects .file:hover span,
#projects .file.active,
#projects .file.active span {
    color: var(--text-color) !important;
    background-color: transparent;
}

#projects .file.active {
    background-color: transparent;
}

#projects .file.active span {
    color: var(--accent-color);
}

/* Light theme equivalent */
body.light-theme #projects .file,
body.light-theme #projects .file span,
body.light-theme #projects .file:hover,
body.light-theme #projects .file:hover span,
body.light-theme #projects .file.active,
body.light-theme #projects .file.active span {
    color: var(--light-text-color) !important;
    background-color: transparent;
}

body.light-theme #projects .file.active {
    background-color: transparent;
}

body.light-theme #projects .file.active span {
    color: var(--light-accent-color);
}

/* Project content light theme */
body.light-theme .project-detail {
    color: var(--light-text-color);
}

body.light-theme .project-section h2,
body.light-theme .project-section h3 {
    color: var(--light-text-color);
}

body.light-theme .project-section p,
body.light-theme .project-section li {
    color: var(--light-text-color);
}

body.light-theme .project-section li:before {
    color: var(--light-accent-color);
}

body.light-theme .svg-diagram {
    background-color: var(--light-hover-color);
    border-color: var(--light-secondary-color);
}

body.light-theme .svg-placeholder {
    background-color: var(--light-hover-color);
    border-color: var(--light-secondary-color);
    color: var(--light-text-color);
}

/* SVG text color for light theme */
body.light-theme svg text {
    fill: var(--light-text-color);
}

/* Light theme - About-me contacts fix */
body.light-theme #about-me .file a {
    color: var(--light-text-color);
}

body.light-theme #about-me .file:hover a {
    color: var(--light-accent-color);
}

/* Light theme - Skills section */
body.light-theme .skill-item label {
    color: var(--light-text-color);
}

body.light-theme .skill-item input[type="checkbox"] {
    border-color: var(--light-secondary-color);
}

body.light-theme .skill-item input[type="checkbox"]:checked {
    background-color: var(--light-accent-color);
    border-color: var(--light-accent-color);
}

.comment {
    grid-column: 1 / -1;
    margin: 1.5rem 0 1rem;
}

#projects .mobile-menu-btn {
    display: none !important;
}
