:root {
    --bg-dark: #050505;
    --bg-card: #0a0a0a;
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --accent: #D4FF00;
    /* Electric Lime */
    --accent-dim: rgba(212, 255, 0, 0.1);
    --border-color: #222;
    --border-active: #444;

    --font-heading: 'Outfit', sans-serif;
    --font-mono: 'Space Mono', monospace;

    --grid-gap: 1rem;
    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-heading);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    padding: 2rem;
    cursor: default;
}

/* 2. Radar / Sonar Grid Interaction */
.grid-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image:
        linear-gradient(var(--border-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: center;
    opacity: 0.15;
    z-index: -2;
    mask-image: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), black 20%, rgba(0, 0, 0, 0.2) 60%);
    -webkit-mask-image: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), black 20%, rgba(0, 0, 0, 0.2) 60%);
    transition: mask-image 0.1s;
    /* Parallax effect */
    transform: translateZ(-1px) scale(1.1);
    will-change: transform;
}

.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.03);
    z-index: -1;
    animation: scan 6s linear infinite;
    pointer-events: none;
}

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

    100% {
        transform: translateY(100vh);
    }
}

/* Bento Grid Layout */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: min-content;
    /* Allow rows to adapt */
    gap: var(--grid-gap);
    width: 100%;
    max-width: 1100px;
}

/* Box Styling */
.box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.box:hover {
    border-color: var(--border-active);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 20px rgba(212, 255, 0, 0.05);
}

/* Removed Draggable States */

.link-box {
    text-decoration: none;
    color: inherit;
}

.link-box:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.8);
}

/* Hero Box & Avatar */
.hero-box {
    grid-column: span 2;
    min-height: 350px;
    justify-content: flex-start;
    border-top: 2px solid var(--text-primary);
}

.hero-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -2px;
    margin: 1.5rem 0 1rem;
    text-transform: uppercase;
}

.hero-visual {
    flex-shrink: 0;
}

.avatar-container {
    position: relative;
    display: inline-block;
}

.avatar-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    filter: grayscale(100%) contrast(1.2);
    /* Tech look */
    border: 2px solid var(--border-color);
}

.online-badge {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 20px;
    height: 20px;
    background-color: #00FF55;
    /* Force bright green */
    border: 3px solid var(--bg-card);
    border-radius: 50%;
    box-shadow: 0 0 10px #00FF55;
    z-index: 2;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 255, 85, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(0, 255, 85, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 255, 85, 0);
    }
}

.role-typing,
.typing-text {
    font-family: var(--font-mono);
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    min-height: 1.5em;
    /* Prevent layout shift */
}

/* End of Hero Visuals */


.hero-box:hover .avatar-img {
    filter: grayscale(0%);
    border-color: var(--accent);
    transform: rotate(5deg);
}

.role-typing {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 1.1rem;
    min-height: 1.5rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 90%;
}

/* Mute Button */
.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    padding: 2px 5px;
    margin-left: 0.5rem;
    transition: var(--transition);
}

.icon-btn:hover {
    color: var(--accent);
    text-shadow: 0 0 5px var(--accent);
}

/* 11. Command Palette */
.cmd-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 20vh;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.cmd-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.cmd-box {
    width: 600px;
    max-width: 90vw;
    background: var(--bg-card);
    border: 1px solid var(--accent);
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5), 0 0 10px var(--accent-dim);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(-20px);
    transition: transform 0.2s;
}

.cmd-overlay.active .cmd-box {
    transform: translateY(0);
}

.cmd-header {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.3);
}

#cmd-input {
    width: 100%;
    background: transparent;
    border: none;
    padding: 1rem;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1rem;
    outline: none;
}

#cmd-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

.cmd-results {
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cmd-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.1s;
}

.cmd-item:hover,
.cmd-item.selected {
    background: var(--accent-dim);
    color: var(--text-primary);
}

.cmd-tag {
    font-size: 0.7rem;
    border: 1px solid var(--border-color);
    padding: 1px 4px;
    border-radius: 3px;
    opacity: 0.7;
}

/* 12. Hologram Overlay */
.project-card-mini {
    position: relative;
    overflow: hidden;
}

