/* ========================================
   GLOBAL STYLES
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #0ea5e9;
    --accent: #ef4444;
    --dark-bg: #071028;       /* Page background (dark) */
    --dark-card: #0b1624;     /* Deep card color */
    --light-bg: #071028;      /* main-content background uses this */
    --card-bg: #0f1a2a;       /* card and form backgrounds */
    --text-dark: #e6f0ff;     /* primary (now light) */
    --text-light: #9fb0c8;    /* secondary text */
    --border-color: rgba(255,255,255,0.06);
    --success: #10b981;
    --shadow: 0 10px 30px rgba(2,6,23,0.6);
    --shadow-lg: 0 20px 50px rgba(2,6,23,0.7);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    background-color: var(--light-bg);
    line-height: 1.6;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* ========================================
   LAYOUT STRUCTURE
   ======================================== */

.main-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #0c3a7f 0%, var(--dark-bg) 100%);
    color: white;
    padding: 18px 18px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    box-shadow: var(--shadow);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.12) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

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

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.14);
    border-radius: 4px;
}

.main-content {
    margin-left: 280px;
    flex: 1;
    background-color: var(--light-bg);
    min-height: 100vh;
    overflow-y: auto;
    scroll-behavior: smooth;
}

/* ========================================
   SIDEBAR STYLES
   ======================================== */

.sidebar-header {
    text-align: center;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    box-shadow: 0 5px 20px rgba(14, 165, 233, 0.3);
    overflow: hidden;
}

.logo-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.logo-initials {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
}

.sidebar-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 3px;
    letter-spacing: -0.3px;
}

.sidebar-title {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========================================
   TAB NAVIGATION
   ======================================== */

.tab-navigation {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    background: transparent;
    border: 2px solid transparent;
    color: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.88rem;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
}

.tab-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    color: white;
    border-color: var(--secondary);
    box-shadow: 0 5px 15px rgba(14, 165, 233, 0.3);
}

.tab-icon {
    font-size: 1.05rem;
}

.tab-label {
    flex: 1;
    text-align: left;
}

/* ========================================
   PORTFOLIO ACCORDION NAV
   ======================================== */

.nav-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 3px 0;
    flex-shrink: 0;
}

.portfolio-nav {
    display: flex;
    flex-direction: column;
}

.portfolio-toggle {
    width: 100%;
}

.portfolio-chevron {
    margin-left: auto;
    flex-shrink: 0;
    color: rgba(255,255,255,0.45);
    transition: transform 0.25s ease;
}

.portfolio-toggle[aria-expanded="true"] .portfolio-chevron {
    transform: rotate(180deg);
}

.portfolio-submenu {
    display: none;
    flex-direction: column;
    gap: 2px;
    padding: 4px 0 6px 18px;
}

.portfolio-submenu.open {
    display: flex;
}

.project-nav-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-radius: 8px;
    color: rgba(255,255,255,0.65);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    font-family: 'Poppins', sans-serif;
    line-height: 1.3;
}

.project-nav-btn:hover {
    background: rgba(255,255,255,0.09);
    color: white;
}

.project-nav-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--secondary);
    flex-shrink: 0;
    opacity: 0.7;
}

/* ========================================
   SIDEBAR FOOTER
   ======================================== */

.sidebar-footer {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.social-icons {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 8px;
}

.social-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
}

.social-icon:hover {
    background: var(--secondary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(14, 165, 233, 0.4);
}

.sidebar-year {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

/* ========================================
   TAB CONTENT
   ======================================== */

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: tabEnter 0.38s cubic-bezier(0.4, 0, 0.2, 1) both;
}

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

.content-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 80px 50px;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.4rem;
}

h4 {
    font-size: 1.1rem;
}

p {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.8;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary);
}

/* ========================================
   SECTION TITLES
   ======================================== */

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
    display: inline-block;
    padding: 14px 36px;
    border-radius: 10px;
    font-weight: 600;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    text-align: center;
    font-family: 'Poppins', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    box-shadow: 0 5px 20px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.5);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-secondary:hover {
    background-color: var(--primary);
    color: white;
}

