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

:root {
    /* Dark Industrial Theme */
    --bg: #0c0f14;
    --bg-secondary: #12161d;
    --text: #e8ecf1;
    --text-secondary: #94a3b8;
    --text-tertiary: #5a6a80;
    --card-bg: #161b24;
    --border: #1e2530;

    /* Brand Colors - Industrial Amber/Warm */
    --accent: #f59e0b;
    --accent-dark: #d97706;
    --accent-light: rgba(245, 158, 11, 0.12);
    --accent-glow: rgba(245, 158, 11, 0.25);

    /* Typography */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing & Radius */
    --radius: 12px;
    --radius-sm: 8px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(245, 158, 11, 0.15);

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
    /* Hide default cursor for custom cursor */
}

/* ============================================
   LIQUID BACKGROUND
   ============================================ */
.liquid-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: var(--bg);
}

.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.6;
    border-radius: 50%;
    animation: floatBlob 20s infinite ease-in-out alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    animation-duration: 25s;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.15) 0%, transparent 70%);
    /* Subtle purple mix */
    animation-duration: 30s;
    animation-direction: reverse;
}

.blob-3 {
    top: 40%;
    left: 30%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.1) 0%, transparent 70%);
    animation-duration: 22s;
    animation-delay: -5s;
}

.blob-4 {
    bottom: 10%;
    left: 10%;
    width: 30vw;
    height: 30vw;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.08) 0%, transparent 70%);
    /* Subtle pink mix */
    animation-duration: 28s;
    animation-delay: -10s;
}

@keyframes floatBlob {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

/* ============================================
   CUSTOM CURSOR
   ============================================ */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
}

.cursor-outline {
    width: 32px;
    height: 32px;
    border: 1.5px solid var(--accent);
    opacity: 0.5;
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

body:hover .cursor-outline.hover {
    width: 50px;
    height: 50px;
    background-color: rgba(245, 158, 11, 0.1);
    border-color: transparent;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    line-height: 1.2;
    color: var(--text);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
}

.section {
    padding: 120px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-number {
    font-family: var(--font-heading);
    color: var(--accent);
    font-size: 1rem;
    font-weight: 700;
    display: block;
    margin-bottom: 8px;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 24px;
    position: relative;
    display: inline-block;
}

.section-line {
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin: 0 auto;
    border-radius: 2px;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 24px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: padding 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.nav.scrolled {
    background: rgba(12, 15, 20, 0.92);
    backdrop-filter: blur(16px);
    padding: 16px 48px;
    box-shadow: 0 1px 0 rgba(245, 158, 11, 0.1);
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

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

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Mobile Nav */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    background: none;
    border: none;
    z-index: 1001;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: 0.3s;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg);
    display: none;
    /* Flex when active */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-menu.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-link {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 0 48px;
}

.hero-content {
    max-width: 1000px;
    margin: 0 auto;
    z-index: 2;
    text-align: center;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.tag-line {
    width: 40px;
    height: 2px;
    background: var(--accent);
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
}

.title-line {
    display: block;
    opacity: 0;
    /* JS reveal */
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

.title-line.visible {
    opacity: 1;
    transform: translateY(0);
}

.highlight {
    color: var(--accent);
}

.highlight-underline {
    position: relative;
    display: inline-block;
}

.highlight-underline::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 12px;
    background: var(--accent-light);
    z-index: -1;
    transition: width 0.8s ease 1s;
    /* Delay */
}

.highlight-underline.animate::after {
    width: 100%;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 48px;
    line-height: 1.6;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease 0.4s;
}

.hero-description.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease 0.5s;
}

.hero-cta.visible {
    opacity: 1;
    transform: translateY(0);
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 16px 32px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background: var(--accent);
    color: #0c0f14;
    border: 1px solid var(--accent);
    font-weight: 700;
}

.btn-primary:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--text);
    transform: translateY(-2px);
}

/* Scroll Indication */
.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-tertiary);
    font-size: 0.85rem;
    font-weight: 500;
    animation: fadeUp 1s ease 1s backwards;
}

.scroll-indicator {
    width: 24px;
    height: 40px;
    border: 2px solid var(--border);
    border-radius: 12px;
    position: relative;
    display: flex;
    justify-content: center;
}

