/* ---- CSS Variables & Theme Setup ---- */
:root {
    /* Light Mode Palette */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent: #0ea5e9;
    --accent-hover: #0284c7;
    --card-bg: rgba(255, 255, 255, 0.7);
    --card-border: rgba(226, 232, 240, 0.8);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --btn-text: #ffffff;
}

[data-theme="dark"] {
    /* Dark Mode Palette */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #38bdf8;
    --accent-hover: #7dd3fc;
    --card-bg: rgba(30, 41, 59, 0.5);
    --card-border: rgba(51, 65, 85, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --btn-text: #0f172a;
}

/* ---- Reset & Globals ---- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                color 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    z-index: 1; /* Establish stacking context */
}

/* Starry Space Background Effect */
body::before,
body::after {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -2;
    pointer-events: none;
    background-repeat: repeat;
    /* Hardware acceleration constraints for massive full-page layers */
    will-change: opacity;
    transform: translateZ(0);
}

/* Light Mode (Theme Blue Stars) */
html:not([data-theme="dark"]) body::before {
    background-image: 
        radial-gradient(1px 1px at 25px 5px, rgba(14, 165, 233, 0.7), transparent),
        radial-gradient(1.5px 1.5px at 125px 20px, rgba(14, 165, 233, 0.4), transparent),
        radial-gradient(2px 2px at 15px 125px, rgba(14, 165, 233, 0.6), transparent),
        radial-gradient(1.5px 1.5px at 75px 105px, rgba(14, 165, 233, 0.3), transparent),
        radial-gradient(1px 1px at 200px 10px, rgba(14, 165, 233, 0.5), transparent),
        radial-gradient(2px 2px at 270px 110px, rgba(14, 165, 233, 0.7), transparent),
        radial-gradient(1.5px 1.5px at 180px 170px, rgba(14, 165, 233, 0.8), transparent);
    background-size: 300px 300px;
    animation: stars-twinkle 6s ease-in-out infinite alternate;
}

html:not([data-theme="dark"]) body::after {
    background-image: 
        radial-gradient(1px 1px at 50px 25px, rgba(14, 165, 233, 0.5), transparent),
        radial-gradient(1.5px 1.5px at 50px 75px, rgba(14, 165, 233, 0.6), transparent),
        radial-gradient(1px 1px at 110px 140px, rgba(14, 165, 233, 0.5), transparent),
        radial-gradient(1px 1px at 150px 80px, rgba(14, 165, 233, 0.8), transparent),
        radial-gradient(1.5px 1.5px at 225px 40px, rgba(14, 165, 233, 0.4), transparent),
        radial-gradient(1px 1px at 230px 190px, rgba(14, 165, 233, 0.5), transparent),
        radial-gradient(2px 2px at 100px 200px, rgba(14, 165, 233, 0.6), transparent);
    background-size: 250px 250px;
    animation: stars-twinkle 8s ease-in-out infinite alternate-reverse;
}

