:root {
    --bg-dark: #0A0A0C;
    --text-white: #FFFFFF;
    --text-gray: #A0A0A0;
    --accent-green: #FFFFFF;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

@font-face {
    font-family: 'SamsungSharpSans';
    src: url('../JayPortfolio/assets/font/samsungsharpsans-bold.otf') format('opentype');
    font-weight: 700;
}

@font-face {
    font-family: 'UberMove';
    src: url('../JayPortfolio/assets/font/UberMoveTextRegular.otf') format('opentype');
    font-weight: 400;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'UberMove', 'Inter', -apple-system, sans-serif;
    background-color: #1a1a1a;
    color: var(--text-white);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Wrapping the entire layout identically to the ad */
.app-container {
    width: calc(100vw - 32px);
    height: calc(100vh - 32px);
    margin: 16px;
    display: flex;
    gap: 0;
    background-color: var(--bg-dark);
    border: 8px solid rgba(255, 255, 255, 0.9);
    border-radius: 48px;
    overflow: hidden;
}

/* Sidebar Styling */
.sidebar {
    width: 280px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px 24px;
}

/* Vertical Logo */
.logo-wrapper {
    flex: 1;
    display: flex;
    align-items: flex-start;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Rotate the entire logo container 90deg counter-clockwise */
    transform: rotate(-90deg) translateX(-100px);
    transform-origin: top left;
    margin-left: 60px; /* Offset to keep it visible inside the fixed width sidebar */
    margin-top: 200px;
}

.nexa {
    font-family: 'SamsungSharpSans', 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 3rem;
    letter-spacing: 2px;
    line-height: 1;
}

.agency {
    font-family: 'SamsungSharpSans', 'Montserrat', sans-serif;
    font-size: 1rem;
    color: var(--text-gray);
    letter-spacing: 1px;
    margin-top: 4px;
}

/* Social Section */
.social-section {
    margin-bottom: 40px;
    padding-right: 24px;
}

.resume-download-section h4 {
    font-family: 'SamsungSharpSans', 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 16px;
    color: var(--text-white);
}

.resume-download-section p {
    font-size: 0.85rem;
    color: var(--text-gray);
    line-height: 1.5;
    margin-bottom: 24px;
}

.download-pill-wrapper {
    position: relative;
    width: 100%;
}

.glass-download-btn {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 40px;
    padding: 0;
    width: 100%;
    color: var(--text-white);
    font-family: 'UberMove', 'Inter', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s, box-shadow 0.3s;
    height: 48px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.glass-download-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.glass-download-btn .btn-content {
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    font-weight: 500;
}

.glass-download-btn .btn-loader-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-90deg);
    width: 44px;
    height: 44px;
    opacity: 0;
    pointer-events: none;
}

.glass-download-btn .ring-path {
    stroke: var(--accent-green);
    stroke-dasharray: 125.6; /* 2 * pi * r(20) */
    stroke-dashoffset: 125.6; 
    stroke-linecap: round;
}

.glass-download-btn .btn-success {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: scale(0);
    opacity: 0;
    color: var(--bg-dark);
    background: var(--accent-green);
    border-radius: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    pointer-events: none;
}

/* Main Content Area */
.main-content {
    flex: 1;
    background: transparent;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    display: flex;
    flex-direction: column;
}

/* Sections Setup */
.section-block {
    padding: 120px 40px 40px 40px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    justify-content: flex-start;
    /* Helper border for layout visibility */
    border: 1px dashed rgba(255, 255, 255, 0.3);
}

/* Home section occupies full viewport inside the container */
#home {
    display: flex;
    flex-direction: row;
    padding: 0;
    min-height: 100%; /* Changed from 100vh to perfectly fit inside scroll container */
    border: none;
}

.home-hero-bg {
    flex: 1;
    background: linear-gradient(135deg, rgba(26, 47, 34, 0.4) 0%, rgba(15, 28, 20, 0.4) 100%), url('assets/hero/bg_cover_jay.jpeg');
    background-size: cover;
    background-position: center;
    border-radius: 40px;
    margin: 24px 24px 24px 0;
    /* Removed explicit clunky calc() so flexbox auto-stretches exactly 24px inset */
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 120px 40px 40px 40px;
    /* Helper border for layout visibility */
    border: 1px dashed rgba(255, 255, 255, 0.3);
}

.upcoming-section {
    padding: 120px 64px;
    justify-content: center;
}

.upcoming-section h2 {
    font-family: 'SamsungSharpSans', 'Montserrat', sans-serif;
    font-size: 3rem;
    margin-bottom: 24px;
    color: var(--accent-green);
}

.upcoming-section p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Inner Navigation inside main card */
.inner-nav {
    display: flex;
    justify-content: center; /* Center the nav items perfectly */
    align-items: center;
    position: sticky;
    top: 40px;
    z-index: 100;
    width: 100%;
    margin-bottom: 24px;
    pointer-events: none; /* Let clicks pass through empty space */
}

.inner-nav > * {
    pointer-events: auto; /* Enable clicks on actual nav elements */
}

.nav-links {
    display: flex;
    gap: 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 40px;
    padding: 8px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nav-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 24px;
    border-radius: 30px;
    transition: all 0.3s;
}

.mobile-menu-btn {
    display: none;
}

.nav-links a:hover {
    color: var(--text-white);
}

.nav-links a.active {
    background-color: var(--accent-green);
    color: var(--bg-dark) !important;
}

