/* style.css */

/* ===================================
   GLOBAL
=================================== */

:root {
    --bg:        #080d1a;
    --bg-alt:    #0d1425;
    --card:      #111827;
    --card-2:    #1a2332;
    --border:    rgba(255,255,255,0.06);
    --primary:   #3b82f6;
    --cyan:      #06b6d4;
    --indigo:    #818cf8;
    --teal:      #14b8a6;
    --green:     #22c55e;
    --gold:      #f59e0b;
    --text:      #f1f5f9;
    --muted:     #64748b;
    --muted2:    #94a3b8;
    --radius:    16px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    overflow-x: hidden;
    font-size: 16px;
    line-height: 1.7;
    /* Prevent tap highlight on mobile */
    -webkit-tap-highlight-color: transparent;
}

img { max-width: 100%; height: auto; display: block; }

/* ===================================
   UTILITY
=================================== */

.section-badge {
    display: inline-block;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--primary);
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 2px;
    padding: 6px 18px;
    border-radius: 100px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.section-title-center {
    font-size: clamp(1.75rem, 5vw, 2.8rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.section-title-left {
    font-size: clamp(1.75rem, 5vw, 2.8rem);
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 20px;
    line-height: 1.2;
}

.section-subtitle {
    color: var(--muted2);
    font-size: 1rem;
    margin-bottom: 0;
}

.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); }

/* ===================================
   NAVBAR
=================================== */

.custom-navbar {
    background: rgba(8, 13, 26, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
    transition: all 0.3s;
}

.custom-navbar.scrolled {
    background: rgba(8, 13, 26, 0.98);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.navbar-brand {
    font-family: 'Space Mono', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text) !important;
    letter-spacing: 1px;
}

.brand-brackets { color: var(--cyan); }

.nav-link {
    color: var(--muted2) !important;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 14px !important;
    border-radius: 8px;
    transition: all 0.2s;
    letter-spacing: 0.3px;
}

.nav-link:hover, .nav-link.active {
    color: var(--text) !important;
    background: rgba(255,255,255,0.06);
}

.nav-link.active { color: var(--cyan) !important; }

/* Mobile navbar dropdown */
.navbar-collapse {
    background: transparent;
}

@media (max-width: 991px) {
    .navbar-collapse.show {
        background: rgba(8, 13, 26, 0.98);
        border: 1px solid var(--border);
        border-radius: 12px;
        margin-top: 10px;
        padding: 8px;
    }
    .navbar-nav { gap: 2px !important; }
    .nav-link {
        padding: 10px 16px !important;
        font-size: 0.95rem;
    }
}

/* ===================================
   HERO
=================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 0 60px;
    position: relative;
    overflow: hidden;
}

.hero-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(59,130,246,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59,130,246,0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 40%, transparent 100%);
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    pointer-events: none;
}

.hero-orb-1 {
    width: 500px; height: 500px;
    background: var(--primary);
    top: -150px; left: -100px;
}

.hero-orb-2 {
    width: 350px; height: 350px;
    background: var(--cyan);
    bottom: 0; right: -80px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: var(--green);
    font-size: 0.82rem;
    padding: 7px 16px;
    border-radius: 100px;
    font-weight: 500;
}

.badge-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--green);
    flex-shrink: 0;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
    50% { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
}

.hero-name {
    font-size: clamp(2.4rem, 7vw, 5.5rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -2px;
    margin-top: 20px;
    margin-bottom: 0;
}

.hero-name-accent { color: var(--cyan); }

.hero-motto {
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.72rem, 2.5vw, 1rem);
    color: var(--muted2);
    font-weight: 400;
    margin-top: 20px;
    min-height: 1.6em;
    letter-spacing: 0.3px;
    word-break: break-word;
}

.hero-motto::after {
    content: '|';
    color: var(--cyan);
    animation: blink 1s step-end infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.hero-description {
    color: var(--muted2);
    max-width: 560px;
    font-size: 0.95rem;
    line-height: 1.8;
}

.btn-primary-custom {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 13px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.92rem;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
}

.btn-primary-custom:hover {
    background: #2563eb;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(59,130,246,0.35);
}

.btn-outline-custom {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    padding: 13px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.92rem;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
}

.btn-outline-custom:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.15);
    color: var(--text);
    transform: translateY(-2px);
}

/* Hero Code Card Visual */
.hero-card-visual {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px;
    width: 100%;
    max-width: 400px;
    font-family: 'Space Mono', monospace;
    font-size: 0.82rem;
    position: relative;
    box-shadow: 0 24px 64px rgba(0,0,0,0.4);
}

.hero-card-visual::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 21px;
    background: linear-gradient(135deg, rgba(59,130,246,0.3), rgba(6,182,212,0.1), transparent);
    z-index: -1;
}

