/* ============================================================
   PORTFOLIO — Muhammad Aji Sakha
   style.css | v2.0
   ============================================================ */

/* ===== CSS RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }

/* ===== DESIGN TOKENS ===== */
:root {
    --bg-base:       #0d0b14;
    --bg-surface:    #13101f;
    --bg-card:       #1a1628;
    --bg-card-2:     #201b32;
    --border:        rgba(140, 100, 220, 0.18);
    --border-hover:  rgba(160, 120, 240, 0.40);

    --purple-100:    #ede9ff;
    --purple-200:    #c4b5fd;
    --purple-300:    #a78bfa;
    --purple-400:    #8b5cf6;
    --purple-500:    #7c3aed;
    --purple-600:    #6d28d9;

    --violet-bright: #b06ef3;
    --violet-glow:   rgba(180, 90, 255, 0.15);
    --violet-glow-s: rgba(180, 90, 255, 0.08);

    --text-primary:  #f0ecff;
    --text-secondary:#b8acd8;
    --text-muted:    #7a6fa0;

    --gold:  #f5c842;
    --green: #34d399;
    --red:   #f87171;

    --radius-sm:   6px;
    --radius-md:   12px;
    --radius-lg:   20px;
    --radius-xl:   28px;
    --radius-pill: 999px;

    --transition:      0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.15s ease;

    --font-main:   'Space Grotesk', sans-serif;
    --font-mono:   'Space Mono', monospace;
    --font-arabic: 'Noto Kufi Arabic', sans-serif;
}

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

/* ===== BACKGROUND GRID ===== */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(140, 90, 220, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(140, 90, 220, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}
body::after {
    content: '';
    position: fixed;
    top: -30%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(120, 60, 200, 0.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ===== UTILITY ===== */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--purple-500); border-radius: var(--radius-pill); }

/* ===== SELECTION ===== */
::selection { background: var(--purple-400); color: white; }

/* ===== TOP PROGRESS BAR ===== */
#progress-bar {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--purple-500), var(--violet-bright), #e879f9);
    z-index: 101;
    width: 0%;
    transition: width 0.1s linear;
}

/* ===== NAVBAR ===== */
#navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 0 1.5rem;
    height: 4.5rem;
    display: flex;
    align-items: center;
    background: rgba(13, 11, 20, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}
#navbar .nav-inner {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.nav-logo {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--violet-bright);
    text-decoration: none;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}
