:root {
    /* Color Palette: After-Hours Neon */
    --color-bg: #0A0A0B;
    /* Primary Background (Obsidian Abyss) */
    --color-bg-secondary: #1C1C1E;
    /* Bento/Card Background (Deep Nebula) */
    --color-accent: #FF3B30;
    /* Action/CTA (Electric Devil) */
    --color-text: #E4E4E7;
    /* Primary Type (Frosted Mercury) */
    --color-text-dim: #A1A1AA;
    /* Secondary Type */
    --color-glass-stroke: rgba(255, 255, 255, 0.1);
    --color-glass-fill: rgba(255, 255, 255, 0.03);

    /* Typography: Variable Strategy */
    --font-main: 'Inter Tight', 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Typescale - Responsive Base */
    --size-hero: clamp(64px, 10vw, 120px);
    --size-h2: clamp(40px, 6vw, 64px);
    --size-body: 18px;
    --size-tag: 12px;

    /* Spring Physics & Tactility */
    --transition-spring: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);

    /* Layout */
    --radius-bento: 24px;
    --gap-bento: 24px;
}

/* Base Redesign */
body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-main);
    font-size: var(--size-body);
    line-height: 1.6;
    margin: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}



.hero-heading {
    font-size: var(--size-hero);
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 0.9;
    text-transform: uppercase;
}

.section__header {
    font-size: var(--size-h2);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.mono-tag {
    font-family: var(--font-mono);
    font-size: var(--size-tag);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Glassmorphism Classes */
.glass-panel {
    background: var(--color-glass-fill);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--color-glass-stroke);
    border-radius: var(--radius-bento);
}

.bento-grid {
    display: grid;
    gap: var(--gap-bento);
    grid-template-columns: repeat(12, 1fr);
}

/* ============================================
   MODERN DESIGN SYSTEM - CSS CUSTOM PROPERTIES
   ============================================ */

:root {
    /* Color Palette - Blue / Purple Tech Theme */
    --color-primary: #b64fff;
    /* Matching new gradient start */
    --color-primary-gradient: linear-gradient(135deg, #b64fff, #8003fd);
    /* Purple to Deep Violet */
    --color-primary-light: #d49eff;
    --color-primary-dark: #8003fd;

    --color-secondary: #94A3B8;
    /* Slate Gray (Secondary Text) */
    --color-secondary-light: #CBD5E1;

    --color-accent: #3B82F6;
    /* Vivid Tech Blue */

    --color-neutral-50: #0A0A0B;
    /* Deep Matte Black (Primary BG) */
    --color-neutral-100: #121214;
    /* Dark Charcoal (Cards/Sections) */
    --color-neutral-200: #18181B;
    --color-neutral-300: #27272A;
    /* Border / Divider grids */
    --color-neutral-400: #52525B;
    --color-neutral-500: #71717A;
    --color-neutral-600: #94A3B8;
    /* Slate Gray */
    --color-neutral-700: #CBD5E1;
    --color-neutral-800: #E2E8F0;
    --color-neutral-900: #F8F9FA;
    /* Pure White (Headings) */

    --color-white: #F8F9FA;
    --color-black: #0A0A0B;

    /* Theme Variables */
    --color-bg: var(--color-neutral-50);
    /* Deep Matte Black */
    --color-bg-alt: var(--color-neutral-100);
    /* Dark Charcoal */
    --color-text: var(--color-neutral-900);
    /* Pure White */
    --color-text-dim: var(--color-neutral-600);
    /* Slate Gray */
    --color-glass-fill: rgba(18, 18, 20, 0.95);
    --color-glass-stroke: var(--color-neutral-300);
    --color-nebula: rgba(139, 92, 246, 0.15);
    /* Deep Purple subtle glow */

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-main: var(--font-primary);
    --font-mono: 'JetBrains Mono', monospace;

    --font-size-xs: 0.75rem;
    /* 12px */
    --font-size-sm: 0.875rem;
    /* 14px */
    --font-size-base: 1rem;
    /* 16px */
    --font-size-lg: 1.125rem;
    /* 18px */
    --font-size-xl: 1.25rem;
    /* 20px */
    --font-size-2xl: 1.5rem;
    /* 24px */
    --font-size-3xl: 1.875rem;
    /* 30px */
    --font-size-4xl: 2.25rem;
    /* 36px */
    --font-size-5xl: 3rem;
    /* 48px */
    --font-size-6xl: 4.5rem;
    /* 20% increase from 3.75rem */

    /* Typography Variables (Missing previously) */
    --size-body: var(--font-size-base);
    --size-hero: 4.8rem;
    /* 20% increase from 4rem */
    --size-h2: var(--font-size-4xl);

    /* Spacing */
    --space-1: 0.25rem;
    /* 4px */
    --space-2: 0.5rem;
    /* 8px */
    --space-3: 0.75rem;
    /* 12px */
    --space-4: 1rem;
    /* 16px */
    --space-5: 1.25rem;
    /* 20px */
    --space-6: 1.5rem;
    /* 24px */
    --space-8: 2rem;
    /* 32px */
    --space-10: 2.5rem;
    /* 40px */
    --space-12: 3rem;
    /* 48px */
    --space-16: 4rem;
    /* 64px */
    --space-20: 5rem;
    /* 80px */
    --space-24: 6rem;
    /* 96px */

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-base: 250ms ease-in-out;
    --transition-slow: 350ms ease-in-out;

    /* Z-index */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal: 1040;
    --z-tooltip: 1050;
}

/* ============================================
   CSS RESET & BASE STYLES
   ============================================ */

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

html {
    font-size: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-main);
    font-size: var(--size-body);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    overflow-x: hidden;
}



h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    /* Extra Bold */
    line-height: 1.1;
    color: var(--color-text);
    margin-bottom: var(--space-4);
    letter-spacing: -0.02em;
    /* Tight tracking as requested */
}

h1 {
    font-size: var(--size-hero);
}

h2 {
    font-size: var(--size-h2);
}

h3 {
    font-size: 2rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1.1rem;
}

p {
    margin-bottom: var(--space-4);
    line-height: 1.7;
}

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

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

ul,
ol {
    list-style: none;
}

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}



input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.section {
    padding: var(--space-20) 0;
}

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

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

.text-right {
    text-align: right;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    background: rgba(10, 10, 11, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-glass-stroke);
    z-index: 1000;
    transition: var(--transition-base);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: -0.05em;
    font-family: var(--font-mono);
}

.brand-icon {
    width: 40px;
    height: auto;
}

/* Navigation */
nav ul {
    display: flex;
    gap: 12px;
    align-items: center;
}

nav ul li a {
    font-weight: 600;
    font-size: 14px;
    color: var(--color-text-dim);
    padding: 10px 20px;
    border-radius: var(--radius-md);
    transition: var(--transition-base);
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--color-text);
    background: var(--color-neutral-100);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: var(--space-2);
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--color-primary);
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

/* ============================================
   HERO SECTION
   ============================================ */

#hero {
    min-height: 100vh;
    /* Full viewport height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: 120px;
    padding-bottom: 80px;
    background: var(--color-bg);
}

.spline-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

spline-viewer {
    width: 100%;
    height: 100%;
}

.hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    /* Center aligned text */
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--space-6);
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Center aligned items */
}

.reveal-mask-container {
    overflow: hidden;
    margin-bottom: 24px;
}

.reveal-text {
    /* Kept class for HTML structure, but removed GSAP animation baseline styles */
    color: var(--color-text);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--color-text-dim);
    margin-bottom: 40px;
    font-family: var(--font-mono);
}

.avatar-initials {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-4xl);
    font-weight: 700;
    color: var(--color-white);
    margin: 0 auto var(--space-6);
    box-shadow: var(--shadow-xl);
}

.hero__content h1 {
    color: var(--color-text);
    font-size: 4.5rem;
    /* Reverted to 4.5rem/var(--font-size-6xl) from 5.4rem */
    margin-bottom: var(--space-4);
    line-height: 1.1;
    text-transform: none;
    /* Changed from uppercase in global h1 to none */
}

/* Gradient Text Utility */
.text-gradient-primary {
    background: var(--color-primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.hero-subtitle {
    font-size: var(--font-size-xl);
    color: var(--color-text-dim);
    margin-bottom: var(--space-8);
    font-weight: 400;
    max-width: 800px;
}

.hero__description {
    font-size: var(--font-size-lg);
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: var(--space-8);
    line-height: 1.8;
}

.cta-buttons {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    /* Center buttons horizontally */
    flex-wrap: nowrap;
}

.btn {
    padding: var(--space-4) var(--space-8);
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: var(--font-size-base);
    transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.2s ease;
    display: inline-block;
    text-align: center;
    position: relative;
    user-select: none;
}

.btn--primary {
    background: var(--color-primary-gradient);
    color: var(--color-white);
    box-shadow: 0 6px 0 var(--color-primary-dark), 0 10px 20px rgba(124, 45, 255, 0.3);
    border: 2px solid transparent;
    /* Match secondary's size */
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 0 var(--color-primary-dark), 0 12px 24px rgba(124, 45, 255, 0.4);
    background: linear-gradient(135deg, #c77bff, #9527ff);
}

.btn--primary:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 var(--color-primary-dark), 0 4px 8px rgba(124, 45, 255, 0.2);
}

.btn--secondary {
    background: var(--color-neutral-100);
    color: var(--color-white);
    /* Explicit white for WCAG AA (17.75:1 on #121214) */
    border: 2px solid var(--color-glass-stroke);
    box-shadow: 0 4px 0 var(--color-neutral-300);
}

.btn--secondary:hover {
    background: var(--color-neutral-200);
    border-color: var(--color-neutral-400);
    transform: translateY(-2px);
    box-shadow: 0 6px 0 var(--color-neutral-300);
}

.btn--secondary:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 var(--color-neutral-300);
}

/* ============================================
   ABOUT SECTION
   ============================================ */

#career {
    background: var(--color-bg);
}

.section__title {
    text-align: center;
    margin-bottom: var(--space-12);
}

.section__title h2 {
    font-size: var(--font-size-4xl);
    color: var(--color-text);
    margin-bottom: var(--space-3);
}

