/* ============================================================
   HASSAN RAZA THEME — Frontend Styles
   Premium Dark + Blush Design System
   ============================================================ */

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

:root {
    /* Warm blush-dark backgrounds */
    --bg: #130F11;
    --surface: #1C1519;
    --card: #202020;
    --border: #342030;
    --border-light: #4A2B42;
    /* Text */
    --text: #F5EFF2;
    --text-secondary: #A89AA4;
    --text-muted: #6E5E68;
    /* Blush accent */
    --blush: #C8748A;
    --blush-light: #E89AAF;
    --blush-dim: rgba(200, 116, 138, 0.10);
    --blush-glow: rgba(200, 116, 138, 0.06);
    --blush-border: rgba(200, 116, 138, 0.20);
    /* Legacy compat */
    --accent: #F5EFF2;
    --accent-dim: rgba(245, 239, 242, 0.07);
    /* Fonts & Easing */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

::selection {
    background: rgba(200, 116, 138, 0.25);
    color: #F5EFF2;
}

a {
    color: inherit;
    text-decoration: none;
}

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

/* ---------- Cursor Glow ---------- */
.cursor-glow {
    position: fixed;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(200, 116, 138, 0.08) 0%, rgba(200, 116, 138, 0.02) 40%, transparent 70%);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.4s;
}

body:hover .cursor-glow {
    opacity: 1;
}

/* ---------- Container ---------- */
.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ---------- Scroll Progress ---------- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, var(--blush), var(--blush-light), var(--blush));
    z-index: 2000;
    transition: width 0.1s linear;
    box-shadow: 0 0 8px var(--blush-dim);
}

/* ---------- Navigation ---------- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 18px 40px;
    transition: padding 0.4s var(--ease-out-expo);
}

.nav-inner {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    background: transparent;
    border-radius: 100px;
    padding: 0 12px 0 28px;
    transition: background 0.5s var(--ease-out-expo), box-shadow 0.5s var(--ease-out-expo), border-color 0.5s var(--ease-out-expo);
    border: 1px solid transparent;
}

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

.nav.scrolled .nav-inner {
    background: rgba(28, 21, 25, 0.82);
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    border-color: var(--border);
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(200, 116, 138, 0.10) inset;
}

/* Logo */
.nav-logo {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.5px;
    display: flex;
    gap: 0;
    transition: filter 0.3s;
}

.nav-logo:hover {
    filter: drop-shadow(0 0 12px rgba(200, 116, 138, 0.55));
}

.nav-logo-bracket {
    color: var(--blush);
    opacity: 0.75;
    transition: opacity 0.3s;
}

.nav-logo:hover .nav-logo-bracket {
    opacity: 1;
}

.nav-logo-text {
    color: var(--text);
}

/* Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Defensive: neutralise any <li> WordPress outputs regardless of walker */
.nav-links li {
    list-style: none;
    display: contents;
}

.nav-links li>a {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-secondary);
    position: relative;
    padding: 8px 18px;
    border-radius: 100px;
    transition: color 0.3s, background 0.3s;
}

.nav-link {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-secondary);
    position: relative;
    padding: 8px 18px;
    border-radius: 100px;
    transition: color 0.3s, background 0.3s;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 18px;
    right: 18px;
    height: 1px;
    background: var(--blush);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s var(--ease-out-expo);
}

.nav-link:hover {
    color: var(--text);
    background: var(--blush-glow);
}

.nav-link:hover::after {
    transform: scaleX(1);
}

/* CTA */
.nav-link-cta {
    color: #fff;
    background: linear-gradient(135deg, var(--blush) 0%, #A0546E 100%);
    padding: 10px 26px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.01em;
    transition: transform 0.3s var(--ease-out-expo), box-shadow 0.3s, filter 0.3s;
    margin-left: 8px;
}

.nav-link-cta::after {
    display: none;
}

.nav-link-cta:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 28px rgba(200, 116, 138, 0.38);
    filter: brightness(1.1);
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-dim);
    border: 1px solid var(--border);
    cursor: pointer;
    margin-left: 10px;
    transition: background 0.3s, border-color 0.3s, transform 0.3s var(--ease-out-expo);
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: var(--blush-dim);
    border-color: var(--blush-border);
    transform: rotate(20deg) scale(1.08);
}

.theme-toggle svg {
    width: 16px;
    height: 16px;
    transition: opacity 0.3s, transform 0.3s;
}

.theme-toggle .icon-moon {
    color: var(--text-secondary);
}

.theme-toggle .icon-sun {
    color: var(--blush);
    display: none;
}

[data-theme="light"] .theme-toggle .icon-moon {
    display: none;
}

[data-theme="light"] .theme-toggle .icon-sun {
    display: block;
}

/* Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 1.5px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: transform 0.3s var(--ease-out-expo), opacity 0.3s, background 0.3s;
}

.nav-toggle:hover span {
    background: var(--blush);
}

.nav-toggle.active span:first-child {
    transform: translateY(3.25px) rotate(45deg);
    background: var(--blush);
}

.nav-toggle.active span:last-child {
    transform: translateY(-3.25px) rotate(-45deg);
    background: var(--blush);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(19, 15, 17, 0.97);
    backdrop-filter: blur(30px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
}

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

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.mobile-menu-link {
    font-size: 32px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: color 0.3s, transform 0.3s;
}

.mobile-menu-link:hover {
    color: var(--blush-light);
    transform: translateX(8px);
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 120px 24px 80px;
}

.hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-globe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.12;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 1060px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--accent-dim);
    border: 1px solid var(--border);
    padding: 8px 20px;
    border-radius: 100px;
    margin-bottom: 40px;
    font-family: var(--font-mono);
}

.hero-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--blush);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(200, 116, 138, 0.5);
    }

    50% {
        opacity: 0.85;
        box-shadow: 0 0 0 7px rgba(200, 116, 138, 0);
    }
}

/* Hero name prefix — tiny 'Muhammad' starting above the H of Hassan */
.hero-name-prefix {
    display: block;
    font-size: clamp(10px, 1vw, 13px);
    font-family: var(--font-mono);
    font-weight: 400;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
    opacity: 0.75;
    margin-bottom: 4px;
    line-height: 1;
    text-align: left;
    padding: 0 0 0 5px;
}

/* fit-content centers the h1 as a block while shrinking it to text width,
   so the prefix text-align:left lands exactly above the H of Hassan */
.hero-title {
    position: relative;
    font-size: clamp(56px, 10vw, 120px);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.04em;
    margin: 0 auto 24px;
    width: fit-content;
    text-align: left;
}

/* Hero Hover Slider */
.hero-hover-slider {
    position: absolute;
    top: 50%;
    left: -100px;
    transform: translate(-110%, -50%);
    width: 150px;
    height: 200px;
    border-radius: 12px;
    border: none;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s var(--ease-out-expo), transform 0.4s var(--ease-out-expo);
    z-index: 10;
}

/* Show on hover of the title */
.hero-title:hover .hero-hover-slider {
    opacity: var(--slider-hover-opacity, 0.85);
    transform: translate(-100%, -50%);
}

/* Hide on mobile */
@media (max-width: 1024px) {
    .hero-hover-slider {
        display: none !important;
    }
}

.hero-slider-inner {
    position: relative;
    width: 100%;
    height: 100%;
    perspective: 800px;
}

.hero-slider-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: rotateY(90deg);
    animation: heroFlipSlide 8s infinite ease-in-out;
    animation-play-state: paused;
}

.hero-title:hover .hero-slider-slide {
    animation-play-state: running;
}

.hero-slider-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Set delays based on index: 2s per image */
.hero-slider-slide:nth-child(1) {
    animation-delay: 0s;
}

.hero-slider-slide:nth-child(2) {
    animation-delay: 2s;
}

.hero-slider-slide:nth-child(3) {
    animation-delay: 4s;
}

.hero-slider-slide:nth-child(4) {
    animation-delay: 6s;
}

/* Handle 1 image */
.hero-slider-slide:nth-last-child(1):first-child {
    opacity: 1;
    transform: rotateY(0deg);
    animation: none;
}

/* Handle 2 images */
.hero-slider-slide:nth-last-child(2):first-child,
.hero-slider-slide:nth-last-child(2):first-child~.hero-slider-slide {
    animation-duration: 4s;
    animation-name: heroFlipSlide2;
}

/* Handle 3 images */
.hero-slider-slide:nth-last-child(3):first-child,
.hero-slider-slide:nth-last-child(3):first-child~.hero-slider-slide {
    animation-duration: 6s;
    animation-name: heroFlipSlide3;
}

/* Handle 4 images */
.hero-slider-slide:nth-last-child(4):first-child,
.hero-slider-slide:nth-last-child(4):first-child~.hero-slider-slide {
    animation-duration: 8s;
    animation-name: heroFlipSlide4;
}

@keyframes heroFlipSlide2 {
    0% {
        opacity: 0;
        transform: rotateY(90deg);
        z-index: 2;
    }

    8% {
        opacity: 1;
        transform: rotateY(0deg);
        z-index: 2;
    }

    42% {
        opacity: 1;
        transform: rotateY(0deg);
        z-index: 2;
    }

    50% {
        opacity: 0;
        transform: rotateY(-90deg);
        z-index: 1;
    }

    100% {
        opacity: 0;
        transform: rotateY(-90deg);
        z-index: 1;
    }
}