.nav-logo .logo-bracket { color: var(--text-muted); }
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
}
.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-md);
    transition: color var(--transition-fast), background var(--transition-fast);
}
.nav-links a:hover  { color: var(--text-primary); background: rgba(140, 90, 220, 0.1); }
.nav-links a.active { color: var(--violet-bright); }
.nav-right {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
}
.lang-btn {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.3rem 0.55rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    letter-spacing: 0.5px;
}
.lang-btn.active,
.lang-btn:hover {
    color: var(--violet-bright);
    border-color: var(--purple-400);
    background: rgba(124, 58, 237, 0.15);
}
.btn-contact-nav {
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    background: var(--purple-500);
    text-decoration: none;
    padding: 0.45rem 1rem;
    border-radius: var(--radius-pill);
    transition: all var(--transition-fast);
    border: 1px solid transparent;
    white-space: nowrap;
}
.btn-contact-nav:hover {
    background: var(--purple-400);
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.4);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 0.5rem;
    background: none;
    border: none;
}
.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: all var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== MOBILE MENU ===== */
#mobile-menu {
    position: fixed;
    top: 4.5rem; left: 0; right: 0;
    background: rgba(18, 14, 30, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 99;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
#mobile-menu.open { max-height: 500px; }
#mobile-menu ul {
    list-style: none;
    padding: 1rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
#mobile-menu ul a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}
#mobile-menu ul a:hover { color: var(--violet-bright); background: rgba(124, 58, 237, 0.1); }
.mobile-lang-row {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
}
.mobile-contact-btn {
    display: block;
    text-align: center;
    margin: 0.5rem 1rem 0;
    padding: 0.75rem;
    background: var(--purple-500);
    color: white;
    border-radius: var(--radius-lg);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background var(--transition-fast);
}
.mobile-contact-btn:hover { background: var(--purple-400); }

/* ===== CUSTOM CURSOR (desktop only) ===== */
.cursor-dot {
    position: fixed;
    width: 8px; height: 8px;
    background: var(--violet-bright);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, background 0.2s;
    mix-blend-mode: screen;
}
.cursor-ring {
    position: fixed;
    width: 32px; height: 32px;
    border: 1.5px solid var(--purple-400);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: transform 0.12s ease, width 0.2s, height 0.2s, opacity 0.2s;
    opacity: 0.5;
}

/* ===== HERO SECTION ===== */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8.5rem 1.5rem 4rem;
    position: relative;
    /* overflow:hidden removed so pixel-dot decorators outside the avatar frame stay visible */
}
.hero-inner {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 4rem;
    align-items: center;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(124, 58, 237, 0.12);
    border: 1px solid rgba(124, 58, 237, 0.35);
    color: var(--violet-bright);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-pill);
    letter-spacing: 0.3px;
    margin-bottom: 1.5rem;
}
.hero-badge .pulse {
    width: 7px; height: 7px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(0.85); }
}
.hero-name {
    font-size: clamp(2.2rem, 5vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 1.25rem;
}
.hero-name .highlight {
    background: linear-gradient(135deg, var(--purple-300) 0%, var(--violet-bright) 50%, #e879f9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 520px;
    margin-bottom: 2.25rem;
    line-height: 1.75;
}
.hero-desc strong { color: var(--text-primary); font-weight: 600; }
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--purple-500);
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    transition: all var(--transition);
    border: 1px solid transparent;
    cursor: pointer;
}
.btn-primary:hover {
    background: var(--purple-400);
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.45);
    transform: translateY(-1px);
}
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: all var(--transition);
}
.btn-secondary:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-1px);
}

/* ===== HERO AVATAR ===== */
.hero-avatar-wrap {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    overflow: visible; /* allow pixel dots to render outside frame */
}
.hero-avatar-frame {
    position: relative;
    width: 280px;
    height: 280px;
}
.hero-avatar-glow {
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle, rgba(140, 60, 230, 0.35) 0%, transparent 70%);
    border-radius: 50%;
    animation: glow-pulse 4s ease-in-out infinite;
    z-index: 0;
}
@keyframes glow-pulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50%       { opacity: 1;   transform: scale(1.05); }
}
/* Spinning conic-gradient ring — cross-browser reliable */
.hero-avatar-border {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--purple-400), #e879f9, var(--purple-200), var(--purple-400));
    animation: border-spin 6s linear infinite;
    z-index: 2;
    padding: 3px;
}
.hero-avatar-border::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--bg-base);
}
@keyframes border-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
.hero-avatar-border-2 {
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    border: 1px solid rgba(124, 58, 237, 0.2);
    animation: border-spin 14s linear infinite reverse;
    z-index: 1;
}
.hero-avatar-img {
    position: absolute;
    inset: 0;
    z-index: 3;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}
/* Pixel dots decoration */
.pixel-dot {
    position: absolute;
    border-radius: 3px;
    opacity: 0.9;
    animation: float 3s ease-in-out infinite;
    z-index: 5;
    pointer-events: none;
}
/* Dot 1 — gold, top-right
   pixel-dot is 4th child inside .hero-avatar-frame
   (glow=1, border-2=2, border=3, dot=4,5,6) */
.pixel-dot:nth-child(4) {
    width: 10px; height: 10px;
    top: -14px; right: 28px;
    background: var(--gold);
    animation-delay: 0s;
    box-shadow: 0 0 10px var(--gold);
}
/* Dot 2 — green, bottom-left */
.pixel-dot:nth-child(5) {
    width: 8px; height: 8px;
    bottom: 18px; left: -14px;
    background: var(--green);
    animation-delay: 1.1s;
    box-shadow: 0 0 10px var(--green);
}
/* Dot 3 — violet, middle-right */
.pixel-dot:nth-child(6) {
    width: 12px; height: 12px;
    top: 40%; right: -18px;
    background: var(--violet-bright);
    animation-delay: 2.2s;
    box-shadow: 0 0 12px var(--violet-bright);
    border-radius: 3px;
}
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%       { transform: translateY(-10px) rotate(8deg); }
}