.section__title p {
    font-size: var(--font-size-lg);
    color: var(--color-neutral-600);
    max-width: 600px;
    margin: 0 auto;
}

.about__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    align-items: start;
}

.about__description {
    font-size: var(--font-size-lg);
    line-height: 1.8;
    color: var(--color-neutral-700);
}

.about__description p {
    margin-bottom: var(--space-6);
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: minmax(140px, auto);
    gap: 24px;
    margin-top: 48px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.bento-grid-2 {
    grid-template-columns: repeat(2, 1fr);
    max-width: 900px;
}

.bento-grid-3 {
    grid-template-columns: repeat(3, 1fr);
    max-width: 1200px;
}

.bento-grid-4 {
    grid-template-columns: repeat(4, 1fr);
    max-width: 1200px;
}

.bento-item {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(182, 79, 255, 0.2);
    border-radius: var(--radius-xl);
    padding: 32px;
    transition: var(--transition-base);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.bento-item:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.bento-item h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: var(--color-text);
}

.bento-item p {
    font-size: 0.95rem;
    color: var(--color-text-dim);
    margin: 0;
}

.profile-card,
.stats,
.experience-card {
    display: none;
    /* Removing previously complex bento structures to keep generic */
}

.timeline-mini {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.tm-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--color-glass-stroke);
}

.tm-item span {
    color: var(--color-accent);
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.micro-tag {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(139, 92, 246, 0.1);
    /* Subtle purple bg */
    color: var(--color-primary-light);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    font-family: var(--font-mono);
}

/* Animated Grid Background */
.bg-grid-animated {
    position: relative;
}

.bg-grid-animated>* {
    position: relative;
    z-index: 1;
}

.bg-grid-animated::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: 40px 40px;
    background-image:
        linear-gradient(to right, rgba(39, 39, 42, 0.2) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(39, 39, 42, 0.2) 1px, transparent 1px);
    z-index: 0;
    pointer-events: none;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 100%);
    /* Animation gives a subtle parallax movement illusion */
    animation: grid-scroll 20s linear infinite;
}

@keyframes grid-scroll {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(40px);
    }
}

@media (max-width: 1024px) {
    .bento-grid {
        gap: 16px;
    }

    .bento-grid-3,
    .bento-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {

    .bento-grid,
    .bento-grid-3,
    .bento-grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Experience Timeline */
.experience-timeline {
    margin-top: var(--space-12);
}

.timeline-item {
    padding: var(--space-6);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-6);
    transition: all var(--transition-base);
}

.timeline-item:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-lg);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
    gap: var(--space-2);
}

.timeline-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--space-1);
}

.timeline-company {
    font-size: var(--font-size-lg);
    color: var(--color-neutral-700);
    font-weight: 600;
}

.timeline-date {
    font-size: var(--font-size-sm);
    color: var(--color-neutral-500);
    font-weight: 500;
}

.timeline-description {
    color: var(--color-neutral-700);
    line-height: 1.7;
}

.timeline-description ul {
    list-style: none;
    margin-top: var(--space-3);
}

.timeline-description ul li {
    padding: var(--space-2) 0;
    padding-left: var(--space-5);
    position: relative;
}

.timeline-description ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-weight: bold;
}

/* ============================================
   PORTFOLIO SECTION
   ============================================ */

#portfolio {
    position: relative;
    z-index: 1;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-8);
}

.portfolio__card {
    background: var(--color-bg-alt);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    border: 1px solid var(--color-glass-stroke);
}

.portfolio__card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
}

.portfolio-image {
    width: 100%;
    height: 200px;
    background: var(--color-neutral-900);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: filter 0.4s ease;
}

.portfolio-hover-effect .portfolio-image {
    filter: grayscale(0%);
}

.portfolio-hover-effect:hover .portfolio-image {
    filter: grayscale(100%);
}

.hover-overlay {
    position: absolute;
    bottom: -50px;
    /* Initially hidden below */
    left: 0;
    width: 100%;
    padding: var(--space-4);
    display: flex;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(to top, rgba(10, 10, 11, 0.9) 0%, transparent 100%);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
}

.portfolio-hover-effect:hover .hover-overlay {
    bottom: 0;
    opacity: 1;
}

.portfolio-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="dots" width="60" height="60" patternUnits="userSpaceOnUse"><circle cx="30" cy="30" r="2" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100%" height="100%" fill="url(%23dots)"/></svg>');
    inset: 0;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.5);
    z-index: 1;
    pointer-events: none;
}

/* Portfolio Mockup Images */
.portfolio-mockup {
    position: absolute;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-xl);
    transition: transform var(--transition-base);
    z-index: 2;
    object-fit: cover;
    /* Maintain consistent filling */
    object-position: top;
    /* Prioritize the top of the website screenshots */
}

.portfolio-hover-effect:hover .portfolio-mockup {
    transform: translateY(-5px) scale(1.02);
}

.mockup-desktop {
    width: 260px;
    /* Fixed pixel width for exact uniform sizing */
    height: 160px;
    /* Fixed pixel height for exact uniform sizing */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -40%);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.portfolio-hover-effect:hover .mockup-desktop {
    transform: translate(-50%, -45%) scale(1.02);
}

.mockup-mobile {
    width: 25%;
    aspect-ratio: 9 / 19;
    /* Fixed aspect ratio for consistent mobile look */
    bottom: -10%;
    right: 5%;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: -10px 10px 20px rgba(0, 0, 0, 0.4);
    z-index: 3;
}

.portfolio-hover-effect:hover .mockup-mobile {
    transform: translateY(-8px) scale(1.05);
}

.portfolio-icon {
    font-size: var(--font-size-5xl);
    color: rgba(255, 255, 255, 0.9);
    z-index: 1;
}

.portfolio-content {
    padding: var(--space-6);
}

.portfolio-content h3 {
    font-size: var(--font-size-2xl);
    color: var(--color-white);
    margin-bottom: var(--space-3);
}

.portfolio-content p {
    color: var(--color-text-dim);
    line-height: 1.7;
    margin-bottom: var(--space-5);
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-5);
}

.portfolio__tag {
    padding: var(--space-1) var(--space-3);
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-dim);
    border: 1px solid var(--color-glass-stroke);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
}

.portfolio-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--color-primary);
    font-weight: 600;
    transition: all var(--transition-base);
}

.portfolio-link:hover {
    gap: var(--space-3);
}

/* ============================================
   CONTACT SECTION
   ============================================ */

#contact {
    color: var(--color-white);
}

#contact .section__title h2,
#contact .section__title p {
    color: var(--color-white);
}

.contact-container {
    max-width: 700px;
    margin: 0 auto;
}

.contact-form {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: var(--space-10);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-2xl);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.form-group {
    margin-bottom: var(--space-6);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 600;
    color: var(--color-white);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: var(--space-4);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    font-size: var(--font-size-base);
    transition: all var(--transition-base);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    background: rgba(255, 255, 255, 0.15);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.btn-submit {
    width: 100%;
    padding: var(--space-5);
    background: var(--color-accent);
    color: var(--color-white);
    border: none;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-lg);
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-lg);
}

.btn-submit:hover {
    background: var(--color-accent-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

/* ============================================
   FOOTER
   ============================================ */

footer {
    background: var(--color-bg);
    border-top: 1px solid var(--color-glass-stroke);
    padding: 80px 0 40px;
}

.footer__content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

.social-link {
    width: 50px;
    height: 50px;
    background: var(--color-neutral-800);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-neutral-400);
    transition: all var(--transition-base);
    font-size: var(--font-size-xl);
}

.social-link:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-4px);
}

.footer-text {
    font-size: var(--font-size-sm);
    color: var(--color-neutral-500);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
    :root {
        --font-size-6xl: 3rem;
        --font-size-5xl: 2.5rem;
        --font-size-4xl: 2rem;
    }

    .about__content {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .tools__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --font-size-6xl: 2.5rem;
        --font-size-5xl: 2rem;
        --font-size-4xl: 1.75rem;
        --font-size-3xl: 1.5rem;
    }

    .header-content {
        padding: var(--space-4);
    }

    #hero {
        padding-top: 150px;
    }

    .cta-buttons {
        padding: 0 20px;
    }

    nav ul {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: var(--color-bg-alt);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 100px var(--space-6) var(--space-6);
        transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 999;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }

    nav ul.active {
        right: 0;
    }

    nav ul li {
        width: 100%;
    }

    nav ul li a {
        display: block;
        padding: var(--space-4) 0;
        font-size: var(--font-size-lg);
        border-bottom: 1px solid var(--color-glass-stroke);
    }

    nav ul li a:hover {
        background: transparent;
        color: var(--color-primary);
    }

    .mobile-menu-toggle {
        display: flex;
        z-index: 1000;
        position: relative;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

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

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero__content h1 {
        font-size: calc(var(--font-size-4xl) * 1.2);
        /* 20% increase from var(--font-size-4xl) */
    }

    .hero-subtitle {
        font-size: var(--font-size-xl);
    }

    .cta-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

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

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

    .tools__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .contact-form {
        padding: var(--space-6);
    }

    .timeline-header {
        flex-direction: column;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-4);
    }

    .section {
        padding: var(--space-12) 0;
    }

    .avatar-initials {
        width: 90px;
        height: 90px;
        font-size: var(--font-size-3xl);
    }

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

/* ============================================
   ANIMATIONS
   ============================================ */

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

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

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

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

/* Scroll animations */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   SCROLLYTELLING: ABOUT PAGE
   ============================================ */
/* Removed empty .about-page class */

.scrollytelling-container {
    overflow-x: hidden;
}

.horizontal-scroll {
    width: 400%;
    /* 4 slides */
    height: 100vh;
    display: flex;
    flex-wrap: nowrap;
}

.pin-wrap {
    height: 100vh;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 0 10vw;
}

.timeline-slide {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 10%;
    flex-shrink: 0;
}

.timeline-slide .content {
    max-width: 600px;
}

.timeline-slide .year {
    font-size: 8rem;
    font-weight: 800;
    line-height: 1;
    color: rgba(255, 255, 255, 0.05);
    font-family: var(--font-mono);
    display: block;
    margin-bottom: -40px;
}

