:root {
    --bg-main: #ffffff;
    --bg-alt: #f9fafb;
    --primary: #111827;
    --btn-text: #ffffff;
    --secondary: #4b5563;
    --accent: #2563eb;
    --accent-glow: rgba(37, 99, 235, 0.2);
    --text-main: #111827;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --shadow-color: rgba(0, 0, 0, 0.05);
    --shadow-hover: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --bg-main: #0a0a0a;
    --bg-alt: #171717;
    --primary: #ffffff;
    --btn-text: #0a0a0a;
    --secondary: #a3a3a3;
    --accent: #60a5fa;
    --accent-glow: rgba(96, 165, 250, 0.25);
    --text-main: #f5f5f5;
    --text-muted: #a3a3a3;
    --border-color: #262626;
    --shadow-color: rgba(0, 0, 0, 0.2);
    --shadow-hover: rgba(0, 0, 0, 0.4);
}

[data-theme="hacker"] {
    --bg-main: #000000;
    --bg-alt: #050505;
    --primary: #00ff00;
    --btn-text: #000000;
    --secondary: #008800;
    --accent: #00ff00;
    --accent-glow: rgba(0, 255, 0, 0.4);
    --text-main: #00ff00;
    --text-muted: #00aa00;
    --border-color: #004400;
    --shadow-color: rgba(0, 255, 0, 0.1);
    --shadow-hover: rgba(0, 255, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition-property: background-color, border-color, color, box-shadow;
    transition-duration: 0.3s;
    transition-timing-function: ease;
}

img,
button,
a {
    transition: all 0.2s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-alt);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem 0;
    background: var(--bg-main);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 0.85rem 0;
    background: var(--bg-main);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo span {
    font-weight: 400;
    color: var(--text-muted);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--text-main);
}

#theme-toggle,
.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    font-weight: 600;
}

#theme-toggle:hover,
.lang-btn:hover {
    color: var(--text-main);
    background: var(--bg-alt);
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* Typography & General */
.section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    padding-top: 5rem;
    position: relative;
}

.hero-content {
    flex: 1;
}

.greeting {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--text-main);
}

.subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: none;
    font-family: inherit;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--primary);
    color: var(--btn-text);
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-main);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-alt);
    border-color: var(--text-muted);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-wrapper {
    width: 350px;
    height: auto;
    border-radius: 24px;
    overflow: hidden;
    background-color: var(--bg-alt);
    border: 1px solid var(--accent);
    box-shadow: 0 0 30px var(--accent-glow);
    animation: floatingGlow 6s ease-in-out infinite;
}

@keyframes floatingGlow {

    0%,
    100% {
        transform: translateY(0);
        box-shadow: 0 0 25px var(--accent-glow);
    }

    50% {
        transform: translateY(-12px);
        box-shadow: 0 15px 35px var(--accent-glow);
    }
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    max-height: 420px;
    display: block;
    object-fit: cover;
    object-position: top;
}


/* Sections */
section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* About Section */
.about {
    background-color: var(--bg-alt);
    max-width: 100%;
}