/* Hero stats row */
.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}
.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.825rem;
}
.stat-item i { color: var(--purple-300); font-size: 0.9rem; }
.stat-item a { color: inherit; text-decoration: none; transition: color var(--transition-fast); }
.stat-item a:hover { color: var(--violet-bright); }

/* ===== SECTION BASE ===== */
.section { padding: 5rem 1.5rem; position: relative; z-index: 1; }
.section-alt {
    background: rgba(255, 255, 255, 0.015);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.section-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--purple-300);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.section-label::before { content: '//'; color: var(--text-muted); }
.section-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}
.section-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 3rem;
}
.section-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1rem;
}

/* ===== CARDS BASE ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    transition: all var(--transition);
}
.card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-2);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(140, 90, 220, 0.1);
}

/* ===== ABOUT SECTION ===== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    min-width: 0;
}
.about-card { 
    padding: 2rem; 
    min-width: 0;
    max-width: 100%;
}
.about-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 1.25rem;
}
.contact-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: color var(--transition-fast);
    word-break: break-word;
}
.contact-row:last-child { border-bottom: none; }
.contact-row a { 
    color: inherit; 
    text-decoration: none; 
    transition: color var(--transition-fast);
    word-break: break-all;
}
.contact-row:hover,
.contact-row a:hover { color: var(--violet-bright); }
.contact-row i { width: 18px; text-align: center; color: var(--purple-400); font-size: 0.9rem; }

/* Education Timeline */
.edu-timeline {
    position: relative;
    padding-left: 1.5rem;
}
.edu-timeline::before {
    content: '';
    position: absolute;
    left: 0; top: 8px; bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--purple-500), transparent);
}
.edu-item { position: relative; padding-bottom: 1.5rem; }
.edu-dot {
    position: absolute;
    left: -1.5rem; top: 6px;
    width: 10px; height: 10px;
    border-radius: 2px;
    background: var(--purple-500);
    border: 2px solid var(--bg-base);
    transform: translateX(-4px);
}
.edu-year   { font-family: var(--font-mono); font-size: 0.72rem; color: var(--purple-300); font-weight: 700; letter-spacing: 0.5px; }
.edu-school { font-weight: 700; font-size: 1.1rem; margin: 0.25rem 0; }
.edu-detail { font-size: 0.85rem; color: var(--text-muted); }
.edu-gpa    { font-family: var(--font-mono); font-size: 0.82rem; color: var(--green); font-weight: 700; margin-top: 0.35rem; }

/* Achievements */
.ach-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 1.5rem;
}
.ach-item {
    background: rgba(124, 58, 237, 0.07);
    border: 1px solid rgba(124, 58, 237, 0.15);
    border-radius: var(--radius-md);
    padding: 0.875rem 1rem;
    transition: all var(--transition-fast);
}
.ach-item:hover { background: rgba(124, 58, 237, 0.12); border-color: rgba(124, 58, 237, 0.3); }
.ach-title { font-weight: 700; font-size: 0.875rem; color: var(--text-primary); }
.ach-sub   { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.2rem; }
.ach-icon  { font-size: 1.1rem; margin-bottom: 0.5rem; }
.ach-item.wide { grid-column: span 2; }

