/* ── Variables ───────────────────────────────────────────────────────────── */
:root {
    --bg:          #0a0a0a;
    --bg-2:        #111111;
    --bg-card:     #161616;
    --border:      #222222;
    --border-2:    #2a2a2a;
    --accent:      #3b82f6;
    --accent-2:    #8b5cf6;
    --text:        #f1f5f9;
    --text-2:      #94a3b8;
    --text-3:      #475569;
    --success:     #10b981;
    --error:       #ef4444;
}
[data-theme="light"] {
    --bg:          #f4f3ff;
    --bg-2:        #ede9fe;
    --bg-card:     #ffffff;
    --border:      #ddd6fe;
    --border-2:    #c4b5fd;
    --accent:      #4f46e5;
    --accent-2:    #7c3aed;
    --text:        #0f172a;
    --text-2:      #475569;
    --text-3:      #94a3b8;
}

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ── Utilities ───────────────────────────────────────────────────────────── */
.gradient-text {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.section-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 0.6rem;
}
.section-h2 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 3rem;
    color: var(--text);
}

/* ── Scroll reveal ───────────────────────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.6rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-decoration: none;
    letter-spacing: -0.01em;
}
.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.1);
}
.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(59,130,246,0.3);
}
[data-theme="light"] .btn-primary { background: var(--accent); }
[data-theme="light"] .btn-primary:hover { background: #1d4ed8; }
.btn-ghost {
    background: transparent;
    color: var(--text-2);
    border: 1px solid var(--border-2);
}
.btn-ghost:hover {
    border-color: var(--text-3);
    color: var(--text);
    background: rgba(255,255,255,0.04);
}
.btn-lg { padding: 0.9rem 2rem; font-size: 1rem; }

/* ════════════════════════════════════════════════════════════════════════════
   NAVBAR
   ════════════════════════════════════════════════════════════════════════════ */
header {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10,10,10,0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s, box-shadow 0.3s;
}
header.scrolled {
    border-color: var(--border);
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
[data-theme="light"] header { background: rgba(250,250,250,0.85); }
nav {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}
.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    text-decoration: none;
}
.logo-img {
    display: block;
    flex-shrink: 0;
    border-radius: 7px;
}
.logo-name { line-height: 1; }
.logo-dot  { color: var(--accent); }
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}
.nav-links a {
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-2);
    transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-resume {
    color: var(--accent) !important;
    border: 1px solid rgba(59,130,246,0.3);
    border-radius: 6px;
    padding: 0.4rem 0.9rem !important;
    font-size: 0.85rem !important;
}
.nav-resume:hover { background: rgba(59,130,246,0.1) !important; }
.nav-actions { display: flex; align-items: center; gap: 0.6rem; }
.theme-toggle {
    background: none;
    border: 1px solid var(--border-2);
    border-radius: 7px;
    color: var(--text-2);
    cursor: pointer;
    font-size: 0.95rem;
    padding: 0.4rem 0.65rem;
    transition: all 0.2s;
    display: flex; align-items: center;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* Hamburger */
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.nav-hamburger span {
    display: block;
    width: 22px; height: 2px;
    background: var(--text-2);
    border-radius: 2px;
    transition: all 0.3s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
    display: none;
    flex-direction: column;
    padding: 1rem 2rem 1.5rem;
    border-top: 1px solid var(--border);
    gap: 0.2rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
    padding: 0.65rem 0.8rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-2);
    transition: all 0.2s;
}
.mobile-menu a:hover { color: var(--text); background: rgba(255,255,255,0.05); }

/* ════════════════════════════════════════════════════════════════════════════
   HERO
   ════════════════════════════════════════════════════════════════════════════ */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 7rem 2rem 4rem;
    max-width: 1261px;
    margin: 0 auto;
    position: relative;
}

/* Light mode: soft gradient background on the whole hero area */
[data-theme="light"] body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 10%, rgba(167,139,250,0.18) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 80%, rgba(99,102,241,0.12) 0%, transparent 55%),
        radial-gradient(ellipse 50% 40% at 60% 20%, rgba(236,72,153,0.07) 0%, transparent 50%),
        linear-gradient(160deg, #f0eeff 0%, #f5f3ff 40%, #eef2ff 70%, #f8f4ff 100%);
    z-index: -2;
    pointer-events: none;
}

/* Floating decorative dots — light mode only */
[data-theme="light"] .hero::before {
    content: '';
    position: absolute;
    top: 18%;
    right: -2%;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #818cf8;
    opacity: 0.5;
}
[data-theme="light"] .hero::after {
    content: '';
    position: absolute;
    top: 55%;
    left: 38%;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #a78bfa;
    opacity: 0.4;
}