.about .section-title {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.about-content {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 4px 6px -1px var(--shadow-color);
    max-width: 1200px;
    margin: 0 auto;
}

.about-text p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.skills-marquee {
    overflow: hidden;
    position: relative;
    width: 100%;
    /* Create a fade out effect on the edges */
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    padding: 1rem 0;
}

.skills-track {
    display: inline-flex;
    width: max-content;
    animation: marquee 40s linear infinite;
}

.skills-track:hover {
    animation-play-state: paused;
}

.skills {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.75rem;
    padding-right: 0.75rem;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.skill-tag {
    display: inline-flex;
    align-items: center;
    background: var(--bg-alt);
    color: var(--text-main);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    cursor: default;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-tag:hover {
    transform: translateY(-4px) scale(1.05);
    background: var(--primary);
    color: var(--btn-text);
    border-color: var(--primary);
    box-shadow: 0 6px 12px var(--shadow-hover);
}

/* Projects Section */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    position: relative;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px var(--shadow-hover);
}

.project-img {
    height: 220px;
    overflow: hidden;
    background-color: var(--bg-alt);
    border-bottom: 1px solid var(--border-color);
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-card:hover .project-img img {
    transform: scale(1.03);
}

.project-info,
.project-content {
    padding: 1.5rem;
    box-sizing: border-box;
}

.project-info h3,
.project-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

.project-info p,
.project-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1rem;
    margin-bottom: 1.25rem;
}

.project-tech span {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    background: var(--bg-alt);
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    white-space: nowrap;
    transition: all 0.2s ease;
}

.project-tech span:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* Project Links Dual Buttons */
.proj-links {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.proj-btn-demo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    border-radius: 8px;
    background: var(--accent);
    color: #ffffff !important;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.proj-btn-demo:hover:not(.disabled) {
    transform: translateY(-2px);
    filter: brightness(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.proj-btn-demo.disabled {
    opacity: 0.45;
    cursor: not-allowed !important;
    pointer-events: none;
    background: var(--bg-alt) !important;
    border: 1px solid var(--border-color);
    color: var(--text-muted) !important;
    box-shadow: none;
}

.proj-btn-gh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    border-radius: 8px;
    background: var(--bg-main);
    color: var(--text-main) !important;
    border: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.25s ease;
}

.proj-btn-gh:hover:not(.disabled) {
    background: var(--bg-alt);
    border-color: var(--text-main);
    transform: translateY(-2px);
}

.proj-btn-gh.disabled {
    opacity: 0.45;
    cursor: not-allowed !important;
    pointer-events: none;
    background: var(--bg-alt);
    border-color: var(--border-color);
    color: var(--text-muted) !important;
}

.project-filters,
.cert-filters {
    position: relative;
    z-index: 5;
}

/* Filter Buttons */
.project-filter-btn,
.filter-btn {
    background: var(--bg-main);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    cursor: pointer !important;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.project-filter-btn:hover,
.filter-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.project-filter-btn.active,
.filter-btn.active {
    background: var(--primary) !important;
    color: var(--btn-text) !important;
    border: none !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Contact Section */
.contact {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact p {
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--text-main);
    box-shadow: 0 0 0 1px var(--text-main);
}

.btn-block {
    width: 100%;
    padding: 0.875rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 2.5rem 2rem;
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.social-links a {
    color: var(--text-muted);
    font-size: 1.25rem;
}

.social-links a:hover {
    color: var(--text-main);
}

footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive */

.experience {
    background: var(--bg-alt);
    padding: 4rem 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px var(--shadow-color);
    margin-top: 2rem;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 2rem;
}

/* Garis vertikal roadmap */
.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--border-color);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    background: var(--bg-main);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px var(--shadow-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 2rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

/* Titik poin di garis (marker) */
.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.4rem;
    top: 1.5rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-main);
    border: 4px solid var(--accent);
    z-index: 1;
    transition: all 0.3s ease;
}

.timeline-item:hover {
    transform: translateX(8px);
    box-shadow: 0 8px 16px var(--shadow-hover);
}

/* Animasi marker saat di-hover atau aktif */
.timeline-item:hover::before,
.timeline-item.active-node::before {
    background: var(--accent);
}

.timeline-item h3 {
    margin: 0 0 0.5rem;
    color: var(--text-main);
    font-weight: 600;
}

.timeline-date {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

/* Typed Text cursor */
#typed::after {
    content: '|';
    animation: blink 0.7s infinite;
    margin-left: 2px;
    color: var(--accent);
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

/* Certificates Section */







/* Certificates Section */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.cert-card {
    position: relative;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.cert-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px var(--shadow-hover);
}

.cert-img {
    height: 200px;
    overflow: hidden;
    background-color: var(--bg-alt);
    border-bottom: 1px solid var(--border-color);
}

.cert-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cert-card:hover .cert-img img {
    transform: scale(1.05);
}

.cert-info {
    padding: 1.5rem;
}

.cert-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.cert-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Mouse Tracking Luminous Overlay */
.project-card::before,
.cert-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    background: radial-gradient(600px circle at var(--mouse-x, 0px) var(--mouse-y, 0px),
            var(--accent-glow),
            transparent 40%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 10;
}

.project-card:hover::before,
.cert-card:hover::before {
    opacity: 1;
}

/* =========================================
   RESPONSIVE DESIGN (Mobile & Tablet)
   ========================================= */
@media (max-width: 768px) {

    /* ── Navbar ── */
    .nav-content {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
        padding: 0 1.25rem;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-main);
        flex-direction: column;
        padding: 1.5rem 0;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 10px 15px -3px var(--shadow-hover);
        transform: translateY(-10px);
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 99;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        display: block;
        padding: 0.75rem 0;
        font-size: 1.05rem;
    }

    /* ── Hero Section ── */
    .hero {
        flex-direction: column-reverse;
        /* foto di atas, teks di bawah */
        text-align: center;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        padding-top: 6rem;
        padding-bottom: 3rem;
        min-height: auto;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero h1 {
        font-size: 2.2rem;
        letter-spacing: -0.5px;
    }

    .greeting {
        font-size: 1rem;
    }

    .subtitle {
        font-size: 0.95rem;
        margin: 0 auto 1.5rem;
        max-width: 100%;
        text-align: center;
    }

    /* Hero CTA buttons — full width on mobile */
    .hero-cta {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0.75rem;
    }

    .hero-cta .btn {
        width: 100%;
        text-align: center;
        padding: 0.85rem;
        font-size: 1rem;
    }

    /* ── Stat Counters ── */
    .hero-stats {
        justify-content: center;
        gap: 1.25rem;
        flex-wrap: wrap;
        margin-top: 1.75rem;
    }

    .hero-stat {
        padding-left: 0.6rem;
    }

    .stat-number {
        font-size: 1.6rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    /* ── Profile Photo / OTW Frame ── */
    .hero-image {
        width: 100%;
        justify-content: center;
    }

    .otw-frame {
        gap: 0.75rem;
    }

    .image-wrapper {
        width: 260px;
        border-radius: 20px;
    }

    .image-wrapper img {
        max-height: 320px;
    }

    .otw-label {
        font-size: 0.82rem;
        padding: 0.35rem 0.85rem;
    }

    /* ── Sections General ── */
    section {
        padding: 3.5rem 5%;
    }

    .section-title {
        font-size: 1.6rem;
        margin-bottom: 2rem;
    }

    /* ── About ── */
    .about-content {
        padding: 1.75rem;
    }

    .about-text p {
        font-size: 1rem;
    }

    /* ── Experience Timeline ── */
    .experience {
        padding: 3rem 1.25rem;
        border-radius: 8px;
    }

    .timeline {
        padding-left: 1.5rem;
    }

    .timeline::before {
        left: 0;
    }

    .timeline-item {
        padding: 1.1rem;
    }

    .timeline-item::before {
        left: -1.9rem;
        width: 13px;
        height: 13px;
        top: 1.1rem;
    }

    .timeline-item h3 {
        font-size: 0.95rem;
    }

    /* ── Project & Cert Filter Buttons ── */
    .project-filters,
    .cert-filters {
        gap: 0.6rem !important;
        padding: 0 0.5rem;
    }

    .project-filter-btn,
    .filter-btn {
        font-size: 0.82rem !important;
        padding: 0.4rem 0.9rem !important;
    }

    /* ── Project & Cert Grids ── */
    .project-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .cert-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 1.25rem;
    }

    .project-img {
        height: 190px;
    }

    .cert-img {
        height: 170px;
    }

    /* ── Contact ── */
    .contact {
        padding: 0 1rem;
    }

    /* ── Footer ── */
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .social-links {
        gap: 1.25rem;
    }

    /* ── Terminal Widget ── */
    .terminal-widget {
        width: calc(100vw - 1.5rem);
        right: 0.75rem;
        left: 0.75rem;
        bottom: 4.5rem;
        max-height: 300px;
    }

    .terminal-toggle-btn {
        bottom: 1rem;
        right: 1rem;
        width: 46px;
        height: 46px;
        font-size: 1.05rem;
    }

    /* ── CMS Floating Panel ── */
    .cms-floating-panel {
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
        width: auto;
    }

    .cms-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

/* ── Extra Small Phones (≤ 480px) ── */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.75rem;
    }

    .image-wrapper {
        width: 220px;
        border-radius: 16px;
    }

    .image-wrapper img {
        max-height: 270px;
    }

    .hero-stats {
        gap: 1rem;
    }

    .stat-number {
        font-size: 1.35rem;
    }

    .cert-grid {
        grid-template-columns: 1fr;
    }

    .about-content {
        padding: 1.25rem;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .otw-label {
        font-size: 0.78rem;
    }
}

/* CMS Feature Modals & Panels */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--bg-main);
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.cms-floating-panel {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: color-mix(in srgb, var(--bg-main) 90%, transparent);
    backdrop-filter: blur(10px);
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--accent);
    display: none;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 900;
    animation: floatingGlow 4s infinite alternate;
}

.cms-floating-panel.active {
    display: flex;
}

.cms-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    gap: 1.5rem;
}

.cms-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    max-width: 340px;
}

.preview-tab-btn {
    background: var(--bg-alt);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preview-tab-btn.active,
.preview-tab-btn:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* 16:9 Presentation PDF / Print Module Styles */
@media print {
    body>*:not(#printable-slide-deck) {
        display: none !important;
    }

    #printable-slide-deck {
        display: block !important;
        position: relative;
        width: 100%;
        background: transparent !important;
    }

    @page {
        size: landscape;
        margin: 0;
    }

    .pdf-slide {
        width: 100vw;
        height: 100vh;
        page-break-after: always;
        break-after: page;
        box-sizing: border-box;
        padding: 3rem 4rem;
        background: #0f172a !important;
        /* Premium Slate Dark */
        color: #f8fafc !important;
        font-family: 'Outfit', sans-serif !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        overflow: hidden;
        position: relative;
    }

    .pdf-slide:last-child {
        page-break-after: avoid;
        break-after: avoid;
    }

    .pdf-slide[data-theme="emerald"] {
        background: #022c22 !important;
        /* Deep Dark Emerald */
    }

    .pdf-slide[data-theme="violet"] {
        background: #1e1b4b !important;
        /* Deep Dark Violet */
    }

    .pdf-slide[data-theme="pure-black"] {
        background: #000000 !important;
        /* Premium Pure Black */
    }

    .pdf-slide[data-theme="pure-white"] {
        background: #ffffff !important;
        /* Clean Minimalist Pure White */
        color: #0f172a !important;
    }

    .slide-header {
        border-bottom: 2px solid var(--accent);
        padding-bottom: 1rem;
        margin-bottom: 2rem;
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
    }

    .slide-title {
        font-size: 2.2rem !important;
        font-weight: 700 !important;
        color: var(--accent) !important;
        margin: 0 !important;
    }

    .slide-brand {
        font-size: 1.1rem !important;
        font-weight: 600 !important;
        color: var(--text-muted) !important;
    }

    .slide-body {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        font-size: 1.2rem !important;
        line-height: 1.6 !important;
    }

    .slide-footer {
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 1rem;
        display: flex;
        justify-content: space-between;
        font-size: 0.9rem !important;
        color: var(--text-muted) !important;
    }

    .slide-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        width: 100%;
    }

    .timeline-print-item {
        margin-bottom: 1.5rem;
        padding-left: 1.5rem;
        border-left: 3px solid var(--accent);
    }

    .cover-split-layout {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 4rem;
        width: 100%;
        height: 100%;
    }

    .cover-split-photo {
        width: 320px;
        height: 420px;
        border-radius: 16px;
        border: 2px solid var(--accent);
        object-fit: cover;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
        flex-shrink: 0;
    }

    .cover-split-text {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        text-align: left;
    }
}