.glass-contact-btn {
    position: absolute;
    right: 40px;
    color: var(--text-white);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 12px 32px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: background 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.glass-contact-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Hero Section specific inner layout */
.hero-left {
    position: relative;
    z-index: 2;
}

.hero-left {
    max-width: 500px;
}

.hero-left h1 {
    font-family: 'SamsungSharpSans', 'Montserrat', sans-serif;
    font-size: 5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 24px;
    text-transform: uppercase;
}

/* Typewriter Cursor */
.typewriter-cursor {
    display: inline-block;
    width: 6px;
    margin-left: 8px;
    /* Blink animation */
    animation: blink 1s step-end infinite;
    font-weight: 400; /* Makes it look more like a cursor than text */
    color: var(--accent-green);
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-left p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 400px;
}

/* Circular Badge with Rotating Text */
.circle-badge {
    width: 120px;
    height: 120px;
    position: relative;
    cursor: pointer;
}

.circle-badge svg {
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.circle-badge:hover svg {
    animation-play-state: paused;
}

/* ================= JAYGPT DARK GLASS WIDGET ================= */
.inline-chat-wrapper {
    position: absolute;
    bottom: 40px;
    right: 40px;
    z-index: 5;
    padding-top: 60px; /* Room for the overflowing orb above the card */
}

.hidden-trigger {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(20px) scale(0.9) !important;
}

/* Floating Trigger Button */
/* Floating Trigger Card */
.jaygpt-trigger {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(0, 0, 0, 0.35); /* Dark Frosted glass matching chat */
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 40px;
    border-bottom-left-radius: 16px; /* Custom geometric shape */
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.1);
    cursor: pointer;
    overflow: hidden;
}

.jaygpt-trigger.card-variant {
    width: 290px;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
}

.trigger-decorative-blob {
    position: absolute;
    bottom: -40px;
    left: -40px;
    width: 140px;
    height: 140px;
    background: #4ade80; /* Jay's accent green glowing through the dark glass */
    border-radius: 50%;
    filter: blur(45px);
    z-index: 0;
    opacity: 0.35;
}

.jaygpt-card-content {
    position: relative;
    z-index: 1;
}

.card-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 4px;
    font-family: 'SamsungSharpSans', 'Montserrat', sans-serif;
}

.card-location {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.65);
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.card-action-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    color: #FFFFFF;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.card-description {
    font-size: 11px; /* Decreased font size */
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0px; 
    font-weight: 500;
    overflow: hidden; /* Required for GSAP height collapse */
}

.card-footer-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.detail-row {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot-separator {
    color: rgba(255, 255, 255, 0.3);
}

/* Modal Open Animation State for Trigger */
.jaygpt-trigger.trigger-hidden-by-modal {
    opacity: 0;
    transform: translateY(30px) scale(0.85); /* Springs down and shrinks */
    pointer-events: none;
}

.jaygpt-trigger:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
}

.jaygpt-trigger:hover .card-action-btn {
    background: var(--text-white);
    color: var(--bg-dark); /* Ensure hover icon retains contrast */
    transform: rotate(45deg); /* playful interaction */
}

/* Modal Layout */
.jaygpt-modal {
    width: 380px; 
    height: auto;
    min-height: 320px;
    max-height: 580px;
    
    /* Dark Glass formulation */
    background: rgba(28, 30, 28, 0.82); 
    backdrop-filter: blur(44px) saturate(180%);
    -webkit-backdrop-filter: blur(44px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12); 
    border-radius: 28px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.55);
    
    display: flex;
    flex-direction: column;
    overflow: visible; /* Allow orb to overflow above top */
    z-index: 999;
    transition: all 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.1);

    /* Padding top creates space for the overflowing avatar orb */
    padding-top: 56px;
    margin-top: 56px; /* Push card down so orb can float above */
}

