/* Modern Dark Theme with Sleek Design */

:root {
    --bg-primary: #0d0d0d;
    --bg-secondary: #1a1a1a;
    --bg-card: #1f1f1f;
    --text-primary: #f5f5f5;
    --text-secondary: #b0b0b0;
    --accent-primary: #8b5cf6;
    --accent-secondary: #06b6d4;
    --accent-gradient: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
    --border-color: #2a2a2a;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.6);
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Outfit', 'Inter', sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2rem, 1.5rem + 3vw, 3.5rem);
}

h2 {
    font-size: clamp(1.75rem, 1.25rem + 2vw, 2.5rem);
}

h3 {
    font-size: clamp(1.25rem, 1rem + 1.5vw, 1.75rem);
}

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

a:hover {
    color: var(--accent-secondary);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header & Navigation */
header {
    background: rgba(13, 13, 13, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: transform 0.3s ease;
}

/* Auto-hide main nav on scroll down */
header.nav-hidden {
    transform: translateY(-100%);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: var(--transition-smooth);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 0;
}

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

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

.nav-links a:hover::after {
    width: 100%;
}

/* Mobile Navigation Toggle - Hidden on Desktop */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 1001;
    order: 2;
}

.hamburger-line {
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

/* Hamburger to X animation */
.nav-toggle.open .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.open .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-toggle.open .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Expandable Navigation Dropdown */
.nav-expandable {
    position: relative;
}

.nav-expand-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 0.5rem 0;
    font-family: inherit;
    transition: var(--transition-smooth);
}

.nav-expand-btn:hover {
    color: var(--text-primary);
}

.nav-chevron {
    transition: transform 0.3s ease;
}

.nav-expandable.expanded .nav-chevron {
    transform: rotate(180deg);
}

.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 300px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.5rem 0;
    list-style: none;
    z-index: 100;
}

.nav-expandable.expanded .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown li {
    padding: 0;
}

.nav-dropdown a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.nav-dropdown a:hover {
    color: var(--text-primary);
    background: rgba(139, 92, 246, 0.1);
}

.nav-dropdown a::after {
    display: none;
    /* Disable underline effect in dropdown */
}

/* Post listing in nav dropdown with dates */
.nav-dropdown a {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 0.25rem;
}

.nav-post-title {
    flex: 1;
    min-width: 0;
    white-space: normal;
    line-height: 1.3;
}

.nav-post-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.7;
    white-space: nowrap;
    display: block;
    margin-top: 0.1rem;
}

/* Fix for last nav item going off-screen (right align) */
.nav-links>li:last-child .nav-dropdown {
    left: auto;
    right: 0;
    transform: translateY(-10px);
}

.nav-links>li:last-child.nav-expandable.expanded .nav-dropdown {
    transform: translateY(0);
}

/* Hero Section */
.hero {
    padding: 8rem 0 6rem;
    text-align: center;
    position: relative;
    overflow-x: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    max-width: 100vw;
    height: 400px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.hero h1 {
    font-size: clamp(2rem, 1rem + 4vw, 4rem);
    margin-bottom: 1.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 0.8s ease;
    position: relative;
}

.hero p {
    font-size: clamp(1rem, 0.85rem + 0.75vw, 1.25rem);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    color: var(--text-secondary);
    animation: fadeInUp 0.8s ease 0.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Button */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--accent-gradient);
    color: #fff !important;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-sm);
    animation: fadeInUp 0.8s ease 0.4s both;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Content Sections */
main {
    min-height: 60vh;
    padding: 4rem 0;
}

.page-header,
.post-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.page-header h1 {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Compact Sticky Post Header - flows under nav naturally */
.post-header-sticky {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    /* Below main nav */
    left: 0;
    right: 0;
    z-index: 99;
    background: rgba(13, 13, 13, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 2rem;
    transition: top 0.3s ease;
}

/* When main nav is hidden, move post header to very top */
header.nav-hidden~main .post-header-sticky {
    top: 0 !important;
}

.post-header-content {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    max-width: 800px;
    margin: 0 auto;
}

.post-author-avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid transparent;
    background:
        linear-gradient(var(--bg-primary), var(--bg-primary)) padding-box,
        var(--accent-gradient) border-box;
    flex-shrink: 0;
}

.post-header-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
    flex: 1;
}

.post-title-inline {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
}

.post-meta-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.post-author-inline {
    font-weight: 500;
}

.post-meta-sep {
    opacity: 0.5;
}

.post-date-inline {
    color: var(--text-secondary);
}

/* Share Button Styles */
.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
    padding: 0.5rem;
    flex-shrink: 0;
}

.share-btn:hover {
    color: var(--text-primary);
    background: rgba(139, 92, 246, 0.15);
}

.share-btn:active {
    transform: scale(0.95);
}

.share-btn svg {
    flex-shrink: 0;
}

/* Header Share Button - compact */
.share-btn-header {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

/* Mobile: add right margin to share button */
@media (max-width: 768px) {
    .share-container {
        margin-right: 1rem;
    }
}

/* Footer Share Button - with text */
.share-btn-footer {
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
}

/* Post Footer Styles */
.post-footer {
    max-width: 800px;
    margin: 3rem auto 0;
    padding: 2rem;
    border-top: 1px solid var(--border-color);
}

.post-footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-label {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Mobile: tighter footer layout */
@media (max-width: 768px) {
    .post-footer {
        padding: 1.25rem 1rem;
        margin-top: 2rem;
    }

    .post-footer-content {
        gap: 0.75rem;
    }

    .share-label {
        font-size: 0.9rem;
    }
}

/* Share Toast Notification */
.share-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--bg-card);
    border: 1px solid var(--accent-primary);
    border-radius: 12px;
    padding: 0.875rem 1.5rem;
    box-shadow: var(--shadow-lg), 0 0 20px rgba(139, 92, 246, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1100;
}

.share-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

.share-toast svg {
    color: #22c55e;
}

.share-toast span {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Share Container for dropdown positioning */
.share-container {
    position: relative;
}

/* Share Dropdown Menu */
.share-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    min-width: 140px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    padding: 0.4rem;
}

/* Dropdown opens upward for footer */
.share-dropdown-up {
    top: auto;
    bottom: 100%;
    margin-top: 0;
    margin-bottom: 0.5rem;
    transform: translateY(8px);
}

.share-container.open .share-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.share-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.6rem 0.8rem;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.share-dropdown-item:hover {
    background: rgba(139, 92, 246, 0.15);
    color: var(--text-primary);
}

.share-dropdown-item svg {
    flex-shrink: 0;
}

/* Auto-hide header state */
.post-header-sticky.header-hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.portfolio-item {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition-smooth);
    border: 1px solid var(--border-color);
    position: relative;
}