/* Floating tech icon pills — right side decoration */
.hero-tech-float {
    display: none;
}
[data-theme="light"] .hero-tech-float {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    position: absolute;
    right: -3rem;
    top: 50%;
    transform: translateY(-50%);
}
.htf-pill {
    width: 56px; height: 56px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(99,102,241,0.12), 0 1px 4px rgba(0,0,0,0.06);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    transition: transform 0.3s ease;
    animation: floatPill 4s ease-in-out infinite;
}
.htf-pill:nth-child(2) { animation-delay: 0.8s; }
.htf-pill:nth-child(3) { animation-delay: 1.6s; }
@keyframes floatPill {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

/* Code tag decoration — left side */
[data-theme="light"] .hero-code-tag {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    position: absolute;
    top: 22%;
    right: 5%;
    font-size: 0.78rem;
    font-weight: 700;
    color: #6366f1;
    background: rgba(99,102,241,0.08);
    border: 1px solid rgba(99,102,241,0.2);
    border-radius: 8px;
    padding: 0.35rem 0.7rem;
    font-family: 'Courier New', monospace;
    opacity: 0.7;
}
.hero-code-tag { display: none; }

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.hero-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--success);
    background: rgba(16,185,129,0.08);
    border: 1px solid rgba(16,185,129,0.2);
    border-radius: 20px;
    padding: 0.35rem 0.9rem;
    margin-bottom: 1.5rem;
    width: fit-content;
}
.status-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--success);
    animation: blink 2s infinite;
}
@keyframes blink {
    0%,100% { opacity: 1; }
    50% { opacity: 0.3; }
}
.hero-left h1 {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.2rem;
    letter-spacing: -0.5px;
}
.name-highlight { color: var(--accent); }

/* Left border accent on hero desc — like the screenshot */
.hero-desc {
    font-size: 1rem;
    color: var(--text-2);
    line-height: 1.75;
    margin-bottom: 2rem;
    max-width: 440px;
    padding-left: 1rem;
    border-left: 3px solid var(--border-2);
}
[data-theme="light"] .hero-desc {
    border-left-color: #c4b5fd;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

/* Trust badges row */
.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 2.5rem;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-3);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 0.3rem 0.8rem;
    transition: border-color 0.2s;
}
[data-theme="light"] .hero-badge {
    background: rgba(255,255,255,0.8);
    border-color: rgba(99,102,241,0.2);
    color: #4f46e5;
}
.hero-badge i { font-size: 0.72rem; }

