/* ============================================================
   CSS Custom Properties
   ============================================================ */
:root {
    --bg-0:        #06060f;
    --bg-1:        #0c0c1a;
    --bg-2:        #111122;
    --bg-card:     rgba(255, 255, 255, 0.04);
    --bg-card-h:   rgba(255, 255, 255, 0.07);

    --cyan:        #22d3ee;
    --violet:      #a78bfa;
    --gradient:    linear-gradient(135deg, #22d3ee 0%, #a78bfa 100%);
    --gradient-s:  linear-gradient(135deg, rgba(34,211,238,.12) 0%, rgba(167,139,250,.12) 100%);

    --text-0:      #f1f5f9;
    --text-1:      #94a3b8;
    --text-2:      #475569;

    --border:      rgba(255, 255, 255, 0.08);
    --border-a:    rgba(34, 211, 238, 0.25);

    --ff-sans:     'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --ff-display:  'Space Grotesk', 'Inter', sans-serif;
    --ff-mono:     'JetBrains Mono', 'Fira Code', monospace;

    --r-sm:  8px;
    --r-md:  12px;
    --r-lg:  16px;
    --r-xl:  24px;

    --ease:  cubic-bezier(0.4, 0, 0.2, 1);
    --t:     0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --t-lg:  0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--ff-sans);
    background-color: var(--bg-0);
    color: var(--text-0);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
}

h1, h2, h3, h4 {
    font-family: var(--ff-display);
    font-weight: 700;
    line-height: 1.15;
}

/* ============================================================
   Gradient Text Utility
   ============================================================ */
.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================================
   Layout
   ============================================================ */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 110px 0;
}

.section-alt {
    background-color: var(--bg-1);
}

.section,
.section-alt {
    border-top: 1px solid rgba(34, 211, 238, 0.06);
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-label {
    display: inline-block;
    font-family: var(--ff-mono);
    font-size: 0.82rem;
    color: var(--cyan);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.section-label::before {
    content: '// ';
    opacity: 0.45;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    letter-spacing: -0.02em;
}

.section-header::before {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--cyan), var(--violet));
    margin-bottom: 16px;
    border-radius: 2px;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: var(--r-md);
    font-size: 0.93rem;
    font-weight: 600;
    font-family: var(--ff-sans);
    letter-spacing: 0.01em;
    transition: var(--t);
    white-space: nowrap;
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient);
    color: #05050d;
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(34, 211, 238, 0.28);
    filter: brightness(1.07);
}

.btn-secondary {
    background: transparent;
    color: var(--text-0);
    border: 1px solid var(--border);
    backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    border-color: var(--cyan);
    color: var(--cyan);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 9px 20px;
    font-size: 0.85rem;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--ff-mono);
    font-size: 0.75rem;
    color: var(--text-2);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 100px;
    letter-spacing: 0.02em;
    white-space: nowrap;
    transition: var(--t);
}

.btn-ghost:hover {
    color: var(--cyan);
    border-color: rgba(34, 211, 238, 0.3);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* ============================================================
   Tags
   ============================================================ */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 13px;
    border-radius: 100px;
    font-size: 0.76rem;
    font-weight: 500;
    font-family: var(--ff-mono);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: var(--text-1);
    white-space: nowrap;
}

.tag-accent {
    background: rgba(34, 211, 238, 0.10);
    border-color: rgba(34, 211, 238, 0.28);
    color: var(--cyan);
}

.tag-purple {
    background: rgba(167, 139, 250, 0.10);
    border-color: rgba(167, 139, 250, 0.28);
    color: var(--violet);
}