.portfolio-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: var(--transition-smooth);
}

.portfolio-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

.portfolio-item:hover::before {
    opacity: 1;
}

.portfolio-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 3rem;
}

.portfolio-content {
    padding: 1.5rem;
}

.portfolio-content h3 {
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
}

.portfolio-content p {
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}

/* Portfolio Screenshots */
.portfolio-screenshots {
    margin: 1rem 0;
    position: relative;
    height: 280px;
}

.portfolio-screenshots .screenshot-carousel {
    height: 100%;
}

.portfolio-screenshots .screenshot {
    max-height: 260px;
    border-radius: 12px;
}

/* Technology Tags */
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.tech-tag {
    position: relative;
    display: inline-block;
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #67e8f9;
    transition: var(--transition-smooth);
}

/* Subtle animated gradient border */
.tech-tag::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    padding: 1.5px;
    background: linear-gradient(135deg,
            rgba(139, 92, 246, 0.7),
            rgba(6, 182, 212, 0.7));
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: tech-border-pulse 4s ease-in-out infinite;
}

@keyframes tech-border-pulse {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

.tech-tag:hover {
    color: #a5f3fc;
    transform: translateY(-2px);
}

.tech-tag:hover::before {
    opacity: 1;
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.4);
}

/* Portfolio Section Header */
.portfolio-section-header {
    padding: 1rem 0 0.5rem;
    margin-bottom: 0.5rem;
}

.portfolio-section-header h2 {
    font-size: clamp(2.5rem, 2rem + 3vw, 4rem);
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0;
}

/* Award Badges */
.portfolio-awards {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.award-badge {
    display: inline-block;
    padding: 0.4rem 0.85rem;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 165, 0, 0.15) 100%);
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #ffd700;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
    }

    50% {
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    }
}

/* Featured Portfolio Items */
.portfolio-item.featured {
    border: 2px solid var(--accent-primary);
    position: relative;
}

.portfolio-item.featured::before {
    opacity: 1;
}

/* Featured Post Section */
.featured-post-section {
    padding: 2rem 2rem 1rem 4rem;
}

.featured-post-container {
    max-width: 800px;
}

.featured-post-card {
    display: block;
    text-decoration: none;
}

.featured-post-meta {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.featured-badge {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    background: transparent;
    border: 1px solid #7dd3fc;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #7dd3fc;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.featured-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.featured-post-title {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.featured-post-excerpt {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.read-more-link {
    display: inline-block;
    color: #7dd3fc;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.featured-post-card:hover .read-more-link {
    color: var(--accent-secondary);
}

@media (max-width: 768px) {
    .featured-post-section {
        padding: 1.5rem 1rem;
    }

    .featured-post-container {
        max-width: 100%;
    }

    .featured-post-card {
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        border-radius: 16px;
        padding: 1.25rem;
        display: block;
    }

    .featured-post-meta {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .featured-badge {
        font-size: 0.65rem;
        padding: 0.25rem 0.6rem;
    }

    .featured-date {
        font-size: 0.8rem;
    }

    .featured-post-title {
        font-size: 1.35rem;
        line-height: 1.4;
        margin-bottom: 0.75rem;
    }

    .featured-post-excerpt {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 1rem;
    }

    .read-more-link {
        font-size: 0.9rem;
        padding: 0.5rem 0;
        display: inline-block;
    }
}


/* Blog List */
.post-list {
    list-style: none;
    margin: 3rem 0;
}

.post-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: var(--transition-smooth);
}

.post-item:hover {
    border-color: var(--accent-primary);
    transform: translateX(8px);
    box-shadow: var(--shadow-sm);
}

.post-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
}

.post-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.post-title a {
    color: var(--text-primary);
}

.post-title a:hover {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.post-excerpt {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Mobile Image */
.mobile-project-image {
    display: none;
    width: 100%;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.mobile-project-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Post Content */
.post-content,
.page-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Offset for sticky post header */
.post .post-content {
    padding-top: 20px;
}

/* Blog Post Images */
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin: 1.5rem 0;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-content img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

/* Image alignments */
.post-content .img-right {
    float: right;
    margin: 0.5rem 0 1.5rem 2rem;
    max-width: 45%;
    clear: right;
}

.post-content .img-left {
    float: left;
    margin: 0.5rem 2rem 1.5rem 0;
    max-width: 45%;
    clear: left;
}

.post-content .img-center {
    display: block;
    margin: 2rem auto;
    max-width: 85%;
}

.post-content .img-small {
    max-width: 280px;
}

.post-content .img-medium {
    max-width: 400px;
}

/* Caption styling */
.post-content .img-caption {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
    font-style: italic;
    display: block;
}

/* Figure wrapper for image + caption */
.post-content figure {
    margin: 1.5rem 0;
    padding: 0;
}

.post-content figure img {
    margin-bottom: 0;
}

.post-content figure figcaption {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 0.75rem;
    font-style: italic;
}

/* Aligned figures */
.post-content figure.fig-right {
    float: right;
    margin: 0.5rem 0 1.5rem 2rem;
    max-width: 45%;
    clear: right;
}

.post-content figure.fig-left {
    float: left;
    margin: 0.5rem 2rem 1.5rem 0;
    max-width: 45%;
    clear: left;
}

.post-content figure.fig-center {
    display: block;
    margin: 2rem auto;
    max-width: 85%;
    text-align: center;
}

.post-content figure.fig-small {
    max-width: 280px;
}

.post-content figure.fig-medium {
    max-width: 400px;
}

.post-content figure.fig-right img,
.post-content figure.fig-left img,
.post-content figure.fig-center img {
    max-width: 100%;
    float: none;
    margin: 0;
}

/* Clear floats */
.post-content .clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* Allow lists to flow alongside floated images */
.post-content ul,
.post-content ol {
    overflow: hidden;
    list-style: disc;
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.post-content ol {
    list-style: decimal;
}

.post-content li {
    margin-bottom: 0.5rem;
}

/* Blockquotes in post content */
.post-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--accent-primary);
    background: rgba(139, 92, 246, 0.06);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text-secondary);
}

.post-content blockquote p {
    margin: 0;
}

.post-content blockquote strong {
    color: var(--text-primary);
    font-style: normal;
}

/* Tables in post content */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.post-content thead {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(6, 182, 212, 0.15) 100%);
    border-bottom: 2px solid var(--accent-primary);
}

