/* ============================================
   Mubarak Kasim Portfolio — Premium Design
   ============================================ */

/* Modern CSS Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ============================================
   Design Tokens / Variables
   ============================================ */
:root {
    /* Brand Palette — clean white/grey + flashy black */
    --primary: #111111;
    --primary-light: #333333;
    --primary-dark: #000000;
    --primary-glow: rgba(0, 0, 0, 0.08);
    --accent: #555555;
    --accent-light: #777777;
    --accent-glow: rgba(0, 0, 0, 0.06);

    /* Neutral palette */
    --text-heading: #111111;
    --text-body: #444444;
    --text-muted: #888888;
    --bg-page: #f7f7f7;
    --bg-section: #ffffff;
    --bg-card: #ffffff;
    --bg-surface: #f0f0f0;
    --border: #e0e0e0;
    --border-subtle: #ebebeb;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 40px var(--primary-glow);

    /* Radii */
    --radius-sm: 0.375rem;
    --radius-md: 0.625rem;
    --radius-lg: 1rem;
    --radius-xl: 1.25rem;
    --radius-full: 9999px;

    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.15s var(--ease);
    --transition: 0.3s var(--ease);
    --transition-slow: 0.5s var(--ease);

    /* Layout */
    --max-width: 1200px;
    --nav-height: 4.5rem;
}

/* ============================================
   Dark Theme
   ============================================ */
html[data-theme="dark"] {
    --text-heading: #f0f0f0;
    --text-body: #b0b0b0;
    --text-muted: #808080;
    --bg-page: #0a0a0a;
    --bg-section: #111111;
    --bg-card: #1a1a1a;
    --bg-surface: #141414;
    --border: #2a2a2a;
    --border-subtle: #222222;
    --primary: #ffffff;
    --primary-light: #e0e0e0;
    --primary-dark: #cccccc;
    --primary-glow: rgba(255, 255, 255, 0.08);
    --accent: #aaaaaa;
    --accent-light: #cccccc;
    --accent-glow: rgba(255, 255, 255, 0.06);

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.45);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Dark mode — fix elements that use primary as BACKGROUND (white bg + white text = invisible) */
html[data-theme="dark"] .cta-button {
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    color: #111111;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .cta-button:hover {
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.15);
}

html[data-theme="dark"] .submit-btn {
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    color: #111111;
}