.timeline-slide h2 {
    font-size: 4rem;
    color: var(--color-accent);
    margin-bottom: 24px;
    letter-spacing: -0.05em;
}

.timeline-slide p {
    font-size: 1.25rem;
    color: var(--color-text-dim);
}

/* ============================================
   PORTFOLIO SHOWCASE: INFINITE GALLERY
   ============================================ */
.portfolio-showcase-container {
    padding-top: 120px;
    background: var(--color-bg);
    min-height: 100vh;
}

.showcase-header {
    text-align: center;
    margin-bottom: 80px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    padding: 0 5vw;
    perspective: 2000px;
}

.gallery-item {
    background: var(--color-nebula);
    border: 1px solid var(--color-glass-stroke);
    border-radius: 40px;
    aspect-ratio: 4/5;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    transition: var(--transition-spring);
}

.item-visual {
    font-size: 5rem;
    filter: drop-shadow(0 0 30px rgba(255, 59, 48, 0.4));
    transition: var(--transition-smooth);
}

.item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(10, 10, 11, 0.9) 0%, transparent 60%);
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 0;
    transition: var(--transition-smooth);
}

.gallery-item:hover .item-overlay {
    opacity: 1;
}

.gallery-item:hover .item-visual {
    transform: scale(1.2) translateY(-20px);
}

@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   PLATFORMS & TOOLS SECTION
   ============================================ */

.tools__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-6);
    margin-top: var(--space-8);
}

.tools__card {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-glass-stroke);
    border-radius: var(--radius-lg);
    padding: var(--space-6) var(--space-4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all var(--transition-base);
}

.tools__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 0 20px rgba(139, 92, 246, 0.15);
    /* shadow-lg + glow */
    border-color: rgba(139, 92, 246, 0.5);
    /* Primary glow border */
    background: linear-gradient(to bottom, var(--color-bg-alt), rgba(139, 92, 246, 0.05));
    cursor: default;
}

.tools__icon {
    width: 52px;
    height: 52px;
    margin-bottom: var(--space-4);
    filter: brightness(0) invert(1) opacity(0.9);
    transition: all var(--transition-base);
    object-fit: contain;
}

.tools__icon--large {
    width: 80px;
    height: 80px;
}

.tools__card:hover .tools__icon {
    filter: brightness(0) invert(1) opacity(1) drop-shadow(0 0 10px rgba(139, 92, 246, 0.8));
    transform: scale(1.1);
}

.tools__card:hover .tools__icon--large {
    transform: scale(1.05);
}

.tools__name {
    letter-spacing: 0.05em;
}

/* ============================================
   CODING LANGUAGES CAROUSEL
   ============================================ */

#coding-carousel.carousel {
    width: 100% !important;
    padding: 3rem 0 !important;
    overflow: hidden !important;
    position: relative !important;
    background: transparent !important;
    border: none !important;
    margin-bottom: var(--space-12) !important;
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    transition: background 0.4s ease;
}

#coding-carousel .carousel__track {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    width: max-content !important;
    /* Removed gap and padding-left to ensure perfectly symmetrical total width */
    animation: simple-scroll 120s linear infinite !important;
}

#coding-carousel .carousel__item {
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-right: 100px !important;
    /* Using margin instead of gap for perfect calculation */
}

#coding-carousel .carousel__item img {
    height: 44px !important;
    width: auto !important;
    filter: brightness(0) invert(1) opacity(0.5);
    transition: all var(--transition-base);
}

#coding-carousel .carousel__item:hover img {
    filter: brightness(0) invert(1) opacity(1);
    transform: scale(1.1);
}

@keyframes simple-scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

#coding-carousel .carousel__track:hover {
    animation-play-state: paused !important;
}

.tools__card:hover .tools__name {
    color: var(--color-white);
}

@media (max-width: 640px) {
    .tools__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4);
    }
}

/* ============================================
   INDEX.PHP — EXTRACTED UTILITY CLASSES
   (Replaces all inline styles on index.php)
   ============================================ */

/* Typography helpers */
.nowrap {
    white-space: nowrap;
}

.btn--mono {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn--lg {
    font-size: 1.25rem;
    padding: 16px 40px;
}

/* Hero */
.hero-heading {
    font-size: var(--font-size-6xl);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--color-text);
}

.hero-subtitle {
    font-size: var(--font-size-xl);
    color: var(--color-text-dim);
    margin-bottom: 40px;
    font-weight: 400;
    max-width: 800px;
}

/* Skill cards (About section) */
.skill-card {
    background: var(--color-bg-alt);
}

.skill-card__label {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--color-primary);
    margin-bottom: 16px;
    text-transform: uppercase;
}