.hcv-inner { display: flex; flex-direction: column; gap: 10px; }

.hcv-tag { color: var(--muted); font-size: 0.78rem; }

.hcv-line { display: flex; gap: 8px; flex-wrap: wrap; }

.hcv-key  { color: var(--indigo); }
.hcv-eq   { color: var(--muted); }
.hcv-val  { color: #86efac; }
.hcv-num  { color: #fda4af; }
.hcv-str  { color: #fcd34d; }
.hcv-bool { color: var(--cyan); }

.hcv-divider {
    height: 1px;
    background: var(--border);
    margin: 6px 0;
}

.hcv-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.hcv-chips span {
    background: rgba(59,130,246,0.12);
    border: 1px solid rgba(59,130,246,0.2);
    color: var(--primary);
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.72rem;
}

/* Hero Stats */
.hero-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    margin-top: 60px;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 12px;
    text-align: center;
    border-right: 1px solid var(--border);
    gap: 4px;
}

.hero-stat:last-child { border-right: none; }

.hs-top {
    display: flex;
    align-items: baseline;
    gap: 3px;
    line-height: 1;
}

.hs-num {
    font-family: 'Space Mono', monospace;
    font-size: clamp(1.4rem, 3.5vw, 2rem);
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.hs-suffix {
    font-size: 0.82rem;
    color: var(--muted2);
    font-weight: 500;
}

.hs-label {
    font-size: 0.7rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 6px;
}

.hs-divider {
    width: 24px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    opacity: 0.35;
    margin-top: 6px;
}

/* ===================================
   REVEAL ANIMATIONS
=================================== */

.reveal, .reveal-item {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible, .reveal-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================
   ABOUT
=================================== */

.about-badge {
    display: inline-block;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: var(--cyan);
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 2px;
    padding: 6px 18px;
    border-radius: 100px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.about-text {
    color: var(--muted2);
    line-height: 1.8;
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.about-text strong { color: var(--text); }

.about-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.ai-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted2);
    font-size: 0.85rem;
    word-break: break-word;
}

.ai-item i { color: var(--cyan); font-size: 1rem; flex-shrink: 0; }

.about-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 20px;
    height: 100%;
    transition: all 0.3s;
}

.about-card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(0,0,0,0.3); }

.about-card i {
    font-size: 1.6rem;
    margin-bottom: 12px;
    display: block;
}

.about-card h5 {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.about-card p { color: var(--muted2); font-size: 0.84rem; margin: 0; line-height: 1.6; }

.ac-blue i  { color: var(--primary); }
.ac-cyan i  { color: var(--cyan); }
.ac-indigo i{ color: var(--indigo); }
.ac-teal i  { color: var(--teal); }

.ac-blue:hover  { border-color: rgba(59,130,246,0.3); }
.ac-cyan:hover  { border-color: rgba(6,182,212,0.3); }
.ac-indigo:hover{ border-color: rgba(129,140,248,0.3); }
.ac-teal:hover  { border-color: rgba(20,184,166,0.3); }

/* ===================================
   EDUCATION
=================================== */

.edu-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    height: 100%;
    display: flex;
    gap: 20px;
    transition: all 0.3s;
}

.edu-card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(0,0,0,0.3); }

.active-edu { border-color: rgba(59,130,246,0.35); }

.edu-icon {
    width: 48px; height: 48px;
    border-radius: 14px;
    background: rgba(59,130,246,0.1);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 1.3rem;
    color: var(--primary);
}

.edu-badge {
    display: inline-block;
    background: rgba(59,130,246,0.12);
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 100px;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.edu-badge-gray {
    background: rgba(100,116,139,0.15);
    color: var(--muted2);
}

.edu-card h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.edu-degree {
    color: var(--cyan);
    font-size: 0.88rem;
    margin-bottom: 14px;
}

.edu-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.edu-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted2);
    font-size: 0.82rem;
}

.edu-meta i { color: var(--muted); font-size: 0.82rem; }

