/* ============================================================
   PORTFOLIO IDE — style.css
   Shadow Glow Palette: #0A0A1A | #1F51FF | #39FF14
   Font: JetBrains Mono (monospaced IDE font)
   ============================================================ */

/* ===== RESET & ROOT ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Core IDE Bg */
    --ide-bg: #0A0A1A;
    --ide-bg2: #0D0D22;
    --ide-bg3: #111130;
    --ide-sidebar: #0C0C20;
    --ide-titlebar: #070714;
    --ide-statusbar: #1F51FF;
    --ide-tabbar: #0D0D22;
    --ide-terminal: #060612;
    --ide-line-hl: rgba(31, 81, 255, 0.07);
    --ide-gutter: #0C0C1E;

    /* Accent */
    --blue: #1F51FF;
    --blue-dim: rgba(31, 81, 255, 0.15);
    --blue-glow: 0 0 18px rgba(31, 81, 255, 0.55), 0 0 50px rgba(31, 81, 255, 0.2);
    --green: #39FF14;
    --green-dim: rgba(57, 255, 20, 0.1);
    --green-glow: 0 0 12px rgba(57, 255, 20, 0.65);

    /* Text */
    --text: #ABB2BF;
    --text-bright: #E6EBF4;
    --text-muted: #3D4A60;
    --text-dim: #2A3347;

    /* Border */
    --border: rgba(31, 81, 255, 0.18);
    --border-hard: rgba(31, 81, 255, 0.35);

    /* Syntax tokens */
    --syn-kw: #569CD6;
    /* keywords */
    --syn-str: #39FF14;
    /* strings */
    --syn-cmt: #3D5068;
    /* comments */
    --syn-num: #B5CEA8;
    /* numbers */
    --syn-cls: #FF79C6;
    /* class names */
    --syn-fn: #7EC8FC;
    /* function names */
    --syn-prop: #9CDCFE;
    /* properties/keys */
    --syn-type: #FF79C6;
    /* types */
    --syn-op: #C6C6C6;
    /* operators */
    --syn-bool: #569CD6;
    /* booleans */
    --syn-tag: #FF6188;
    /* md headers */
    --syn-yaml-k: #9CDCFE;
    /* yaml keys */
    --syn-bash-v: #7EC8FC;
    /* bash vars */
    --syn-bash-k: #1F51FF;
    /* bash keywords */
    --syn-shebang: #39FF14;
    /* shebang line */

    /* Layout */
    --titlebar-h: 36px;
    --activity-w: 48px;
    --sidebar-w: 240px;
    --statusbar-h: 24px;
    --tabbar-h: 38px;
    --breadcrumb-h: 26px;
    --terminal-h: 260px;
    --resize-h: 5px;

    --font: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
    --radius: 4px;
    --transition: 0.18s ease;
}

html,
body {
    height: 100%;
    overflow: hidden;
    background: var(--ide-bg);
}

body {
    font-family: var(--font);
    font-size: 13px;
    color: var(--text);
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: var(--font);
    cursor: pointer;
}

::selection {
    background: var(--blue);
    color: #fff;
}

.card-back {
    transform: rotateY(180deg);
}

/* End of flexible card fix */
.card-front h3 {
    font-size: 1.8rem;
    color: var(--light-bg);
    font-weight: bold;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.card-front p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 1rem 0;
    color: var(--ivory-color);
}

.project-image {
    width: 250px;
    height: auto;
    border-radius: 15px;
    object-fit: cover;
    border: 3px solid var(--secondary-color);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.project-image:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(253, 172, 85, 0.5);
}

.card-back h4 {
    font-size: 1.8rem;
    color: var(--light-bg);
    font-weight: bold;
}

.card-back ul {
    list-style: none;
    padding: 0 1rem;
    margin: 1rem 0;
    text-align: left;
}

.card-back li {
    font-size: 1.1rem;
    margin: 0.8rem 0;
    color: var(--ivory-color);
}

.project-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: auto;
}

.project-links a {
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    background: var(--gradient);
    color: var(--text-light);
    text-decoration: none;
    font-family: 'SpaceGrotesk', sans-serif;
    font-size: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-links a:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.carousel-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
}

.carousel-button {
    border: none;
    color: white;
    padding: 1vmin 2vmin;
    cursor: pointer;
    border-radius: 20%;
    transition: all 0.3s ease;
    margin: 0 1rem;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 1vmin;
    margin-top: 2vmin;
}

.carousel-indicators .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
}

.carousel-indicators .dot.active {
    background: var(--secondary-color);
}

.github-stats-section {
    text-align: center;
    margin-top: 4rem;
    padding: 2rem 0;
}

.collaboration-note {
    color: var(--ivory-color);
    max-width: 600px;
    margin: 0 auto 2rem auto;
    font-size: 1.1rem;
    line-height: 1.7;
}

.github-cards {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.github-cards img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.github-cards img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.card-back {
    transform: rotateY(180deg);
}

/* End of flexible card fix */
.card-front h3 {
    font-size: 1.8rem;
    color: var(--light-bg);
    font-weight: bold;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.card-front p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 1rem 0;
    color: var(--ivory-color);
}

.project-image {
    width: 250px;
    height: auto;
    border-radius: 15px;
    object-fit: cover;
    border: 3px solid var(--secondary-color);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.project-image:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(253, 172, 85, 0.5);
}

.card-back h4 {
    font-size: 1.8rem;
    color: var(--light-bg);
    font-weight: bold;
}

.card-back ul {
    list-style: none;
    padding: 0 1rem;
    margin: 1rem 0;
    text-align: left;
}

.card-back li {
    font-size: 1.1rem;
    margin: 0.8rem 0;
    color: var(--ivory-color);
}

.project-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: auto;
}