.skill-card__title {
    color: var(--color-white);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.skill-card__body {
    color: var(--color-text-dim);
}

/* Section headings */
.section-heading {
    font-size: var(--font-size-3xl);
    color: var(--color-text);
    margin-bottom: 16px;
}

.section-subheading {
    font-size: var(--font-size-lg);
    color: var(--color-text-dim);
    max-width: 600px;
    margin: 0 auto 32px auto;
}

/* Section modifiers */
.section--alt-bg {
    border-top: 1px solid var(--color-glass-stroke);
    border-bottom: 1px solid var(--color-glass-stroke);
}

.section--bordered {
    border-top: 1px solid var(--color-glass-stroke);
    border-bottom: 1px solid var(--color-glass-stroke);
}

.cta {
    padding: 120px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(182, 79, 255, 0.15) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.cta .container {
    position: relative;
    z-index: 1;
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 80px 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .cta .container,
[data-theme="light"] .gallery__ticker-container {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.section--mt-3 {
    margin-top: 48px;
}

/* Portfolio grid */
.portfolio-grid--spaced {
    margin-top: 48px;
}

/* Portfolio image default height */
.portfolio-image {
    height: 220px;
    background: var(--color-primary-gradient);
}

/* CTA section heading */
.cta__title {
    font-size: var(--font-size-5xl);
    margin-bottom: 16px;
    background: linear-gradient(to right, #fff, var(--text-muted));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

[data-theme="light"] .cta__title {
    background: linear-gradient(to right, #111827, #6b7280);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cta__subtitle {
    font-size: var(--font-size-xl);
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

:root {
    --primary: #b64fff;
    --secondary: #8003fd;
    --accent: #fbbf24;
    --cyan: #67e8f9;
    --purple: #b176ff;
    /* Brightened from #8003fd for WCAG AA contrast (4.81:1 on #1e293b) */
    --green: #86efac;
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --bg-card: #1e293b;
    --bg-hover: #334155;
    --border: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --gradient-1: linear-gradient(135deg, #b64fff 0%, #8003fd 100%);
    --gradient-2: linear-gradient(135deg, #8003fd 0%, #b64fff 50%, #fbbf24 100%);
    --gradient-3: linear-gradient(135deg, #86efac 0%, #67e8f9 100%);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 30px rgba(182, 79, 255, 0.3);
    --btn-secondary-shadow: -4px 6px 0 rgba(80, 0, 160, 0.8), -12px 12px 30px rgba(182, 79, 255, 0.5), inset 0 0 10px rgba(182, 79, 255, 0.1);
    --btn-secondary-shadow-hover: -2px 3px 0 rgba(80, 0, 160, 0.9), -8px 8px 25px rgba(182, 79, 255, 0.6);
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --font-primary: 'Tajawal', sans-serif;
    --font-code: 'Fira Code', monospace;
    --bg-gradient-end: #080808;
    /* Dark mode gradient end stop */
    --footer-bg: #080808;
    --footer-border: rgba(182, 79, 255, 0.2);
}

[data-theme="light"] {
    --bg-dark: #ffffff;
    --bg-darker: #f4f4f6;
    --bg-card: #ffffff;
    --bg-hover: #f0f0f4;
    --border: #e0e0e8;
    --text-primary: #111827;
    --text-secondary: #374151;
    --text-muted: #6b7280;

    /* Colour palette overrides for light mode */
    --color-bg: #ffffff;
    --color-bg-alt: #f4f4f6;
    --color-text: #111827;
    --color-text-dim: #6b7280;
    --color-neutral-300: #e5e7eb;
    /* Light grey shadow for button */
    --color-neutral-400: #d1d5db;
    /* For hover borders */
    --color-glass-fill: rgba(255, 255, 255, 0.92);
    --color-glass-stroke: rgba(0, 0, 0, 0.08);
    --bg-gradient-end: #e8e8f0;
    /* Light mode gradient end stop */
    --footer-bg: #f8f9fa;
    --footer-border: rgba(0, 0, 0, 0.08);
    --btn-secondary-shadow: 0 6px 0 rgba(182, 79, 255, 0.5), 0 10px 20px rgba(182, 79, 255, 0.4);
    --btn-secondary-shadow-hover: 0 8px 0 rgba(182, 79, 255, 0.6), 0 12px 24px rgba(182, 79, 255, 0.5);
}

/* Light Mode Card Overrides */
[data-theme="light"] .skills__category,
[data-theme="light"] .portfolio__card {
    background: #f0f0f2 !important;
}

[data-theme="light"] .review {
    background: #f0f0f2 !important;
}

/* Portfolio Card visibility fixes for Light Mode */
[data-theme="light"] .portfolio__card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
}

[data-theme="light"] .portfolio__description {
    color: var(--text-secondary) !important;
}

[data-theme="light"] .portfolio__meta strong {
    color: #111827 !important;
}

[data-theme="light"] .portfolio__meta p {
    color: #4b5563 !important;
}

[data-theme="light"] .portfolio__tag {
    background: #f3f4f6 !important;
    border-color: #e5e7eb !important;
    color: #374151 !important;
}

[data-theme="light"] .portfolio__like-btn {
    color: #4b5563 !important;
}

[data-theme="light"] .portfolio__like-btn i {
    color: #9ca3af !important;
}

/* Global strong tag and tab visibility fixes for Light Mode */
[data-theme="light"] .portfolio__meta strong,
[data-theme="light"] .tabs__pane strong {
    color: #111827 !important;
}

[data-theme="light"] .tabs__btn {
    color: #4b5563 !important;
    background: #f3f4f6 !important;
}

[data-theme="light"] .tabs__btn.active {
    color: #ffffff !important;
    background: var(--gradient-1) !important;
}

/* Skill Section text color fix for Light Mode */
[data-theme="light"] .skills__item-name,
[data-theme="light"] .skills__marker-label {
    color: var(--text-secondary) !important;
}

[data-theme="light"] .skills__item-percent {
    color: #b64fff !important;
    font-weight: 700 !important;
}

[data-theme="light"] .skills__category-title {
    background: linear-gradient(135deg, #b64fff 0%, #7c3aed 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
}

/* Platform Card Overrides for Light Mode - Grey-white background as requested */
[data-theme="light"] .tools__card {
    background: #f0f0f2 !important; /* White with a hint of grey */
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .tools__name {
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important; /* Essential for white text on ivory */
}

[data-theme="light"] .tools__icon {
    filter: brightness(0) invert(1) opacity(1) drop-shadow(0 0 3px rgba(0, 0, 0, 0.4)) !important;
}

[data-theme="light"] .tools__card:hover .tools__icon {
    filter: brightness(0) invert(1) opacity(1) drop-shadow(0 0 10px rgba(139, 92, 246, 0.8)) !important;
}

/* Coding Carousel visibility fix for light mode */
[data-theme="light"] #coding-carousel .carousel__item img {
    filter: brightness(0) opacity(0.6) !important;
}

[data-theme="light"] #coding-carousel .carousel__item:hover img {
    filter: brightness(0) opacity(1) !important;
}

/* Light mode body — white to very light grey gradient */
[data-theme="light"] body {
    background: linear-gradient(160deg, #ffffff 0%, #f4f4f7 55%, #e8e8f0 100%) !important;
    background-attachment: fixed !important;
    color: var(--text-primary);
}

[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

[dir="ltr"] {
    direction: ltr;
    text-align: left;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    --tw-ring-color: #ffffff;
}

html {
    /* scroll-behavior: smooth; REMOVED: CONFLICTS WITH LENIS SMOOTH SCROLL */
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    font-weight: 500;
    background: linear-gradient(to bottom, var(--bg-dark) 0%, var(--bg-gradient-end) 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    transition: background var(--transition-fast), color var(--transition-fast);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
}

.hero__name,
.section__title,
.timeline-title,
.portfolio__title,
.skills__category-title {
    font-weight: 800;
}

* {
    -webkit-tap-highlight-color: transparent;
}

img {
    max-width: 100%;
    height: auto;
}

.loader-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-darker);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s, visibility 0.5s;
}

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

.loader-content {
    text-align: center;
}

.loader-code-text {
    font-family: var(--font-code);
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 2rem;
}

.code-line {
    display: block;
    margin: 0.5rem 0;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

.code-line[data-line="1"] {
    animation-delay: 0.1s;
}

.code-line[data-line="2"] {
    animation-delay: 0.3s;
}

.code-line[data-line="3"] {
    animation-delay: 0.5s;
}

.code-line[data-line="4"] {
    animation-delay: 0.7s;
}

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

.loader-spinner-wrapper {
    margin: 2rem 0;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-right-color: var(--cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

.loader-progress-wrapper {
    width: 200px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 2rem auto;
    overflow: hidden;
}

.loader-progress-bar {
    height: 100%;
    background: var(--gradient-1);
    width: 0%;
    animation: progress 2s ease forwards;
    box-shadow: 0 0 10px var(--primary);
}

@keyframes progress {
    to {
        width: 100%;
    }
}

.loader-percentage {
    font-family: var(--font-code);
    color: var(--primary);
    font-size: 1rem;
    margin-top: 1rem;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 14, 39, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: all var(--transition);
}

.header.scrolled {
    background: rgba(10, 14, 39, 0.95);
    box-shadow: var(--shadow-md);
}

/* Light mode nav overrides */
[data-theme="light"] .header {
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .header.scrolled {
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .header__link {
    color: #374151;
}

[data-theme="light"] .header__link:hover,
[data-theme="light"] .header__link.active {
    color: var(--primary);
    background: rgba(182, 79, 255, 0.06);
}

[data-theme="light"] .header__theme-toggle,
[data-theme="light"] .header__menu-toggle {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: #374151;
}

[data-theme="light"] .header__menu-toggle span {
    background: #1f2937;
}

.header__container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header__brand {
    display: flex;
    align-items: center;
}

.header__logo {
    font-family: var(--font-code);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.header__logo-img {
    height: 48px;
    width: auto;
}

.header__logo-bracket {
    color: var(--purple);
}

.header__logo-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: lowercase;
}

.header__menu {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.header__menu-close {
    display: none;
}

.header__cta {
    font-family: var(--font-code);
    text-transform: lowercase;
}

.header__link {
    display: inline-flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 700;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: all var(--transition-fast);
    position: relative;
    white-space: nowrap;
    font-size: 0.85rem;
}

.header__link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width var(--transition);
}

.header__link:hover,
.header__link.active {
    color: var(--primary);
}

.header__link.active::before {
    width: 80%;
}

.header__link i {
    font-size: 1.2rem;
    margin-right: 0;
}

.header__icon {
    width: 1.2rem;
    height: 1.2rem;
    flex-shrink: 0;
}

.header__controls {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.header__lang-toggle,
.header__theme-toggle,
.header__menu-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.header__lang-toggle:hover,
.header__theme-toggle:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    color: var(--primary);
}

/* Theme Toggle as a Switch */
.header__theme-switch {
    display: flex;
    align-items: center;
}

.header__theme-toggle {
    width: 60px;
    height: 32px;
    border-radius: 30px;
    background: #1e293b;
    border: 1px solid var(--border);
    position: relative;
    padding: 0 !important;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.header__theme-toggle:hover {
    transform: scale(1.05);
}

.header__theme-toggle:active {
    transform: scale(0.95);
}

.header__theme-toggle::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

#header__theme-icon {
    color: var(--text-primary);
    transition: all 0.3s ease;
}

[data-theme="light"] #header__theme-icon {
    color: var(--primary);
    /* Sun color changed to purple */
}

[data-theme="dark"] #header__theme-icon {
    color: #f1f5f9;
    /* Moon color */
}

[data-theme="light"] .header__theme-toggle {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

[data-theme="light"] .header__theme-toggle::after {
    left: calc(100% - 28px);
    background: var(--primary);
}


.header__menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 0.6rem;
}

.header__menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition);
}

.header__menu-toggle.active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.header__menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.header__menu-toggle.active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

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

.desktop-only {
    display: flex !important;
}

.main-content {
    margin-top: 80px;
}

.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 0;
}

.hero__background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero__code-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(var(--primary) 1px, transparent 1px),
        linear-gradient(90deg, var(--primary) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.05;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.hero__particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero__particle {
    position: absolute;
    font-family: var(--font-code);
    font-size: 1.5rem;
    color: var(--primary);
    opacity: 0.1;
    animation: float 15s infinite ease-in-out;
}

@keyframes float {
    0%, 100% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10%, 90% { opacity: 0.1; }
    50% {
        transform: translateY(-100px) rotate(180deg);
        opacity: 0.2;
    }
}

.hero__container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    height: 100%;
    z-index: 1;
}

.hero__content {
    z-index: 1;
    text-align: left;
    will-change: transform, opacity;
}

.hero__greeting {
    font-family: var(--font-code);
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero__greeting-cursor {
    animation: blink 1s infinite;
    color: var(--primary);
}

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

.hero__name {
    font-family: var(--font-code);
    font-size: 5.4rem;
    /* 20% increase from 4.5rem */
    font-weight: 700;
    margin-bottom: 2rem;
    line-height: 1.2;
}

.hero__name-prefix {
    color: var(--purple);
}

.hero__name-operator {
    color: var(--purple);
    margin: 0 0.5rem;
}

.hero__name-value {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__name-suffix {
    color: var(--primary);
}

.hero__subtitle {
    font-family: var(--font-code);
    font-size: 1.5rem;
    color: var(--cyan);
    margin-bottom: 2rem;
}

.hero__subtitle-prefix {
    color: var(--text-muted);
    margin-inline-end: 0.5rem;
}

.hero__description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.8;
    max-width: 800px;
}

.hero__actions {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
}

.btn--primary {
    background: var(--gradient-1);
    color: white;
    padding: 1.1rem 2.2rem;
    border: 2px solid transparent;
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(192, 132, 252, 0.3);
}

.btn--secondary {
    background: rgba(182, 79, 255, 0.05);
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: var(--btn-secondary-shadow);
    padding: 1.1rem 2.2rem;
    transition: all 0.3s ease;
}

.btn--secondary:hover {
    background: var(--primary);
    color: white;
    transform: translate(2px, -3px);
    box-shadow: var(--btn-secondary-shadow-hover);
}

.btn__icon {
    width: 1.2rem;
    height: 1.2rem;
    flex-shrink: 0;
}

.btn--sm {
    padding: 0.6rem 1.25rem;
    font-size: 0.85rem;
    border-radius: 8px;
}

.footer__social {
    display: flex;
    gap: 2rem;
}

.footer__social-link {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition);
}

.footer__social-link {
    transition: all var(--transition-fast);
}

.footer__social-link:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(192, 132, 252, 0.2);
}

.hero__visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero__frame-container {
    position: relative;
    width: 400px;
    height: 400px;
}

.hero__frame-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(182, 79, 255, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.8;
    }
}

.hero__frame {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid var(--primary);
    box-shadow:
        0 0 30px rgba(182, 79, 255, 0.3),
        0 0 60px rgba(182, 79, 255, 0.1);
    overflow: hidden;
    background: var(--bg-card);
}

.hero__profile {
    width: 100%;
    height: 100%;
    position: relative;
    background: var(--bg-card);
}

/* Hero image swap system */
.hero__swap-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.1s, filter 0.1s;
}

.hero__logo.hero__swap-img {
    width: 234px;
    height: auto;
    z-index: 2;
}

.hero__logo--floating {
    animation: logoFloat 4s ease-in-out infinite;
}

@keyframes logoFloat {

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

    50% {
        transform: translate(-50%, -50%) translateY(-15px);
    }
}

.hero__profile-pic.hero__swap-img {
    width: 115%;
    height: 115%;
    object-fit: contain;
    object-position: center 55%;
    filter: grayscale(100%);
    z-index: 1;
    /* Offset the oversize back to centre */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -45%);
}

.hero__img--hidden {
    display: none !important;
    pointer-events: none;
}





.profile-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero__logo {
    filter: drop-shadow(0 0 20px rgba(182, 79, 255, 0.4));
    opacity: 0.8;
}

.hero__badge {
    position: absolute;
    top: 50%;
    left: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-primary);
    font-weight: 600;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-smooth);
    z-index: 10;
    white-space: nowrap;
}

.hero__badge {
    transition: all var(--transition-smooth);
}

.hero__badge:hover {
    transform: translateY(-3px) scale(1.03);
    border-color: var(--primary);
    box-shadow: 0 5px 20px rgba(192, 132, 252, 0.25);
}

.hero__badge i {
    font-size: 1.4rem;
    color: var(--primary);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero__badge-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.hero__badge-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.badge-libs {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1.4;
}

.hero__badge--1 {
    --radius: 260px;
    --duration: 25s;
    animation: orbit-1 var(--duration) linear infinite;
}

.hero__badge--2 {
    --radius: 300px;
    --duration: 30s;
    animation: orbit-2 var(--duration) linear infinite;
}

.hero__badge--3 {
    --radius: 280px;
    --duration: 28s;
    animation: orbit-3 var(--duration) linear infinite;
}

.hero__badge--4 {
    --radius: 270px;
    --duration: 27s;
    animation: orbit-4 var(--duration) linear infinite;
}

@keyframes orbit-1 {
    from {
        transform: translate(-50%, -50%) rotate(0deg) translateX(var(--radius)) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg) translateX(var(--radius)) rotate(-360deg);
    }
}

@keyframes orbit-2 {
    from {
        transform: translate(-50%, -50%) rotate(120deg) translateX(var(--radius)) rotate(-120deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(480deg) translateX(var(--radius)) rotate(-480deg);
    }
}

@keyframes orbit-3 {
    from {
        transform: translate(-50%, -50%) rotate(240deg) translateX(var(--radius)) rotate(-240deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(600deg) translateX(var(--radius)) rotate(-600deg);
    }
}

@keyframes orbit-4 {
    from {
        transform: translate(-50%, -50%) rotate(60deg) translateX(var(--radius)) rotate(-60deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(420deg) translateX(var(--radius)) rotate(-420deg);
    }
}

@keyframes floatBadge {

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

    50% {
        transform: translateY(-20px);
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.scroll-mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--border);
    border-radius: 15px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.scroll-wheel {
    width: 4px;
    height: 10px;
    background: var(--primary);
    border-radius: 2px;
    animation: scrollWheel 2s infinite;
}

@keyframes scrollWheel {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateY(20px);
        opacity: 0;
    }
}

.section {
    padding: 8rem 0;
    position: relative;
    scroll-margin-top: 80px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section__header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 4rem;
}

.section__icon {
    font-size: 2rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-number {
    display: none;
    /* Replaced by section__icon */
}

.section__title {
    font-family: var(--font-code);
    font-size: 2.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0;
    /* Align with line */
}

.section__bracket {
    color: var(--purple);
}

.hero__subtitle-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section__line {
    flex: 1;
    height: 2px;
    background: var(--gradient-1);
    margin-inline-start: 2rem;
}

.about__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: stretch;
}

.about__description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 3rem;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.stats__item {
    text-align: center;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all var(--transition);
}

.stats__item {
    transition: all var(--transition-fast);
}

.stats__item:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.stats__number {
    font-family: var(--font-code);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stats__label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.about-image-container {
    position: relative;
    height: 100%;
}

.code-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 3rem;
    font-family: var(--font-code);
    font-size: 0.9rem;
    line-height: 1.8;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.code-line {
    margin: 0.5rem 0;
}

.code-line.indent {
    padding-inline-start: 2rem;
}

.code-keyword {
    color: var(--purple);
}

.code-variable {
    color: var(--cyan);
}

.code-operator {
    color: var(--purple);
}

.code-brace,
.code-bracket {
    color: var(--accent);
}

.code-property {
    color: var(--cyan);
}

.code-string {
    color: var(--accent);
}

.code-comma,
.code-semicolon {
    color: var(--text-muted);
}

.skills__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    justify-content: center;
}

@media (min-width: 992px) {
    .skills__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.skills__category {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(182, 79, 255, 0.2);
    border-radius: 16px;
    padding: 3rem;
}

.skills__category-title {
    font-family: var(--font-code);
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 2rem;
    font-weight: 700;
}

.skills__items {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}



.skills__item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.skills__item-name {
    font-family: var(--font-code);
    color: #ffffff;
    font-weight: 600;
}

.skills__item-percent {
    font-family: var(--font-code);
    color: var(--primary);
    font-weight: 600;
}


/* Skill Markers */
.skills__item {
    position: relative;
    padding-bottom: 40px;
    /* Space for the markers */
}

.skills__bar-container {
    position: relative;
    margin-top: 5px;
}

.skills__bar {
    height: 12px;
    background: var(--bg-darker);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border);
    position: relative;
}

.skills__markers {
    position: absolute;
    top: 14px;
    left: 0;
    width: 100%;
    height: 8px;
    pointer-events: none;
    z-index: 10;
}

.skills__marker {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.3);
    pointer-events: auto;
    cursor: help;
}

.skills__marker:hover {
    background: var(--primary);
}

.skills__marker-label {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    color: var(--text-muted);
    font-family: var(--font-code);
    text-transform: uppercase;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.skills__marker:hover .skills__marker-label {
    color: var(--primary);
}

.skills__marker[style*="left: 66%"] .skills__marker-label {
    transform: translateX(-100%);
}

.skills__marker[style*="left: 0%"] .skills__marker-label {
    transform: translateX(0);
}

.skills__marker-tooltip {
    position: absolute;
    bottom: 35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(5px);
    border: 1px solid var(--primary);
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    line-height: 1.4;
    color: #fff;
    width: 220px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    white-space: normal;
}

.skills__marker-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: var(--primary) transparent transparent transparent;
}

.skills__marker:hover .skills__marker-tooltip {
    opacity: 1;
    visibility: visible;
}

.skills__marker[style*="left: 66%"] .skills__marker-tooltip {
    transform: translateX(-80%);
}

.skills__marker[style*="left: 66%"] .skills__marker-tooltip::after {
    left: 80%;
}

.skills__marker[style*="left: 0%"] .skills__marker-tooltip {
    transform: translateX(-20%);
}

.skills__marker[style*="left: 0%"] .skills__marker-tooltip::after {
    left: 20%;
}


.skills__progress {
    height: 100%;
    background: var(--gradient-1);
    border-radius: 6px;
    width: 0%;
    position: relative;
    box-shadow: 0 0 10px rgba(182, 79, 255, 0.5);
}

.skills__progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Experience Timeline Refinement */
.timeline {
    position: relative;
    padding-inline-start: 6rem;
    /* Increased to 6rem to prevent year clipping */
}

.timeline::before {
    content: '';
    position: absolute;
    left: 6rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gradient-1);
    opacity: 0.5;
}

.timeline-item {
    position: relative;
    padding-bottom: 5rem;
    display: flex;
    align-items: center;
    /* Center content vertically relative to item */
}

.timeline-marker {
    position: absolute;
    left: 0;
    transform: translateX(-50%);
    top: 50%;
    margin-top: -8px;
    /* Offset for half of marker height */
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid var(--bg-dark);
    box-shadow: 0 0 15px var(--primary);
    z-index: 2;
    transition: all var(--transition);
}

.timeline-marker-year {
    position: absolute;
    left: -1rem;
    top: 50%;
    transform: translate(-100%, -50%);
    margin-left: 0;
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--primary);
    font-family: var(--font-code);
    text-shadow: 0 0 10px rgba(182, 79, 255, 0.3);
    white-space: nowrap;
}

.timeline-content {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(182, 79, 255, 0.2);
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    margin-left: 2rem;
    transition: all var(--transition-smooth);
    position: relative;
}

.timeline-content:hover {
    border-color: var(--primary);
    transform: translateX(10px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    background: rgba(30, 41, 59, 0.6);
}

/* Entrance Animations */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reveal-on-scroll.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.timeline-header {
    display: flex;
    justify-content: flex-end;
    /* Badge on right */
    align-items: center;
    margin-bottom: 1rem;
}

.timeline-year {
    font-family: var(--font-code);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
}

.timeline-badge {
    background: var(--gradient-1);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-code);
}

.timeline-title {
    font-family: var(--font-code);
    font-size: 1.5rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.timeline-company {
    color: var(--purple);
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timeline-company i {
    font-size: 1rem;
}

.timeline-description {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.timeline-achievements {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(2, 6, 23, 0.4);
    border-radius: 12px;
    border: 1px solid rgba(182, 79, 255, 0.1);
    border-left: 3px solid var(--primary);
}

.achievement-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.achievement-item i {
    color: var(--green);
    font-size: 1rem;
    flex-shrink: 0;
}

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

.portfolio__tag {
    background: var(--bg-darker);
    color: var(--primary);
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: var(--font-code);
    border: 1px solid var(--border);
}

.portfolio__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    justify-content: center;
}

@media (min-width: 1440px) {

    .portfolio__grid,
    .skills__grid {
        gap: 5rem;
    }

    .skills__grid {
        gap: 2.5rem;
    }
}

.portfolio__card {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(182, 79, 255, 0.2);
    border-radius: 16px;
    overflow: hidden;
    transition: all var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.portfolio__card {
    transition: all var(--transition-smooth);
}

.portfolio__card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.portfolio__display {
    position: relative;
    width: 100%;
    height: 250px;
    background: var(--bg-darker);
    overflow: hidden;
}

.portfolio__screen--desktop {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: top;
    transition: transform 0.5s ease;
}

.portfolio__screen--mobile {
    position: absolute;
    bottom: -20px;
    right: 20px;
    width: 90px;
    height: 180px;
    background-size: cover;
    background-position: top;
    border: 3px solid #1a1a1a;
    border-radius: 12px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.7);
    z-index: 5;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.portfolio__card:hover .portfolio__screen--desktop {
    transform: scale(1.05);
}

.portfolio__card:hover .portfolio__screen--mobile {
    bottom: 25px;
    transform: scale(1.05) rotate(-5deg);
}

.portfolio__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(182, 79, 255, 0.1);
    backdrop-filter: blur(0px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all var(--transition);
    z-index: 10;
}

.portfolio__card:hover .portfolio__overlay {
    opacity: 1;
    backdrop-filter: blur(4px);
}

.portfolio__actions {
    display: flex;
    gap: 2rem;
}

.portfolio__action-btn {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all var(--transition);
}

.portfolio__action-btn {
    transition: all var(--transition-fast);
}

.portfolio__action-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 5px 15px rgba(192, 132, 252, 0.3);
}

.portfolio__content {
    padding: 3rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: transparent;
}

.portfolio__title {
    font-family: var(--font-code);
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
    font-weight: 700;
}

.portfolio__description {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

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

.portfolio__meta {
    margin: 0 0 1.5rem 0;
    padding: 0;
}

.portfolio__meta p {
    margin: 0.25rem 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-family: var(--font-code);
}

.portfolio__meta strong {
    color: #ffffff !important;
    font-weight: 600;
    margin-right: 4px;
}

.portfolio__meta a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.portfolio__meta a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

.project-actions {
    display: none;
}

.portfolio__footer {
    position: relative;
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    background: transparent;
    overflow: visible !important;
}

.portfolio__footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-1);
}

.portfolio__like-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-code);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.portfolio__like-btn i {
    font-size: 1.2rem;
    color: var(--text-dim);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.portfolio__like-btn:hover {
    color: var(--primary);
}

.portfolio__like-btn {
    position: relative;
    overflow: visible !important;
    cursor: pointer !important;
    user-select: none;
    z-index: 10;
}

.portfolio__like-btn:hover i,
.portfolio__like-btn:hover svg {
    transform: scale(1.3) rotate(-10deg);
    color: var(--primary);
}

.portfolio__like-btn.liked i,
.portfolio__like-btn.liked svg {
    color: var(--primary) !important;
    text-shadow: 0 0 20px rgba(182, 79, 255, 0.6);
}

.portfolio__like-btn.liked .portfolio__like-count {
    color: var(--primary);
}

/* --- Celebratory Particle Animation --- */
.star-particle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: var(--primary);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    pointer-events: none;
    z-index: 100;
}

@keyframes starParticleOut {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translate(var(--tx), var(--ty)) scale(1.5) rotate(180deg);
        opacity: 0;
    }
}

.celebration-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    pointer-events: none;
    z-index: 99;
}

@keyframes ringBurst {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
        border-width: 4px;
    }

    100% {
        transform: translate(-50%, -50%) scale(3.5);
        opacity: 0;
        border-width: 0px;
    }
}

.btn-small {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
    border: none;
    border-radius: 0.4rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
    font-weight: 600;
}

.btn-small.btn--secondary {
    background: rgba(59, 130, 246, 0.2);
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-small.btn--secondary:hover {
    background: var(--primary);
    color: var(--bg-primary);
}

.btn-small.btn--primary {
    background: var(--primary);
    color: var(--bg-primary);
}

.btn-small.btn--primary:hover {
    background: var(--primary-light);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    gap: 2rem;
    padding: 3rem;
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(182, 79, 255, 0.2);
    border-radius: 12px;
    transition: all var(--transition);
}

.contact-item {
    transition: all var(--transition-smooth);
    cursor: pointer;
}

.contact-item:hover {
    border-color: var(--primary);
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.contact-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-1);
    border-radius: 12px;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.contact-details {
    flex: 1;
}

.contact-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
    font-family: var(--font-code);
}

.contact-value {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    font-family: var(--font-code);
    display: block;
}

.contact-value:hover {
    color: var(--cyan);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-group {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 1rem;
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(182, 79, 255, 0.2);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: all var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(182, 79, 255, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 150px;
}

.btn-submit {
    align-self: flex-start;
}

.footer {
    background: var(--footer-bg);
    border-top: 1px solid var(--footer-border);
    padding: 3rem 0;
    margin-top: 4rem;
}

.footer__container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

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

.footer-text-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    line-height: 1.6;
}

.footer-copyright {
    color: var(--text-primary);
    font-weight: 600;
}

.footer-divider {
    color: var(--text-muted);
    margin: 0 0.3rem;
}

.footer-built {
    color: var(--text-secondary);
}

.footer-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-by-text {
    color: var(--text-muted);
}

.footer-author-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    transition: all var(--transition-fast);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
}

.footer-author-link:hover {
    color: var(--cyan);
    background: rgba(192, 132, 252, 0.1);
    transform: translateY(-2px);
}

.footer-author-link i {
    font-size: 0.85rem;
}

.footer-social {
    display: flex;
    gap: 2rem;
}

.footer-social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-darker);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition);
}

