/* ============================================
   Portfolio — IDE / Code Editor Theme
   Dark: One Dark Pro · Light: GitHub Light
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
    /* Dark (default) - One Dark Pro */
    --bg-app: #1e2127;
    --bg-titlebar: #21252b;
    --bg-activitybar: #2c313a;
    --bg-sidebar: #21252b;
    --bg-editor: #282c34;
    --bg-tabbar: #21252b;
    --bg-tab-active: #282c34;
    --bg-statusbar: #21252b;
    --bg-elev: #2c313a;
    --bg-elev-hover: #353b45;

    --border: #181a1f;
    --border-soft: #3a3f4b;

    --text-primary: #abb2bf;
    --text-strong: #d7dae0;
    --text-muted: #5c6370;
    --text-comment: #7f848e;

    --accent-blue: #61afef;
    --accent-purple: #c678dd;
    --accent-green: #98c379;
    --accent-yellow: #e5c07b;
    --accent-red: #e06c75;
    --accent-cyan: #56b6c2;

    --selection: rgba(97, 175, 239, 0.2);

    --radius: 6px;
    --transition: 0.18s ease;

    --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
}

[data-theme="light"] {
    /* Light - GitHub Light */
    --bg-app: #ffffff;
    --bg-titlebar: #f6f8fa;
    --bg-activitybar: #f6f8fa;
    --bg-sidebar: #f6f8fa;
    --bg-editor: #ffffff;
    --bg-tabbar: #f6f8fa;
    --bg-tab-active: #ffffff;
    --bg-statusbar: #f6f8fa;
    --bg-elev: #f6f8fa;
    --bg-elev-hover: #eaeef2;

    --border: #d1d9e0;
    --border-soft: #d8dee4;

    --text-primary: #1f2328;
    --text-strong: #0d1117;
    --text-muted: #59636e;
    --text-comment: #6e7781;

    --accent-blue: #0969da;
    --accent-purple: #8250df;
    --accent-green: #1a7f37;
    --accent-yellow: #9a6700;
    --accent-red: #cf222e;
    --accent-cyan: #0550ae;

    --selection: rgba(9, 105, 218, 0.15);
}

/* ---------- Reset ---------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-ui);
    font-size: 14px;
    line-height: 1.6;
    background: var(--bg-app);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    transition: background var(--transition), color var(--transition);
}

a { color: var(--accent-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { max-width: 100%; display: block; }
code, .text-mono, pre { font-family: var(--font-mono); }

::selection { background: var(--selection); }

/* ---------- Accent helpers (used inline) ---------- */
.accent-blue    { color: var(--accent-blue); }
.accent-purple  { color: var(--accent-purple); }
.accent-green   { color: var(--accent-green); }
.accent-yellow  { color: var(--accent-yellow); }
.accent-red     { color: var(--accent-red); }
.accent-cyan    { color: var(--accent-cyan); }
.small-text     { font-size: 0.8rem; }

/* ============================================
   IDE LAYOUT
   ============================================ */
.ide {
    display: grid;
    grid-template-rows: auto 1fr auto;
    height: 100vh;
    width: 100%;
}

/* ---------- TITLE BAR ---------- */
.title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    height: 38px;
    background: var(--bg-titlebar);
    border-bottom: 1px solid var(--border);
    user-select: none;
}

.window-controls {
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}
.dot-red    { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green  { background: #28c840; }

.title-text {
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}
.title-folder { color: var(--text-muted); }
.title-sep    { margin: 0 0.5rem; color: var(--text-muted); }
.title-file   { color: var(--text-strong); }

.title-actions {
    display: flex;
    gap: 0.25rem;
}

.icon-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1;
    transition: background var(--transition);
    text-decoration: none;
}

.icon-btn:hover {
    background: var(--bg-elev-hover);
    text-decoration: none;
}

#sidebarToggle {
    display: none;
}

@media (max-width: 900px) {
    #sidebarToggle {
        display: flex;
    }
}

/* ---------- WORKBENCH ---------- */
.workbench {
    display: grid;
    grid-template-columns: 48px 240px 1fr;
    overflow: hidden;
    min-height: 0;
}

/* ---------- ACTIVITY BAR ---------- */
.activity-bar {
    background: var(--bg-activitybar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 0;
    gap: 0.25rem;
}

.activity-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border-radius: 4px;
    border-left: 2px solid transparent;
    margin-left: -2px;
    transition: var(--transition);
    text-decoration: none;
}