.post-content th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-primary);
}

.post-content td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    vertical-align: top;
}

.post-content tbody tr:last-child td {
    border-bottom: none;
}

.post-content tbody tr:hover {
    background: rgba(139, 92, 246, 0.05);
}

.post-content tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

.post-content tbody tr:nth-child(even):hover {
    background: rgba(139, 92, 246, 0.08);
}

/* Make table cells with multiple images display inline */
.post-content td:last-child {
    white-space: nowrap;
}

.post-content td img,
.post-content td video {
    display: inline-block;
    vertical-align: middle;
    margin: 4px;
}

/* Responsive table wrapper for mobile */
.post-content .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.5rem 0;
}

/* Mobile table styles */
@media (max-width: 768px) {
    .post-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        font-size: 0.85rem;
    }
    
    .post-content th,
    .post-content td {
        padding: 0.6rem 0.8rem;
        white-space: normal;
        min-width: 100px;
    }
    
    .post-content td:last-child {
        white-space: nowrap;
    }
    
    .post-content td img,
    .post-content td video {
        height: 60px !important;
        max-width: 80px;
        margin: 2px;
    }
}

@media (max-width: 480px) {
    .post-content table {
        font-size: 0.8rem;
    }
    
    .post-content th,
    .post-content td {
        padding: 0.5rem 0.6rem;
    }
    
    .post-content td img,
    .post-content td video {
        height: 50px !important;
        max-width: 60px;
    }
}

/* Image Lightbox Modal */
.image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: zoom-out;
    backdrop-filter: blur(10px);
}

.image-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.image-lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.image-lightbox.active img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2.5rem;
    color: white;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease, transform 0.2s ease;
    line-height: 1;
}

.lightbox-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Lightbox video support */
.image-lightbox video {
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    cursor: default;
}

.image-lightbox.active video {
    transform: scale(1);
}

/* Video container with sound toggle */
.video-container {
    position: relative;
    display: inline-block;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin: 1rem 0;
}

.video-container video {
    display: block;
    max-width: 100%;
    border-radius: 12px;
    cursor: pointer;
}

.video-container .sound-toggle {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: rgba(255, 255, 255, 0.7);
    z-index: 10;
}

.video-container .sound-toggle:hover {
    background: rgba(139, 92, 246, 0.8);
    color: white;
    transform: scale(1.1);
}

.video-container .sound-toggle.unmuted {
    background: rgba(139, 92, 246, 0.9);
    color: white;
    border-color: rgba(139, 92, 246, 0.5);
}

/* Video grid for multiple videos */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.video-grid .video-container {
    margin: 0;
}

.video-grid .video-container video {
    width: 100%;
    height: auto;
}

/* Responsive adjustments for blog post images */
@media (max-width: 768px) {

    .post-content {
        font-size: 1rem;
        line-height: 1.7;
    }

    .post-content img {
        border-radius: 8px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    }

    .post-content .img-right,
    .post-content .img-left,
    .post-content .img-center {
        float: none;
        display: block;
        max-width: 100%;
        margin: 1.25rem auto;
    }

    .post-content .img-small,
    .post-content .img-medium {
        max-width: 100%;
    }

    .post-content figure {
        margin: 1.25rem 0;
    }

    /* Mobile figure wrapping - similar to portfolio mobile treatment */
    .post-content figure.fig-right,
    .post-content figure.fig-left {
        float: right;
        max-width: 40%;
        margin: 0 0 1rem 1rem;
        text-align: center;
        /* Use shape-outside for text to flow above the image */
        shape-outside: inset(3rem 0 0 0);
        padding-top: 3rem;
    }

    .post-content figure.fig-center {
        float: none;
        display: block;
        max-width: 100%;
        margin: 1.25rem auto;
        text-align: center;
    }

    .post-content figure.fig-small,
    .post-content figure.fig-medium {
        max-width: 45%;
    }

    .post-content figure img {
        max-width: 100%;
        border-radius: 8px;
    }

    .post-content figure figcaption {
        font-size: 0.8rem;
        margin-top: 0.5rem;
        padding: 0 0.5rem;
    }

    /* Compact sticky post header adjustments - use fixed on mobile for Safari compatibility */
    .post-header-sticky {
        position: fixed;
        top: 85px;
        /* Fallback before JS calculates exact header height */
        left: 0;
        right: 0;
        width: 100%;
        padding: 0.6rem 1rem;
    }

    /* When main nav is hidden on mobile, move header to top */
    header.nav-hidden~main .post-header-sticky,
    .layout-post.nav-hidden .post-header-sticky {
        top: 0 !important;
    }

    /* Add padding to post content to account for fixed header */
    .post .post-header-sticky+.post-content {
        padding-top: 70px;
    }

    .post .post-content {
        padding-top: 20px;
    }

    .post-header-content {
        gap: 0.75rem;
    }

    .post-author-avatar-sm {
        width: 32px;
        height: 32px;
    }

    .post-title-inline {
        font-size: 0.95rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .post-meta-inline {
        font-size: 0.75rem;
        display: flex;
        align-items: center;
    }

    .post-author-inline,
    .post-meta-sep {
        display: none;
    }
}

/* Footer */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 2rem;
    margin-top: 6rem;
    text-align: center;
}

footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

footer a {
    color: var(--text-secondary);
    margin: 0 0.75rem;
    transition: var(--transition-smooth);
}

footer a:hover {
    color: var(--accent-primary);
}

/* Bio Section */
.bio-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    padding: 2rem 2rem 2rem 4rem;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

/* Parallax Background Container */
.bio-parallax-bg {
    position: absolute;
    top: -50%;
    left: 0;
    width: 100%;
    height: 200%;
    background-image: url('../images/sharky-bg.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0;
    z-index: -2;
    filter: brightness(0.65) contrast(1.1) saturate(0.9);
    will-change: transform, opacity;
    transition: opacity 0.5s ease-out;
}

.bio-parallax-bg.visible {
    opacity: 0.62;
}

.bio-parallax-bg.faded {
    opacity: 0.4;
    transition: opacity 2.5s cubic-bezier(0.7, 0, 1, 0.5);
    transition-delay: 350ms;
}

/* Gradient Overlay for better text readability */
.bio-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(13, 13, 13, 0.5) 0%, rgba(13, 13, 13, 0.85) 70%, rgba(13, 13, 13, 1) 100%);
    z-index: -1;
}