@keyframes heroFlipSlide3 {
    0% {
        opacity: 0;
        transform: rotateY(90deg);
        z-index: 2;
    }

    5.5% {
        opacity: 1;
        transform: rotateY(0deg);
        z-index: 2;
    }

    28% {
        opacity: 1;
        transform: rotateY(0deg);
        z-index: 2;
    }

    33.33% {
        opacity: 0;
        transform: rotateY(-90deg);
        z-index: 1;
    }

    100% {
        opacity: 0;
        transform: rotateY(-90deg);
        z-index: 1;
    }
}

@keyframes heroFlipSlide4 {
    0% {
        opacity: 0;
        transform: rotateY(90deg);
        z-index: 2;
    }

    4% {
        opacity: 1;
        transform: rotateY(0deg);
        z-index: 2;
    }

    21% {
        opacity: 1;
        transform: rotateY(0deg);
        z-index: 2;
    }

    25% {
        opacity: 0;
        transform: rotateY(-90deg);
        z-index: 1;
    }

    100% {
        opacity: 0;
        transform: rotateY(-90deg);
        z-index: 1;
    }
}

.hero-title-line {
    display: block;
}

.hero-title-accent {
    background: linear-gradient(135deg, #F5EFF2 0%, var(--blush-light) 50%, #A89AA4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title-cursor {
    display: inline-block;
    -webkit-text-fill-color: var(--text-muted);
    font-weight: 300;
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.hero-subtitle {
    font-size: clamp(18px, 2.5vw, 24px);
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 24px;
    min-height: 36px;
    font-family: var(--font-mono);
}

.hero-description {
    font-size: clamp(16px, 1.5vw, 18px);
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 48px;
    line-height: 1.7;
}

.text-highlight {
    color: var(--text);
    font-weight: 600;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 80px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 500;
    font-family: var(--font-sans);
    cursor: pointer;
    border: none;
    transition: all 0.4s var(--ease-out-expo);
    white-space: nowrap;
}

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

.btn-primary:hover {
    background: #E0E0E0;
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(255, 255, 255, 0.1);
}

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

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

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

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

.hero-stat-number {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.hero-stat-suffix {
    font-size: 24px;
    font-weight: 300;
    color: var(--text-muted);
}

.hero-stat-label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
    font-family: var(--font-mono);
}

.hero-stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* Hero Scroll */
.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 2;
}

.hero-scroll-text {
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

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

@keyframes scroll-line {
    0% {
        transform: scaleY(0);
        transform-origin: top;
    }

    50% {
        transform: scaleY(1);
        transform-origin: top;
    }

    51% {
        transform: scaleY(1);
        transform-origin: bottom;
    }

    100% {
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

/* ---------- Sections ---------- */
.section {
    padding: 140px 0;
    position: relative;
}

.section-dark {
    background: var(--surface);
}

.section-label {
    font-size: 12px;
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 32px;
}

.section-title {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
    white-space: pre-line;
}

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

.section-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    line-height: 1.7;
}

.section-title-center+.section-subtitle {
    margin: 0 auto 60px;
    text-align: center;
}

/* ---------- About ---------- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

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

.about-text p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.about-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.about-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    transition: background 0.4s, border-color 0.4s, transform 0.3s var(--ease-out-expo), box-shadow 0.4s;
    position: relative;
    overflow: hidden;
}

.about-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--blush);
    opacity: 0;
    transition: opacity 0.3s;
}

.about-card:hover {
    border-color: var(--blush-border);
    transform: translateX(4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.02);
}

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

.about-card-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.about-card-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--accent-dim);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    flex-shrink: 0;
    transition: background 0.3s, border-color 0.3s, color 0.3s;
}

.about-card:hover .about-card-icon {
    background: var(--blush);
    border-color: var(--blush);
    color: #fff;
}

.about-card h3 {
    font-size: 15px;
    font-weight: 600;
}

.about-card p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    padding-left: 48px;
}

/* ---------- Expertise ---------- */
.expertise-list {
    display: flex;
    flex-direction: column;
    margin-top: 60px;
}

.expertise-row {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    padding: 40px 24px;
    border-bottom: 1px solid var(--border);
    transition: background 0.4s, border-color 0.4s;
    position: relative;
    margin: 0 -24px; /* offset the padding to align with container */
}

.expertise-row:first-child {
    border-top: 1px solid var(--border);
}

.expertise-row:hover {
    background: rgba(255, 255, 255, 0.02);
    border-bottom-color: var(--blush-border);
}

/* Glow line on the left side on hover */
.expertise-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: -1px;
    bottom: -1px;
    width: 2px;
    background: var(--blush);
    opacity: 0;
    transition: opacity 0.4s;
}

.expertise-row:hover::before {
    opacity: 1;
}

.expertise-row-number {
    flex: 0 0 40px;
    font-size: 14px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 6px;
    transition: color 0.4s;
}

.expertise-row:hover .expertise-row-number {
    color: var(--blush);
}

.expertise-row-content {
    flex: 1;
}

.expertise-row-title {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.expertise-row-text {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 600px;
}

.expertise-row-tags {
    flex: 0 0 300px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.expertise-row-tags span {
    font-size: 12px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    background: var(--accent-dim);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 100px;
    transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.4s var(--ease-out-expo);
    animation: floatBubble1 6s ease-in-out infinite;
}

.expertise-row-tags span:nth-child(2n) {
    animation-name: floatBubble2;
    animation-duration: 8s;
}

.expertise-row-tags span:nth-child(3n) {
    animation-name: floatBubble3;
    animation-duration: 7s;
    animation-delay: -2s;
}

.expertise-row-tags span:nth-child(4n) {
    animation-name: floatBubble4;
    animation-duration: 9s;
    animation-delay: -5s;
}

/* Unique paths for each tag type */
@keyframes floatBubble1 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(5px, -6px); }
    66% { transform: translate(-4px, 4px); }
}

@keyframes floatBubble2 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(-6px, -3px); }
    66% { transform: translate(5px, 5px); }
}