/* ============================================================
   Navbar
   ============================================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 22px 0;
    transition: padding var(--t), background var(--t), border-color var(--t), backdrop-filter var(--t);
}

.navbar.scrolled {
    padding: 13px 0;
    background: rgba(6, 6, 15, 0.82);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--ff-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-0);
    transition: color var(--t);
}

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

.accent { color: var(--cyan); }

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-links a {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-1);
    padding: 7px 15px;
    border-radius: var(--r-sm);
    transition: var(--t);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-0);
    background: rgba(255, 255, 255, 0.07);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
    z-index: 1100;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-0);
    border-radius: 2px;
    transition: var(--t);
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 100px 24px 80px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(34, 211, 238, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 211, 238, 0.045) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, rgba(0,0,0,.9) 0%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, rgba(0,0,0,.9) 0%, transparent 100%);
}

.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.13;
    pointer-events: none;
}

.hero-glow-1 {
    width: 640px;
    height: 640px;
    background: radial-gradient(circle, var(--cyan), transparent 70%);
    top: -240px;
    right: -80px;
    animation: floatOrb 9s ease-in-out infinite;
}

.hero-glow-2 {
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, var(--violet), transparent 70%);
    bottom: -200px;
    left: -80px;
    animation: floatOrb 12s ease-in-out infinite reverse;
}

@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0); }
    50%       { transform: translate(28px, -28px); }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 820px;
    margin: 0 auto;
}


@keyframes pulseDot {
    0%, 100% { opacity: 1;   transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.75); }
}

.hero-name {
    font-size: clamp(3.2rem, 9vw, 6.5rem);
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -0.04em;
    margin-bottom: 20px;
}

.hero-title {
    font-family: var(--ff-mono);
    font-size: clamp(1rem, 2.5vw, 1.18rem);
    color: var(--text-1);
    margin-bottom: 26px;
    min-height: 1.8em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.cursor {
    display: inline-block;
    width: 2px;
    height: 1.15em;
    background: var(--cyan);
    border-radius: 1px;
    vertical-align: middle;
    animation: blinkCursor 0.85s step-end infinite;
    flex-shrink: 0;
}

@keyframes blinkCursor {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

.hero-bio {
    font-size: 1.05rem;
    color: var(--text-1);
    line-height: 1.82;
    margin-bottom: 44px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 52px;
}

.hero-socials {
    display: flex;
    gap: 14px;
    justify-content: center;
}

.hero-socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: var(--r-md);
    border: 1px solid var(--border);
    color: var(--text-1);
    font-size: 1.1rem;
    transition: var(--t);
    backdrop-filter: blur(8px);
}

.hero-socials a:hover {
    border-color: var(--cyan);
    color: var(--cyan);
    transform: translateY(-3px);
    background: rgba(34, 211, 238, 0.06);
}

.scroll-indicator {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-1);
    font-size: 0.72rem;
    font-family: var(--ff-mono);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    animation: fadeInScrollHint 1s ease 1.8s both;
}

.scroll-line {
    width: 1px;
    height: 38px;
    background: var(--border);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--cyan));
    animation: scrollSlide 2s ease-in-out infinite;
}

@keyframes scrollSlide {
    0%   { top: -100%; opacity: 0; }
    30%  { opacity: 1; }
    100% { top: 100%;  opacity: 0; }
}

@keyframes fadeInScrollHint {
    from { opacity: 0; transform: translate(-50%, 14px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-5px); }
}

.scroll-indicator span {
    animation: scrollBounce 2.2s ease-in-out 2.8s infinite;
}

/* ============================================================
   About
   ============================================================ */
.about-grid {
    display: grid;
    grid-template-columns: 200px 1fr 1fr;
    gap: 52px;
    align-items: start;
}

.about-photo {
    display: flex;
    justify-content: center;
    padding-top: 6px;
}

.profile-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(34, 211, 238, 0.35);
    box-shadow:
        0 0 0 7px rgba(34, 211, 238, 0.07),
        0 16px 48px rgba(0, 0, 0, 0.45);
    transition: var(--t);
}

.profile-photo:hover {
    border-color: rgba(34, 211, 238, 0.65);
    box-shadow:
        0 0 0 10px rgba(34, 211, 238, 0.09),
        0 20px 60px rgba(0, 0, 0, 0.55);
    transform: scale(1.02);
}

.about-text p {
    color: var(--text-1);
    font-size: 1.02rem;
    margin-bottom: 18px;
}

.about-text p:last-child { margin-bottom: 0; }

.about-text strong {
    color: var(--text-0);
    font-weight: 600;
}

.about-skills h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-0);
    margin-bottom: 24px;
    font-family: var(--ff-display);
}