/* ========================================
   HOME SECTION
   ======================================== */

.home-shell {
    max-width: 1200px;
    width: 95%;
    margin: 0 auto;
    padding: 52px 0 64px;
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.home-header {
    text-align: left;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    line-height: 1.15;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 580px;
    line-height: 1.7;
}

/* --- Impact Dashboard --- */

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.metric-card {
    background: linear-gradient(145deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    box-shadow: 0 6px 28px rgba(2,6,23,0.45), inset 0 1px 0 rgba(255,255,255,0.04);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    opacity: 0.5;
    transition: opacity 0.3s;
}

.metric-card:hover {
    transform: translateY(-5px);
    border-color: rgba(14, 165, 233, 0.35);
    box-shadow: 0 16px 48px rgba(2,6,23,0.6), 0 0 0 1px rgba(14,165,233,0.08);
}

.metric-card:hover::before {
    opacity: 1;
}

.metric-card--featured {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    gap: 28px;
    padding: 22px 32px;
    background: linear-gradient(135deg, rgba(37,99,235,0.09) 0%, rgba(14,165,233,0.04) 100%);
    border-color: rgba(37,99,235,0.28);
}

.metric-card--featured .metric-number {
    font-size: 2.2rem;
    flex-shrink: 0;
}

.metric-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.metric-number {
    font-size: 2.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.metric-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.metric-sub {
    font-size: 0.78rem;
    color: var(--text-light);
    line-height: 1.45;
}

/* --- Tech Stack Ribbon --- */

.stack-ribbon {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.stack-badge {
    padding: 6px 16px;
    border: 1px solid rgba(37,99,235,0.3);
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-light);
    background: rgba(37,99,235,0.06);
    letter-spacing: 0.03em;
    transition: var(--transition);
    cursor: default;
}

.stack-badge:hover {
    background: rgba(37,99,235,0.15);
    border-color: rgba(14,165,233,0.55);
    color: var(--text-dark);
}

/* --- CTA Buttons --- */

.cta-buttons {
    display: flex;
    gap: 16px;
}

/* ========================================
   ABOUT SECTION
   ======================================== */

.about-shell {
    max-width: 1160px;
    width: 95%;
    margin: 0 auto;
    padding: 56px 0 64px;
}

.about-title {
    margin-bottom: 2.5rem;
}

.about-row {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 48px;
    align-items: center;
    padding: 32px 0;
    border-bottom: 1px solid var(--border-color);
}

.about-row:last-child {
    border-bottom: none;
}

.about-para {
    font-size: 1rem;
    line-height: 1.85;
    color: var(--text-light);
    text-align: left;
    margin: 0;
}

.about-card {
    background: linear-gradient(145deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 8px 32px rgba(2,6,23,0.45), inset 0 1px 0 rgba(255,255,255,0.03);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 4px 0 0 4px;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.about-card:hover {
    transform: translateY(-5px);
    border-color: rgba(14,165,233,0.4);
    box-shadow: 0 16px 48px rgba(2,6,23,0.6), 0 0 0 1px rgba(14,165,233,0.1);
}

.about-card:hover::before {
    opacity: 1;
}

.about-card-icon {
    font-size: 2rem;
    line-height: 1;
}

.about-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.about-card-body {
    font-size: 0.88rem;
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

/* ========================================
   EXPERTISE SECTION
   ======================================== */

.exp-shell {
    max-width: min(95vw, 1320px);
    margin: 0 auto;
    padding: 52px 0 64px;
}

.exp-master-detail {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 28px;
    align-items: start;
    margin-top: 8px;
    margin-bottom: 48px;
}

/* --- Master (left nav) --- */

.exp-master {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: sticky;
    top: 24px;
}

.exp-nav-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 18px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: linear-gradient(145deg, rgba(255,255,255,0.02), rgba(255,255,255,0.005));
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    user-select: none;
}

.exp-nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.25s;
}

.exp-nav-item:hover {
    background: linear-gradient(145deg, rgba(37,99,235,0.07), rgba(14,165,233,0.03));
    border-color: rgba(37,99,235,0.25);
    transform: translateX(4px);
}

.exp-nav-item.active {
    background: linear-gradient(145deg, rgba(37,99,235,0.12), rgba(14,165,233,0.06));
    border-color: rgba(37,99,235,0.45);
    box-shadow: 0 8px 32px rgba(2,6,23,0.45);
}

.exp-nav-item.active::before {
    opacity: 1;
}

.exp-nav-num {
    font-size: 1.35rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    flex-shrink: 0;
    width: 32px;
    line-height: 1;
}

.exp-nav-text {
    flex: 1;
    min-width: 0;
}

.exp-nav-text h3 {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.exp-nav-text p {
    font-size: 0.76rem;
    color: var(--text-light);
    margin: 0;
}

.exp-nav-arrow {
    margin-left: auto;
    flex-shrink: 0;
    font-size: 1rem;
    color: var(--secondary);
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.2s, transform 0.2s;
}

.exp-nav-item.active .exp-nav-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* --- Detail (right panel) --- */

.exp-detail {
    position: relative;
    min-height: 300px;
}

.exp-panel {
    display: none;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.exp-panel.is-visible {
    display: block;
}

.exp-panel.is-active {
    opacity: 1;
    transform: translateY(0);
}

.exp-case {
    background: linear-gradient(145deg, rgba(255,255,255,0.035) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 16px 60px rgba(2,6,23,0.5), inset 0 1px 0 rgba(255,255,255,0.04);
    position: relative;
    overflow: hidden;
}

.exp-case::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.exp-case-cat {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--secondary);
    background: rgba(14,165,233,0.1);
    border: 1px solid rgba(14,165,233,0.2);
    padding: 5px 14px;
    border-radius: 100px;
    margin-bottom: 18px;
}

.exp-case h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 22px;
    line-height: 1.25;
}

.exp-case-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 26px;
}

.exp-case-body p {
    font-size: 0.96rem;
    line-height: 1.8;
    color: var(--text-light);
    margin: 0;
}

.exp-achievement {
    background: rgba(37,99,235,0.08);
    border-left: 3px solid var(--primary);
    border-radius: 0 10px 10px 0;
    padding: 14px 20px;
    font-size: 0.9rem;
    color: var(--text-dark);
    line-height: 1.65;
    margin-bottom: 26px;
}

.exp-tools-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-light);
    margin-bottom: 10px;
}

.exp-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.exp-badge {
    padding: 5px 14px;
    border: 1px solid rgba(37,99,235,0.3);
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-light);
    background: rgba(37,99,235,0.07);
    transition: var(--transition);
    cursor: default;
}

.exp-badge:hover {
    background: rgba(37,99,235,0.18);
    border-color: rgba(14,165,233,0.5);
    color: var(--text-dark);
}

/* ========================================
   SKILLS SECTION
   ======================================== */

.skills-section {
    background: var(--card-bg);
    padding: 50px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 40px rgba(2,6,23,0.55), inset 0 1px 0 rgba(255,255,255,0.02);
    margin-top: 16px;
}

.skills-title {
    text-align: center;
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 40px;
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.skill-group h4 {
    color: var(--primary);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

.skill-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pill {
    display: inline-block;
    background: transparent;
    color: var(--text-light);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.04);
    transition: var(--transition);
    cursor: default;
}

.pill:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

/* ========================================
   EXPERIENCE SECTION
   ======================================== */

.experience-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 40px;
}

/* ── Split-view card ── */
.experience-item {
    display: grid;
    grid-template-columns: 32% 1fr;
    gap: 0;
    background: linear-gradient(145deg, rgba(255,255,255,0.025) 0%, rgba(255,255,255,0.008) 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.experience-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.experience-item:hover {
    box-shadow: 0 20px 60px rgba(2, 6, 23, 0.65);
    border-color: rgba(37, 99, 235, 0.3);
}

.experience-item:hover::before {
    opacity: 1;
}

/* ── Left column ── */
.exp-split-left {
    padding: 32px 28px;
    background: linear-gradient(160deg, rgba(12, 58, 127, 0.18) 0%, rgba(7, 16, 40, 0.1) 100%);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.exp-job-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.3;
}

.exp-company {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--secondary);
    margin: 0 0 4px;
}

.exp-tenure {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-light);
    margin: 0 0 18px;
    letter-spacing: 0.02em;
}

.exp-meta {
    margin-bottom: 14px;
}

/* Domain badge — default: logistics blue */
.exp-domain-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    background: rgba(37, 99, 235, 0.15);
    color: #7eb3ff;
    border: 1px solid rgba(37, 99, 235, 0.3);
}