@keyframes floatBubble3 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(4px, 5px); }
    66% { transform: translate(-5px, -5px); }
}

@keyframes floatBubble4 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(-3px, 6px); }
    66% { transform: translate(6px, -2px); }
}

.expertise-row:hover .expertise-row-tags span {
    border-color: var(--blush-border);
    background: rgba(200, 116, 138, 0.05);
}

/* Tech Stack */
.expertise-stack {
    margin-top: 60px;
    padding: 40px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
}

.expertise-stack-title {
    font-size: 14px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 24px;
    text-align: center;
}

.expertise-stack-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.stack-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    padding: 12px 16px;
    background: var(--accent-dim);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color 0.3s, color 0.3s;
}

.stack-item:hover {
    border-color: var(--border-light);
    color: var(--text);
}

.stack-icon {
    color: var(--text-muted);
    font-size: 10px;
}

/* ---------- Work Masonry & Filters ---------- */
.work-filters-wrapper {
    margin: 40px 0;
    text-align: center;
}

.work-filters {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.work-filter-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.work-filter-btn:hover {
    border-color: var(--blush-border);
    color: var(--text-primary);
}

.work-filter-btn.active {
    background: var(--blush-light);
    color: var(--card);
    border-color: var(--blush-light);
}

.work-masonry-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 40px;
    min-height: 200px;
    transition: opacity 0.3s;
}

.work-grid-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin-top: 40px;
}

.work-masonry-grid.loading {
    opacity: 0.3;
    pointer-events: none;
}

.work-card-masonry {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.4s, transform 0.4s var(--ease-out-expo), box-shadow 0.4s;
    display: block;
    position: relative;
    aspect-ratio: 4/5; /* Fixed height ratio so grid never jumps */
}

.work-card-masonry:hover {
    border-color: var(--blush-border);
    transform: translateY(-4px);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35), 0 0 40px rgba(200, 116, 138, 0.06);
}

.work-card-masonry-inner {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.work-card-masonry-image {
    width: 100%;
    height: 100%; /* Fills the card */
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.work-card-masonry-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s var(--ease-out-expo);
}

.work-card-masonry:hover .work-card-masonry-image img {
    transform: scale(1.05);
    filter: blur(4px);
    opacity: 0.8;
}

.work-card-masonry-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 24px;
    background: var(--card);
    transition: height 0.4s var(--ease-out-expo);
    z-index: 2;
}

.work-card-masonry-category {
    font-size: 10px;
    font-family: var(--font-mono);
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 4px 8px;
    border-radius: 4px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 12px;
    display: inline-block;
}

.work-card-masonry-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    line-height: 22px;
}

.work-card-masonry-details {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    margin-top: 0;
    transition: grid-template-rows 0.4s var(--ease-out-expo), opacity 0.3s ease, margin 0.4s var(--ease-out-expo);
}

.work-card-masonry-details-inner {
    overflow: hidden;
}

.work-card-masonry:hover .work-card-masonry-details {
    grid-template-rows: 1fr;
    opacity: 1;
    margin-top: 12px;
}

.work-card-masonry-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.work-card-masonry-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.work-card-masonry-tags span {
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    background: var(--accent-dim);
    border: 1px solid var(--border);
    padding: 4px 8px;
    border-radius: 4px;
}

.work-loader {
    text-align: center;
    margin: 40px 0;
}

.work-loader .spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-radius: 50%;
    border-top-color: var(--blush-light);
    animation: spin 1s ease-in-out infinite;
}

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

.work-detail-tags {
    padding: 24px 0;
    display: flex;
    align-items: center;
    gap: 16px;
}