.skills-grid {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.skill-category {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.skill-cat-label {
    font-family: var(--ff-mono);
    font-size: 0.72rem;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ============================================================
   Certifications
   ============================================================ */
.certs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.cert-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 22px 24px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: var(--t);
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.cert-card:hover {
    border-color: var(--border-a);
    transform: translateY(-4px);
    background: var(--bg-card-h);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(34, 211, 238, 0.07);
}

.cert-featured {
    grid-column: 1 / -1;
    background: linear-gradient(135deg,
        rgba(34, 211, 238, 0.06) 0%,
        rgba(167, 139, 250, 0.06) 100%);
    border-color: rgba(34, 211, 238, 0.18);
    position: relative;
    overflow: hidden;
}

.cert-featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient);
}

.cert-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.15rem;
}

.cert-icon-cyan {
    background: rgba(34, 211, 238, 0.11);
    color: var(--cyan);
    border: 1px solid rgba(34, 211, 238, 0.22);
}

.cert-icon-purple {
    background: rgba(167, 139, 250, 0.11);
    color: var(--violet);
    border: 1px solid rgba(167, 139, 250, 0.22);
}

.cert-icon-accent {
    background: rgba(34, 211, 238, 0.11);
    color: var(--cyan);
    border: 1px solid rgba(34, 211, 238, 0.22);
}

.cert-body {
    flex: 1;
    min-width: 0;
}

.cert-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.cert-badge {
    font-family: var(--ff-mono);
    font-size: 0.72rem;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.cert-name {
    font-family: var(--ff-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-0);
    margin-bottom: 4px;
    line-height: 1.35;
}

.cert-featured .cert-name {
    font-size: 1.15rem;
}

.cert-issuer {
    font-size: 0.84rem;
    color: var(--cyan);
    font-weight: 500;
    margin-bottom: 12px;
}

.cert-featured .cert-issuer {
    color: var(--text-1);
}

.cert-date {
    font-family: var(--ff-mono);
    font-size: 0.72rem;
    color: var(--text-2);
    border: 1px solid var(--border);
    padding: 3px 11px;
    border-radius: 100px;
    white-space: nowrap;
}

.cert-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

/* Cert row - issuer + date side by side */
.cert-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.cert-row .cert-issuer {
    margin-bottom: 0;
}

/* Description text on Mordor-style recognition cards */
.cert-desc {
    font-size: 0.80rem;
    color: var(--text-1);
    line-height: 1.68;
    margin-bottom: 10px;
}

/* Verify credential link */
.cert-verify {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--ff-mono);
    font-size: 0.68rem;
    color: var(--text-2);
    border: 1px solid var(--border);
    padding: 3px 11px;
    border-radius: 100px;
    margin-top: 11px;
    transition: var(--t);
    text-decoration: none;
}

.cert-verify:hover {
    color: var(--cyan);
    border-color: var(--border-a);
}

/* GPA badge on education cards */
.gpa-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--ff-mono);
    font-size: 0.71rem;
    font-weight: 600;
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.09);
    border: 1px solid rgba(34, 211, 238, 0.28);
    padding: 3px 11px;
    border-radius: 100px;
    margin-bottom: 12px;
    margin-top: 4px;
}

.gpa-badge i {
    font-size: 0.60rem;
}

/* Focus-area sub-headings inside timeline bullet lists */
.bullet-section {
    font-family: var(--ff-mono);
    font-size: 0.68rem;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-top: 12px;
    margin-bottom: 4px;
    opacity: 0.80;
}

.bullet-section:first-of-type {
    margin-top: 6px;
}

/* Relevant coursework line on education cards */
.timeline-coursework {
    font-size: 0.80rem;
    color: var(--text-2);
    line-height: 1.7;
    margin-top: 6px;
}

.timeline-coursework strong {
    color: var(--text-1);
    font-weight: 500;
}

/* Grouped coursework layout */
.coursework-groups { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.coursework-group { display: flex; flex-direction: column; gap: 6px; }
.coursework-group-label {
    font-family: var(--ff-mono); font-size: 0.66rem; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--cyan); opacity: 0.75;
}
.coursework-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-inprogress {
    background: rgba(34,211,238,0.07);
    border-color: rgba(34,211,238,0.4);
    color: var(--cyan);
    font-style: italic;
}
.tag-inprogress::before {
    content: '';
    display: inline-block;
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--cyan);
    margin-right: 6px;
    flex-shrink: 0;
    animation: pulseDotSmall 2s ease-in-out infinite;
}
@keyframes pulseDotSmall {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34,211,238,0); }
    50%       { box-shadow: 0 0 0 4px rgba(34,211,238,0.18); }
}