.holo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        repeating-linear-gradient(0deg,
            transparent,
            transparent 2px,
            rgba(0, 255, 100, 0.05) 3px,
            rgba(0, 255, 100, 0.05) 4px);
    background-size: 100% 4px;
    opacity: 0;
    pointer-events: none;
    mix-blend-mode: color-dodge;
    transition: opacity 0.3s;
    z-index: 10;
}

.project-card-mini:hover .holo-overlay {
    opacity: 1;
    animation: holo-scan 2s linear infinite;
}

@keyframes holo-scan {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 0 100%;
    }
}

/* Social Box (Interactive) */
.social-box {
    grid-column: span 1;
    min-height: 200px;
    padding: 1.5rem;
    /* Padding for the cover */
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    /* Border handled by cover or items */
    position: relative;
    overflow: hidden;
}

/* Cover Layer */
.social-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 10;
    overflow: hidden;
    /* Contain animation */
}

/* Network Animation (Pulse) */
.network-anim {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    z-index: 1;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.circle {
    position: absolute;
    border: 1px solid var(--accent);
    border-radius: 50%;
    opacity: 0;
    animation: ripple 3s infinite linear;
}

.c1 {
    width: 100%;
    height: 100%;
    animation-delay: 0s;
}

.c2 {
    width: 70%;
    height: 70%;
    animation-delay: 1s;
}

.c3 {
    width: 40%;
    height: 40%;
    animation-delay: 2s;
}

@keyframes ripple {
    0% {
        transform: scale(0.1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Ensure content on top */
.social-cover .box-header,
.social-cover .box-footer {
    position: relative;
    z-index: 2;
}

.social-box:hover .social-cover {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

/* Grid Layer */
.social-grid {
    position: absolute;
    /* Absolute to sit under cover */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.1s;
    /* Slight delay */
    z-index: 5;
    pointer-events: none;
}

.social-box:hover .social-grid {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
    z-index: 20;
}

.social-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.social-item svg {
    width: 20px;
    height: 20px;
    transition: var(--transition);
}

.social-item:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    transform: scale(1.05);
}

.social-item:hover svg {
    transform: scale(1.1);
    filter: drop-shadow(0 0 5px var(--accent));
}

/* Projects Group Box */
.projects-group-box {
    grid-column: span 2;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.group-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    height: 100%;
}

.project-card-mini {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.2rem;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    min-height: 180px;
}

.project-card-mini:hover {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

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

.project-card-mini h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.project-card-mini p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.project-card-mini .arrow-right {
    font-size: 1rem;
    color: var(--text-secondary);
}

.project-card-mini:hover .arrow-right {
    color: var(--accent);
    transform: translateX(3px);
}

/* 3. Live Status Info Box */
.info-box {
    grid-column: span 1;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    background: transparent;
    border: 1px dashed var(--border-color);
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
}

.stat-value {
    color: var(--text-primary);
    font-weight: 700;
}

.sys-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.5rem;
    border-radius: 4px;
    margin-top: 1rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.status-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #444;
}

.status-indicator.active {
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}

/* 5. Infinite Tech Ticker */
.ticker-box {
    grid-column: span 3;
    padding: 0;
    /* Remove padding for seamless marquee */
    border: none;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    height: 60px;
    display: flex;
    align-items: center;
    position: relative;
}

.ticker-wrap {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
}

.ticker-content {
    display: inline-block;
    animation: marquee 30s linear infinite;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }

    /* Assuming content is duplicated to allow seamless loop */
}

/* Footer Box */
.footer-box {
    grid-column: span 3;
    border: none;
    background: transparent;
    text-align: center;
    padding: 1rem;
    opacity: 0.5;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

/* Utilities */
.box-header,
.box-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.tech-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: default;
}

.tech-tag:hover {
    transform: translateY(-2px) scale(1.05);
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 4px 12px rgba(212, 255, 0, 0.2);
}

.mono-date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.arrow-right,
.arrow-up-right {
    font-size: 1.2rem;
    transition: var(--transition);
}

.blink {
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* 5. Experience Box */
.experience-box {
    grid-column: span 2;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.timeline {
    border-left: 1px dashed var(--border-active);
    padding-left: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
    margin-left: 0.5rem;
}

.timeline-item {
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -29px;
    /* Adjust for padding + border + dot size */
    top: 5px;
    width: 9px;
    height: 9px;
    background: var(--bg-card);
    border: 1px solid var(--accent);
    border-radius: 50%;
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    margin-bottom: 0.3rem;
}

.timeline-content h3 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.company {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
    display: block;
    margin-bottom: 0.3rem;
    font-family: var(--font-mono);
}

.timeline-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* 6. Education Box */
.education-box {
    grid-column: span 1;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.edu-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.edu-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 1rem;
}

.edu-item:last-child {
    border-bottom: none;
}

.edu-year {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 0.2rem;
}

.edu-item h3 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
    color: var(--text-primary);
}

.edu-inst {
    font-size: 0.85rem;
    color: var(--accent);
    font-family: var(--font-mono);
}

/* 7. Languages Box */
.languages-box {
    grid-column: span 1;
    /* Side by side with Skills on desktop */
    min-height: 250px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.lang-legend {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    border-bottom: 1px dashed var(--border-active);
    padding-bottom: 1rem;
}

.lang-legend .highlight {
    color: var(--accent);
    font-weight: bold;
}

.lang-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.lang-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.lang-item h3 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.lang-badge {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    background: rgba(212, 255, 0, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
}

/* 6. Live Status & System Control (Merged) */
.info-box {
    grid-column: span 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
    gap: 1rem;
}

.stat-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.divider-line {
    height: 1px;
    background: var(--border-active);
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    width: 100%;
    margin: 0.2rem 0;
}

.theme-mini-control {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mini-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

.theme-grid.mini {
    justify-content: flex-start;
    gap: 0.6rem;
}

/* Audio Grid Styles */
.sys-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.icon-btn.tiny {
    font-size: 0.8rem;
    padding: 0;
    margin: 0;
    opacity: 0.7;
}

.icon-btn.tiny:hover {
    opacity: 1;
}

.audio-btn {
    width: 25px;
    height: 18px;
    border: 1px solid var(--border-active);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 2px;
    transition: var(--transition);
}

.audio-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Floating Command Button */
.float-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--accent);
    font-family: var(--font-mono);
    font-weight: bold;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 100;
    backdrop-filter: blur(5px);
    transition: var(--transition);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.float-btn:hover {
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-dim);
    transform: translateY(-2px);
}

.float-btn span {
    display: block;
    margin-top: -2px;
    /* Visual center adjustment */
}

/* 8. System Access (Resume) - Expanded */
.resume-box {
    grid-column: span 3;
    /* Full width now */
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.resume-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.resume-text h3 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.resume-text p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.tech-btn {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 0.8rem 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    min-width: 140px;
    text-align: center;
}

.tech-btn:hover {
    background: var(--accent-dim);
    box-shadow: 0 0 15px var(--accent-dim);
}

.btn-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: var(--accent);
    z-index: 1;
    transition: width 0.1s linear;
}

.btn-text {
    position: relative;
    z-index: 2;
    transition: color 0.3s;
}

.tech-btn.downloading .btn-text {
    color: #000;
}

/* 9. Theme Injector */
.theme-box {
    grid-column: span 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.theme-grid {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    padding: 0.5rem 0;
}

.theme-btn {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: var(--btn-color);
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s;
}

.theme-btn:hover {
    transform: scale(1.2);
}

.theme-btn.active {
    border: 2px solid #fff;
    box-shadow: 0 0 10px var(--btn-color);
}

.theme-status {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-align: center;
    border-top: 1px dashed var(--border-active);
    padding-top: 0.5rem;
}

/* 10. Activity Heatmap */
.heatmap-box {
    grid-column: span 3;
    min-height: 200px;
}

.heatmap-container {
    display: grid;
    grid-template-columns: repeat(40, 1fr);
    /* 40 Weeks fits comfortably */
    grid-template-rows: repeat(7, 1fr);
    gap: 4px;
    margin-top: 1rem;
    height: 120px;
}

.heat-cell {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    transition: all 0.2s;
}

.heat-cell:hover {
    transform: scale(1.2);
    border: 1px solid #fff;
}

.heatmap-legend {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.legend-scale {
    display: flex;
    gap: 2px;
}

.legend-scale span {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

/* Levels */
.l1 {
    background: rgba(255, 255, 255, 0.05);
}

.l2 {
    background: var(--accent-dim);
}

.l3 {
    background: var(--accent);
    opacity: 0.6;
}

.l4 {
    background: var(--accent);
}

/* Responsive */
@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    body {
        padding: 1rem;
    }

    .hero-box {
        grid-column: span 2;
        min-height: 300px;
        padding: 1.2rem;
    }

    .projects-group-box {
        grid-column: span 2;
    }

    .experience-box {
        grid-column: span 2;
    }

    .languages-box {
        grid-column: span 2;
    }

    .ticker-box {
        grid-column: span 2;
    }

    .footer-box {
        grid-column: span 2;
    }

    .resume-box {
        grid-column: span 2;
    }

    .about-box {
        grid-column: span 2;
    }

    .skills-box {
        grid-column: span 2;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .avatar-img {
        width: 100px;
        height: 100px;
    }

    .box {
        padding: 1.2rem;
    }

    .float-btn {
        width: 50px;
        height: 50px;
        bottom: 1.5rem;
        right: 1.5rem;
        font-size: 1rem;
    }
}

/* Tablet and Small Desktop */
@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: 1fr !important;
        gap: 0.8rem;
    }

    body {
        padding: 0.8rem;
    }

    .hero-box,
    .social-box,
    .projects-group-box,
    .info-box,
    .experience-box,
    .education-box,
    .languages-box,
    .ticker-box,
    .footer-box,
    .resume-box,
    .about-box,
    .skills-box {
        grid-column: span 1 !important;
    }

    .box {
        padding: 1rem;
    }

    .hero-box {
        min-height: auto;
        padding: 1.2rem;
    }

    .hero-content h1 {
        font-size: 2.8rem;
        letter-spacing: -1px;
    }

    .hero-body {
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .avatar-img {
        width: 90px;
        height: 90px;
        margin-bottom: 0.5rem;
    }

    .role-typing,
    .typing-text {
        font-size: 1rem;
    }

    .subtitle {
        font-size: 0.9rem;
        max-width: 100%;
    }

    .group-content {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .lang-list {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    /* Social Box - Always show grid on tablet/mobile */
    .social-box {
        min-height: 280px;
        overflow: visible;
        padding: 0;
        order: 100;
        /* Move to end on tablet/mobile */
    }

    .social-cover {
        display: none;
    }

    .social-grid {
        position: relative;
        opacity: 1;
        transform: scale(1);
        pointer-events: auto;
        z-index: 1;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.4rem;
        padding: 1rem;
        height: auto;
        min-height: 250px;
    }

    .social-item {
        min-height: 60px;
    }

    .social-item svg {
        width: 18px;
        height: 18px;
    }

    .timeline {
        padding-left: 1rem;
        margin-left: 0.3rem;
    }

    .timeline-item::before {
        left: -21px;
    }

    .cmd-box {
        width: 95vw;
    }

    .float-btn {
        width: 50px;
        height: 50px;
        bottom: 1.5rem;
        right: 1.5rem;
        font-size: 1rem;
    }
}

/* Mobile Devices */
@media (max-width: 600px) {
    .bento-grid {
        grid-template-columns: 1fr !important;
        gap: 0.6rem;
    }

    body {
        padding: 0.5rem;
    }

    .hero-box,
    .social-box,
    .projects-group-box,
    .info-box,
    .experience-box,
    .education-box,
    .languages-box,
    .ticker-box,
    .footer-box,
    .resume-box,
    .about-box,
    .skills-box {
        grid-column: span 1 !important;
        min-height: auto;
    }

    .box {
        padding: 1rem;
    }

    .hero-box {
        padding: 1rem;
    }

    .lang-list {
        grid-template-columns: 1fr;
    }

    .group-content {
        grid-template-columns: 1fr;
    }

    .hero-body {
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: 1rem;
    }

    .hero-content h1 {
        font-size: 2.2rem;
        line-height: 1;
        margin: 1rem 0 0.8rem;
    }

    .avatar-img {
        width: 70px;
        height: 70px;
        margin-bottom: 0.5rem;
    }

    .online-badge {
        width: 14px;
        height: 14px;
        bottom: 10px;
        right: 10px;
        border-width: 2px;
    }

    .role-typing,
    .typing-text {
        font-size: 0.9rem;
    }

    .subtitle {
        font-size: 0.85rem;
    }

    .hero-resume-btn {
        font-size: 0.7rem;
        padding: 0.4rem 0.8rem;
        margin-top: 0.8rem;
    }

    .box-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .tech-tag {
        font-size: 0.65rem;
        padding: 2px 5px;
    }

    .icon-layer {
        font-size: 1.2rem;
    }

    /* Social Box - Always show grid on tablet/mobile */
    .social-box {
        min-height: 280px;
        overflow: visible;
        padding: 0;
        order: 100;
        /* Move to end on mobile */
    }

    /* Hide cover on mobile, show grid directly */
    .social-cover {
        display: none;
    }

    .social-grid {
        position: relative;
        opacity: 1;
        transform: scale(1);
        pointer-events: auto;
        z-index: 1;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.3rem;
        padding: 1rem;
        height: auto;
        min-height: 250px;
    }

    .social-item {
        padding: 0.6rem;
        min-height: 60px;
    }

    .social-item svg {
        width: 16px;
        height: 16px;
    }

    /* Projects */
    .project-card-mini {
        padding: 1rem;
        min-height: 150px;
    }

    .project-card-mini h3 {
        font-size: 1rem;
    }

    .project-card-mini p {
        font-size: 0.8rem;
    }

    /* Experience Timeline */
    .timeline {
        padding-left: 0.8rem;
        margin-left: 0.2rem;
        gap: 1.5rem;
    }

    .timeline-item::before {
        left: -18px;
        width: 7px;
        height: 7px;
    }

    .timeline-content h3 {
        font-size: 1rem;
    }

    .timeline-content h4 {
        font-size: 0.9rem;
    }

    .timeline-content p,
    .timeline-content ul li {
        font-size: 0.8rem;
    }

    /* Education */
    .edu-item h3 {
        font-size: 0.9rem;
    }

    .edu-inst {
        font-size: 0.8rem;
    }

    /* Languages */
    .lang-item {
        padding: 0.8rem;
    }

    .lang-item h3 {
        font-size: 0.9rem;
    }

    .lang-legend {
        font-size: 0.7rem;
        gap: 0.6rem;
        flex-wrap: wrap;
    }

    /* Skills */
    .tag-cloud {
        gap: 0.4rem;
    }

    .skill-label {
        font-size: 0.7rem;
    }

    /* Info Box */
    .stat-item {
        font-size: 0.8rem;
    }

    .theme-grid.mini {
        gap: 0.4rem;
    }

    .theme-btn {
        width: 22px;
        height: 22px;
    }

    .audio-btn {
        width: 22px;
        height: 16px;
        font-size: 0.55rem;
    }

    /* Resume Box */
    .resume-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .resume-text h3 {
        font-size: 1rem;
    }

    .resume-text p {
        font-size: 0.75rem;
    }

    .tech-btn {
        width: 100%;
        padding: 0.7rem 1.2rem;
        font-size: 0.75rem;
    }

    /* About Box */
    .about-content {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .about-box .stat-value {
        font-size: 1.3rem;
    }

    .about-box .stat-label {
        font-size: 0.7rem;
    }

    .strengths-grid {
        gap: 0.4rem;
    }

    .strength-tag {
        font-size: 0.65rem;
        padding: 0.3rem 0.6rem;
    }

    .role-list li {
        font-size: 0.8rem;
    }

    .about-footer {
        flex-direction: column;
        gap: 0.6rem;
        align-items: flex-start;
        font-size: 0.7rem;
    }

    .location-badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.6rem;
    }

    /* Ticker/Quote Box */
    .ticker-box {
        height: auto;
        min-height: 50px;
        padding: 0.8rem;
    }

    .quote-typing {
        font-size: 0.85rem;
        line-height: 1.5;
    }

    .typing-cursor {
        font-size: 0.85rem;
    }

    /* Command Palette */
    .cmd-box {
        width: 95vw;
        max-width: 95vw;
    }

    .cmd-header {
        padding: 0.6rem 0.8rem;
        font-size: 0.7rem;
    }

    #cmd-input {
        padding: 0.8rem;
        font-size: 0.9rem;
    }

    .cmd-item {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }

    .cmd-tag {
        font-size: 0.65rem;
    }

    /* Floating Button */
    .float-btn {
        width: 45px;
        height: 45px;
        bottom: 1rem;
        right: 1rem;
        font-size: 0.9rem;
    }

    /* Footer */
    .footer-box {
        font-size: 0.75rem;
        padding: 0.8rem;
    }

    /* Disable hover effects on mobile for better performance */
    .bento-grid:hover .box {
        opacity: 1;
        filter: none;
        transform: none;
    }

    .box:hover {
        transform: none;
    }
}

/* Extra Small Mobile Devices */
@media (max-width: 480px) {
    body {
        padding: 0.4rem;
    }

    .bento-grid {
        gap: 0.5rem;
    }

    .box {
        padding: 0.8rem;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .avatar-img {
        width: 60px;
        height: 60px;
    }

    .role-typing,
    .typing-text {
        font-size: 0.85rem;
    }

    .subtitle {
        font-size: 0.8rem;
    }

    .tech-tag {
        font-size: 0.6rem;
        padding: 1px 4px;
    }

    .social-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.25rem;
    }

    .social-item {
        padding: 0.5rem;
    }

    .social-item svg {
        width: 14px;
        height: 14px;
    }

    .project-card-mini {
        padding: 0.8rem;
        min-height: 130px;
    }

    .project-card-mini h3 {
        font-size: 0.9rem;
    }

    .project-card-mini p {
        font-size: 0.75rem;
    }

    .timeline {
        padding-left: 0.6rem;
        gap: 1.2rem;
    }

    .float-btn {
        width: 40px;
        height: 40px;
        font-size: 0.8rem;
    }

    .quote-typing {
        font-size: 0.8rem;
    }

    .about-box .stat-value {
        font-size: 1.2rem;
    }

    .strength-tag {
        font-size: 0.6rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Command Palette Categories */
.cmd-category {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin: 1rem 0 0.5rem 0.5rem;
    font-weight: bold;
    letter-spacing: 1px;
    opacity: 0.7;
    pointer-events: none;
}

.cmd-category:first-child {
    margin-top: 0.5rem;
}

/* Fix Education Alignment */
.education-box {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
}

.edu-list {
    flex: 0 0 auto !important;
    /* Do not grow, do not shrink */
    margin-top: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Bento Grid Focus Mode */
.bento-grid:hover .box {
    opacity: 0.4;
    filter: blur(2px);
    transform: scale(0.98);
}

.bento-grid .box:hover {
    opacity: 1;
    filter: none;
    transform: scale(1.02);
    z-index: 5;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.1);
    border-color: var(--accent);
}

.box {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation: fadeInUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

/* Entry Animation Keyframes */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(60px) scale(0.95);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Staggered Animation Delays */
.box:nth-child(1) {
    animation-delay: 0.1s;
}

.box:nth-child(2) {
    animation-delay: 0.2s;
}

.box:nth-child(3) {
    animation-delay: 0.3s;
}

.box:nth-child(4) {
    animation-delay: 0.4s;
}

.box:nth-child(5) {
    animation-delay: 0.5s;
}

.box:nth-child(6) {
    animation-delay: 0.6s;
}

.box:nth-child(7) {
    animation-delay: 0.7s;
}

.box:nth-child(8) {
    animation-delay: 0.8s;
}

.box:nth-child(9) {
    animation-delay: 0.9s;
}

.box:nth-child(10) {
    animation-delay: 1.0s;
}

.box:nth-child(11) {
    animation-delay: 1.1s;
}

.box:nth-child(12) {
    animation-delay: 1.2s;
}

/* --- TERMINAL BOOT SEQUENCE --- */
.boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #050505;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    font-family: 'Space Mono', monospace;
    color: var(--accent);
    transition: opacity 0.5s ease-out;
}

.boot-container {
    width: 100%;
    max-width: 600px;
}

.boot-log p {
    margin: 0.2rem 0;
    opacity: 0.8;
}

.boot-log p.highlight {
    color: #fff;
    font-weight: bold;
    opacity: 1;
}

.cursor-block {
    display: inline-block;
    width: 10px;
    height: 1.2em;
    background: var(--accent);
    vertical-align: text-bottom;
    animation: blink 1s infinite;
    margin-left: 5px;
}

/* Hide animations while booting */
body.booting .box {
    animation: none !important;
    opacity: 0 !important;
}

body.booting .boot-screen {
    opacity: 1;
    pointer-events: auto;
}

body:not(.booting) .boot-screen {
    opacity: 0;
    pointer-events: none;
}

/* Skills Box Styling */
.skills-box {
    grid-column: span 2;
    /* Span wider for tags */
}

@media (max-width: 768px) {
    .skills-box {
        grid-column: span 1;
    }
}

.skills-container {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.skill-category {
    border-left: 2px solid rgba(0, 255, 136, 0.2);
    padding-left: 1rem;
}

.skill-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: bold;
    letter-spacing: 1px;
}

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

/* --- COMPACT LANGUAGES BOX (Fix for 1-Column Layout) --- */
.languages-box .lang-list {
    grid-template-columns: 1fr !important;
    /* Stack cards vertically */
    gap: 0.8rem !important;
}

.languages-box .lang-item {
    padding: 0.6rem !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.languages-box .lang-item h3 {
    font-size: 0.8rem !important;
    margin: 0 !important;
}

.languages-box .lang-badge {
    font-size: 0.65rem !important;
    padding: 1px 4px !important;
}

.languages-box .lang-legend {
    font-size: 0.65rem !important;
    padding-bottom: 0.5rem !important;
    margin-bottom: 0.5rem !important;
    flex-wrap: wrap;
}

/* --- ICON LAYER MICRO-INTERACTIONS --- */
.icon-layer {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-block;
}

.box:hover .icon-layer {
    transform: scale(1.2) rotate(5deg);
}

/* --- BADGE ANIMATIONS --- */
.lang-badge,
.edu-year,
.mono-date {
    transition: all 0.3s ease;
}

.lang-item:hover .lang-badge {
    background: var(--accent);
    color: var(--bg-dark);
    transform: scale(1.05);
}

/* --- AVATAR HOVER ENHANCEMENT --- */
.avatar-img {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-box:hover .avatar-img {
    filter: grayscale(0%) brightness(1.1);
    transform: scale(1.05) rotate(-2deg);
}

/* --- ABOUT / PROFILE BOX --- */
.about-box {
    grid-column: span 3;
    min-height: 300px;
}

.about-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 1rem;
}

.about-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.section-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    margin: 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--border-color);
}

/* Experience Stats Grid */
.about-box .about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.about-box .stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.about-box .stat-item:hover {
    border-color: var(--accent);
    background: rgba(212, 255, 0, 0.05);
    transform: translateY(-2px);
}

.about-box .stat-value {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--accent);
    font-family: var(--font-heading);
    line-height: 1;
}

.about-box .stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

/* Strengths Grid */
.strengths-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.strength-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: default;
}

.strength-tag:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

/* Role List */
.role-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.role-list li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding-left: 1.2rem;
    position: relative;
    transition: all 0.3s ease;
}

.role-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

.role-list li:hover {
    color: var(--text-primary);
    transform: translateX(5px);
}

/* About Footer */
.about-footer {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px dashed var(--border-color);
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.location-badge {
    color: var(--accent);
    background: rgba(212, 255, 0, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    border: 1px solid var(--accent);
}

.work-mode {
    color: var(--text-secondary);
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .about-footer {
        flex-direction: column;
        gap: 0.8rem;
        align-items: flex-start;
    }

    /* Projects Grid - Stack on Mobile */
    .group-content {
        grid-template-columns: 1fr;
    }
}

/* --- QUOTE TYPING EFFECT --- */
.typing-container {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 1rem;
}

.quote-typing {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.6;
}

.typing-cursor {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--accent);
    animation: blink 1s step-end infinite;
    font-weight: bold;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* --- HERO RESUME BUTTON --- */
.hero-resume-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 3px;
    transition: all 0.3s ease;
    cursor: pointer;
    opacity: 0.7;
}

.hero-resume-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    opacity: 1;
    transform: translateX(3px);
}

.hero-resume-btn .arrow-down {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.hero-resume-btn:hover .arrow-down {
    transform: translateX(2px);
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(5px);
    }
}