/* STATE 1: Inline (in Hero Section) */
.jaygpt-modal.inline-mode {
    position: relative;
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

/* STATE 2: Fixed (Floating Modal layout) */
.jaygpt-modal.fixed-mode {
    position: fixed;
    bottom: 110px; 
    right: 40px;
    transform-origin: bottom right;
    transform: scale(0.9);
    opacity: 0;
    pointer-events: none;
}

.jaygpt-modal.fixed-mode.active {
    opacity: 1;
    pointer-events: all;
    transform: scale(1);
}

/* Banner — now only positions the floating orb, no height */
.ai-banner {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    z-index: 10;
}

/* Floating orb — half above the card */
.video-zoom-wrapper {
    width: 100px; 
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    background: radial-gradient(circle, #e0f2fe 0%, #bae6fd 40%, #38bdf8 100%);
    box-shadow:
        0 0 0 4px rgba(255,255,255,0.15),
        0 12px 48px rgba(56, 189, 248, 0.45),
        0 4px 24px rgba(0,0,0,0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.ai-banner-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.4);
    transform-origin: center center;
    border: none;
}

/* JayGPT label below orb, inside the card */
.ai-status {
    margin-top: 12px;
    text-align: center;
}

.ai-status h2 {
    color: #FFFFFF;
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
}

.jaygpt-close {
    position: absolute;
    top: 68px;  /* Inside the card (below orb area) */
    right: 20px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.6);
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border-radius: 50%;
    font-size: 15px;
    transition: all 0.2s ease;
    z-index: 20;
}

.jaygpt-close:hover {
    background: rgba(255,255,255,0.18);
    color: #FFFFFF;
}

.inline-mode .jaygpt-close {
    display: none;
}

/* Chat Body */
.jaygpt-body {
    flex: 1;
    overflow-y: auto;
    position: relative;
    scrollbar-width: none;
    display: flex;
    flex-direction: column;
}

/* Welcome Screen */
.welcome-screen {
    display: flex;
    flex-direction: column;
    padding: 10px 24px 10px 24px;
}

.apple-heading {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #FFFFFF;
    letter-spacing: -1px;
}

.apple-subtext {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 24px;
    font-weight: 500;
}

.sample-prompts-carousel {
    display: flex;
    margin-bottom: 4px; /* Minimal gap above the input */
    min-height: 38px;
    align-items: center;
}

.prompt-pill {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px; /* Pill shape */
    padding: 8px 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: background 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.prompt-pill:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
}

.prompt-pill span {
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    white-space: nowrap;
    display: inline-block;
}

.prompt-pill i {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease, transform 0.3s ease;
}

.prompt-pill:hover i {
    color: #fff;
    transform: translateX(2px);
}

/* Messages */
.messages-container {
    padding: 0 24px 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    display: flex;
    flex-direction: column;
    animation: fadeInSlideUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes fadeInSlideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message-content {
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    font-weight: 500;
    color: #FFFFFF;
}

/* User Bubble */
.user-message {
    align-self: flex-end;
    max-width: 85%;
}
.user-message .message-content {
    background: rgba(255,255,255,0.15); 
    padding: 10px 16px;
    border-radius: 18px;
    border-bottom-right-radius: 4px;
    font-weight: 600;
}

/* Bot Bubble */
.bot-message {
    align-self: flex-start;
    max-width: 90%;
}
.bot-message .message-content {
    background: transparent;
    padding: 4px 0;
}

/* Markdown overrides */
.bot-message p { margin-bottom: 12px; }
.bot-message p:last-child { margin-bottom: 0; }
.bot-message h1, .bot-message h2, .bot-message h3 { margin-top: 16px; margin-bottom: 8px; font-weight: 700;}
.bot-message ul { margin-left: 20px; margin-bottom: 12px; }
.bot-message a { color: #00c6ff; text-decoration: none; font-weight: 600;}
.bot-message a:hover { text-decoration: underline; }
.bot-message strong { font-weight: 700; color: #FFFFFF; }

.system-message .message-content {
    background: rgba(255, 59, 48, 0.2);
    color: #ffb3b0;
    font-size: 12px;
    border-radius: 10px;
    padding: 8px 14px;
    text-align: center;
}

/* Input Form */
.jaygpt-footer {
    padding: 12px 20px 20px 20px;
    background: transparent;
}

.modern-input-form {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.1);
    border-radius: 30px;
    padding: 6px 6px 6px 18px;
    transition: all 0.3s ease;
}

.modern-input-form:focus-within {
    background: rgba(255,255,255,0.2);
}

#chat-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px 10px 10px 0;
    color: #FFFFFF;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    outline: none;
}

#chat-input::placeholder {
    color: rgba(255,255,255,0.5);
}

#chat-submit {
    background: #FFFFFF;
    color: #000000;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

#chat-submit:disabled {
    background: rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.4);
    cursor: default;
}

#chat-submit:not(:disabled):hover {
    transform: scale(1.05);
}

.footer-disclaimer {
    display: none;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 6px 0;
    align-items: center;
    height: 20px;
}

.typing-dot {
    width: 5px;
    height: 5px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }
.typing-dot:nth-child(3) { animation-delay: 0s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0); opacity: 0.3; }
    40% { transform: scale(1); opacity: 1; background: #FFFFFF; }
}

@media (max-width: 1200px) {
    .app-container {
        flex-direction: column;
        padding: 0;
        gap: 0;
        border-radius: 32px;
    }
    .sidebar {
        width: 100%;
        height: auto;
        flex-direction: row;
        align-items: center;
        padding: 24px;
    }
    .logo {
        transform: none;
        margin-left: 0;
        margin-top: 0;
    }
    .nexa { font-size: 2rem; }
    .social-section, .transform-btn {
        margin-bottom: 0;
    }
    #home {
        flex-direction: column;
    }
    .home-hero-bg {
        border-radius: 24px;
        min-height: 80vh;
        margin: 0 24px 24px 24px;
        padding: 40px 24px 24px 24px; /* Fix overlay by pushing content up */
        justify-content: flex-start;
        background: linear-gradient(135deg, rgba(26, 47, 34, 0.4) 0%, rgba(15, 28, 20, 0.4) 100%), url('../JayPortfolio/assets/hero/bg_jay_cover_portrait.png');
        background-size: cover;
        background-position: center;
    }
    .hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 40px;
    }
    
    .resume-download-section h4,
    .download-desc,
    .hero-left p {
        display: none !important; /* Conceal superfluous paragraphs / subheadings */
    }
    
    .hero-left h1 {
        font-size: 4rem;
        margin-top: 0;
    }
    
    /* Tablet Bento Grid */
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .bento-card.featured, .bento-card.wide {
        grid-column: span 2;
        grid-row: auto;
    }
    .bento-card.tall {
        grid-column: span 1;
        grid-row: span 2;
    }
}