/* Degree track subtitle */
.timeline-track {
    font-size: 0.78rem; color: var(--text-2); margin-top: 2px;
    font-family: var(--ff-mono); letter-spacing: 0.02em;
}

/* ============================================================
   Projects
   ============================================================ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: var(--t);
}

.project-card:hover {
    border-color: var(--border-a);
    transform: translateY(-5px);
    background: var(--bg-card-h);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(34, 211, 238, 0.08);
}

.project-featured {
    grid-column: 1 / -1;
    background: linear-gradient(135deg,
        rgba(34, 211, 238, 0.06) 0%,
        rgba(167, 139, 250, 0.06) 100%);
    border-color: rgba(34, 211, 238, 0.16);
    position: relative;
    overflow: hidden;
}

.project-featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient);
}

.project-card-inner {
    padding: 28px;
}

.project-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.project-label {
    font-family: var(--ff-mono);
    font-size: 0.73rem;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.project-icon {
    font-size: 1.4rem;
    color: var(--violet);
}

.project-links {
    display: flex;
    gap: 12px;
}

.project-links a {
    color: var(--text-2);
    font-size: 1.15rem;
    transition: var(--t);
}

.project-links a:hover { color: var(--cyan); }

.project-links .project-demo-btn {
    color: #05050d;
    font-size: 0.82rem;
    align-self: center;
}

.project-links .project-demo-btn:hover {
    color: #05050d;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 211, 238, 0.28);
    filter: brightness(1.07);
}

.project-title {
    font-size: 1.2rem;
    color: var(--text-0);
    margin-bottom: 10px;
}

.project-featured .project-title {
    font-size: 1.5rem;
}

.project-desc {
    font-size: 0.9rem;
    color: var(--text-1);
    line-height: 1.75;
    margin-bottom: 18px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-repos {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.project-repos-label {
    font-family: var(--ff-mono);
    font-size: 0.66rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-3);
    opacity: 0.7;
    margin-right: 4px;
    white-space: nowrap;
}

.project-repo-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--ff-mono);
    font-size: 0.75rem;
    color: var(--text-2);
    padding: 3px 10px;
    border-radius: 100px;
    border: 1px solid var(--border);
    transition: var(--t);
    white-space: nowrap;
    text-decoration: none;
}

.project-repo-link:hover {
    color: var(--cyan);
    border-color: rgba(34, 211, 238, 0.3);
    background: rgba(34, 211, 238, 0.05);
}

.projects-cta {
    text-align: center;
    margin-top: 52px;
}

/* ============================================================
   Dual Timeline Layout
   ============================================================ */
.dual-timeline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.dual-timeline-heading {
    font-family: var(--ff-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-0);
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dual-timeline-heading i {
    color: var(--cyan);
}

.timeline-bullets {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.timeline-bullets li {
    font-size: 0.88rem;
    color: var(--text-1);
    line-height: 1.65;
    padding-left: 16px;
    position: relative;
}

.timeline-bullets li::before {
    content: '-';
    position: absolute;
    left: 0;
    color: var(--cyan);
    opacity: 0.55;
    font-size: 0.75rem;
    top: 1px;
}

/* ============================================================
   Timeline
   ============================================================ */
.timeline {
    position: relative;
    padding-left: 36px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 16px;
    bottom: 16px;
    width: 1px;
    background: linear-gradient(to bottom, var(--cyan), var(--violet) 60%, transparent);
}

.timeline-item {
    position: relative;
    padding-bottom: 40px;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-marker {
    position: absolute;
    left: -36px;
    top: 22px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--cyan);
    border: 3px solid var(--bg-0);
    box-shadow: 0 0 14px rgba(34, 211, 238, 0.55);
    z-index: 1;
}

.timeline-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 28px 30px;
    transition: var(--t);
}

.timeline-card:hover {
    border-color: var(--border-a);
    background: var(--bg-card-h);
}

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

.timeline-header h3 {
    font-size: 1.08rem;
    color: var(--text-0);
}

.timeline-org {
    font-size: 0.88rem;
    color: var(--cyan);
    font-weight: 500;
    margin-top: 5px;
}

.timeline-date {
    font-family: var(--ff-mono);
    font-size: 0.76rem;
    color: var(--text-2);
    border: 1px solid var(--border);
    padding: 4px 13px;
    border-radius: 100px;
    white-space: nowrap;
    flex-shrink: 0;
}

.timeline-card > p {
    color: var(--text-1);
    font-size: 0.92rem;
    line-height: 1.75;
    margin-bottom: 18px;
}

/* ============================================================
   Blog
   ============================================================ */
.blog-card {
    max-width: 720px;
    margin: 0 auto;
}

.blog-card-inner {
    display: flex;
    align-items: center;
    gap: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 40px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: var(--t);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.blog-card-inner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-s);
    opacity: 0;
    transition: var(--t);
    pointer-events: none;
}