/* ===== SKILLS SECTION ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.skill-card { padding: 1.75rem; }
.skill-icon-wrap {
    width: 48px; height: 48px;
    background: rgba(124, 58, 237, 0.12);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    color: var(--violet-bright);
    margin-bottom: 1.25rem;
}
.skill-card-title { font-weight: 700; font-size: 1rem; margin-bottom: 1rem; }
.tag-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-pill);
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.2);
    color: var(--purple-200);
    transition: all var(--transition-fast);
}
.tag:hover { background: rgba(124, 58, 237, 0.2); }
.tag.green { background: rgba(52, 211, 153, 0.08); border-color: rgba(52, 211, 153, 0.2); color: #6ee7b7; }
.tag.gold  { background: rgba(245, 200, 66, 0.08);  border-color: rgba(245, 200, 66, 0.2);  color: #fde68a; }

/* Language bars */
.lang-row { margin-bottom: 1rem; }
.lang-header { display: flex; justify-content: space-between; font-size: 0.8rem; margin-bottom: 0.4rem; }
.lang-level  { color: var(--purple-300); font-weight: 600; }
.lang-bar  { height: 4px; background: rgba(255, 255, 255, 0.07); border-radius: var(--radius-pill); overflow: hidden; }
.lang-fill { height: 100%; border-radius: var(--radius-pill); background: linear-gradient(90deg, var(--purple-500), var(--violet-bright)); transition: width 1s ease; }

/* ===== PROJECTS SECTION ===== */
.projects-slider-wrap {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    /* Fix: ensure clip works on all browsers so slides don't bleed */
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    isolation: isolate;
}
.projects-slider {
    display: flex;
    width: 100%;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}
.project-slide {
    min-width: 100%;
    width: 100%;
    flex-shrink: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    /* Restore text direction to match the page language (overrides parent dir=ltr) */
    direction: inherit;
}
.project-info { padding: 2.5rem; display: flex; flex-direction: column; justify-content: center; }
.project-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--purple-300);
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.2);
    padding: 0.3rem 0.65rem;
    border-radius: var(--radius-pill);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
    width: fit-content;
}
.project-name { font-size: 1.9rem; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 0.75rem; }
.project-desc { color: var(--text-secondary); font-size: 0.93rem; line-height: 1.75; margin-bottom: 1.75rem; }
.project-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--purple-300);
    text-decoration: none;
    transition: color var(--transition-fast);
}
.project-link:hover { color: var(--violet-bright); }
.btn-view-photo {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    background: var(--purple-500);
    color: white;
    padding: 0.5rem 1.1rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.btn-view-photo:hover { background: var(--purple-400); box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4); }

/* Project Preview Panel */
.project-preview {
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    border-left: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    min-height: 320px;
}
.project-preview::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(140, 90, 220, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(140, 90, 220, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
}
.project-mockup {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    width: 100%;
    max-width: 340px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
}
.mockup-bar {
    background: rgba(255, 255, 255, 0.04);
    height: 36px;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    gap: 6px;
    border-bottom: 1px solid var(--border);
}
.mockup-dot        { width: 10px; height: 10px; border-radius: 50%; }
.mockup-dot.red    { background: #ff5f57; }
.mockup-dot.yellow { background: #ffbd2e; }
.mockup-dot.green  { background: #28ca41; }
.mockup-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    gap: 0.75rem;
}
.mockup-icon { font-size: 2.5rem; color: var(--violet-bright); }
.mockup-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Slider controls */
.slider-controls { display: flex; align-items: center; gap: 0.75rem; }
.slider-dots { display: flex; gap: 6px; }
.slider-dot {
    width: 8px; height: 8px;
    border-radius: var(--radius-pill);
    background: var(--border);
    transition: all var(--transition);
    cursor: pointer;
    border: none;
    padding: 0;
}
.slider-dot.active { background: var(--purple-400); width: 20px; }
.slider-arrow {
    width: 38px; height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.8rem;
}
.slider-arrow:hover { border-color: var(--purple-400); color: var(--violet-bright); background: rgba(124, 58, 237, 0.1); }

/* ===== EXPERIENCE SECTION ===== */
.exp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.exp-card { padding: 1.75rem; }
.exp-year {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--purple-300);
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}
.exp-role { font-weight: 700; font-size: 1rem; margin-bottom: 0.25rem; }
.exp-org  { font-size: 0.8rem; color: var(--purple-300); font-weight: 600; margin-bottom: 0.75rem; }
.exp-desc { font-size: 0.875rem; color: var(--text-muted); line-height: 1.65; }
.exp-number {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 700;
    color: rgba(124, 58, 237, 0.12);
    margin-bottom: 0.5rem;
    line-height: 1;
}

/* ===== FOOTER ===== */
footer {
    padding: 4rem 1.5rem 2rem;
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 1;
}
.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: start;
}
.footer-brand .logo {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--violet-bright);
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.footer-tagline {
    font-size: 0.85rem;
    color: var(--text-muted);
    max-width: 280px;
    line-height: 1.65;
}
.social-links { display: flex; gap: 0.75rem; margin-top: 1.5rem; flex-wrap: wrap; }
.social-link {
    width: 40px; height: 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1rem;
    transition: all var(--transition-fast);
}
.social-link:hover { color: var(--violet-bright); border-color: var(--purple-400); background: rgba(124, 58, 237, 0.1); }
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-end; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 0.875rem; transition: color var(--transition-fast); }
.footer-links a:hover { color: var(--text-primary); }
.footer-bottom {
    max-width: 1100px;
    margin: 2.5rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.footer-bottom p { font-size: 0.78rem; color: var(--text-muted); }

/* ===== "Let's Connect" CTA Link ===== */
.footer-cta-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--purple-300);
    text-decoration: none;
    padding: 0.45rem 1rem;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(124, 58, 237, 0.3);
    background: rgba(124, 58, 237, 0.08);
    transition: all var(--transition-fast);
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.footer-cta-link:hover {
    color: white;
    background: var(--purple-500);
    border-color: var(--purple-500);
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
    transform: translateY(-1px);
}

