/* ============================================
   Hafs Ibrahim - Portfolio Styles
   Clean, modern, minimal design
   ============================================ */

:root {
    --bg: #0a0a0b;
    --bg-alt: #111113;
    --surface: #1a1a1e;
    --border: #2a2a2e;
    --text: #e4e4e7;
    --text-muted: #a1a1aa;
    --accent: #3b82f6;
    --accent-hover: #60a5fa;
    --accent-glow: rgba(59, 130, 246, 0.15);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --mono: 'JetBrains Mono', monospace;
}

/* Light theme — uses :root override to guarantee specificity */
html[data-theme="light"],
:root[data-theme="light"] {
    --bg: #faf8f5;
    --bg-alt: #f0ece6;
    --surface: #ffffff;
    --border: #e2ddd5;
    --text: #1a1a1e;
    --text-muted: #5c5c66;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-glow: rgba(37, 99, 235, 0.1);
}

[data-theme="light"] .nav {
    background: rgba(250, 248, 245, 0.85);
}

[data-theme="light"] .hero-bg {
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(37, 99, 235, 0.08), transparent),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(37, 99, 235, 0.03), transparent);
}

[data-theme="light"] .project-card.featured {
    border-color: rgba(37, 99, 235, 0.15);
    background: linear-gradient(135deg, var(--surface) 0%, rgba(37, 99, 235, 0.03) 100%);
}

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