.project-links a {
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    background: var(--gradient);
    color: var(--text-light);
    text-decoration: none;
    font-family: 'SpaceGrotesk', sans-serif;
    font-size: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-links a:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.carousel-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
}

.carousel-button {
    border: none;
    color: white;
    padding: 1vmin 2vmin;
    cursor: pointer;
    border-radius: 20%;
    transition: all 0.3s ease;
    margin: 0 1rem;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 1vmin;
    margin-top: 2vmin;
}

.carousel-indicators .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
}

.carousel-indicators .dot.active {
    background: var(--secondary-color);
}

.github-stats-section {
    text-align: center;
    margin-top: 4rem;
    padding: 2rem 0;
}

.collaboration-note {
    color: var(--ivory-color);
    max-width: 600px;
    margin: 0 auto 2rem auto;
    font-size: 1.1rem;
    line-height: 1.7;
}

.github-cards {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.github-cards img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.github-cards img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(31, 81, 255, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(31, 81, 255, 0.6);
}

/* ============================================================
   IDE GRID LAYOUT
   ============================================================ */
.ide {
    display: grid;
    grid-template:
        "titlebar  titlebar   titlebar " var(--titlebar-h) "actbar    sidebar    main     " 1fr
        "statusbar statusbar  statusbar" var(--statusbar-h) / var(--activity-w) var(--sidebar-w) 1fr;
    height: 100vh;
    overflow: hidden;
    background: var(--ide-bg);
}

/* ============================================================
   TITLE BAR
   ============================================================ */
.ide-titlebar {
    grid-area: titlebar;
    background: var(--ide-titlebar);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0;
    user-select: none;
    -webkit-app-region: drag;
    position: relative;
    z-index: 100;
}

/* macOS window controls */
.win-controls {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 14px;
    flex-shrink: 0;
    -webkit-app-region: no-drag;
}

.wc {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: block;
    cursor: pointer;
    transition: filter var(--transition);
}

.wc-close {
    background: #FF5F57;
}

.wc-min {
    background: #FEBC2E;
}

.wc-max {
    background: #28C840;
}

.wc:hover {
    filter: brightness(1.3);
}

/* Menu items */
.title-menus {
    display: flex;
    gap: 0;
    -webkit-app-region: no-drag;
}

.t-menu {
    padding: 0 10px;
    height: var(--titlebar-h);
    display: flex;
    align-items: center;
    font-size: 12px;
    color: var(--text);
    cursor: pointer;
    transition: background var(--transition);
}

.t-menu:hover {
    background: rgba(255, 255, 255, 0.07);
}

/* Center title */
.title-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    pointer-events: none;
}

.title-ide-icon {
    color: var(--blue);
    font-size: 11px;
}

/* Right user tag */
.title-right {
    margin-left: auto;
    padding-right: 14px;
    -webkit-app-region: no-drag;
}

.title-user {
    font-size: 11px;
    color: var(--text-muted);
}

/* ============================================================
   ACTIVITY BAR
   ============================================================ */
.ide-activitybar {
    grid-area: actbar;
    background: var(--ide-titlebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 0;
    gap: 4px;
    z-index: 50;
}

.activity-btn {
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    border-radius: var(--radius);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: color var(--transition), background var(--transition);
    position: relative;
}

.activity-btn:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.activity-btn.active {
    color: var(--text-bright);
    border-left: 2px solid var(--blue);
}

.activity-btn.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--blue);
    box-shadow: var(--blue-glow);
}

.activity-spacer {
    flex: 1;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.ide-sidebar {
    grid-area: sidebar;
    background: var(--ide-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 40;
}

.sidebar-panel {
    display: none;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.sidebar-panel.active {
    display: flex;
}

.sidebar-section-title {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    padding: 12px 14px 8px;
    flex-shrink: 0;
}

/* File Tree */
.file-tree {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 1rem;
}

.tree-folder-header {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    cursor: pointer;
    color: var(--text);
    font-size: 12px;
    font-weight: 500;
    transition: background var(--transition);
    user-select: none;
}

.tree-folder-header:hover {
    background: rgba(255, 255, 255, 0.04);
}

.tree-chevron {
    font-size: 9px;
    color: var(--text-muted);
    transition: transform var(--transition);
}

.tree-folder-icon {
    color: #E8B04B;
    font-size: 13px;
}

.tree-folder-name {
    font-size: 11px;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tree-folder-body {
    padding-left: 10px;
}

.tree-file {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px 5px 20px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text);
    border-radius: var(--radius);
    margin: 1px 4px;
    transition: background var(--transition), color var(--transition);
    position: relative;
}

.tree-file:hover {
    background: rgba(255, 255, 255, 0.05);
}

.tree-file.active {
    background: var(--blue-dim);
    color: var(--text-bright);
}

.tree-file.active::after {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 2px;
    background: var(--blue);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(31, 81, 255, 0.7);
}

.tree-filename {
    font-size: 13px;
}

/* File type dots */
.file-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot-md {
    background: #7EC8FC;
    box-shadow: 0 0 5px rgba(126, 200, 252, 0.6);
}

.dot-py {
    background: #4EC9B0;
    box-shadow: 0 0 5px rgba(78, 201, 176, 0.6);
}

.dot-json {
    background: #E8B04B;
    box-shadow: 0 0 5px rgba(232, 176, 75, 0.6);
}

.dot-yaml {
    background: #FF79C6;
    box-shadow: 0 0 5px rgba(255, 121, 198, 0.6);
}

.dot-ts {
    background: #1F51FF;
    box-shadow: 0 0 5px rgba(31, 81, 255, 0.8);
}

.dot-sh {
    background: #39FF14;
    box-shadow: 0 0 5px rgba(57, 255, 20, 0.7);
}

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

.search-input {
    width: 100%;
    background: var(--ide-bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 6px 10px;
    color: var(--text-bright);
    font-family: var(--font);
    font-size: 12px;
    outline: none;
}

.search-input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 8px rgba(31, 81, 255, 0.3);
}

.search-results {
    padding: 4px 12px;
    overflow-y: auto;
}

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

.search-result-item {
    padding: 6px 8px;
    border-radius: var(--radius);
    cursor: pointer;
    margin-bottom: 2px;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.sr-file {
    font-size: 11px;
    color: var(--text-muted);
}

.sr-match {
    font-size: 12px;
    color: var(--text-bright);
}

.sr-match mark {
    background: rgba(57, 255, 20, 0.3);
    color: var(--green);
    border-radius: 2px;
}

/* ============================================================
   MAIN EDITOR AREA
   ============================================================ */
.ide-main {
    grid-area: main;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--ide-bg);
}

/* ===== TAB BAR ===== */
.ide-tabbar {
    height: var(--tabbar-h);
    background: var(--ide-tabbar);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-end;
    overflow-x: auto;
    overflow-y: hidden;
    flex-shrink: 0;
}

.ide-tabbar::-webkit-scrollbar {
    height: 2px;
}

.ide-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    height: 35px;
    background: var(--ide-bg2);
    border-right: 1px solid var(--border);
    border-top: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    font-size: 12px;
    color: var(--text-muted);
    transition: background var(--transition), color var(--transition);
    position: relative;
    flex-shrink: 0;
    user-select: none;
}

.ide-tab:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
}

.ide-tab.active {
    background: var(--ide-bg);
    color: var(--text-bright);
    border-top: 1px solid var(--blue);
}

.ide-tab.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--blue);
    box-shadow: 0 0 10px rgba(31, 81, 255, 0.8);
}