html[data-theme="dark"] .submit-btn:hover {
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .project-btn {
    background: #ffffff;
    color: #111111;
}

html[data-theme="dark"] .project-btn:hover {
    background: #e0e0e0;
}

html[data-theme="dark"] .service-card:hover .service-icon {
    background: #ffffff;
    color: #111111;
}

html[data-theme="dark"] .service-card::before {
    background: linear-gradient(90deg, #ffffff, #888888);
}

html[data-theme="dark"] .about-cta {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

html[data-theme="dark"] .about-cta:hover {
    background: #ffffff;
    color: #111111;
}

html[data-theme="dark"] .story-nav-toggle {
    background: #ffffff;
    color: #111111;
}

html[data-theme="dark"] .story-nav-toggle:hover {
    background: #e0e0e0;
}

html[data-theme="dark"] .settings-toggle:hover {
    background: #ffffff;
    color: #111111;
}

html[data-theme="dark"] .font-controls button:hover {
    background: #ffffff;
    color: #111111;
}

html[data-theme="dark"] .reading-progress-bar {
    background: #ffffff;
}

html[data-theme="dark"] .theme-btn.active {
    color: #ffffff;
}

html[data-theme="dark"] .hero-badge {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: #e0e0e0;
}

html[data-theme="dark"] .badge-dot {
    background: #ffffff;
}

html[data-theme="dark"] .edu-icon {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

html[data-theme="dark"] .service-icon {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

html[data-theme="dark"] .placeholder-icon {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

html[data-theme="dark"] .resource-icon {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

html[data-theme="dark"] .info-chip:hover {
    border-color: #ffffff;
    color: #ffffff;
}

html[data-theme="dark"] .timeline-tags span:hover {
    color: #ffffff;
    border-color: #ffffff;
}

html[data-theme="dark"] .social-btn.portfolio-link:hover {
    background: #ffffff;
    color: #111111;
    border-color: #ffffff;
}

html[data-theme="dark"] .hire-cta-btn {
    background: #ffffff;
    color: #111111;
}

/* Dark mode — Hero section overrides */
html[data-theme="dark"] .hero {
    background: linear-gradient(135deg, #0a0a0a 0%, #111111 40%, #1a1a1a 100%);
}

html[data-theme="dark"] .hero-badge {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: #cccccc;
}

html[data-theme="dark"] .badge-dot {
    background: #ffffff;
}

html[data-theme="dark"] .hero-greeting {
    color: #aaaaaa;
}

html[data-theme="dark"] .hero-name {
    color: #ffffff;
}

html[data-theme="dark"] .hero-title-line {
    background: linear-gradient(135deg, #ffffff 0%, #aaaaaa 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

html[data-theme="dark"] .role-tag {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: #cccccc;
}

html[data-theme="dark"] .hero-description {
    color: rgba(255, 255, 255, 0.6);
}

html[data-theme="dark"] .hero-link {
    color: #ffffff;
    border-bottom-color: #ffffff;
}

html[data-theme="dark"] .cv-button {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.15);
}

html[data-theme="dark"] .cv-button:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
}

html[data-theme="dark"] .stat-number {
    color: #ffffff;
}

html[data-theme="dark"] .stat-suffix {
    color: #cccccc;
}

html[data-theme="dark"] .stat-label {
    color: rgba(255, 255, 255, 0.45);
}

html[data-theme="dark"] .stat-divider {
    background: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .hero-scroll-indicator {
    color: rgba(255, 255, 255, 0.3);
}

/* ============================================
   Global Styles
   ============================================ */
html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.7;
    color: var(--text-body);
    background: var(--bg-page);
    transition: background-color var(--transition), color var(--transition);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-heading);
    line-height: 1.2;
    font-weight: 700;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

::selection {
    background: var(--primary);
    color: #fff;
}

/* ============================================
   Section Headers (Reusable)
   ============================================ */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: var(--primary-glow);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: var(--radius-full);
    margin-bottom: 1rem;
}

.section-tag i {
    font-size: 0.75rem;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.5px;
}

.section-line {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
    margin: 1rem auto 0;
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    background: rgba(250, 250, 250, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 1000;
    transition: all var(--transition);
}

html[data-theme="dark"] .navbar {
    background: rgba(13, 13, 26, 0.8);
    border-bottom-color: var(--border);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -0.5px;
    font-family: 'JetBrains Mono', monospace;
}

.logo-bracket {
    color: var(--primary);
    font-weight: 400;
}

.nav-links {
    display: flex;
    gap: 0.25rem;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
    background: var(--primary-glow);
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.theme-toggle {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.theme-toggle:hover {
    background: var(--primary-glow);
    color: var(--primary);
    border-color: var(--primary);
    transform: rotate(15deg);
}

.hamburger {
    display: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-heading);
    margin: 5px 0;
    transition: var(--transition);
    border-radius: 2px;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: calc(var(--nav-height) + 2rem) 5% 2rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 40%, #f5f5f5 100%);
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.hero-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-glow), transparent 70%);
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 0;
    filter: blur(60px);
    animation: glowPulse 4s ease-in-out infinite alternate;
}

@keyframes glowPulse {
    from {
        opacity: 0.4;
        transform: translateX(-50%) scale(0.9);
    }

    to {
        opacity: 0.7;
        transform: translateX(-50%) scale(1.1);
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    animation: fadeInUp 0.8s ease-out;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-full);
    color: #555555;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: #111111;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.4);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(0, 0, 0, 0);
    }
}

.hero h1 {
    margin-bottom: 1rem;
}

.hero-greeting {
    display: block;
    font-size: 1.1rem;
    font-weight: 400;
    color: #666666;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.hero-name {
    display: block;
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    font-weight: 900;
    color: #111111;
    letter-spacing: -2px;
    line-height: 1.05;
}

.hero-title-line {
    display: block;
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    font-weight: 900;
    background: linear-gradient(135deg, #333333 0%, #888888 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -2px;
    line-height: 1.05;
}

.hero-roles {
    margin: 1.5rem 0;
}

.role-tag {
    display: inline-block;
    padding: 0.4rem 1.25rem;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-full);
    color: #555555;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
}

.hero-description {
    font-size: 1.1rem;
    color: rgba(0, 0, 0, 0.55);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
}

.hero-link {
    color: #111111;
    font-weight: 600;
    border-bottom: 1px dashed #111111;
    padding-bottom: 1px;
}

.hero-link:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 4rem;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px var(--primary-glow);
    transition: var(--transition);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px var(--primary-glow);
}

.cv-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 2rem;
    background: rgba(0, 0, 0, 0.05);
    color: #111111;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.cv-button:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.3);
    transform: translateY(-3px);
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    animation: fadeInUp 0.8s ease-out 0.8s both;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: #111111;
    line-height: 1;
}

.stat-suffix {
    font-size: 2rem;
    font-weight: 700;
    color: #555555;
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: rgba(0, 0, 0, 0.45);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.4rem;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(0, 0, 0, 0.1);
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgba(0, 0, 0, 0.3);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: fadeInUp 0.8s ease-out 1s both;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--primary), transparent);
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {

    0%,
    100% {
        transform: scaleY(0.5);
        opacity: 0.3;
    }

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

/* ============================================
   About Section
   ============================================ */
.about {
    padding: 7rem 5%;
    background: var(--bg-section);
}

.about-content {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 4rem;
    max-width: var(--max-width);
    margin: 0 auto;
    align-items: start;
}

.about-photo-wrapper {
    position: sticky;
    top: calc(var(--nav-height) + 2rem);
}

.about-photo {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.about-photo img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: var(--radius-xl);
    transition: transform var(--transition-slow);
}

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

.photo-decoration {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-xl);
    border: 2px solid transparent;
    background: linear-gradient(135deg, var(--primary-glow), transparent 50%) border-box;
    pointer-events: none;
}

.about-quick-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.info-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.info-chip i {
    color: var(--primary);
    font-size: 0.7rem;
}

.info-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.about-text {
    font-size: 1.05rem;
    line-height: 1.85;
}

.about-paragraph {
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border);
    transition: border-color var(--transition);
}

.about-paragraph:hover {
    border-left-color: var(--primary);
}

.about-paragraph p strong {
    color: var(--text-heading);
    font-weight: 600;
}

.about-paragraph a {
    color: var(--primary);
    font-weight: 500;
    border-bottom: 1px dashed var(--primary);
    padding-bottom: 1px;
}

.about-paragraph a:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.about-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    margin-top: 1rem;
    background: var(--primary-glow);
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(0, 0, 0, 0.15);
    transition: var(--transition);
}

.about-cta:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

/* ============================================
   Tech Stack Section
   ============================================ */
.tech-stack {
    padding: 7rem 5%;
    background: var(--bg-page);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

.tech-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    cursor: default;
}

.tech-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent, --primary);
}