.scroll-dot {
    width: 4px;
    height: 4px;
    background: var(--text);
    border-radius: 50%;
    margin-top: 8px;
    animation: scrollDot 2s infinite;
}

/* Shapes */
.hero-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
}

.shape-1 {
    top: -10%;
    right: -5%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow), transparent);
    animation: float 20s infinite ease-in-out;
}

.shape-2 {
    bottom: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(217, 119, 6, 0.08), transparent);
    animation: float 25s infinite ease-in-out reverse;
}

.shape-3 {
    top: 40%;
    right: 20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.05), transparent);
    opacity: 0.3;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
/* .about {
    background: var(--bg-secondary);
} */
/* Removed for liquid background visibility */
.about {
    background: transparent;
    position: relative;
    z-index: 1;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%;
    /* 1:1 Aspect */
}

.profile-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 90%;
    height: 90%;
    object-fit: cover;
    border-radius: var(--radius);
    z-index: 2;
    border: 1px solid var(--border);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-photo:hover {
    transform: scale(1.03);
}

.image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 90%;
    height: 90%;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-weight: 600;
    overflow: hidden;
    z-index: 2;
    border: 1px solid var(--border);
}

.image-border {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 90%;
    height: 90%;
    border: 2px solid var(--accent);
    border-radius: var(--radius);
    z-index: 1;
}

.about-intro {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 24px;
    line-height: 1.4;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.about-stats {
    display: flex;
    gap: 48px;
    margin-top: 40px;
    border-top: 1px solid var(--border);
    padding-top: 40px;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}

.stat-plus {
    font-size: 1.5rem;
    color: var(--accent);
    font-weight: 700;
}

.stat-label {
    display: block;
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ============================================
   SKILLS SECTION
   ============================================ */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.skill-card {
    background: rgba(22, 27, 36, 0.6);
    /* Semi-transparent */
    backdrop-filter: blur(8px);
    padding: 32px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.skill-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-glow);
    border-color: rgba(245, 158, 11, 0.3);
}

.skill-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--accent-light);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.skill-icon svg {
    width: 24px;
    height: 24px;
}

.skill-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.skill-card p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.skill-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 3px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    width: 0;
    transition: width 1.5s ease-out;
}

/* ============================================
   PROJECTS SECTION
   ============================================ */
.projects {
    background: transparent;
    position: relative;
    z-index: 1;
}

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

.project-card {
    background: rgba(22, 27, 36, 0.6);
    /* Semi-transparent */
    backdrop-filter: blur(8px);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.project-image {
    position: relative;
    height: 240px;
    background: var(--bg-secondary);
    overflow: hidden;
}

.project-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-weight: 600;
    transition: transform 0.5s ease;
}

.project-card:hover .project-placeholder {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-link {
    color: #fff;
    font-weight: 600;
    padding: 12px 24px;
    border: 1px solid #fff;
    border-radius: 50px;
    transition: background 0.3s ease, color 0.3s ease;
}

.project-link:hover {
    background: #fff;
    color: #000;
}

.project-info {
    padding: 24px;
}

/* ============================================
   DOCUMENTS SECTIONS (Resume, Logs, Evals)
   ============================================ */
.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.doc-card {
    background: var(--card-bg);
    padding: 32px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: var(--transition);
}

.doc-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-light);
}

.doc-icon {
    width: 48px;
    height: 48px;
    color: var(--accent);
    margin-bottom: 16px;
}

.doc-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.doc-meta {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin-bottom: 20px;
}

/* ============================================
   TAGS & UTILITIES
   ============================================ */
.tag-pending {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    border: 1px solid rgba(245, 158, 11, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tag-new {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.project-tags span {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-light);
    padding: 4px 10px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-info h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.project-info p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   TESTIMONIALS SECTION
   ============================================ */
.testimonials {
    background: var(--bg-secondary);
}

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

.testimonial-card {
    background: var(--card-bg);
    padding: 36px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-light);
}

.testimonial-quote {
    font-family: var(--font-heading);
    font-size: 4rem;
    line-height: 1;
    color: var(--accent);
    opacity: 0.15;
    position: absolute;
    top: 20px;
    left: 28px;
}

.testimonial-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 14px;
}

.author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent-light);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
}