[data-theme="light"] .project-tags span {
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .status-live {
    background: rgba(22, 163, 74, 0.08);
    color: #15803d;
    border-color: rgba(22, 163, 74, 0.2);
}

[data-theme="light"] .status-oss {
    background: rgba(37, 99, 235, 0.06);
    color: #1d4ed8;
    border-color: rgba(37, 99, 235, 0.15);
}

[data-theme="light"] .status-wip {
    background: rgba(202, 138, 4, 0.06);
    color: #a16207;
    border-color: rgba(202, 138, 4, 0.15);
}

[data-theme="light"] .project-link-soon {
    color: #a16207;
}

/* Light theme — hero + space overrides */
[data-theme="light"] .bar-amber { background: #d97706; }
[data-theme="light"] .bar-green { background: #16a34a; }
[data-theme="light"] .bar-blue { background: #2563eb; }
[data-theme="light"] .bar-dark { background: #9ca3af; }
[data-theme="light"] .hero-label { color: #be185d; }
[data-theme="light"] .hl-amber { background: rgba(217,119,6,0.12); color: #92400e; }
[data-theme="light"] .hl-rose { background: rgba(190,24,93,0.1); color: #9d174d; }
[data-theme="light"] .hl-green { background: rgba(22,163,74,0.1); color: #166534; }
[data-theme="light"] .hl-blue { background: rgba(37,99,235,0.1); color: #1e40af; }
[data-theme="light"] .hl-purple { background: rgba(126,34,206,0.1); color: #6b21a8; }
[data-theme="light"] .broadcast-icon { color: #d97706; }
[data-theme="light"] .ticker-text { color: var(--text-muted); }
[data-theme="light"] .broadcast-ticker::before { background: linear-gradient(to right, var(--bg), transparent); }
[data-theme="light"] .broadcast-ticker::after { background: linear-gradient(to left, var(--bg), transparent); }
[data-theme="light"] body::before { display: none; }
[data-theme="light"] body::after { display: none; }
[data-theme="light"] .hero-artifact { opacity: 0.2; }

/* eInk theme — grayscale paper */
html[data-theme="eink"],
:root[data-theme="eink"] {
    --bg: #e8e4da;
    --bg-alt: #ddd9cf;
    --surface: #f2efe8;
    --border: #c4bfb5;
    --text: #1a1a1a;
    --text-muted: #555555;
    --accent: #333333;
    --accent-hover: #111111;
    --accent-glow: rgba(0, 0, 0, 0.06);
}

[data-theme="eink"] .nav {
    background: rgba(232, 228, 218, 0.9);
}

[data-theme="eink"] .hero-bg {
    background: none;
}

[data-theme="eink"] .status-live { background: rgba(0,0,0,0.06); color: #333; border-color: #bbb; }
[data-theme="eink"] .status-oss { background: rgba(0,0,0,0.04); color: #444; border-color: #bbb; }
[data-theme="eink"] .status-wip { background: rgba(0,0,0,0.04); color: #555; border-color: #bbb; }
[data-theme="eink"] .project-link-soon { color: #666; }

/* eInk — hero overrides (grayscale) */
[data-theme="eink"] .bar-amber, [data-theme="eink"] .bar-green,
[data-theme="eink"] .bar-blue, [data-theme="eink"] .bar-dark { background: #999; }
[data-theme="eink"] .hero-label { color: #555; }
[data-theme="eink"] .hl-amber, [data-theme="eink"] .hl-rose,
[data-theme="eink"] .hl-green, [data-theme="eink"] .hl-blue,
[data-theme="eink"] .hl-purple { background: rgba(0,0,0,0.06); color: #1a1a1a; }
[data-theme="eink"] .broadcast-icon { color: #555; }
[data-theme="eink"] .ticker-text { color: #777; }
[data-theme="eink"] .broadcast-ticker::before { background: linear-gradient(to right, var(--bg), transparent); }
[data-theme="eink"] .broadcast-ticker::after { background: linear-gradient(to left, var(--bg), transparent); }
[data-theme="eink"] body::before { display: none; }
[data-theme="eink"] body::after { display: none; }
[data-theme="eink"] .hero-artifact { display: none; }

/* xterm theme — green on black terminal */
html[data-theme="xterm"],
:root[data-theme="xterm"] {
    --bg: #000000;
    --bg-alt: #0a0a0a;
    --surface: #111111;
    --border: #1a3a1a;
    --text: #33ff33;
    --text-muted: #20aa20;
    --accent: #00ff00;
    --accent-hover: #66ff66;
    --accent-glow: rgba(0, 255, 0, 0.08);
    --font: 'JetBrains Mono', 'Courier New', monospace;
}

[data-theme="xterm"] .nav {
    background: rgba(0, 0, 0, 0.95);
}

[data-theme="xterm"] .hero-bg {
    background: radial-gradient(ellipse 60% 40% at 50% -10%, rgba(0, 255, 0, 0.04), transparent);
}

[data-theme="xterm"] .status-live { background: rgba(0,255,0,0.08); color: #33ff33; border-color: rgba(0,255,0,0.3); }
[data-theme="xterm"] .status-oss { background: rgba(0,255,0,0.05); color: #20cc20; border-color: rgba(0,255,0,0.2); }
[data-theme="xterm"] .status-wip { background: rgba(0,255,0,0.05); color: #20aa20; border-color: rgba(0,255,0,0.15); }
[data-theme="xterm"] .project-link-soon { color: #20aa20; }
[data-theme="xterm"] .project-card.featured { border-color: rgba(0,255,0,0.15); background: linear-gradient(135deg, #111 0%, rgba(0,255,0,0.02) 100%); }
[data-theme="xterm"] .tag { background: rgba(0,255,0,0.06); color: #33ff33; }

/* xterm — hero overrides (green terminal) */
[data-theme="xterm"] .bar-amber, [data-theme="xterm"] .bar-green,
[data-theme="xterm"] .bar-blue, [data-theme="xterm"] .bar-dark { background: #00ff00; }
[data-theme="xterm"] .hero-label { color: #00ff00; }
[data-theme="xterm"] .hl-amber, [data-theme="xterm"] .hl-rose,
[data-theme="xterm"] .hl-green, [data-theme="xterm"] .hl-blue,
[data-theme="xterm"] .hl-purple { background: rgba(0,255,0,0.08); color: #33ff33; }
[data-theme="xterm"] .broadcast-icon { color: #00ff00; }
[data-theme="xterm"] .ticker-text { color: #20aa20; }
[data-theme="xterm"] .broadcast-ticker::before { background: linear-gradient(to right, #000, transparent); }
[data-theme="xterm"] .broadcast-ticker::after { background: linear-gradient(to left, #000, transparent); }
[data-theme="xterm"] body::before {
    background:
        repeating-linear-gradient(90deg, transparent, transparent 58px, rgba(0,255,0,0.1) 58px, rgba(0,255,0,0.1) 60px),
        repeating-linear-gradient(0deg, transparent, transparent 38px, rgba(0,255,0,0.08) 38px, rgba(0,255,0,0.08) 40px);
}
[data-theme="xterm"] body::after {
    background: linear-gradient(90deg, transparent 5%, rgba(0,255,0,0.2) 30%, rgba(0,255,0,0.15) 50%, rgba(0,255,0,0.2) 70%, transparent 95%);
    box-shadow: 0 0 30px 8px rgba(0,255,0,0.05), 0 0 80px 20px rgba(0,255,0,0.03);
}
[data-theme="xterm"] .hero-artifact { color: #00ff00 !important; opacity: 0.15; }

/* Drunk theme — wobbly chaos */
html[data-theme="drunk"],
:root[data-theme="drunk"] {
    --bg: #1a0a2e;
    --bg-alt: #220e3a;
    --surface: #2d1350;
    --border: #4a2080;
    --text: #ffccff;
    --text-muted: #cc88dd;
    --accent: #ff6ec7;
    --accent-hover: #ff99dd;
    --accent-glow: rgba(255, 110, 199, 0.15);
}

[data-theme="drunk"] .nav {
    background: rgba(26, 10, 46, 0.9);
}

[data-theme="drunk"] .hero-bg {
    background:
        radial-gradient(ellipse 80% 50% at 30% -20%, rgba(255, 110, 199, 0.12), transparent),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(110, 200, 255, 0.08), transparent);
}

@keyframes wobble {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(0.5deg) translateX(2px); }
    50% { transform: rotate(-0.3deg) translateY(1px); }
    75% { transform: rotate(0.4deg) translateX(-1px); }
}

[data-theme="drunk"] .section,
[data-theme="drunk"] .hero-content,
[data-theme="drunk"] .timeline-content {
    animation: wobble 3s ease-in-out infinite;
}

[data-theme="drunk"] .status-live { background: rgba(255,110,199,0.12); color: #ff99dd; border-color: rgba(255,110,199,0.3); }
[data-theme="drunk"] .status-oss { background: rgba(110,200,255,0.1); color: #88ccff; border-color: rgba(110,200,255,0.25); }
[data-theme="drunk"] .status-wip { background: rgba(255,200,50,0.1); color: #ffcc33; border-color: rgba(255,200,50,0.2); }
[data-theme="drunk"] .project-link-soon { color: #ffcc33; }
[data-theme="drunk"] .project-card.featured { border-color: rgba(255,110,199,0.2); background: linear-gradient(135deg, #2d1350 0%, rgba(255,110,199,0.05) 100%); }

/* Drunk — hero overrides (neon chaos) */
[data-theme="drunk"] .bar-amber { background: #ff6ec7; }
[data-theme="drunk"] .bar-green { background: #6ec8ff; }
[data-theme="drunk"] .bar-blue { background: #ffcc33; }
[data-theme="drunk"] .bar-dark { background: #cc88dd; }
[data-theme="drunk"] .hero-label { color: #ff6ec7; }
[data-theme="drunk"] .hl-amber { background: rgba(255,110,199,0.15); color: #ff99dd; }
[data-theme="drunk"] .hl-rose { background: rgba(110,200,255,0.15); color: #88ccff; }
[data-theme="drunk"] .hl-green { background: rgba(255,200,50,0.15); color: #ffcc33; }
[data-theme="drunk"] .hl-blue { background: rgba(180,120,255,0.15); color: #cc88ff; }
[data-theme="drunk"] .hl-purple { background: rgba(255,150,100,0.15); color: #ff9966; }
[data-theme="drunk"] .broadcast-icon { color: #ff6ec7; }
[data-theme="drunk"] .ticker-text { color: #cc88dd; }
[data-theme="drunk"] .broadcast-ticker::before { background: linear-gradient(to right, var(--bg), transparent); }
[data-theme="drunk"] .broadcast-ticker::after { background: linear-gradient(to left, var(--bg), transparent); }
[data-theme="drunk"] body::before {
    background:
        repeating-linear-gradient(90deg, transparent, transparent 58px, rgba(255,110,199,0.1) 58px, rgba(255,110,199,0.1) 60px),
        repeating-linear-gradient(0deg, transparent, transparent 38px, rgba(110,200,255,0.07) 38px, rgba(110,200,255,0.07) 40px);
}
[data-theme="drunk"] body::after {
    background: linear-gradient(90deg, transparent 5%, rgba(255,110,199,0.2) 30%, rgba(110,200,255,0.15) 50%, rgba(255,110,199,0.2) 70%, transparent 95%);
    box-shadow: 0 0 30px 8px rgba(255,110,199,0.06), 0 0 80px 20px rgba(110,200,255,0.04);
}
[data-theme="drunk"] .hero-artifact-1 { color: #ff6ec7; }
[data-theme="drunk"] .hero-artifact-2 { color: #6ec8ff; }
[data-theme="drunk"] .hero-artifact-3 { color: #ffcc33; }
[data-theme="drunk"] .hero-artifact-4 { color: #cc88ff; }
[data-theme="drunk"] .hero-artifact-5 { color: #ff9966; }



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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Tron deep space — the outer void behind the portfolio */
body::before {
    content: '';
    position: fixed;
    bottom: 0;
    left: -50%;
    right: -50%;
    height: 60%;
    z-index: 0;
    pointer-events: none;
    background:
        /* Vertical grid lines */
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 58px,
            rgba(236, 72, 153, 0.1) 58px,
            rgba(236, 72, 153, 0.1) 60px
        ),
        /* Horizontal grid lines */
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 38px,
            rgba(236, 72, 153, 0.08) 38px,
            rgba(236, 72, 153, 0.08) 40px
        );
    transform: perspective(300px) rotateX(60deg);
    transform-origin: center top;
}

/* Horizon glow line */
body::after {
    content: '';
    position: fixed;
    left: 0;
    right: 0;
    top: 42%;
    height: 2px;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(90deg, transparent 5%, rgba(236, 72, 153, 0.15) 30%, rgba(59, 130, 246, 0.12) 50%, rgba(236, 72, 153, 0.15) 70%, transparent 95%);
    box-shadow: 0 0 30px 8px rgba(236, 72, 153, 0.05), 0 0 80px 20px rgba(59, 130, 246, 0.03);
}

/* Portfolio content island — floats over the void */
.nav {
    position: relative;
    z-index: 1;
    background: var(--bg);
}

.hero,
.section,
footer {
    position: relative;
    z-index: 1;
    background: transparent;
}

.container {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

/* ---- Navigation ---- */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 11, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

.nav.scrolled {
    border-bottom-color: var(--border);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    font-family: var(--mono);
}

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

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
    letter-spacing: 0.02em;
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

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

/* Theme cycle button — sits in nav */
.theme-cycle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 6px 12px 6px 8px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    margin-left: 8px;
}

.theme-cycle:hover {
    border-color: var(--accent);
    background: var(--accent-glow);
}

.theme-icon {
    font-size: 0.85rem;
    line-height: 1;
}

.theme-name {
    font-family: var(--mono);
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: lowercase;
}

.theme-cycle:hover .theme-name {
    color: var(--text);
}

/* ---- Hero ---- */

.hero {
    min-height: auto;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* Subtle hero glow */
.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, var(--accent-glow), transparent),
        radial-gradient(ellipse 50% 30% at 50% 100%, rgba(236, 72, 153, 0.04), transparent);
    pointer-events: none;
}

/* Floating artifact icons — Minecraft-style collectibles */
.hero-artifact {
    position: absolute;
    pointer-events: none;
    opacity: 0.12;
    font-size: 1.4rem;
    filter: drop-shadow(0 0 6px currentColor);
}

.hero-artifact-1 {
    right: 8%;
    top: 20%;
    color: #f59e0b;
    animation: artifact-float 6s ease-in-out infinite;
}

.hero-artifact-2 {
    right: 15%;
    top: 55%;
    color: #ec4899;
    animation: artifact-float 8s ease-in-out infinite 1s;
}

.hero-artifact-3 {
    right: 5%;
    top: 70%;
    color: #3b82f6;
    animation: artifact-float 7s ease-in-out infinite 2s;
}

.hero-artifact-4 {
    right: 25%;
    top: 35%;
    color: #22c55e;
    animation: artifact-float 9s ease-in-out infinite 0.5s;
}

.hero-artifact-5 {
    right: 12%;
    bottom: 20%;
    color: #a855f7;
    animation: artifact-float 7.5s ease-in-out infinite 3s;
}

@keyframes artifact-float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.12;
    }
    25% {
        transform: translateY(-12px) rotate(5deg);
        opacity: 0.18;
    }
    50% {
        transform: translateY(-6px) rotate(-3deg);
        opacity: 0.1;
    }
    75% {
        transform: translateY(-15px) rotate(2deg);
        opacity: 0.16;
    }
}

.hero-content {
    position: relative;
    max-width: 720px;
    padding: 90px 0 40px;
}

/* Multi-color accent bar */
.hero-accent-bar {
    display: flex;
    gap: 4px;
    margin-bottom: 28px;
}

.bar-seg {
    height: 4px;
    border-radius: 2px;
}

.bar-amber { width: 48px; background: #f59e0b; }
.bar-green { width: 36px; background: #22c55e; }
.bar-blue { width: 28px; background: #3b82f6; }
.bar-dark { width: 20px; background: #6b7280; }

.hero-name {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

/* "DEFINITION" label */
.hero-label {
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: #ec4899;
    margin-bottom: 12px;
}

/* Dictionary-style definition text */
.hero-definition {
    font-size: clamp(1.25rem, 3vw, 1.65rem);
    font-weight: 600;
    line-height: 1.6;
    color: var(--text);
    margin-bottom: 32px;
    letter-spacing: -0.01em;
}

/* Highlighted keyword spans */
.hl {
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
}

@media (min-width: 769px) {
    .hl { white-space: nowrap; }
}

.hl-amber { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.hl-rose { background: rgba(236, 72, 153, 0.15); color: #f472b6; }
.hl-green { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.hl-blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.hl-purple { background: rgba(168, 85, 247, 0.15); color: #c084fc; }

/* Broadcast feed — sci-fi marquee ticker */
.broadcast-feed {
    margin-bottom: 32px;
    max-width: 100%;
    overflow: hidden;
}

.broadcast-divider {
    height: 1px;
    background: var(--border);
    margin-bottom: 12px;
}

.broadcast-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.broadcast-icon {
    color: #f59e0b;
    font-size: 0.75rem;
    animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.broadcast-ticker {
    overflow: hidden;
    position: relative;
    padding: 8px 0;
}

/* Fade masks on edges */
.broadcast-ticker::before,
.broadcast-ticker::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    z-index: 2;
    pointer-events: none;
}

.broadcast-ticker::before {
    left: 0;
    background: linear-gradient(to right, var(--bg), transparent);
}

.broadcast-ticker::after {
    right: 0;
    background: linear-gradient(to left, var(--bg), transparent);
}

.ticker-track {
    display: flex;
    width: max-content;
    animation: ticker-scroll 30s linear infinite;
}

.ticker-text {
    font-family: var(--mono);
    font-size: clamp(0.85rem, 2vw, 1.1rem);
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    letter-spacing: 0.08em;
    background-image: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.3) 2px,
        rgba(0, 0, 0, 0.3) 4px
    );
    -webkit-background-clip: text;
    background-clip: text;
    position: relative;
}

/* Scanline overlay on the ticker area */
.broadcast-ticker::before {
    /* keep the fade mask */
}

.ticker-track::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 2px,
        rgba(0, 0, 0, 0.15) 2px,
        rgba(0, 0, 0, 0.15) 4px
    );
    pointer-events: none;
}

.ticker-track {
    position: relative;
}

@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

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

.hero-cta {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.hero-links {
    display: flex;
    gap: 20px;
}

.hero-links a {
    color: var(--text-muted);
    transition: color 0.2s, transform 0.2s;
    display: flex;
}

.hero-links a:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

/* ---- Buttons ---- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    font-family: var(--font);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--accent-glow);
}

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

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
}

/* ---- Sections ---- */

.section {
    padding: 100px 0;
}

.section-alt {
    background: transparent;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 48px;
    letter-spacing: -0.02em;
}

.section-title::after {
    content: '.';
    color: var(--accent);
}

/* ---- About ---- */

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

.about-text p {
    color: var(--text-muted);
    margin-bottom: 16px;
    font-size: 1rem;
}

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

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: border-color 0.2s, transform 0.2s;
}

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

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    font-family: var(--mono);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 4px;
    display: block;
}

/* ---- Timeline ---- */

.timeline {
    position: relative;
    padding-left: 32px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 48px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -32px;
    top: 8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--accent);
    z-index: 1;
}

.timeline-item:first-child .timeline-marker {
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
}

.timeline-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px;
    transition: border-color 0.2s;
}

.timeline-content:hover {
    border-color: rgba(59, 130, 246, 0.3);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 16px;
}

.timeline-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
}

.company {
    font-size: 0.95rem;
    color: var(--accent);
    font-weight: 500;
}

.date {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--mono);
    white-space: nowrap;
    padding-top: 2px;
}

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.tag {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--accent-glow);
    color: var(--accent-hover);
    font-weight: 500;
    letter-spacing: 0.02em;
}

.timeline-details {
    list-style: none;
}

.timeline-details li {
    color: var(--text-muted);
    font-size: 0.9rem;
    padding-left: 16px;
    position: relative;
    margin-bottom: 8px;
    line-height: 1.7;
}

.timeline-details li:last-child {
    margin-bottom: 0;
}

.timeline-details li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border);
}

.timeline-details strong {
    color: var(--text);
    font-weight: 600;
}

/* ---- Projects ---- */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}

.project-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--accent-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--accent);
}

.project-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.project-card p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.7;
    flex: 1;
    margin-bottom: 16px;
}

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

.project-tags span {
    font-size: 0.75rem;
    font-family: var(--mono);
    color: var(--text-muted);
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 600px;
    margin-bottom: 48px;
    line-height: 1.7;
}

.projects-category {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.projects-category:not(:first-of-type) {
    margin-top: 56px;
}

.category-icon {
    color: var(--accent);
    font-size: 0.7rem;
}

.featured-grid {
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)) !important;
}

.project-card.featured {
    border-color: rgba(59, 130, 246, 0.2);
    background: linear-gradient(135deg, var(--surface) 0%, rgba(59, 130, 246, 0.03) 100%);
}

.project-card.featured:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 32px var(--accent-glow);
}

.project-status {
    margin-bottom: 12px;
}

.status-badge {
    font-size: 0.7rem;
    font-family: var(--mono);
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.status-live {
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.status-oss {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-hover);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.status-wip {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.project-card p.project-what {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 8px;
    font-family: var(--mono);
    flex: none;
}

.project-links {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.project-link-muted {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    opacity: 0.6;
}

.project-link-soon {
    font-size: 0.75rem;
    font-family: var(--mono);
    color: #fbbf24;
    opacity: 0.7;
    font-style: italic;
}

.project-link-github {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    transition: color 0.2s;
}

.project-link-github:hover {
    color: var(--accent);
}

.projects-more {
    text-align: center;
    margin-top: 40px;
}

/* ---- Skills ---- */

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 32px;
}

.skill-group h3 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 16px;
    font-weight: 600;
}

.skill-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-pills span {
    font-size: 0.85rem;
    padding: 6px 14px;
    border-radius: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    transition: border-color 0.2s, color 0.2s;
}

.skill-pills span:hover {
    border-color: var(--accent);
    color: var(--text);
}

/* ---- Consulting ---- */

.section-consulting {
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.consulting-box {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px 32px;
    text-align: center;
}

.consulting-header {
    margin-bottom: 32px;
}

.consulting-accent-bar {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
}

.consulting-accent-bar .bar-seg {
    width: 32px;
    height: 3px;
    border-radius: 2px;
}

.consulting-box h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.consulting-label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--accent);
    text-transform: uppercase;
}

.consulting-content {
    margin-bottom: 40px;
}

.consulting-content > p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 32px;
}

.consulting-services {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 600px;
    margin: 0 auto;
}

.consulting-service {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    padding: 12px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text);
}

.consulting-service .service-icon {
    color: var(--accent);
    font-size: 0.8rem;
    flex-shrink: 0;
}

.consulting-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.consulting-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

@media (max-width: 768px) {
    .consulting-box {
        padding: 32px 20px;
    }

    .consulting-box h2 {
        font-size: 1.5rem;
    }

    .consulting-services {
        gap: 12px;
    }
}

/* ---- Contact ---- */

.contact-box {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-box h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.contact-box p {
    color: var(--text-muted);
    margin-bottom: 32px;
    font-size: 1.05rem;
    line-height: 1.8;
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

/* ---- Footer ---- */

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

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

/* ---- Animations ---- */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* ---- Responsive ---- */

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: rgba(10, 10, 11, 0.95);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 24px;
        gap: 20px;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

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

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

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

    .theme-name {
        display: none;
    }

    .theme-cycle {
        padding: 8px 10px;
        margin-left: auto;
        margin-right: 12px;
        z-index: 101;
        position: relative;
        min-width: 36px;
        min-height: 36px;
        justify-content: center;
    }

    .nav-toggle {
        flex-shrink: 0;
    }

    .hero-content {
        padding: 72px 0 20px;
    }

    .hero-artifact {
        display: none;
    }

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

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

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

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

    .featured-grid {
        grid-template-columns: 1fr !important;
    }

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

    .section {
        padding: 72px 0;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
    }

    .btn {
        justify-content: center;
    }

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

    .stat {
        padding: 16px;
    }

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

    .timeline {
        padding-left: 24px;
    }

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

    .timeline::before {
        left: 5px;
    }

    .timeline-content {
        padding: 20px;
    }
}

/* ============================================
   Journey Map Section
   ============================================ */

#journey {
    padding-bottom: 40px;
    overflow: hidden;
}

.journey-map-wrap {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.journey-map {
    width: 100%;
    height: auto;
    display: block;
    cursor: default;
    transition: viewBox 0.6s ease;
}

/* City dots */
.journey-city {
    cursor: pointer;
    outline: none;
}

.journey-city:focus-visible .journey-dot {
    stroke: var(--text);
    stroke-width: 2;
}

.journey-dot {
    transition: r 0.3s ease, opacity 0.3s ease;
    filter: url(#glow);
}

.journey-dot-pulse {
    animation: journeyPulse 2.5s ease-in-out infinite;
}

.journey-dot-glow {
    animation: journeyGlow 3s ease-in-out infinite;
}

@keyframes journeyPulse {
    0%, 100% { opacity: 0.3; r: 8; }
    50% { opacity: 0.15; r: 14; }
}

@keyframes journeyGlow {
    0%, 100% { opacity: 0.15; r: 12; }
    50% { opacity: 0.08; r: 20; }
}

.journey-city:hover .journey-dot { r: 7; }
.journey-city:hover .journey-dot-pulse { r: 12; }
.journey-city:hover .journey-label { opacity: 1; }

.journey-label {
    fill: var(--text-muted);
    font-size: 12px;
    font-family: var(--font);
    font-weight: 500;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Radar/sonar for Abu Dhabi */
.journey-radar {
    animation: journeyRadar 3s ease-out infinite;
}

.journey-radar-2 {
    animation-delay: 1.5s;
}

@keyframes journeyRadar {
    0% { r: 6; opacity: 0.5; }
    100% { r: 50; opacity: 0; }
}

/* Flight path segments - draw animation */
.journey-flight-seg {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
}

.journey-flight-seg.drawn {
    transition: stroke-dashoffset 1.2s ease-in-out;
    stroke-dashoffset: 0;
}

.journey-flight-path {
    display: none;
}

.journey-flight-path.visible {
    display: block;
    animation: journeyDash 20s linear infinite;
}

@keyframes journeyDash {
    0% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -280; }
}

/* Zoomed state */
.journey-map-wrap.zoomed .journey-city {
    transition: opacity 0.4s ease;
}

.journey-map-wrap.zoomed .journey-city.faded {
    opacity: 0.25;
}

.journey-map-wrap.zoomed .journey-city.faded .journey-label {
    opacity: 0;
}

.journey-map-wrap.zoomed .journey-city.active .journey-dot { r: 8; }
.journey-map-wrap.zoomed .journey-city.active .journey-dot-glow { r: 18; opacity: 0.25; }

/* Experience card overlay */
.journey-card-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.journey-card {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateY(12px) scale(0.96);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    max-width: 420px;
    width: 90%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease, transform 0.35s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 101;
    max-height: 85vh;
    overflow-y: auto;
}

.journey-card.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

.journey-card-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.journey-card-close:hover {
    color: var(--text);
    background: var(--accent-glow);
}

.journey-card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.journey-card-city {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}

.journey-card-years {
    font-size: 0.8rem;
    color: var(--accent);
    font-family: var(--mono);
    font-weight: 500;
}

.journey-card-role {
    margin-bottom: 16px;
}

.journey-card-role:last-child {
    margin-bottom: 0;
}

.journey-card-role h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}

.journey-card-company {
    display: block;
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 2px;
}

.journey-card-period {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--mono);
    margin-bottom: 8px;
}

.journey-card-role p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 8px;
}

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

.journey-card-tags span {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 4px;
    background: var(--accent-glow);
    color: var(--accent);
    font-family: var(--mono);
    font-weight: 500;
    white-space: nowrap;
}

/* Card positions - all centered in viewport */
#journey-card-cairo,
#journey-card-london,
#journey-card-dubai,
#journey-card-abudhabi {
    /* All cards centered via fixed positioning above */
}

/* Mobile journey cards */
.journey-mobile {
    display: none;
    padding: 0 24px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.journey-mobile::-webkit-scrollbar {
    display: none;
}

.journey-mobile-track {
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 20px 0 24px;
    min-width: max-content;
}

.journey-mobile-connector {
    width: 40px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.journey-mobile-connector::before {
    content: '';
    display: block;
    width: 100%;
    height: 2px;
    background: var(--accent);
    opacity: 0.3;
}

.journey-mobile-connector::after {
    content: '';
    position: absolute;
    right: -2px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid var(--accent);
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    opacity: 0.4;
}

.journey-mobile-card {
    flex: 0 0 280px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    position: relative;
}

.journey-mobile-current {
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

.journey-mobile-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    margin-bottom: 12px;
    box-shadow: 0 0 8px var(--accent-glow);
}

.journey-mobile-current .journey-mobile-dot {
    animation: journeyPulseMobile 2s ease-in-out infinite;
}

@keyframes journeyPulseMobile {
    0%, 100% { box-shadow: 0 0 8px var(--accent-glow); }
    50% { box-shadow: 0 0 20px var(--accent-glow), 0 0 40px var(--accent-glow); }
}

.journey-mobile-city {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}

.journey-mobile-period {
    display: block;
    font-size: 0.75rem;
    color: var(--accent);
    font-family: var(--mono);
    font-weight: 500;
    margin-bottom: 12px;
}

.journey-mobile-roles {
    margin-bottom: 12px;
}

.journey-mobile-role {
    margin-bottom: 10px;
}

.journey-mobile-role:last-child {
    margin-bottom: 0;
}

.journey-mobile-role strong {
    display: block;
    font-size: 0.85rem;
    color: var(--text);
    margin-bottom: 1px;
}

.journey-mobile-role span {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.journey-mobile-role p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Responsive: show mobile, hide map */
@media (max-width: 768px) {
    .journey-map-wrap {
        display: none;
    }

    .journey-mobile {
        display: block;
    }
}

@media (min-width: 769px) {
    .journey-mobile {
        display: none !important;
    }
}