.exp-domain-badge--finance {
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.28);
}

.exp-domain-badge--shipping {
    background: rgba(14, 165, 233, 0.12);
    color: #7dd3fc;
    border-color: rgba(14, 165, 233, 0.28);
}

.exp-domain-badge--agtech {
    background: rgba(132, 204, 22, 0.1);
    color: #bef264;
    border-color: rgba(132, 204, 22, 0.25);
}

.exp-domain-badge--agri {
    background: rgba(234, 179, 8, 0.1);
    color: #fde68a;
    border-color: rgba(234, 179, 8, 0.25);
}

.exp-stack-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.exp-stack-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
}

.experience-item:hover .exp-stack-tag {
    background: rgba(37, 99, 235, 0.1);
    color: #93b8ff;
    border-color: rgba(37, 99, 235, 0.2);
}

/* ── Right column ── */
.exp-split-right {
    padding: 32px 32px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.experience-description {
    margin: 0 0 20px;
    line-height: 1.8;
    color: var(--text-light);
    font-size: 0.95rem;
}

.achievements-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.achievements-list li {
    padding-left: 24px;
    position: relative;
    color: var(--text-light);
    line-height: 1.65;
    font-size: 0.92rem;
}

.achievements-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
    font-size: 1rem;
}

/* Mobile: stack left above right */
@media (max-width: 768px) {
    .experience-item {
        grid-template-columns: 1fr;
    }

    .exp-split-left {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 24px 20px;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 12px;
    }

    .exp-split-left > * {
        width: 100%;
    }

    .exp-split-right {
        padding: 24px 20px;
    }
}