.work-detail-tags-label {
    font-size: 13px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.work-detail-url {
    padding: 0 0 24px;
}

.work-view-all {
    margin-top: 48px;
    text-align: center;
}

/* ---------- About Page ---------- */
.about-page-hero {
    padding-bottom: 80px;
    border-bottom: 1px solid var(--border);
}

.about-page-hero-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-page-title {
    font-size: clamp(40px, 6vw, 64px);
    line-height: 1.1;
    font-weight: 700;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #fff 0%, #a5a5a5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
[data-theme="light"] .about-page-title {
    background: linear-gradient(135deg, #111 0%, #555 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-page-details {
    font-size: 20px;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 600px;
}

.about-page-blob-wrapper {
    width: 100%;
    aspect-ratio: 1/1;
    max-width: 400px;
    margin: 0 auto;
    position: relative;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    overflow: hidden;
    animation: morphBlob 8s ease-in-out infinite;
    box-shadow: inset 0 0 0 4px var(--blush-border);
}
.about-page-blob-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    color: var(--text-muted);
}

@keyframes morphBlob {
    0% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}

.about-page-blob-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.1);
    transition: transform 0.8s ease;
}
.about-page-blob-wrapper:hover .about-page-blob-image {
    transform: scale(1.05);
}

.about-page-slider-container {
    margin-top: 60px;
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 24px;
    color: var(--text-primary);
}

.about-page-slider-label {
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-mono);
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0;
    white-space: nowrap;
}

.about-page-slider {
    position: relative;
    height: 36px; /* Adjust based on font-size */
    flex: 1;
    overflow: hidden;
}

.about-page-slider-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s var(--ease-out-expo);
    font-weight: 500;
}

.about-page-slider-item.active {
    opacity: 1;
    transform: translateY(0);
}

.about-page-slider-item.exit {
    opacity: 0;
    transform: translateY(-20px);
}

.about-research-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.about-research-card {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 32px;
    border-radius: 12px;
    transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s ease;
}
.about-research-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

.research-card-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.research-card-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ---------- Security ---------- */
.security-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 60px 0;
}

.security-stat {
    text-align: center;
    padding: 48px 24px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    transition: border-color 0.4s, transform 0.4s var(--ease-out-expo);
}

.security-stat:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
}

.security-stat-number {
    font-size: 56px;
    font-weight: 800;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
    background: linear-gradient(135deg, #F5EFF2, var(--blush-light), #8A6070);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.security-stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.security-types {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 40px;
}

.security-type {
    padding: 32px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: border-color 0.4s, transform 0.4s var(--ease-out-expo);
}

.security-type:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
}

.security-type-icon {
    font-size: 12px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    margin-bottom: 16px;
}

.security-type h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.security-type p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ---------- Writing ---------- */
.writing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 60px;
}

.writing-card {
    padding: 36px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: border-color 0.4s, transform 0.4s var(--ease-out-expo), box-shadow 0.4s;
}

.writing-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.writing-card-date {
    font-size: 12px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    margin-bottom: 16px;
}

.writing-card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.3;
    transition: color 0.3s;
}

.writing-card:hover .writing-card-title {
    color: #E0E0E0;
}

.writing-card-excerpt {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.writing-card-tag {
    font-size: 12px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    background: var(--accent-dim);
    border: 1px solid var(--border);
    padding: 4px 12px;
    border-radius: 100px;
}

/* ---------- Contact ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.contact-text {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 40px;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: border-color 0.4s, background 0.4s, transform 0.3s var(--ease-out-expo);
}

.contact-link:hover {
    border-color: var(--border-light);
    background: var(--surface);
    transform: translateX(4px);
}

.contact-link-label {
    font-size: 12px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.contact-link-value {
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
}

.contact-form-wrapper {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
    outline: none;
}

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--border-light);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.form-group select {
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.form-group select option {
    background: var(--surface);
    color: var(--text);
}

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

/* ---------- Blog / Single ---------- */


.blog-pagination {
    margin-top: 60px;
    text-align: center;
}

.blog-pagination .nav-links {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.blog-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.3s;
    background: var(--card);
    border: 1px solid var(--border);
}

.blog-pagination .page-numbers.current {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}

.blog-pagination .page-numbers:hover:not(.current) {
    border-color: var(--border-light);
    color: var(--text);
}

.blog-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
}

.blog-header .section-title {
    font-size: 48px;
    margin-bottom: 16px;
}

.blog-header .section-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
}

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

.blog-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color 0.4s, transform 0.4s var(--ease-out-expo), box-shadow 0.4s;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    border-color: var(--border-light);
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
}

.blog-card-image {
    display: block;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--ease-out-expo);
}

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

.blog-card-content {
    padding: 32px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.blog-card-cat {
    color: var(--blush);
    background: rgba(200, 116, 138, 0.1);
    padding: 4px 10px;
    border-radius: 100px;
}

.blog-card-title {
    font-size: 24px;
    line-height: 1.3;
    margin-bottom: 12px;
}

.blog-card-title a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.3s;
}