/* ===== LIGHTBOX ===== */
#lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(10px);
    padding: 2rem;
}
#lightbox.active { display: flex; }
.lightbox-close {
    position: absolute;
    top: 1.5rem; right: 1.5rem;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--transition-fast);
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.15); }
#lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

/* ===== SCROLL REVEAL ===== */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible    { opacity: 1; transform: translateY(0); }
.reveal-delay-1    { transition-delay: 0.1s; }
.reveal-delay-2    { transition-delay: 0.2s; }
.reveal-delay-3    { transition-delay: 0.3s; }

/* ===== RTL SUPPORT ===== */
[dir="rtl"] .edu-timeline          { padding-left: 0; padding-right: 1.5rem; }
[dir="rtl"] .edu-timeline::before  { left: auto; right: 0; }
[dir="rtl"] .edu-dot               { left: auto; right: -1.5rem; transform: translateX(4px); }
[dir="rtl"] .section-label::before { content: '//'; }
[dir="rtl"] .hero-actions          { justify-content: flex-start; }
[dir="rtl"] .footer-links ul       { align-items: flex-start; }
[dir="rtl"] .project-preview       { border-left: none; border-right: 1px solid var(--border); }
/* Restore RTL text inside slides even though the slider wrapper is force-LTR */
[dir="rtl"] .project-slide         { direction: rtl; text-align: right; }
[dir="rtl"] .project-info          { direction: rtl; }
[dir="rtl"] .project-badge         { direction: rtl; }
[dir="rtl"] .slider-arrow i        { transform: scaleX(-1); }

/* ===================================================================
   RESPONSIVE BREAKPOINTS
   ===================================================================
   Desktop  : > 1024px
   Tablet L : 901px  - 1024px  (iPad Pro landscape, small laptop)
   Tablet M : 769px  - 900px   (iPad Air, iPad 10th gen landscape)
   Tablet S : 641px  - 768px   (iPad mini, iPad portrait)
   Mobile   : ≤ 640px
   =================================================================== */

/* ----- Tablet Large (901–1024px) ----- */
@media (min-width: 901px) and (max-width: 1024px) {
    .hero-inner { gap: 2.5rem; }
    .hero-avatar-frame { width: 240px; height: 240px; }
    .skills-grid { gap: 1rem; }
    .exp-grid { gap: 1rem; }
    .about-grid { gap: 1.5rem; }
}