/* Dark Mode (White Stars) */
html[data-theme="dark"] body::before {
    background-image: 
        radial-gradient(1px 1px at 25px 5px, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(1.5px 1.5px at 125px 20px, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(2px 2px at 15px 125px, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(1.5px 1.5px at 75px 105px, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(1px 1px at 200px 10px, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(2px 2px at 270px 110px, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(1.5px 1.5px at 180px 170px, rgba(255, 255, 255, 0.8), transparent);
    background-size: 300px 300px;
    animation: stars-twinkle 6s ease-in-out infinite alternate;
}

html[data-theme="dark"] body::after {
    background-image: 
        radial-gradient(1px 1px at 50px 25px, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(1.5px 1.5px at 50px 75px, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(1px 1px at 110px 140px, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(1px 1px at 150px 80px, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(1.5px 1.5px at 225px 40px, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(1px 1px at 230px 190px, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(2px 2px at 100px 200px, rgba(255, 255, 255, 0.6), transparent);
    background-size: 250px 250px;
    animation: stars-twinkle 8s ease-in-out infinite alternate-reverse;
}

@keyframes stars-twinkle {
    0% { opacity: 0.3; }
    100% { opacity: 0.9; }
}

#cursor-glow {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, rgba(168, 85, 247, 0.05) 40%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: -1;
    transition: top 0.15s cubic-bezier(0.2, 0, 0.2, 1), left 0.15s cubic-bezier(0.2, 0, 0.2, 1);
    will-change: top, left;
}

[data-theme="dark"] #cursor-glow {
    background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, rgba(168, 85, 247, 0.05) 40%, transparent 70%);
}

html:not([data-theme="dark"]) #cursor-glow {
    background: radial-gradient(circle, rgba(56, 189, 248, 0.12) 0%, rgba(168, 85, 247, 0.03) 40%, transparent 70%);
}

img, video {
    max-width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    width: 100%;
}

h1, h2, h3, h4, h5, h6, .logo {
    font-family: 'Outfit', sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.container-center {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

section {
    padding: 6rem 0;
}

/* ---- Typography ---- */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

/* ---- Utilities ---- */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    box-shadow: var(--glass-shadow);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px; /* Pill shape */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: 'Inter', sans-serif;
    gap: 0.5rem;
}

.btn.sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--btn-text);
    box-shadow: 0 4px 14px 0 rgba(56, 189, 248, 0.39);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.5);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--card-border);
}

.btn-secondary:hover {
    background-color: var(--bg-secondary);
    border-color: var(--text-secondary);
}

/* ---- Navbar ---- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-top: none;
    border-left: none;
    border-right: none;
    border-radius: 0;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a:not(.btn) {
    font-weight: 500;
    color: var(--text-primary);
    opacity: 0.8;
}

.nav-links a:not(.btn):not(.social-icons a):hover {
    color: var(--text-primary);
    opacity: 1;
}

.social-icons {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding-right: 0.5rem; /* Reduced padding slightly to balance the missing border geometry */
}

.social-icons a {
    font-size: 1.5rem;
    color: var(--text-secondary);
}

.social-icons a:hover {
    color: var(--accent);
}

#theme-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.3s;
}

#theme-toggle:hover {
    background: var(--card-bg);
}

/* ---- Footer ---- */
.footer {
    padding: 3rem 0;
    margin-top: 4rem;
    border-top: 1px solid var(--card-border);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ---- Split Hero Section (Iteration 6) ---- */
.hero-split {
    display: grid;
    grid-template-columns: 50% 50%;
    position: relative;
    min-height: 100vh;
    width: 100%;
    margin: 0;
    padding: 0;
    background-color: var(--bg-primary);
}

/* Left Side */
.hero-left {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: clamp(2rem, 8vw, 8rem);
    padding-right: 4rem;
}

.hero-content-box {
    margin-top: 50px;
    max-width: 500px;
}

.hero-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(3.5rem, 6vw, 5.5rem);
    line-height: 1.1;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.hero-title .font-light {
    font-weight: 300;
    color: var(--text-secondary);
}

.hero-title strong {
    font-weight: 800;
}

.hero-desc {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 3rem;
    max-width: 400px;
}

.hero-buttons {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    margin-bottom: 4rem;
}

.btn-solid-orange {
    background-color: var(--accent);
    color: #fff;
    padding: 1rem 2.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: background-color 0.3s;
}

.btn-solid-orange:hover {
    background-color: var(--accent-hover);
}

.btn-text-arrow {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.btn-text-arrow:hover {
    color: var(--accent);
}

/* Expertise */
.expertise-box {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.expertise-title {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
}

.expertise-icons {
    display: flex;
    gap: 1rem;
}

.icon-sq {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    font-family: 'Inter', sans-serif;
}

.icon-sq b {
    font-size: 1.2rem;
}

/* Scroll Box */
.scroll-down-box {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 1.5rem clamp(2rem, 8vw, 8rem);
    border-top: 1px solid rgba(255,255,255,0.1);
    border-right: 1px solid rgba(255,255,255,0.1);
    border-top-right-radius: 16px;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #ffffff;
    font-weight: 500;
}

/* Right Side */
.hero-right {
    background-color: var(--accent);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-right: 5vw;
    position: relative;
    overflow: hidden;
}

/* Chessboard Grid Animations */
#chessboard-bg {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-auto-rows: 1fr;
    z-index: 1;
}

.chess-cell {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    opacity: 0.7; /* Much better visibility */
    aspect-ratio: 1 / 1;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.chess-cell:hover {
    opacity: 1 !important;
    transform: scale(1.15);
}

.chess-cell.hide-icon {
    opacity: 0 !important;
    transform: scale(0.2) rotate(15deg);
}

.chess-cell.dark-cell {
    background-color: rgba(0, 0, 0, 0.15); /* Distinct dark square */
}

.chess-cell.light-cell {
    background-color: rgba(255, 255, 255, 0.08); /* Distinct light square */
}

/* SVG Custom Upload Styling */
.cb-custom {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.cb-custom img {
    width: 55%;
    height: auto;
    max-width: 80px;
    object-fit: contain;
    filter: drop-shadow(0px 8px 16px rgba(0, 0, 0, 0.25));
}

.hero-photo {
    position: absolute;
    bottom: 0;
    left: 45%;
    transform: translateX(-50%);
    width: auto;
    height: 85vh;
    max-width: none;
    z-index: 5;
    object-position: bottom;
    object-fit: cover;
}

.right-hero-text {
    text-align: right;
    color: var(--bg-primary);
    font-size: clamp(3rem, 5vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    font-family: 'Outfit', sans-serif;
    z-index: 2;
}

.right-socials {
    position: absolute;
    top: 100px;
    right: 40px;
    display: flex;
    gap: 1rem;
    z-index: 10;
}

.right-socials a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ffffff;
    font-size: 1.25rem;
    transition: all 0.3s;
}

.right-socials a:hover {
    background: #ffffff;
    color: #6b2e88;
}

/* Circular Badge */
.circular-contact-badge {
    position: absolute;
    bottom: 40px;
    right: 40px;
    width: 120px;
    height: 120px;
    z-index: 10;
}

.circular-contact-badge .badge-svg {
    position: absolute;
    inset: 0;
    animation: spin 15s linear infinite;
    width: 100%;
    height: 100%;
}

.center-arrow-orange {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 45px;
    height: 45px;
    background-color: #e76f51;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.4rem;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.75rem;
    cursor: pointer;
    padding: 0.25rem;
    z-index: 1001;
}

@media (max-width: 900px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--bg-primary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 2rem;
        gap: 2rem;
        transition: right 0.4s ease;
        z-index: 1000;
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links > a:not(.btn) {
        display: block;
        font-size: 1.5rem;
    }

    .social-icons {
        border-right: none;
        padding-right: 0;
        justify-content: center;
    }
    .hero-split {
        grid-template-columns: 1fr;
    }
    .hero-left {
        padding: 120px 2rem 4rem 2rem;
        align-items: center;
        text-align: center;
    }
    .hero-buttons {
        justify-content: center;
    }
    .expertise-icons {
        justify-content: center;
    }
    .scroll-down-box {
        display: none;
    }
    .hero-right {
        height: 60vh;
    }
    .right-socials {
        display: none;
    }
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Design & Branding Section ---- */
.tabs-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.tabs-container::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.5rem 1rem;
    position: relative;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.tab-btn.active {
    color: var(--text-primary);
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--accent);
    border-radius: 3px 3px 0 0;
    transform: scaleX(0);
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: center;
}

.tab-btn.active::after {
    transform: scaleX(1);
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

#work .project-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}
@media (max-width: 1200px) {
    #work .project-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 900px) {
    #work .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    #work .project-grid {
        grid-template-columns: 1fr;
    }
}

.project-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
}

.card-img-placeholder {
    height: 280px;
    width: 100%;
    transition: transform 0.5s ease;
}

.project-card:hover .card-img-placeholder {
    transform: scale(1.08);
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
}

.project-card:hover .card-overlay {
    opacity: 1;
}

.card-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    color: white; /* Ensure it stays white in both modes */
}

.card-overlay p {
    font-size: 1rem;
    opacity: 0.9;
    color: #e2e8f0;
}

.card-overlay .btn-secondary {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.5);
}

.card-overlay .btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: #ffffff;
    color: #ffffff;
}

.design-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.design-stack {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    color: white;
}

/* ---- Tech Projects Section ---- */
.tech-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem;
    min-height: 280px;
    border: 1px solid var(--card-border);
}

.tech-card:hover {
    border-color: var(--accent);
}

.tech-card-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.tech-card-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.badge {
    background-color: var(--bg-secondary);
    color: var(--accent);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.tech-card-links {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

/* ---- UX Case Studies Section ---- */
.ux-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.ux-card-new {
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.ux-card-new:hover {
    transform: translateY(-5px);
}

.ux-image-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.ux-placeholder-img {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 4rem;
    color: white;
}

.ux-card-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.ux-card-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.ux-card-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* ---- Certifications Section ---- */
.certifications-flex {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 800px;
}

.certification-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-radius: 16px;
    border: 1px solid var(--card-border);
    gap: 1.5rem;
}

.cert-icon i {
    font-size: 2.5rem;
    color: var(--accent);
}

.cert-info {
    flex-grow: 1;
}

.cert-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.cert-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

@media (max-width: 600px) {
    .certification-card {
        padding: 1rem 1.25rem;
        gap: 1rem;
    }

    .cert-info h3 {
        font-size: 1rem; /* Shrink title slightly to prevent cramping */
    }

    .cert-icon i {
        font-size: 2rem; /* Scale icon appropriately */
    }
    
    .certification-card .btn {
        padding: 0.5rem 1rem; /* Condense view pdf button */
        font-size: 0.8rem;
        white-space: nowrap; /* Prevent text wrapping */
        flex-shrink: 0; /* Prevent the flex container from squishing the button */
    }
}

/* ---- About Section ---- */
.about-tools-icons {
    display: flex;
    flex-wrap: nowrap;
    gap: 1.5rem;
    margin-top: 1rem;
    margin-bottom: 2.5rem;
    font-size: 2.5rem;
    color: var(--text-secondary);
}

@media (max-width: 600px) {
    .about-tools-icons {
        gap: 0.75rem; 
        font-size: 1.8rem;
        justify-content: space-between;
    }
    
    .about-content {
        padding: 2rem 1.5rem;
    }
}

.about-content {
    padding: 4rem;
    border-radius: 24px;
}

.about-desc {
    font-size: 1.25rem;
    max-width: 800px;
    margin-bottom: 3rem;
    color: var(--text-secondary);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
}

.skill-category h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--accent);
}

.skill-category ul {
    list-style: none;
}

.skill-category li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--card-border);
    color: var(--text-secondary);
}