/* ========================================
   CONTACT SECTION
   ======================================== */

#contact.tab-content.active {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 32px 40px;
    box-sizing: border-box;
}

/* Outer centering wrapper */
.contact-outer {
    width: 100%;
    max-width: 900px;
}

/* Unified card */
.contact-card {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    align-items: stretch;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255,255,255,0.025) 0%, rgba(255,255,255,0.01) 100%);
    box-shadow: 0 20px 60px rgba(2,6,23,0.55), inset 0 1px 0 rgba(255,255,255,0.03);
    overflow: hidden;
}

/* Vertical divider column */
.contact-divider {
    background: var(--border-color);
    width: 1px;
    align-self: stretch;
}

/* Left column */
.contact-info-col {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
    padding: 36px 32px;
    min-width: 0;
}

.contact-heading {
    font-size: 1.7rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 10px;
    line-height: 1.2;
}

.contact-intro {
    font-size: 0.92rem;
    color: var(--text-light);
    line-height: 1.7;
    margin: 0;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.contact-link-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-dark);
    transition: var(--transition);
    min-width: 0;
    overflow: hidden;
}

.contact-link-row:hover {
    background: rgba(14,165,233,0.08);
    transform: translateX(3px);
}

.contact-link-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(37,99,235,0.12);
    color: var(--secondary);
}

.contact-link-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.contact-link-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    line-height: 1;
    margin-bottom: 2px;
}

.contact-link-value {
    font-size: 0.85rem;
    color: var(--text-light);
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
    line-height: 1.3;
    max-width: 100%;
}

/* Right column */
.contact-form-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 36px 32px;
    min-width: 0;
    background: rgba(0,0,0,0.12);
}

.contact-form-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

/* ========================================
   FORM STYLES
   ======================================== */