.blog-card-title a:hover {
    color: var(--blush);
}

.blog-card-excerpt {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0;
}

.blog-empty {
    text-align: center;
    padding: 80px 0;
}

.blog-empty h2 {
    font-size: 24px;
    margin-bottom: 8px;
}

.blog-empty p {
    color: var(--text-secondary);
}

/* ---------- Single Work Redesign ---------- */
.single-work-page {
    padding-top: 140px;
}

.single-work-header {
    margin-bottom: 40px;
    text-align: center;
}

.single-work-title {
    font-size: clamp(40px, 8vw, 72px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--text);
    text-transform: capitalize;
}

.single-work-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

@media (min-width: 1024px) {
    .single-work-grid {
        grid-template-columns: 2fr 1fr;
        gap: 60px;
        align-items: start;
    }
}

/* Sidebar */
.single-work-sidebar {
    position: sticky;
    top: 120px;
}

.work-sidebar-card {
    background: rgba(32, 32, 32, 0.4);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.work-sidebar-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text);
}

.work-meta-item {
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 16px;
}

.work-meta-item:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.meta-label {
    display: block;
    font-size: 13px;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.meta-value {
    display: block;
    font-size: 16px;
    color: var(--text);
}

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

.meta-tags span {
    font-size: 13px;
    padding: 4px 12px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.work-sidebar-cta {
    margin-top: 32px;
}

/* Slider */
.work-slider-wrapper {
    position: relative;
    margin-bottom: 40px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
}

.work-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    /* Firefox */
}

.work-slider::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.work-slider-slide {
    flex: 0 0 100%;
    min-width: 100%;
    scroll-snap-align: center;
    position: relative;
    aspect-ratio: 16/9;
}

.work-slider-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.work-slider-slide:hover .work-slider-img {
    transform: scale(1.02);
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    opacity: 0;
}

.work-slider-wrapper:hover .slider-nav {
    opacity: 1;
}

.slider-nav:hover {
    background: var(--blush);
    border-color: var(--blush-light);
}

.slider-prev {
    left: 16px;
}

.slider-next {
    right: 16px;
}

/* Lightbox */
.work-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(19, 15, 17, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.work-lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.lightbox-close:hover {
    background: var(--blush);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.15);
}

.lightbox-prev {
    left: 24px;
}

.lightbox-next {
    right: 24px;
}

@media (max-width: 768px) {
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .lightbox-prev {
        left: 12px;
    }

    .lightbox-next {
        right: 12px;
    }

    .slider-nav {
        display: none;
        /* Let them just swipe on mobile */
    }
}

.hero-description {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0 auto 40px;
    max-width: 600px;
    text-wrap: balance;
    transition: opacity 0.3s ease;
}

.single-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
}