/* ===================================
   EXPERIENCE TIMELINE HORIZONTAL
=================================== */

.exp-track-wrapper {
    position: relative;
    overflow-x: auto;
    overflow-y: visible;
    padding: 60px 10px 20px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--card);
    /* Smooth scroll on iOS */
    -webkit-overflow-scrolling: touch;
}

.exp-track-wrapper::-webkit-scrollbar { height: 5px; }
.exp-track-wrapper::-webkit-scrollbar-track { background: var(--card); border-radius: 10px; }
.exp-track-wrapper::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; }

.exp-track-line {
    position: absolute;
    top: 28px;
    left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--border) 10%, var(--border) 90%, transparent);
}

.exp-timeline {
    display: flex;
    gap: 20px;
    width: max-content;
    padding-bottom: 10px;
}

.exp-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 260px;
    max-width: 280px;
}

.exp-dot {
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--card-2);
    border: 2px solid var(--primary);
    flex-shrink: 0;
    margin-bottom: 22px;
    position: relative;
    z-index: 2;
}

.exp-dot-main  { background: var(--primary); box-shadow: 0 0 16px rgba(59,130,246,0.5); }
.exp-dot-green { background: var(--green); border-color: var(--green); box-shadow: 0 0 16px rgba(34,197,94,0.4); }

.exp-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    width: 100%;
    transition: all 0.3s;
}

.exp-card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(0,0,0,0.3); border-color: rgba(59,130,246,0.25); }
.exp-card-main  { border-color: rgba(59,130,246,0.3); }

.exp-period {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    color: var(--cyan);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.exp-company {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.exp-company i { color: var(--primary); font-size: 0.82rem; }

.exp-role { color: var(--muted2); font-size: 0.82rem; margin-bottom: 10px; }

.exp-list {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
}

.exp-list li {
    color: var(--muted2);
    font-size: 0.8rem;
    padding: 3px 0 3px 14px;
    position: relative;
    line-height: 1.5;
}

.exp-list li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--cyan);
    font-size: 1rem;
    line-height: 1.3;
}

.exp-tags { display: flex; flex-wrap: wrap; gap: 5px; }

.exp-tags span {
    background: rgba(59,130,246,0.08);
    border: 1px solid rgba(59,130,246,0.15);
    color: var(--muted2);
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 0.7rem;
}

/* ===================================
   PROJECTS
=================================== */

.featured-project {
    background: var(--card);
    border: 1px solid rgba(59,130,246,0.25);
    border-radius: 24px;
    padding: 36px 32px;
    position: relative;
    overflow: hidden;
}

.featured-project::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--cyan));
}

.fp-label {
    display: inline-block;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.25);
    color: #fbbf24;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 100px;
    margin-bottom: 18px;
    letter-spacing: 0.5px;
}

.fp-title {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 14px;
}

.fp-desc  { color: var(--muted2); line-height: 1.8; margin-bottom: 18px; font-size: 0.92rem; }
.fp-tags  { display: flex; flex-wrap: wrap; gap: 8px; }

.fp-tags span {
    background: rgba(6,182,212,0.1);
    border: 1px solid rgba(6,182,212,0.2);
    color: var(--cyan);
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 500;
}

.fp-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.fp-icon-wrap {
    width: 90px; height: 90px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(6,182,212,0.2));
    border: 1px solid rgba(59,130,246,0.3);
    display: flex; align-items: center; justify-content: center;
    font-size: 2.6rem;
    color: var(--cyan);
}

.fp-metrics { display: flex; gap: 20px; justify-content: center; }

.fp-metrics > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.fp-m-val   { font-family: 'Space Mono', monospace; font-size: 1.1rem; color: var(--primary); font-weight: 700; }
.fp-m-label { font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }

.proj-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 20px;
    height: 100%;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.proj-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px rgba(0,0,0,0.35);
    border-color: rgba(59,130,246,0.25);
}

.pc-icon      { font-size: 1.6rem; color: var(--primary); margin-bottom: 12px; }
.pc-category  { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); margin-bottom: 6px; }
.proj-card h5 { font-weight: 700; margin-bottom: 8px; font-size: 0.95rem; }
.proj-card p  { color: var(--muted2); font-size: 0.85rem; line-height: 1.6; margin-bottom: 14px; }
.pc-tags      { display: flex; flex-wrap: wrap; gap: 5px; }