.contact-form {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.form-group {
    margin-bottom: 10px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 9px 13px;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    background-color: rgba(255,255,255,0.04);
    color: var(--text-dark);
    font-family: 'Poppins', sans-serif;
    font-size: 0.87rem;
    transition: var(--transition);
    box-sizing: border-box;
}

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

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    background-color: rgba(255,255,255,0.06);
}

.contact-form .btn-primary {
    width: 100%;
    margin-top: 4px;
    padding: 11px 24px;
}

/* ========================================
   CASE STUDY PAGE
   ======================================== */

.case-study-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, rgba(14, 165, 233, 0.12), transparent 28%),
        linear-gradient(180deg, #071028 0%, #091423 100%);
}

.case-study-shell {
    max-width: 1120px;
    margin: 0 auto;
    padding: 48px 24px 80px;
}

.case-study-back {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
    color: var(--text-dark);
    font-weight: 600;
}

.case-study-back:hover {
    color: var(--secondary);
}

.case-study-hero {
    background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.015) 100%);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 32px;
}

.case-study-kicker {
    display: inline-block;
    margin-bottom: 14px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.12);
    color: var(--secondary);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.case-study-hero h1 {
    max-width: 760px;
    margin-bottom: 16px;
}

.case-study-lead {
    max-width: 780px;
    font-size: 1.05rem;
}

.case-study-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.meta-pill {
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: rgba(15, 26, 42, 0.8);
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
}

.case-study-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
    gap: 24px;
    align-items: start;
}

.case-study-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.case-study-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.case-panel {
    background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 16px 50px rgba(2,6,23,0.5);
}

.case-panel h2,
.case-panel h3 {
    margin-bottom: 14px;
}

.case-panel p + p,
.case-panel ul + p,
.case-panel p + ul {
    margin-top: 14px;
}

.case-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.case-list li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 10px;
    color: var(--text-light);
}

.case-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.tool-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.tool-card {
    padding: 18px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: rgba(7, 16, 40, 0.84);
}

.tool-card strong {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.code-shell {
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    overflow: hidden;
    background: #06101f;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.code-shell-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.02);
}

.code-shell-header span {
    font-size: 0.85rem;
    color: var(--text-light);
}

.code-shell pre {
    margin: 0;
    padding: 20px;
    overflow-x: auto;
}

.code-shell code {
    font-family: "Consolas", "SFMono-Regular", monospace;
    font-size: 0.92rem;
    line-height: 1.7;
}

.chart-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.chart-frame {
    border-radius: 18px;
    border: 1px solid var(--border-color);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%),
        linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(14, 165, 233, 0.04));
    padding: 18px;
}

.chart-frame img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.visualizations-panel {
    --viz-bleed: 0px;
}

.visualizations-panel .chart-frame {
    margin-left: calc(var(--viz-bleed) * -1);
    margin-right: calc(var(--viz-bleed) * -1);
}

.chart-zoom {
    display: block;
    width: 100%;
    border: 0;
    background: transparent;
    padding: 0;
    border-radius: 12px;
    cursor: zoom-in;
}

.chart-zoom:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 2px;
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(3, 8, 20, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 28px;
    z-index: 3000;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: min(96vw, 1800px);
    max-height: 92vh;
    width: auto;
    height: auto;
    border-radius: 14px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.18);
}