@media (max-width: 768px) {
    .app-container {
        border-width: 4px;
        border-radius: 24px;
        margin: 8px;
        width: calc(100vw - 16px);
        height: calc(100vh - 16px);
    }
    /* Radically simplify sidebar for mobile */
    .sidebar {
        padding: 16px;
        justify-content: center;
        flex-direction: column;
    }
    .social-section, .transform-btn {
        display: none !important; /* Hide to save space */
    }
    .logo {
        align-items: center;
        width: 100%;
    }
    .nexa { font-size: 1.8rem; text-align: center; }
    .agency { font-size: 0.8rem; text-align: center; }
    
    .resume-download-section {
        padding: 24px;
        display: flex;
        justify-content: center;
        width: 100%;
    }
    
    .download-pill-wrapper {
        max-width: 220px;
    }
    
    /* Hide inline chat wrap so observer acts as if empty, triggering fixed pill immediately on mobile */
    .inline-chat-wrapper {
        display: none !important;
    }
    
    /* Top Navigation scaling */
    .inner-nav {
        top: 16px;
        margin-bottom: 16px;
        display: flex;
        justify-content: flex-end;
        background: transparent;
        border: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        padding-right: 16px;
    }
    
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(15, 15, 15, 0.4);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        color: var(--text-white);
        padding: 10px;
        font-size: 1.5rem;
        cursor: pointer;
        z-index: 1000;
        transition: transform 0.2s ease, background 0.3s ease;
    }
    
    .mobile-menu-btn:active {
        transform: scale(0.95);
        background: rgba(255, 255, 255, 0.1);
    }
    
    .nav-links {
        display: none; /* hidden until tapped */
        position: absolute;
        top: 64px;
        right: 16px;
        flex-direction: column;
        background: rgba(15, 15, 15, 0.4);
        backdrop-filter: blur(40px) saturate(150%);
        -webkit-backdrop-filter: blur(40px) saturate(150%);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 20px;
        padding: 16px;
        width: 220px;
        box-shadow: 0 10px 40px rgba(0,0,0,0.5);
        z-index: 999;
        gap: 4px;
    }
    
    .nav-links.active-mobile-menu {
        display: flex;
    }
    
    .nav-links a {
        padding: 12px 16px;
        font-size: 1rem;
        border-radius: 8px;
        text-align: right;
    }
    
    .glass-contact-btn {
        display: none; /* Hide top right contact button on mobile */
    }
    
    .resume-download-section h4,
    .download-desc {
        display: none; /* Hide lengthy resume paragraph and title on mobile */
    }
    
    /* Hero area scaling */
    .home-hero-bg {
        background: linear-gradient(135deg, rgba(26, 47, 34, 0.4) 0%, rgba(15, 28, 20, 0.4) 100%), url('assets/hero/bg_cover_jay.jpeg');
        background-size: cover;
        background-position: center;
        padding: 40px 16px 24px 16px; /* Drastically reduced to push text highest */
        margin: 0 16px 16px 16px;
        justify-content: flex-start; /* Pushes text to top left away from the portrait face */
    }
    .hero-left h1 {
        font-size: 2.8rem;
        margin-top: 0;
    }
    .hero-left p {
        display: none !important; /* Hide subtext beneath typewriter completely */
    }
    .what-we-do-card {
        display: none; /* Flow breaks on mobile, hide the glass card completely */
    }
    
    /* Section padding */
    .section-block, .upcoming-section {
        padding: 60px 24px 40px 24px;
    }
    .upcoming-section h2 {
        font-size: 2.2rem;
    }
    .jaygpt-trigger.card-variant {
        width: calc(100vw - 48px);
        bottom: 24px;
        right: 24px;
        padding: 24px;
    }
    
    .jaygpt-modal.fixed-mode {
        width: calc(100vw - 48px);
        bottom: 24px;
        right: 24px;
        left: 24px;
        max-width: none;
    }
}

/* ============================================================ */
/* EDUCATION & EXPERIENCE — MODERN REDESIGN                     */
/* ============================================================ */

/* --- Section container --- */
.edu-section {
    padding: 100px 64px 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    /* No overflow:hidden here — GSAP y-animations need to be unclipped */
}

/* --- Aurora animated background — overflow clipped here only --- */
.edu-aurora {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden; /* Blobs clipped at section boundary only */
}

.aurora-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.18;
    animation: auroraFloat 14s ease-in-out infinite alternate;
}

.aurora-blob.a1 {
    width: 700px; height: 500px;
    background: radial-gradient(circle, #7c3aed, #a855f7);
    top: -160px; left: -180px;
    animation-duration: 16s;
}

.aurora-blob.a2 {
    width: 600px; height: 500px;
    background: radial-gradient(circle, #2563eb, #06b6d4);
    bottom: -100px; right: -200px;
    animation-duration: 12s;
    animation-delay: -4s;
}

.aurora-blob.a3 {
    width: 400px; height: 350px;
    background: radial-gradient(circle, #db2777, #f59e0b);
    top: 40%; left: 30%;
    animation-duration: 18s;
    animation-delay: -8s;
}

@keyframes auroraFloat {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(40px, -30px) scale(1.08); }
    100% { transform: translate(-20px, 20px) scale(0.95); }
}

/* --- Section header --- */
.edu-section-header {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
    z-index: 1;
}

.edu-label {
    font-size: 0.7rem;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    margin-bottom: 16px;
    font-weight: 600;
}

.edu-main-heading {
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 1.0;
    color: var(--text-white);
    font-family: 'SamsungSharpSans', 'Montserrat', sans-serif;
    margin-bottom: 20px;
}

.edu-subheading {
    font-size: 1rem;
    color: rgba(255,255,255,0.5);
    max-width: 600px;
    margin: 0 0 32px 0; /* Flush left alignment to match main heading */
    line-height: 1.7;
}

/* --- Main timeline wrapper — wider to accommodate side detail card --- */
.tl-wrapper {
    position: relative;
    width: 100%;
    max-width: 1100px;
    z-index: 1;
}

/* Each row — 4-column grid: year | axis | cards-area (flex row inside) */
.tl-entry {
    display: grid;
    grid-template-columns: 80px 40px 1fr;
    column-gap: 20px;
    align-items: start;
    margin-bottom: 48px;
    visibility: hidden; /* revealed by GSAP */
}

.tl-entry.revealed { visibility: visible; }

/* Year nudges further left on hover to give cards more breathing room */
.tl-entry:hover .tl-year-col {
    transform: translateX(-16px);
}

/* Cards area — flex row holding main card + detail card */
.tl-cards-area {
    display: flex;
    gap: 12px;
    align-items: flex-start; /* Prevent vertical stretching and height bouncing */
    min-width: 0;
    position: relative;
}

/* Main card stays fixed width */
.tl-cards-area .tl-glass-card {
    flex: 0 0 100%;
    transition: flex 0.45s cubic-bezier(0.4,0,0.2,1);
    min-width: 0;
}

.tl-entry:hover .tl-cards-area .tl-glass-card {
    flex: 0 0 48%;
}

/* Detail card slides in from the right — hidden by default */
.tl-detail-card {
    flex: 0 0 0%;
    min-width: 0;
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateX(24px);
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(28px) saturate(150%);
    -webkit-backdrop-filter: blur(28px) saturate(150%);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 8px 40px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.1);
    transition:
        flex 0.45s cubic-bezier(0.4,0,0.2,1),
        max-width 0.45s cubic-bezier(0.4,0,0.2,1),
        opacity 0.35s ease 0.1s,
        transform 0.45s cubic-bezier(0.2,0.9,0.3,1),
        padding 0.45s ease;
    pointer-events: none;
    
    /* NEW: Prevent text wrapping/squishing during width animation */
    display: flex;
    flex-direction: column;
}

/* Force all inner contents to a fixed width so height never recalculates during transition */
.tl-detail-card > * {
    width: 420px;
    min-width: 420px;
}

.tl-entry:hover .tl-detail-card {
    flex: 0 0 48%;
    max-width: 600px;
    opacity: 1;
    transform: translateX(0);
    padding: 22px 22px;
    pointer-events: auto;
}

/* Detail card internals */
.tl-detail-card .tlc-section-label {
    font-size: 0.65rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.38);
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tl-detail-card ul {
    list-style: none;
    padding: 0;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.tl-detail-card li {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.62);
    line-height: 1.55;
    padding-left: 14px;
    position: relative;
}

.tl-detail-card li::before {
    content: '';
    position: absolute;
    left: 0; top: 7px;
    width: 4px; height: 4px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
}

.tl-detail-card li strong { color: rgba(255,255,255,0.9); }

/* --- Big typographic year --- */
.tl-year-col {
    display: flex;
    justify-content: flex-end;
    padding-top: 14px;
    transition: transform 0.45s cubic-bezier(0.4,0,0.2,1);
}

.tl-year {
    font-size: 3.6rem;
    font-weight: 800;
    line-height: 1;
    font-family: 'SamsungSharpSans', 'Montserrat', sans-serif;
    color: transparent;
    background: linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.15) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    letter-spacing: -2px;
    user-select: none;
}