/* Stats bar */
.hero-stats-bar {
    display: flex;
    align-items: stretch;
    gap: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    margin-top: 3rem;
}
[data-theme="light"] .hero-stats-bar {
    background: rgba(255,255,255,0.9);
    border-color: rgba(99,102,241,0.15);
    box-shadow: 0 4px 24px rgba(99,102,241,0.08);
}
.hero-stat-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1.2rem 1.4rem;
    border-right: 1px solid var(--border);
    transition: background 0.15s;
}
.hero-stat-item:last-child { border-right: none; }
[data-theme="light"] .hero-stat-item { border-right-color: rgba(99,102,241,0.1); }
.hero-stat-item:hover { background: rgba(99,102,241,0.03); }
.hero-stat-icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.hsi-blue   { background: rgba(99,102,241,0.1);  color: #6366f1; }
.hsi-yellow { background: rgba(245,158,11,0.1);  color: #f59e0b; }
.hsi-green  { background: rgba(16,185,129,0.1);  color: #10b981; }
.hsi-pink   { background: rgba(236,72,153,0.1);  color: #ec4899; }
.hero-stat-num {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
    line-height: 1;
}
.hero-stat-label {
    font-size: 0.72rem;
    color: var(--text-3);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-top: 0.15rem;
}

/* Keep old hero-numbers hidden — replaced by stats bar */
.hero-numbers { display: none; }
.hero-scroll-hint { display: none; }

/* Hero right card */
.hero-right { display: flex; justify-content: center; }
.hero-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.4rem;
    width: 100%;
    max-width: 360px;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.03), 0 24px 48px rgba(0,0,0,0.4);
}
[data-theme="light"] .hero-card {
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 8px 32px rgba(0,0,0,0.08);
}
.hc-top {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
.hc-avatar {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: transparent;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.hc-name { font-weight: 700; font-size: 0.9rem; letter-spacing: -0.2px; }
.hc-role { font-size: 0.78rem; color: var(--text-3); margin-top: 0.1rem; }
.hc-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 1rem;
}
.hc-stack span {
    padding: 0.2rem 0.6rem;
    background: var(--bg-2);
    border: 1px solid var(--border-2);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-2);
    font-weight: 500;
    font-family: 'Courier New', monospace;
}

/* Terminal inside card */
.hc-terminal {
    background: #0d1117;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.06);
}
.terminal-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.6rem 0.9rem;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.t-red, .t-yellow, .t-green {
    width: 10px; height: 10px; border-radius: 50%;
}
.t-red    { background: #ff5f57; }
.t-yellow { background: #febc2e; }
.t-green  { background: #28c840; }
.t-title  { font-size: 0.72rem; color: #475569; margin-left: 0.4rem; font-family: monospace; }
.terminal-body {
    padding: 0.9rem 1rem;
    font-family: 'Cascadia Code', 'Fira Code', 'Courier New', monospace;
    font-size: 0.78rem;
    line-height: 1.8;
}
.t-line { color: #94a3b8; }
.t-prompt { color: #3b82f6; margin-right: 0.4rem; }
.t-out { color: #64748b; }
.t-success { color: #34d399; }
.cursor-blink {
    animation: cursorBlink 1s step-end infinite;
    color: #3b82f6;
}
@keyframes cursorBlink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

/* Scroll hint */
.hero-scroll-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-3);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 3rem;
    animation: scrollBounce 2s ease-in-out infinite;
}
@keyframes scrollBounce {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

/* ════════════════════════════════════════════════════════════════════════════
   ABOUT
   ════════════════════════════════════════════════════════════════════════════ */
.section-about {
    padding: 1rem 0rem;
    max-width: 1191px;
    margin: 0 auto;
}
.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: start;
}
.about-left h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 1.2rem;
}
.about-left p {
    color: var(--text-2);
    line-height: 1.85;
    font-size: 1rem;
    margin-bottom: 1.8rem;
}
.about-links {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.about-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: var(--text-2);
    transition: color 0.2s;
}
.about-links a i { color: var(--accent); width: 16px; }
.about-links a:hover { color: var(--accent); }

.about-facts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.fact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: border-color 0.2s;
}
.fact-item:hover { border-color: var(--accent); }
.fact-item > i {
    color: var(--accent);
    font-size: 1rem;
    margin-top: 0.15rem;
    width: 16px;
    flex-shrink: 0;
}
.fact-item strong { display: block; font-size: 0.82rem; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.2rem; }
.fact-item span { font-size: 0.92rem; color: var(--text); font-weight: 500; }
.status-open { color: var(--success) !important; }

/* ════════════════════════════════════════════════════════════════════════════
   EXPERIENCE — Timeline
   ════════════════════════════════════════════════════════════════════════════ */
#experience {
    padding: 3rem 1rem;
    max-width: 1250px;
    margin: 0 auto;
}
.timeline {
    position: relative;
    padding-left: 2rem;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 0; top: 8px;
    width: 1px;
    height: calc(100% - 8px);
    background: var(--border-2);
}
.tl-item {
    position: relative;
    margin-bottom: 3rem;
}
.tl-item:last-child { margin-bottom: 0; }
.tl-dot {
    position: absolute;
    left: -2.4rem;
    top: 8px;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}
.tl-dot--muted { background: var(--border-2); box-shadow: none; }
.tl-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.6rem 1.8rem;
    transition: border-color 0.25s;
}
.tl-content:hover { border-color: rgba(59,130,246,0.4); }
.tl-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.tl-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}
.tl-company { font-size: 0.9rem; color: var(--text-2); font-weight: 500; }
.tl-date {
    font-size: 0.8rem;
    color: var(--accent);
    background: rgba(59,130,246,0.08);
    border: 1px solid rgba(59,130,246,0.2);
    border-radius: 20px;
    padding: 0.3rem 0.8rem;
    white-space: nowrap;
    font-weight: 600;
    flex-shrink: 0;
}
.tl-list {
    margin-bottom: 1.2rem;
}
.tl-list li {
    position: relative;
    padding-left: 1.2rem;
    margin-bottom: 0.55rem;
    color: var(--text-2);
    font-size: 0.92rem;
    line-height: 1.65;
}
.tl-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 0.8rem;
    top: 0.1rem;
}
.tl-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.tl-tags span {
    padding: 0.2rem 0.65rem;
    background: rgba(59,130,246,0.06);
    border: 1px solid rgba(59,130,246,0.15);
    border-radius: 5px;
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 600;
}

/* ════════════════════════════════════════════════════════════════════════════
   PROJECTS
   ════════════════════════════════════════════════════════════════════════════ */
#projects {
    padding: 6rem 2rem;
    max-width: 1250px;
    margin: 0 auto;
}
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}
.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.6rem;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
}
.project-card:hover {
    border-color: rgba(59,130,246,0.4);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}
.pc-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}
.pc-icon {
    font-size: 1.8rem;
    color: var(--accent);
}
.pc-links { display: flex; gap: 0.7rem; }
.pc-links a {
    color: var(--text-3);
    font-size: 1.1rem;
    transition: color 0.2s;
}
.pc-links a:hover { color: var(--accent); }
.project-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
}
.project-card p {
    color: var(--text-2);
    font-size: 0.9rem;
    line-height: 1.65;
    margin-bottom: 1rem;
    flex: 1;
}
.pc-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}
.pc-tech span {
    padding: 0.2rem 0.65rem;
    background: rgba(59,130,246,0.06);
    border: 1px solid rgba(59,130,246,0.15);
    border-radius: 5px;
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 600;
}
.pc-features {
    border-top: 1px solid var(--border);
    padding-top: 0.9rem;
    margin-top: auto;
}
.pc-features li {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 0.4rem;
    color: var(--text-2);
    font-size: 0.85rem;
    line-height: 1.5;
}
.pc-features li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent);
}
.project-card--empty {
    border-style: dashed;
    text-align: center;
    align-items: center;
    justify-content: center;
    min-height: 220px;
}
.project-card--empty .pc-icon { font-size: 2.5rem; margin-bottom: 0.8rem; }

/* ── Project badges ──────────────────────────────────────────────────────── */
.pc-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    border-radius: 20px;
    padding: 0.2rem 0.6rem;
}
.pc-badge--personal {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: var(--accent);
}
.pc-badge--client {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #f59e0b;
}