.tab-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 3px;
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0;
    transition: opacity var(--transition), background var(--transition), color var(--transition);
    border: none;
    background: none;
    padding: 0;
}

.ide-tab:hover .tab-close,
.ide-tab.active .tab-close {
    opacity: 1;
}

.tab-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #FF5F57;
}

.tab-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ===== BREADCRUMBS ===== */
.ide-breadcrumbs {
    height: var(--breadcrumb-h);
    background: var(--ide-bg);
    border-bottom: 1px solid rgba(31, 81, 255, 0.08);
    display: flex;
    align-items: center;
    padding: 0 14px;
    gap: 6px;
    flex-shrink: 0;
}

.bc-item {
    font-size: 12px;
    color: var(--text-muted);
}

.bc-active {
    color: var(--text);
}

.bc-sep {
    font-size: 9px;
    color: var(--text-dim);
}

/* ===== EDITOR WRAPPER ===== */
.editor-wrapper {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
}

/* Line number gutter */
.editor-gutter {
    width: 52px;
    padding: 14px 0;
    background: var(--ide-gutter);
    text-align: right;
    font-size: 12px;
    line-height: 1.65;
    color: var(--text-dim);
    overflow: hidden;
    flex-shrink: 0;
    border-right: 1px solid rgba(31, 81, 255, 0.06);
    user-select: none;
}

.gutter-line {
    padding-right: 10px;
    display: block;
}

.gutter-line.hl {
    color: var(--text-muted);
    background: var(--ide-line-hl);
}

/* Code area */
.editor-code {
    flex: 1;
    padding: 14px 20px 40px;
    overflow: auto;
    font-size: 13px;
    line-height: 1.65;
    white-space: pre;
    tab-size: 2;
    outline: none;
    color: var(--text);
    position: relative;
}

.editor-code .active-line {
    background: var(--ide-line-hl);
    margin: 0 -20px;
    padding: 0 20px;
}

/* Minimap (decorative right panel) */
.editor-minimap {
    width: 80px;
    background: rgba(10, 10, 26, 0.8);
    border-left: 1px solid rgba(31, 81, 255, 0.06);
    overflow: hidden;
    flex-shrink: 0;
    opacity: 0.6;
}

#minimapCanvas {
    width: 100%;
}

/* ===== SYNTAX TOKEN COLORS ===== */
.kw {
    color: var(--syn-kw);
}

.str {
    color: var(--syn-str);
}

.cmt {
    color: var(--syn-cmt);
    font-style: italic;
}

.num {
    color: var(--syn-num);
}

.cls {
    color: var(--syn-cls);
}

.fn {
    color: var(--syn-fn);
}

.prop {
    color: var(--syn-prop);
}

.type {
    color: var(--syn-type);
}

.op {
    color: var(--syn-op);
}

.bool {
    color: var(--syn-bool);
}

.tag {
    color: var(--syn-tag);
    font-weight: 700;
}

.tag2 {
    color: #E8B04B;
    font-weight: 600;
}

.tag3 {
    color: #7EC8FC;
    font-weight: 600;
}

.shbng {
    color: var(--syn-shebang);
}

.bvar {
    color: var(--syn-bash-v);
}

.bkw {
    color: var(--blue);
}

.ykey {
    color: var(--syn-yaml-k);
}

.yval {
    color: var(--text);
}

.ycat {
    color: var(--syn-cls);
}

.ycom {
    color: var(--syn-cmt);
    font-style: italic;
}

.punc {
    color: #5A6575;
}

.mdbold {
    color: var(--text-bright);
    font-weight: 700;
}

.mdcode {
    color: var(--green);
    background: rgba(57, 255, 20, 0.08);
    padding: 0 3px;
    border-radius: 3px;
}

.mdlink {
    color: var(--syn-kw);
    text-decoration: underline;
}

.mdhr {
    color: var(--text-dim);
}