.skill-category li:last-child {
    border-bottom: none;
}

/* ---- Contact Section ---- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

@media (max-width: 900px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-weight: 500;
}

.contact-method i {
    font-size: 1.5rem;
    color: var(--accent);
}

.contact-form-container {
    padding: 3rem;
    border-radius: 24px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    background: rgba(var(--bg-primary), 0.5);
    color: var(--text-primary);
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.form-status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    display: none;
    text-align: center;
    font-weight: 500;
}

.form-status.success {
    display: block;
    background-color: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.form-status.error {
    display: block;
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Floating Resume Button & Modal */
.floating-resume-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    height: 60px;
    padding: 0 1.5rem;
    border-radius: 30px;
    background: var(--accent);
    color: #fff;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.4);
    cursor: pointer;
    z-index: 99;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.floating-resume-btn i {
    font-size: 1.5rem;
}

.floating-resume-btn:hover {
    transform: translateY(-5px);
    filter: brightness(1.1);
}

.resume-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.resume-modal.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.resume-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    /* Hardware acceleration optimization: Removed backdrop-filter to stop choppiness */
    will-change: opacity;
    transform: translateZ(0);
}

.resume-modal-content {
    position: relative;
    width: 90%;
    max-width: 600px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    
    transform: scale(1) translateY(0);
    opacity: 1;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.resume-modal.hidden .resume-modal-content {
    transform: scale(0.95) translateY(15px);
    opacity: 0;
}

.resume-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--card-border);
}