.tech-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    font-size: 1.5rem;
    color: var(--accent);
    transition: var(--transition);
}

.tech-card:hover .tech-icon {
    transform: scale(1.15) rotate(-5deg);
}

.tech-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-heading);
}

.tech-level {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 0.15rem 0.5rem;
    background: var(--bg-surface);
    border-radius: var(--radius-full);
}

/* ============================================
   Experience / Timeline
   ============================================ */
.experience {
    padding: 7rem 5%;
    background: var(--bg-section);
}

.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding-left: 3rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--accent), var(--border));
    border-radius: 1px;
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
}

.timeline-marker {
    position: absolute;
    left: -3rem;
    top: 1.5rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.marker-dot {
    width: 14px;
    height: 14px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 0 4px var(--bg-section), 0 0 0 6px var(--primary-glow);
    transition: var(--transition);
}

.timeline-item:hover .marker-dot {
    transform: scale(1.3);
    box-shadow: 0 0 0 4px var(--bg-section), 0 0 0 8px var(--primary-glow);
}

.timeline-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    transition: var(--transition);
}

.timeline-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
    transform: translateX(4px);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.timeline-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
}

.timeline-company {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 500;
    margin-top: 0.2rem;
}

.timeline-date {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    padding: 0.25rem 0.75rem;
    background: var(--accent-glow);
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.timeline-description {
    color: var(--text-body);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.timeline-tags span {
    padding: 0.2rem 0.6rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
}

.timeline-tags span:hover {
    color: var(--primary);
    border-color: var(--primary);
}

/* ============================================
   Education Section
   ============================================ */
.education {
    padding: 7rem 5%;
    background: var(--bg-page);
}

.education-grid {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.edu-card {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

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

.edu-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-glow), var(--accent-glow));
    border-radius: var(--radius-md);
    color: var(--primary);
    font-size: 1.25rem;
}

.edu-details h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.edu-school {
    color: var(--text-body);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.edu-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.edu-year,
.edu-grade {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.edu-grade {
    color: var(--accent);
    font-weight: 600;
}

/* ============================================
   Services Section
   ============================================ */
.services {
    padding: 7rem 5%;
    background: var(--bg-section);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

.service-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: var(--transition);
}

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

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-glow);
    border-radius: var(--radius-md);
    color: var(--primary);
    font-size: 1.4rem;
    margin-bottom: 1.25rem;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background: var(--primary);
    color: #fff;
    transform: rotate(-5deg) scale(1.08);
}

.service-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.service-card p {
    color: var(--text-body);
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.service-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.service-features span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    padding: 0.25rem 0.6rem;
    background: var(--bg-surface);
    border-radius: var(--radius-full);
}

.service-features span i {
    color: var(--primary);
    font-size: 0.6rem;
}

/* ============================================
   Projects Section
   ============================================ */
.projects {
    padding: 7rem 5%;
    background: var(--bg-page);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

.project-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
}

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

.project-card.featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
}