.testimonial-author strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
}

.testimonial-author span {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-content {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
}

.contact-intro {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 48px;
}

.contact-form {
    text-align: left;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text);
    background: var(--card-bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    transition: var(--transition);
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-light);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-tertiary);
}

.btn-submit {
    width: 100%;
    justify-content: center;
    padding: 16px 32px;
    font-size: 1rem;
    margin-top: 8px;
}

.btn-submit svg {
    transition: transform 0.3s ease;
}

.btn-submit:hover svg {
    transform: translateX(4px);
}

/* Social Links */
.contact-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 48px;
}

.social-link {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-secondary);
    border: 1.5px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-link:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.2);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    padding: 32px 0;
    text-align: center;
    border-top: 1px solid var(--border);
}

.footer p {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scrollDot {

    0%,
    100% {
        transform: translateY(0);
        opacity: 1;
    }

    50% {
        transform: translateY(12px);
        opacity: 0.3;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    33% {
        transform: translate(30px, -30px);
    }

    66% {
        transform: translate(-20px, 20px);
    }
}

/* Scroll reveal classes */
.fade-in,
.fade-in-up,
.fade-in-left,
.fade-in-right {
    opacity: 0;
    transition: all 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-up {
    transform: translateY(60px);
    transition-delay: calc(var(--delay, 0) * 0.1s);
}

.fade-in-left {
    transform: translateX(-60px);
}

.fade-in-right {
    transform: translateX(60px);
}

.fade-in.visible,
.fade-in-up.visible,
.fade-in-left.visible,
.fade-in-right.visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* ============================================
   MAGNETIC BUTTON EFFECT (applied via JS)
   ============================================ */
.btn.magnetic {
    transition: transform 0.2s ease;
}

/* ============================================
   LINE-BY-LINE TEXT REVEAL
   ============================================ */
.text-reveal {
    overflow: hidden;
}

.text-reveal span {
    display: inline-block;
    transform: translateY(100%);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.text-reveal.visible span {
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {

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

@media (max-width: 768px) {
    .nav {
        padding: 16px 24px;
    }

    .nav.scrolled {
        padding: 12px 24px;
    }

    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .mobile-menu {
        display: flex;
    }

    .hero {
        padding: 100px 24px 80px;
    }

    .container {
        padding: 0 24px;
    }

    .section {
        padding: 80px 0;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-image {
        max-width: 300px;
        margin: 0 auto;
    }

    .about-stats {
        justify-content: center;
    }

    .skills-grid,
    .projects-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
        max-width: 480px;
        margin: 0 auto;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .section-header {
        margin-bottom: 48px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .about-stats {
        flex-direction: column;
        gap: 20px;
    }
}

/* ============================================
   PAGE LOAD ANIMATION
   ============================================ */
.page-loader {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.loader-bar {
    width: 120px;
    height: 2px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.loader-bar::after {
    content: '';
    position: absolute;
    left: -40%;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    animation: loaderSlide 1s infinite ease-in-out;
}

@keyframes loaderSlide {
    0% {
        left: -40%;
    }

    100% {
        left: 100%;
    }
}

.loader-text {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

.loader-dot {
    color: var(--accent);
    display: inline-block;
    animation: loaderPulse 0.8s infinite alternate ease-in-out;
}

@keyframes loaderPulse {
    0% {
        opacity: 0.3;
        transform: scale(1);
    }

    100% {
        opacity: 1;
        transform: scale(1.3);
    }
}

/* ============================================
   SCROLL PROGRESS BAR
   ============================================ */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-dark), var(--accent), #fbbf24);
    z-index: 10000;
    transition: width 0.05s linear;
    box-shadow: 0 0 10px var(--accent-glow);
}

/* ============================================
   AMBIENT PARTICLES
   ============================================ */
#ambientParticles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.4;
}

/* ============================================
   CARD SHINE EFFECT
   ============================================ */
.toc-card::after,
.skill-card::after,
.doc-card::after,
.journal-entry::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(245, 158, 11, 0.04),
            transparent);
    transition: left 0.6s ease;
    pointer-events: none;
}

.toc-card:hover::after,
.skill-card:hover::after,
.doc-card:hover::after,
.journal-entry:hover::after {
    left: 100%;
}

.skill-card,
.doc-card,
.journal-entry {
    position: relative;
    overflow: hidden;
}

/* ============================================
   JOURNAL ENTRY STAGGERED ANIMATIONS
   ============================================ */
/* Old Journal Entry styles removed to avoid conflict with new horizontal scroller */

/* Glow line on left of journal entry */
.journal-entry::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, var(--accent), transparent);
    transition: height 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
    border-radius: 2px;
}

.journal-entry.visible::before {
    height: 100%;
}

/* ============================================
   SECTION DIVIDER ANIMATION
   ============================================ */
.section-line {
    width: 0;
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
}

.section-line.visible {
    width: 60px;
}

/* ============================================
   HERO TEXT GLITCH ON HOVER
   ============================================ */
.highlight {
    color: var(--accent);
    position: relative;
    display: inline-block;
    transition: text-shadow 0.3s ease;
}

.highlight:hover {
    text-shadow:
        2px 0 var(--accent-dark),
        -2px 0 #fbbf24,
        0 0 20px var(--accent-glow);
}

/* ============================================
   JOURNAL GALLERY
   ============================================ */
.journal-gallery {
    display: flex;
    flex-direction: row;
    gap: 15px;
    margin-top: 0;
    height: 100%;
    flex: 0 0 auto;
    /* Force horizontal expansion based on images */
}

.journal-img {
    height: 100%;
    width: auto;
    max-width: 450px;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
    background-color: var(--bg-secondary);
    display: block;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.journal-img:hover {
    transform: scale(1.04);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.15);
}

/* ============================================
   JOURNAL HORIZONTAL SCROLLER
   ============================================ */
.journal-horizontal-wrapper {
    height: 1200vh;
    /* More depth for smoother horizontal mapping */
    position: relative;
    margin: 80px 0;
}

.journal-sticky-container {
    position: sticky;
    top: 80px;
    height: calc(100vh - 80px);
    width: 100%;
    margin: 0;
    padding: 0 0 100px 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: transparent;
    z-index: 5;
}

.journal-footer-ui {
    width: 100%;
    margin-top: auto;
}

.journal-horizontal-header {
    padding: 0 5%;
    margin-bottom: 20px;
    z-index: 10;
}

.journal-horizontal-title {
    font-size: 2.5rem;
    color: var(--text);
    margin-bottom: 12px;
    font-family: var(--font-heading);
}

.journal-timeline-wrapper {
    position: relative;
    width: 90%;
    height: 60px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.journal-timeline-labels {
    position: absolute;
    top: -30px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.month-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    position: absolute;
    transform: translateX(-50%);
    white-space: nowrap;
    transition: color 0.3s ease;
}

.month-label.active {
    color: var(--accent);
}

.journal-timeline-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--border);
    opacity: 0.2;
}

.journal-timeline-progress {
    position: absolute;
    width: 0%;
    height: 2px;
    background: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
    transition: width 0.1s ease-out;
}

.journal-timeline-progress::after {
    content: '';
    position: absolute;
    right: -4px;
    top: -4px;
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent);
}

.journal-horizontal-track {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 100px;
    /* Increased gap for wheel effect space */
    padding: 0 40vw;
    /* Wider padding to keep things centered */
    will-change: transform;
    transition: transform 0.1s ease-out;
    align-items: center;
    min-width: max-content;
    height: 75vh;
    overflow: visible;
    perspective: 1500px;
    /* Supporting 3D transforms */
}

/* Journal Entry adjustments for horizontal layout */
.journal-entry {
    flex: 0 0 auto;
    /* Allow horizontal growth */
    min-width: 1100px;
    max-width: 3500px;
    height: 520px;
    /* Uniform height */
    background: rgba(13, 17, 23, 0.95) !important;
    backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(245, 158, 11, 0.2);
    margin-bottom: 0;
    transition: transform 0.1s ease-out, opacity 0.1s ease-out;
    transform-style: preserve-3d;
    display: flex;
    flex-direction: row;
    /* SIDE-BY-SIDE */
    gap: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    overflow: visible;
    /* Prevent 3D clipping on zoom */
}

.journal-info {
    flex: 0 0 650px;
    /* Expanded width for text area to spread content */
    display: flex;
    flex-direction: column;
    height: 100%;
}

.journal-content {
    flex: 1;
    overflow-y: visible;
    margin-bottom: 0;
}

/* Scrollbar styles removed as content is fully visible */

.journal-entry:hover {
    border-color: var(--accent);
    box-shadow: 0 0 30px var(--accent-glow);
}

.journal-scroll-indicator {
    position: absolute;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-tertiary);
    font-size: 0.8rem;
    opacity: 0.6;
    animation: bounceDown 2s infinite;
}

@keyframes bounceDown {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(5px);
    }

    60% {
        transform: translateX(-50%) translateY(3px);
    }
}