/* ── Client project card — subtle distinction ────────────────────────────── */
.project-card--client {
    border-color: rgba(245, 158, 11, 0.12);
}
.project-card--client:hover {
    border-color: rgba(245, 158, 11, 0.35);
    box-shadow: 0 12px 40px rgba(245, 158, 11, 0.08);
}
.project-card--client .pc-icon {
    color: #f59e0b;
}

/* ── Section divider between Personal and Client projects ────────────────── */
.projects-divider {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin: 3.5rem 0 3rem;
}
.projects-divider-line {
    flex: 1;
    height: 1px;
    background: var(--border-2);
}
.projects-divider-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-3);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.projects-divider-label i {
    color: var(--accent);
    font-size: 0.75rem;
}

/* ════════════════════════════════════════════════════════════════════════════
   SKILLS
   ════════════════════════════════════════════════════════════════════════════ */
#skills {
    padding: 3rem 0rem;
    max-width: 1250px;
    margin: 0 auto;
}

/* New layout — single column of category rows */
.skills-layout {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.skills-primary,
.skills-secondary {
    display: contents; /* flatten into parent flow */
}

.skill-block {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 0;
    align-items: start;
    padding: 1.4rem 0;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.skill-block:first-child { border-top: 1px solid var(--border); }
.skill-block--main { /* same as skill-block now */ }

/* Left column — category label */
.sb-icon {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding-top: 0.1rem;
    width: auto;
    height: auto;
    background: none;
    border: none;
    border-radius: 0;
    color: var(--text-3);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.sb-icon i {
    font-size: 0.85rem;
    color: var(--text-3);
    width: 14px;
    text-align: center;
}

.sb-icon--sm {
    width: auto;
    height: auto;
    font-size: 0.82rem;
    border-radius: 0;
    background: none;
    border: none;
}

/* Right column — tags */
.sb-body {
    padding-top: 0.05rem;
}

.sb-body h3 {
    display: none; /* label is now in sb-icon */
}

.sb-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sb-tag {
    padding: 0.3rem 0.75rem;
    background: transparent;
    border: 1px solid var(--border-2);
    border-radius: 6px;
    font-size: 0.82rem;
    color: var(--text-2);
    font-weight: 500;
    transition: all 0.15s;
    cursor: default;
}

.sb-tag:hover {
    border-color: var(--text-3);
    color: var(--text);
    background: rgba(255,255,255,0.03);
}

/* Primary skills get slightly more prominent tags */
.sb-tag--hot {
    background: rgba(59,130,246,0.06);
    border-color: rgba(59,130,246,0.2);
    color: var(--text);
    font-weight: 600;
}

.sb-tag--hot:hover {
    background: rgba(59,130,246,0.1);
    border-color: rgba(59,130,246,0.35);
}

@media (max-width: 600px) {
    .skill-block {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }
}

/* ════════════════════════════════════════════════════════════════════════════
   CONTACT  — redesigned: two-column, trust-focused, premium feel
   ════════════════════════════════════════════════════════════════════════════ */
#contact {
    padding: 3rem 0rem 4rem;
    max-width: 1250px;
    margin: 0 auto;
}

/* Two-column layout: left = CTA, right = quick-info panel */
.contact-inner {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 5rem;
    align-items: start;
    max-width: 100%;
}

/* Left column */
.contact-left .section-h2 {
    margin-bottom: 0.8rem;
}

.contact-sub {
    color: var(--text-2);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    max-width: 420px;
}

/* Availability badge */
.contact-avail {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--success);
    background: rgba(16,185,129,0.07);
    border: 1px solid rgba(16,185,129,0.2);
    border-radius: 20px;
    padding: 0.35rem 0.9rem;
    margin-bottom: 1.8rem;
    width: fit-content;
}

.contact-avail-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--success);
    animation: blink 2s infinite;
}

/* CTA buttons */
.contact-cta {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

/* Social row */
.contact-socials {
    display: flex;
    gap: 0.6rem;
}

.contact-socials a {
    width: 40px; height: 40px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid var(--border-2);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-3);
    font-size: 1rem;
    transition: all 0.15s;
}

.contact-socials a:hover {
    border-color: var(--text-3);
    color: var(--text);
    background: rgba(255,255,255,0.04);
}

/* Right column — info panel */
.contact-right {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-card);
}

.contact-info-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.4rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.contact-info-row:last-child { border-bottom: none; }
.contact-info-row:hover { background: rgba(255,255,255,0.02); }

.contact-info-icon {
    width: 34px; height: 34px;
    border-radius: 8px;
    background: rgba(59,130,246,0.08);
    border: 1px solid rgba(59,130,246,0.15);
    display: flex; align-items: center; justify-content: center;
    color: var(--accent);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.contact-info-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.15rem;
}

.contact-info-value {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text);
}

.contact-info-value a {
    color: var(--text);
    transition: color 0.15s;
}

.contact-info-value a:hover { color: var(--accent); }