.pc-tags span {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    color: var(--muted2);
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
}

/* ===================================
   ACHIEVEMENTS — VERTICAL TIMELINE
=================================== */

.ach-timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 860px;
    margin: 0 auto;
}

.ach-item {
    display: flex;
    gap: 0;
    align-items: flex-start;
}

.ach-line-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 40px;
    padding-top: 4px;
}

.ach-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    background: var(--card-2);
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    transition: transform 0.3s;
}

.ach-item:hover .ach-dot { transform: scale(1.2); }

.ach-dot-gold   { background: var(--gold);   border-color: var(--gold);   box-shadow: 0 0 14px rgba(245,158,11,0.5); }
.ach-dot-cyan   { background: var(--cyan);   border-color: var(--cyan);   box-shadow: 0 0 14px rgba(6,182,212,0.45); }
.ach-dot-indigo { background: var(--indigo); border-color: var(--indigo); box-shadow: 0 0 14px rgba(129,140,248,0.45); }
.ach-dot-green  { background: var(--green);  border-color: var(--green);  box-shadow: 0 0 14px rgba(34,197,94,0.45); }

.ach-connector {
    width: 2px;
    flex: 1;
    min-height: 32px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
    margin: 6px 0;
}

.ach-connector-last { opacity: 0; }

.ach-card {
    flex: 1;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px;
    margin-left: 16px;
    margin-bottom: 28px;
    transition: all 0.3s;
}

.ach-card:hover {
    box-shadow: 0 16px 40px rgba(0,0,0,0.3);
    border-color: rgba(59,130,246,0.2);
    transform: translateX(4px);
}

.ach-card-featured {
    border-color: rgba(245,158,11,0.3);
    background: linear-gradient(135deg, var(--card), rgba(245,158,11,0.04));
}

.ach-card-featured::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    pointer-events: none;
}

.ach-card { position: relative; overflow: hidden; }

.ach-card-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.ach-icon-wrap {
    width: 48px; height: 48px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.ach-icon-gold   { background: rgba(245,158,11,0.15); color: var(--gold); border: 1px solid rgba(245,158,11,0.25); }
.ach-icon-cyan   { background: rgba(6,182,212,0.12);  color: var(--cyan); border: 1px solid rgba(6,182,212,0.2); }
.ach-icon-indigo { background: rgba(129,140,248,0.12); color: var(--indigo); border: 1px solid rgba(129,140,248,0.2); }
.ach-icon-green  { background: rgba(34,197,94,0.12);  color: var(--green); border: 1px solid rgba(34,197,94,0.2); }

.ach-header-text { flex: 1; min-width: 0; }

.ach-period {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    color: var(--cyan);
    display: block;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.ach-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 4px;
    line-height: 1.4;
}

.ach-org {
    font-size: 0.8rem;
    color: var(--muted2);
    display: block;
}

/* Achievement badges */
.ach-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 100px;
    white-space: nowrap;
    align-self: flex-start;
    flex-shrink: 0;
    letter-spacing: 0.3px;
}

.ach-badge-gold   { background: rgba(245,158,11,0.15); color: var(--gold);   border: 1px solid rgba(245,158,11,0.3); }
.ach-badge-cyan   { background: rgba(6,182,212,0.12);  color: var(--cyan);   border: 1px solid rgba(6,182,212,0.25); }
.ach-badge-indigo { background: rgba(129,140,248,0.12); color: var(--indigo); border: 1px solid rgba(129,140,248,0.25); }
.ach-badge-green  { background: rgba(34,197,94,0.12);  color: var(--green);  border: 1px solid rgba(34,197,94,0.25); }

.ach-desc {
    color: var(--muted2);
    font-size: 0.88rem;
    line-height: 1.75;
    margin-bottom: 20px;
}

.ach-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }

.ach-tags span {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    color: var(--muted2);
    padding: 3px 11px;
    border-radius: 6px;
    font-size: 0.72rem;
}

/* Video Thumbnail */
.ach-media-row { margin-bottom: 8px; }

.ach-video-thumb {
    display: block;
    position: relative;
    background: var(--card-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s;
    min-height: 100px;
}

.ach-video-thumb:hover {
    border-color: rgba(245,158,11,0.4);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    transform: translateY(-2px);
}

.avt-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 28px 20px;
    text-align: center;
}