.journal-header {
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}

.journal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.journal-date {
    font-size: 0.875rem;
    color: var(--accent);
    font-weight: 500;
}

.journal-content p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

/* ============================================
   TABLE OF CONTENTS
   ============================================ */
.toc-section {
    background: var(--bg-secondary);
}

.toc-subtitle {
    text-align: center;
    color: var(--text-tertiary);
    font-size: 1.05rem;
    margin-bottom: 48px;
    margin-top: -8px;
    letter-spacing: 0.02em;
}

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

.toc-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 28px 24px;
    background: rgba(22, 27, 36, 0.6);
    /* Semi-transparent card-bg */
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.toc-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-dark));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.toc-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3);
}

.toc-card:hover::before {
    transform: scaleX(1);
}

.toc-card-number {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.1em;
    margin-bottom: 16px;
    opacity: 0.7;
}

.toc-card-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--accent-light);
    margin-bottom: 16px;
    transition: var(--transition);
}

.toc-card-icon svg {
    width: 22px;
    height: 22px;
    stroke: var(--accent);
    transition: var(--transition);
}

.toc-card:hover .toc-card-icon {
    background: var(--accent);
    transform: scale(1.08);
}

.toc-card:hover .toc-card-icon svg {
    stroke: #fff;
}

.toc-card-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
    transition: var(--transition);
}

