@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary:       #5b5ff5;
    --primary-hover: #4a4edf;
    --text:          #333333;
    --text-light:    #64748b;
    --bg:            #f8fafc;
    --bg-alt:        #ffffff;
    --bg-dark:       #0f1225;
    --card-bg:       #ffffff;
    --border:        #e2e8f0;
    --font:          'Inter', sans-serif;
    --gradient-bg:   radial-gradient(circle at 75% 35%, rgba(91,95,245,0.15) 0%, transparent 40%);
    --whatsapp:      #25d366;
    --whatsapp-hover:#1ebe5d;
}

/* ── Reset ── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    transition: background .4s, color .4s;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; }

/* ── Dark Mode ── */
body.dark-mode {
    --bg:      #111827;
    --bg-alt:  #161f30;
    --text:    #f1f5f9;
    --text-light: #94a3b8;
    --card-bg: #1e293b;
    --border:  #334155;
}
body.dark-mode .section-header h2 { color: #f1f5f9; }
body.dark-mode .about-content,
body.dark-mode .timeline-card,
body.dark-mode .project-card,
body.dark-mode .cert-scroll-card { background: var(--card-bg); border-color: var(--border); }
body.dark-mode .exp-header h3,
body.dark-mode .edu-details h3,
body.dark-mode .project-info h3  { color: #f1f5f9; }
body.dark-mode .progress-bar     { background: #334155; }
body.dark-mode .soft-skill-badge { background: #1e3a5f; }
body.dark-mode .project-tags span{ background: #1e293b; }
body.dark-mode .skill-category h3{ color: #94a3b8; }
body.dark-mode .cert-card-body h4{ color: #f1f5f9; }
body.dark-mode .popup-title,
body.dark-mode .redirect-dialog h3 { color: #f1f5f9; }
body.dark-mode .redirect-url,
body.dark-mode .popup-tags span  { background: #1e3a5f; }
body.dark-mode .stats-strip      { background: #1e293b; border-color: #334155; }
body.dark-mode .stat-item        { border-color: #334155; }
body.dark-mode .timeline-dot     { background: var(--card-bg); }
body.dark-mode .filter-btn       { background: #1e293b; color: #94a3b8; border-color: #334155; }
body.dark-mode .filter-btn.active{ background: var(--primary); color: white; }
body.dark-mode .form-group input,
body.dark-mode .form-group textarea { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.1); color: white; }
body.dark-mode .section-alt      { background: var(--bg-alt); }

/* ── Scroll Progress Bar ── */
.scroll-progress {
    position: fixed; top: 0; left: 0; height: 3px; width: 0%;
    background: linear-gradient(90deg, var(--primary), #a78bfa);
    z-index: 9999; transition: width .1s linear;
}

/* ── Scroll Reveal ── */
.reveal { opacity:0; transform:translateY(40px); transition: opacity .7s ease, transform .7s ease; }
.reveal.active { opacity:1; transform:translateY(0); }

/* ── Typewriter ── */
.typewriter-cursor {
    display:inline-block; color:var(--primary); font-weight:300;
    animation: blink .8s step-end infinite; margin-left:2px;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* ── Container ── */
.container { max-width:1140px; margin:0 auto; padding:0 20px; }

/* ══════════════════════════════
   HEADER
══════════════════════════════ */
.header {
    display:flex; justify-content:space-between; align-items:center;
    padding:18px 40px; background:var(--bg-dark); color:white;
    position:sticky; top:0; z-index:1000;
}
.logo { font-size:22px; font-weight:700; }
.logo span { color:var(--primary); }

.nav { display:flex; gap:28px; }
.nav a { font-size:14px; font-weight:500; color:#94a3b8; transition:color .3s; position:relative; padding-bottom:5px; }
.nav a:hover, .nav a.active { color:white; }
.nav a.active::after {
    content:''; position:absolute; bottom:-2px; left:0;
    width:100%; height:2px; background:var(--primary);
}

.header-actions { display:flex; align-items:center; gap:10px; }

.theme-toggle {
    background:transparent; border:1px solid #334155; color:white;
    width:36px; height:36px; border-radius:50%; cursor:pointer;
    display:flex; align-items:center; justify-content:center; transition:all .3s;
}
.theme-toggle:hover { background:#475569; }

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

/* Mobile Nav */
.mobile-nav-overlay {
    display:none; position:fixed; inset:0; background:rgba(0,0,0,.5);
    z-index:1100; backdrop-filter:blur(2px);
}
.mobile-nav-overlay.active { display:block; }

.mobile-nav {
    position:fixed; top:0; right:-280px; width:260px; height:100vh;
    background:var(--bg-dark); z-index:1200; padding:70px 30px 30px;
    display:flex; flex-direction:column; gap:8px;
    transition:right .3s ease; box-shadow:-4px 0 20px rgba(0,0,0,.3);
}
.mobile-nav.open { right:0; }
.mobile-nav a {
    font-size:15px; font-weight:500; color:#94a3b8;
    padding:12px 0; border-bottom:1px solid rgba(255,255,255,.05);
    transition:color .3s;
}
.mobile-nav a:hover { color:white; }
.mobile-nav-close {
    position:absolute; top:18px; right:18px;
    background:transparent; border:1px solid #334155; color:white;
    width:34px; height:34px; border-radius:50%; cursor:pointer;
    display:flex; align-items:center; justify-content:center; font-size:14px;
}

/* ══════════════════════════════
   HERO
══════════════════════════════ */
.hero {
    background:var(--bg-dark); color:white;
    padding:60px 40px; display:flex; align-items:center;
    justify-content:space-between; min-height:calc(100vh - 72px);
    position:relative; overflow:hidden;
}
.hero::before {
    content:''; position:absolute; inset:0;
    background:var(--gradient-bg); pointer-events:none;
}
.hero-content { flex:1; max-width:550px; position:relative; z-index:10; }
.greeting { color:var(--primary); font-weight:600; margin-bottom:5px; font-size:16px; }
.name { font-size:60px; font-weight:700; margin-bottom:10px; line-height:1.1; letter-spacing:-1px; }
.titles { font-size:18px; font-weight:500; color:#94a3b8; margin-bottom:20px; }
.titles span { color:var(--primary); }
.description { color:#cbd5e1; margin-bottom:35px; font-size:15px; max-width:90%; }
.hero-buttons { display:flex; gap:15px; margin-bottom:40px; }

.btn {
    padding:12px 28px; border-radius:6px; font-weight:500; font-size:14px;
    cursor:pointer; transition:all .3s; display:inline-flex; align-items:center;
    gap:10px; border:none; font-family:var(--font);
}
.btn-primary { background:var(--primary); color:white; }
.btn-primary:hover { background:var(--primary-hover); transform:translateY(-2px); }
.hero .btn-outline { background:transparent; color:white; border:1px solid #475569; }
.hero .btn-outline:hover { border-color:white; background:rgba(255,255,255,.05); }
.btn-sm { padding:8px 16px; font-size:13px; }
.btn-ghost { background:var(--bg); color:var(--text); border:1px solid var(--border); }
.btn-ghost:hover { background:var(--border); }
.btn-outline { background:transparent; color:var(--text); border:1px solid var(--border); }
.btn-outline:hover { background:var(--bg); }
.btn-whatsapp { background:var(--whatsapp); color:white; width:100%; justify-content:center; font-size:15px; padding:14px; }
.btn-whatsapp:hover { background:var(--whatsapp-hover); transform:translateY(-2px); }

.social-links { display:flex; align-items:center; gap:20px; }
.social-links span { font-size:14px; color:#94a3b8; }
.icons { display:flex; gap:15px; }
.icons a {
    width:38px; height:38px; border-radius:50%;
    background:rgba(255,255,255,.03); display:flex; align-items:center;
    justify-content:center; color:white; transition:all .3s;
    border:1px solid rgba(255,255,255,.1);
}
.icons a:hover { background:var(--primary); border-color:var(--primary); transform:translateY(-2px); }

.hero-image { flex:1; display:flex; justify-content:flex-end; position:relative; z-index:10; }
.image-container { position:relative; width:400px; height:400px; max-width:100%; }
.image-container::before {
    content:''; position:absolute; top:5%; left:-5%; width:100%; height:90%;
    background-image:radial-gradient(circle,#2d3161 2px,transparent 2px);
    background-size:20px 20px; z-index:-1; opacity:.5;
}
.profile-img { width:100%; height:100%; object-fit:cover; object-position:center; border-radius:50%; opacity:.95; }
.badge {
    position:absolute; background:#fff; color:#0f1225;
    padding:10px 18px; border-radius:8px; display:flex; align-items:center;
    gap:10px; font-weight:600; font-size:13px;
    box-shadow:0 10px 25px rgba(0,0,0,.15); white-space:nowrap;
}
.badge i { color:var(--primary); font-size:16px; }
.badge-1 { top:15%; right:-30px; }
.badge-2 { top:50%; left:-100px; }
.badge-3 { bottom:20%; right:-20px; }

/* ══════════════════════════════
   STATS STRIP
══════════════════════════════ */
.stats-strip {
    background:#f0f4f8; border-top:1px solid var(--border);
    border-bottom:1px solid var(--border); padding:28px 0;
}
.stats-container {
    max-width:1140px; margin:0 auto; padding:0 20px;
    display:flex; justify-content:space-around; flex-wrap:wrap; gap:20px;
}
.stat-item {
    text-align:center; padding:0 30px;
    border-right:1px solid var(--border); flex:1; min-width:120px;
}
.stat-item:last-child { border-right:none; }
.stat-value { font-size:32px; font-weight:700; color:var(--primary); line-height:1; }
.stat-label { font-size:13px; color:var(--text-light); margin-top:4px; }

/* ══════════════════════════════
   SECTIONS
══════════════════════════════ */
.section { padding:80px 0; background:var(--bg); }
.section-alt { background:var(--bg-alt); }
.section-header { margin-bottom:40px; }
.section-header h2 {
    font-size:22px; font-weight:700; display:flex;
    align-items:center; gap:10px; color:#1e293b;
}
.section-header h2 i { color:var(--primary); }
.flex-between { display:flex; justify-content:space-between; align-items:center; }

/* About */
.about-content { background:var(--card-bg); padding:35px; border-radius:12px; box-shadow:0 2px 10px rgba(0,0,0,.02); }
.about-content p { color:var(--text-light); margin-bottom:20px; font-size:15px; }

/* ══════════════════════════════
   SKILLS
══════════════════════════════ */
.skills-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:40px; margin-bottom:48px; }

.skill-category {
    background: var(--card-bg);
    border-radius: 14px;
    padding: 24px 22px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 12px rgba(0,0,0,.04);
}

.skill-category h3 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.skill-category h3::before {
    content: '';
    display: inline-block;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
}
body.dark-mode .skill-category { background: var(--card-bg); border-color: var(--border); }

.skill-item { display:flex; align-items:center; margin-bottom:16px; gap:10px; }
.skill-item:last-child { margin-bottom: 0; }
.skill-name { width:108px; font-size:13px; color:var(--text); font-weight:500; flex-shrink:0; }

.skill-bar-wrap { flex:1; position:relative; }
.progress-bar {
    height: 8px;
    background: var(--border);
    border-radius: 99px;
    overflow: visible;
    position: relative;
}

/* Base bar fill */
.progress {
    height: 100%;
    border-radius: 99px;
    width: 0%;
    position: relative;
    transition: width 1.4s cubic-bezier(.4,0,.2,1);
}

/* ── Color tiers by percentage ── */
/* High ≥ 80% — primary blue/purple */
.progress.tier-high {
    background: linear-gradient(90deg, #5b5ff5, #818cf8);
    box-shadow: 0 0 8px rgba(91,95,245,.5), 0 0 16px rgba(91,95,245,.25);
}
/* Medium 60–79% — amber/yellow */
.progress.tier-mid {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    box-shadow: 0 0 8px rgba(245,158,11,.5), 0 0 16px rgba(245,158,11,.25);
}
/* Low < 60% — rose/red */
.progress.tier-low {
    background: linear-gradient(90deg, #ef4444, #f87171);
    box-shadow: 0 0 8px rgba(239,68,68,.5), 0 0 16px rgba(239,68,68,.25);
}

/* Glowing pulse animation on the filled bar */
.progress.tier-high { animation: glow-blue 2.4s ease-in-out infinite; }
.progress.tier-mid  { animation: glow-amber 2.4s ease-in-out infinite; }
.progress.tier-low  { animation: glow-red 2.4s ease-in-out infinite; }

@keyframes glow-blue {
    0%,100% { box-shadow: 0 0 6px rgba(91,95,245,.4),  0 0 14px rgba(91,95,245,.2); }
    50%      { box-shadow: 0 0 12px rgba(91,95,245,.75), 0 0 28px rgba(91,95,245,.4); }
}
@keyframes glow-amber {
    0%,100% { box-shadow: 0 0 6px rgba(245,158,11,.4),  0 0 14px rgba(245,158,11,.2); }
    50%      { box-shadow: 0 0 12px rgba(245,158,11,.75), 0 0 28px rgba(245,158,11,.4); }
}
@keyframes glow-red {
    0%,100% { box-shadow: 0 0 6px rgba(239,68,68,.4),  0 0 14px rgba(239,68,68,.2); }
    50%      { box-shadow: 0 0 12px rgba(239,68,68,.75), 0 0 28px rgba(239,68,68,.4); }
}

/* Shimmering sweep on the bar */
.progress::after {
    content: '';
    position: absolute;
    top: 0; left: -60%;
    width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent);
    border-radius: 99px;
    animation: shimmer 2.8s ease-in-out infinite;
}
@keyframes shimmer {
    0%   { left: -60%; opacity: 0; }
    20%  { opacity: 1; }
    80%  { opacity: 1; }
    100% { left: 110%; opacity: 0; }
}

/* Percentage label — colored to match tier */
.skill-pct { font-size:11px; font-weight:700; min-width:34px; text-align:right; }
.skill-pct.tier-high { color: #5b5ff5; }
.skill-pct.tier-mid  { color: #f59e0b; }
.skill-pct.tier-low  { color: #ef4444; }

/* ── Soft Skills ── */
.soft-skills-section { margin-top: 8px; }
.soft-skills-heading {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.soft-skills-heading i { color: var(--primary); }
body.dark-mode .soft-skills-heading { color: #f1f5f9; }

.soft-skills { display:flex; gap:12px; flex-wrap:wrap; }
.soft-skill-badge {
    background: #eef2ff;
    color: var(--primary);
    padding: 9px 20px;
    border-radius: 99px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid rgba(91,95,245,.2);
    transition: all .25s;
    cursor: default;
}
.soft-skill-badge:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(91,95,245,.35);
}
body.dark-mode .soft-skill-badge {
    background: #1e3a5f;
    border-color: rgba(91,95,245,.3);
}

/* ══════════════════════════════
   TIMELINE (Experience & Education)
══════════════════════════════ */
.timeline { position:relative; padding-left:30px; }
.timeline::before {
    content:''; position:absolute; left:10px; top:0; bottom:0;
    width:2px; background:var(--border);
}
.timeline-item { position:relative; margin-bottom:36px; }
.timeline-item:last-child { margin-bottom:0; }
.timeline-dot {
    position:absolute; left:-25px; top:18px;
    width:14px; height:14px; border-radius:50%;
    background:white; border:3px solid var(--primary);
    box-shadow:0 0 0 3px rgba(91,95,245,.15);
}
.timeline-card {
    background:var(--card-bg); border-radius:14px; padding:24px 28px;
    box-shadow:0 2px 12px rgba(0,0,0,.04); border:1px solid var(--border);
    transition:box-shadow .3s, transform .3s;
}
.timeline-card:hover { box-shadow:0 8px 24px rgba(91,95,245,.1); transform:translateY(-2px); }
.timeline-header { display:flex; justify-content:space-between; align-items:flex-start; flex-wrap:wrap; gap:8px; margin-bottom:12px; }
.timeline-title { font-size:16px; font-weight:700; color:#1e293b; }
body.dark-mode .timeline-title { color:#f1f5f9; }
.timeline-meta { display:flex; flex-direction:column; align-items:flex-end; gap:4px; }
.timeline-company { font-size:13px; color:var(--text-light); }
.timeline-duration { font-size:12px; color:var(--primary); font-weight:500; }
.timeline-type {
    font-size:11px; padding:2px 10px; border-radius:20px;
    background:#eef2ff; color:var(--primary); font-weight:600;
}
.timeline-points { padding-left:18px; margin:12px 0; }
.timeline-points li { font-size:14px; color:var(--text-light); margin-bottom:6px; list-style:disc; }
.timeline-highlight {
    margin-top:14px; padding:12px 16px; background:var(--bg);
    border-radius:8px; border-left:3px solid var(--primary);
    font-size:13px; color:var(--text-light); font-style:italic;
}
body.dark-mode .timeline-highlight { background:#0f172a; }

/* Education extras */
.edu-achievements { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.edu-achievement-badge {
    font-size:11px; padding:3px 10px; background:#fef9c3;
    color:#92400e; border-radius:20px; font-weight:500;
}
body.dark-mode .edu-achievement-badge { background:#422006; color:#fde68a; }

/* ══════════════════════════════
   PROJECT FILTERS
══════════════════════════════ */
.project-filters { display:flex; gap:10px; margin-bottom:28px; flex-wrap:wrap; }
.filter-btn {
    padding:7px 20px; border-radius:20px; font-size:13px; font-weight:500;
    border:1px solid var(--border); background:var(--card-bg);
    color:var(--text-light); cursor:pointer; transition:all .25s;
}
.filter-btn:hover { border-color:var(--primary); color:var(--primary); }
.filter-btn.active { background:var(--primary); color:white; border-color:var(--primary); }

/* ══════════════════════════════
   PROJECTS GRID
══════════════════════════════ */
.projects-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:20px; }
.project-card {
    background:var(--card-bg); border-radius:12px; overflow:hidden;
    box-shadow:0 2px 10px rgba(0,0,0,.04); transition:transform .3s, box-shadow .3s;
    cursor:pointer; border:1px solid var(--border);
}
.project-card:hover { transform:translateY(-5px); box-shadow:0 12px 28px rgba(91,95,245,.12); border-color:var(--primary); }
.project-card.hidden { display:none; }
.project-img {
    height:150px; background:#1e293b; position:relative;
    display:flex; align-items:center; justify-content:center; color:#475569;
}
.project-img.bg-light-img { background:#f1f5f9; }
.project-img::after {
    content:'View Details'; position:absolute; inset:0;
    background:rgba(91,95,245,.85); color:white; display:flex;
    align-items:center; justify-content:center; font-size:14px;
    font-weight:600; opacity:0; transition:opacity .3s;
}
.project-card:hover .project-img::after { opacity:1; }
.project-info { padding:18px; }
.project-info h3 { font-size:15px; margin-bottom:6px; color:#1e293b; font-weight:600; }
.project-info p {
    font-size:13px; color:var(--text-light); margin-bottom:12px;
    display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.project-tags { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:14px; }
.project-tags span { font-size:11px; padding:3px 8px; background:#f1f5f9; color:var(--primary); border-radius:4px; font-weight:500; }
.project-links { display:flex; justify-content:space-between; align-items:center; }
.project-links a { color:#64748b; transition:color .3s; font-size:14px; }
.project-links a:hover { color:var(--primary); }
.live-demo { font-size:13px; font-weight:500; color:var(--primary) !important; display:flex; align-items:center; gap:6px; }

/* ══════════════════════════════
   CERTIFICATIONS SCROLL
══════════════════════════════ */
.cert-scroll-controls { display:flex; align-items:center; gap:10px; }
.cert-counter { font-size:13px; color:var(--text-light); font-weight:500; min-width:40px; text-align:center; }
.scroll-btn {
    width:34px; height:34px; border-radius:50%; border:1px solid var(--border);
    background:var(--card-bg); color:var(--text-light); cursor:pointer;
    display:flex; align-items:center; justify-content:center; transition:all .3s; font-size:12px;
}
.scroll-btn:hover { background:var(--primary); border-color:var(--primary); color:white; }
.certs-scroll-wrapper { position:relative; overflow:hidden; }
.certs-scroll-wrapper::before,
.certs-scroll-wrapper::after {
    content:''; position:absolute; top:0; bottom:0; width:40px; z-index:2; pointer-events:none;
}
.certs-scroll-wrapper::before { left:0; background:linear-gradient(to right, var(--bg-alt), transparent); }
.certs-scroll-wrapper::after  { right:0; background:linear-gradient(to left, var(--bg-alt), transparent); }
.certs-scroll-track {
    display:flex; gap:20px; overflow-x:auto; scroll-behavior:smooth;
    padding:10px 4px 20px; scrollbar-width:none; -ms-overflow-style:none;
}
.certs-scroll-track::-webkit-scrollbar { display:none; }
.cert-scroll-card {
    flex:0 0 240px; background:var(--card-bg); border-radius:14px; overflow:hidden;
    box-shadow:0 2px 12px rgba(0,0,0,.05); cursor:pointer;
    transition:transform .3s, box-shadow .3s; border:1px solid var(--border);
}
.cert-scroll-card:hover { transform:translateY(-6px); box-shadow:0 12px 28px rgba(91,95,245,.15); border-color:var(--primary); }
.cert-scroll-card:hover .cert-card-overlay { opacity:1; }
.cert-card-img { height:150px; display:flex; align-items:center; justify-content:center; position:relative; overflow:hidden; }
.cert-card-img img { width:100%; height:100%; object-fit:cover; }
.cert-card-img-placeholder { width:100%; height:100%; display:flex; align-items:center; justify-content:center; font-size:48px; font-weight:800; }
.cert-card-overlay {
    position:absolute; inset:0; background:rgba(91,95,245,.85);
    display:flex; align-items:center; justify-content:center;
    opacity:0; transition:opacity .3s; color:white; font-size:14px; font-weight:600; gap:8px;
}
.cert-card-body { padding:16px; }
.cert-card-body h4 { font-size:14px; font-weight:600; color:#1e293b; margin-bottom:4px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cert-card-body .cert-issuer { font-size:12px; color:var(--text-light); margin-bottom:6px; }
.cert-card-body .cert-date { font-size:11px; color:var(--primary); font-weight:500; }
.cert-bg-hackerrank   { background:linear-gradient(135deg,#e0f2fe,#bae6fd); }
.cert-bg-coursera     { background:linear-gradient(135deg,#eff6ff,#dbeafe); }
.cert-bg-udemy        { background:linear-gradient(135deg,#fce7f3,#fbcfe8); }
.cert-bg-greatlearning{ background:linear-gradient(135deg,#f0fdf4,#bbf7d0); }
.cert-bg-google       { background:linear-gradient(135deg,#fef9c3,#fde68a); }
.cert-bg-ibm          { background:linear-gradient(135deg,#e0e7ff,#c7d2fe); }
.cert-bg-default      { background:linear-gradient(135deg,#f1f5f9,#e2e8f0); }
.cert-icon-text-hackerrank   { color:#0284c7; }
.cert-icon-text-coursera     { color:#2563eb; }
.cert-icon-text-udemy        { color:#db2777; }
.cert-icon-text-greatlearning{ color:#16a34a; }
.cert-icon-text-google       { color:#d97706; }
.cert-icon-text-ibm          { color:#4f46e5; }
.cert-icon-text-default      { color:#64748b; }

/* ══════════════════════════════
   POPUP
══════════════════════════════ */
.popup-overlay {
    position:fixed; inset:0; background:rgba(0,0,0,.65);
    backdrop-filter:blur(4px); z-index:9000;
    display:flex; align-items:center; justify-content:center; padding:20px;
    opacity:0; pointer-events:none; transition:opacity .3s;
}
.popup-overlay.active { opacity:1; pointer-events:all; }
.popup-card {
    background:var(--card-bg); border-radius:18px; width:100%;
    max-width:560px; max-height:90vh; overflow-y:auto;
    box-shadow:0 25px 60px rgba(0,0,0,.25); position:relative;
    transform:scale(.92) translateY(20px); transition:transform .3s; scrollbar-width:thin;
}
.popup-overlay.active .popup-card { transform:scale(1) translateY(0); }
.popup-close {
    position:absolute; top:16px; right:16px; width:34px; height:34px;
    border-radius:50%; border:1px solid var(--border); background:var(--card-bg);
    color:var(--text-light); cursor:pointer; display:flex; align-items:center;
    justify-content:center; z-index:10; transition:all .2s; font-size:14px;
}
.popup-close:hover { background:#fee2e2; border-color:#fca5a5; color:#dc2626; }
.popup-img-wrap { position:relative; height:220px; border-radius:18px 18px 0 0; overflow:hidden; }
.popup-img-placeholder { width:100%; height:100%; display:flex; align-items:center; justify-content:center; font-size:72px; font-weight:800; }
.popup-img { width:100%; height:100%; object-fit:cover; }
.popup-badge {
    position:absolute; top:14px; left:14px; background:rgba(255,255,255,.9);
    color:#1e293b; font-size:11px; font-weight:600; padding:4px 10px;
    border-radius:20px; backdrop-filter:blur(4px);
}
.popup-body { padding:24px 28px 28px; }
.popup-issuer { font-size:12px; font-weight:600; color:var(--primary); text-transform:uppercase; letter-spacing:.5px; margin-bottom:6px; }
.popup-title { font-size:20px; font-weight:700; color:#1e293b; margin-bottom:12px; line-height:1.3; }
.popup-desc { font-size:14px; color:var(--text-light); line-height:1.7; margin-bottom:18px; }
.popup-tags { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:18px; }
.popup-tags span { font-size:12px; padding:4px 12px; background:#eef2ff; color:var(--primary); border-radius:20px; font-weight:500; }
.popup-meta {
    display:flex; flex-wrap:wrap; gap:16px; margin-bottom:22px;
    padding:14px 16px; background:var(--bg); border-radius:10px; border:1px solid var(--border);
}
.popup-meta-item { display:flex; align-items:center; gap:8px; font-size:13px; color:var(--text-light); }
.popup-meta-item i { color:var(--primary); font-size:13px; width:14px; }
.popup-meta-item strong { color:var(--text); }
.popup-actions { display:flex; gap:12px; flex-wrap:wrap; }
.popup-actions .btn { flex:1; min-width:120px; justify-content:center; }

/* ══════════════════════════════
   REDIRECT CONFIRMATION CARD
══════════════════════════════ */
.redirect-overlay {
    position:fixed; inset:0; background:rgba(0,0,0,.7);
    backdrop-filter:blur(8px); z-index:9999;
    display:flex; align-items:center; justify-content:center; padding:20px;
    opacity:0; pointer-events:none; transition:opacity .3s;
}
.redirect-overlay.active { opacity:1; pointer-events:all; }

.redirect-dialog {
    background:var(--card-bg); border-radius:20px; padding:36px 32px 28px;
    max-width:440px; width:100%; text-align:center;
    box-shadow:0 24px 60px rgba(0,0,0,.35);
    transform:scale(.88) translateY(24px);
    transition:transform .35s cubic-bezier(.34,1.56,.64,1);
    position:relative; overflow:hidden;
}
.redirect-overlay.active .redirect-dialog { transform:scale(1) translateY(0); }

/* Decorative top stripe */
.redirect-dialog::before {
    content:''; position:absolute; top:0; left:0; right:0; height:4px;
    background:var(--primary);
}

/* Header row: icon + badge */
.redirect-dialog-header {
    display:flex; flex-direction:column; align-items:center; gap:10px; margin-bottom:18px;
}

.redirect-icon {
    width:64px; height:64px; border-radius:50%;
    display:flex; align-items:center; justify-content:center;
    font-size:24px; flex-shrink:0;
    background:#eef2ff; color:var(--primary);
    box-shadow:0 0 0 8px rgba(91,95,245,.08);
}
.redirect-icon-whatsapp  { background:#dcfce7; color:#16a34a; box-shadow:0 0 0 8px rgba(37,211,102,.08); }
.redirect-icon-github    { background:#f1f5f9; color:#24292f; box-shadow:0 0 0 8px rgba(36,41,47,.08); }
.redirect-icon-linkedin  { background:#dbeafe; color:#0a66c2; box-shadow:0 0 0 8px rgba(10,102,194,.08); }
.redirect-icon-demo      { background:#ede9fe; color:#7c3aed; box-shadow:0 0 0 8px rgba(124,58,237,.08); }
.redirect-icon-cert      { background:#fef3c7; color:#d97706; box-shadow:0 0 0 8px rgba(217,119,6,.08); }
.redirect-icon-resume    { background:#f3e8ff; color:#7c3aed; box-shadow:0 0 0 8px rgba(124,58,237,.08); }
.redirect-icon-external  { background:#eef2ff; color:var(--primary); box-shadow:0 0 0 8px rgba(91,95,245,.08); }

.redirect-type-badge {
    font-size:11px; font-weight:700; padding:3px 12px; border-radius:99px;
    text-transform:uppercase; letter-spacing:.6px;
}
.redirect-badge-whatsapp  { background:#dcfce7; color:#16a34a; }
.redirect-badge-github    { background:#f1f5f9; color:#24292f; }
.redirect-badge-linkedin  { background:#dbeafe; color:#0a66c2; }
.redirect-badge-demo      { background:#ede9fe; color:#7c3aed; }
.redirect-badge-cert      { background:#fef3c7; color:#d97706; }
.redirect-badge-resume    { background:#f3e8ff; color:#7c3aed; }
.redirect-badge-external  { background:#eef2ff; color:var(--primary); }

.redirect-dialog h3 { font-size:18px; font-weight:700; color:#1e293b; margin-bottom:8px; }
body.dark-mode .redirect-dialog h3 { color:#f1f5f9; }
.redirect-dialog p { font-size:14px; color:var(--text-light); margin-bottom:16px; line-height:1.6; }

.redirect-url-wrap {
    display:flex; align-items:center; gap:8px;
    background:var(--bg); border:1px solid var(--border);
    border-radius:10px; padding:10px 14px; margin-bottom:12px; text-align:left;
}
.redirect-url-icon { color:var(--text-light); font-size:12px; flex-shrink:0; }
.redirect-url { font-size:12px; color:var(--primary); font-family:monospace; word-break:break-all; flex:1; }

.redirect-note {
    font-size:12px; color:var(--text-light); margin-bottom:24px;
    display:flex; align-items:center; justify-content:center; gap:6px;
}
.redirect-note::before {
    content:'\f05a'; font-family:'Font Awesome 6 Free'; font-weight:900;
    font-size:11px; color:var(--text-light);
}

.redirect-actions { display:flex; gap:12px; }
.redirect-actions .btn { flex:1; justify-content:center; }

.btn-dark     { background:#24292f; color:white; border:none; }
.btn-dark:hover { background:#1a1f24; transform:translateY(-2px); }
.btn-linkedin { background:#0a66c2; color:white; border:none; }
.btn-linkedin:hover { background:#0958a8; transform:translateY(-2px); }
.btn-cert     { background:#d97706; color:white; border:none; }
.btn-cert:hover { background:#b45309; transform:translateY(-2px); }


/* ══════════════════════════════
   TOAST
══════════════════════════════ */
.toast {
    position:fixed; bottom:30px; left:50%; transform:translateX(-50%) translateY(80px);
    background:#1e293b; color:white; padding:14px 24px; border-radius:10px;
    display:flex; align-items:center; gap:10px; font-size:14px; font-weight:500;
    box-shadow:0 8px 24px rgba(0,0,0,.2); z-index:9998;
    transition:transform .4s cubic-bezier(.34,1.56,.64,1), opacity .4s;
    opacity:0; pointer-events:none;
}
.toast.show { transform:translateX(-50%) translateY(0); opacity:1; pointer-events:all; }
.toast i { color:var(--whatsapp); font-size:18px; }

/* ══════════════════════════════
   BACK TO TOP
══════════════════════════════ */
.back-to-top {
    position:fixed; bottom:30px; right:30px; width:44px; height:44px;
    border-radius:50%; background:var(--primary); color:white; border:none;
    cursor:pointer; display:flex; align-items:center; justify-content:center;
    font-size:16px; box-shadow:0 4px 14px rgba(91,95,245,.4);
    opacity:0; pointer-events:none; transform:translateY(20px);
    transition:all .3s; z-index:800;
}
.back-to-top.visible { opacity:1; pointer-events:all; transform:translateY(0); }
.back-to-top:hover { background:var(--primary-hover); transform:translateY(-3px); }

/* ══════════════════════════════
   FOOTER / CONTACT
══════════════════════════════ */
.footer { background:var(--bg-dark); color:white; padding-top:70px; }
.footer-container {
    display:flex; justify-content:space-between; gap:40px;
    padding-bottom:50px; border-bottom:1px solid rgba(255,255,255,.05);
}
.footer-left { flex:1; max-width:300px; }
.footer-left h2 { font-size:20px; margin-bottom:15px; font-weight:600; }
.footer-desc { color:#94a3b8; font-size:13px; margin-bottom:25px; }
.contact-info { display:flex; flex-direction:column; gap:14px; }
.contact-item { display:flex; align-items:center; gap:14px; color:#cbd5e1; font-size:13px; }
.contact-item i { width:16px; color:#94a3b8; }

.footer-middle { flex:1; max-width:420px; }
.form-title { font-size:16px; font-weight:600; color:white; margin-bottom:6px; display:flex; align-items:center; gap:8px; }
.form-title i { color:var(--whatsapp); }
.form-subtitle { font-size:13px; color:#94a3b8; margin-bottom:20px; }
.contact-form { display:flex; flex-direction:column; gap:14px; }
.form-row { display:flex; gap:12px; }
.form-group { display:flex; flex-direction:column; gap:4px; flex:1; }
.form-group input,
.form-group textarea {
    width:100%; padding:11px 15px;
    background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.1);
    border-radius:8px; color:white; font-family:var(--font); font-size:13px;
    transition:border-color .3s;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color:#64748b; }
.form-group input:focus,
.form-group textarea:focus { outline:none; border-color:var(--primary); }
.form-group input.error,
.form-group textarea.error { border-color:#f87171; }
.form-error { font-size:11px; color:#f87171; min-height:14px; }

.footer-right { flex:1; max-width:250px; display:flex; flex-direction:column; gap:25px; }
.find-me p { font-size:13px; color:#94a3b8; margin-bottom:12px; }
.find-me .social-icons { display:flex; gap:8px; }
.find-me .social-icons a {
    width:36px; height:36px; border-radius:50%;
    background:rgba(255,255,255,.05); display:flex; align-items:center;
    justify-content:center; color:white; transition:all .3s; font-size:14px;
}
.find-me .social-icons a:hover { background:var(--primary); }
.find-me .social-icons a.wa:hover { background:var(--whatsapp); }
.quote-box {
    background:rgba(255,255,255,.02); padding:20px; border-radius:8px;
    border-left:3px solid var(--primary);
}
.quote-box i { color:rgba(255,255,255,.1); font-size:20px; margin-bottom:10px; display:block; }
.quote-box p { font-size:12px; color:#e2e8f0; margin-bottom:15px; font-style:italic; line-height:1.5; }
.signature { font-family:'Brush Script MT',cursive; font-size:18px; color:var(--primary); }
.footer-bottom { padding:20px 0; }
.bottom-flex { display:flex; justify-content:space-between; align-items:center; color:#64748b; font-size:12px; }

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */
@media (max-width:1024px) {
    .projects-grid { grid-template-columns:repeat(2,1fr); }
    .hero { flex-direction:column; text-align:center; padding:60px 20px; }
    .hero-content { margin-bottom:50px; }
    .hero-buttons, .social-links, .icons { justify-content:center; }
    .footer-container { flex-direction:column; }
    .footer-left, .footer-middle, .footer-right { max-width:100%; }
}
@media (max-width:768px) {
    .nav { display:none; }
    .hamburger { display:flex; }
    .header { padding:15px 20px; }
    .skills-grid { grid-template-columns:1fr; gap:16px; }
    .projects-grid { grid-template-columns:1fr 1fr; }
    .timeline { padding-left:20px; }
    .timeline-header { flex-direction:column; }
    .timeline-meta { align-items:flex-start; }
    .form-row { flex-direction:column; }
    .badge { font-size:11px; padding:6px 12px; }
    .badge-1 { top:10%; right:0; }
    .badge-2 { top:50%; left:-10px; }
    .badge-3 { bottom:10%; right:0; }
    .stats-container { gap:10px; }
    .stat-item { border-right:none; border-bottom:1px solid var(--border); padding:10px 0; }
    .stat-item:last-child { border-bottom:none; }
    .name { font-size:42px; }
}
@media (max-width:480px) {
    .projects-grid { grid-template-columns:1fr; }
    .hero-buttons { flex-direction:column; align-items:center; }
}

/* ══════════════════════════════
   RESUME NOT AVAILABLE POPUP
══════════════════════════════ */
.resume-na-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.72);
    backdrop-filter: blur(8px);
    z-index: 9998;
    display: flex; align-items: center; justify-content: center; padding: 20px;
    opacity: 0; pointer-events: none;
    transition: opacity .3s;
}
.resume-na-overlay.active { opacity: 1; pointer-events: all; }

.resume-na-card {
    background: var(--card-bg);
    border-radius: 22px;
    padding: 40px 32px 32px;
    max-width: 420px; width: 100%;
    text-align: center;
    box-shadow: 0 28px 70px rgba(0,0,0,.3);
    position: relative; overflow: hidden;
    transform: scale(.88) translateY(28px);
    transition: transform .38s cubic-bezier(.34,1.56,.64,1);
}
.resume-na-overlay.active .resume-na-card { transform: scale(1) translateY(0); }

/* Top accent stripe */
.resume-na-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.resume-na-close {
    position: absolute; top: 14px; right: 14px;
    width: 32px; height: 32px; border-radius: 50%;
    border: 1px solid var(--border); background: var(--card-bg);
    color: var(--text-light); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; transition: all .2s;
}
.resume-na-close:hover { background: #fee2e2; border-color: #fca5a5; color: #dc2626; }

.resume-na-icon {
    width: 72px; height: 72px; border-radius: 50%;
    background: #fef3c7;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 14px;
    font-size: 28px; color: #d97706;
    box-shadow: 0 0 0 10px rgba(245,158,11,.08);
}

.resume-na-badge {
    display: inline-block;
    font-size: 11px; font-weight: 700;
    padding: 3px 12px; border-radius: 99px;
    background: #fef3c7; color: #d97706;
    text-transform: uppercase; letter-spacing: .6px;
    margin-bottom: 14px;
}

.resume-na-card h3 {
    font-size: 19px; font-weight: 700; color: #1e293b; margin-bottom: 10px;
}
body.dark-mode .resume-na-card h3 { color: #f1f5f9; }

.resume-na-card > p {
    font-size: 14px; color: var(--text-light); line-height: 1.65; margin-bottom: 22px;
}

.resume-na-divider {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 18px;
}
.resume-na-divider::before,
.resume-na-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
}
.resume-na-divider span {
    font-size: 12px; color: var(--text-light); white-space: nowrap; font-weight: 500;
}

.resume-na-actions {
    display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
    margin-bottom: 18px;
}

.resume-na-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 20px; border-radius: 8px; border: none;
    font-size: 13px; font-weight: 600; cursor: pointer;
    transition: all .25s; font-family: var(--font);
    flex: 1; min-width: 110px; justify-content: center;
}
.resume-na-btn-wa    { background: #25d366; color: white; }
.resume-na-btn-wa:hover { background: #1ebe5d; transform: translateY(-2px); box-shadow: 0 4px 14px rgba(37,211,102,.35); }
.resume-na-btn-email { background: var(--primary); color: white; }
.resume-na-btn-email:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 4px 14px rgba(91,95,245,.35); }
.resume-na-btn-contact { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.resume-na-btn-contact:hover { background: var(--border); transform: translateY(-2px); }

.resume-na-dismiss {
    background: none; border: none; color: var(--text-light);
    font-size: 13px; cursor: pointer; font-family: var(--font);
    padding: 6px 12px; border-radius: 6px; transition: color .2s;
    text-decoration: underline; text-underline-offset: 3px;
}
.resume-na-dismiss:hover { color: var(--text); }

/* ══════════════════════════════
   LEETCODE SECTION
══════════════════════════════ */
:root {
    --lc-orange:  #ffa116;
    --lc-easy:    #00b8a3;
    --lc-medium:  #ffc01e;
    --lc-hard:    #ff375f;
    --lc-bg:      #1a1a2e;
}

/* Section heading icon */
.lc-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 6px;
    background: var(--lc-orange);
    font-style: normal; flex-shrink: 0;
    /* LeetCode SVG logo as mask */
    position: relative;
}
.lc-icon::after {
    content: '';
    display: block;
    width: 16px; height: 16px;
    background: white;
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 95 111' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M68.0,84.0 L32.0,84.0 L32.0,95.0 L68.0,95.0 Z M54.3,15.4 L41.7,15.4 L10.0,55.5 L41.7,95.6 L54.3,95.6 L22.6,55.5 Z M85.0,55.5 L53.3,15.4 L40.7,15.4 L72.4,55.5 L40.7,95.6 L53.3,95.6 Z'/%3E%3C/svg%3E");
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 95 111' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M68.0,84.0 L32.0,84.0 L32.0,95.0 L68.0,95.0 Z M54.3,15.4 L41.7,15.4 L10.0,55.5 L41.7,95.6 L54.3,95.6 L22.6,55.5 Z M85.0,55.5 L53.3,15.4 L40.7,15.4 L72.4,55.5 L40.7,95.6 L53.3,95.6 Z'/%3E%3C/svg%3E");
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
}

/* LeetCode profile button */
.btn-lc {
    background: var(--lc-orange); color: white; border: none;
}
.btn-lc:hover { background: #e8900f; transform: translateY(-2px); }

/* ── Stats Row ── */
.lc-stats-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}
.lc-stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px 16px;
    text-align: center;
    transition: transform .25s, box-shadow .25s;
}
.lc-stat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,.08); }
.lc-stat-icon {
    font-size: 20px; margin-bottom: 8px;
}
.lc-stat-value {
    font-size: 26px; font-weight: 800; line-height: 1;
    margin-bottom: 4px;
}
.lc-stat-label {
    font-size: 11px; color: var(--text-light); font-weight: 500;
    text-transform: uppercase; letter-spacing: .5px;
}
.lc-stat-card.total   .lc-stat-value { color: var(--lc-orange); }
.lc-stat-card.easy    .lc-stat-value { color: var(--lc-easy); }
.lc-stat-card.medium  .lc-stat-value { color: var(--lc-medium); }
.lc-stat-card.hard    .lc-stat-value { color: var(--lc-hard); }
.lc-stat-card.streak  .lc-stat-value { color: var(--primary); }

/* ── Plan Banner ── */
.lc-plan-banner {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    border: 1px solid rgba(255,161,22,.2);
    position: relative;
    overflow: hidden;
}
.lc-plan-banner::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--lc-orange), #ff375f, var(--lc-orange));
    background-size: 200% 100%;
    animation: lc-stripe 3s linear infinite;
}
@keyframes lc-stripe {
    0%   { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}
.lc-plan-info { flex: 1; min-width: 200px; }
.lc-plan-title {
    font-size: 16px; font-weight: 700; color: white; margin-bottom: 6px;
    display: flex; align-items: center; gap: 8px;
}
.lc-plan-title i { color: var(--lc-orange); }
.lc-plan-goal { font-size: 13px; color: #94a3b8; line-height: 1.5; margin-bottom: 10px; }
.lc-plan-meta { display: flex; gap: 16px; flex-wrap: wrap; }
.lc-plan-meta-item {
    font-size: 12px; color: #cbd5e1;
    display: flex; align-items: center; gap: 6px;
}
.lc-plan-meta-item i { color: var(--lc-orange); font-size: 11px; }
.lc-plan-progress { min-width: 160px; text-align: center; }
.lc-plan-ring-wrap {
    position: relative; width: 90px; height: 90px; margin: 0 auto 8px;
}
.lc-plan-ring {
    width: 90px; height: 90px;
    transform: rotate(-90deg);
}
.lc-plan-ring-bg { fill: none; stroke: rgba(255,255,255,.1); stroke-width: 8; }
.lc-plan-ring-fill {
    fill: none; stroke: var(--lc-orange); stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 251.2;
    stroke-dashoffset: 251.2;
    transition: stroke-dashoffset 1.4s cubic-bezier(.4,0,.2,1);
}
.lc-plan-ring-pct {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 800; color: white;
}
.lc-plan-ring-label { font-size: 12px; color: #94a3b8; }

/* ── Section label ── */
.lc-section-label {
    font-size: 14px; font-weight: 700; color: var(--text);
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 18px;
}
.lc-section-label i { color: var(--primary); }
.lc-section-hint {
    font-size: 12px; font-weight: 400; color: var(--text-light);
    margin-left: auto;
}
body.dark-mode .lc-section-label { color: #f1f5f9; }

/* ── Topic Cards Grid ── */
.lc-topics-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-bottom: 32px;
}
.lc-topic-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px 16px;
    cursor: pointer;
    transition: transform .25s, box-shadow .25s, border-color .25s;
    position: relative;
    overflow: hidden;
}
.lc-topic-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--topic-color, var(--primary));
    opacity: .7;
}
.lc-topic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0,0,0,.1);
    border-color: var(--topic-color, var(--primary));
}
.lc-topic-card:hover::before { opacity: 1; }

.lc-topic-icon {
    width: 36px; height: 36px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; margin-bottom: 12px;
    background: color-mix(in srgb, var(--topic-color, var(--primary)) 15%, transparent);
    color: var(--topic-color, var(--primary));
}
.lc-topic-name {
    font-size: 13px; font-weight: 700; color: #1e293b;
    margin-bottom: 4px; line-height: 1.3;
}
body.dark-mode .lc-topic-name { color: #f1f5f9; }
.lc-topic-count {
    font-size: 12px; color: var(--text-light); margin-bottom: 12px;
}
.lc-topic-count strong { color: var(--topic-color, var(--primary)); }

/* Mini progress bar on card */
.lc-topic-bar-track {
    height: 5px; background: var(--border); border-radius: 99px; overflow: hidden;
}
.lc-topic-bar-fill {
    height: 100%; border-radius: 99px;
    background: var(--topic-color, var(--primary));
    width: 0%;
    transition: width 1.2s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 0 6px color-mix(in srgb, var(--topic-color, var(--primary)) 60%, transparent);
}

.lc-topic-status {
    font-size: 10px; font-weight: 700; padding: 2px 8px;
    border-radius: 99px; margin-top: 10px; display: inline-block;
    text-transform: uppercase; letter-spacing: .4px;
}
.lc-status-done    { background: #dcfce7; color: #16a34a; }
.lc-status-progress{ background: #eef2ff; color: var(--primary); }
.lc-status-started { background: #fef3c7; color: #d97706; }
.lc-status-none    { background: #f1f5f9; color: #64748b; }

/* ── Language Distribution ── */
.lc-lang-row {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px 24px;
}
.lc-lang-title {
    font-size: 13px; font-weight: 700; color: var(--text-light);
    text-transform: uppercase; letter-spacing: .6px;
    margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.lc-lang-title i { color: var(--primary); }
.lc-lang-bars { display: flex; flex-direction: column; gap: 12px; }
.lc-lang-item { display: flex; align-items: center; gap: 12px; }
.lc-lang-name { font-size: 13px; font-weight: 600; width: 90px; color: var(--text); }
.lc-lang-track { flex: 1; height: 8px; background: var(--border); border-radius: 99px; overflow: hidden; }
.lc-lang-fill {
    height: 100%; border-radius: 99px; width: 0%;
    transition: width 1.2s cubic-bezier(.4,0,.2,1);
}
.lc-lang-pct { font-size: 12px; font-weight: 700; width: 36px; text-align: right; }

/* ══════════════════════════════
   LEETCODE TOPIC POPUP
══════════════════════════════ */
.lc-popup-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.7); backdrop-filter: blur(8px);
    z-index: 9100;
    display: flex; align-items: center; justify-content: center; padding: 20px;
    opacity: 0; pointer-events: none; transition: opacity .3s;
}
.lc-popup-overlay.active { opacity: 1; pointer-events: all; }

.lc-popup-card {
    background: var(--card-bg);
    border-radius: 20px; width: 100%; max-width: 580px;
    max-height: 90vh; overflow-y: auto;
    box-shadow: 0 28px 70px rgba(0,0,0,.3);
    transform: scale(.9) translateY(20px);
    transition: transform .35s cubic-bezier(.34,1.56,.64,1);
    scrollbar-width: thin;
}
.lc-popup-overlay.active .lc-popup-card { transform: scale(1) translateY(0); }

.lc-popup-close {
    position: absolute; top: 14px; right: 14px;
    width: 32px; height: 32px; border-radius: 50%;
    border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.1);
    color: white; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; transition: all .2s; z-index: 10;
}
.lc-popup-close:hover { background: rgba(255,255,255,.25); }

/* Coloured header band */
.lc-popup-header {
    padding: 28px 28px 24px;
    display: flex; align-items: flex-start; gap: 18px;
    border-radius: 20px 20px 0 0;
    position: relative;
}
.lc-popup-header-icon {
    width: 52px; height: 52px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: white; flex-shrink: 0;
    background: rgba(255,255,255,.2);
}
.lc-popup-header-info { flex: 1; }
.lc-popup-status-badge {
    font-size: 10px; font-weight: 700; padding: 2px 10px;
    border-radius: 99px; background: rgba(255,255,255,.2);
    color: white; text-transform: uppercase; letter-spacing: .5px;
    display: inline-block; margin-bottom: 6px;
}
.lc-popup-title {
    font-size: 20px; font-weight: 800; color: white; margin-bottom: 4px;
}
.lc-popup-progress-text { font-size: 13px; color: rgba(255,255,255,.75); }

/* Body */
.lc-popup-body { padding: 24px 28px 28px; }

.lc-popup-bar-wrap {
    display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
}
.lc-popup-bar-track {
    flex: 1; height: 10px; background: var(--border);
    border-radius: 99px; overflow: hidden;
}
.lc-popup-bar-fill {
    height: 100%; border-radius: 99px; width: 0%;
    transition: width 1.2s cubic-bezier(.4,0,.2,1);
}
.lc-popup-bar-pct { font-size: 14px; font-weight: 800; min-width: 40px; text-align: right; }

/* Difficulty split */
.lc-popup-diff-row {
    display: flex; gap: 12px; margin-bottom: 22px; flex-wrap: wrap;
}
.lc-diff-chip {
    flex: 1; min-width: 80px;
    padding: 12px 14px; border-radius: 10px; text-align: center;
}
.lc-diff-chip-val { font-size: 22px; font-weight: 800; line-height: 1; }
.lc-diff-chip-label { font-size: 11px; font-weight: 600; margin-top: 3px; text-transform: uppercase; letter-spacing: .4px; }
.lc-diff-easy   { background: #d1fae5; }
.lc-diff-easy   .lc-diff-chip-val   { color: var(--lc-easy); }
.lc-diff-easy   .lc-diff-chip-label { color: #065f46; }
.lc-diff-medium { background: #fef3c7; }
.lc-diff-medium .lc-diff-chip-val   { color: #d97706; }
.lc-diff-medium .lc-diff-chip-label { color: #92400e; }
.lc-diff-hard   { background: #fee2e2; }
.lc-diff-hard   .lc-diff-chip-val   { color: var(--lc-hard); }
.lc-diff-hard   .lc-diff-chip-label { color: #991b1b; }
body.dark-mode .lc-diff-easy   { background: #064e3b; }
body.dark-mode .lc-diff-medium { background: #451a03; }
body.dark-mode .lc-diff-hard   { background: #450a0a; }

/* Blocks */
.lc-popup-block { margin-bottom: 20px; }
.lc-popup-block:last-child { margin-bottom: 0; }
.lc-popup-block-title {
    font-size: 12px; font-weight: 700; color: var(--text-light);
    text-transform: uppercase; letter-spacing: .6px;
    margin-bottom: 10px; display: flex; align-items: center; gap: 7px;
}
.lc-popup-block-title i { color: var(--primary); }

.lc-popup-problems { display: flex; flex-wrap: wrap; gap: 8px; }
.lc-problem-tag {
    font-size: 12px; padding: 4px 12px; border-radius: 6px;
    background: #f1f5f9; color: #1e293b; font-weight: 500;
    border: 1px solid var(--border);
}
body.dark-mode .lc-problem-tag { background: #1e293b; color: #e2e8f0; }

.lc-popup-notes {
    font-size: 14px; color: var(--text-light); line-height: 1.7;
    padding: 14px 16px; background: var(--bg);
    border-radius: 10px; border-left: 3px solid var(--primary);
    font-style: italic;
}

.lc-popup-plan-block .lc-popup-block-title i { color: var(--lc-orange); }
.lc-popup-plan {
    font-size: 14px; color: var(--text-light); line-height: 1.7;
    padding: 14px 16px; background: var(--bg);
    border-radius: 10px; border-left: 3px solid var(--lc-orange);
}
body.dark-mode .lc-popup-notes,
body.dark-mode .lc-popup-plan { background: #0f172a; }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .lc-stats-row    { grid-template-columns: repeat(3, 1fr); }
    .lc-topics-grid  { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .lc-stats-row    { grid-template-columns: repeat(2, 1fr); }
    .lc-topics-grid  { grid-template-columns: repeat(2, 1fr); }
    .lc-plan-banner  { flex-direction: column; }
    .lc-section-hint { display: none; }
}
@media (max-width: 480px) {
    .lc-stats-row    { grid-template-columns: repeat(2, 1fr); }
    .lc-topics-grid  { grid-template-columns: 1fr 1fr; }
}

/* ══════════════════════════════
   LC SUMMARY CARD (section entry)
══════════════════════════════ */
.lc-summary-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%);
    border-radius: 18px;
    padding: 28px 32px;
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
    cursor: pointer;
    border: 1px solid rgba(255,161,22,.25);
    position: relative;
    overflow: hidden;
    transition: transform .3s, box-shadow .3s;
}
.lc-summary-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(255,161,22,.2);
    border-color: rgba(255,161,22,.5);
}
.lc-summary-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--lc-orange), #ff375f, #a78bfa, var(--lc-orange));
    background-size: 300% 100%;
    animation: lc-stripe 4s linear infinite;
}
/* Subtle grid pattern */
.lc-summary-card::after {
    content: '';
    position: absolute; inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,.04) 1px, transparent 1px);
    background-size: 22px 22px;
    pointer-events: none;
}

.lc-summary-left {
    display: flex; align-items: center; gap: 16px; flex-shrink: 0;
}
.lc-summary-avatar {
    width: 56px; height: 56px; border-radius: 14px;
    background: var(--lc-orange);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 900; color: white;
    box-shadow: 0 0 0 4px rgba(255,161,22,.2);
    overflow: hidden; flex-shrink: 0;
}
.lc-summary-avatar img { width: 100%; height: 100%; object-fit: cover; }
.lc-summary-name {
    font-size: 16px; font-weight: 700; color: white; margin-bottom: 3px;
}
.lc-summary-rank {
    font-size: 12px; color: var(--lc-orange); font-weight: 600; margin-bottom: 6px;
}
.lc-summary-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.lc-summary-badge-pill {
    font-size: 10px; padding: 2px 8px; border-radius: 99px;
    background: rgba(255,161,22,.15); color: var(--lc-orange);
    border: 1px solid rgba(255,161,22,.3); font-weight: 600;
}

.lc-summary-stats {
    display: flex; gap: 20px; flex-wrap: wrap; flex: 1;
}
.lc-summary-stat {
    text-align: center; min-width: 60px;
}
.lc-summary-stat-val {
    font-size: 24px; font-weight: 800; line-height: 1;
}
.lc-summary-stat-label {
    font-size: 10px; color: #94a3b8; margin-top: 3px;
    text-transform: uppercase; letter-spacing: .4px;
}
.lc-summary-stat.s-total  .lc-summary-stat-val { color: var(--lc-orange); }
.lc-summary-stat.s-easy   .lc-summary-stat-val { color: var(--lc-easy); }
.lc-summary-stat.s-medium .lc-summary-stat-val { color: var(--lc-medium); }
.lc-summary-stat.s-hard   .lc-summary-stat-val { color: var(--lc-hard); }
.lc-summary-stat.s-streak .lc-summary-stat-val { color: #a78bfa; }

/* Ring */
.lc-summary-ring-wrap {
    position: relative; width: 80px; height: 80px; flex-shrink: 0;
}
.lc-summary-ring { width: 80px; height: 80px; transform: rotate(-90deg); }
.lc-summary-ring-inner {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
}
.lc-summary-ring-pct { font-size: 16px; font-weight: 800; color: white; line-height: 1; }
.lc-summary-ring-label { font-size: 9px; color: #94a3b8; margin-top: 2px; text-transform: uppercase; }

/* CTA arrow */
.lc-summary-cta {
    display: flex; flex-direction: column; align-items: center;
    gap: 6px; color: rgba(255,255,255,.5); font-size: 12px;
    flex-shrink: 0; transition: color .3s;
}
.lc-summary-card:hover .lc-summary-cta { color: var(--lc-orange); }
.lc-summary-cta i:first-child { font-size: 20px; }
.lc-cta-arrow { font-size: 14px; animation: lc-bounce 1.4s ease-in-out infinite; }
@keyframes lc-bounce {
    0%,100% { transform: translateX(0); }
    50%      { transform: translateX(4px); }
}

/* ══════════════════════════════
   LC FULL POPUP (wide dashboard)
══════════════════════════════ */
.lc-popup-card-full {
    max-width: 780px !important;
}

/* Dark header inside popup */
.lc-full-header {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    padding: 24px 28px 20px;
    border-radius: 20px 20px 0 0;
    display: flex; align-items: center;
    justify-content: space-between; gap: 16px;
    border-bottom: 1px solid rgba(255,161,22,.2);
    position: relative;
}
.lc-full-header::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--lc-orange), #ff375f, #a78bfa);
    border-radius: 20px 20px 0 0;
}
.lc-full-header-left { display: flex; align-items: center; gap: 14px; }
.lc-full-avatar {
    width: 48px; height: 48px; border-radius: 12px;
    background: var(--lc-orange);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 900; color: white;
    overflow: hidden; flex-shrink: 0;
}
.lc-full-avatar img { width: 100%; height: 100%; object-fit: cover; }
.lc-full-username { font-size: 15px; font-weight: 700; color: white; }
.lc-full-rank { font-size: 12px; color: var(--lc-orange); font-weight: 600; margin-top: 2px; }

.lc-full-body { padding: 24px 28px 28px; }

/* Stats inside popup */
.lc-full-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

/* Plan inside popup — compact horizontal */
.lc-full-plan {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 14px;
    padding: 18px 22px;
    display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
    border: 1px solid rgba(255,161,22,.2);
    margin-bottom: 4px;
    position: relative; overflow: hidden;
}
.lc-full-plan::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--lc-orange), #ff375f, var(--lc-orange));
    background-size: 200% 100%;
    animation: lc-stripe 3s linear infinite;
}
.lc-full-plan-info { flex: 1; min-width: 180px; }
.lc-full-plan-title {
    font-size: 14px; font-weight: 700; color: white;
    display: flex; align-items: center; gap: 7px; margin-bottom: 5px;
}
.lc-full-plan-title i { color: var(--lc-orange); }
.lc-full-plan-goal { font-size: 12px; color: #94a3b8; line-height: 1.5; margin-bottom: 8px; }
.lc-full-plan-meta { display: flex; gap: 14px; flex-wrap: wrap; }
.lc-full-plan-meta span {
    font-size: 11px; color: #cbd5e1;
    display: flex; align-items: center; gap: 5px;
}
.lc-full-plan-meta i { color: var(--lc-orange); font-size: 10px; }
.lc-full-plan-ring-wrap {
    position: relative; width: 72px; height: 72px; flex-shrink: 0;
}
.lc-full-plan-ring { width: 72px; height: 72px; transform: rotate(-90deg); }
.lc-full-plan-ring-inner {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
}
.lc-full-plan-ring-pct { font-size: 15px; font-weight: 800; color: white; line-height: 1; }
.lc-full-plan-ring-label { font-size: 9px; color: #94a3b8; margin-top: 1px; }

/* Back button in topic sub-view */
.lc-topic-view-back { padding: 16px 28px 0; }
.lc-back-btn {
    background: none; border: 1px solid var(--border);
    color: var(--text-light); font-size: 13px; font-weight: 600;
    padding: 7px 14px; border-radius: 8px; cursor: pointer;
    display: inline-flex; align-items: center; gap: 7px;
    transition: all .2s; font-family: var(--font);
}
.lc-back-btn:hover { background: var(--bg); color: var(--text); }

/* Responsive for popup */
@media (max-width: 768px) {
    .lc-popup-card-full { max-width: 100% !important; }
    .lc-full-stats { grid-template-columns: repeat(3, 1fr); }
    .lc-summary-stats { gap: 12px; }
    .lc-summary-card { gap: 16px; padding: 20px; }
}
@media (max-width: 480px) {
    .lc-full-stats { grid-template-columns: repeat(2, 1fr); }
    .lc-summary-stats { display: grid; grid-template-columns: repeat(3, 1fr); }
}

/* ══════════════════════════════
   LEETCODE & PHONE REDIRECT TYPES
══════════════════════════════ */
.redirect-icon-leetcode { background: #fff7ed; color: #ffa116; box-shadow: 0 0 0 8px rgba(255,161,22,.08); }
.redirect-icon-phone    { background: #f0fdf4; color: #16a34a; box-shadow: 0 0 0 8px rgba(22,163,74,.08); }
.redirect-badge-leetcode{ background: #fff7ed; color: #ffa116; }
.redirect-badge-phone   { background: #f0fdf4; color: #16a34a; }
.btn-leetcode { background: #ffa116; color: white; border: none; }
.btn-leetcode:hover { background: #e8900f; transform: translateY(-2px); }
.btn-phone    { background: #16a34a; color: white; border: none; }
.btn-phone:hover { background: #15803d; transform: translateY(-2px); }

/* LeetCode SVG icon inside redirect icon circle */
.redirect-icon-leetcode .lc-redirect-icon {
    display: inline-block;
    width: 26px; height: 26px;
    background: #ffa116;
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 95 111' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M68.0,84.0 L32.0,84.0 L32.0,95.0 L68.0,95.0 Z M54.3,15.4 L41.7,15.4 L10.0,55.5 L41.7,95.6 L54.3,95.6 L22.6,55.5 Z M85.0,55.5 L53.3,15.4 L40.7,15.4 L72.4,55.5 L40.7,95.6 L53.3,95.6 Z'/%3E%3C/svg%3E");
    mask-repeat: no-repeat; mask-position: center; mask-size: contain;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 95 111' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M68.0,84.0 L32.0,84.0 L32.0,95.0 L68.0,95.0 Z M54.3,15.4 L41.7,15.4 L10.0,55.5 L41.7,95.6 L54.3,95.6 L22.6,55.5 Z M85.0,55.5 L53.3,15.4 L40.7,15.4 L72.4,55.5 L40.7,95.6 L53.3,95.6 Z'/%3E%3C/svg%3E");
    -webkit-mask-repeat: no-repeat; -webkit-mask-position: center; -webkit-mask-size: contain;
}

/* LeetCode SVG icon inside btn-leetcode */
.btn-leetcode .lc-btn-icon {
    display: inline-block;
    width: 16px; height: 16px;
    background: white;
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 95 111' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M68.0,84.0 L32.0,84.0 L32.0,95.0 L68.0,95.0 Z M54.3,15.4 L41.7,15.4 L10.0,55.5 L41.7,95.6 L54.3,95.6 L22.6,55.5 Z M85.0,55.5 L53.3,15.4 L40.7,15.4 L72.4,55.5 L40.7,95.6 L53.3,95.6 Z'/%3E%3C/svg%3E");
    mask-repeat: no-repeat; mask-position: center; mask-size: contain;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 95 111' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M68.0,84.0 L32.0,84.0 L32.0,95.0 L68.0,95.0 Z M54.3,15.4 L41.7,15.4 L10.0,55.5 L41.7,95.6 L54.3,95.6 L22.6,55.5 Z M85.0,55.5 L53.3,15.4 L40.7,15.4 L72.4,55.5 L40.7,95.6 L53.3,95.6 Z'/%3E%3C/svg%3E");
    -webkit-mask-repeat: no-repeat; -webkit-mask-position: center; -webkit-mask-size: contain;
    vertical-align: middle;
}

/* ── LeetCode icon in hero social icons ── */
.lc-hero-icon {
    font-style: normal;
    display: inline-block;
    width: 17px; height: 17px;
    background: #ffa116;
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 95 111' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M68.0,84.0 L32.0,84.0 L32.0,95.0 L68.0,95.0 Z M54.3,15.4 L41.7,15.4 L10.0,55.5 L41.7,95.6 L54.3,95.6 L22.6,55.5 Z M85.0,55.5 L53.3,15.4 L40.7,15.4 L72.4,55.5 L40.7,95.6 L53.3,95.6 Z'/%3E%3C/svg%3E");
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 95 111' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M68.0,84.0 L32.0,84.0 L32.0,95.0 L68.0,95.0 Z M54.3,15.4 L41.7,15.4 L10.0,55.5 L41.7,95.6 L54.3,95.6 L22.6,55.5 Z M85.0,55.5 L53.3,15.4 L40.7,15.4 L72.4,55.5 L40.7,95.6 L53.3,95.6 Z'/%3E%3C/svg%3E");
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
    line-height: 1;
    vertical-align: middle;
    transition: background .3s;
}
/* When inside the hero social icon circle, inherit white on hover */
.icons a:hover .lc-hero-icon { background: white; }

/* ── LeetCode icon in footer ── */
.lc-footer-icon {
    font-style: normal;
    display: inline-block;
    width: 16px; height: 16px;
    background: #ffa116;
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 95 111' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M68.0,84.0 L32.0,84.0 L32.0,95.0 L68.0,95.0 Z M54.3,15.4 L41.7,15.4 L10.0,55.5 L41.7,95.6 L54.3,95.6 L22.6,55.5 Z M85.0,55.5 L53.3,15.4 L40.7,15.4 L72.4,55.5 L40.7,95.6 L53.3,95.6 Z'/%3E%3C/svg%3E");
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 95 111' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M68.0,84.0 L32.0,84.0 L32.0,95.0 L68.0,95.0 Z M54.3,15.4 L41.7,15.4 L10.0,55.5 L41.7,95.6 L54.3,95.6 L22.6,55.5 Z M85.0,55.5 L53.3,15.4 L40.7,15.4 L72.4,55.5 L40.7,95.6 L53.3,95.6 Z'/%3E%3C/svg%3E");
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
    line-height: 1;
    vertical-align: middle;
    flex-shrink: 0;
    transition: background .3s;
}
/* Footer social circle hover */
.find-me .social-icons a:hover .lc-footer-icon { background: white; }
/* Footer contact item hover */
.contact-item.clickable:hover .lc-footer-icon { background: white; }

/* ── Clickable contact items ── */
.contact-item.clickable {
    cursor: pointer;
    border-radius: 8px;
    padding: 4px 8px;
    margin: -4px -8px;
    transition: background .2s;
}
.contact-item.clickable:hover {
    background: rgba(255,255,255,.06);
}
.contact-item.clickable:hover span {
    color: var(--lc-orange);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.contact-item.clickable:hover i {
    color: white;
}


/* ══════════════════════════════
   ENHANCEMENTS — v2
══════════════════════════════ */

/* ── 1. Hero animated particle mesh ── */
.hero-particles {
    position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1;
}
.hero-particles span {
    position: absolute;
    border-radius: 50%;
    background: rgba(91,95,245,.18);
    animation: particle-float linear infinite;
}
@keyframes particle-float {
    0%   { transform: translateY(0) scale(1); opacity: .6; }
    50%  { opacity: .3; }
    100% { transform: translateY(-120vh) scale(.6); opacity: 0; }
}

/* ── 2. Hero badge float animation ── */
@keyframes badge-float {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-8px); }
}
.badge-1 { animation: badge-float 3.2s ease-in-out infinite; }
.badge-2 { animation: badge-float 3.8s ease-in-out 0.6s infinite; }
.badge-3 { animation: badge-float 3.5s ease-in-out 1.2s infinite; }

/* ── 3. Theme toggle icon spin ── */
.theme-toggle i {
    transition: transform .4s cubic-bezier(.34,1.56,.64,1), opacity .2s;
}
.theme-toggle.spinning i {
    transform: rotate(360deg) scale(1.3);
}

/* ── 4. Stats count-up — no extra CSS needed, handled by JS ── */

/* ── 5. Project card letter initial placeholder ── */
.project-img-initial {
    width: 64px; height: 64px; border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; font-weight: 800; color: white;
    position: relative; z-index: 1;
}

/* ── 6. Skill category accent top borders ── */
.skill-category.cat-languages {
    border-top: 3px solid #5b5ff5;
}
.skill-category.cat-web {
    border-top: 3px solid #10b981;
}
.skill-category.cat-tools {
    border-top: 3px solid #8b5cf6;
}
.skill-category.cat-languages h3::before { background: #5b5ff5; }
.skill-category.cat-web       h3::before { background: #10b981; }
.skill-category.cat-tools     h3::before { background: #8b5cf6; }

/* ── 7. Mobile nav active state ── */
.mobile-nav a.active {
    color: white;
    background: rgba(91,95,245,.12);
    border-radius: 6px;
    padding-left: 10px;
}
.mobile-nav a.active::after {
    content: '';
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--primary);
    margin-left: auto;
    flex-shrink: 0;
}
.mobile-nav a {
    display: flex;
    align-items: center;
}

/* ── 8. Textarea character counter ── */
.char-counter {
    font-size: 11px;
    color: var(--text-light);
    text-align: right;
    margin-top: 2px;
    transition: color .2s;
}
.char-counter.warn  { color: #f59e0b; }
.char-counter.limit { color: #ef4444; }

/* ── 9. Timeline animated connector line ── */
.timeline::before {
    transform-origin: top;
    transform: scaleY(0);
    transition: transform 1.2s cubic-bezier(.4,0,.2,1);
}
.timeline.line-animated::before {
    transform: scaleY(1);
}

/* ── 10. Section-alt stronger contrast ── */
.section-alt { background: #f0f4f8; }
body.dark-mode .section-alt { background: var(--bg-alt); }

/* ── 11. About section — richer layout ── */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 24px;
}
.about-highlight-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: transform .25s, box-shadow .25s;
}
.about-highlight-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(91,95,245,.1);
}
.about-highlight-icon {
    width: 42px; height: 42px; border-radius: 10px;
    background: #eef2ff; color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
}
.about-highlight-text h4 {
    font-size: 14px; font-weight: 700; color: #1e293b; margin-bottom: 4px;
}
body.dark-mode .about-highlight-text h4 { color: #f1f5f9; }
.about-highlight-text p {
    font-size: 12px; color: var(--text-light); line-height: 1.5; margin: 0;
}
@media (max-width: 600px) {
    .about-grid { grid-template-columns: 1fr; }
}

/* ── 12. overflow:hidden on html when popup open ── */
html.popup-open { overflow: hidden; }

/* ── 13. Project card initial colors ── */
.proj-initial-ai   { background: linear-gradient(135deg, #1e293b, #334155); }
.proj-initial-web  { background: linear-gradient(135deg, #1e3a5f, #1e40af); }
.proj-initial-ml   { background: linear-gradient(135deg, #3b0764, #6d28d9); }
.proj-initial-data { background: linear-gradient(135deg, #064e3b, #065f46); }
.proj-initial-default { background: linear-gradient(135deg, #1e293b, #475569); }

/* ── 14. Cert scroll dots indicator ── */
.cert-dots {
    display: flex; justify-content: center; gap: 6px; margin-top: 12px;
}
.cert-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--border); transition: all .3s; cursor: pointer;
}
.cert-dot.active {
    background: var(--primary); width: 20px; border-radius: 4px;
}

/* ── 15. Responsive: projects 1-col below 600px ── */
@media (max-width: 600px) {
    .projects-grid { grid-template-columns: 1fr; }
}

/* ── 16. Hero badges stack on very small screens ── */
@media (max-width: 380px) {
    .badge-1, .badge-2, .badge-3 {
        position: static;
        margin: 4px auto;
        display: inline-flex;
    }
    .image-container {
        display: flex; flex-direction: column; align-items: center;
        height: auto;
    }
    .profile-img { width: 200px; height: 200px; }
}

/* ── 17. LeetCode summary mobile grid ── */
@media (max-width: 600px) {
    .lc-summary-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        width: 100%;
    }
    .lc-summary-ring-wrap { display: none; }
    .lc-summary-cta { display: none; }
}

/* ── 18. color-mix fallback for lc-topic-icon ── */
.lc-topic-icon {
    background: rgba(91,95,245,.12); /* fallback for browsers without color-mix */
}

/* ── 19. Nav compact labels on medium screens ── */
@media (max-width: 1100px) and (min-width: 769px) {
    .nav { gap: 18px; }
    .nav a { font-size: 13px; }
}