.resume-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.resume-modal-body {
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 250px;
}

.pdf-placeholder {
    text-align: center;
    padding: 2rem;
    border: 2px dashed var(--card-border);
    border-radius: 12px;
    width: 100%;
}

.resume-modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--card-border);
}



/* ---- Reveal Wrapper (View More) ---- */
.reveal-wrapper {
    position: relative;
    max-height: 650px;
    overflow: hidden;
    transition: max-height 0.8s ease-in-out;
}

.reveal-wrapper.expanded {
    max-height: 3000px; /* Large enough to hold all items */
}

.reveal-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to bottom, transparent, var(--bg-primary));
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.reveal-wrapper.expanded .reveal-fade {
    opacity: 0;
}

.reveal-btn-container {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    transition: opacity 0.3s ease, margin 0.3s ease;
}

.reveal-btn-container.hidden {
    opacity: 0;
    pointer-events: none;
    margin-top: 0;
    height: 0;
    overflow: hidden;
}

/* ================================== */
/* ---- MOBILE / TABLET RESPONSIVE ---- */
/* ================================== */

@media (max-width: 900px) {
    .hero-split {
        display: flex;
        flex-direction: column;
        min-height: auto;
    }
    
    .hero-left {
        padding: 120px 1.5rem 3rem 1.5rem;
        justify-content: flex-start;
        text-align: center;
    }
    
    .hero-content-box {
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .hero-desc {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-buttons {
        justify-content: center;
        gap: 1rem;
        flex-wrap: wrap;
    }

    .hero-right {
        width: 100%;
        height: 400px;
        position: relative;
    }



    .hero-photo {
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        height: 380px;
        width: auto;
        z-index: 5;
    }
    
    .chess-cell {
        font-size: 2rem;
    }
    
    .cb-custom img {
        max-width: 50px;
        width: 60%;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.8rem;
    }
    .hero-photo {
        height: 340px;
    }
    .hero-right {
        height: 350px;
    }
}

/* ---- Interactive Prototype Hint ---- */
.interactive-hint {
    position: absolute;
    top: -15px;
    right: -15px;
    background: var(--accent);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 20;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: bounceHint 2s infinite ease-in-out;
    pointer-events: none; /* Let clicks pass through */
}
[data-theme="dark"] .interactive-hint {
    color: #000;
}

@keyframes bounceHint {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.prototype-container {
    position: relative;
}

/* ---- Custom Scrollbar ---- */
html {
    scrollbar-width: thin;
    scrollbar-color: var(--card-border) var(--bg-primary);
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* =========================================================
   NEW HERO REFERENCE DESIGN FIXTURES 
   ========================================================= */

/* ---- NEW HEADER OVERRIDE ---- */
.transparent-header {
    background-color: transparent !important;
    border-bottom: 1px solid transparent !important; /* Explicit transparent state prevents border layout shift flashes */
    box-shadow: none !important;
    backdrop-filter: blur(0px) !important; /* Explicit zero-state prevents filter snapping */
    -webkit-backdrop-filter: blur(0px) !important;
    position: fixed; /* Make sticky */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, border-color 0.4s ease;
}

.transparent-header.scrolled {
    background-color: var(--card-bg) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid var(--card-border) !important;
}

.header-split {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
}

/* --- OVER DARK HERO BACKGROUND (DEFAULT) --- */
.logo-new, .mobile-menu-btn i {
    color: #ffffff;
    font-size: 2rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s, color 0.3s;
}
.mobile-menu-btn i { font-size: 1.5rem; }
.logo-new:hover { transform: scale(1.05); }

.nav-links-new { display: flex; gap: 2.5rem; align-items: center; }

.nav-link-new {
    color: rgba(255, 255, 255, 0.85); /* Off-white unscrolled */
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
    position: relative;
}
.nav-link-new:hover, .nav-link-new.active { color: #ffffff; }

.nav-link-new::after {
    content: '';
    position: absolute; 
    bottom: -6px; 
    left: 50%; 
    transform: translateX(-50%);
    width: 0%; 
    height: 2px;
    background-color: var(--accent); 
    border-radius: 2px;
    transition: width 0.3s ease, box-shadow 0.3s ease;
}

.nav-link-new.active::after,
.nav-link-new:hover::after {
    width: 100%;
    box-shadow: 0 0 10px var(--accent), 0 0 20px var(--accent);
}

.nav-actions-new { display: flex; align-items: center; gap: 1rem; }

.theme-icon-new { background: transparent; border: none; color: rgba(255,255,255,0.7); font-size: 1.25rem; cursor: pointer; transition: color 0.3s; }
.theme-icon-new:hover { color: #ffffff; }

/* GET IN TOUCH BUTTON (Outline Stroke) */
.btn-get-in-touch {
    background-color: transparent !important;
    border: 1px solid rgba(255,255,255,0.4);
    color: #ffffff;
    padding: 0.4rem 0.4rem 0.4rem 1.25rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s, color 0.3s;
}
.btn-get-in-touch:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px var(--glass-shadow);
    border-color: rgba(255,255,255,0.8);
}
.arrow-circle {
    background-color: var(--accent); /* Theme sync */
    color: #ffffff !important;
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 1rem;
}

/* --- THEME-SYNCED SCROLLED STATE --- */
.transparent-header.scrolled .logo-new,
.transparent-header.scrolled .mobile-menu-btn i,
.transparent-header.scrolled .nav-link-new:hover,
.transparent-header.scrolled .nav-link-new.active {
    color: var(--text-primary);
}
.transparent-header.scrolled .nav-link-new {
    color: var(--text-secondary);
}
.transparent-header.scrolled .theme-icon-new { color: var(--text-secondary); }
.transparent-header.scrolled .theme-icon-new:hover { color: var(--text-primary); }

.transparent-header.scrolled .btn-get-in-touch {
    color: var(--text-primary);
    border: 1px solid var(--text-secondary);
}
.transparent-header.scrolled .btn-get-in-touch:hover {
    border-color: var(--accent);
}

/* ---- NEW HERO SECTION ---- */
.hero-fullscreen {
    position: relative;
    height: 100vh;
    min-height: 700px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Push content to bottom */
    overflow: hidden;
    /* Create the exact deep cyan/blue glow fading to dark navy from the reference image */
    background: radial-gradient(circle at 80% 40%, #366fa3 0%, #152c4a 40%, #0a1120 75%, #050810 100%);
}

.meteors-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1; /* Let the meteors fall right behind the hero subject */
    pointer-events: none;
}

.meteor {
    position: absolute;
    width: 150px;
    height: 2px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.7));
    transform-origin: right center;
    transform: rotate(135deg); 
    animation: meteor-fall 6s linear infinite;
    opacity: 0;
}

.meteor::before {
    content: '';
    position: absolute;
    right: 0; /* The leading edge */
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 3px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.8), 0 0 20px 4px rgba(96, 165, 250, 0.6);
}

@keyframes meteor-fall {
    0% { transform: rotate(135deg) translateX(0); opacity: 0; }
    5% { opacity: 1; }
    40% { opacity: 0; transform: rotate(135deg) translateX(2500px); }
    100% { opacity: 0; transform: rotate(135deg) translateX(2500px); }
}

/* Stagger meteors dynamically */
.meteor:nth-child(1) { top: 10%; left: 80%; animation-delay: 0s; animation-duration: 5s; width: 120px; }
.meteor:nth-child(2) { top: -10%; left: 50%; animation-delay: 1.5s; animation-duration: 7s; }
.meteor:nth-child(3) { top: -20%; left: 95%; animation-delay: 2.8s; animation-duration: 8s; width: 200px; }
.meteor:nth-child(4) { top: 30%; left: 110%; animation-delay: 4.2s; animation-duration: 6s; }
.meteor:nth-child(5) { top: -5%; left: 125%; animation-delay: 0.9s; animation-duration: 7.5s; width: 180px; }
.meteor:nth-child(6) { top: 40%; left: 130%; animation-delay: 3.4s; animation-duration: 5.5s; }

.hero-bg {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 900px; /* Constrain the "cover" sizing width so it doesn't massively zoom */
    height: 100%;
    background-size: cover;
    background-position: center 10%; 
    background-repeat: no-repeat;
    background-image: url('assets/NEW%20HERO.webp');
    z-index: 5;
    /* Feather edges so it seamlessly blends into the dark starry galaxy background */
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Subtle gradient to ensure text readability matching image, reduced opacity to let background color shine */
    background: linear-gradient(to right, rgba(5,8,16,0.7) 0%, rgba(5,8,16,0.2) 50%, rgba(5,8,16,0) 100%),
                linear-gradient(to top, rgba(5,8,16,0.6) 0%, transparent 30%);
    z-index: 2;
}

.hero-content-new {
    position: relative;
    z-index: 10;
    width: 100%;
    padding-bottom: 3rem;
}

.hero-middle-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end; /* Align right text to the bottom of the huge left text */
    gap: 2rem;
    flex-wrap: wrap; /* Safe wrapping for tablets */
    margin-bottom: 4rem;
}

.hero-left-text {
    flex: 1;
    min-width: 320px;
}

.hero-eyebrow {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.hero-title-huge {
    font-family: 'Outfit', sans-serif;
    color: #ffffff;
    /* Responsive huge font size */
    font-size: clamp(4rem, 9vw, 8rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin: 0;
}

.hero-right-text {
    flex: 0 1 400px;
    padding-bottom: 1.25rem; /* Aligns visually with bottom of "Manager" */
}

.hero-statement {
    color: #ffffff;
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 0.75rem;
}

.hero-substatement {
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.05rem;
    line-height: 1.5;
}

.hero-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 2rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.hero-stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-num {
    color: #60a5fa; /* Reference specific blue */
    font-weight: 700;
    font-size: 1rem;
}

.stat-label {
    color: rgba(255,255,255,0.9);
    font-weight: 500;
    font-size: 1rem;
}

.m-only { display: none; }

/* Mobile Adjustments */
@media (max-width: 768px) {
    .h-desktop { display: none !important; }
    .m-only { display: block !important; }

    .header-split {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }

    .nav-links-new {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: 0;
        left: auto;
        width: 55%; /* Covers slightly more than half the screen safely */
        height: 100vh;
        height: 100dvh;
        background: var(--bg-primary); /* Sync to global theme */
        padding: 6rem 2rem 2rem 2rem; /* Push links down to clear close button */
        border-left: 1px solid rgba(255,255,255,0.05);
        border-bottom: none;
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        text-align: left;
        gap: 2rem;
        
        /* Smooth Drawer Animation */
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
        z-index: -1; /* Layer under the physical header buttons */
    }
    
    .nav-links-new.active {
        transform: translateX(0);
    }

    .nav-link-new {
        font-size: 1.15rem;
    }

    .hero-fullscreen {
        height: 100vh;
        height: 100dvh;
        min-height: unset; /* Let it wrap safely on very tiny mobile screens */
    }

    .hero-title-huge {
        font-size: clamp(3rem, 14vw, 5rem); /* Prevents overflow issues */
    }

    .hero-eyebrow {
        margin-bottom: 0.25rem;
    }

    .hero-middle-row { align-items: flex-start; gap: 1.5rem; margin-bottom: 2rem; }
    .hero-right-text { padding-bottom: 0; }
    .hero-bottom-row { flex-direction: column; align-items: flex-start; gap: 0.75rem; border-top: none; padding-top: 0; }
    .hero-stat-item { flex-direction: row; gap: 1rem; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 0.5rem; width: 100%; }
}