/* ----- Tablet Medium (769–900px) — iPad Air, iPad 10th gen landscape ----- */
@media (min-width: 769px) and (max-width: 900px) {
    /* Hero — keep 2-column, shrink avatar */
    #hero { padding: 7.5rem 1.5rem 3rem; }
    .hero-inner {
        grid-template-columns: 1fr 220px;
        gap: 2rem;
    }
    .hero-avatar-frame { width: 220px; height: 220px; }
    .hero-name { font-size: clamp(1.9rem, 4.5vw, 3rem); letter-spacing: -1px; }
    .hero-desc { font-size: 0.9rem; }

    /* Sections */
    .section { padding: 4rem 1.5rem; }
    .about-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .skills-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
    .exp-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
    .project-slide { grid-template-columns: 1fr; }
    .project-preview { border-left: none; border-top: 1px solid var(--border); min-height: 200px; }
    .project-info { padding: 2rem; }

    /* Footer */
    .footer-inner { grid-template-columns: 1fr; }
    .footer-links ul { align-items: flex-start; flex-direction: row; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
    .footer-bottom { justify-content: center; text-align: center; }
}

/* ----- Tablet Small (641–768px) — iPad mini, iPad portrait ----- */
@media (min-width: 641px) and (max-width: 768px) {
    /* Hero — single column, avatar on top */
    #hero { padding: 7.5rem 1.25rem 2.5rem; min-height: auto; }
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    .hero-avatar-wrap { order: -1; justify-content: center; }
    .hero-avatar-frame { width: 200px; height: 200px; }
    .hero-actions { justify-content: center; }
    .hero-stats { justify-content: center; }
    .hero-badge { margin-left: auto; margin-right: auto; }
    .hero-desc { margin-left: auto; margin-right: auto; }

    /* Sections */
    .section { padding: 3.5rem 1.25rem; }
    .about-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .skills-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
    .exp-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
    .project-slide { grid-template-columns: 1fr; }
    .project-preview { border-left: none; border-top: 1px solid var(--border); min-height: 180px; }
    .project-info { padding: 1.75rem; }
    .project-name { font-size: 1.5rem; }

    /* Footer */
    .footer-inner { grid-template-columns: 1fr; }
    .footer-links ul { align-items: flex-start; flex-direction: row; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
    .footer-bottom { justify-content: center; text-align: center; flex-direction: column; }
    .footer-bottom p { text-align: center; }
}

@media (max-width: 900px) {
    .cursor-dot,
    .cursor-ring      { display: none !important; }
}

/* ----- Mobile (≤640px) ----- */
@media (max-width: 640px) {
    .nav-links        { display: none; }
    .hamburger        { display: flex; }
    .btn-contact-nav  { display: none; }

    #hero { padding: 8rem 1rem 3rem; min-height: auto; }
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    .hero-avatar-wrap { order: -1; justify-content: center; }
    .hero-avatar-frame { width: 180px; height: 180px; }
    .hero-name { font-size: clamp(2rem, 8vw, 2.8rem); letter-spacing: -1px; }
    .hero-desc { font-size: 0.9rem; margin-left: auto; margin-right: auto; }
    .hero-actions { justify-content: center; }
    .hero-stats { justify-content: center; }
    .hero-badge { margin-left: auto; margin-right: auto; }

    .section { padding: 3.5rem 1rem; }
    .about-grid { grid-template-columns: 1fr; }
    .skills-grid { grid-template-columns: 1fr; }
    .exp-grid { grid-template-columns: 1fr; }
    .ach-grid { grid-template-columns: 1fr; }
    .ach-item.wide { grid-column: span 1; }
    .project-slide { grid-template-columns: 1fr; }
    .project-preview { border-left: none; border-top: 1px solid var(--border); min-height: 160px; }
    .project-info { padding: 1.5rem; }
    .project-name { font-size: 1.4rem; }

    .footer-inner { grid-template-columns: 1fr; }
    .footer-links ul { align-items: flex-start; flex-direction: row; flex-wrap: wrap; gap: 0.5rem 1rem; }
    .footer-bottom { justify-content: center; text-align: center; flex-direction: column; gap: 0.75rem; }
    .footer-bottom p { text-align: center; }

    /* Reduce about-card padding on mobile */
    .about-card { padding: 1.5rem; margin: 0 auto; max-width: 100%; width: 100%; }
    .exp-card { padding: 1.25rem; }
    .skill-card { padding: 1.25rem; }
}