.bio-content {
    max-width: 800px;
    position: relative;
    z-index: 1;
}

/* Bio Header with Profile Picture */
.bio-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.bio-header-text {
    display: flex;
    flex-direction: column;
}

.profile-pic {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-primary);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4), var(--shadow-lg);
    flex-shrink: 0;
    opacity: 0;
    animation: fadeInScale 0.8s ease 0.1s forwards;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    .bio-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-pic {
        width: 100px;
        height: 100px;
    }

    .bio-section {
        text-align: center;
        justify-content: center;
        padding: 2rem;
    }
}

.bio-content h1 {
    font-size: clamp(3rem, 2rem + 4vw, 5rem);
    margin-bottom: 0.5rem;
    line-height: 1.1;
    min-height: 1.2em;
    /* Prevent layout shift */
}

.bio-content h2 {
    font-size: clamp(1.5rem, 1rem + 2vw, 2.5rem);
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
    min-height: 1.2em;
    font-weight: 500;
}

.bio-body {
    font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

/* Typewriter Effects */
.typewriter-text,
.typewriter-block {
    visibility: hidden;
    /* Hide initially */
}

.typewriter-text.typing,
.typewriter-block.typing {
    visibility: visible;
}

/* Disclosure Block - Fades in after typewriter completes */
.disclosure-block,
.into-block {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.disclosure-block.visible,
.into-block.visible {
    opacity: 1;
    transform: translateY(0);
}

.char {
    opacity: 0;
    display: inline-block;
    position: relative;
    white-space: pre-wrap;
    /* Preserve spaces and wrapping */
}

.char.visible {
    opacity: 1;
    animation: jitter-in 0.1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    /* Faster animation */
}

/* Simulates the key hitting the paper with a slight random offset */
@keyframes jitter-in {
    0% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(1.2);
        filter: blur(2px);
    }

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

html {
    scroll-behavior: smooth;
    overflow-y: scroll;
    /* Prevent scrollbar jump */
}

/* Glass Ripple Effect */
.ripple-word {
    display: inline-block;
    opacity: 0;
    transform-origin: 50% 100%;
    /* Removed will-change to prevent potential blurriness on some screens */
    /* margin-right: 0.25em; Removed in favor of real spaces */
    backface-visibility: hidden;
    /* Sharpness fix */
    -webkit-font-smoothing: subpixel-antialiased;
}

.ripple-word.visible {
    animation: glass-ripple 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes glass-ripple {
    0% {
        opacity: 0;
        transform: translateY(20px) rotateX(45deg) scale(0.95);
        filter: blur(8px);
    }

    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0) scale(1);
        filter: blur(0);
        /* Explicitly clear blur */
    }
}

/* Cursor */
.cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background-color: var(--accent-secondary);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: blink 0.8s step-end infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}

/* Portfolio Section */
.portfolio-section {
    position: relative;
    padding-bottom: 2rem;
}

.portfolio-container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.portfolio-left {
    width: 50%;
    padding: 0 2rem;
    box-sizing: border-box;
}

.portfolio-right {
    width: 50%;
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    box-sizing: border-box;
}

.project-description {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem 0;
}

/* Scroll Section Styles */
.project-header {
    padding: 1rem 0 0.5rem;
}

.project-header h2 {
    font-size: clamp(1.75rem, 1.25rem + 2vw, 2.5rem);
    margin-bottom: 0.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Normalize emoji display in project headers */
.project-header h2 .emoji,
.project-header h2 img.emoji {
    height: 1em;
    width: 1em;
    vertical-align: -0.1em;
}

.project-footer {
    padding: 1rem 0;
}

.scroll-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(139, 92, 246, 0.15);
}

.scroll-section:last-of-type {
    border-bottom: none;
}

/* Last scroll section with project link */
.scroll-section-last {
    border-bottom: none;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid rgba(139, 92, 246, 0.3);
}

.project-link-container {
    margin-top: 1.5rem;
    padding-top: 1rem;
}

.scroll-section-title {
    font-size: clamp(1.25rem, 1rem + 1vw, 1.5rem);
    color: var(--accent-secondary);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.scroll-section-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.scroll-section-content p {
    margin-bottom: 1.5rem;
}

.project-images {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-height: 80vh;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out, visibility 0.5s;
    pointer-events: none;
    z-index: 0;
}

.project-image.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
    pointer-events: auto;
}