/* ===== RESIZE HANDLE ===== */
.resize-handle {
    height: var(--resize-h);
    background: var(--border);
    cursor: ns-resize;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
    position: relative;
    z-index: 10;
}

.resize-handle:hover,
.resize-handle.dragging {
    background: var(--blue);
    box-shadow: 0 0 8px rgba(31, 81, 255, 0.5);
}

.resize-line {
    width: 40px;
    height: 2px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

/* ============================================================
   TERMINAL PANEL
   ============================================================ */
.terminal-panel {
    background: var(--ide-terminal);
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    height: var(--terminal-h);
    min-height: 60px;
    max-height: 70vh;
    transition: height 0.1s;
}

/* Panel header */
.terminal-panel-header {
    height: 36px;
    background: var(--ide-bg2);
    border-bottom: 1px solid rgba(31, 81, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0 0 6px;
    flex-shrink: 0;
}

.panel-tabs {
    display: flex;
    align-items: center;
}

.panel-tab {
    height: 36px;
    padding: 0 14px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: color var(--transition), border-color var(--transition);
}

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

.panel-tab.active {
    color: var(--text-bright);
    border-bottom-color: var(--blue);
}

.panel-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    padding-right: 8px;
}

.panel-action-btn {
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    border-radius: 4px;
    color: var(--text-muted);
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition), background var(--transition);
}

.panel-action-btn:hover {
    color: var(--text-bright);
    background: rgba(255, 255, 255, 0.07);
}

/* Terminal output scrollable area */
.terminal-output {
    flex: 1;
    overflow-y: auto;
    padding: 8px 16px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Terminal line types */
.t-line {
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
}

.t-cmd-line {
    color: var(--text-bright);
}

.t-out-line {
    color: var(--text);
}

.t-err-line {
    color: #FF5F57;
}

.t-ok-line {
    color: var(--green);
    text-shadow: var(--green-glow);
}

.t-info-line {
    color: var(--syn-kw);
}

.t-muted-line {
    color: var(--text-muted);
}

.t-ascii-line {
    color: var(--blue);
    font-size: 11px;
    line-height: 1.3;
}

/* Terminal input row */
.terminal-inputline {
    display: flex;
    align-items: center;
    padding: 6px 16px 10px;
    flex-shrink: 0;
    position: relative;
}

.term-prompt-text {
    display: flex;
    align-items: center;
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 13px;
}

.tp-user {
    color: var(--green);
    text-shadow: var(--green-glow);
}

.tp-at {
    color: var(--text-muted);
}

.tp-host {
    color: var(--syn-kw);
}

.tp-colon {
    color: var(--text-muted);
}

.tp-path {
    color: var(--blue);
    text-shadow: 0 0 6px rgba(31, 81, 255, 0.5);
}

.tp-dollar {
    color: var(--text-bright);
    margin-left: 4px;
    margin-right: 6px;
}

.term-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-bright);
    font-family: var(--font);
    font-size: 13px;
    caret-color: var(--green);
}

.term-input::selection {
    background: var(--blue-dim);
}

/* Prompt timestamp prefix */
.t-prompt-prefix {
    color: var(--green);
    text-shadow: var(--green-glow);
    margin-right: 4px;
}

/* ============================================================
   STATUS BAR
   ============================================================ */
.ide-statusbar {
    grid-area: statusbar;
    height: var(--statusbar-h);
    background: var(--ide-statusbar);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    font-size: 11px;
    box-shadow: 0 -2px 20px rgba(31, 81, 255, 0.3);
}

.status-left,
.status-right {
    display: flex;
    align-items: center;
    gap: 0;
}

.status-item {
    padding: 0 10px;
    height: var(--statusbar-h);
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgba(255, 255, 255, 0.85);
    transition: background var(--transition);
    white-space: nowrap;
    cursor: default;
}

.status-item:hover {
    background: rgba(255, 255, 255, 0.12);
}

.status-git {
    background: rgba(0, 0, 0, 0.2);
}

.status-ok {
    background: rgba(0, 0, 0, 0.15);
}

.status-name {
    border-left: 1px solid rgba(255, 255, 255, 0.15);
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(4, 4, 18, 0.7);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.15s ease;
}

.modal-overlay.open {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-window {
    background: var(--ide-bg2);
    border: 1px solid var(--border-hard);
    border-radius: 8px;
    width: 90vw;
    max-width: 1000px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--blue-glow), 0 30px 80px rgba(0, 0, 0, 0.8);
    animation: slideUp 0.2s ease;
    overflow: hidden;
}

.modal-titlebar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--ide-titlebar);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.modal-win-controls {
    display: flex;
    gap: 7px;
}

.modal-title {
    font-size: 12px;
    color: var(--text-muted);
    flex: 1;
    text-align: center;
    margin-left: -80px;
}

.modal-header-actions {
    margin-left: auto;
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color var(--transition), background var(--transition);
}

.modal-close-btn:hover {
    color: #FF5F57;
    background: rgba(255, 95, 87, 0.1);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* ===== PROJECTS GRID IN MODAL ===== */
.modal-output-header {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-output-header span {
    color: var(--green);
}

.projects-output-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.proj-output-card {
    background: var(--ide-bg3);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 14px;
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
    cursor: default;
}

.proj-output-card:hover {
    border-color: var(--green);
    box-shadow: 0 0 16px rgba(57, 255, 20, 0.12);
    transform: translateY(-2px);
}

.poc-id {
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.poc-name {
    font-size: 13px;
    color: var(--text-bright);
    font-weight: 600;
    margin-bottom: 6px;
}

.poc-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 10px;
}

.poc-impact {
    font-size: 11px;
    color: var(--green);
    margin-bottom: 8px;
    text-shadow: var(--green-glow);
}

.poc-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.poc-tag {
    background: rgba(31, 81, 255, 0.12);
    color: var(--blue);
    border: 1px solid rgba(31, 81, 255, 0.3);
    padding: 2px 7px;
    border-radius: 3px;
    font-size: 10px;
}

.poc-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--syn-kw);
    margin-top: 8px;
    transition: color var(--transition);
}

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