/* =========================================
   HERO STAT COUNTERS
   ========================================= */
.hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    padding-left: 0.75rem;
    border-left: 2px solid var(--accent);
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
    letter-spacing: -1px;
    font-variant-numeric: tabular-nums;
}

/* The "+" suffix shown via pseudo-element for non-% stats */
.hero-stat:not(:last-child) .stat-number::after {
    content: '+';
    font-size: 1.3rem;
    color: var(--accent);
    font-weight: 700;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

@media (max-width: 768px) {
    .hero-stats {
        gap: 1.25rem;
        margin-top: 2rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }
}

/* =========================================
   FLOATING TERMINAL WIDGET
   ========================================= */
.terminal-widget {
    position: fixed;
    bottom: 5.5rem;
    right: 1.5rem;
    width: 420px;
    max-height: 340px;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 12px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(96, 165, 250, 0.1);
    z-index: 1000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Courier New', 'Cascadia Code', monospace;
    animation: terminalSlideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: bottom right;
}

.terminal-widget.open {
    display: flex;
}

.terminal-widget.minimized .terminal-body {
    display: none;
}

@keyframes terminalSlideIn {
    from {
        transform: scale(0.7) translateY(20px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #161b22;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid #30363d;
    cursor: grab;
    user-select: none;
}

.terminal-header:active {
    cursor: grabbing;
}

.terminal-dots {
    display: flex;
    gap: 6px;
    align-items: center;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: filter 0.2s;
}

.dot:hover {
    filter: brightness(1.3);
}

.dot-red {
    background: #ff5f57;
}

.dot-yellow {
    background: #febc2e;
}

.dot-green {
    background: #28c840;
}

.terminal-title {
    font-size: 0.8rem;
    color: #8b949e;
    font-family: monospace;
    flex: 1;
    text-align: center;
}

.terminal-body {
    padding: 0.75rem 1rem;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.terminal-output {
    flex: 1;
    font-size: 0.82rem;
    line-height: 1.6;
    overflow-y: auto;
    max-height: 200px;
}

.term-line {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.term-line.term-green {
    color: #3fb950;
}

.term-line.term-blue {
    color: #60a5fa;
}

.term-line.term-yellow {
    color: #f1c40f;
}

.term-line.term-red {
    color: #f85149;
}

.term-line.term-muted {
    color: #8b949e;
}

.term-line.term-white {
    color: #f0f6fc;
}

.term-line.term-cmd {
    color: #79c0ff;
}

.term-cmd {
    color: #79c0ff;
    font-weight: bold;
}

.term-prompt {
    color: #3fb950;
    font-weight: bold;
    font-size: 0.82rem;
    flex-shrink: 0;
    font-family: monospace;
}

.terminal-input-row {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #21262d;
}

.terminal-input {
    background: transparent;
    border: none;
    outline: none;
    color: #f0f6fc;
    font-family: monospace;
    font-size: 0.82rem;
    flex: 1;
    caret-color: #3fb950;
}

.terminal-input::placeholder {
    color: #484f58;
}

/* Terminal Toggle Button (floating) */
.terminal-toggle-btn {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    box-shadow: 0 4px 20px rgba(96, 165, 250, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.terminal-toggle-btn:hover {
    transform: scale(1.1) rotate(-10deg);
    box-shadow: 0 6px 28px rgba(96, 165, 250, 0.6);
}

.terminal-toggle-btn.active {
    background: #f85149;
    box-shadow: 0 4px 20px rgba(248, 81, 73, 0.4);
}

@media (max-width: 768px) {
    .terminal-widget {
        width: calc(100vw - 2rem);
        right: 1rem;
        bottom: 5rem;
    }
}

/* =========================================
   LAZY LOADING IMAGE PLACEHOLDER
   ========================================= */
img[loading="lazy"] {
    background: var(--bg-alt);
}

/* =========================================
   "AVAILABLE" BADGE (hero)
   ========================================= */
.available-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 20px;
    padding: 0.2rem 0.65rem;
    margin-bottom: 1rem;
    letter-spacing: 0.03em;
}

.available-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    animation: pulseDot 1.5s ease-in-out infinite;
}

@keyframes pulseDot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(0.8);
    }
}

/* =========================================
   PROJECT CARD — NEW BADGE & BUTTONS
   ========================================= */
.proj-new-badge {
    display: none !important;
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 12px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.proj-links {
    display: flex;
    gap: 0.65rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* Live Demo button — solid uniform color in both themes */
.proj-btn-demo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent) !important;
    color: #fff !important;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.82rem;
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    transition: background 0.2s, transform 0.15s;
}

.proj-btn-demo:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

/* GitHub button — outlined ghost */
.proj-btn-gh {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    color: var(--text-main) !important;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.82rem;
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: border-color 0.2s, color 0.2s, transform 0.15s;
}

.proj-btn-gh:hover {
    border-color: var(--accent);
    color: var(--accent) !important;
    transform: translateY(-1px);
}

.stat-number--pct::after {
    content: '%' !important;
    font-size: 1.3rem;
    color: var(--accent);
    font-weight: 700;
}

/* =========================================
   PROFILE PHOTO + OPEN TO WORK BADGE
   ========================================= */
.otw-frame {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* "Open to Work" pill badge below photo */
.otw-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(16, 185, 129, 0.10);
    border: 1.5px solid rgba(16, 185, 129, 0.40);
    border-radius: 30px;
    padding: 0.4rem 1rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: #10b981;
    letter-spacing: 0.02em;
    transition: box-shadow 0.3s ease;
}

.otw-label:hover {
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.3);
}

.otw-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #10b981;
    flex-shrink: 0;
    animation: pulseDot 1.5s ease-in-out infinite;
}