/* --- Axis (dot + line) --- */
.tl-axis {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.tl-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 1.5px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(16px);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    color: rgba(255,255,255,0.9);
    flex-shrink: 0;
    box-shadow: 0 0 0 5px rgba(255,255,255,0.04), 0 4px 20px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 1;
}

.tl-entry:hover .tl-dot {
    transform: scale(1.1);
    box-shadow: 0 0 0 8px rgba(255,255,255,0.08), 0 8px 32px rgba(147,51,234,0.3);
}

.tl-dot.edu-dot {
    background: rgba(147,197,253,0.1);
    border-color: rgba(147,197,253,0.25);
}

.tl-axis-line {
    width: 1.5px;
    flex: 1;
    min-height: 40px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.15), transparent);
    margin-top: 6px;
}

/* --- Glassmorphic card (Apple weather style) --- */
.tl-glass-card {
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 24px 28px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.12);
    transition: transform 0.3s cubic-bezier(0.2,0.9,0.3,1.1),
                box-shadow 0.3s ease,
                border-color 0.3s ease;
}

.tl-glass-card:hover {
    transform: translateY(-4px) scale(1.01);
    border-color: rgba(255,255,255,0.2);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.18);
}

/* Badges row */
.tlc-top { margin-bottom: 12px; }
.tlc-badges { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.tlc-badge {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 4px 11px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.tlc-badge.work {
    background: rgba(74, 222, 128, 0.12);
    color: #86efac;
    border: 1px solid rgba(74,222,128,0.22);
}

.tlc-badge.edu {
    background: rgba(147, 197, 253, 0.12);
    color: #bae6fd;
    border: 1px solid rgba(147,197,253,0.22);
}

.tlc-period {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
    font-weight: 500;
}

.tlc-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 6px;
    line-height: 1.3;
    font-family: 'SamsungSharpSans', 'Montserrat', sans-serif;
}

.tlc-org {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.45);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.tlc-summary {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.65);
    line-height: 1.65;
    margin-bottom: 16px;
}

/* Expand toggle button */
.tlc-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease;
    letter-spacing: 0.5px;
}

.tlc-toggle:hover { color: rgba(255,255,255,0.9); }

.tlc-toggle i {
    transition: transform 0.35s cubic-bezier(0.2,0.9,0.3,1.1);
    font-size: 13px;
}

.tlc-toggle.open i { transform: rotate(180deg); }
.tlc-toggle.open    { color: rgba(255,255,255,0.85); }

/* Expanded details panel */
.tlc-expanded {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.2,0.9,0.3,1), opacity 0.4s ease;
    opacity: 0;
}

.tlc-expanded.visible {
    max-height: 500px;
    opacity: 1;
}

.tlc-highlights {
    margin-top: 18px;
    margin-bottom: 16px;
}

.tlc-section-label {
    font-size: 0.68rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tlc-highlights ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tlc-highlights li {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.65);
    line-height: 1.6;
    padding-left: 16px;
    position: relative;
}

.tlc-highlights li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
}

.tlc-highlights li strong { color: rgba(255,255,255,0.9); }

.tlc-tech { margin-bottom: 4px; }

.tlc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 8px;
}

.tlc-tags span {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
    letter-spacing: 0.3px;
    transition: background 0.2s ease, color 0.2s ease;
}

.tlc-tags span:hover {
    background: rgba(255,255,255,0.14);
    color: rgba(255,255,255,0.95);
}

/* --------------------------------- */
/* BENTO STYLE PROJECTS SECTION      */
/* --------------------------------- */
.projects-section {
    position: relative;
    padding: 120px 64px;
    z-index: 2;
}