/* Articles output */
.articles-output-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.art-output-card {
    background: var(--ide-bg3);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 14px 18px;
    transition: border-color var(--transition);
    cursor: pointer;
}

.art-output-card:hover {
    border-color: var(--blue);
}

.art-tag {
    display: inline-block;
    background: var(--blue-dim);
    color: var(--blue);
    border: 1px solid rgba(31, 81, 255, 0.3);
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 10px;
    margin-bottom: 8px;
}

.art-title {
    font-size: 13px;
    color: var(--text-bright);
    font-weight: 600;
    margin-bottom: 6px;
}

.art-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.55;
}

.art-read {
    font-size: 11px;
    color: var(--green);
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ============================================================
   STACK MODAL — NEON BADGES
   ============================================================ */
.stack-output {
    display: flex;
    flex-direction: column;
    gap: 20px;
}


.stack-cat-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--cat-color, var(--text-bright));
    margin: 0 0 10px 0;
    font-family: var(--font);
    letter-spacing: 0.3px;
}

.stack-cat-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.stack-cat-count {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 400;
    margin-left: auto;
    background: var(--ide-bg3);
    padding: 1px 7px;
    border-radius: 8px;
}

.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
}

.stack-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 8px;
    border-radius: 8px;
    background: var(--ide-bg3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: default;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.stack-badge::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    border: 1px solid var(--badge-color, var(--accent));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.stack-badge:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-2px);
    box-shadow: 0 0 16px color-mix(in srgb, var(--badge-color) 30%, transparent),
        0 4px 12px rgba(0, 0, 0, 0.3);
}

.stack-badge:hover::before {
    opacity: 1;
}

.stack-badge-icon {
    font-size: 22px;
    color: var(--badge-color, var(--accent));
    transition: color 0.25s, text-shadow 0.25s;
}

.stack-badge:hover .stack-badge-icon {
    text-shadow: 0 0 10px var(--badge-color);
}

.stack-badge-name {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
    letter-spacing: 0.2px;
}

.stack-badge:hover .stack-badge-name {
    color: var(--text-bright);
}

@media (max-width: 768px) {
    .stack-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 6px;
    }

    .stack-badge {
        padding: 10px 6px;
    }

    .stack-badge-icon {
        font-size: 18px;
    }

    .stack-badge-name {
        font-size: 9px;
    }
}

/* ============================================================
   ABOUT MODAL — PROFILE HERO
   ============================================================ */
.about-output {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.about-hero {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px;
    background: linear-gradient(135deg, rgba(31, 81, 255, 0.08), rgba(57, 255, 20, 0.04));
    border: 1px solid rgba(31, 81, 255, 0.2);
    border-radius: 10px;
    animation: aboutSlideUp 0.4s ease both;
}

@keyframes aboutSlideUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.about-avatar {
    position: relative;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}

.about-avatar-text {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #1F51FF, #39FF14);
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    font-family: var(--font);
}

.about-avatar-ring {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: #39FF14;
    border-right-color: #1F51FF;
    animation: aboutRingSpin 3s linear infinite;
}

@keyframes aboutRingSpin {
    to {
        transform: rotate(360deg);
    }
}

.about-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-bright);
    margin: 0;
    font-family: var(--font);
}

.about-role,
.about-loc {
    font-size: 12px;
    color: var(--text-muted);
    margin: 3px 0 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.about-role i {
    color: var(--blue);
}

.about-loc i {
    color: var(--green);
}

/* Stats row */
.about-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    animation: aboutSlideUp 0.5s ease both;
    animation-delay: 0.1s;
}

.about-stat {
    text-align: center;
    padding: 12px 6px;
    background: var(--ide-bg3);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.about-stat-num {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
    font-family: var(--font);
}

.about-stat-label {
    display: block;
    font-size: 9px;
    color: var(--text-muted);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Intern toggle button */
.about-exp-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    padding: 2px 8px;
    font-size: 9px;
    font-family: var(--font);
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.about-exp-toggle:hover {
    border-color: var(--blue);
    color: var(--text-bright);
}

.about-exp-toggle.active {
    background: rgba(31, 81, 255, 0.15);
    border-color: var(--blue);
    color: var(--blue);
}

/* Focus areas */
.about-section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-bright);
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font);
}

.about-section-title i {
    color: var(--blue);
    font-size: 12px;
}

.about-focus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 6px;
}

.about-focus-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--ide-bg3);
    border-radius: 6px;
    font-size: 11px;
    color: var(--text-muted);
    border: 1px solid transparent;
    transition: all 0.2s;
}

.about-focus-item:hover {
    border-color: var(--blue);
    color: var(--text-bright);
}

.about-focus-item i {
    color: var(--green);
    font-size: 12px;
    width: 16px;
    text-align: center;
}

/* Education */
.about-edu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.about-edu-card {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 14px;
    background: var(--ide-bg3);
    border-radius: 6px;
    border-left: 3px solid var(--blue);
}

.about-edu-degree {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-bright);
}

.about-edu-school {
    font-size: 11px;
    color: var(--text-muted);
}

.about-edu-year {
    font-size: 10px;
    color: var(--accent);
}

/* Contact links */
.about-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    animation: aboutSlideUp 0.5s ease both;
    animation-delay: 0.25s;
}

.about-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-bright);
    background: var(--ide-bg3);
    border: 1px solid var(--border);
    transition: all 0.2s;
    text-decoration: none;
}