.project-image img {
    max-width: 400px;
    max-height: 70vh;
    width: auto;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Screenshot Carousel */
.screenshot-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screenshot-carousel .screenshot {
    position: absolute;
    max-width: 280px;
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

.screenshot-carousel .screenshot.active {
    opacity: 1;
    transform: scale(1);
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-indicators .indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.carousel-indicators .indicator.active {
    background: var(--accent-primary);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.6);
}

.carousel-indicators .indicator:hover {
    background: rgba(255, 255, 255, 0.6);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero {
        padding: 5rem 0 3rem;
    }

    /* Mobile Navigation - Show hamburger, dropdown nav */
    .nav-toggle {
        display: flex;
    }

    /* Header stays sticky on mobile for scroll-hide behavior */

    header .container nav {
        position: relative;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: -2rem;
        right: -2rem;
        flex-direction: column;
        align-items: stretch;
        background: rgba(13, 13, 13, 0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border-color);
        padding: 0 2rem;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
            opacity 0.3s ease,
            padding 0.3s ease;
    }

    .nav-links.open {
        max-height: 400px;
        opacity: 1;
        padding: 1rem 2rem 1.5rem;
    }

    /* Staggered item animations */
    .nav-links li {
        opacity: 0;
        transform: translateY(-10px);
        transition: opacity 0.3s ease, transform 0.3s ease;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links.open li {
        opacity: 1;
        transform: translateY(0);
    }

    /* Stagger delays for flowing effect */
    .nav-links.open li:nth-child(1) {
        transition-delay: 0.05s;
    }

    .nav-links.open li:nth-child(2) {
        transition-delay: 0.1s;
    }

    .nav-links.open li:nth-child(3) {
        transition-delay: 0.15s;
    }

    .nav-links.open li:nth-child(4) {
        transition-delay: 0.2s;
    }

    .nav-links.open li:nth-child(5) {
        transition-delay: 0.25s;
    }

    .nav-links.open li:nth-child(6) {
        transition-delay: 0.3s;
    }

    .nav-links a {
        font-size: 1.1rem;
        padding: 0.85rem 0;
        display: block;
        color: var(--text-secondary);
    }

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

    .nav-links a::after {
        display: none;
    }

    /* Mobile expandable navigation (Balch Bytes dropdown) */
    .nav-expandable {
        display: flex;
        flex-direction: column;
    }

    .nav-expand-btn {
        width: 100%;
        text-align: left;
        padding: 0.85rem 0;
        font-size: 1.1rem;
        justify-content: flex-start;
    }

    .nav-dropdown {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        min-width: auto;
        background: transparent;
        border: none;
        border-radius: 0;
        box-shadow: none;
        padding: 0;
        margin: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, opacity 0.3s ease;
    }

    .nav-expandable.expanded .nav-dropdown {
        max-height: 500px;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding-bottom: 0.5rem;
    }

    .nav-dropdown li {
        border-bottom: none;
    }

    .nav-dropdown a {
        padding: 0.7rem 1rem 0.7rem 2rem;
        font-size: 1rem;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.15rem;
        border-left: 2px solid var(--accent-primary);
        margin-left: 1rem;
    }

    .nav-dropdown a:hover {
        background: transparent;
        color: var(--accent-secondary);
    }

    /* Show post dates on mobile */
    .nav-post-date {
        display: block;
        font-size: 0.75rem;
        margin-top: 0.2rem;
        padding-left: 0;
    }

    .nav-post-title {
        white-space: normal;
    }

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

    /* Responsive - clamp() handles font scaling */

    .portfolio-container {
        flex-direction: column;
    }

    .portfolio-left,
    .portfolio-right {
        width: 100%;
        padding: 1rem;
    }

    .portfolio-right {
        display: none;
        /* Hide sticky image container on mobile */
    }

    .project-description {
        min-height: auto;
        padding: 3rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mobile-project-image {
        display: block;
        /* Show on mobile */
        float: right;
        width: 40%;
        margin: 0 0 1rem 1rem;
    }

    .mobile-project-image img {
        width: 100%;
        height: auto;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .project-description {
        overflow: hidden;
        /* Contain floats */
    }

    .project-description h2 {
        clear: none;
    }

    .project-description .project-description-content {
        overflow: hidden;
        /* Text wraps around floated image */
    }

    /* Scroll section mobile styles - text wraps around image */
    .scroll-section {
        min-height: auto;
        padding: 2rem 0;
        overflow: hidden;
        /* Contain floats */
    }

    .scroll-section .mobile-project-image {
        display: block !important;
        float: right !important;
        width: 40% !important;
        margin: 0 0 1rem 1rem !important;
        box-shadow: none !important;
        /* Use shape-outside to create text wrapping above the image */
        shape-outside: inset(6rem 0 0 0);
        /* Add padding at top to match the shape offset */
        padding-top: 6rem;
    }

    .scroll-section .mobile-project-image img {
        width: 100%;
        height: auto;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .scroll-section-title {
        font-size: 1.1rem;
    }

    .scroll-section-content {
        font-size: 1rem;
        overflow: hidden;
        /* Contain the floated image */
    }

    .project-header {
        padding: 0.5rem 0;
    }

    .project-footer {
        padding: 1rem 0 2rem;
    }
}

@media (max-width: 480px) {

    /* Mobile Navigation adjustments for smaller screens */
    header {
        padding: 1rem 0;
    }

    .logo {
        font-size: 1.1rem;
        flex-shrink: 0;
    }

    .nav-links a {
        font-size: 1rem;
        padding: 0.75rem 0;
    }

    /* Bio Section Mobile */
    .bio-section {
        padding: 1.5rem 1rem;
    }

    .bio-content h1 {
        font-size: 2.2rem;
        white-space: nowrap;
        overflow: visible;
    }

    .bio-content h2 {
        font-size: 1.1rem;
        white-space: nowrap;
    }

    .profile-pic {
        width: 80px;
        height: 80px;
    }

    .bio-body {
        font-size: 0.95rem;
        line-height: 1.6;
        text-align: left;
    }

    /* Portfolio Mobile */
    .portfolio-section {
        padding: 1rem 0.5rem;
    }

    .project-title {
        font-size: 1.3rem;
    }

    .scroll-section-title {
        font-size: 1.1rem;
    }

    .scroll-content-text {
        font-size: 0.9rem;
    }

    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.85rem;
    }

    /* Container smaller padding on mobile */
    .container {
        padding: 0 1rem;
    }
}

/* Extra small phones */
@media (max-width: 380px) {
    .logo {
        font-size: 0.95rem;
    }

    .nav-links {
        font-size: 0.65rem;
        gap: 0.3rem;
    }

    .bio-content h1 {
        font-size: 1.9rem;
    }

    .bio-content h2 {
        font-size: 0.95rem;
    }
}

/* ================================================================
   CAREER SECTION (HOME PAGE INLINE)
   ================================================================ */

.career-section {
    padding: 0 0 4rem;
    background: var(--bg-secondary);
}

.career-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
}

.career-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-top: 1rem;
    gap: 1rem;
    width: 100%;
}

.career-section-header h2 {
    font-size: clamp(1.75rem, 1.25rem + 2vw, 2.5rem);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.classic-resume-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    white-space: nowrap;
}

.classic-resume-btn svg {
    flex-shrink: 0;
}

/* Scroll offset for anchor navigation (account for fixed header) */
#bio,
#portfolio,
#career,
#deep-thoughts {
    scroll-margin-top: 80px;
}

/* ================================================================
   EMPLOYMENT HIGHLIGHTS STYLES
   ================================================================ */

.employment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.employment-header .page-title {
    font-size: clamp(2rem, 1.5rem + 3vw, 3rem);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.print-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
}

.print-btn svg {
    flex-shrink: 0;
}

.employment-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: var(--transition-smooth);
}

.employment-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
}

.employment-card-header {
    margin-bottom: 1.5rem;
}