/* Response time note */
.contact-response {
    margin-top: 1.2rem;
    font-size: 0.8rem;
    color: var(--text-3);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.contact-response i { color: var(--success); font-size: 0.75rem; }

/* Responsive */
@media (max-width: 860px) {
    .contact-inner {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .contact-sub { max-width: 100%; }
}

/* ════════════════════════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════════════════════════ */
footer {
    border-top: 1px solid var(--border);
    padding: 1.5rem 2rem;
}
.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}
.footer-inner > span:nth-child(2) {
    font-size: 0.82rem;
    color: var(--text-3);
}
.footer-admin {
    color: var(--text-3);
    font-size: 0.85rem;
    transition: color 0.2s;
    padding: 0.3rem 0.5rem;
}
.footer-admin:hover { color: var(--accent); }

/* ════════════════════════════════════════════════════════════════════════════
   CHATBOT WIDGET
   Fully inherits the site design system via CSS variables.
   Zero hardcoded colors — if --accent or --bg-card change, the chat adapts.
   ════════════════════════════════════════════════════════════════════════════ */
#chat-widget {
    position: fixed;
    bottom: 2rem; right: 2rem;
    z-index: 9999;
    font-family: 'Inter', sans-serif;
}

/* ── Floating trigger button ────────────────────────────────────────────── */
#chat-toggle {
    width: 48px; height: 48px;
    border-radius: 12px;               /* matches site btn border-radius: 8px, slightly more */
    background: var(--accent);
    border: none; color: #fff;
    font-size: 1.15rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25), 0 0 0 1px rgba(255,255,255,0.06) inset;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    position: relative;
    display: flex; align-items: center; justify-content: center;
}
#chat-toggle:hover {
    transform: translateY(-2px);       /* matches site btn-primary:hover translateY(-1px) */
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
[data-theme="light"] #chat-toggle:hover {
    box-shadow: 0 6px 20px rgba(79,70,229,0.25);
}

/* ── Notification badge ─────────────────────────────────────────────────── */
.chat-badge {
    position: absolute; top: -5px; right: -5px;
    background: var(--error); color: #fff;
    border-radius: 50%; width: 17px; height: 17px;
    font-size: 0.62rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--bg);       /* bleeds into background — feels native */
}

/* ── Chat window ────────────────────────────────────────────────────────── */
#chat-window {
    display: none;
    position: absolute; bottom: 60px; right: 0;
    width: 340px; max-height: 510px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;               /* consistent with site card rounding */
    box-shadow: 0 12px 40px rgba(0,0,0,0.35), 0 2px 8px rgba(0,0,0,0.2);
    flex-direction: column; overflow: hidden;
    animation: chatSlideUp 0.2s ease;
}
[data-theme="light"] #chat-window {
    box-shadow: 0 8px 30px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.06);
}
#chat-window.open { display: flex; }

@keyframes chatSlideUp {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* ── Header — uses primary accent, zero gradient ────────────────────────── */
#chat-header {
    background: var(--accent);         /* flat — matches btn-primary */
    padding: 0.85rem 1rem;
    display: flex; justify-content: space-between; align-items: center;
    flex-shrink: 0;
}
#chat-header-info { display: flex; align-items: center; gap: 0.65rem; }

#chat-avatar {
    width: 32px; height: 32px;
    border-radius: 8px;                /* matches site border-radius language */
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem; color: #fff;
}
#chat-title  { color: #fff; font-weight: 600; font-size: 0.875rem; letter-spacing: -0.01em; }
#chat-subtitle {
    color: rgba(255,255,255,0.72);
    font-size: 0.72rem;
    display: flex; align-items: center; gap: 0.3rem;
    margin-top: 0.05rem;
}

/* ── Online indicator — uses var(--success) ────────────────────────────── */
.online-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--success); display: inline-block;
    animation: chatPulse 2.2s ease infinite;
}
@keyframes chatPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ── Header action buttons ──────────────────────────────────────────────── */
#chat-header-actions { display: flex; gap: 0.3rem; }
#chat-header-actions button {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff; width: 26px; height: 26px; border-radius: 6px;
    cursor: pointer; font-size: 0.75rem;
    transition: background 0.15s ease;
    display: flex; align-items: center; justify-content: center;
}
#chat-header-actions button:hover { background: rgba(255,255,255,0.25); }

/* ── Message list ───────────────────────────────────────────────────────── */
#chat-messages {
    flex: 1; overflow-y: auto; padding: 1rem;
    display: flex; flex-direction: column; gap: 0.65rem;
    max-height: 280px;
}
#chat-messages::-webkit-scrollbar { width: 3px; }
#chat-messages::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }

/* ── Message bubbles ────────────────────────────────────────────────────── */
.chat-msg { display: flex; }
.chat-msg.user { justify-content: flex-end; }
.msg-bubble {
    max-width: 82%; padding: 0.6rem 0.85rem;
    border-radius: 10px; font-size: 0.845rem;
    line-height: 1.55; word-break: break-word;
}