.about-link-btn:hover {
    border-color: var(--accent);
    background: rgba(31, 81, 255, 0.1);
    box-shadow: 0 0 12px rgba(31, 81, 255, 0.2);
}

@media (max-width: 768px) {
    .about-hero {
        flex-direction: column;
        text-align: center;
    }

    .about-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-focus-grid {
        grid-template-columns: 1fr;
    }

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

/* ============================================================
   EXPERIENCE MODAL — TIMELINE
   ============================================================ */
.exp-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
}

.exp-card {
    display: flex;
    gap: 16px;
    opacity: 0;
    animation: expSlideIn 0.45s ease forwards;
}

@keyframes expSlideIn {
    from {
        opacity: 0;
        transform: translateX(-16px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.exp-card-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 20px;
}

.exp-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--text-muted);
    background: var(--ide-bg);
    flex-shrink: 0;
    z-index: 1;
}

.exp-dot.current {
    border-color: #39FF14;
    background: rgba(57, 255, 20, 0.2);
    box-shadow: 0 0 8px rgba(57, 255, 20, 0.4);
}

.exp-line {
    width: 2px;
    flex: 1;
    background: var(--border);
    min-height: 20px;
}

.exp-card-body {
    flex: 1;
    padding: 0 0 24px;
}

.exp-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.exp-role {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-bright);
    margin: 0;
    font-family: var(--font);
}

.exp-company,
.exp-location {
    font-size: 11px;
    color: var(--text-muted);
    margin: 2px 0 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.exp-company i {
    color: var(--blue);
    font-size: 10px;
}

.exp-location i {
    color: var(--green);
    font-size: 10px;
}

.exp-period {
    font-size: 10px;
    padding: 3px 10px;
    border-radius: 10px;
    white-space: nowrap;
    font-weight: 500;
    flex-shrink: 0;
    background: var(--ide-bg3);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.exp-period.current {
    background: rgba(57, 255, 20, 0.1);
    color: #39FF14;
    border-color: rgba(57, 255, 20, 0.3);
}

.exp-highlights {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.exp-highlights li {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.5;
    padding-left: 14px;
    position: relative;
}

.exp-highlights li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent);
}

@media (max-width: 768px) {
    .exp-card-header {
        flex-direction: column;
    }

    .exp-period {
        align-self: flex-start;
    }
}

/* ============================================================
   CONTACT MODAL
   ============================================================ */
.modal-contact-window {
    max-width: 750px;
}

.contact-modal-body {
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* Script animation output terminal */
.contact-script-output {
    background: var(--ide-terminal);
    padding: 14px 18px;
    font-size: 12px;
    line-height: 1.7;
    min-height: 80px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

/* Contact form area (shown after script animation) */
.contact-form-area {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 0;
    flex: 1;
    overflow: auto;
}

.contact-left-info {
    padding: 18px 20px;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--ide-bg3);
}

.contact-cmd-line {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.contact-channel {
    display: flex;
}

.channel-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-size: 12px;
    padding: 8px 10px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--ide-bg2);
    width: 100%;
    transition: border-color var(--transition), color var(--transition);
}

.channel-link i {
    color: var(--blue);
    font-size: 13px;
}

.channel-link:hover {
    border-color: var(--green);
    color: var(--green);
}

.channel-link:hover i {
    color: var(--green);
}

.contact-form-container {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ide-contact-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ide-form-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ide-label {
    font-size: 11px;
    color: var(--syn-cmt);
    display: flex;
    align-items: center;
    gap: 5px;
}

.ide-label .tp-dollar {
    color: var(--green);
    font-size: 11px;
}

.ide-contact-form input,
.ide-contact-form textarea {
    background: var(--ide-bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 7px 10px;
    color: var(--str);
    color: var(--syn-str);
    font-family: var(--font);
    font-size: 12px;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
    resize: none;
}

.ide-contact-form input::placeholder,
.ide-contact-form textarea::placeholder {
    color: var(--text-muted);
}

.ide-contact-form input:focus,
.ide-contact-form textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 10px rgba(31, 81, 255, 0.25);
}

.ide-form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}

.ide-submit-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-family: var(--font);
    font-size: 12px;
    cursor: pointer;
    box-shadow: 0 0 14px rgba(31, 81, 255, 0.4);
    transition: background var(--transition), box-shadow var(--transition);
}

.ide-submit-btn:hover {
    background: #3060ff;
    box-shadow: 0 0 24px rgba(31, 81, 255, 0.7);
}

.ide-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-status-msg {
    font-size: 11px;
}

.form-status-msg.ok {
    color: var(--green);
}

.form-status-msg.err {
    color: #FF5F57;
}

/* ============================================================
   LIGHT THEME
   ============================================================ */
.light-theme {
    --ide-bg: #F5F5F5;
    --ide-bg2: #EAEAEF;
    --ide-bg3: #E0E0E8;
    --ide-sidebar: #E8E8F0;
    --ide-titlebar: #DDDDEA;
    --ide-statusbar: #1F51FF;
    --ide-tabbar: #EAEAEF;
    --ide-terminal: #E2E2EA;
    --ide-line-hl: rgba(31, 81, 255, 0.06);
    --ide-gutter: #E5E5ED;
    --text: #383A42;
    --text-bright: #1A1A2E;
    --text-muted: #9A9AB0;
    --text-dim: #B0B0C0;
    --border: rgba(31, 81, 255, 0.15);
    --border-hard: rgba(31, 81, 255, 0.3);
    --blue-dim: rgba(31, 81, 255, 0.1);
    --green: #16A34A;
    --green-dim: rgba(22, 163, 74, 0.1);
    --green-glow: 0 0 6px rgba(22, 163, 74, 0.3);
    --syn-kw: #0550AE;
    --syn-str: #16A34A;
    --syn-cmt: #8B8FA3;
    --syn-num: #6F42C1;
    --syn-cls: #C41E3A;
    --syn-fn: #0969DA;
    --syn-prop: #953800;
    --syn-type: #C41E3A;
    --syn-op: #383A42;
    --syn-bool: #0550AE;
    --syn-tag: #C41E3A;
    --syn-yaml-k: #953800;
    --syn-bash-v: #0969DA;
    --syn-bash-k: #1F51FF;
    --syn-shebang: #16A34A;
}