.company-info {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.company-info h2 {
    margin: 0;
    font-size: clamp(1.5rem, 1.25rem + 1.5vw, 2rem);
}

.period-badge {
    background: rgba(125, 211, 252, 0.2);
    color: #7dd3fc;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.location {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

.employment-awards {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Company Badges - Subtle styling for Startup/IPO/Acquired */
.company-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.company-badge {
    font-size: 0.8rem;
    color: #7dd3fc;
    background: rgba(125, 211, 252, 0.1);
    border: 1px solid rgba(125, 211, 252, 0.4);
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-weight: 500;
    box-shadow: 0 0 8px rgba(125, 211, 252, 0.15);
}

.roles-timeline {
    position: relative;
    padding-left: 1.5rem;
    border-left: 2px solid var(--border-color);
}

.role-item {
    position: relative;
    padding-bottom: 1rem;
    margin-left: 0.5rem;
}

.role-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    background: var(--accent-primary);
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
}

.role-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.role-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--accent-secondary);
}

.role-period {
    font-size: 0.85rem;
    color: #bbb;
    font-family: monospace;
}

.role-details {
    color: var(--text-secondary);
}

.detail-section {
    margin-bottom: 1rem;
}

.detail-section h4 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.detail-section ul {
    list-style: disc;
    padding-left: 1.25rem;
    margin: 0;
}

.detail-section li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.detail-text {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

/* ================================================================
   DEEP THOUGHTS STYLES
   ================================================================ */

.deep-thoughts-section {
    padding: 2rem 2rem 1rem 4rem;
}

@media (max-width: 768px) {
    .deep-thoughts-section {
        padding: 1.5rem 1rem;
    }
}

.deep-thoughts-container {
    max-width: 800px;
    margin-bottom: 1rem;
}

/* ================================================================
   SOAPBOX (BLOG) SECTION
   ================================================================ */

.blog-section {
    padding: 3rem 2rem 2rem 4rem;
}

@media (max-width: 768px) {
    .blog-section {
        padding: 2rem 1rem;
    }
}

.blog-container {
    max-width: 1200px;
    margin: 0 auto;
}

.blog-section-header {
    padding: 1rem 0 0.5rem;
    margin-bottom: 0.5rem;
}

.blog-section-header h2 {
    font-size: clamp(2.5rem, 2rem + 3vw, 4rem);
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0;
}

.blog-section .post-list {
    margin: 1rem 0;
}

.blog-section .post-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: var(--transition-smooth);
    position: relative;
    cursor: pointer;
}

/* Make the entire post card clickable */
.blog-section .post-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.blog-section .post-item:hover {
    border-color: var(--accent-primary);
    transform: translateX(8px);
    box-shadow: var(--shadow-sm);
}

.deep-thoughts-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

@media (max-width: 768px) {
    .deep-thoughts-card {
        padding: 1rem;
        padding-top: 3rem;
        /* Make room for gear button */
    }
}

.deep-thoughts-title {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .deep-thoughts-title {
        font-size: 1.4rem;
        margin-bottom: 0.75rem;
    }
}


.gear-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    width: 60px;
    height: 40px;
}

@media (max-width: 768px) {
    .gear-button {
        top: 0.5rem;
        right: 0.5rem;
        width: 50px;
        height: 35px;
        padding: 0.75rem;
        /* Larger tap target */
    }

    .quote-content {
        padding-right: 0;
    }

    .quote-text {
        font-size: 1rem;
        line-height: 1.6;
    }
}


.gear-button:disabled {
    cursor: wait;
}

.gear {
    position: absolute;
    transition: color 0.2s;
}

.gear-large {
    top: 0;
    left: 0;
    color: var(--text-secondary);
}

.gear-small {
    top: 4px;
    left: 28px;
    color: #f59e0b;
}

.gear-button:hover .gear-large {
    color: var(--text-primary);
}

.gear-button:hover .gear-small {
    color: #fbbf24;
}

/* Gear animations */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes spin-reverse {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(-360deg);
    }
}