.avt-placeholder i  { font-size: 2.2rem; color: var(--gold); }
.avt-placeholder span { color: var(--muted2); font-size: 0.85rem; font-weight: 500; }

.avt-overlay {
    position: absolute;
    inset: 0;
    background: rgba(245,158,11,0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 14px;
    z-index: 2;
}

.ach-video-thumb:hover .avt-overlay { opacity: 1; }
.avt-overlay i    { font-size: 1.8rem; color: var(--gold); }
.avt-overlay span { color: #fff; font-size: 0.82rem; font-weight: 600; }

/* Certificate thumbnail + download */
.ach-cert-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.ach-cert-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 120px;
    min-height: 80px;
    flex: 1;
}

.ach-cert-thumb:hover {
    border-color: rgba(59,130,246,0.35);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.act-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px 12px;
    text-align: center;
    width: 100%;
}

.act-placeholder i     { font-size: 1.6rem; color: var(--primary); }
.act-placeholder span  { color: var(--muted2); font-size: 0.78rem; font-weight: 500; line-height: 1.3; }
.act-placeholder small { color: var(--muted); font-size: 0.68rem; }

.ach-cert-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ach-cert-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(59,130,246,0.1);
    border: 1px solid rgba(59,130,246,0.25);
    color: var(--primary);
    padding: 9px 16px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
    min-height: 44px;
}

.ach-cert-download:hover {
    background: rgba(59,130,246,0.18);
    color: var(--primary);
    transform: translateY(-2px);
}

/* ===================================
   LIGHTBOX
=================================== */

.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.88);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-box {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    transform: scale(0.92);
    transition: transform 0.3s;
}

.lightbox-overlay.active .lightbox-box { transform: scale(1); }

.lightbox-box img {
    display: block;
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    background: var(--card);
}

.lightbox-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px; height: 36px;
    border-radius: 10px;
    background: rgba(0,0,0,0.6);
    border: 1px solid var(--border);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
    z-index: 2;
}

.lightbox-close:hover { background: rgba(255,255,255,0.1); }

.lightbox-caption {
    background: var(--card);
    padding: 12px 20px;
    text-align: center;
    color: var(--muted2);
    font-size: 0.85rem;
}

/* ===================================
   SKILLS
=================================== */

.skill-group {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px;
    height: 100%;
}

.sg-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.sg-header i  { color: var(--primary); font-size: 1.2rem; }
.sg-header h5 { margin: 0; font-weight: 700; font-size: 0.95rem; }

.sg-items { display: flex; flex-direction: column; gap: 14px; }

.sg-item span { font-size: 0.85rem; color: var(--muted2); display: block; margin-bottom: 5px; }

.sg-bar {
    height: 5px;
    background: rgba(255,255,255,0.06);
    border-radius: 10px;
    overflow: hidden;
}

