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

:root {
    --bg: #0a0e14;
    --bg-light: #111923;
    --green: #00ff9c;
    --green-dim: #00cc7a;
    --blue: #53a7ff;
    --cyan: #39c5cf;
    --yellow: #f5c542;
    --orange: #ff8f40;
    --red: #ff5555;
    --purple: #c792ea;
    --white: #e6e6e6;
    --gray: #6b7f9e;
    --gray-dark: #2d3a4a;
    --font: 'Fira Code', 'Cascadia Code', 'JetBrains Mono', 'Consolas', monospace;
    --status-bg: var(--green-dim);
    --status-text: var(--bg);
}

/* ── Theme: Dracula ────────────────────────────── */
[data-theme="dracula"] {
    --bg: #282a36;
    --bg-light: #343746;
    --green: #50fa7b;
    --green-dim: #3dcc63;
    --blue: #8be9fd;
    --cyan: #8be9fd;
    --yellow: #f1fa8c;
    --orange: #ffb86c;
    --red: #ff5555;
    --purple: #bd93f9;
    --white: #f8f8f2;
    --gray: #6272a4;
    --gray-dark: #44475a;
    --status-bg: var(--purple);
    --status-text: var(--bg);
}

/* ── Theme: Gruvbox ────────────────────────────── */
[data-theme="gruvbox"] {
    --bg: #282828;
    --bg-light: #3c3836;
    --green: #b8bb26;
    --green-dim: #98971a;
    --blue: #83a598;
    --cyan: #8ec07c;
    --yellow: #fabd2f;
    --orange: #fe8019;
    --red: #fb4934;
    --purple: #d3869b;
    --white: #ebdbb2;
    --gray: #928374;
    --gray-dark: #504945;
    --status-bg: var(--yellow);
    --status-text: var(--bg);
}

/* ── Theme: Solarized Dark ─────────────────────── */
[data-theme="solarized"] {
    --bg: #002b36;
    --bg-light: #073642;
    --green: #859900;
    --green-dim: #6d8000;
    --blue: #268bd2;
    --cyan: #2aa198;
    --yellow: #b58900;
    --orange: #cb4b16;
    --red: #dc322f;
    --purple: #6c71c4;
    --white: #93a1a1;
    --gray: #586e75;
    --gray-dark: #073642;
    --status-bg: var(--cyan);
    --status-text: var(--bg);
}

/* ── Theme: Matrix ─────────────────────────────── */
[data-theme="matrix"] {
    --bg: #000000;
    --bg-light: #0a0a0a;
    --green: #00ff41;
    --green-dim: #00cc33;
    --blue: #00ff41;
    --cyan: #00ff41;
    --yellow: #33ff66;
    --orange: #66ff99;
    --red: #00cc33;
    --purple: #00ff41;
    --white: #00ff41;
    --gray: #005500;
    --gray-dark: #002200;
    --status-bg: var(--green);
    --status-text: var(--bg);
}

/* ── Theme: Nord ───────────────────────────────── */
[data-theme="nord"] {
    --bg: #2e3440;
    --bg-light: #3b4252;
    --green: #a3be8c;
    --green-dim: #8fbf7a;
    --blue: #81a1c1;
    --cyan: #88c0d0;
    --yellow: #ebcb8b;
    --orange: #d08770;
    --red: #bf616a;
    --purple: #b48ead;
    --white: #eceff4;
    --gray: #7b88a1;
    --gray-dark: #434c5e;
    --status-bg: var(--cyan);
    --status-text: var(--bg);
}

html {
    font-size: 15px;
    scrollbar-width: none;
}

body {
    background: var(--bg);
    color: var(--white);
    font-family: var(--font);
    min-height: 100vh;
    overflow: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* Smooth theme transitions on colored elements */
.terminal-body,
.title-bar,
.suggestions-bar,
.status-bar,
.project-card,
.autocomplete-dropdown,
.boot-screen {
    transition: background-color 0.4s ease, border-color 0.4s ease, color 0.4s ease;
}

::-webkit-scrollbar { display: none; }


/* ═══════════════════════════════════════════════════
   CRT SCREEN EFFECTS
   ═══════════════════════════════════════════════════ */
.crt-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1000;
}

.crt-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.08) 0px,
        rgba(0, 0, 0, 0.08) 1px,
        transparent 1px,
        transparent 3px
    );
    animation: scanlines 0.1s linear infinite;
}

.crt-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, 0.4) 100%);
}

@keyframes scanlines {
    0% { transform: translateY(0); }
    100% { transform: translateY(3px); }
}