.activity-btn:hover { color: var(--text-strong); }
.activity-btn.active {
    color: var(--text-strong);
    border-left-color: var(--accent-blue);
}

.activity-spacer { flex: 1; }

/* ---------- SIDEBAR ---------- */
.sidebar {
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    padding-bottom: 1rem;
    font-size: 13px;
}

.sidebar-header {
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 0.75rem 1rem 0.4rem;
    font-weight: 600;
}

.folder {
    padding: 0 0.5rem;
}

.folder-name {
    padding: 0.25rem 0.5rem;
    color: var(--text-strong);
    font-weight: 500;
    cursor: pointer;
}

.file-list, .outline-list {
    list-style: none;
    margin: 0.25rem 0 0;
    padding-left: 1rem;
}

.file {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-primary);
    transition: background var(--transition);
    white-space: nowrap;
}

.file:hover { background: var(--bg-elev-hover); }
.file.active {
    background: var(--bg-elev-hover);
    color: var(--text-strong);
}

.file-icon {
    width: 22px;
    text-align: center;
    font-size: 11px;
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--accent-blue);
}

.icon-tsx    { color: var(--accent-blue); }
.icon-md     { color: var(--accent-yellow); }
.icon-json   { color: var(--accent-yellow); }
.icon-php    { color: var(--accent-purple); }
.icon-folder { color: var(--accent-cyan); font-size: 13px; }

.sidebar-section {
    margin-top: 1rem;
    border-top: 1px solid var(--border-soft);
    padding-top: 0.25rem;
}

.outline-list li a {
    display: block;
    padding: 0.25rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 4px;
}

.outline-list li a:hover {
    background: var(--bg-elev-hover);
    color: var(--text-strong);
}

/* ---------- EDITOR ---------- */
.editor {
    display: flex;
    flex-direction: column;
    background: var(--bg-editor);
    overflow: hidden;
    min-width: 0;
}

/* TAB BAR */
.tab-bar {
    display: flex;
    background: var(--bg-tabbar);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    scrollbar-width: thin;
}

.tab-bar::-webkit-scrollbar { height: 0; }

.tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-right: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 12.5px;
    white-space: nowrap;
    border-top: 1px solid transparent;
    transition: var(--transition);
}

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

.tab.active {
    background: var(--bg-tab-active);
    color: var(--text-strong);
    border-top-color: var(--accent-blue);
    position: relative;
}

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

/* EDITOR BODY (scrollable content) */
.editor-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    scroll-behavior: smooth;
}

.editor-body::-webkit-scrollbar { width: 12px; }
.editor-body::-webkit-scrollbar-track { background: var(--bg-editor); }
.editor-body::-webkit-scrollbar-thumb {
    background: var(--border-soft);
    border: 3px solid var(--bg-editor);
    border-radius: 6px;
}

/* ---------- STATUS BAR ---------- */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-statusbar);
    border-top: 1px solid var(--border);
    padding: 0 1rem;
    height: 26px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--text-muted);
    user-select: none;
}

.status-left, .status-right {
    display: flex;
    gap: 1rem;
}

.status-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.status-icon {
    font-size: 10px;
}

/* ============================================
   PAGES (sections inside editor)
   ============================================ */
.page {
    max-width: 920px;
    margin: 0 auto;
    padding: 3rem 2.5rem;
    border-bottom: 1px solid var(--border-soft);
}

.page:last-of-type { border-bottom: none; }

.breadcrumb {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.bc-folder { color: var(--accent-cyan); }
.bc-sep    { margin: 0 0.4rem; opacity: 0.5; }
.bc-file   { color: var(--text-strong); }

.page-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-strong);
    margin-bottom: 0.4rem;
    font-family: var(--font-mono);
    letter-spacing: -0.02em;
}

.kicker {
    font-family: var(--font-mono);
    color: var(--accent-green);
    font-size: 12.5px;
    margin-bottom: 0.75rem;
    letter-spacing: 0.05em;
}

.md-meta {
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 12.5px;
    margin-bottom: 2rem;
}

.md-meta code, code {
    background: var(--bg-elev);
    border: 1px solid var(--border-soft);
    padding: 0.1em 0.4em;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--accent-red);
}

/* ============================================
   HERO (index.tsx)
   ============================================ */
.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--text-strong);
    margin-bottom: 1.25rem;
}

.hero-sub {
    font-size: 1.05rem;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}

