:root {
    --bg-color: #000000; /* Boring black */
    --text-color: #c9d1d9; /* Standard text color */
    --shebang-color: rgba(139, 148, 158, 0.4); /* Translucent */
    --title-color: #e6edf3;
    --placeholder-border: #30363d;
    
    /* Option colors */
    --opt-1-color: #ff7b72;
    --opt-2-color: #d2a8ff;
    --opt-3-color: #a5d6ff;
    --opt-4-color: #7ee787;
    --opt-5-color: #f2cc60;
    --opt-6-color: #ffa657;
    
    --arrow-color: #ffffff;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'DotGothic16', 'Courier New', Courier, monospace;
    line-height: 1.6;
    padding: 2.5rem 4rem 1.5rem 4rem; /* Moved down slightly */
    display: flex;
    justify-content: flex-start;
    text-align: left;
    min-height: 100vh; /* Allow height to expand */
    overflow-y: auto; /* Enable vertical scrolling */
}

.terminal-container {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem; /* Drastically reduced gap to pull items closer */
    margin-top: 0;
}

.shebang {
    color: var(--shebang-color);
    font-size: 1.2rem;
    user-select: none;
    font-weight: 500;
}

.title {
    color: var(--title-color);
    font-family: 'Doto', sans-serif;
    font-size: 4.8rem;
    font-weight: 700;
    line-height: 1.1; /* Tighten line height to reduce visual gap */
    margin-top: -0.5rem; /* Physically pull title up closer to the shebang */
    margin-bottom: 0;
}

.profile-card {
    border: 1px solid var(--placeholder-border);
    border-radius: 4px;
    padding: 1.5rem 2rem;
    background-color: rgba(22, 27, 34, 0.3);
    margin-top: 1rem;
    transition: opacity 0.5s ease;
}

.about-me-placeholder {
    padding-top: 1rem;
    min-height: auto;
}

.about-text {
    color: var(--text-color);
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.1rem;
}

.main-content {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: space-between;
    align-items: stretch; /* Stretch children to equal height */
    margin-top: 2rem;
}

.options-menu {
    flex: 0 0 450px;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--placeholder-border);
    border-radius: 4px;
    padding: 1.5rem 2rem;
    background-color: rgba(22, 27, 34, 0.3);
    transition: opacity 0.5s ease;
}

#menu-list {
    list-style-type: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Space out items evenly to match heatmap height */
    flex-grow: 1;
}

#menu-list li {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 2rem;
    padding: 0.5rem 1rem;
    margin-left: -1rem; /* Offset padding */
    border-radius: 4px;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

#menu-list li.active.opt-1 { background-color: rgba(255, 123, 114, 0.12); }
#menu-list li.active.opt-2 { background-color: rgba(210, 168, 255, 0.12); }
#menu-list li.active.opt-3 { background-color: rgba(165, 214, 255, 0.12); }
#menu-list li.active.opt-4 { background-color: rgba(126, 231, 135, 0.12); }

#menu-list li:hover {
    transform: translateX(8px);
}

.arrow {
    width: 32px;
    display: inline-block;
    color: transparent;
    font-weight: bold;
}

#menu-list li.active .arrow {
    color: var(--arrow-color);
    animation: blink 1s step-end infinite;
}

.option-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
}

.option {
    margin-left: 10px;
    font-weight: 500;
    font-family: 'Courier New', Courier, monospace;
}

/* Color coding options */
.option-1 { color: var(--opt-1-color); }
.option-2 { color: var(--opt-2-color); }
.option-3 { color: var(--opt-3-color); }
.option-4 { color: var(--opt-4-color); }
.option-5 { color: var(--opt-5-color); }
.option-6 { color: var(--opt-6-color); }

.github-box, .leetcode-box {
    border: 1px solid var(--placeholder-border);
    border-radius: 4px;
    background-color: rgba(22, 27, 34, 0.3);
    padding: 1.5rem;
    transition: opacity 0.5s ease, border-color 0.3s ease, background-color 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    color: inherit;
}

.github-box:hover, .leetcode-box:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background-color: rgba(22, 27, 34, 0.45);
}

.github-stats-grid {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--placeholder-border);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    align-self: stretch;
}

.stat-box {
    flex: 1;
    border: 1px solid var(--placeholder-border);
    border-radius: 4px;
    background-color: rgba(22, 27, 34, 0.25);
    padding: 0.6rem 0.4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    text-align: center;
    transition: border-color 0.3s ease, opacity 0.5s ease;
}

.stat-box:hover {
    border-color: rgba(255, 255, 255, 0.6);
}

