* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    max-width: 100%;
}

body {
    background: #050816;
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
}

.hero-bg {
    background: 
        radial-gradient(circle at top left, rgba(168,85,247,.12), transparent 30%),
        radial-gradient(circle at bottom right, rgba(34,211,238,.12), transparent 30%),
        #050816;
}

.grid-bg {
    background-image: 
        linear-gradient(rgba(255,255,255,.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.015) 1px, transparent 1px);
    background-size: 40px 40px;
}

.container {
    max-width: 1140px;
    margin: auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(5, 8, 22, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, .05);
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

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

.code-icon {
    font-size: 1.5rem;
    font-weight: 900;
    background: linear-gradient(to right, #a855f7, #22d3ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand h1 {
    font-size: 1.4rem;
    font-weight: 900;
}

.brand span {
    background: linear-gradient(to right, #a855f7, #22d3ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-links a {
    text-decoration: none;
    color: #94a3b8;
    font-weight: 500;
    font-size: 0.9rem;
    transition: .3s;
}

.nav-links a:hover {
    color: #22d3ee;
}

.talk-btn {
    padding: 8px 18px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .02);
    border: 1px solid rgba(168, 85, 247, 0.4);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.3s ease;
}

.talk-btn:hover {
    background: linear-gradient(to right, #a855f7, #22d3ee);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
    border-color: transparent;
}

/* Navbar scrolled state (set by js/main.js) */
.navbar.scrolled {
    background: rgba(5, 5, 20, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

/* Nav actions cluster (theme toggle + Let's Talk) */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, .02);
    border: 1px solid rgba(255, 255, 255, .08);
    color: #cbd5e1;
    font-size: 0.95rem;
    cursor: pointer;
    transition: 0.3s ease;
}

.theme-toggle:hover {
    color: #22d3ee;
    border-color: #22d3ee;
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    padding-bottom: 40px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(16, 185, 129, .1);
    border: 1px solid rgba(16, 185, 129, .2);
    color: #6ee7b7;
    font-size: .75rem;
    font-weight: 700;
    margin-bottom: 18px;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.hero-left h1 {
    font-size: 3.2rem;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -1.5px;
    margin-bottom: 18px;
}

.hero-left span {
    background: linear-gradient(to right, #a855f7, #22d3ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-left p {
    font-size: 1rem;
    line-height: 1.7;
    color: #94a3b8;
    margin-bottom: 24px;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.primary-btn, .secondary-btn {
    padding: 12px 22px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: .3s ease;
}

.primary-btn {
    background: linear-gradient(to right, #a855f7, #3b82f6);
    color: white;
    box-shadow: 0 4px 15px rgba(168, 85, 247, .2);
}

.secondary-btn {
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .08);
    color: white;
}

.primary-btn:hover, .secondary-btn:hover {
    transform: translateY(-3px);
}

.socials {
    display: flex;
    gap: 10px;
}

.socials div {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .02);
    border: 1px solid rgba(255, 255, 255, .06);
    font-size: 1.1rem;
    color: #cbd5e1;
    transition: .3s;
}

.socials div:hover {
    transform: translateY(-3px);
    border-color: #22d3ee;
    color: #22d3ee;
}

/* Profile Card Box */
.profile-card {
    position: relative;
    padding: 24px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .01);
    border: 1px solid rgba(255, 255, 255, .05);
    backdrop-filter: blur(20px);
}

.profile-top {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
}

.profile-top img {
    width: 85px;
    height: 85px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #a855f7;
    box-shadow: 0 0 15px rgba(168, 85, 247, .25);
}

.profile-top h2 {
    font-size: 1.4rem;
    font-weight: 800;
}

.profile-top h3 {
    font-size: 0.95rem;
    color: #c084fc;
    font-weight: 500;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    color: #94a3b8;
    font-size: 0.8rem;
    margin-top: 6px;
}

/* Terminal Styling */
.terminal {
    background: #090d22;
    border: 1px solid rgba(255, 255, 255, .06);
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.terminal-header {
    display: flex;
    gap: 5px;
    margin-bottom: 8px;
}

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

.dot-term.red { background: #ef4444; }
.dot-term.yellow { background: #f59e0b; }
.dot-term.green { background: #10b981; }

.terminal pre {
    font-size: 0.8rem;
    line-height: 1.5;
    color: #93c5fd;
    overflow-x: auto;
}

.keyword { color: #f43f5e; }
.string { color: #34d399; }

/* Tech Small Icons */
.techs {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
}

.techs div {
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, .02);
    border: 1px solid rgba(255, 255, 255, .05);
    font-size: 1.1rem;
    transition: .3s;
}

.techs div:hover {
    transform: translateY(-3px);
    border-color: #a855f7;
}

/* About Section */
.content-section {
    padding: 60px 0;
    scroll-margin-top: 100px;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.glass {
    background: rgba(255, 255, 255, .01);
    border: 1px solid rgba(255, 255, 255, .05);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 24px;
}

.about-card h2, .skills-card h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 14px;
    background: linear-gradient(to right, #a855f7, #22d3ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.about-card p {
    font-size: 0.9rem;
    line-height: 1.7;
    color: #94a3b8;
    margin-bottom: 16px;
}

.about-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #cbd5e1;
    font-size: 0.85rem;
    list-style: none;
}

.skills-container-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.skill-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    color: #e2e8f0;
    font-size: 0.85rem;
}

.bar {
    height: 7px;
    background: rgba(255, 255, 255, .05);
    border-radius: 999px;
    overflow: hidden;
}

.bar div {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(to right, #a855f7, #22d3ee);
}

/* Global Section Title */
.section-title {
    text-align: center;
    margin-bottom: 35px;
}

.section-title h2 {
    font-size: 2.2rem;
    font-weight: 800;
}

.section-title h2 span {
    background: linear-gradient(to right, #a855f7, #22d3ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-title p {
    color: #64748b;
    margin-top: 6px;
    font-size: 0.95rem;
}

/* Projects Section */
.projects-section {
    padding: 60px 0;
    scroll-margin-top: 100px;
}

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

.project-card {
    padding: 0;
    overflow: hidden;
}

.project-img-box {
    height: 140px;
    background: rgba(255, 255, 255, 0.01);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-info {
    padding: 18px;
}

.project-info h3 {
    font-size: 1.15rem;
    margin: 6px 0 10px 0;
    font-weight: 700;
}

.project-info p {
    color: #94a3b8;
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 14px;
}

.project-tech-tags {
    display: flex;
    gap: 6px;
}

.proj-tag {
    background: rgba(255, 255, 255, 0.04);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    color: #cbd5e1;
}

/* STYLING BARU: Achievements Section */
.achievements-section {
    padding: 60px 0;
    scroll-margin-top: 100px;
}

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

.cert-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    transition: transform 0.3s ease;
}

.cert-card:hover {
    transform: translateY(-4px);
}

.cert-icon-box {
    margin-bottom: 16px;
}

.cert-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
}

.cert-badge.gold { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.cert-badge.silver { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.cert-badge.bronze { background: rgba(34, 211, 238, 0.15); color: #22d3ee; }

.cert-info h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 12px;
}

.cert-sub {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 4px;
    line-height: 1.4;
}

.cert-year {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 14px;
    display: inline-block;
}

/* Experience Timeline Vertical */
.experience-section {
    padding: 60px 0;
    scroll-margin-top: 100px;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: auto;
    padding-left: 35px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 5px;
    width: 2px;
    height: 95%;
    background: linear-gradient(to bottom, #a855f7, #22d3ee);
}

.timeline-item {
    position: relative;
    margin-bottom: 28px;
}

.timeline-dot {
    position: absolute;
    left: -31px;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #a855f7;
    border: 3px solid #050816;
    box-shadow: 0 0 8px #a855f7;
}

.timeline-date {
    font-size: 0.85rem;
    font-weight: 700;
    color: #a855f7;
    margin-bottom: 2px;
}

.timeline-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
}

.timeline-content h4 {
    font-size: 0.9rem;
    color: #22d3ee;
    margin-bottom: 6px;
    font-weight: 500;
}

.timeline-content p {
    color: #94a3b8;
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Contact Styling */
.contact-section {
    padding: 60px 0;
    scroll-margin-top: 100px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 40px;
    align-items: center;
}

.contact-title {
    font-size: 2.2rem;
    font-weight: 900;
    line-height: 1.25;
    margin-bottom: 12px;
}

.contact-title span {
    background: linear-gradient(to right, #a855f7, #22d3ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.contact-desc {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 24px;
}

.contact-info-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.icon-box {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #c084fc;
}

.contact-info-item h4 {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 700;
}

.contact-info-item p {
    font-size: 0.95rem;
    font-weight: 600;
    color: #e2e8f0;
}

.contact-form-container {
    padding: 24px;
}

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

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 4px;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    color: white;
    font-size: 0.9rem;
    outline: none;
    transition: 0.3s;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: #a855f7;
}

.submit-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(to right, #a855f7, #22d3ee);
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: 0.3s;
}

.submit-btn:hover {
    box-shadow: 0 0 15px rgba(34, 211, 238, 0.3);
}

footer {
    padding: 24px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, .05);
    color: #475569;
    font-size: 0.8rem;
    margin-top: 40px;
}

/* =============================================
   RESPONSIVE — Tablet (max 960px)
   ============================================= */
@media(max-width: 960px) {
    .hero-grid, .content-grid, .contact-grid {
        grid-template-columns: 1fr;
    }

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

    .hero-left h1 {
        font-size: 2.6rem;
    }

    .hero-left {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons {
        flex-direction: row;
        justify-content: center;
    }

    .socials {
        justify-content: center;
    }

    .badge {
        margin-inline: auto;
    }

    .hero-right {
        display: flex;
        justify-content: center;
    }

    .profile-card {
        max-width: 500px;
        width: 100%;
    }
}

/* =============================================
   RESPONSIVE — Mobile (max 640px)
   ============================================= */
@media(max-width: 640px) {

    /* --- Global fix: nothing overflows --- */
    * {
        max-width: 100%;
    }

    .container {
        padding: 0 16px;
        width: 100%;
    }

    /* --- Navbar --- */
    .nav-links {
        display: none;
    }

    .talk-btn {
        font-size: 0.8rem;
        padding: 7px 13px;
    }

    .nav-inner {
        padding: 14px 0;
    }

    /* --- Hero --- */
    .hero {
        padding-top: 90px;
        padding-bottom: 32px;
        min-height: auto;
        width: 100%;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 32px;
        width: 100%;
    }

    .hero-left h1 {
        font-size: 1.75rem;
        letter-spacing: -0.5px;
        word-break: break-word;
    }

    .hero-left p {
        font-size: 0.9rem;
        word-break: break-word;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    /* --- About & Skills --- */
    .content-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .content-section {
        padding: 40px 0;
    }

    /* --- Projects --- */
    .projects-section {
        padding: 40px 0;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .section-title h2 {
        font-size: 1.7rem;
    }

    /* --- Achievements --- */
    .achievements-section {
        padding: 40px 0;
    }

    .achievements-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* --- Timeline --- */
    .experience-section {
        padding: 40px 0;
    }

    .timeline {
        padding-left: 28px;
    }

    .timeline-content h3 {
        font-size: 1rem;
    }

    /* --- Contact --- */
    .contact-section {
        padding: 40px 0;
    }

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

    .contact-title {
        font-size: 1.7rem;
    }

    .contact-form-container {
        padding: 18px;
    }

    /* --- Footer --- */
    footer {
        font-size: 0.75rem;
        padding: 20px 16px;
    }
}

/* =============================================
   Scroll Animations
   ============================================= */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Skill bar transition */
.bar div {
    transition: width 1s ease;
}

/* Active nav link */
.nav-links a.active-nav {
    color: #22d3ee;
}

/* Contact form success message */
#successMsg i {
    display: block;
    margin-bottom: 1rem;
}

/* Submit button disabled state */
.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* =============================================
   Hamburger Menu
   ============================================= */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #e2e8f0;
    border-radius: 2px;
    transition: 0.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-menu {
    display: none;
    position: fixed;
    top: 62px;
    left: 0;
    width: 100%;
    background: rgba(5, 8, 22, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,.06);
    flex-direction: column;
    z-index: 999;
    padding: 8px 0 16px;
}

.mobile-menu.open {
    display: flex;
}

.mobile-link {
    text-decoration: none;
    color: #94a3b8;
    font-weight: 600;
    font-size: 1rem;
    padding: 12px 24px;
    transition: 0.2s;
    border-bottom: 1px solid rgba(255,255,255,.04);
}

.mobile-link:hover, .mobile-link:active {
    color: #22d3ee;
    background: rgba(34, 211, 238, 0.05);
}

@media(max-width: 640px) {
    .hamburger {
        display: flex;
    }
}

/* =============================================
   Hide / Transparent Scrollbar
   ============================================= */

/* Chrome, Safari, Edge — hide scrollbar */
::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

/* Firefox — hide scrollbar */
* {
    scrollbar-width: none;
}


.cert-btn {
    margin-top: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: white;
    font-size: 0.82rem;
    font-weight: 700;
    background: linear-gradient(to right, rgba(168,85,247,.2), rgba(34,211,238,.2));
    border: 1px solid rgba(255,255,255,.08);
    transition: .3s ease;
}

.cert-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(34,211,238,.4);
    box-shadow: 0 10px 20px rgba(34,211,238,.12);
}

.project-card, .cert-card, .profile-card, .glass {
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.project-card:hover, .cert-card:hover, .profile-card:hover, .glass:hover {
    border-color: rgba(168,85,247,.18);
    box-shadow: 0 20px 35px rgba(15, 23, 42, .35);
}

@media(max-width: 640px) {
    .hero-left {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .badge {
        margin-inline: auto;
    }

    .hero-left h1 {
        text-align: center;
        width: 100%;
    }

    .hero-left p {
        text-align: center;
        width: 100%;
    }

    .hero-buttons {
        width: 100%;
        align-items: center;
    }

    .hero-buttons a {
        width: 100%;
        display: block;
    }

    .primary-btn, .secondary-btn {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
        display: block;
    }

    .socials {
        justify-content: center;
    }

    /* Profile card centered on mobile */
    .hero-right {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .profile-card {
        padding: 18px;
        border-radius: 24px;
        background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015));
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .profile-top {
        flex-direction: row;
        align-items: center;
        gap: 14px;
    }

    .profile-top img {
        width: 64px;
        height: 64px;
        flex-shrink: 0;
    }

    .profile-top h2 {
        font-size: 1.05rem;
    }

    .profile-top h3 {
        font-size: 0.82rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 2px;
        font-size: 0.75rem;
    }

    .techs {
        grid-template-columns: repeat(4, 1fr);
    }

    .project-card, .cert-card {
        border-radius: 22px;
        overflow: hidden;
    }

    .project-img-box {
        height: 120px;
    }

    .section-title p,
    .project-info p,
    .contact-desc,
    .about-card p {
        font-size: .88rem;
    }

    .mobile-menu {
        border-radius: 0 0 20px 20px;
    }

    .hero {
        position: relative;
    }

    .hero::before {
        content: '';
        position: absolute;
        width: 220px;
        height: 220px;
        background: rgba(168,85,247,.15);
        filter: blur(80px);
        top: 30px;
        left: -60px;
        z-index: -1;
    }

    .hero::after {
        content: '';
        position: absolute;
        width: 180px;
        height: 180px;
        background: rgba(34,211,238,.12);
        filter: blur(70px);
        bottom: 0;
        right: -60px;
        z-index: -1;
    }

    .timeline-content,
    .contact-form-container,
    .about-card,
    .skills-card {
        border-radius: 22px;
    }

    /* About section centered */
    .about-card h2, .skills-card h2 {
        text-align: center;
    }

    /* Section title */
    .section-title {
        padding: 0 8px;
    }

    /* Contact form */
    .contact-title {
        text-align: center;
    }

    .contact-desc {
        text-align: center;
    }

    /* Footer center */
    footer {
        text-align: center;
        padding: 20px 16px;
        font-size: 0.75rem;
    }
}

/* =============================================
   ADDITIONAL RESPONSIVE FIXES (Applied on top)
   ============================================= */

/* Tablet: 641px – 960px */
@media (min-width: 641px) and (max-width: 960px) {
    .hero-buttons {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .primary-btn, .secondary-btn {
        flex: 1 1 160px;
        text-align: center;
    }

    .contact-title {
        font-size: 1.9rem;
    }

    .section-title h2 {
        font-size: 1.9rem;
    }

    .techs {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Fix terminal pre overflow on all small screens */
@media (max-width: 960px) {
    .terminal pre {
        overflow-x: auto;
        white-space: pre-wrap;
        word-break: break-all;
    }
}

/* Extra small phones (max 380px) */
@media (max-width: 380px) {
    .hero-left h1 {
        font-size: 1.5rem;
    }

    .contact-title {
        font-size: 1.45rem;
    }

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

    .talk-btn {
        font-size: 0.72rem;
        padding: 6px 10px;
    }

    .brand h1 {
        font-size: 1.1rem;
    }
}

/* Ensure talk-btn never wraps weirdly on nav */
.nav-inner {
    flex-wrap: nowrap;
}

/* Improve touch target size on mobile */
@media (max-width: 640px) {
    .mobile-link {
        min-height: 48px;
        display: flex;
        align-items: center;
    }

    .socials a div {
        width: 44px;
        height: 44px;
    }

    .cert-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 14px;
    }
}

/* =============================================
   Skill Badge Format (replaces skill bars)
   ============================================= */
.skills-badge-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.skill-badge-item {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: border-color 0.3s;
}

.skill-badge-item:hover {
    border-color: rgba(168, 85, 247, 0.25);
}

.skill-badge-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.skill-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    gap: 7px;
}

.skill-level {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    flex-shrink: 0;
}

.skill-level.intermediate {
    background: rgba(34, 211, 238, 0.1);
    color: #22d3ee;
    border: 1px solid rgba(34, 211, 238, 0.2);
}

.skill-level.advanced {
    background: rgba(168, 85, 247, 0.1);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.2);
}

.skill-detail {
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.4;
    margin: 0;
}

@media (max-width: 640px) {
    .skill-badge-top {
        flex-wrap: wrap;
        gap: 6px;
    }
}

/* =============================================
   HORIZONTAL SCROLL (auto-enabled when a grid has
   more than 3 items — class added by js/render.js).
   With 3 or fewer items the original grid is kept.
   ============================================= */
.projects-grid.scrollable,
.achievements-grid.scrollable {
    display: flex;
    grid-template-columns: none;        /* drop the grid layout */
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;  /* momentum scroll on iOS */
    padding-bottom: 12px;               /* room for the scrollbar */
    /* Firefox: thin, semi-transparent bar */
    scrollbar-width: thin;
    scrollbar-color: rgba(168, 85, 247, 0.4) transparent;
}

/* Chrome / Safari / Edge: show a transparent-track horizontal bar.
   These override the global "hidden scrollbar" rule via higher specificity. */
.projects-grid.scrollable::-webkit-scrollbar,
.achievements-grid.scrollable::-webkit-scrollbar {
    width: auto;
    height: 8px;
    background: transparent;
}

.projects-grid.scrollable::-webkit-scrollbar-track,
.achievements-grid.scrollable::-webkit-scrollbar-track {
    background: transparent;
}

.projects-grid.scrollable::-webkit-scrollbar-thumb,
.achievements-grid.scrollable::-webkit-scrollbar-thumb {
    background: rgba(168, 85, 247, 0.4);
    border-radius: 999px;
}

.projects-grid.scrollable::-webkit-scrollbar-thumb:hover,
.achievements-grid.scrollable::-webkit-scrollbar-thumb:hover {
    background: rgba(168, 85, 247, 0.65);
}

.projects-grid.scrollable > *,
.achievements-grid.scrollable > * {
    flex: 0 0 320px;
    max-width: 320px;
    scroll-snap-align: start;
}

@media (max-width: 640px) {
    .projects-grid.scrollable > *,
    .achievements-grid.scrollable > * {
        flex-basis: 280px;
        max-width: 280px;
    }
}

/* =============================================
   LIGHT MODE THEME
   -------------------------------------------------------------
   The dark theme above is the DEFAULT and is unchanged. These
   rules only apply when <html> has the .light-mode class, which
   js/main.js toggles and persists to localStorage. The code
   terminal intentionally stays dark for contrast.
   ============================================= */
.light-mode body {
    background: #e8e6e1;          /* soft warm gray — easy on the eyes */
    color: #2b303b;              /* dark slate, not harsh black */
}

.light-mode .hero-bg {
    background:
        radial-gradient(circle at top left, rgba(168, 85, 247, .07), transparent 32%),
        radial-gradient(circle at bottom right, rgba(34, 211, 238, .07), transparent 32%),
        #e8e6e1;
}

.light-mode .grid-bg {
    background-image:
        linear-gradient(rgba(43, 48, 59, .03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(43, 48, 59, .03) 1px, transparent 1px);
}

/* --- Navbar / nav --- */
.light-mode .navbar {
    background: rgba(236, 234, 229, .8);
    border-bottom: 1px solid rgba(43, 48, 59, .07);
}

.light-mode .navbar.scrolled {
    background: rgba(236, 234, 229, .95);
    box-shadow: 0 4px 30px rgba(43, 48, 59, .06);
}

.light-mode .brand h1 {
    color: #2b303b;
}

.light-mode .nav-links a {
    color: #565d68;
}

.light-mode .nav-links a:hover,
.light-mode .nav-links a.active-nav {
    color: #7c3aed;
}

.light-mode .talk-btn {
    color: #2b303b;
    background: rgba(43, 48, 59, .03);
}

.light-mode .theme-toggle {
    color: #565d68;
    background: rgba(43, 48, 59, .04);
    border-color: rgba(43, 48, 59, .1);
}

.light-mode .hamburger span {
    background: #2b303b;
}

.light-mode .mobile-menu {
    background: rgba(236, 234, 229, .98);
    border-bottom: 1px solid rgba(43, 48, 59, .07);
}

.light-mode .mobile-link {
    color: #565d68;
    border-bottom: 1px solid rgba(43, 48, 59, .05);
}

/* --- Headings / body text --- */
.light-mode .hero-left h1,
.light-mode .section-title h2,
.light-mode .contact-title,
.light-mode .profile-top h2,
.light-mode .project-info h3,
.light-mode .cert-info h3,
.light-mode .timeline-content h3 {
    color: #2b303b;
}

.light-mode .hero-left p,
.light-mode .about-card p,
.light-mode .project-info p,
.light-mode .contact-desc,
.light-mode .timeline-content p,
.light-mode .cert-sub {
    color: #565d68;
}

.light-mode .section-title p,
.light-mode .skill-detail,
.light-mode .cert-year {
    color: #717784;
}

/* --- Surfaces / cards (soft frosted, not glaring white) --- */
.light-mode .glass,
.light-mode .profile-card {
    background: rgba(255, 255, 255, .45);
    border: 1px solid rgba(43, 48, 59, .08);
}

.light-mode .project-img-box {
    background: rgba(43, 48, 59, .025);
    border-bottom: 1px solid rgba(43, 48, 59, .06);
}

.light-mode .proj-tag {
    background: rgba(43, 48, 59, .05);
    color: #4b5563;
}

.light-mode .skill-badge-item {
    background: rgba(255, 255, 255, .4);
    border: 1px solid rgba(43, 48, 59, .06);
}

.light-mode .skill-name {
    color: #3a4150;
}

.light-mode .techs div {
    background: rgba(255, 255, 255, .4);
    border: 1px solid rgba(43, 48, 59, .06);
}

.light-mode .socials div {
    background: rgba(255, 255, 255, .4);
    border: 1px solid rgba(43, 48, 59, .08);
    color: #565d68;
}

.light-mode .project-card:hover,
.light-mode .cert-card:hover,
.light-mode .profile-card:hover,
.light-mode .glass:hover {
    border-color: rgba(124, 58, 237, .25);
    box-shadow: 0 18px 32px rgba(43, 48, 59, .1);
}

/* --- Buttons / form / contact --- */
.light-mode .secondary-btn {
    background: rgba(43, 48, 59, .04);
    border: 1px solid rgba(43, 48, 59, .1);
    color: #2b303b;
}

.light-mode .form-group label {
    color: #565d68;
}

.light-mode .form-group input,
.light-mode .form-group textarea {
    background: rgba(255, 255, 255, .45);
    border: 1px solid rgba(43, 48, 59, .1);
    color: #2b303b;
}

.light-mode .contact-info-item p {
    color: #3a4150;
}

.light-mode .icon-box {
    background: rgba(124, 58, 237, .07);
    border: 1px solid rgba(124, 58, 237, .16);
    color: #7c3aed;
}

.light-mode footer {
    border-top: 1px solid rgba(43, 48, 59, .07);
    color: #717784;
}