.blog-card-inner:hover {
    border-color: var(--border-a);
    transform: translateY(-5px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.blog-card-inner:hover::after { opacity: 1; }

.blog-icon {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: var(--r-md);
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #06060f;
}

.blog-content {
    position: relative;
    z-index: 1;
}

.blog-label {
    font-family: var(--ff-mono);
    font-size: 0.73rem;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 8px;
}

.blog-content h3 {
    font-size: 1.25rem;
    color: var(--text-0);
    margin-bottom: 10px;
}

.blog-content p {
    color: var(--text-1);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* ============================================================
   Contact
   ============================================================ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 52px;
    align-items: start;
}

.contact-items {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border-radius: var(--r-md);
    border: 1px solid var(--border);
    background: var(--bg-card);
    transition: var(--t);
}

.contact-item:hover {
    border-color: var(--border-a);
    background: var(--bg-card-h);
    transform: translateX(5px);
}

.contact-item-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--r-sm);
    background: rgba(34, 211, 238, 0.10);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cyan);
    font-size: 0.95rem;
    flex-shrink: 0;
}

.contact-item-label {
    display: block;
    font-size: 0.72rem;
    color: var(--text-2);
    font-family: var(--ff-mono);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 2px;
}

.contact-item-value {
    display: block;
    font-size: 0.92rem;
    color: var(--text-0);
    font-weight: 500;
}

.contact-form-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 36px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

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

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

.form-group label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-1);
    font-family: var(--ff-mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.form-group input,
.form-group textarea {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 12px 16px;
    font-size: 0.94rem;
    font-family: var(--ff-sans);
    color: var(--text-0);
    transition: var(--t);
    outline: none;
    resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-2);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--cyan);
    background: rgba(34, 211, 238, 0.04);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.09);
}

/* ============================================================
   Contact - links only layout
   ============================================================ */
.contact-links-only {
    max-width: 560px;
    margin: 0 auto;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
    padding: 36px 0;
    border-top: 1px solid var(--border);
    background: var(--bg-0);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-copy {
    font-size: 0.83rem;
    color: var(--text-2);
}

.footer-socials {
    display: flex;
    gap: 14px;
}

.footer-socials a {
    color: var(--text-2);
    font-size: 1rem;
    transition: var(--t);
}

.footer-socials a:hover { color: var(--cyan); }

/* ============================================================
   Starfield Canvas
   ============================================================ */
#starfield-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.75;
}

/* ============================================================
   Three.js Hero Accent
   ============================================================ */
#threejs-hero {
    position: absolute;
    right: 9%;
    top: 50%;
    transform: translateY(-52%);
    width: 360px;
    height: 360px;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    animation: fadeInThree 1.8s ease 1s forwards;
}

#threejs-hero canvas {
    display: block;
}

@keyframes fadeInThree {
    to { opacity: 0.88; }
}

/* ============================================================
   Hero Floating Accent Dots
   ============================================================ */