.projects-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, rgba(20, 184, 166, 0.05) 40%, transparent 70%);
    z-index: -1;
    pointer-events: none;
    border-radius: 50%;
    filter: blur(80px);
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    grid-auto-flow: dense;
    grid-auto-rows: minmax(220px, auto);
    gap: 16px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.bento-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.1), border-color 0.4s ease, box-shadow 0.4s ease;
}

.bento-card.featured {
    grid-column: span 2;
    grid-row: span 2;
}

.bento-card.wide {
    grid-column: span 2;
}

.bento-card.tall {
    grid-row: span 2;
}

.bento-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    transition: transform 0.6s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.bento-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}

.bento-header {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 20px;
}

.bento-tag {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.85);
}

.bento-tag.ai { border-color: rgba(56, 189, 248, 0.3); color: #e0f2fe; }
.bento-tag.fullstack { border-color: rgba(244, 63, 94, 0.3); color: #ffe4e6; }
.bento-tag.frontend { border-color: rgba(250, 204, 21, 0.3); color: #fef08a; }

.bento-body h3 {
    font-family: 'SamsungSharpSans', sans-serif;
    font-size: 1.4rem;
    color: var(--text-white);
    margin-bottom: 8px;
    transform: translateY(6px);
    opacity: 0.9;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.bento-card.featured .bento-body h3 {
    font-size: 2.2rem;
}

.bento-body p {
    font-size: 1rem;
    color: rgba(255,255,255,0.65);
    line-height: 1.6;
    margin-bottom: 24px;
    transform: translateY(15px);
    opacity: 0.8;
    transition: transform 0.4s ease 0.05s, opacity 0.4s ease 0.05s;
}

.bento-card.featured .bento-body p {
    font-size: 1.2rem;
    max-width: 80%;
}

.bento-tech {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.4s ease 0.1s, opacity 0.4s ease 0.1s;
}

.bento-tech span {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 8px;
    background: rgba(0,0,0,0.4);
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.1);
}

.netflix-red { color: #E50914 !important; }
.title-centered { text-align: center; }
.centered-tech { justify-content: center; }

.giant-bento-icon {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    font-size: 80px;
    color: rgba(255,255,255,0.2);
    transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.3, 1), color 0.4s ease;
    z-index: 0;
}

/* Micro Animations on Hover */
.bento-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.bento-card:hover .bento-bg {
    transform: scale(1.08); /* Subtle image zoom */
}

.bento-card:hover .bento-body h3,
.bento-card:hover .bento-body p {
    transform: translateY(0);
    opacity: 1;
}

.bento-card:hover .bento-tech {
    transform: translateY(0);
    opacity: 1;
}

.bento-card:hover .giant-bento-icon {
    transform: translate(-50%, -50%) scale(1.1);
    color: rgba(255,255,255,0.8);
}

/* ------------------------------------------------ */
/* RESEARCH & PUBLICATIONS (GLASSMORPHIC TABS)      */
/* ------------------------------------------------ */
.research-section {
    position: relative;
    padding: 120px 64px;
    z-index: 2;
}

.research-hint {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.research-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 500px;
}

.research-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 2;
}

.research-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px 32px;
    border-radius: 24px;
    background: rgba(20, 20, 20, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.research-card:hover, .research-card.active {
    background: rgba(40, 40, 40, 0.7);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(12px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.research-card .rc-number {
    font-family: 'SamsungSharpSans', sans-serif;
    font-size: 2rem;
    color: rgba(255,255,255,0.1);
    transition: color 0.4s ease;
}

.research-card:hover .rc-number, .research-card.active .rc-number {
    color: var(--accent-green);
}

.rc-content {
    flex: 1;
}

.rc-content h3 {
    font-size: 1.1rem;
    margin-bottom: 6px;
    color: var(--text-white);
    line-height: 1.4;
}

.rc-content span {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.rc-arrow {
    color: rgba(255,255,255,0.2);
    font-size: 1.5rem;
    transition: transform 0.4s ease, color 0.4s ease;
}

.research-card:hover .rc-arrow, .research-card.active .rc-arrow {
    color: rgba(255,255,255,0.8);
    transform: translateX(5px);
}

/* Right Side: Overlay Reader (now a grid item!) */
.research-reader-overlay {
    position: relative; /* Restored to grid flow! */
    width: 100%;
    /* Keep glassmorphic core */
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    background: rgba(15, 15, 15, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.15), -20px 0 50px rgba(0,0,0,0.5);
    border-radius: 32px;
    padding: 40px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    
    /* GSAP controlled */
    opacity: 0;
    transform: translateX(50px);
    pointer-events: none;
}

.reader-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.reader-tag {
    background: rgba(255,255,255,0.1);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.9);
}

.reader-close {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.2s ease;
}

.reader-close:hover {
    background: rgba(255,255,255,0.25);
    transform: scale(1.1);
}

.reader-body {
    flex: 1;
    overflow-y: auto;
    padding-right: 24px; /* Increased padding to separate text from scrollbar */
    padding-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.reader-body::-webkit-scrollbar {
    width: 6px;
}
.reader-body::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
}

.reader-body h2 {
    font-size: 1.8rem;
    line-height: 1.4;
    margin-top: 5px;
    margin-bottom: 24px;
    color: #ffffff; /* Explicitly white so it doesn't vanish */
    font-weight: 700;
}

.reader-image {
    width: 100%;
    height: 220px;
    object-fit: contain; /* Changed from cover to contain so charts are not cut off */
    background: #ffffff; /* Gives a clean canvas to diagrams with transparent/white edges */
    border-radius: 16px;
    margin-bottom: 24px;
    border: 1px solid rgba(255,255,255,0.05);
    padding: 10px;
}

.reader-abstract h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.4);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.reader-abstract p {
    color: rgba(255,255,255,0.8);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 30px;
}

.reader-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--text-white);
    color: var(--bg-dark);
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 30px;
    font-weight: 700;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.reader-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255,255,255,0.2);
}

/* --- Mobile --- */
@media (max-width: 768px) {
    .edu-section { padding: 80px 20px 100px; }
    .edu-main-heading { font-size: 2.8rem; }

    .tl-wrapper { max-width: 100%; }
    .tl-entry { grid-template-columns: 56px 32px 1fr; column-gap: 12px; }
    .tl-year  { font-size: 2.4rem; }
    .tl-dot   { width: 32px; height: 32px; font-size: 13px; }
    
    .tlc-toggle { display: none !important; } /* Hide redundant "See details" accordion toggle since detail card is strictly visible */

    /* On mobile: detail card area is completely stripped to prevent visual bloat */
    .tl-cards-area { flex-direction: column; }

    .tl-cards-area .tl-glass-card,
    .tl-entry:hover .tl-cards-area .tl-glass-card { flex: 1 1 100%; }

    .tl-detail-card {
        display: none !important;
    }

    /* Mobile Bento Grid Dashboard Density */
    .bento-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        grid-auto-flow: dense;
        grid-auto-rows: minmax(160px, auto);
    }
    .bento-card {
        padding: 16px;
        border-radius: 16px;
    }
    .bento-card.featured, .bento-card.wide {
        grid-column: span 1;
        grid-row: span 1;
    }
    .bento-card.tall {
        grid-column: span 1;
        grid-row: span 1;
    }
    .bento-body h3 {
        font-size: 1.1rem !important;
        margin-bottom: 4px;
        transform: translateY(0);
        opacity: 1;
    }
    .bento-body p {
        font-size: 0.75rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin: 0;
        transform: translateY(0);
        opacity: 1;
    }
    .bento-tech {
        display: none !important; /* Conceal secondary tags to maximize micro-card density */
    }

    /* Mobile Research/Publications */
    .research-section { padding: 80px 20px; }
    .research-container { grid-template-columns: 1fr; }
    .research-card { padding: 20px; transform: translateX(0) !important; }
    .research-card:hover, .research-card.active { transform: scale(1.02) !important; }

    /* The Overlay becomes a fixed bottom-sheet on mobile */
    .research-reader-overlay {
        position: fixed;
        bottom: 0;
        top: auto;
        left: 0;
        width: 100%;
        height: 85vh;
        border-radius: 32px 32px 0 0;
        z-index: 9999;
    }
}