.footer-social-link {
    transition: all var(--transition-fast);
}

.footer-social-link:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px);
}

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

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

[dir="rtl"] .timeline {
    padding-inline-start: 2rem;
    padding-inline-end: 0;
}

[dir="rtl"] .timeline::before {
    left: auto;
    right: 0;
}

[dir="rtl"] .timeline-marker {
    left: auto;
    right: -2.5rem;
}

[dir="rtl"] .timeline-content:hover {
    transform: translateX(-10px);
}

[dir="rtl"] .contact-item:hover {
    transform: translateX(-10px);
}

@media (max-width: 1024px) {
    .hero {
        height: auto;
        min-height: 100vh;
        min-height: 100svh;
        padding-top: 140px;
        /* More space for stacked top-image */
        padding-bottom: 80px;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
    }

    .hero__container {
        display: flex;
        flex-direction: column;
        text-align: center;
        gap: 2rem;
        padding: 0 2.5rem;
        width: 100%;
        max-width: 100%;
    }

    .hero__content {
        display: contents;
        /* Allows children to be ordered relative to hero__container siblings */
    }

    .hero__header {
        order: 2;
        width: 100%;
        margin-top: 1.5rem;
    }

    .hero__visual {
        order: 1;
        margin: 0 0 1rem 0;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        /* Balanced height to keep title above the fold on tablets */
        min-height: 30svh;
    }

    .hero__frame-container {
        width: min(340px, 70vw);
        height: min(340px, 70vw);
        position: relative;
    }

    .hero__logo.hero__swap-img {
        width: min(200px, 55vw);
    }

    .hero__body {
        order: 3;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero__name {
        font-size: clamp(2.64rem, 7.2vw, 4.2rem);
        /* 20% increase from clamp(2.2rem, 6vw, 3.5rem) */
        margin-bottom: 1.5rem;
        line-height: 1.1;
    }

    .hero__subtitle {
        font-size: 1.2rem;
        margin-bottom: 0;
    }

    .hero__description {
        font-size: 1.1rem;
        margin-top: 1rem;
        margin-bottom: 3rem;
        max-width: 650px;
        line-height: 1.8;
    }

    .hero__actions {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        width: 100%;
        margin-bottom: 2rem;
    }

    .btn {
        width: 80%;
        max-width: 320px;
    }

    .hero__badge--1 {
        --radius: 150px;
        --duration: 25s;
    }

    .hero__badge--2 {
        --radius: 180px;
        --duration: 30s;
    }

    .hero__badge--3 {
        --radius: 165px;
        --duration: 28s;
    }

    .scroll-indicator {
        bottom: 2rem;
    }

    .about__content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .skills__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 900px) {
    .hero__container {
        gap: 1.5rem;
    }

    .hero__visual {
        margin: 1.5rem 0;
    }

    .hero__actions {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .btn {
        width: 80%;
        max-width: 300px;
    }
}

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

    .header__brand {
        flex: 1;
        gap: 0.5rem;
    }

    .header__logo-img {
        height: 32px;
    }

    .header__logo {
        font-size: 2.25rem;
        /* Matches 32px icon height on mobile */
    }

    .header__controls {
        gap: 0.5rem;
    }

    .header__menu {
        position: fixed;
        top: 60px;
        left: 0;
        width: 100vw;
        height: calc(100vh - 60px);
        height: calc(100dvh - 60px);
        background: var(--color-glass-fill);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 3rem 2rem;
        border-top: 1px solid var(--border);
        z-index: 998;
        clip-path: circle(0px at calc(100% - 45px) 0px);
        transition: clip-path 0.8s cubic-bezier(0.86, 0, 0.07, 1), background 0.3s ease;
        overflow-y: auto;
    }

    [data-theme="light"] .header__menu {
        background: rgba(255, 255, 255, 0.98);
        border-top: 1px solid rgba(0, 0, 0, 0.05);
    }

    .header__menu.active {
        clip-path: circle(150% at calc(100% - 45px) 0px);
    }

    .header__menu-close {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 2rem;
        right: 2rem;
        width: 44px;
        height: 44px;
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: 50%;
        color: var(--text-primary);
        font-size: 1.5rem;
        cursor: pointer;
        transition: all var(--transition);
        z-index: 1001;
    }

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

    .header__link {
        width: auto;
        justify-content: center;
        padding: 1.2rem 2rem;
        font-size: 1.5rem;
        border-radius: 12px;
        margin-bottom: 1rem;
        opacity: 0;
        transform: translateY(30px);
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        color: var(--text-primary);
    }

    [data-theme="light"] .header__link {
        color: #1f2937;
    }

    .header__menu.active .header__link,
    .header__menu.active .header__cta-mobile {
        opacity: 1;
        transform: translateY(0);
    }

    .header__menu.active .header__link:nth-child(1) {
        transition-delay: 0.1s;
    }

    .header__menu.active .header__link:nth-child(2) {
        transition-delay: 0.2s;
    }

    .header__menu.active .header__link:nth-child(3) {
        transition-delay: 0.3s;
    }

    .header__menu.active .header__link:nth-child(4) {
        transition-delay: 0.4s;
    }

    .header__cta-mobile {
        width: 100%;
        max-width: 250px;
        margin-top: 1.5rem;
        opacity: 0;
        transform: translateY(30px);
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        font-size: 1.25rem !important;
        padding: 1.2rem 2.2rem !important;
        transition-delay: 0.5s !important;
    }

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

    .mobile-only {
        display: flex !important;
    }

    .header__menu-toggle {
        display: flex;
        position: relative;
        z-index: 999;
    }

    .main-content {
        margin-top: 60px;
    }

    .container {
        padding: 0 1rem;
    }

    .section__header {
        flex-wrap: wrap;
        gap: 1rem;
        margin-bottom: 2rem;
    }

    .hero__badge--1 {
        --radius: 140px;
        --duration: 25s;
    }

    .hero__badge--2 {
        --radius: 170px;
        --duration: 30s;
    }

    .hero__badge--3 {
        --radius: 155px;
        --duration: 28s;
    }

    .scroll-indicator {
        bottom: 1.5rem;
    }

    .section__title {
        font-size: 1.8rem;
        flex-wrap: wrap;
    }

    .section__line {
        width: 100%;
        margin-inline-start: 0;
        margin-top: 0.5rem;
    }

    .stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stats__item {
        padding: 1.5rem;
    }

    .stats__number {
        font-size: 2rem;
    }

    .code-block {
        padding: 1.5rem;
        font-size: 0.8rem;
    }

    .skills__grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .skills__category {
        padding: 2rem;
    }

    .skills__category-title {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }

    .timeline {
        padding-inline-start: 1rem;
    }

    .timeline::before {
        left: 3rem;
    }

    .timeline-item {
        flex-direction: column;
        align-items: flex-start;
        padding-inline-start: 0;
        padding-bottom: 4rem;
    }

    .timeline-marker {
        left: 2rem;
        top: 0;
        transform: translateX(-50%);
        margin-top: 0;
    }

    .timeline-marker-year {
        top: -24px;
        left: 2rem;
        transform: translateX(-50%);
        margin-left: 0;
        font-size: 1rem;
    }

    .timeline-content {
        margin-left: 4.5rem;
        margin-top: -10px;
        width: calc(100% - 4.5rem);
        padding: 1.5rem;
    }

    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

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

    .timeline-achievements {
        padding: 1rem;
        gap: 0.6rem;
    }

    .achievement-item {
        font-size: 0.9rem;
    }

    .portfolio__grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .portfolio__content {
        padding: 2rem;
    }

    .portfolio__title {
        font-size: 1.3rem;
    }

    .contact-content {
        gap: 2rem;
    }

    .contact-item {
        padding: 1.5rem;
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .contact-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        margin: 0 auto;
    }

    .contact-form {
        gap: 1.5rem;
    }

    .form-input {
        padding: 0.9rem;
        font-size: 0.95rem;
    }

    .footer__container {
        padding: 0 1rem;
    }

    .footer__content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .footer-text-wrapper {
        text-align: center;
    }

    .footer-text {
        justify-content: center;
        font-size: 0.85rem;
    }

    .footer-author {
        justify-content: center;
        font-size: 0.85rem;
    }

    .footer-social {
        justify-content: center;
        gap: 1rem;
    }

    .hero__frame-container {
        width: min(300px, 75vw);
        height: min(300px, 75vw);
    }

    .hero__logo.hero__swap-img {
        width: min(180px, 55vw);
    }

    .hero__badge {
        display: none;
    }

    .scroll-indicator {
        bottom: 0.8rem;
        /* Lowered to maximize space */
    }

    .hero__badge-content {
        display: none;
    }

    .hero__badge {
        min-width: auto;
        padding: 0.8rem 1rem;
    }

    .hero__badge i {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .header__container {
        padding: 0.7rem 0.8rem;
    }

    .header__logo {
        font-size: 2.25rem;
    }

    .header__logo-img {
        height: 32px;
    }

    .header__controls {
        gap: 0.5rem;
    }

    .header__lang-toggle,
    .header__theme-toggle {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }

    .hero__container {
        padding: 0 0.8rem;
    }

    .hero__name {
        font-size: 2.16rem;
        /* 20% increase from 1.8rem */
        line-height: 1.2;
    }

    .hero__name-prefix,
    .hero__name-operator,
    .hero__name-suffix {
        font-size: 0.9em;
    }

    .hero__subtitle {
        font-size: 1.15rem;
    }

    .hero__description {
        font-size: 1.15rem;
    }

    .container {
        padding: 0 0.8rem;
    }

    .section__title {
        font-size: 1.5rem;
    }

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

    .hero__frame-container {
        width: min(240px, 85vw);
        height: min(240px, 85vw);
    }

    .hero__logo.hero__swap-img {
        width: min(140px, 60vw);
    }

    .hero__frame-glow {
        width: 110%;
        height: 110%;
    }

    .stats {
        gap: 0.8rem;
    }

    .stats__item {
        padding: 1.2rem;
    }

    .stats__number {
        font-size: 1.8rem;
    }

    .stats__label {
        font-size: 0.85rem;
    }

    .code-block {
        padding: 1rem;
        font-size: 0.75rem;
    }

    .skills__category {
        padding: 1.5rem;
    }

    .skills__category-title {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .skills__items {
        gap: 1.5rem;
    }

    .skills__item-name,
    .skills__item-percent {
        font-size: 0.9rem;
    }

    .timeline {
        padding-inline-start: 1rem;
    }

    .timeline-item {
        padding-inline-start: 1.5rem;
        padding-bottom: 2.5rem;
    }

    .timeline-marker {
        left: 2rem;
        width: 12px;
        height: 12px;
    }

    .timeline-content {
        padding: 1.2rem;
    }

    .timeline-title {
        font-size: 1.2rem;
    }

    .timeline-company {
        font-size: 0.95rem;
    }

    .timeline-description {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .timeline-achievements {
        padding: 0.8rem;
        gap: 0.5rem;
    }

    .achievement-item {
        font-size: 0.85rem;
    }

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

    .portfolio__content {
        padding: 1.5rem;
    }

    .portfolio__title {
        font-size: 1.2rem;
    }

    .portfolio__description {
        font-size: 0.9rem;
    }

    .contact-item {
        padding: 1.2rem;
    }

    .contact-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    .contact-label {
        font-size: 0.85rem;
    }

    .contact-value {
        font-size: 0.95rem;
    }

    .form-input {
        padding: 0.8rem;
        font-size: 0.9rem;
    }

    .btn {
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
    }

    .footer-text {
        font-size: 0.8rem;
        flex-direction: column;
        gap: 0.3rem;
    }

    .footer-divider {
        display: none;
    }

    .footer-author {
        font-size: 0.75rem;
        flex-direction: column;
        gap: 0.3rem;
    }

    .footer-author-link {
        padding: 0.3rem 0.8rem;
    }

    .footer-social-link {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .loader-code-text {
        font-size: 1rem;
    }

    .loader-spinner {
        width: 50px;
        height: 50px;
    }

    .loader-progress-wrapper {
        width: 180px;
    }
}

@media (max-width: 360px) {
    html {
        font-size: 13px;
    }

    .header__logo-img {
        height: 24px;
    }

    .header__logo {
        font-size: 1.85rem;
        /* Matches 24px icon height at 13px base */
    }

    .hero__name {
        font-size: 1.5rem;
    }

    .section__title {
        font-size: 1.3rem;
    }

    .hero__frame-container {
        width: 180px;
        height: 180px;
    }

    .stats__number {
        font-size: 1.5rem;
    }
}

/* --- About Tabs Styling --- */
.tabs {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    padding: 2.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.tabs__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
    justify-content: flex-start;
}

.tabs__btn {
    background: var(--bg-darker);
    backdrop-filter: blur(8px);
    color: var(--text-secondary);
    border: 1px solid var(--color-glass-stroke);
    padding: 0.8rem 1.6rem;
    border-radius: var(--radius-xl);
    cursor: pointer;
    font-family: var(--font-code);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    user-select: none;
}

.tabs__btn i {
    font-size: 1.1rem;
    transition: transform 0.4s ease;
}

.tabs__btn:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    color: var(--text-primary);
    box-shadow: 0 8px 25px rgba(182, 79, 255, 0.2);
    background: var(--bg-hover);
}

.tabs__btn:hover i {
    transform: scale(1.2) rotate(-5deg);
}

.tabs__btn.active {
    background: var(--gradient-1);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 10px 25px rgba(182, 79, 255, 0.4);
    transform: translateY(-3px) scale(1.05);
}

.tabs__btn.active i {
    color: #fff;
}

.tabs__box {
    flex: 1;
    position: relative;
}

.tabs__pane {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.tabs__pane.active {
    display: block;
}

.tabs__pane p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.05rem;
}

.tabs__pane strong {
    color: #ffffff !important;
    font-weight: 600;
}

/* --- Client Reviews Styling --- */
.reviews {
    position: relative;
    z-index: 1;
}

.reviews__slider {
    display: block;
    width: 100%;
    margin-top: 2rem;
    padding-bottom: 4rem !important;
    overflow: hidden;
}

.review.swiper-slide {
    height: auto;
    display: flex;
    flex-direction: column;
}

.swiper-pagination-bullet {
    background: var(--color-neutral-600) !important;
    opacity: 0.4;
    transition: var(--transition-smooth);
    width: 10px !important;
    height: 10px !important;
    margin: 0 8px !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer;
}

.swiper-pagination-bullet:hover {
    opacity: 0.7;
    background: var(--color-primary-light) !important;
}

.swiper-pagination-bullet-active {
    background: var(--color-primary) !important;
    opacity: 1;
    width: 12px !important;
    height: 12px !important;
    transform: scale(1.15);
    box-shadow: 0 0 15px var(--color-primary);
}

.review {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(182, 79, 255, 0.2);
    border-radius: 16px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transition: all var(--transition-smooth);
    color: var(--color-text);
}

.review .review__stars i {
    color: var(--primary);
}

.review .review__quote {
    color: var(--color-text-dim);
}

.review .review__author {
    color: var(--primary);
    font-weight: 700;
}

.review:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(192, 132, 252, 0.15);
}

.review__stars {
    color: var(--primary);
    font-size: 1.2rem;
    display: flex;
    gap: 0.2rem;
}

.review__quote {
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.7;
    margin: 0;
    flex: 1;
    position: relative;
    padding-left: 1.5rem;
    border-left: 3px solid var(--primary);
}

.review__author {
    font-family: var(--font-code);
    color: var(--primary);
    font-style: normal;
    font-weight: 600;
    font-size: 1rem;
    display: block;
}

.review__author::before {
    content: '— ';
    margin-right: 0.5rem;
}

@media (max-width: 768px) {
    .tabs__nav {
        flex-direction: column;
        gap: 0.5rem;
    }

    .tabs {
        padding: 1.5rem;
    }

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

@media (max-width: 480px) {
    .tabs__btn {
        text-align: center;
    }
}
/* ============================================
   HIRE ME PAGE
   ============================================ */

.hire-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-10);
    margin-top: var(--space-10);
}

.hire-card {
    background: var(--color-glass-fill);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--color-glass-stroke);
    border-radius: var(--radius-xl);
    padding: var(--space-10);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-base);
}

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