.single-header .single-cat {
    display: inline-block;
    color: var(--blush);
    background: rgba(200, 116, 138, 0.1);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 14px;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.single-title {
    font-size: 48px;
    line-height: 1.1;
    margin-bottom: 24px;
}

.single-meta {
    font-size: 16px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.single-featured-image {
    margin-bottom: 60px;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.single-content-wrapper {
    max-width: 720px; /* Perfect reading width */
    margin: 0 auto;
}

.single-content {
    font-size: 19px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.single-content h2,
.single-content h3 {
    color: var(--text);
    margin: 40px 0 16px;
    font-weight: 600;
}

.single-content h2 {
    font-size: 28px;
}

.single-content h3 {
    font-size: 22px;
}

.single-content p {
    margin-bottom: 20px;
}

.single-content a {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--border-light);
    transition: text-decoration-color 0.3s;
}

.single-content a:hover {
    text-decoration-color: var(--text);
}

.single-content ul,
.single-content ol {
    margin: 0 0 20px 24px;
}

.single-content li {
    margin-bottom: 8px;
}

.single-content code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: var(--card);
    border: 1px solid var(--border);
    padding: 2px 6px;
    border-radius: 4px;
}

.single-content pre {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    overflow-x: auto;
    margin-bottom: 24px;
}

.single-content pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: 14px;
    line-height: 1.6;
}

.single-content blockquote {
    border-left: 3px solid var(--border-light);
    padding-left: 20px;
    margin: 0 0 20px;
    color: var(--text-secondary);
    font-style: italic;
}

.single-content img {
    border-radius: var(--radius-md);
    margin: 24px 0;
}

.single-footer {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.single-tags {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.single-tags-label {
    font-family: var(--font-mono);
    margin-right: 8px;
}

.single-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.single-nav-prev,
.single-nav-next {
    padding: 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: border-color 0.3s;
}

.single-nav-prev:hover,
.single-nav-next:hover {
    border-color: var(--border-light);
}

.single-nav-next {
    text-align: right;
}

.single-nav-single {
    grid-template-columns: 1fr;
}

.single-nav-single .single-nav-prev,
.single-nav-single .single-nav-next {
    grid-column: 1;
}

.single-nav-label {
    display: block;
    font-size: 12px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    margin-bottom: 4px;
}

.single-nav-title {
    font-size: 15px;
    font-weight: 500;
}

/* ---------- Comments ---------- */
.comments-area {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.comments-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 32px;
    letter-spacing: -0.02em;
}

.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment-item {
    margin-bottom: 24px;
}

.comment-body {
    padding: 24px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.comment-meta img {
    border-radius: 50%;
}

.comment-meta-inner {
    display: flex;
    flex-direction: column;
}

.comment-author {
    font-weight: 600;
    font-size: 15px;
}

.comment-author a {
    color: var(--text);
    text-decoration: none;
}

.comment-time {
    font-size: 12px;
    font-family: var(--font-mono);
    color: var(--text-muted);
}

.comment-content {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.comment-footer {
    display: flex;
    align-items: center;
    gap: 16px;
}

.comment-reply a {
    font-size: 13px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    transition: color 0.3s;
}

.comment-reply a:hover {
    color: var(--text);
}

.comment-edit a {
    font-size: 13px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    transition: color 0.3s;
}

.comment-edit a:hover {
    color: var(--text);
}

.no-comments {
    font-size: 15px;
    color: var(--text-muted);
    text-align: center;
    padding: 40px 0;
}

/* Comment Form */
.comment-respond {
    margin-top: 48px;
}

.comment-reply-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.comment-reply-title small {
    font-size: 14px;
    font-weight: 400;
}

.comment-reply-title small a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.comment-reply-title small a:hover {
    color: var(--text);
}

.comment-form {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px;
}

.comment-form .comment-form-author,
.comment-form .comment-form-email,
.comment-form .comment-form-url,
.comment-form .comment-form-comment {
    margin-bottom: 16px;
}

.comment-form label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-family: var(--font-mono);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
    outline: none;
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--border-light);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

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

.comment-form .form-allowed-tags {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.comment-form .form-submit {
    margin-top: 8px;
}

.children {
    list-style: none;
    margin: 24px 0 0 0;
    padding-left: 24px;
}

/* ---------- Search ---------- */
.search-header {
    margin-bottom: 48px;
}

.search-form {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.search-input {
    flex: 1;
    padding: 14px 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    border-color: var(--border-light);
}

/* ---------- Error 404 ---------- */
.error-404 {
    text-align: center;
    padding: 120px 0;
}

.error-code {
    font-size: clamp(80px, 20vw, 200px);
    font-weight: 900;
    letter-spacing: -0.06em;
    background: linear-gradient(135deg, #F5EFF2, var(--blush), #4A2030);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 24px;
}

/* ---------- Footer ---------- */
.footer {
    border-top: 1px solid var(--border);
    padding: 40px 0;
}

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

.footer-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.footer-logo {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 600;
}

.footer-copy {
    font-size: 13px;
    color: var(--text-muted);
}

.footer-location {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.footer-location-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--blush);
    box-shadow: 0 0 6px rgba(200, 116, 138, 0.5);
    animation: pulse-dot 3s ease-in-out infinite;
}

/* ---------- Scroll Animations ---------- */
[data-animate] {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

[data-animate].visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   LIGHT MODE — data-theme="light" on <html>
   ============================================================ */
[data-theme="light"] {
    --bg: #FDF8FA;
    --surface: #F5EEF2;
    --card: #FDEEF4;
    --border: #E8D5DE;
    --border-light: #D4A8BB;
    --text: #1A1014;
    --text-secondary: #5C404D;
    --text-muted: #9C7A88;
    --accent: #1A1014;
    --accent-dim: rgba(26, 16, 20, 0.06);
    --blush-glow: rgba(200, 116, 138, 0.08);
    --blush-border: rgba(200, 116, 138, 0.30);
}

[data-theme="light"] body {
    background: var(--bg);
}

[data-theme="light"] body::before {
    background: radial-gradient(ellipse 90% 70% at 15% -10%, rgba(200, 116, 138, 0.18) 0%, rgba(200, 116, 138, 0.06) 40%, transparent 70%), radial-gradient(ellipse 70% 60% at 85% 110%, rgba(200, 116, 138, 0.12) 0%, rgba(200, 116, 138, 0.04) 45%, transparent 70%);
}

[data-theme="light"] .nav.scrolled .nav-inner {
    background: rgba(253, 248, 250, 0.88);
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.10), 0 1px 0 rgba(200, 116, 138, 0.12) inset;
}

[data-theme="light"] .mobile-menu {
    background: rgba(253, 248, 250, 0.97);
}

[data-theme="light"] .cursor-glow {
    background: radial-gradient(circle, rgba(200, 116, 138, 0.05) 0%, rgba(200, 116, 138, 0.01) 40%, transparent 70%);
}

[data-theme="light"] ::selection {
    background: rgba(200, 116, 138, 0.30);
    color: #1A1014;
}

/* Cards & Surfaces */
[data-theme="light"] .about-card,
[data-theme="light"] .expertise-card,
[data-theme="light"] .work-card,
[data-theme="light"] .security-stat,
[data-theme="light"] .security-type,
[data-theme="light"] .writing-card,
[data-theme="light"] .contact-link,
[data-theme="light"] .contact-form-wrapper,
[data-theme="light"] .comment-body,
[data-theme="light"] .comment-form,
[data-theme="light"] .expertise-stack,
[data-theme="light"] .single-nav-prev,
[data-theme="light"] .single-nav-next {
    background: var(--card);
    border-color: var(--border);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .section-dark {
    background: var(--surface);
}

/* Inputs */
[data-theme="light"] .form-group input,
[data-theme="light"] .form-group select,
[data-theme="light"] .form-group textarea,
[data-theme="light"] .comment-form input,
[data-theme="light"] .comment-form textarea,
[data-theme="light"] .search-input {
    background: #fff;
    border-color: var(--border);
    color: var(--text);
}

[data-theme="light"] .form-group input:focus,
[data-theme="light"] .form-group textarea:focus,
[data-theme="light"] .comment-form input:focus,
[data-theme="light"] .comment-form textarea:focus {
    border-color: var(--blush);
    box-shadow: 0 0 0 3px rgba(200, 116, 138, 0.12);
}

/* Blog pagination */
[data-theme="light"] .blog-pagination .page-numbers {
    background: var(--card);
    border-color: var(--border);
    color: var(--text-secondary);
}

[data-theme="light"] .blog-pagination .page-numbers.current {
    background: var(--blush);
    color: #fff;
    border-color: var(--blush);
}

/* Footer */
[data-theme="light"] .footer {
    border-top-color: var(--border);
}

/* ---------- Robot Assistant ---------- */
.mhr-robot {
    position: fixed;
    bottom: -150px;
    right: 24px;
    width: 80px;
    height: 106px;
    z-index: 9999;
    cursor: pointer;
    border-radius: 40px 40px 12px 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.05);
    transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), transform 0.2s, border-color 0.2s;
    background: var(--surface);
}

.mhr-robot.is-visible {
    bottom: 24px;
}

.mhr-robot:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--blush);
    box-shadow: 0 15px 40px rgba(200, 116, 138, 0.2);
}

.mhr-robot-face {
    position: absolute;
    inset: 0;
    background-image: url('../images/hassan-head.jpg');
    background-size: cover;
    background-position: center top;
}

.mhr-robot-eye {
    position: absolute;
    width: 11px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

.mhr-robot-eye-left {
    left: 22px;
    top: 47px;
}

.mhr-robot-eye-right {
    right: 22px;
    top: 47px;
}

.mhr-robot-pupil {
    width: 4px;
    height: 4px;
    background: #111;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease-out;
}

/* Theme overrides in light mode */
[data-theme="light"] .theme-toggle {
    background: rgba(200, 116, 138, 0.10);
    border-color: var(--blush-border);
}

[data-theme="light"] .hero-title-accent {
    background: linear-gradient(135deg, #6B7280 0%, #374151 50%, #111827 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


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

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

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

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

    .hero-canvas {
        opacity: 0.3;
    }

    .hero-globe {
        opacity: 0.05;
    }
}

@media (max-width: 768px) {
    /* ---------- About Page Responsive ---------- */
    .about-page-hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    .about-page-details {
        margin: 0 auto;
    }
    .about-page-slider-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 8px;
    }
    .about-page-slider {
        width: 100%;
        text-align: center;
    }
    .about-research-grid {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .section {
        padding: 100px 0;
    }

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

    .hero-title {
        font-size: clamp(44px, 12vw, 80px);
    }

    .hero-stats {
        flex-direction: column;
        gap: 24px;
    }

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

    .hero-actions {
        flex-direction: column;
        gap: 12px;
    }

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

    .expertise-row {
        flex-direction: column;
        gap: 16px;
        padding: 32px 0;
    }

    .expertise-row-tags {
        justify-content: flex-start;
        flex: auto;
    }

    .work-masonry-grid,
    .work-grid-2col {
        grid-template-columns: 1fr;
    }

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

    .security-types {
        grid-template-columns: 1fr;
    }

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

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

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

    .footer-inner {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .footer-left {
        flex-direction: column;
        gap: 12px;
    }

    .single-nav {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .expertise-stack-grid {
        grid-template-columns: 1fr;
    }

    .contact-form-wrapper {
        padding: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    [data-animate] {
        opacity: 1;
        transform: none;
    }

    .cursor-glow {
        display: none;
    }
}