/* ═══════════════════════════════════════════════════
   TERMINAL CONTAINER
   ═══════════════════════════════════════════════════ */
.terminal-window {
    max-width: 960px;
    margin: 20px auto;
    height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 60px rgba(0, 255, 156, 0.08), 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--gray-dark);
}


/* ═══════════════════════════════════════════════════
   TITLE BAR
   ═══════════════════════════════════════════════════ */
.title-bar {
    background: var(--bg-light);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--gray-dark);
    user-select: none;
    flex-shrink: 0;
}

.title-bar-btn {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: none;
    cursor: default;
}

.btn-close { background: #ff5f57; }
.btn-minimize { background: #ffbd2e; }
.btn-maximize { background: #28c940; }

.title-bar-text {
    flex: 1;
    text-align: center;
    color: var(--gray);
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}


/* ═══════════════════════════════════════════════════
   TERMINAL BODY
   ═══════════════════════════════════════════════════ */
.terminal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--bg);
    scroll-behavior: smooth;
}

.terminal-body::-webkit-scrollbar { display: none; }


/* ═══════════════════════════════════════════════════
   OUTPUT STYLING
   ═══════════════════════════════════════════════════ */
.output-line {
    line-height: 1.7;
    white-space: pre-wrap;
    word-wrap: break-word;
    opacity: 0;
    animation: fadeIn 0.15s ease forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

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

.prompt-path {
    color: var(--blue);
    font-weight: 500;
}

.prompt-symbol {
    color: var(--green);
    font-weight: 700;
}

.cmd-text {
    color: var(--white);
}

.ascii-art {
    color: var(--green);
    font-size: 0.65rem;
    line-height: 1.2;
    opacity: 0.9;
}

.section-header {
    color: var(--cyan);
    font-weight: 700;
    font-size: 1rem;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--cyan), transparent);
}


/* ═══════════════════════════════════════════════════
   TEXT UTILITIES
   ═══════════════════════════════════════════════════ */
.highlight { color: var(--green); font-weight: 600; }
.accent    { color: var(--cyan); }
.warn      { color: var(--yellow); }
.error     { color: var(--red); }
.muted     { color: var(--gray); }
.purple    { color: var(--purple); }
.orange    { color: var(--orange); }
.blue      { color: var(--blue); }
.bold      { font-weight: 700; }

.link {
    color: var(--blue);
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
    cursor: pointer;
    transition: color 0.2s;
}

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


/* ═══════════════════════════════════════════════════
   SKILL BARS
   ═══════════════════════════════════════════════════ */
.skill-bar-container {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.skill-bar {
    display: inline-block;
    width: 120px;
    height: 8px;
    background: var(--gray-dark);
    border-radius: 4px;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--green-dim), var(--green));
    transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: 0;
}


/* ═══════════════════════════════════════════════════
   EXPERIENCE TIMELINE
   ═══════════════════════════════════════════════════ */
.timeline-item {
    padding-left: 20px;
    border-left: 2px solid var(--gray-dark);
    margin-left: 8px;
    position: relative;
}

.timeline-item::before {
    content: '●';
    position: absolute;
    left: -7px;
    color: var(--green);
    font-size: 0.7rem;
}


/* ═══════════════════════════════════════════════════
   PROJECT CARDS
   ═══════════════════════════════════════════════════ */
.project-card {
    border: 1px solid var(--gray-dark);
    border-radius: 6px;
    padding: 12px 16px;
    margin: 6px 0;
    background: var(--bg-light);
    transition: border-color 0.3s;
}

.project-card:hover {
    border-color: var(--green-dim);
}

.tag {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 3px;
    font-size: 0.75rem;
    margin: 2px 2px;
    background: rgba(0, 255, 156, 0.1);
    color: var(--green);
    border: 1px solid rgba(0, 255, 156, 0.2);
}


/* ═══════════════════════════════════════════════════
   INPUT LINE
   ═══════════════════════════════════════════════════ */
.input-line {
    display: flex;
    align-items: center;
    margin-top: 4px;
}

.input-line input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--white);
    font-family: var(--font);
    font-size: 1rem;
    outline: none;
    caret-color: var(--green);
}

.input-line input::placeholder {
    color: rgba(107, 127, 158, 0.4);
}

.cursor-blink {
    display: inline-block;
    width: 9px;
    height: 18px;
    background: var(--green);
    animation: blink 1s step-end infinite;
    margin-left: 2px;
    vertical-align: middle;
}

@keyframes blink {
    50% { opacity: 0; }
}