/* User bubble — flat accent, no gradient */
.chat-msg.user .msg-bubble {
    background: var(--accent);
    color: #fff;
    border-bottom-right-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* Assistant bubble — site card style */
.chat-msg.assistant .msg-bubble {
    background: var(--bg-2);
    color: var(--text);
    border: 1px solid var(--border);
    border-bottom-left-radius: 3px;
}

/* ── Typing indicator ───────────────────────────────────────────────────── */
.typing-bubble {
    display: flex; gap: 4px; align-items: center;
    padding: 0.65rem 0.85rem;
}
.typing-dot {
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--text-3); animation: chatTypingBounce 1.2s ease infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.18s; }
.typing-dot:nth-child(3) { animation-delay: 0.36s; }
@keyframes chatTypingBounce {
    0%,60%,100% { transform: translateY(0); }
    30%          { transform: translateY(-5px); }
}

/* ── Suggestion pills ───────────────────────────────────────────────────── */
#chat-suggestions {
    padding: 0 1rem 0.6rem;
    display: flex; flex-wrap: wrap; gap: 0.3rem; flex-shrink: 0;
}
#chat-suggestions button {
    padding: 0.22rem 0.6rem;
    background: transparent;
    border: 1px solid var(--border-2);
    border-radius: 20px;
    color: var(--accent);
    font-size: 0.73rem; cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    font-family: inherit;
    font-weight: 500;
}
#chat-suggestions button:hover {
    background: var(--bg-2);
    border-color: var(--accent);
}

/* ── Input area ─────────────────────────────────────────────────────────── */
#chat-input-area {
    padding: 0.65rem 1rem;
    border-top: 1px solid var(--border);
    display: flex; gap: 0.45rem; align-items: center; flex-shrink: 0;
}
#chat-input {
    flex: 1; padding: 0.55rem 0.85rem;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 8px;                /* matches site input radius */
    color: var(--text);
    font-size: 0.845rem; font-family: inherit; outline: none;
    transition: border-color 0.15s ease;
}
#chat-input:focus { border-color: var(--accent); }
#chat-input::placeholder { color: var(--text-3); }

/* ── Send button — flat accent, matches btn-primary ────────────────────── */
#chat-send {
    width: 32px; height: 32px;
    border-radius: 8px;                /* matches site btn-primary radius */
    background: var(--accent);
    border: none; color: #fff;
    font-size: 0.8rem;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.1);
}
#chat-send:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
#chat-send:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }

/* ── Error / retry bubble ───────────────────────────────────────────────── */
.chat-error-bubble {
    background: rgba(239,68,68,0.07) !important;
    border-color: rgba(239,68,68,0.25) !important;
    display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
}
.chat-error-text { color: var(--error); font-size: 0.82rem; }
.chat-retry-btn {
    background: transparent;
    border: 1px solid var(--error);
    color: var(--error);
    border-radius: 6px;
    padding: 0.18rem 0.55rem;
    cursor: pointer;
    font-size: 0.78rem;
    font-family: inherit;
    transition: background 0.15s ease;
    line-height: 1.4;
}
.chat-retry-btn:hover { background: rgba(239,68,68,0.1); }

/* ════════════════════════════════════════════════════════════════════════════
   RESPONSIVE — Complete mobile-first overhaul
   Breakpoints: 900px (tablet), 768px (large phone), 480px (phone), 360px (small phone)
   ════════════════════════════════════════════════════════════════════════════ */

/* ── 900px — Tablet / large phone landscape ──────────────────────────────── */
@media (max-width: 900px) {
    /* Hero */
    .hero-grid         { grid-template-columns: 1fr; gap: 2.5rem; }
    .hero-right        { display: none; }
    .about-grid        { grid-template-columns: 1fr; gap: 2.5rem; }
    .skills-layout     { grid-template-columns: 1fr; }

    /* Stats bar — 2 across */
    .hero-stats-bar    { flex-wrap: wrap; }
    .hero-stat-item    { flex: 1 1 45%; border-right: none; border-bottom: 1px solid var(--border); }
    .hero-stat-item:nth-child(odd)  { border-right: 1px solid var(--border); }
    .hero-stat-item:last-child,
    .hero-stat-item:nth-last-child(2):nth-child(odd) { border-bottom: none; }

    /* Demo */
    .demo-wrapper { grid-template-columns: 1fr; gap: 2.5rem; }
    .demo-desc    { max-width: 100%; }
}

/* ── 768px — Phone portrait ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    /* Nav */
    .nav-links        { display: none; }
    .nav-hamburger    { display: flex; }
    nav               { padding: 0.875rem 1.25rem; }

    /* Hero */
    .hero             { padding: 5.5rem 1.25rem 2.5rem; }
    .hero-left h1     { font-size: clamp(1.75rem, 7vw, 2.4rem); }
    .hero-desc        { font-size: 0.95rem; margin-bottom: 1.5rem; }
    .hero-cta         { gap: 0.75rem; }
    .hero-cta .btn    { padding: 0.8rem 1.4rem; font-size: 0.9rem; }
    .hero-badges      { gap: 0.4rem; margin-bottom: 2rem; }
    .hero-status      { margin-bottom: 1.2rem; }

    /* Stats bar — single column */
    .hero-stats-bar   { flex-direction: column; }
    .hero-stat-item   { border-right: none !important; border-bottom: 1px solid var(--border); flex: unset; }
    .hero-stat-item:last-child { border-bottom: none; }

    /* Sections */
    .section-about    { padding: 3.5rem 1.25rem; }
    #experience       { padding: 3.5rem 1.25rem; }
    #projects         { padding: 3.5rem 1.25rem; }
    #skills           { padding: 3.5rem 1.25rem; }
    #contact          { padding: 3.5rem 1.25rem; }
    #demo             { padding: 3.5rem 1.25rem; }

    /* Timeline */
    .tl-header        { flex-direction: column; gap: 0.5rem; align-items: flex-start; }
    .tl-date          { align-self: flex-start; }
    .tl-content       { padding: 1.2rem 1.2rem; }

    /* Projects */
    .projects-grid    { grid-template-columns: 1fr; }

    /* Contact */
    .contact-inner    { gap: 2rem; }

    /* Footer */
    .footer-inner     { flex-direction: column; align-items: center; text-align: center; gap: 0.75rem; }
    .footer-logo      { justify-content: center; }

    /* Demo card */
    .demo-card        { max-width: 100%; }
}