.hero-accent {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

.hero-accent-1 {
    width: 4px;
    height: 4px;
    background: var(--cyan);
    top: 28%;
    left: 12%;
    opacity: 0.30;
    box-shadow: 0 0 8px var(--cyan);
    animation: floatBob 4.2s ease-in-out infinite;
}

.hero-accent-2 {
    width: 3px;
    height: 3px;
    background: var(--violet);
    top: 62%;
    right: 14%;
    opacity: 0.24;
    box-shadow: 0 0 6px var(--violet);
    animation: floatBob 5.5s ease-in-out 1.4s infinite;
}

.hero-accent-3 {
    width: 2px;
    height: 2px;
    background: var(--cyan);
    top: 75%;
    left: 22%;
    opacity: 0.18;
    box-shadow: 0 0 4px var(--cyan);
    animation: floatBob 3.8s ease-in-out 0.7s infinite;
}

@keyframes floatBob {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-8px); }
}

/* ============================================================
   Custom Cursor
   ============================================================ */
#cursor-dot {
    position: fixed;
    width: 7px;
    height: 7px;
    background: var(--cyan);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10001;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.25s;
    box-shadow: 0 0 8px var(--cyan);
}

#cursor-ring {
    position: fixed;
    width: 36px;
    height: 36px;
    border: 1.5px solid rgba(34, 211, 238, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: width 0.22s var(--ease), height 0.22s var(--ease),
                border-color 0.22s var(--ease), background 0.22s var(--ease),
                opacity 0.25s;
}

#cursor-ring.cursor-expanded {
    width: 54px;
    height: 54px;
    border-color: rgba(167, 139, 250, 0.6);
    background: rgba(34, 211, 238, 0.04);
}

@media (hover: hover) and (pointer: fine) {
    body.custom-cursor-active,
    body.custom-cursor-active * { cursor: none !important; }
}

@media (hover: none) {
    #cursor-dot,
    #cursor-ring { display: none !important; }
}

/* ============================================================
   Animated Skill Bars
   ============================================================ */
.skill-bars {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.skill-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skill-group .skill-cat-label {
    margin-bottom: 3px;
}

.skill-bar-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.skill-bar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

.skill-bar-name {
    font-family: var(--ff-mono);
    font-size: 0.74rem;
    color: var(--text-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.skill-bar-pct {
    font-family: var(--ff-mono);
    font-size: 0.69rem;
    color: var(--text-2);
    white-space: nowrap;
    flex-shrink: 0;
}

.skill-bar-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.10);
    border-radius: 100px;
    overflow: hidden;
    position: relative;
}

.skill-bar-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    border-radius: 100px;
    background: linear-gradient(90deg, var(--cyan) 0%, var(--violet) 100%);
    transition: width 1.1s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 0 8px rgba(34, 211, 238, 0.35);
}

/* ============================================================
   Responsive - Tablet
   ============================================================ */
@media (max-width: 1100px) {
    #threejs-hero {
        width: 280px;
        height: 280px;
        right: 4%;
    }
}

@media (max-width: 900px) {
    #threejs-hero { display: none; }
    .hero-accent-1, .hero-accent-2, .hero-accent-3 { display: none; }
}

@media (max-width: 960px) {
    .about-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .about-photo {
        grid-column: 1 / -1;
    }

    .certs-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* ============================================================
   Responsive - Mobile
   ============================================================ */
@media (max-width: 768px) {
    .section { padding: 80px 0; }

    /* Mobile nav drawer */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 260px;
        background: rgba(6, 6, 15, 0.97);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        flex-direction: column;
        align-items: flex-start;
        padding: 88px 32px 40px;
        gap: 2px;
        border-left: 1px solid var(--border);
        transition: right var(--t-lg);
        z-index: 1050;
    }

    .nav-links.open { right: 0; }

    .nav-links a {
        font-size: 1.08rem;
        padding: 12px 0;
        width: 100%;
        border-radius: 0;
    }

    .nav-toggle { display: flex; }

    .nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .nav-toggle.active span:nth-child(2) { opacity: 0; width: 0; }
    .nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

    /* About - single column */
    .about-grid { grid-template-columns: 1fr; }
    .about-photo { grid-column: 1; }

    /* Projects - single column */
    .projects-grid { grid-template-columns: 1fr; }
    .project-featured { grid-column: 1; }

    /* Dual timeline - single column */
    .dual-timeline { grid-template-columns: 1fr; gap: 40px; }

    /* Blog card */
    .blog-card-inner {
        flex-direction: column;
        text-align: center;
        padding: 30px 24px;
        gap: 24px;
    }

    /* Timeline */
    .timeline { padding-left: 28px; }
    .timeline::before { left: 10px; }
    .timeline-marker { left: -28px; }
    .timeline-header { flex-direction: column; gap: 10px; }

    /* Footer */
    .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    .hero-cta { flex-direction: column; align-items: center; }
    .section-header { margin-bottom: 48px; }
    .contact-form-wrap { padding: 24px; }
}