.hire-card__title {
    color: var(--color-primary);
    font-family: var(--font-mono);
    margin-bottom: var(--space-5);
    font-size: var(--font-size-2xl);
}

.hire-card__description {
    color: var(--color-text-dim);
    line-height: 1.8;
    margin-bottom: var(--space-8);
    font-size: var(--font-size-lg);
}

.hire-card__action {
    width: 100%;
    text-align: center;
    justify-content: center;
}

@media (max-width: 900px) {
    .hire-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   GALLERY TICKER SECTION
   ============================================ */

.gallery--ticker {
    background: var(--color-bg); /* Reverted to match base section */
    position: relative;
    padding: 0; 
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.gallery--ticker::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(182, 79, 255, 0.15) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.gallery__ticker-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    z-index: 1;
    /* EXACT COPY FROM .cta .container */
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    padding: 80px 0; /* Adjusted for ticker flow, kept vertical weight */
}

.gallery__ticker-row {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.gallery__ticker-track {
    display: flex;
    gap: 20px;
    width: max-content;
    backface-visibility: hidden;
    perspective: 1000px;
}

.gallery__ticker-item {
    height: 30vh; /* Slightly larger */
    border-radius: var(--radius-xl);
    overflow: hidden;
    /* Removed padding, border, and background to eliminate thick border look */
    padding: 0;
    background: transparent;
    border: none;
    backdrop-filter: blur(10px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color var(--transition-base);
    flex-shrink: 0;
    will-change: transform;
}

.gallery__ticker-item img {
    height: 100%;
    width: auto;
    object-fit: contain; /* Ensure nav bars and footers are visible */
    display: block;
}

.gallery__ticker-item:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(182, 79, 255, 0.3);
    z-index: 10;
}

/* Animations */
.gallery__ticker-row--ltr .gallery__ticker-track {
    animation: ticker-ltr 60s linear infinite;
    will-change: transform;
}

.gallery__ticker-row--rtl .gallery__ticker-track {
    animation: ticker-rtl 60s linear infinite;
    will-change: transform;
}

.gallery__ticker-row--slow .gallery__ticker-track {
    animation-duration: 90s;
}

@keyframes ticker-ltr {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(-50%, 0, 0); }
}

@keyframes ticker-rtl {
    from { transform: translate3d(-50%, 0, 0); }
    to { transform: translate3d(0, 0, 0); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .gallery--ticker {
        height: 80vh;
    }
    .gallery__ticker-item {
        height: 22vh;
    }
}

/* ============================================
   FAQ SECTION
   ============================================ */
.faq {
    background-color: var(--color-bg);
    position: relative;
    padding-bottom: var(--space-24);
}

.faq__header {
    margin-bottom: var(--space-12);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
}

.faq__subtitle {
    color: var(--color-neutral-600);
    font-size: var(--font-size-xl);
    max-width: 700px;
    margin: 0 auto;
}

.faq__grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    max-width: 900px;
    margin: 0 auto;
}

.faq__item {
    background: var(--color-glass-fill);
    border: 1px solid var(--color-glass-stroke);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: var(--transition-smooth);
    cursor: pointer;
}

.faq__item:hover {
    border-color: rgba(182, 79, 255, 0.5);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.faq__question {
    width: 100%;
    padding: var(--space-6) var(--space-8);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-text);
    font-weight: 700;
    font-size: var(--font-size-xl);
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.faq__icon {
    font-size: 1.25rem;
    transition: transform var(--transition-smooth);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(182, 79, 255, 0.1);
}

.faq__item.active {
    border-color: var(--color-primary);
    background: rgba(182, 79, 255, 0.05);
}

.faq__item.active .faq__icon {
    transform: rotate(180deg);
    background: var(--color-primary);
    color: white;
}

.faq__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0, 1, 0, 1);
}