.project-image {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.project-card.featured .project-image {
    height: 100%;
    min-height: 320px;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.project-card:hover .project-image img {
    transform: scale(1.06);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    backdrop-filter: blur(4px);
}

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

.project-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.project-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.placeholder-project {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-card) 100%);
}

.placeholder-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-glow);
    border-radius: 50%;
    color: var(--primary);
    font-size: 2rem;
}

.project-info {
    padding: 1.75rem;
}

.project-category {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.project-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.project-info p {
    color: var(--text-body);
    font-size: 0.92rem;
    line-height: 1.65;
    margin-bottom: 1.25rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.project-tech span {
    padding: 0.2rem 0.6rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

/* ============================================
   Contact Section
   ============================================ */
.contact {
    padding: 7rem 5%;
    background: var(--bg-section);
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

.contact-info-panel {
    padding: 2.5rem;
    background: linear-gradient(135deg, #111111 0%, #222222 100%);
    border-radius: var(--radius-xl);
    color: #fff;
}

.contact-info-panel h3 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 0.75rem;
}

.contact-info-panel>p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.method-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    color: var(--primary-light);
    font-size: 1rem;
}

.contact-method h4 {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.15rem;
}

.contact-method p {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.5);
}

.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    transition: var(--transition);
}

.social-btn:hover {
    transform: translateY(-3px);
}

.social-btn.github:hover {
    background: #333;
    color: #fff;
    border-color: #333;
}

.social-btn.linkedin:hover {
    background: #0077b5;
    color: #fff;
    border-color: #0077b5;
}

.social-btn.facebook:hover {
    background: #1877f2;
    color: #fff;
    border-color: #1877f2;
}

.social-btn.portfolio-link:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.contact-form-panel {
    padding: 2.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-heading);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

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

.submit-btn {
    width: 100%;
    padding: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.submit-btn i {
    transition: transform var(--transition);
}

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

#form-status {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-body);
    text-align: center;
}

/* ============================================
   Footer
   ============================================ */
footer {
    padding: 3rem 5%;
    background: #111111;
    color: rgba(255, 255, 255, 0.5);
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}

.footer-brand {
    margin-bottom: 1.5rem;
}

.footer-logo {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
}

.footer-brand p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 0.3rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-links a {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

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

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }

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

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .project-card.featured {
        grid-template-columns: 1fr;
    }

    .project-card.featured .project-image {
        min-height: 240px;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0 1rem;
    }

    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        background: var(--bg-card);
        flex-direction: column;
        padding: 1.5rem;
        gap: 0.25rem;
        border-bottom: 1px solid var(--border);
        transform: translateY(-150%);
        transition: transform 0.35s var(--ease);
        z-index: 900;
        box-shadow: none;
    }

    .nav-links.show-mobile {
        transform: translateY(0);
        box-shadow: var(--shadow-xl);
    }

    .hamburger {
        display: block;
    }

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

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

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

    .hero-name,
    .hero-title-line {
        font-size: 2.5rem;
        letter-spacing: -1px;
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .about-photo-wrapper {
        position: static;
        order: -1;
        max-width: 300px;
        margin: 0 auto;
    }

    .contact-layout {
        grid-template-columns: 1fr;
    }

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

    .project-card.featured {
        grid-column: auto;
    }

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

    .tech-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

@media (max-width: 480px) {

    .hero-name,
    .hero-title-line {
        font-size: 2rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .stat-divider {
        width: 40px;
        height: 1px;
    }
}

/* ============================================
   Story Page Styles (preserved)
   ============================================ */
.story-container {
    padding-top: 5rem;
    min-height: 100vh;
    background: var(--bg-page);
    position: relative;
}

.story-header {
    text-align: center;
    padding: 4rem 1rem;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
}

.story-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.story-layout {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Floating Navigation Button */
.story-nav-toggle {
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    background: var(--primary);
    color: white;
    border: none;
    width: 50px;
    height: 60px;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: var(--transition);
}

.story-nav-toggle:hover {
    width: 60px;
    background: var(--primary-dark);
}

/* Collapsible Sidebar */
.story-sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100vh;
    background: var(--bg-card);
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    transition: left 0.3s var(--ease);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
}

.story-sidebar.active {
    left: 0;
}

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.sidebar-header h3 {
    font-size: 1.25rem;
    color: var(--primary);
}

.close-sidebar {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
}

.close-sidebar:hover {
    color: var(--primary);
    transform: rotate(90deg);
}

.chapter-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.chapter-nav ul {
    display: flex;
    flex-direction: column;
}

.chapter-nav li a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--text-heading);
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: var(--transition);
}