/* ============================================================
   About - Restructured Bio
   ============================================================ */
.about-position {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-0);
    line-height: 1.65;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.about-what {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.about-what-col {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 18px 16px;
    transition: border-color var(--t);
}

.about-what-col:hover {
    border-color: var(--border-a);
}

.about-what-icon {
    font-size: 1.2rem;
    color: var(--cyan);
    margin-bottom: 10px;
}

.about-what-col h4 {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-0);
    margin-bottom: 8px;
    font-family: var(--ff-mono);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.about-what-col p {
    font-size: 0.82rem;
    color: var(--text-2);
    line-height: 1.6;
    margin: 0;
}

.about-close {
    font-size: 0.9rem;
    color: var(--text-1);
    line-height: 1.7;
    font-style: italic;
    padding-top: 4px;
}

@media (max-width: 768px) {
    .about-what {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* ============================================================
   Blog - 3-Post Grid
   ============================================================ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.blog-post-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 28px 24px 22px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: var(--t);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.blog-post-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-s);
    border-radius: var(--r-lg);
    opacity: 0;
    transition: opacity var(--t);
    pointer-events: none;
}

.blog-post-card:hover {
    border-color: var(--border-a);
    transform: translateY(-5px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.blog-post-card:hover::after { opacity: 1; }

.blog-post-tag {
    position: relative;
    z-index: 1;
    display: inline-block;
    font-family: var(--ff-mono);
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 3px 10px;
    border-radius: 100px;
    margin-bottom: 16px;
    width: fit-content;
}

.blog-tag-ai   { background: rgba(34, 211, 238, 0.12); color: var(--cyan); border: 1px solid rgba(34,211,238,0.25); }
.blog-tag-proj { background: rgba(167, 139, 250, 0.12); color: var(--violet); border: 1px solid rgba(167,139,250,0.25); }
.blog-tag-eng  { background: rgba(34, 211, 238, 0.08); color: #7dd3fc; border: 1px solid rgba(125,211,252,0.2); }

.blog-post-title {
    position: relative;
    z-index: 1;
    font-size: 1.0rem;
    font-weight: 600;
    color: var(--text-0);
    line-height: 1.45;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.blog-post-excerpt {
    position: relative;
    z-index: 1;
    font-size: 0.84rem;
    color: var(--text-2);
    line-height: 1.65;
    flex-grow: 1;
    margin-bottom: 20px;
}

.blog-post-footer {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.blog-post-date {
    font-family: var(--ff-mono);
    font-size: 0.72rem;
    color: var(--text-2);
}

.blog-post-read {
    font-size: 0.78rem;
    color: var(--cyan);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: gap var(--t);
}

.blog-post-card:hover .blog-post-read { gap: 10px; }

@media (max-width: 900px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* ============================================================
   Skip Navigation
   ============================================================ */
.skip-nav {
    position: absolute;
    left: -9999px;
    top: 8px;
    z-index: 9999;
    padding: 8px 20px;
    background: var(--cyan);
    color: #06060f;
    font-weight: 600;
    border-radius: var(--r-sm);
    font-size: 0.9rem;
    text-decoration: none;
    transition: left 0s;
}

.skip-nav:focus {
    left: 8px;
}

/* ============================================================
   Circuit Board Hero Accent
   ============================================================ */
#circuit-hero {
    position: absolute;
    left: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: 420px;
    height: 360px;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    animation: fadeInThree 2.2s ease 1.2s forwards;
}

#circuit-hero svg {
    width: 100%;
    height: 100%;
}

#circuit-hero .trace {
    stroke: #22d3ee;
    stroke-width: 1.2;
    stroke-opacity: 0.18;
    fill: none;
    stroke-linecap: round;
}

#circuit-hero .via {
    fill: none;
    stroke: #22d3ee;
    stroke-width: 1.2;
    stroke-opacity: 0.22;
}

#circuit-hero .chip {
    fill: none;
    stroke: #22d3ee;
    stroke-width: 1.2;
    stroke-opacity: 0.18;
}

#circuit-hero .chip-pin {
    stroke-opacity: 0.16;
}

#circuit-hero .via-amber {
    fill: none;
    stroke: #f59e0b;
    stroke-width: 1.2;
    stroke-opacity: 0.32;
}