.faq__item.active .faq__answer {
    max-height: 1000px;
    transition: max-height 1s ease-in-out;
}

.faq__answer-inner {
    padding: 0 var(--space-8) var(--space-8);
    color: var(--color-neutral-600);
    line-height: 1.8;
    font-size: var(--font-size-lg);
}

/* FAQ Mobile Fixes */
@media (max-width: 768px) {
    .faq__question {
        padding: var(--space-4) var(--space-6);
        font-size: var(--font-size-lg);
    }
    .faq__answer-inner {
        padding: 0 var(--space-6) var(--space-6);
        font-size: var(--font-size-base);
    }
}

/* ============================================
   BLOG ARTICLE PAGE
   ============================================ */

/* Article page container — narrower reading column */
.blog-article__container {
    max-width: 820px;
}

/* Breadcrumb navigation */
.blog-article__breadcrumb {
    margin-bottom: 2rem;
}

.blog-article__breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.blog-article__breadcrumb-list a {
    color: var(--primary);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.blog-article__breadcrumb-list a:hover {
    opacity: 0.75;
}

/* Article hero banner */
.blog-article__banner {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: var(--radius-xl, 12px);
    margin-bottom: 2rem;
    display: block;
}

/* Article header block */
.blog-article__header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.blog-article__title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    line-height: 1.25;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

/* Meta bar: author · date · reading time */
.blog-article__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.blog-article__meta i {
    margin-right: 0.3rem;
    color: var(--primary);
}

.blog-article__separator {
    color: var(--text-secondary);
    opacity: 0.5;
}

/* Reading time badge */
.blog-article__reading-time {
    background: rgba(182, 79, 255, 0.12);
    color: var(--primary);
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(182, 79, 255, 0.25);
}

/* Main article body content */
.blog-article__content {
    line-height: 1.85;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 3rem;
}

.blog-article__content h2,
.blog-article__content h3,
.blog-article__content h4 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    line-height: 1.35;
}