.stat-box .stat-label {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    color: var(--shebang-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-box .stat-value {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-color);
}

.github-box {
    flex: 1.5 1 450px;
    max-width: 600px;
}

.leetcode-box {
    flex: 1.2 1 380px;
    max-width: 450px;
}

/* Legacy nested a styles removed */

.github-box .heatmap-title, .leetcode-box .heatmap-title {
    color: var(--text-color);
    font-size: 1.3rem;
    font-weight: normal;
    align-self: flex-start;
    margin-left: 0.5rem;
}

.github-box img {
    width: 100%;
    height: auto;
    max-height: 145px;
    object-fit: contain;
    opacity: 1;
    transition: opacity 0.5s ease, filter 0.3s ease;
}

.leetcode-box img {
    width: 100%;
    height: auto; /* Display full leetcode stats card */
    object-fit: contain;
    opacity: 1;
    transition: opacity 0.5s ease, filter 0.3s ease;
}

.github-box .heatmap-caption, .leetcode-box .heatmap-caption {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    text-align: center;
    transition: color 0.3s ease;
}

.github-box:hover .heatmap-caption, .leetcode-box:hover .heatmap-caption {
    color: rgba(255, 255, 255, 0.9);
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    body {
        padding: 1.5rem;
    }
    
    .main-content {
        flex-direction: column;
        gap: 2.5rem;
    }
    
    .title {
        font-size: 2.2rem;
    }
}

/* Cleaned legacy heatmap styles */

/* Specific to GitHub Heatmap image inversion */
.github-heatmap img {
    /* Convert light theme chart to dark theme (inverts light grey to dark grey, and keeps green tones) */
    filter: invert(0.9) hue-rotate(180deg) brightness(1.2) contrast(1.1);
}

.github-heatmap:hover img {
    filter: invert(0.9) hue-rotate(180deg) brightness(1.4) contrast(1.2);
}

/* Specific to LeetCode Heatmap hover */
.leetcode-heatmap:hover img {
    filter: brightness(1.15);
}

/* Sequential typing animations: hide elements initially if JS is active */
.js-enabled .profile-card,
.js-enabled .title,
.js-enabled .about-text,
.js-enabled .options-menu,
.js-enabled #menu-list li,
.js-enabled .github-heatmap,
.js-enabled .leetcode-heatmap,
.js-enabled .github-heatmap img,
.js-enabled .leetcode-heatmap img,
.js-enabled .stat-box,
.js-enabled .project-item,
.js-enabled .internship-item,
.js-enabled .contact-item {
    opacity: 0;
}

/* Prompt styling for terminal pages */
.prompt-line {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.prompt-text .user {
    color: var(--opt-4-color);
}

.prompt-text .dir {
    color: var(--opt-3-color);
}

.back-link {
    color: var(--opt-2-color);
    text-decoration: none;
    font-weight: bold;
    border-bottom: 1px dashed transparent;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.back-link:hover {
    color: var(--opt-1-color);
    border-bottom-color: var(--opt-1-color);
}

.cursor-blink {
    animation: blink 1s step-end infinite;
    color: var(--text-color);
}

/* Project & Internship Option Boxes */
.projects-menu, .internships-menu, .contacts-menu {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.project-box, .internship-box, .contact-box {
    border: 1px solid var(--placeholder-border);
    border-radius: 4px;
    background-color: rgba(22, 27, 34, 0.3);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.project-header, .internship-header, .contact-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    font-size: 1.5rem;
}

.project-title, .internship-title, .contact-title {
    margin-left: 10px;
    font-weight: bold;
    font-family: 'Courier New', Courier, monospace;
}

.project-description, .internship-description, .contact-description {
    max-height: 0;
    opacity: 0;
    padding: 0 1rem;
    color: var(--text-color);
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    visibility: hidden;
}

.project-box:hover .project-description,
.project-box.active .project-description,
.internship-box:hover .internship-description,
.internship-box.active .internship-description,
.contact-box:hover .contact-description,
.contact-box.active .contact-description {
    max-height: 200px;
    opacity: 1;
    padding-bottom: 1rem;
    visibility: visible;
}

.project-box:hover, .internship-box:hover, .contact-box:hover {
    border-color: rgba(255, 255, 255, 0.4);
}

.project-box.active, .internship-box.active, .contact-box.active {
    border-color: rgba(255, 255, 255, 0.6);
}

.project-box:hover:has(.option-1),
.project-box.active:has(.option-1),
.internship-box:hover:has(.option-1),
.internship-box.active:has(.option-1),
.contact-box:hover:has(.option-1),
.contact-box.active:has(.option-1) {
    background-color: hsla(4, 40%, 72%, 0.2);
}

.project-box:hover:has(.option-2),
.project-box.active:has(.option-2),
.internship-box:hover:has(.option-2),
.internship-box.active:has(.option-2),
.contact-box:hover:has(.option-2),
.contact-box.active:has(.option-2) {
    background-color: hsla(269, 40%, 83%, 0.2);
}

.project-box:hover:has(.option-3),
.project-box.active:has(.option-3),
.internship-box:hover:has(.option-3),
.internship-box.active:has(.option-3),
.contact-box:hover:has(.option-3),
.contact-box.active:has(.option-3) {
    background-color: hsla(207, 40%, 82%, 0.2);
}

.project-box:hover:has(.option-4),
.project-box.active:has(.option-4),
.internship-box:hover:has(.option-4),
.internship-box.active:has(.option-4),
.contact-box:hover:has(.option-4),
.contact-box.active:has(.option-4) {
    background-color: hsla(125, 30%, 70%, 0.2);
}

.project-box:hover:has(.option-5),
.project-box.active:has(.option-5),
.internship-box:hover:has(.option-5),
.internship-box.active:has(.option-5) {
    background-color: hsla(44, 40%, 66%, 0.2);
}

.project-box:hover:has(.option-6),
.project-box.active:has(.option-6),
.internship-box:hover:has(.option-6),
.internship-box.active:has(.option-6) {
    background-color: hsla(30, 40%, 67%, 0.2);
}

.project-box.active .arrow,
.internship-box.active .arrow,
.contact-box.active .arrow {
    color: var(--arrow-color);
    animation: blink 1s step-end infinite;
}

/* Back Button inside Profile Card */
.back-button {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    border: 1px solid var(--placeholder-border);
    border-radius: 4px;
    color: var(--opt-2-color);
    text-decoration: none;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    background-color: rgba(22, 27, 34, 0.5);
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.back-button:hover {
    color: var(--opt-1-color);
    border-color: var(--opt-1-color);
    background-color: rgba(255, 123, 114, 0.08);
}