.toc-card:hover .toc-card-title {
    color: var(--accent);
}

.toc-card-desc {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    line-height: 1.5;
    margin-bottom: 16px;
    flex-grow: 1;
}

.toc-card-arrow {
    font-size: 1.2rem;
    color: var(--accent);
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    align-self: flex-end;
}

.toc-card:hover .toc-card-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Highlighted card for Journals */
.toc-card-highlight {
    border-color: var(--accent-light);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.03), rgba(30, 64, 175, 0.06));
}

.toc-card-highlight::before {
    transform: scaleX(1);
}

/* Responsive */
@media (max-width: 1024px) {
    .toc-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .toc-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .toc-card {
        padding: 22px 18px;
    }

    .toc-subtitle {
        margin-bottom: 32px;
    }
}





/* ============================================
   NEW PROJECT GRID & CARDS (Evidence)
   ============================================ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
    margin-top: 24px;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-light);
}

.project-image {
    position: relative;
    height: 200px;
    background: #2a2f3a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.project-placeholder {
    color: var(--text-tertiary);
    font-size: 1.2rem;
    font-weight: 600;
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(12, 15, 20, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-link {
    display: inline-block;
    padding: 10px 20px;
    background: var(--accent);
    color: #fff;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .project-link {
    transform: translateY(0);
}

.project-info {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.project-tags span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-light);
    padding: 4px 10px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-info h3 {
    font-size: 1.25rem;
    color: var(--text);
    margin-bottom: 8px;
    font-family: var(--font-heading);
}

.project-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   JOURNAL CONTAINER
   ============================================ */
.journal-gallery-container {
    display: grid;
    gap: 24px;
}

/* ============================================
   PAGE LOADER & PROGRESS & PARTICLES
   ============================================ */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.loader-text {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    margin-top: 20px;
    letter-spacing: -0.02em;
}

.loader-dot {
    color: var(--accent);
}

.loader-bar {
    width: 48px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
    animation: loaderPulse 1.5s ease-in-out infinite;
}

@keyframes loaderPulse {
    0% {
        transform: scaleX(0.2);
        opacity: 0.5;
    }

    50% {
        transform: scaleX(1);
        opacity: 1;
    }

    100% {
        transform: scaleX(0.2);
        opacity: 0.5;
    }
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--accent);
    z-index: 10000;
    width: 0%;
    transition: width 0.1s linear;
}