.blog-article__content h2 { font-size: 1.6rem; }
.blog-article__content h3 { font-size: 1.3rem; }
.blog-article__content h4 { font-size: 1.1rem; }

.blog-article__content p {
    margin-bottom: 1.5rem;
}

.blog-article__content ul,
.blog-article__content ol {
    margin: 1rem 0 1.5rem 1.5rem;
    line-height: 1.85;
}

.blog-article__content li {
    margin-bottom: 0.5rem;
}

.blog-article__content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg, 8px);
    margin: 1.5rem 0;
    display: block;
}

.blog-article__content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.2s ease;
}

.blog-article__content a:hover {
    opacity: 0.75;
}

.blog-article__content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

.blog-article__content th {
    background: rgba(182, 79, 255, 0.15);
    color: var(--primary);
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 2px solid rgba(182, 79, 255, 0.3);
}

.blog-article__content td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
    color: var(--text-secondary);
}

.blog-article__content tr:last-child td {
    border-bottom: none;
}

/* Social share buttons */
.blog-article__share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: var(--bg-card, rgba(30,41,59,0.4));
    border: 1px solid var(--border, rgba(255,255,255,0.08));
    border-radius: var(--radius-xl, 12px);
}

.blog-article__share-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
    white-space: nowrap;
}

.blog-article__share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.blog-article__share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    font-family: inherit;
}

.blog-article__share-btn--linkedin {
    background: rgba(10, 102, 194, 0.15);
    color: #0a66c2;
    border-color: rgba(10, 102, 194, 0.3);
}

.blog-article__share-btn--linkedin:hover {
    background: #0a66c2;
    color: #fff;
}

.blog-article__share-btn--twitter {
    background: rgba(255,255,255, 0.05);
    color: var(--text-primary);
    border-color: var(--border, rgba(255,255,255,0.12));
}

.blog-article__share-btn--twitter:hover {
    background: #000;
    color: #fff;
}

.blog-article__share-btn--copy {
    background: rgba(182, 79, 255, 0.1);
    color: var(--primary);
    border-color: rgba(182, 79, 255, 0.25);
}

.blog-article__share-btn--copy:hover {
    background: var(--primary);
    color: #fff;
}

/* Back to blog link */
.blog-article__back {
    text-align: center;
    margin-bottom: 4rem;
}

/* Related posts section */
.blog-article__related {
    border-top: 1px solid var(--border, rgba(255,255,255,0.08));
    padding-top: 3rem;
    margin-top: 1rem;
}

.blog-article__related-title {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.blog-article__related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.blog-article__related-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card, rgba(30,41,59,0.4));
    border: 1px solid var(--border, rgba(255,255,255,0.08));
    border-radius: var(--radius-xl, 12px);
    overflow: hidden;
    text-decoration: none;
    transition: all 0.25s ease;
}

.blog-article__related-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(182, 79, 255, 0.15);
}

.blog-article__related-img {
    height: 140px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.blog-article__related-info {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.blog-article__related-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    margin: 0;
}

.blog-article__related-info time {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Blog article responsive */
@media (max-width: 768px) {
    .blog-article__related-grid {
        grid-template-columns: 1fr;
    }

    .blog-article__content {
        font-size: 1rem;
    }

    .blog-article__share {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .blog-article__title {
        font-size: 1.5rem;
    }

    .blog-article__meta {
        font-size: 0.8rem;
        gap: 0.3rem;
    }

    .blog-article__content h2 { font-size: 1.3rem; }
    .blog-article__content h3 { font-size: 1.1rem; }
}