/* ── 480px — Small phone ─────────────────────────────────────────────────── */
@media (max-width: 480px) {
    /* Base */
    html { font-size: 15px; }

    /* Nav */
    nav               { padding: 0.75rem 1rem; }
    .mobile-menu      { padding: 0.75rem 1rem 1.2rem; }
    .logo-name        { font-size: 0.9rem; }

    /* Hero */
    .hero             { padding: 5rem 1rem 2rem; }
    .hero-left h1     { font-size: clamp(1.6rem, 8vw, 2rem); letter-spacing: -0.5px; }
    .hero-desc        { font-size: 0.9rem; padding-left: 0.75rem; }
    .hero-cta         { flex-direction: column; gap: 0.6rem; }
    .hero-cta .btn    { width: 100%; justify-content: center; }
    .hero-badge       { font-size: 0.73rem; padding: 0.25rem 0.65rem; }
    .hero-stat-item   { padding: 1rem 1.1rem; gap: 0.75rem; }
    .hero-stat-num    { font-size: 1.1rem; }
    .hero-stat-icon   { width: 32px; height: 32px; font-size: 0.9rem; border-radius: 8px; }

    /* Section headings */
    .section-h2       { font-size: clamp(1.5rem, 6vw, 2rem); margin-bottom: 2rem; }
    .section-label    { font-size: 0.72rem; }
    .section-about    { padding: 2.5rem 1rem; }
    #experience       { padding: 2.5rem 1rem; }
    #projects         { padding: 2.5rem 1rem; }
    #skills           { padding: 2.5rem 1rem; }
    #contact          { padding: 2.5rem 1rem; }
    #demo             { padding: 2.5rem 1rem; }

    /* About */
    .about-left h2    { font-size: clamp(1.4rem, 6vw, 1.8rem); }
    .about-left p     { font-size: 0.92rem; line-height: 1.75; }
    .fact-item        { padding: 0.85rem 1rem; }

    /* Timeline */
    .timeline         { padding-left: 1.5rem; }
    .tl-dot           { left: -1.9rem; }
    .tl-content       { padding: 1rem 1rem; }
    .tl-content h3    { font-size: 1rem; }
    .tl-company       { font-size: 0.85rem; }
    .tl-list li       { font-size: 0.875rem; }

    /* Projects */
    .project-card     { padding: 1.2rem; }
    .project-card h3  { font-size: 1rem; }
    .project-card p   { font-size: 0.875rem; }
    .projects-divider { margin: 2rem 0 2rem; }

    /* Skills */
    .skill-block      { padding: 1.1rem 0; }
    .sb-tag           { font-size: 0.78rem; padding: 0.25rem 0.6rem; }

    /* Contact */
    .contact-sub      { font-size: 0.92rem; }
    .contact-cta      { flex-direction: column; gap: 0.6rem; }
    .contact-cta .btn { width: 100%; justify-content: center; }
    .contact-socials a{ width: 44px; height: 44px; }   /* 44px touch target */
    .contact-info-row { padding: 0.9rem 1rem; gap: 0.75rem; }
    .contact-right    { border-radius: 10px; }

    /* Footer */
    footer            { padding: 1.25rem 1rem; }
    .footer-inner > span:nth-child(2) { font-size: 0.78rem; }

    /* Demo */
    .demo-heading     { font-size: clamp(1.5rem, 6vw, 2.2rem); }
    .demo-card-body   { padding: 1.2rem; }
    .demo-cred-row    { padding: 0.75rem 0.85rem; gap: 0.6rem; }
    .demo-cred-label  { min-width: 65px; font-size: 0.7rem; }
    .demo-cred-value  { font-size: 0.85rem; }

    /* ── CHATBOT — Full mobile treatment ──────────────────────────────────── */
    #chat-widget {
        bottom: 1rem;
        right: 1rem;
        /* iOS safe area: keep above home indicator */
        bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
        right:  calc(1rem + env(safe-area-inset-right,  0px));
    }

    #chat-window {
        /* Full-width minus gutters */
        width: calc(100vw - 2rem);
        /* Push left to stay within viewport when widget is in right corner */
        right: -0.5rem;
        /* Taller on small screens — use viewport height dynamically */
        max-height: min(520px, calc(100dvh - 100px));
        border-radius: 12px;
    }

    #chat-messages {
        /* Allow messages area to grow more on small screens */
        max-height: none;
        flex: 1;
    }

    #chat-toggle { width: 44px; height: 44px; font-size: 1.05rem; border-radius: 11px; }

    #chat-input   { font-size: 16px; /* Prevent iOS auto-zoom on focus */ }
    #chat-input-area { padding: 0.6rem 0.85rem; }
}