#ambientParticles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Document Viewer Modal */
.doc-viewer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(12, 15, 20, 0.95);
    backdrop-filter: blur(15px);
    z-index: 20000;
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.doc-viewer-modal.active {
    display: flex;
    opacity: 1;
}

.doc-viewer-content {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: 90vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.doc-viewer-modal.active .doc-viewer-content {
    transform: translateY(0);
}

.doc-viewer-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: var(--accent);
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.doc-viewer-close:hover {
    transform: scale(1.1);
    background: var(--accent-light);
}

.doc-viewer-frame-container {
    width: 100%;
    height: 100%;
}

.doc-viewer-frame-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Update doc-card handle mouse */
.doc-card[data-doc-url] {
    cursor: pointer;
}

/* Inline Document Container */
/* Inline Document Grid & Focus Mode */
.doc-inline-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3x2 Grid for 6 documents */
    gap: 20px;
    margin-bottom: 32px;
    align-items: start;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reader Focus Mode Layout (2/3 - 1/3 split) */
.doc-inline-grid.focus-mode {
    grid-template-columns: 2fr 1fr;
    /* 2/3 Main | 1/3 Sidebar */
}

.doc-inline-container {
    width: 100%;
    background: rgba(22, 27, 36, 0.4);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

/* Sidebar behavior in Focus Mode */
.focus-mode .doc-inline-container:not(.expanded) {
    grid-column: 2;
    transform: scale(0.95);
    opacity: 0.8;
}

.focus-mode .doc-inline-container:not(.expanded):hover {
    opacity: 1;
    transform: scale(1);
    cursor: pointer;
}

.doc-inline-container.expanded {
    grid-column: 1 / -1;
    /* Full row in grid mode */
}

.focus-mode .doc-inline-container.expanded {
    grid-column: 1;
    /* Keep to main area in focus mode */
    grid-row: 1 / span 10;
    /* Grow tall if sidebar is busy */
}

.doc-inline-container:hover {
    border-color: rgba(245, 158, 11, 0.3);
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.05);
}

.doc-inline-header {
    background: rgba(30, 41, 59, 0.7);
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    min-height: 52px;
    /* Ensure consistent header height */
}

.doc-inline-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    margin: 0;
    white-space: normal;
    /* Allow wrapping or better visibility */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* Still limit to 2 lines to prevent layout break */
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
    line-height: 1.2;
    transition: font-size 0.3s ease;
}

.doc-inline-container.expanded .doc-inline-title {
    font-size: 1.1rem;
}

/* Extra compact titles for sidebar items */
.focus-mode .doc-inline-container:not(.expanded) .doc-inline-title {
    font-size: 0.75rem;
}

.doc-expand-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.doc-expand-btn:hover {
    background: var(--accent-light);
    transform: scale(1.05);
}

.doc-inline-frame {
    position: relative;
    width: 100%;
    height: 200px;
    /* Mini thumbnail height */
    background: #fff;
    transition: height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

/* Sidebar frames are even shorter for better vertical stacking */
.focus-mode .doc-inline-container:not(.expanded) .doc-inline-frame {
    height: 120px;
}

.doc-inline-container.expanded .doc-inline-frame {
    height: 1000px;
    /* FULL READING HEIGHT */
}

.doc-inline-frame iframe {
    width: 100%;
    height: 100%;
    border: none;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* THUMBNAIL SCALING LOGIC */
.doc-inline-container:not(.expanded) .doc-inline-frame iframe {
    width: 400%;
    /* Scale up content area */
    height: 400%;
    transform: scale(0.25);
    /* Then scale down the element */
    transform-origin: top left;
    pointer-events: none;
    /* Block interaction in thumbnail mode */
    user-select: none;
}

/* Bottom fade overlay for preview mode */
.doc-inline-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(to top, rgba(12, 15, 20, 0.95), transparent);
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.doc-inline-container.expanded .doc-inline-overlay {
    opacity: 0;
    pointer-events: none;
}

.doc-inline-frame iframe {
    width: 100%;
    height: 100%;
    border: none;
}