.sg-fill {
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--primary), #60a5fa);
    width: 0;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sg-fill-cyan   { background: linear-gradient(90deg, var(--cyan), #67e8f9); }
.sg-fill-indigo { background: linear-gradient(90deg, var(--indigo), #c4b5fd); }

.soft-skills { text-align: center; }

.ss-label {
    color: var(--muted2);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 16px;
    display: block;
}

.ss-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

.ss-chips span {
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--muted2);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.ss-chips span:hover { border-color: rgba(59,130,246,0.3); color: var(--text); }
.ss-chips i { color: var(--primary); }

/* ===================================
   FOOTER
=================================== */

.site-footer {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    padding: 0;
}

.footer-top {
    padding: 52px 0 36px;
    border-bottom: 1px solid var(--border);
}

.footer-brand {
    font-family: 'Space Mono', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    display: inline-block;
}

.footer-tagline-text {
    color: var(--muted2);
    font-size: 0.83rem;
    margin: 8px 0 12px;
    letter-spacing: 0.3px;
}

.footer-desc {
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.7;
    max-width: 340px;
    margin: 0;
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cl-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 100px;
    text-decoration: none;
    color: var(--text);
    font-size: 0.86rem;
    font-weight: 500;
    transition: all 0.25s;
    min-height: 44px;
}

.cl-item:hover {
    border-color: rgba(59,130,246,0.35);
    background: rgba(59,130,246,0.06);
    transform: translateY(-2px);
    color: var(--text);
}

.cl-icon {
    width: 26px; height: 26px;
    border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-copy { color: var(--muted); font-size: 0.8rem; }

/* ===================================
   SCROLL TOP
=================================== */

.scroll-top-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 46px; height: 46px;
    border-radius: 14px;
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 9998;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 24px rgba(59,130,246,0.35);
}

.scroll-top-btn.show { opacity: 1; visibility: visible; }
.scroll-top-btn:hover { transform: translateY(-3px); }

/* ===================================
   CONTACT LINK COLORS
=================================== */
.cc-green { background: rgba(34,197,94,0.15); color: var(--green); }
.cc-red   { background: rgba(239,68,68,0.15); color: #ef4444; }
.cc-blue  { background: rgba(59,130,246,0.15); color: var(--primary); }
.cc-dark  { background: rgba(255,255,255,0.08); color: var(--text); }
.cc-pink  { background: rgba(236,72,153,0.15); color: #ec4899; }

/* ===================================
   RESPONSIVE — COMPREHENSIVE MOBILE
=================================== */

/* ---- Tablet landscape: 992px and below ---- */
@media (max-width: 992px) {
    .hero { padding: 90px 0 60px; }
    .about-info-grid { grid-template-columns: 1fr 1fr; }

    /* Stats: 2×2 grid */
    .hero-stats-row {
        grid-template-columns: repeat(2, 1fr);
        margin-top: 40px;
    }
    .hero-stat:nth-child(2) { border-right: none; }
    .hero-stat:nth-child(3) { border-top: 1px solid var(--border); }
    .hero-stat:nth-child(4) { border-top: 1px solid var(--border); border-right: none; }

    /* Achievements: slightly tighter */
    .ach-card { padding: 24px 22px; }
}

/* ---- Tablet portrait / large phone: 768px and below ---- */
@media (max-width: 768px) {
    .section { padding: 64px 0; }

    /* ---- HERO ---- */
    .hero {
        padding: 86px 0 44px;
        min-height: 100svh; /* safe viewport height on mobile */
    }
    .hero-name { letter-spacing: -1.5px; }
    .hero-description { font-size: 0.9rem; max-width: 100%; }
    .hero-badge { font-size: 0.78rem; padding: 6px 14px; }

    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 12px;
        max-width: 100%;
    }
    .btn-primary-custom,
    .btn-outline-custom {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
    }

    /* ---- ABOUT ---- */
    .about-info-grid { grid-template-columns: 1fr; }

    /* ---- EXPERIENCE ---- */
    .exp-item { min-width: 240px; }
    .section-subtitle { font-size: 0.88rem; }

    /* ---- PROJECTS ---- */
    .featured-project { padding: 22px 18px; }
    .fp-title { font-size: 1rem; }
    .fp-visual { display: none; } /* hide code-metrics on mobile, save space */

    /* ---- ACHIEVEMENTS ---- */
    .ach-card { padding: 20px 16px; margin-bottom: 20px; }
    .ach-card-header { flex-wrap: wrap; gap: 12px; }
    .ach-badge {
        /* Move badge below title row */
        order: 3;
        margin-top: 4px;
    }
    .ach-cert-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .ach-cert-download { justify-content: center; }
    .ach-card:hover { transform: none; } /* disable translateX on touch */

    /* ---- FOOTER ---- */
    .contact-links { gap: 8px; }
    .cl-item { padding: 9px 14px; font-size: 0.82rem; }
    .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .footer-desc { max-width: 100%; }
}

/* ---- Small phone: 576px and below ---- */
@media (max-width: 576px) {
    .section { padding: 52px 0; }

    /* ---- HERO ---- */
    .hero-name { letter-spacing: -1px; }
    .hero-motto { font-size: 0.68rem; }

    /* Stats: compact 2×2 */
    .hero-stat { padding: 16px 8px; }
    .hs-num { font-size: 1.45rem; }
    .hs-suffix { font-size: 0.75rem; }
    .hs-label { font-size: 0.62rem; letter-spacing: 0.8px; }
    .hs-divider { width: 20px; margin-top: 4px; }

    /* ---- SECTION BADGE ---- */
    .section-badge { font-size: 0.66rem; padding: 5px 13px; letter-spacing: 1.5px; }
    .section-title-center,
    .section-title-left { font-size: 1.7rem; }

    /* ---- ABOUT ---- */
    .about-card { padding: 18px 16px; }
    .about-card i { font-size: 1.4rem; margin-bottom: 10px; }
    .about-card h5 { font-size: 0.88rem; }
    .about-card p { font-size: 0.8rem; }
    .ai-item { font-size: 0.8rem; }

    /* ---- EDUCATION ---- */
    .edu-card {
        flex-direction: column;
        gap: 12px;
        padding: 18px 16px;
    }
    .edu-card h4 { font-size: 0.92rem; }
    .edu-degree { font-size: 0.82rem; }
    .edu-meta span { font-size: 0.78rem; }

    /* ---- EXPERIENCE ---- */
    .exp-item { min-width: 210px; max-width: 230px; }
    .exp-card { padding: 16px; }
    .exp-company { font-size: 0.84rem; }
    .exp-role { font-size: 0.78rem; }
    .exp-list li { font-size: 0.76rem; }

    /* ---- PROJECTS ---- */
    .proj-card { padding: 20px 16px; }
    .proj-card h5 { font-size: 0.9rem; }
    .proj-card p { font-size: 0.82rem; }
    .fp-desc { font-size: 0.86rem; }

    /* ---- ACHIEVEMENTS ---- */
    .ach-line-wrap { width: 26px; }
    .ach-dot { width: 13px; height: 13px; }
    .ach-connector { min-height: 24px; }
    .ach-card { margin-left: 8px; padding: 16px 14px; }
    .ach-icon-wrap { width: 40px; height: 40px; font-size: 1.1rem; border-radius: 12px; }
    .ach-title { font-size: 0.9rem; }
    .ach-org { font-size: 0.75rem; }
    .ach-desc { font-size: 0.82rem; }
    .ach-period { font-size: 0.65rem; }
    .avt-placeholder { padding: 20px 14px; }
    .avt-placeholder i { font-size: 1.8rem; }
    .avt-placeholder span { font-size: 0.8rem; }
    .act-placeholder span { font-size: 0.72rem; }

    /* ---- SKILLS ---- */
    .skill-group { padding: 20px 16px; }
    .sg-header h5 { font-size: 0.9rem; }
    .sg-item span { font-size: 0.8rem; }

    /* ---- SOFT SKILLS ---- */
    .ss-chips span { font-size: 0.78rem; padding: 7px 13px; }

    /* ---- LIGHTBOX ---- */
    .lightbox-box { max-width: 95vw; border-radius: 12px; }
    .lightbox-caption { font-size: 0.78rem; padding: 10px 14px; }
    .lightbox-close { width: 32px; height: 32px; font-size: 0.9rem; }

    /* ---- FOOTER ---- */
    .footer-brand { font-size: 1.3rem; }
    .footer-tagline-text { font-size: 0.78rem; }
    .cl-item { padding: 9px 12px; font-size: 0.8rem; }
    .cl-icon { width: 22px; height: 22px; font-size: 0.82rem; }

    /* ---- SCROLL TOP ---- */
    .scroll-top-btn { bottom: 16px; right: 16px; width: 42px; height: 42px; }
}

/* ---- Extra small phone: 400px and below ---- */
@media (max-width: 400px) {
    /* Hero */
    .hero-name { font-size: 2rem; letter-spacing: -0.8px; }
    .hero-badge { font-size: 0.72rem; }
    .hero-description { font-size: 0.85rem; }

    /* Stats 2×2 still but even tighter */
    .hero-stat { padding: 14px 6px; }
    .hs-num { font-size: 1.3rem; }

    /* Cards */
    .about-card { padding: 14px 12px; }
    .ach-card { margin-left: 6px; padding: 14px 12px; }
    .ach-icon-wrap { width: 36px; height: 36px; font-size: 1rem; }
    .ach-badge { font-size: 0.62rem; padding: 3px 9px; }

    /* Contact links: single column stack */
    .contact-links { flex-direction: column; }
    .cl-item { width: 100%; justify-content: center; }

    /* Experience cards narrower */
    .exp-item { min-width: 190px; max-width: 210px; }
}

/* ---- Tall narrow phones (iPhone SE etc): max 375px ---- */
@media (max-width: 375px) {
    .hero-name { font-size: 1.85rem; }
    .section-title-center,
    .section-title-left { font-size: 1.5rem; }
    .ach-line-wrap { width: 22px; }
    .ach-card { margin-left: 6px; }
    .edu-icon { width: 40px; height: 40px; font-size: 1.1rem; }
}

a.ach-cert-thumb {
    text-decoration: none;
}