@keyframes grind {
    0% {
        transform: rotate(0deg);
    }

    20% {
        transform: rotate(8deg) translateX(-1px);
    }

    40% {
        transform: rotate(-5deg);
    }

    60% {
        transform: rotate(6deg) translateX(1px);
    }

    80% {
        transform: rotate(-3deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

.gear.spinning {
    animation: spin 3s linear infinite;
}

.gear.spinning-reverse {
    animation: spin-reverse 3s linear infinite;
}

.gear.grinding {
    animation: grind 0.6s ease-in-out;
}

.quote-content {
    padding-right: 1.5rem;
}

.quote-text {
    font-size: clamp(1.1rem, 1rem + 0.5vw, 1.25rem);
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.7;
    font-family: Georgia, 'Times New Roman', serif;
    margin-bottom: 0.75rem;
}

.quote-author {
    text-align: right;
    color: var(--text-secondary);
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.4s ease;
    margin: 0;
}

.quote-author.visible {
    opacity: 1;
}

/* Word animation */
@keyframes fade-in-up-word {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.animate-word {
    display: inline-block;
    opacity: 0;
    animation: fade-in-up-word 0.4s ease-out forwards;
}

/* ================================================================
   FOOTER SUBTLE LINK
   ================================================================ */

.footer-subtle-link {
    margin: 0.5rem 0;
}

.footer-subtle-link a {
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.5;
    transition: var(--transition-smooth);
}

.footer-subtle-link a:hover {
    opacity: 1;
    color: var(--accent-primary);
}

/* ================================================================
   PRINT STYLES
   ================================================================ */

.no-print {
    display: block;
}

.only-print {
    display: none !important;
}

@media print {
    .no-print {
        display: none !important;
    }

    .only-print {
        display: block !important;
    }

    body {
        background: white;
        color: #1f2937;
        font-size: 10pt;
        line-height: 1.4;
    }

    /* Hide site header/footer/nav but NOT resume-header */
    body>header,
    body>footer,
    nav {
        display: none !important;
    }

    .container {
        max-width: 100%;
        padding: 0;
        margin: 0;
    }

    /* Resume Print Styles */
    .resume-print-view {
        background: white;
        color: #1f2937;
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    }

    .resume-header {
        display: block !important;
        padding: 24pt 24pt 20pt;
        border-bottom: 2px solid #2563eb;
        background: linear-gradient(to right, #f9fafb, #ffffff);
        margin-bottom: 0;
    }

    .resume-header h1 {
        font-size: 26pt;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: #111827;
        margin: 0 0 6pt;
    }

    .resume-title {
        font-size: 14pt;
        color: #2563eb;
        font-weight: 600;
        margin: 0 0 12pt;
    }

    .resume-contact {
        display: flex;
        flex-wrap: wrap;
        gap: 8pt 20pt;
        font-size: 10pt;
        color: #374151;
        font-weight: 500;
    }

    .resume-contact span {
        display: inline-block;
    }

    .resume-summary {
        font-size: 10pt;
        color: #4b5563;
        line-height: 1.6;
        max-width: 100%;
        margin: 16pt 24pt 0;
        padding-bottom: 12pt;
        border-bottom: 1px solid #e5e7eb;
    }

    .resume-two-column {
        display: flex;
    }

    .resume-main {
        width: 65%;
        padding: 16pt 20pt 16pt 24pt;
    }

    .resume-sidebar {
        width: 35%;
        padding: 16pt 24pt 16pt 16pt;
        background: #f8fafc;
        border-left: 1px solid #e5e7eb;
    }

    .resume-section {
        margin-bottom: 16pt;
    }

    .resume-section-title {
        font-size: 8pt;
        font-weight: 700;
        color: #9ca3af;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        border-bottom: 1px solid #e5e7eb;
        padding-bottom: 4pt;
        margin-bottom: 10pt;
    }

    .resume-experience {
        margin-bottom: 12pt;
    }

    .resume-exp-header {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        margin-bottom: 2pt;
    }

    .resume-exp-header h3 {
        font-size: 11pt;
        font-weight: 700;
        color: #111827;
        margin: 0;
    }

    .resume-period {
        font-size: 8pt;
        font-weight: 600;
        color: #6b7280;
        background: #f3f4f6;
        padding: 2pt 6pt;
        border-radius: 2pt;
    }

    .resume-location {
        font-size: 8pt;
        color: #6b7280;
        margin: 0 0 6pt;
    }

    .resume-awards {
        background: #fef9c3;
        padding: 6pt;
        border-radius: 4pt;
        border: 1px solid #fef08a;
        margin-bottom: 8pt;
    }

    .resume-awards h4 {
        font-size: 7pt;
        font-weight: 700;
        color: #854d0e;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        margin: 0 0 4pt;
    }

    .resume-awards ul {
        list-style: disc;
        padding-left: 12pt;
        margin: 0;
        font-size: 8pt;
        color: #4b5563;
    }

    .resume-role {
        padding-left: 10pt;
        border-left: 2px solid #e5e7eb;
        margin-bottom: 8pt;
    }

    .resume-role-header {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        margin-bottom: 4pt;
    }

    .resume-role-header h4 {
        font-size: 9pt;
        font-weight: 700;
        color: #374151;
        margin: 0;
    }

    .resume-role-period {
        font-size: 7pt;
        font-family: monospace;
        color: #6b7280;
    }

    .resume-detail {
        margin-bottom: 6pt;
    }

    .resume-detail h5 {
        font-size: 8pt;
        font-weight: 600;
        color: #111827;
        margin: 0 0 2pt;
    }

    .resume-detail ul {
        list-style: disc;
        padding-left: 12pt;
        margin: 0;
        font-size: 8pt;
        color: #4b5563;
        line-height: 1.4;
    }

    .resume-detail-text {
        font-size: 8pt;
        color: #4b5563;
        margin: 0 0 4pt;
        line-height: 1.4;
    }

    .resume-skill-category {
        margin-bottom: 10pt;
    }

    .resume-skill-category h4 {
        font-size: 8pt;
        font-weight: 700;
        color: #111827;
        margin: 0 0 4pt;
    }

    .resume-skill-category ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .resume-skill-category li {
        font-size: 8pt;
        color: #4b5563;
        padding: 1pt 0;
    }

    .resume-project {
        margin-bottom: 10pt;
    }

    .resume-project h4 {
        font-size: 9pt;
        font-weight: 700;
        color: #111827;
        margin: 0 0 2pt;
    }

    .resume-project-link {
        font-size: 7pt;
        color: #2563eb;
        margin: 0 0 4pt;
        word-break: break-all;
    }

    .resume-tech-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 3pt;
        margin-bottom: 4pt;
    }

    .resume-tech-tag {
        font-size: 7pt;
        font-weight: 600;
        color: #475569;
        background: #f1f5f9;
        border: 1px solid #cbd5e1;
        padding: 1pt 4pt;
        border-radius: 2pt;
    }

    .resume-project-desc {
        font-size: 8pt;
        color: #4b5563;
        line-height: 1.4;
        margin: 0;
    }

    .resume-footer {
        padding: 8pt;
        background: #f9fafb;
        border-top: 1px solid #e5e7eb;
        text-align: center;
        margin-top: 16pt;
    }

    .resume-footer p {
        font-size: 7pt;
        color: #6b7280;
        margin: 0;
    }

    .resume-footer strong {
        color: #374151;
    }

    @page {
        margin: 0.5in;
        size: letter;
    }
}

/* ================================================================
   IMAGE LIGHTBOX STYLES
   ================================================================ */

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: zoom-out;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.lightbox-overlay.active img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

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

.lightbox-close svg {
    width: 24px;
    height: 24px;
    stroke: white;
    stroke-width: 2;
}

/* Make portfolio images clickable */
.project-image img,
.mobile-project-image img,
.screenshot-carousel .screenshot {
    cursor: zoom-in;
}

/* Lightbox hint on hover */
.project-image img:hover,
.mobile-project-image img:hover,
.screenshot-carousel .screenshot:hover {
    opacity: 0.9;
}

/* ================================================================
   MOBILE STYLES - CAREER SECTION & RESUME
   ================================================================ */

@media (max-width: 768px) {

    /* Career Section Mobile */
    .career-section {
        padding: 0 0 2rem;
    }

    .career-container {
        padding: 0 1rem;
    }

    .career-section-header {
        padding-top: 0.5rem;
        margin-bottom: 0.75rem;
        flex-wrap: wrap;
    }

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

    .classic-resume-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }

    /* Employment Card Mobile */
    .employment-card {
        padding: 1.25rem;
        margin-bottom: 1.25rem;
        border-radius: 12px;
    }

    .employment-card-header {
        margin-bottom: 1rem;
    }

    .company-info {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .company-info h2 {
        font-size: 1.25rem;
        line-height: 1.2;
    }

    .period-badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.6rem;
    }

    .location {
        font-size: 0.85rem;
    }

    .employment-awards {
        margin-bottom: 1rem;
    }

    .award-badge {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }

    /* Roles Timeline Mobile */
    .roles-timeline {
        padding-left: 1rem;
        border-left-width: 2px;
    }

    .role-item {
        margin-left: 0.25rem;
        padding-bottom: 0.75rem;
    }

    .role-item::before {
        left: -1.4rem;
        width: 10px;
        height: 10px;
    }

    .role-header {
        flex-direction: column;
        gap: 0.25rem;
        margin-bottom: 0.75rem;
    }

    .role-header h3 {
        font-size: 1rem;
    }

    .role-period {
        font-size: 0.75rem;
    }

    .detail-section {
        margin-bottom: 0.75rem;
    }

    .detail-section h4 {
        font-size: 0.9rem;
    }

    .detail-section ul {
        padding-left: 1rem;
    }

    .detail-section li {
        font-size: 0.9rem;
        margin-bottom: 0.35rem;
        line-height: 1.5;
    }

    .detail-text {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    /* Resume Page Mobile */
    .resume-page {
        padding: 1rem 0.5rem;
    }

    .resume-actions {
        margin-bottom: 1rem;
    }

    .resume-container {
        padding: 1.25rem;
        border-radius: 8px;
    }

    .resume-header {
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }

    .resume-header h1 {
        font-size: 1.75rem;
    }

    .resume-title {
        font-size: 1rem;
    }

    .resume-contact {
        flex-direction: column;
        gap: 0.4rem;
    }

    .contact-item {
        font-size: 0.8rem;
    }

    .resume-summary-section {
        padding: 0.75rem 0;
        margin-bottom: 1rem;
    }

    .resume-summary-section p {
        font-size: 0.9rem;
        text-align: left;
    }

    /* Resume Body - Stack on Mobile */
    .resume-body {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .section-title {
        font-size: 1rem;
    }

    /* Experience Items Mobile */
    .experience-item {
        margin-bottom: 1rem;
        padding-bottom: 1rem;
    }

    .experience-header {
        flex-direction: column;
        gap: 0.25rem;
    }

    .company-line {
        flex-direction: column;
        gap: 0.25rem;
        align-items: flex-start;
    }

    .company-line h3 {
        font-size: 1.1rem;
    }

    .location {
        font-size: 0.8rem;
    }

    .period {
        font-size: 0.8rem;
    }

    .awards {
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }

    .award {
        font-size: 0.7rem;
        padding: 0.15rem 0.5rem;
    }

    .role {
        margin-top: 0.5rem;
    }

    .role-content {
        font-size: 0.85rem;
    }

    .detail-group h5 {
        font-size: 0.8rem;
    }

    /* Sidebar on Mobile */
    .resume-sidebar .resume-section {
        margin-bottom: 1.25rem;
    }

    .skill-category h4 {
        font-size: 0.85rem;
    }

    .skill-category li {
        font-size: 0.8rem;
    }

    .project h4 {
        font-size: 0.9rem;
    }

    .project-link {
        font-size: 0.7rem;
    }

    .tech-tag {
        font-size: 0.65rem;
    }

    .project-desc {
        font-size: 0.75rem;
    }

    .resume-footer {
        padding-top: 1rem;
        margin-top: 1rem;
    }

    .resume-footer p {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {

    /* Career Section Extra Small */
    .career-container {
        padding: 0 0.75rem;
    }

    .employment-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .company-info h2 {
        font-size: 1.1rem;
    }

    .period-badge {
        font-size: 0.7rem;
    }

    .role-header h3 {
        font-size: 0.95rem;
    }

    .detail-section li {
        font-size: 0.85rem;
    }

    /* Resume Extra Small */
    .resume-container {
        padding: 1rem;
    }

    .resume-header h1 {
        font-size: 1.5rem;
    }

    .resume-title {
        font-size: 0.9rem;
    }

    .contact-item {
        font-size: 0.75rem;
    }

    .contact-item svg {
        width: 12px;
        height: 12px;
    }

    .resume-summary-section p {
        font-size: 0.85rem;
    }

    .company-line h3 {
        font-size: 1rem;
    }

    .role-content {
        font-size: 0.8rem;
    }

    .print-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .print-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* =============================================
   Site Layout Sidebar Navigation
   ============================================= */

/* Wrapper for sidebar + main content layout */
.site-layout-wrapper {
    display: flex;
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    padding: 0 1rem;
}

/* Left Sidebar */
.post-sidebar {
    position: sticky;
    top: 80px;
    align-self: flex-start;
    width: 220px;
    min-width: 220px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    overflow-x: hidden;
    background: transparent;
    padding: 1rem 0.5rem 1rem 0;
    flex-shrink: 0;
    /* Hide scrollbar but keep functionality */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

/* Hide scrollbar for webkit browsers */
.post-sidebar::-webkit-scrollbar {
    display: none;
}

/* Sidebar Header */
.sidebar-header {
    margin-bottom: 0.5rem;
    padding-bottom: 0.4rem;
}

.sidebar-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Sidebar Navigation */
.sidebar-nav {
    margin: 0;
}

.sidebar-posts {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sidebar-post-item {
    margin: 0;
}

.sidebar-post-item a {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    position: relative;
}

.sidebar-post-item a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 2px;
    height: 60%;
    background: var(--accent-gradient);
    transition: transform 0.2s ease;
    border-radius: 0 2px 2px 0;
}

.sidebar-post-item a:hover {
    background: rgba(139, 92, 246, 0.08);
}

.sidebar-post-item a:hover::before {
    transform: translateY(-50%) scaleY(1);
}

/* Active post state */
.sidebar-post-item.active a {
    background: rgba(139, 92, 246, 0.12);
    border-color: rgba(139, 92, 246, 0.25);
}

.sidebar-post-item.active a::before {
    transform: translateY(-50%) scaleY(1);
}

.sidebar-post-title {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.3;
}

.sidebar-post-item a:hover .sidebar-post-title {
    color: #fff;
}

.sidebar-post-date {
    font-size: 0.7rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Main content area in sidebar layout */
.site-layout-wrapper main {
    flex: 1;
    min-width: 0;
}

/* Hide sidebar on smaller screens */
@media (max-width: 1024px) {
    .post-sidebar {
        display: none;
    }
    
    .site-layout-wrapper {
        display: block;
        padding: 0;
    }
}

/* Adjust for larger tablet */
@media (min-width: 1025px) and (max-width: 1200px) {
    .post-sidebar {
        width: 220px;
        min-width: 220px;
        padding: 0.875rem 0.5rem 0.875rem 0;
    }
    
    .sidebar-title {
        font-size: 0.85rem;
    }
    
    .sidebar-post-title {
        font-size: 0.75rem;
    }
    
    .sidebar-post-item a {
        padding: 0.3rem 0.4rem;
    }
}