.light-theme ::-webkit-scrollbar-thumb {
    background: rgba(31, 81, 255, 0.2);
}

.light-theme ::-webkit-scrollbar-thumb:hover {
    background: rgba(31, 81, 255, 0.4);
}

.light-theme .t-menu:hover {
    background: rgba(0, 0, 0, 0.06);
}

.light-theme .activity-btn:hover {
    background: rgba(0, 0, 0, 0.06);
}

.light-theme .tree-file:hover {
    background: rgba(0, 0, 0, 0.04);
}

.light-theme .ide-tab:hover {
    background: rgba(0, 0, 0, 0.04);
}

.light-theme .editor-minimap {
    background: rgba(240, 240, 250, 0.8);
}

.light-theme .tp-user {
    color: var(--green);
    text-shadow: none;
}

.light-theme .tp-path {
    text-shadow: none;
}

.light-theme .t-ok-line {
    text-shadow: none;
}

.light-theme .wc-close {
    background: #FF5F57;
}

.light-theme .wc-min {
    background: #FEBC2E;
}

.light-theme .wc-max {
    background: #28C840;
}

/* ============================================================
   SETTINGS PANEL
   ============================================================ */
.settings-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(4, 4, 18, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
}

.settings-overlay.open {
    display: flex;
}

.settings-panel {
    background: var(--ide-bg2);
    border: 1px solid var(--border-hard);
    border-radius: 8px;
    width: 380px;
    max-width: 90vw;
    box-shadow: var(--blue-glow), 0 20px 60px rgba(0, 0, 0, 0.6);
    animation: slideUp 0.2s ease;
    overflow: hidden;
}

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

.settings-title {
    font-size: 13px;
    color: var(--text-bright);
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-title i {
    color: var(--text-muted);
}

.settings-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color var(--transition), background var(--transition);
}

.settings-close:hover {
    color: #FF5F57;
    background: rgba(255, 95, 87, 0.1);
}

.settings-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-label {
    font-size: 12px;
    color: var(--text-bright);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.font-size-val {
    color: var(--green);
    font-weight: 400;
    font-size: 11px;
    background: var(--green-dim);
    padding: 1px 8px;
    border-radius: 3px;
}

/* Theme toggle switch */
.theme-toggle-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-label-text {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 22px;
    display: inline-block;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--ide-bg3);
    border: 1px solid var(--border);
    border-radius: 22px;
    cursor: pointer;
    transition: background 0.3s, border-color 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 3px;
    width: 14px;
    height: 14px;
    background: var(--blue);
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 0 6px rgba(31, 81, 255, 0.5);
}

.toggle-switch input:checked+.toggle-slider::before {
    transform: translateX(22px);
    background: #E8B04B;
    box-shadow: 0 0 6px rgba(232, 176, 75, 0.5);
}

/* Font size slider */
.font-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: var(--ide-bg3);
    border-radius: 4px;
    outline: none;
    border: none;
}

.font-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--blue);
    cursor: pointer;
    box-shadow: 0 0 8px rgba(31, 81, 255, 0.5);
    border: 2px solid var(--ide-bg);
}

.font-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--blue);
    cursor: pointer;
    box-shadow: 0 0 8px rgba(31, 81, 255, 0.5);
    border: 2px solid var(--ide-bg);
}

.slider-marks {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-muted);
    padding: 0 2px;
}

/* Shortcuts */
.shortcut-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.shortcut-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 8px;
    border-radius: 4px;
    background: var(--ide-bg);
}

.sc-key {
    font-size: 11px;
    color: var(--text-bright);
    background: var(--ide-bg3);
    padding: 2px 8px;
    border-radius: 3px;
    border: 1px solid var(--border);
}

.sc-desc {
    font-size: 11px;
    color: var(--text-muted);
}

/* ============================================================
   TERMINAL COLLAPSED STATE (all screens)
   ============================================================ */
.terminal-panel.collapsed {
    height: 36px !important;
    min-height: 36px !important;
    overflow: hidden;
}

.terminal-panel.collapsed .terminal-output,
.terminal-panel.collapsed .terminal-inputline {
    display: none;
}

/* ============================================================
   MOBILE HAMBURGER (hidden on desktop)
   ============================================================ */
.mobile-hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

.mobile-hamburger:hover {
    background: var(--sidebar-bg);
    color: var(--accent);
}

/* ============================================================
   RESPONSIVE IDE — MOBILE (≤768px)
   ============================================================ */