.chart-placeholder {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.chart-placeholder strong {
    color: var(--text-dark);
    margin-bottom: 8px;
}

.chart-caption {
    margin-top: 12px;
    font-size: 0.95rem;
    color: var(--text-light);
}

.sidebar-block h3 {
    margin-bottom: 10px;
}

.sidebar-block p,
.sidebar-block li {
    font-size: 0.95rem;
}

.inline-note {
    margin-top: 16px;
    padding: 14px 16px;
    border-left: 3px solid var(--secondary);
    border-radius: 0 12px 12px 0;
    background: rgba(14, 165, 233, 0.08);
}

/* ========================================
   STICKY PROJECT QUICK NAV
   ======================================== */

.project-quick-nav {
    position: fixed;
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 400;
    padding: 14px 12px;
    background: rgba(11, 22, 36, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(2,6,23,0.6);
}

.pqn-label {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-light);
    padding: 0 8px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    margin-bottom: 4px;
}

.pqn-link {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.81rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    border: 1px solid transparent;
}

.pqn-link:hover {
    background: rgba(37, 99, 235, 0.14);
    color: var(--text-dark);
    border-color: rgba(37, 99, 235, 0.2);
}

.pqn-link.active {
    background: rgba(14, 165, 233, 0.14);
    color: var(--secondary);
    font-weight: 600;
    border-color: rgba(14, 165, 233, 0.25);
}

.pqn-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    flex-shrink: 0;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.pqn-link.active .pqn-dot {
    background: var(--secondary);
    box-shadow: 0 0 8px rgba(14, 165, 233, 0.65);
}

.pqn-link:hover .pqn-dot {
    background: var(--secondary);
}

/* Only visible when the viewport has room beside the centered content */
@media (max-width: 1460px) {
    .project-quick-nav {
        display: none;
    }
}

/* ========================================
   PROJECT PAGINATION FOOTER
   ======================================== */

.project-pagination {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 8px;
}

.pp-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 24px 28px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(255,255,255,0.025) 0%, rgba(255,255,255,0.01) 100%);
    text-decoration: none;
    transition: border-color 0.25s ease, transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}

.pp-card::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.25s ease;
    border-radius: 20px;
    pointer-events: none;
}

.pp-prev::before {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), transparent 60%);
}

.pp-next::before {
    background: linear-gradient(225deg, rgba(14, 165, 233, 0.14), transparent 60%);
}

.pp-card:hover::before {
    opacity: 1;
}

.pp-card:hover {
    border-color: rgba(14, 165, 233, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 14px 40px rgba(2, 6, 23, 0.55);
}

.pp-dir {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-light);
}

.pp-next .pp-dir {
    flex-direction: row-reverse;
}

.pp-dir svg {
    flex-shrink: 0;
    transition: transform 0.2s ease;
    color: var(--secondary);
    opacity: 0.8;
}

.pp-prev:hover .pp-dir svg {
    transform: translateX(-3px);
}

.pp-next:hover .pp-dir svg {
    transform: translateX(3px);
}

.pp-title {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.35;
}

.pp-next {
    text-align: right;
}

@media (max-width: 640px) {
    .project-pagination {
        grid-template-columns: 1fr;
    }
    .pp-next {
        text-align: left;
    }
    .pp-next .pp-dir {
        flex-direction: row;
    }
}

/* ========================================
   CASE STUDY — TABLE OF CONTENTS (ToC)
   ======================================== */

/* Hidden at all widths by default; the min-width:1200px query
   reveals it and reshapes the surrounding grid. */
.cs-toc {
    display: none;
}

.cs-toc-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-light);
    opacity: 0.55;
    margin-bottom: 14px;
}

.cs-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cs-toc-link {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 10px;
    border-radius: 8px;
    border-left: 2px solid transparent;
    font-size: 0.83rem;
    line-height: 1.4;
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.cs-toc-link::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
    opacity: 0.35;
    transition: opacity 0.18s ease, background 0.18s ease;
}

.cs-toc-link:hover {
    color: var(--text-dark);
    background: rgba(14, 165, 233, 0.07);
}

.cs-toc-link:hover::before {
    opacity: 0.7;
}

.cs-toc-link.active {
    color: var(--secondary);
    font-weight: 600;
    border-left-color: var(--secondary);
    background: rgba(14, 165, 233, 0.09);
}

.cs-toc-link.active::before {
    opacity: 1;
    background: var(--secondary);
}

/* ========================================
   PROJECTS GRID
   ======================================== */

.projects-shell {
    padding: 48px 40px;
    max-width: 1080px;
    margin: 0 auto;
}

.projects-header {
    margin-bottom: 40px;
}

.projects-subtitle {
    color: var(--text-light);
    font-size: 1rem;
    margin-top: 8px;
    max-width: 640px;
    line-height: 1.65;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

/* ── Card ──────────────────────────────── */
.project-card {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 28px 24px 22px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 44px rgba(14, 165, 233, 0.18);
    border-color: var(--secondary);
}

.pc-category {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--secondary);
    margin-bottom: 10px;
    display: block;
}