.chapter-nav li a:hover {
    background: var(--bg-surface);
    color: var(--primary);
    border-left-color: var(--primary);
    padding-left: 2rem;
}

/* Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}

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

/* Chapter Content */
.story-content {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.chapter {
    scroll-margin-top: 6rem;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
}

.chapter:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.chapter-title {
    padding: 1.5rem 2rem;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    font-size: 1.5rem;
    color: var(--primary);
}

.chapter-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: var(--bg-surface);
}

.chapter-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.chapter:hover .chapter-image img {
    transform: scale(1.05);
}

.chapter-body {
    padding: 2rem;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-body);
    text-align: center;
}

.chapter-body p {
    margin-bottom: 1.5rem;
}

.chapter-body::after {
    content: "✦ ✦ ✦";
    display: block;
    text-align: center;
    margin-top: 3rem;
    font-size: 1.5rem;
    color: var(--primary);
    opacity: 0.6;
    letter-spacing: 0.5rem;
}

.placeholder-text {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
}

/* Reading Enhancements */
.reading-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 2000;
}

.reading-progress-bar {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.1s ease;
}

/* Settings Toggle */
.settings-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.settings-toggle:hover {
    background: var(--primary);
    color: white;
    transform: rotate(90deg);
}

/* Settings Panel */
.settings-panel {
    position: fixed;
    bottom: 5rem;
    right: 2rem;
    width: 300px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
}

.settings-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.settings-header h3 {
    font-size: 1.1rem;
    margin: 0;
}

.close-settings {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
}

.settings-option {
    margin-bottom: 1.5rem;
}

.settings-option label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

.font-controls,
.theme-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-surface);
    padding: 0.5rem;
    border-radius: var(--radius-md);
}

.font-controls button {
    width: 30px;
    height: 30px;
    border: none;
    background: var(--bg-card);
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-heading);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.font-controls button:hover {
    background: var(--primary);
    color: white;
}

#font-display {
    flex: 1;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
}

.theme-btn {
    flex: 1;
    padding: 0.5rem;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.theme-btn.active {
    background: var(--bg-card);
    color: var(--primary);
}

/* Resources Page */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 1rem;
}

.resource-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.resource-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-glow);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.dept-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    font-weight: 600;
}

/* Sepia mode (for story page) */
body.sepia-mode {
    --primary: #5d4037;
    --primary-light: #795548;
    --primary-dark: #4e342e;
    --text-heading: #3e2723;
    --text-body: #5d4037;
    --bg-page: #f4ecd8;
    --bg-section: #eaddcf;
    --bg-card: #eaddcf;
    --border: #d7ccc8;
}

/* Mobile story page adjustments */
@media (max-width: 768px) {
    .story-header h1 {
        font-size: 2rem;
    }

    .chapter-image {
        height: 200px;
    }

    .chapter-body {
        padding: 1.5rem;
        font-size: 1rem;
    }
}