@media (max-width: 768px) {

    /* Show hamburger, hide desktop-only items */
    .mobile-hamburger {
        display: inline-flex;
    }

    .win-controls {
        display: none;
    }

    .title-menus {
        display: none;
    }

    .title-user {
        display: none;
    }

    .title-center {
        font-size: 12px;
    }

    /* IDE grid → single column stack */
    .ide {
        grid-template-columns: 1fr;
        grid-template-rows: 32px 1fr 22px;
        grid-template-areas:
            "titlebar"
            "main"
            "statusbar";
    }

    /* Activity bar → horizontal strip inside sidebar drawer */
    .ide-activitybar {
        position: fixed;
        top: 32px;
        left: 0;
        width: 75vw;
        max-width: 280px;
        height: auto;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 2px;
        padding: 8px 4px;
        z-index: 710;
        border-top: 1px solid var(--border);
        border-right: 1px solid var(--border);
        background: var(--titlebar-bg);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .ide-activitybar.mobile-visible {
        transform: translateX(0);
    }

    /* Sidebar sits below activity bar on mobile */
    .ide-sidebar {
        top: calc(32px + 52px) !important;
        height: calc(100vh - 32px - 52px - 22px) !important;
    }

    .activity-btn {
        font-size: 16px;
        padding: 6px 10px;
    }

    .activity-spacer {
        display: none;
    }

    /* Sidebar → slide-in overlay drawer */
    .ide-sidebar {
        position: fixed;
        top: 32px;
        left: 0;
        width: 75vw;
        max-width: 280px;
        height: calc(100vh - 32px - 22px);
        z-index: 700;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
    }

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

    /* Sidebar backdrop */
    .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 699;
    }

    .sidebar-backdrop.active {
        display: block;
    }

    /* Main area fills screen */
    .ide-main {
        grid-area: main;
        overflow: hidden;
    }

    /* Tab bar — horizontal scroll */
    .ide-tabbar {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .ide-tabbar::-webkit-scrollbar {
        display: none;
    }

    .tab {
        min-width: auto;
        white-space: nowrap;
        font-size: 11px;
        padding: 0 10px;
    }

    /* Breadcrumbs */
    .ide-breadcrumbs {
        font-size: 10px;
        padding: 2px 10px;
    }

    /* Editor */
    .editor-wrapper {
        font-size: 12px;
    }

    .editor-gutter {
        min-width: 30px;
        font-size: 10px;
    }

    .editor-code {
        padding: 4px 8px;
    }

    .editor-minimap {
        display: none;
    }

    /* Terminal — starts showing header, expandable via tap */
    .terminal-panel {
        min-height: 36px;
        max-height: 60vh;
        transition: height 0.3s ease;
    }

    .terminal-panel.mobile-expanded {
        height: 45vh !important;
    }

    .terminal-panel-header {
        cursor: pointer;
    }

    .terminal-output {
        font-size: 11px;
    }

    .term-input {
        font-size: 12px;
    }

    .term-prompt-text {
        font-size: 11px;
    }

    /* Resize handle hidden on mobile (use tap to expand) */
    .resize-handle {
        display: none;
    }

    /* Status bar */
    .ide-statusbar {
        font-size: 10px;
        padding: 0 6px;
    }

    .status-item {
        padding: 0 4px;
    }

    /* Modals */
    .modal-window {
        width: 95vw;
        max-width: 95vw;
        max-height: 85vh;
    }

    .modal-contact-window {
        width: 95vw;
        max-width: 95vw;
    }

    .contact-form-area {
        grid-template-columns: 1fr !important;
    }

    .projects-output-grid {
        grid-template-columns: 1fr !important;
    }

    /* Settings panel responsive */
    .settings-panel {
        width: 90vw;
        max-width: 320px;
    }
}

/* Even smaller screens */
@media (max-width: 480px) {
    .title-center {
        font-size: 11px;
    }

    .ide-sidebar {
        width: 85vw;
    }

    .tab {
        font-size: 10px;
        padding: 0 8px;
    }
}

/* ============================================================
   ONBOARDING HINTS OVERLAY
   ============================================================ */
.onboarding-overlay {
    position: fixed;
    inset: 0;
    z-index: 9500;
    pointer-events: all;
    cursor: pointer;
    background: rgba(5, 5, 20, 0.75);
    opacity: 0;
    animation: obFadeIn 0.6s ease forwards;
}

.onboarding-overlay.ob-fade-out {
    animation: obFadeOut 0.6s ease forwards;
}

.onboarding-overlay.ob-hidden {
    display: none;
}

@keyframes obFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes obFadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

.ob-hint {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-family: var(--font);
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    background: rgba(10, 15, 40, 0.85);
    border: 1px solid rgba(31, 81, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 0 20px rgba(31, 81, 255, 0.5), 0 4px 16px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    opacity: 0;
    transform: translateY(6px);
    animation: obHintIn 0.5s ease forwards;
    pointer-events: none;
}

.ob-hint i {
    color: #39FF14;
    font-size: 13px;
}

/* Staggered entrance */
.ob-hint-explorer {
    top: 80px;
    left: 60px;
    animation-delay: 0.3s;
}

.ob-hint-search {
    top: 130px;
    left: 60px;
    animation-delay: 0.5s;
}

.ob-hint-settings {
    bottom: 80px;
    left: 10px;
    animation-delay: 0.7s;
}

.ob-hint-terminal {
    bottom: 200px;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    animation-delay: 0.9s;
}

.ob-hint-github {
    top: 180px;
    left: 60px;
    animation-delay: 1.1s;
}

.ob-hint-shortcuts {
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    animation-delay: 1.3s;
}

.ob-hint kbd {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    font-family: var(--font);
    font-size: 11px;
}

@keyframes obHintIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ob-dismiss {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.5px;
    opacity: 0;
    animation: obHintIn 0.5s ease 1.5s forwards;
    pointer-events: none;
}

/* Mobile hint positions */
@media (max-width: 768px) {
    .ob-hint-explorer {
        top: 50px;
        left: 20px;
    }

    .ob-hint-search {
        top: 50px;
        right: 20px;
        left: auto;
    }

    .ob-hint-settings {
        bottom: 60px;
        left: 20px;
    }

    .ob-hint-terminal {
        bottom: 100px;
    }

    .ob-hint-github {
        top: 100px;
        left: 20px;
    }

    .ob-hint-shortcuts {
        display: none;
    }
}