.hero-description {
    font-size: 1rem;
    color: var(--text-primary);
    max-width: 640px;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.terminal-line {
    font-family: var(--font-mono);
    font-size: 12.5px;
    background: var(--bg-elev);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 0.6rem 1rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
    display: inline-flex;
    gap: 0.5rem;
}

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

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

/* Code block */
.code-block {
    background: var(--bg-elev);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-primary);
    overflow-x: auto;
}

.c-keyword { color: var(--accent-purple); }
.c-var     { color: var(--accent-red); }
.c-prop    { color: var(--accent-blue); }
.c-str     { color: var(--accent-green); }
.c-bool    { color: var(--accent-yellow); }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius);
    font-size: 13.5px;
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid transparent;
    font-family: var(--font-ui);
    cursor: pointer;
}

.btn-primary {
    background: var(--accent-blue);
    color: white;
}
[data-theme="light"] .btn-primary { color: white; }

.btn-primary:hover {
    background: color-mix(in srgb, var(--accent-blue) 85%, white);
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    border-color: var(--border-soft);
    color: var(--text-strong);
}

.btn-outline:hover {
    background: var(--bg-elev-hover);
    border-color: var(--text-muted);
    text-decoration: none;
}

.btn-full { width: 100%; }
.btn-icon { font-size: 11px; }
.btn-sm   { padding: 0.35rem 0.75rem; font-size: 12.5px; }
.btn-danger {
    background: var(--accent-red);
    color: white;
}
.btn-danger:hover {
    background: color-mix(in srgb, var(--accent-red) 85%, black);
    text-decoration: none;
}

/* ============================================
   ABOUT
   ============================================ */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2.5rem;
    align-items: start;
}

.about-text p {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.md-list {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
}

.md-list li {
    padding: 0.35rem 0;
    color: var(--text-primary);
    position: relative;
    padding-left: 1.25rem;
}

.md-list li::before {
    content: '-';
    color: var(--accent-green);
    position: absolute;
    left: 0;
    font-family: var(--font-mono);
}

.about-card {
    background: var(--bg-elev);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.about-card h4 {
    font-family: var(--font-mono);
    color: var(--text-strong);
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.75rem;
}

.kv-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-family: var(--font-mono);
    font-size: 13px;
}

.kv-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.35rem 0;
    border-bottom: 1px dashed var(--border-soft);
}

.kv-list li:last-child { border-bottom: none; }

.kv-key   { color: var(--text-muted); }
.kv-val   { color: var(--text-strong); }

/* ============================================
   SKILLS TABLE
   ============================================ */
.skills-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-elev);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    overflow: hidden;
    font-size: 13.5px;
}

.skills-table th,
.skills-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-soft);
}

.skills-table thead th {
    background: var(--bg-tabbar);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    font-weight: 600;
}

.skills-table tbody tr:last-child td { border-bottom: none; }
.skills-table tbody tr:hover { background: var(--bg-elev-hover); }

.skill-mark {
    display: inline-flex;
    width: 28px;
    height: 22px;
    margin-right: 0.6rem;
    background: var(--bg-elev-hover);
    border: 1px solid var(--border-soft);
    color: var(--accent-blue);
    border-radius: 4px;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    vertical-align: middle;
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: rgba(97, 175, 239, 0.15);
    color: var(--accent-blue);
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-mono);
}

.badge-warning {
    background: rgba(229, 192, 123, 0.18);
    color: var(--accent-yellow);
}

.progress {
    width: 100%;
    height: 8px;
    background: var(--bg-app);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid var(--border-soft);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.num-col {
    text-align: right;
    color: var(--text-strong);
    font-weight: 600;
}

/* ============================================
   FILTER BAR
   ============================================ */
.filter-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius);
    background: var(--bg-elev);
    border: 1px solid var(--border-soft);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 12.5px;
    transition: var(--transition);
}

.filter-btn:hover {
    background: var(--bg-elev-hover);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
}