/* ═══════════════════════════════════════════════════
   COMMAND SUGGESTIONS BAR
   ═══════════════════════════════════════════════════ */
.suggestions-bar {
    background: var(--bg-light);
    border-top: 1px solid var(--gray-dark);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.suggestions-bar .hint {
    color: var(--gray);
    font-size: 0.75rem;
    margin-right: 8px;
    white-space: nowrap;
}

.cmd-btn {
    background: rgba(0, 255, 156, 0.06);
    border: 1px solid rgba(0, 255, 156, 0.15);
    color: var(--green);
    padding: 4px 12px;
    border-radius: 4px;
    font-family: var(--font);
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.cmd-btn:hover {
    background: rgba(0, 255, 156, 0.15);
    border-color: var(--green);
    transform: translateY(-1px);
}


/* ═══════════════════════════════════════════════════
   AUTOCOMPLETE DROPDOWN
   ═══════════════════════════════════════════════════ */
.autocomplete-dropdown {
    position: absolute;
    background: var(--bg-light);
    border: 1px solid var(--gray-dark);
    border-radius: 4px;
    padding: 4px 0;
    display: none;
    z-index: 500;
    min-width: 180px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.autocomplete-dropdown .ac-item {
    padding: 4px 12px;
    color: var(--white);
    font-family: var(--font);
    font-size: 0.85rem;
    cursor: pointer;
}

.autocomplete-dropdown .ac-item.selected {
    background: rgba(0, 255, 156, 0.12);
    color: var(--green);
}

.autocomplete-dropdown .ac-item:hover {
    background: rgba(0, 255, 156, 0.08);
}


/* ═══════════════════════════════════════════════════
   MATRIX RAIN (EASTER EGG)
   ═══════════════════════════════════════════════════ */
.matrix-canvas {
    position: fixed;
    inset: 0;
    z-index: 999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s;
}

.matrix-canvas.active {
    opacity: 0.7;
}


/* ═══════════════════════════════════════════════════
   RM -RF / EASTER EGG
   ═══════════════════════════════════════════════════ */
.rm-deleting {
    animation: rmDelete 0.35s ease forwards;
}

@keyframes rmDelete {
    0%   { opacity: 1; transform: scale(1); filter: none; }
    40%  { opacity: 0.6; transform: scaleY(0.7) scaleX(1.05); filter: blur(1px); color: var(--red); }
    100% { opacity: 0; transform: scaleY(0) scaleX(0.3); height: 0; padding: 0; margin: 0; overflow: hidden; }
}

.rm-restoring {
    animation: rmRestore 0.3s ease forwards;
}

@keyframes rmRestore {
    0%   { opacity: 0; transform: scaleY(0); }
    60%  { opacity: 0.8; transform: scaleY(1.03); }
    100% { opacity: 1; transform: scaleY(1); }
}

.rm-overlay {
    position: fixed;
    inset: 0;
    z-index: 1800;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    font-family: var(--font);
    gap: 12px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.rm-overlay.visible {
    opacity: 1;
}

.rm-overlay .rm-msg {
    color: var(--green);
    font-size: 1rem;
    text-align: center;
}

.rm-overlay .rm-spinner {
    color: var(--yellow);
    font-size: 0.85rem;
}


/* ═══════════════════════════════════════════════════
   GLITCH EFFECT (INVALID COMMAND)
   ═══════════════════════════════════════════════════ */
.terminal-window.glitch {
    animation: glitchShake 0.35s ease;
}

.terminal-window.glitch .terminal-body {
    animation: glitchColor 0.35s ease;
}

@keyframes glitchShake {
    0%   { transform: translate(0); }
    10%  { transform: translate(-3px, 1px); }
    20%  { transform: translate(2px, -2px); }
    30%  { transform: translate(-1px, 2px); }
    40%  { transform: translate(3px, -1px); }
    50%  { transform: translate(-2px, -1px); }
    60%  { transform: translate(2px, 1px); }
    70%  { transform: translate(-1px, -2px); }
    80%  { transform: translate(1px, 2px); }
    90%  { transform: translate(-2px, 0); }
    100% { transform: translate(0); }
}

@keyframes glitchColor {
    0%   { filter: none; }
    15%  { filter: hue-rotate(90deg) saturate(2) brightness(1.1); }
    30%  { filter: hue-rotate(-60deg) saturate(1.5); }
    45%  { filter: hue-rotate(180deg) saturate(3) brightness(0.9); }
    55%  { filter: none; }
    70%  { filter: hue-rotate(45deg) saturate(2) brightness(1.15); }
    85%  { filter: hue-rotate(-90deg) saturate(1.8); }
    100% { filter: none; }
}

/* Scanline tear bars that flash during glitch */
.glitch-tear {
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.12);
    z-index: 10;
    pointer-events: none;
    animation: glitchTear 0.35s ease forwards;
}

@keyframes glitchTear {
    0%   { opacity: 1; transform: scaleX(1); }
    50%  { opacity: 0.7; transform: scaleX(1.02) translateX(4px); }
    100% { opacity: 0; transform: scaleX(0.98) translateX(-2px); }
}


/* ═══════════════════════════════════════════════════
   TYPING ANIMATION
   ═══════════════════════════════════════════════════ */
.typing-cmd {
    color: var(--white);
    border-right: 2px solid var(--green);
    animation: blink-border 0.7s step-end infinite;
    display: inline;
}

@keyframes blink-border {
    50% { border-color: transparent; }
}


/* ═══════════════════════════════════════════════════
   STATUS BAR
   ═══════════════════════════════════════════════════ */
.status-bar {
    background: var(--status-bg);
    color: var(--status-text);
    font-size: 0.7rem;
    padding: 2px 16px;
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    flex-shrink: 0;
}


/* ═══════════════════════════════════════════════════
   THEME PICKER
   ═══════════════════════════════════════════════════ */
.theme-toggle {
    position: fixed;
    top: 14px;
    right: 16px;
    z-index: 2001;
    background: var(--bg-light);
    border: 1px solid var(--gray-dark);
    border-radius: 6px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--gray);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    border-color: var(--green);
    color: var(--green);
    transform: rotate(30deg);
}

.theme-panel {
    position: fixed;
    top: 54px;
    right: 16px;
    z-index: 2001;
    background: var(--bg-light);
    border: 1px solid var(--gray-dark);
    border-radius: 8px;
    padding: 10px;
    display: none;
    flex-direction: column;
    gap: 4px;
    min-width: 160px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(-8px) scale(0.95);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.theme-panel.open {
    display: flex;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.theme-panel-title {
    color: var(--gray);
    font-family: var(--font);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 2px 8px 6px;
    border-bottom: 1px solid var(--gray-dark);
    margin-bottom: 2px;
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font);
    font-size: 0.8rem;
    color: var(--white);
    border: none;
    background: none;
    text-align: left;
    transition: background 0.2s;
}

.theme-option:hover {
    background: rgba(255, 255, 255, 0.06);
}

.theme-option.active {
    color: var(--green);
}

.theme-option.active::after {
    content: '✓';
    margin-left: auto;
    color: var(--green);
    font-size: 0.75rem;
}

.theme-swatch {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}

.theme-swatch span {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}


/* ═══════════════════════════════════════════════════
   BOOT SCREEN
   ═══════════════════════════════════════════════════ */
.boot-screen {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 2000;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 40px;
    overflow: hidden;
    transition: opacity 0.4s ease;
}

.boot-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.boot-content {
    font-family: var(--font);
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--gray);
    white-space: pre;
    max-width: 100%;
    overflow: hidden;
}

.boot-content .boot-line {
    opacity: 0;
    animation: bootFadeIn 0.08s ease forwards;
}

@keyframes bootFadeIn {
    to { opacity: 1; }
}

.boot-content .boot-ok {
    color: var(--green);
    font-weight: 600;
}

.boot-content .boot-warn {
    color: var(--yellow);
}

.boot-content .boot-info {
    color: var(--cyan);
}

.boot-content .boot-white {
    color: var(--white);
    font-weight: 600;
}


/* ═══════════════════════════════════════════════════
   CRT POWER-ON FLASH
   ═══════════════════════════════════════════════════ */
.crt-flash {
    position: fixed;
    inset: 0;
    z-index: 1999;
    pointer-events: none;
    opacity: 0;
}

.crt-flash.active {
    animation: crtFlashAnim 0.6s ease-out forwards;
}

@keyframes crtFlashAnim {
    0%   { opacity: 0; background: white; }
    10%  { opacity: 0.9; background: white; }
    20%  { opacity: 0; }
    30%  { opacity: 0.4; background: rgba(0, 255, 156, 0.3); }
    50%  { opacity: 0; }
    100% { opacity: 0; }
}


/* ═══════════════════════════════════════════════════
   TERMINAL OPEN ANIMATION
   ═══════════════════════════════════════════════════ */
.terminal-window {
    /* Starts hidden — JS triggers the animation */
    opacity: 0;
    transform: scaleY(0.005) scaleX(0.4);
    transform-origin: center center;
}

.terminal-window.opening {
    animation: terminalOpen 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.terminal-window.opened {
    opacity: 1;
    transform: scaleY(1) scaleX(1);
}

@keyframes terminalOpen {
    0% {
        opacity: 1;
        transform: scaleY(0.005) scaleX(0.4);
    }
    30% {
        opacity: 1;
        transform: scaleY(0.005) scaleX(0.8);
    }
    50% {
        opacity: 1;
        transform: scaleY(0.4) scaleX(0.9);
    }
    70% {
        opacity: 1;
        transform: scaleY(0.8) scaleX(0.95);
    }
    100% {
        opacity: 1;
        transform: scaleY(1) scaleX(1);
    }
}


/* ═══════════════════════════════════════════════════
   RESPONSIVE — TABLET (≤768px)
   ═══════════════════════════════════════════════════ */
@media (max-width: 768px) {
    html { font-size: 13px; }

    /* Use dvh for mobile browsers with dynamic toolbars */
    .terminal-window {
        margin: 0;
        height: 100vh;
        height: 100dvh;
        border-radius: 0;
        border: none;
        box-shadow: none;
    }

    .terminal-body {
        padding: 12px;
    }

    .ascii-art {
        font-size: 0.45rem;
    }

    /* Skill bars: stack label above bar on small screens */
    .skill-bar {
        width: 80px;
    }

    .suggestions-bar {
        padding: 8px 12px;
        gap: 4px;
    }

    .cmd-btn {
        padding: 5px 10px;
        font-size: 0.72rem;
    }

    .project-card {
        padding: 10px 12px;
    }

    .timeline-item {
        padding-left: 14px;
    }

    .title-bar-text {
        font-size: 0.7rem;
    }
}


/* ═══════════════════════════════════════════════════
   RESPONSIVE — MOBILE (≤480px)
   ═══════════════════════════════════════════════════ */
@media (max-width: 480px) {
    html { font-size: 12px; }

    .terminal-body {
        padding: 8px;
    }

    /* Use compact banner from JS; hide large one */
    .ascii-art {
        font-size: 0.5rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Prompt gets long — let it wrap */
    .output-line {
        line-height: 1.5;
        overflow-wrap: anywhere;
    }

    /* Skill bars shrink further */
    .skill-bar {
        width: 60px;
    }

    .skill-bar-container {
        gap: 4px;
    }

    /* About philosophy box — remove fixed-width borders */
    .output-line span[class="muted"] {
        word-break: break-all;
    }

    /* Suggestions bar: scrollable row */
    .suggestions-bar {
        padding: 6px 8px;
        gap: 4px;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .suggestions-bar .hint {
        display: none;
    }

    .cmd-btn {
        padding: 6px 12px;
        font-size: 0.72rem;
        flex-shrink: 0;
        /* Bigger touch targets on mobile */
        min-height: 32px;
        display: flex;
        align-items: center;
    }

    /* Project cards full width */
    .project-card {
        padding: 8px 10px;
        margin: 4px 0;
    }

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

    /* Timeline tighter */
    .timeline-item {
        padding-left: 12px;
        margin-left: 4px;
    }

    /* Input: bigger for fat fingers */
    .input-line input {
        font-size: 1rem;
        padding: 4px 0;
    }

    /* Status bar compact */
    .status-bar {
        font-size: 0.6rem;
        padding: 2px 8px;
    }

    /* Title bar */
    .title-bar {
        padding: 8px 10px;
    }

    .title-bar-btn {
        width: 10px;
        height: 10px;
    }

    .title-bar-text {
        font-size: 0.65rem;
    }

    /* Section headers */
    .section-header {
        font-size: 0.9rem;
    }

    .link {
        word-break: break-all;
    }
}


/* ═══════════════════════════════════════════════════
   RESPONSIVE — VERY SMALL (≤360px)
   ═══════════════════════════════════════════════════ */
@media (max-width: 360px) {
    html { font-size: 11px; }

    .skill-bar { width: 50px; }

    .cmd-btn {
        padding: 5px 8px;
        font-size: 0.65rem;
    }
}


/* ═══════════════════════════════════════════════════
   SAFE AREA (NOTCHED PHONES)
   ═══════════════════════════════════════════════════ */
@supports (padding: env(safe-area-inset-bottom)) {
    .status-bar {
        padding-bottom: calc(2px + env(safe-area-inset-bottom));
    }

    .suggestions-bar {
        padding-left: calc(8px + env(safe-area-inset-left));
        padding-right: calc(8px + env(safe-area-inset-right));
    }
}