.pc-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.4;
    margin: 0 0 12px;
}

.pc-desc {
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.7;
    flex-grow: 1;
    margin: 0 0 22px;
}

.pc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.pc-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.08);
    border: 1px solid rgba(14, 165, 233, 0.22);
    color: var(--secondary);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ── Responsive ────────────────────────── */
@media (max-width: 1100px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .projects-shell {
        padding: 32px 20px;
    }
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   RESUME / CV TAB
   ======================================== */

.resume-view {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.resume-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 40px;
    background: var(--dark-card);
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 12px;
    flex-shrink: 0;
}

.resume-view-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 2px;
    -webkit-text-fill-color: var(--text-dark);
    background: none;
}

.resume-view-sub {
    font-size: 0.82rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1;
}

.resume-dl-btn {
    padding: 10px 24px;
    font-size: 0.9rem;
    white-space: nowrap;
}

.resume-iframe-wrap {
    flex: 1;
    background: #f0f0f0;
    overflow: hidden;
}

.resume-iframe {
    width: 100%;
    height: 100%;
    min-height: calc(100vh - 80px);
    border: none;
    display: block;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1024px) {
    .sidebar {
        width: 280px;
        padding: 30px 20px;
    }

    .main-content {
        margin-left: 280px;
    }

    .content-container {
        padding: 60px 30px;
    }

    .about-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }

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

    .metric-card--featured {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 24px 20px;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .cta-buttons .btn {
        min-width: 150px;
    }

    .case-study-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 1200px) {
    .case-study-shell {
        max-width: min(95vw, 1500px);
    }

    /* Reveal the ToC column and insert it to the left of the main content */
    .cs-toc {
        display: flex;
        flex-direction: column;
        position: sticky;
        top: 36px;
        max-height: calc(100vh - 72px);
        overflow-y: auto;
        scrollbar-width: none;
        background: linear-gradient(180deg, rgba(255,255,255,0.025) 0%, rgba(255,255,255,0.01) 100%);
        border: 1px solid var(--border-color);
        border-radius: 16px;
        padding: 20px 16px;
    }

    .cs-toc::-webkit-scrollbar {
        display: none;
    }

    .case-study-grid {
        grid-template-columns: 190px minmax(0, 2.4fr) minmax(260px, 0.8fr);
    }

    /* With the ToC column present the main column is already narrower,
       so the bleed effect is not needed and would push charts into the ToC. */
    .visualizations-panel {
        --viz-bleed: 0px;
    }
}

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

    .about-shell {
        padding: 40px 24px 56px;
        width: 100%;
    }

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

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

@media (max-width: 768px) {
    .contact-outer {
        max-width: 100%;
    }

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

    .contact-divider {
        display: none;
    }

    #contact.tab-content.active {
        min-height: unset;
        align-items: stretch;
        padding: 24px 16px;
    }

    .contact-info-col,
    .contact-form-col {
        padding: 24px 20px;
    }

    .contact-form-col {
        border-top: 1px solid var(--border-color);
    }

    .portfolio-nav,
    .nav-divider {
        display: none;
    }

    .main-wrapper {
        flex-direction: column;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        padding: 30px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        border-bottom: 1px solid var(--border-color);
    }

    .sidebar-header {
        margin: 0;
        padding: 0;
        border: none;
        display: flex;
        align-items: center;
        gap: 20px;
        flex: 1;
    }

    .logo-circle {
        width: 60px;
        height: 60px;
        margin: 0;
        overflow: hidden;
        flex-shrink: 0;
    }

    .logo-initials {
        font-size: 1.3rem;
    }

    .sidebar-name {
        font-size: 1.1rem;
        margin-bottom: 2px;
    }

    .sidebar-title {
        font-size: 0.75rem;
    }

    .tab-navigation {
        flex-direction: row;
        gap: 5px;
        flex-wrap: wrap;
    }

    .tab-btn {
        padding: 10px 12px;
        font-size: 0.85rem;
        gap: 8px;
    }

    .tab-label {
        display: none;
    }

    .sidebar-footer {
        display: none;
    }

    .main-content {
        margin-left: 0;
    }

    .content-container {
        padding: 40px 20px;
    }

    .home-header {
        padding: 16px 0 0;
    }

    .hero-title {
        font-size: 1.8rem;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }

    .exp-master-detail {
        grid-template-columns: 1fr;
    }

    .exp-master {
        position: static;
    }

    .skills-container {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 25px;
    }

    .cta-buttons {
        gap: 10px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .case-study-shell {
        padding: 30px 16px 60px;
    }

    .case-study-hero,
    .case-panel {
        padding: 22px;
        border-radius: 18px;
    }

    .case-study-hero h1 {
        font-size: 2.1rem;
    }

    .tool-stack {
        grid-template-columns: 1fr;
    }

    .code-shell pre {
        padding: 16px;
    }

    .visualizations-panel {
        --viz-bleed: 0px;
    }

    .lightbox {
        padding: 12px;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 42px;
        height: 42px;
    }
}