/* ============================================
   PROJECTS GRID
   ============================================ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.project-card {
    background: var(--bg-elev);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    opacity: 0;
    animation: fadeUp 0.5s forwards;
}

.project-card:hover {
    border-color: var(--accent-blue);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .project-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.project-head {
    background: var(--bg-tabbar);
    border-bottom: 1px solid var(--border-soft);
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--text-muted);
}

.project-filename {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.featured-badge {
    color: var(--accent-yellow);
    font-weight: 600;
}

.project-body {
    padding: 1rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-strong);
    margin-bottom: 0.4rem;
}

.project-description {
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 1rem;
    flex: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 1rem;
}

.tech-tag {
    padding: 0.1rem 0.5rem;
    background: var(--bg-app);
    border: 1px solid var(--border-soft);
    border-radius: 4px;
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--accent-cyan);
}

.project-links {
    display: flex;
    gap: 0.5rem;
}

.project-links a {
    flex: 1;
    text-align: center;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    font-size: 12px;
    font-family: var(--font-mono);
    font-weight: 600;
    border: 1px solid var(--border-soft);
    color: var(--text-primary);
    transition: var(--transition);
}

.project-links a:hover {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
    text-decoration: none;
}

/* ============================================
   BLOG GRID
   ============================================ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.blog-card {
    background: var(--bg-elev);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 1.25rem;
    transition: var(--transition);
    opacity: 0;
    animation: fadeUp 0.5s forwards;
}

.blog-card:hover {
    border-color: var(--accent-purple);
    transform: translateY(-3px);
}

.blog-category {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    background: rgba(198, 120, 221, 0.15);
    color: var(--accent-purple);
    font-size: 11px;
    font-family: var(--font-mono);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.blog-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-strong);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.blog-excerpt {
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--text-muted);
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-soft);
}

.blog-read-more { color: var(--accent-blue); font-weight: 600; }

/* ============================================
   CONTACT FORM
   ============================================ */
.contact-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
}

.contact-info {
    background: var(--bg-elev);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.contact-info h4 {
    font-family: var(--font-mono);
    color: var(--text-strong);
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.75rem;
}

.contact-form {
    background: var(--bg-elev);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.form-comment {
    font-family: var(--font-mono);
    color: var(--text-comment);
    font-size: 12.5px;
    margin-bottom: 1rem;
}

.form-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-strong);
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.6rem 0.85rem;
    background: var(--bg-app);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    color: var(--text-strong);
    font-family: var(--font-mono);
    font-size: 13px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px var(--selection);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group.has-error input,
.form-group.has-error textarea {
    border-color: var(--accent-red);
}

.error-msg {
    display: block;
    color: var(--accent-red);
    font-family: var(--font-mono);
    font-size: 11.5px;
    margin-top: 0.3rem;
    min-height: 1em;
}

.form-response {
    margin-top: 0.75rem;
    padding: 0.6rem 0.9rem;
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: 12.5px;
    display: none;
}

.form-response.success {
    display: block;
    background: rgba(152, 195, 121, 0.15);
    color: var(--accent-green);
    border: 1px solid rgba(152, 195, 121, 0.4);
}

.form-response.error {
    display: block;
    background: rgba(224, 108, 117, 0.15);
    color: var(--accent-red);
    border: 1px solid rgba(224, 108, 117, 0.4);
}

/* ============================================
   LOADER, FOOTER, MISC
   ============================================ */
.loader {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    font-family: var(--font-mono);
    color: var(--text-comment);
    font-size: 12.5px;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 13px;
}

.page-footer {
    max-width: 920px;
    margin: 0 auto;
    padding: 2rem 2.5rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 12.5px;
    border-top: 1px solid var(--border-soft);
}

.page-footer p { margin-bottom: 0.25rem; }

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 2.5rem;
    right: 1.5rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 100;
}
.back-to-top:hover { text-decoration: none; transform: translateY(-2px); }
.back-to-top.visible { opacity: 1; visibility: visible; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .workbench {
        grid-template-columns: 48px 1fr;
        position: relative;
    }

    .sidebar {
        position: fixed;
        left: 48px;
        top: 38px;
        bottom: 26px;
        width: min(280px, calc(100vw - 48px));
        z-index: 200;
        transform: translateX(-110%);
        transition: transform var(--transition);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
    }
    .sidebar.open {
        transform: translateX(0);
    }

    /* Backdrop overlay when sidebar is open */
    .sidebar-backdrop {
        position: fixed;
        inset: 38px 0 26px 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 150;
        opacity: 0;
        visibility: hidden;
        transition: opacity var(--transition), visibility var(--transition);
    }
    .sidebar-backdrop.visible {
        opacity: 1;
        visibility: visible;
    }

    .page { padding: 2rem 1.25rem; }

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

    .tab-bar { font-size: 11.5px; }
    .tab { padding: 0.5rem 0.75rem; }

    .hero-title { font-size: 1.9rem; }
}

@media (max-width: 600px) {
    .title-text { font-size: 11px; }
    .title-folder { display: none; }
    .title-sep    { display: none; }
    .icon-btn .theme-label { display: none; }

    .status-bar .status-item { font-size: 10.5px; }
    .status-right .status-item:not(#statusFile) { display: none; }

    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-actions .btn { width: 100%; }
}