/* ── 360px — Very small phones (Galaxy A-series etc.) ────────────────────── */
@media (max-width: 360px) {
    html { font-size: 14px; }

    nav { padding: 0.7rem 0.875rem; }

    .hero { padding: 4.75rem 0.875rem 1.75rem; }
    .hero-left h1 { font-size: 1.5rem; }
    .hero-cta .btn { font-size: 0.875rem; padding: 0.75rem 1.2rem; }

    .hero-stat-item { padding: 0.875rem 0.875rem; }
    .hero-stat-icon { width: 28px; height: 28px; font-size: 0.8rem; }
    .hero-stat-num  { font-size: 1rem; }
    .hero-stat-label{ font-size: 0.68rem; }

    .section-about, #experience, #projects, #skills, #contact, #demo {
        padding: 2rem 0.875rem;
    }

    .tl-tags span   { font-size: 0.7rem; padding: 0.15rem 0.5rem; }
    .pc-tech span   { font-size: 0.7rem; padding: 0.15rem 0.5rem; }

    /* Chat: tighten further on very small screens */
    #chat-window    { width: calc(100vw - 1.75rem); right: -0.5rem; }
    #chat-suggestions button { font-size: 0.68rem; padding: 0.18rem 0.5rem; }
    #chat-input     { padding: 0.5rem 0.7rem; }
    #chat-send      { width: 30px; height: 30px; font-size: 0.75rem; }
}

/* ════════════════════════════════════════════════════════════════════════════
   DEMO ADMIN SECTION
   ════════════════════════════════════════════════════════════════════════════ */

#demo {
    padding: 3rem 1rem;
    max-width: 1250px;
    margin: 0 auto;
}

.demo-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

/* ── Left side ─────────────────────────────────────────────────────────── */
.demo-heading {
    font-size: clamp(2.2rem, 5vw, 3.1rem);
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.demo-desc {
    color: var(--text-2);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.8rem;
    max-width: 620px;
}

.demo-features {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.demo-features li {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 0.92rem;
    color: var(--text-2);
    font-weight: 500;
}

.demo-features li i {
    color: var(--success);
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* ── Right side — card ─────────────────────────────────────────────────── */
.demo-right {
    display: flex;
    justify-content: center;
    margin-top: 4rem;
}

.demo-card {
    width: 100%;
    max-width: 400px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    transition: box-shadow 0.3s ease;
}

.demo-card:hover {
    box-shadow: 0 24px 70px rgba(59, 130, 246, 0.15);
}

/* Card header — browser chrome style */
.demo-card-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.85rem 1.2rem;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
}

.demo-card-dots {
    display: flex;
    gap: 5px;
    align-items: center;
}

.dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.dot-red    { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green  { background: #28c840; }

.demo-card-title {
    flex: 1;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-2);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.demo-card-title i {
    color: var(--accent);
}

.demo-live-badge {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 20px;
    padding: 0.2rem 0.65rem;
}

.demo-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    animation: blink 2s infinite;
}

/* Card body */
.demo-card-body {
    padding: 1.6rem;
}

.demo-note {
    font-size: 0.85rem;
    color: var(--text-2);
    line-height: 1.65;
    margin-bottom: 1.4rem;
    padding: 0.9rem 1rem;
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 8px;
}

/* Credential rows */
.demo-cred-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.85rem 1rem;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 0.75rem;
    transition: border-color 0.2s;
}

.demo-cred-row:hover {
    border-color: rgba(59, 130, 246, 0.35);
}

.demo-cred-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 80px;
    flex-shrink: 0;
}

.demo-cred-label i {
    color: var(--accent);
    font-size: 0.8rem;
}

.demo-cred-value {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    font-family: 'Cascadia Code', 'Fira Code', 'Courier New', monospace;
    letter-spacing: 0.3px;
}

.demo-copy-btn {
    background: none;
    border: 1px solid var(--border-2);
    border-radius: 6px;
    color: var(--text-3);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem;
    transition: all 0.2s;
    flex-shrink: 0;
}

.demo-copy-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(59, 130, 246, 0.08);
}

.demo-copy-btn.copied {
    border-color: var(--success);
    color: var(--success);
    background: rgba(16, 185, 129, 0.08);
}

/* CTA button */
.demo-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.9rem 1.5rem;
    margin-top: 1.2rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.25s ease;
    font-family: 'Inter', sans-serif;
}

.demo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(59, 130, 246, 0.4);
}

/* Warning note */
.demo-warning {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: var(--text-3);
    line-height: 1.55;
    padding: 0.7rem 0.9rem;
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: 8px;
}

.demo-warning i {
    color: var(--warning-color, #f59e0b);
    font-size: 0.82rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .demo-wrapper {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .demo-desc {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    #demo {
        padding: 4rem 1.5rem;
    }

    .demo-card {
        max-width: 100%;
    }
}