@media (max-width: 480px) {
    .sidebar {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }

    .sidebar-header {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .logo-circle {
        width: 50px;
        height: 50px;
        overflow: hidden;
        flex-shrink: 0;
    }

    .sidebar-name {
        font-size: 1rem;
    }

    .tab-navigation {
        flex-direction: row;
        gap: 5px;
        width: 100%;
        overflow-x: auto;
    }

    .tab-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .content-container {
        padding: 30px 15px;
    }

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

    .section-title {
        font-size: 1.5rem;
    }

    .home-grid {
        gap: 15px;
    }

    .home-card {
        padding: 20px;
    }

    .exp-master-detail {
        gap: 16px;
    }

    .contact-form {
        padding: 20px;
    }

    .form-group input,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* ========================================
   HAMBURGER BUTTON (mobile only)
   ======================================== */

.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.hamburger-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.hamburger-line {
    display: block;
    width: 20px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger-btn.is-open .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.is-open .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger-btn.is-open .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ========================================
   MOBILE NAVIGATION OVERLAY
   display:none base — JS toggles display,
   then .is-open drives the CSS animation
   ======================================== */

.mobile-menu-overlay {
    /* display: none set inline; JS removes it before adding .is-open */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
}

.mobile-menu-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(7, 16, 40, 0.78);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.mobile-menu-overlay.is-open .mobile-menu-backdrop {
    opacity: 1;
}

.mobile-menu-drawer {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(320px, 85vw);
    background: linear-gradient(160deg, #0c3a7f 0%, #071028 65%);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 40px rgba(2, 6, 23, 0.8);
}

.mobile-menu-overlay.is-open .mobile-menu-drawer {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.mobile-menu-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
}

.mobile-menu-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: white;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    padding: 0;
    flex-shrink: 0;
}

.mobile-menu-close:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
}

.mobile-menu-nav {
    display: flex;
    flex-direction: column;
    padding: 12px 12px 8px;
    gap: 2px;
    flex-shrink: 0;
}

.mobile-nav-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.85);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s ease, color 0.2s ease;
    width: 100%;
}

.mobile-nav-btn:hover {
    background: rgba(37, 99, 235, 0.3);
    color: white;
}

.mobile-nav-btn.active {
    background: rgba(37, 99, 235, 0.45);
    color: white;
    border-left: 3px solid var(--primary);
    padding-left: 13px;
}

.mobile-nav-icon {
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

.mobile-menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 4px 12px;
    flex-shrink: 0;
}

.mobile-menu-projects {
    padding: 4px 12px 24px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mobile-menu-section-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 8px 16px 4px;
    margin: 0;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.92rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.mobile-nav-link::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--secondary);
    flex-shrink: 0;
    opacity: 0.7;
}

.mobile-nav-link:hover {
    background: rgba(14, 165, 233, 0.18);
    color: white;
}

/* Show hamburger & hide icon-tab-row at ≤768px */
@media (max-width: 768px) {
    .hamburger-btn {
        display: flex;
    }

    .tab-navigation {
        display: none !important;
    }
}