/* (old duplicate timeline CSS removed) */
/* --------------------------------- */
/* 2D PHYSICS GLASSMORPHIC SERVICES  */
/* --------------------------------- */
.services-section.flex-split-layout {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    /* Removed max-width and auto margins to allow full-width bleeding like other sections */
    gap: 60px;
    padding: 120px 64px;
}

.services-content-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.services-content-right {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.special-dummy-text {
    color: var(--text-gray);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 24px;
    font-weight: 400;
}

.special-dummy-text strong {
    color: var(--text-white);
    font-weight: 600;
}

.physics-container {
    position: relative;
    width: 100%;
    height: 65vh;
    min-height: 550px;
    max-height: 700px;
    border-radius: 24px;
    overflow: hidden;
    /* Soft dark base */
    background: #111814;
    box-shadow: inset 0 0 80px rgba(0,0,0,0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Creating the vibrant gradient light source to refract through the glass */
.physics-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 600px;
    height: 600px;
    /* Exactly matching the gorgeous white/yellow/orange sunburst */
    background: radial-gradient(circle at 10% 50%, rgba(255, 255, 255, 0.9) 0%, rgba(255, 198, 0, 0.8) 25%, rgba(255, 69, 0, 0.6) 50%, rgba(244, 236, 224, 0.1) 80%, transparent 100%);
    filter: blur(40px);
    border-radius: 50%;
    z-index: 0; /* Ensures it stays behind the pills */
    opacity: 0.85; /* Dial down slightly so the text remains pristine */
}

.skill-pill {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Glassmorphism Implementation */
    background: rgba(255, 255, 255, 0.08); /* slight translucent white */
    backdrop-filter: blur(20px) saturate(200%);
    -webkit-backdrop-filter: blur(20px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border-radius: 999px; /* Absolute perfect pill shape */
    color: var(--text-white);
    font-family: 'UberMove', sans-serif;
    font-size: 16.5px;
    font-weight: 500;
    cursor: grab;
    user-select: none;
    padding: 16px 32px; /* Magnificent wide padding like the image */
    line-height: 1; /* Ensures vertical alignment is exact */
    white-space: nowrap;
    will-change: transform; /* Important for 60fps rendering */
}

.skill-pill:active {
    cursor: grabbing;
}

/* Mobile responsiveness for the split layout */
@media (max-width: 900px) {
    .services-section.flex-split-layout {
        flex-direction: column;
        gap: 40px;
    }
    
    .services-content-right {
        width: 100%;
    }
    
    .physics-container {
        height: 50vh;
        min-height: 400px;
    }
    
    .skill-pill {
        padding: 12px 24px; /* slightly smaller padding on mobile */
        font-size: 14px;
    }
}

/* ============================================================
   ZERO GRAVITY CERTIFICATIONS
============================================================ */
.certifications-section {
    position: relative;
    width: 100%;
}

.zero-gravity-container {
    position: relative;
    width: 100%;
    height: 700px; 
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 40px;
    overflow: hidden;
    box-shadow: inset 0 0 100px rgba(0,0,0,0.8);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* In grid focus mode, it stops throwing elements via absolute positioning */
.zero-gravity-container.grid-mode {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 32px;
    padding: 40px;
    height: auto;
    max-height: 800px;
    overflow-y: auto;
    align-items: center;
}

.cert-item {
    position: absolute;
    width: 250px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.15);
    cursor: pointer;
    transition: box-shadow 0.3s, border-color 0.3s;
    will-change: transform;
    z-index: 5;
}

.cert-item:hover {
    box-shadow: 0 10px 40px rgba(255, 255, 255, 0.1), 0 0 0 1px rgba(255,255,255,0.4);
    z-index: 10;
}

.cert-item.in-grid {
    position: relative;
    width: 100%;
    top: auto !important;
    left: auto !important;
    transform: none !important; /* Overrides inline GSAP positioning */
}

/* Expanded Lightbox */
.cert-lightbox {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none; /* Passes clicks visually unless active */
}

.cert-lightbox:not(.hidden-trigger) {
    pointer-events: auto;
}

.lightbox-backdrop {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.cert-lightbox:not(.hidden-trigger) .lightbox-backdrop {
    opacity: 1;
}

.lightbox-content {
    position: relative;
    z-index: 10;
    max-width: 90vw;
    max-height: 90vh;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cert-lightbox:not(.hidden-trigger) .lightbox-content {
    opacity: 1;
    transform: scale(1);
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 20px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.2);
}

.cert-close {
    position: absolute;
    top: -15px;
    right: -15px;
    background: #111;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    transition: background 0.3s, transform 0.3s;
}

.cert-close:hover {
    background: #252525;
    transform: scale(1.1);
}

/* ============================================================
   PREMIUM FOOTER
============================================================ */
.premium-footer {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    padding: 80px 40px 24px 40px;
    margin-top: 80px;
    background: rgba(15, 15, 15, 0.4);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden; /* For the massive text cropping effect */
}

.pf-top-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.pf-col { display: flex; flex-direction: column; }

.pf-col-title {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.4);
    margin-bottom: 24px;
    font-weight: 500;
}

.pf-bio-text {
    font-size: 1.6rem;
    line-height: 1.3;
    color: #fff;
    max-width: 90%;
    margin-top: 0;
}

.links-col a, .social-col a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.95rem;
    margin-bottom: 12px;
    transition: color 0.3s ease;
    font-weight: 500;
}
.links-col a:hover, .social-col a:hover { color: #fff; }

.pf-social-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.pf-pill {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 8px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    width: max-content;
}

.pf-action-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 24px;
    transition: border-color 0.3s ease;
}
.pf-action-link:hover { border-color: rgba(255,255,255,0.3); }

.pf-action-text { display: flex; flex-direction: column; gap: 4px;}
.pf-action-title { font-size: 1.2rem; color: #ff5722; font-weight: 500; } /* Matches nice red link */
.pf-action-desc { font-size: 0.8rem; color: rgba(255,255,255,0.4); }

.pf-action-icon {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: #ff5722; 
    color: #fff;
    display: flex; justify-content: center; align-items: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.pf-action-icon.dark {
    background: #1a1a1a;
    border: 1px solid rgba(255,255,255,0.2);
}
.pf-action-link:nth-child(2) .pf-action-title { color: #fff; } /* Second link is white */

.pf-action-link:hover .pf-action-icon { transform: translate(4px, -4px); }

/* Massive Typo */
.pf-massive-text-wrapper {
    width: 100%;
    overflow: hidden; 
}
.pf-massive-text {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 20vw; /* Huge width filling size */
    line-height: 0.7; /* Crops the text aggressively identical to screenshot */
    color: var(--text-white);
    text-transform: lowercase;
    letter-spacing: -1vw;
    margin: 0;
    padding: 0;
}
.pf-massive-text span {
    display: inline-block;
    transform: translateY(120%); /* Prepare for GSAP slice-up */
}

/* Bottom bar */
.pf-bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
}
.pf-bottom-left a { color: inherit; text-decoration: none; }
.pf-bottom-left a:hover { color: #fff; }
.pf-bottom-right { display: flex; gap: 16px; align-items: center; }

@media (max-width: 900px) {
    .pf-top-grid { grid-template-columns: 1fr; gap: 40px; }
    .pf-social-grid { grid-template-columns: 1fr; }
    .pf-massive-text { 
        font-size: 14.5vw; /* Calibrated explicitly to fit 8 characters safely */
        justify-content: center; /* Avoid stretching the first/last characters outside the box bounds */
        letter-spacing: -0.2vw;
    }
    .premium-footer { padding: 40px 24px 24px 24px; }
    .pf-bottom-bar { flex-direction: column; gap: 16px; align-items: flex-start; }
}

/* ============================================================ */
/* Cinematic Preloader Styles Copied From GitOri */
/* ============================================================ */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('assets/hero/gifs/jayportfolio_horizantal.gif') no-repeat center center;
    background-size: cover;
    background-color: #000000;
    color: rgb(255, 255, 255);
    pointer-events: none;
    z-index: 1000000;
  }
  
  @media (max-width: 900px) {
    .loading-screen {
        background: url('assets/hero/gifs/jayportfolio_vertical.gif') no-repeat center center;
        background-size: cover;
        background-color: #000000;
    }
  }
  
  .counter {
    position: fixed;
    left: 50px;
    bottom: 50px;
    display: flex;
    height: 100px;
    font-size: 100px;
    line-height: 102px;
    clip-path: polygon(0 0, 100% 0, 100% 100px, 0 100px);
    font-weight: 400;
  }
  
  .counter-1,
  .counter-2,
  .counter-3 {
    position: relative;
    top: -15px;
  }
  .num1offset1 { position: relative; right: -25px; }
  .num1offset2 { position: relative; right: -10px; }
  
  .loader {
    position: absolute;
    top: 70%;
    z-index: 3;
    left: 50%;
    width: 300px;
    height: 50px;
    transform: translate(-50%, -50%);
    display: flex;
  }
  
  .loader-1 {
    position: relative;
    background: rgb(255, 255, 255);
    width: 200px;
  }
  .loader-2 {
    position: relative;
    background: rgb(255, 255, 255);
    width: 100px;
  }
  .bar { height: 25px; }