@media (max-width: 768px) {
    #circuit-hero { display: none; }
}

.contact-intro {
    max-width: 560px;
    margin: 0 auto 36px;
    text-align: center;
    color: var(--text-1);
    font-size: 0.95rem;
    line-height: 1.75;
}

.project-outcome {
    font-size: 0.82rem;
    color: var(--cyan);
    font-family: var(--ff-mono);
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(34, 211, 238, 0.15);
    line-height: 1.55;
    letter-spacing: 0.01em;
}

/* ============================================================
   Back to Top Button
   ============================================================ */
#back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 900;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(34, 211, 238, 0.3);
    background: rgba(12, 12, 26, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--cyan);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, border-color 0.2s ease, background 0.2s ease;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:hover {
    border-color: rgba(34, 211, 238, 0.7);
    background: rgba(34, 211, 238, 0.1);
}

#back-to-top svg {
    width: 18px;
    height: 18px;
}

/* ============================================================
   ModBridge Demo Modal
   ============================================================ */
.mb-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6, 6, 15, 0.87);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.mb-modal-overlay.is-open {
    opacity: 1;
    pointer-events: all;
}

.mb-modal {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: 12px;
    width: min(860px, 94vw);
    max-height: 88vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.75);
}

.mb-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.mb-modal-title {
    font-family: var(--ff-mono);
    font-size: 0.82rem;
    color: var(--text-0);
    letter-spacing: 0.04em;
}

.mb-modal-close {
    background: none;
    border: none;
    color: var(--text-1);
    cursor: pointer;
    font-size: 1.3rem;
    padding: 2px 8px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
    line-height: 1;
}

.mb-modal-close:hover {
    color: var(--text-0);
    background: rgba(255, 255, 255, 0.06);
}

.mb-tab-bar {
    display: flex;
    gap: 4px;
    padding: 10px 20px 0;
    background: var(--bg-0);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.mb-tab {
    font-family: var(--ff-mono);
    font-size: 0.77rem;
    padding: 7px 16px;
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    background: transparent;
    color: var(--text-1);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    letter-spacing: 0.02em;
}

.mb-tab.active {
    background: var(--bg-1);
    color: var(--cyan);
    border-color: rgba(34, 211, 238, 0.3);
}

.mb-tab:not(.active):hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-0);
}

.mb-panel {
    flex: 1;
    overflow-y: auto;
    background: var(--bg-0);
    display: flex;
    flex-direction: column;
}

.mb-term-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 14px;
    background: #111122;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

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

.mb-dot-red { background: #ff5f56; }
.mb-dot-yel { background: #ffbd2e; }
.mb-dot-grn { background: #27c93f; }

.mb-term-label {
    margin-left: auto;
    font-family: var(--ff-mono);
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.22);
    letter-spacing: 0.05em;
}

.mb-term-body {
    padding: 16px 20px;
    font-family: var(--ff-mono);
    font-size: 0.79rem;
    line-height: 1.75;
    min-height: 320px;
    flex: 1;
}

.mb-prompt   { color: #22d3ee; }
.mb-cmd-text { color: var(--text-0); }
.mb-title    { color: #a78bfa; }
.mb-hdr      { color: rgba(255, 255, 255, 0.38); }
.mb-addr     { color: #22d3ee; }
.mb-val      { color: #4ade80; }
.mb-hex      { color: #f59e0b; }
.mb-sep      { color: rgba(255, 255, 255, 0.22); }
.mb-dim      { color: rgba(255, 255, 255, 0.25); }
.mb-ok       { color: #4ade80; }

@keyframes mb-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

.mb-cursor {
    display: inline-block;
    width: 0.5em;
    height: 1em;
    background: #22d3ee;
    vertical-align: text-bottom;
    margin-left: 1px;
    animation: mb-blink 1s step-start infinite;
}

/* ============================================================
   Reduced Motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
