/* ==========================================
   TALHA FAREEDI - PORTFOLIO CSS
   Extreme Styling with Emerald/Teal Theme
   ========================================== */

/* ---- CSS Custom Properties ---- */
:root {
    --emerald-50: #ecfdf5;
    --emerald-100: #d1fae5;
    --emerald-200: #a7f3d0;
    --emerald-300: #6ee7b7;
    --emerald-400: #34d399;
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --emerald-700: #047857;
    --emerald-800: #065f46;
    --emerald-900: #064e3b;

    --teal-50: #f0fdfa;
    --teal-100: #ccfbf1;
    --teal-200: #99f6e4;
    --teal-300: #5eead4;
    --teal-400: #2dd4bf;
    --teal-500: #14b8a6;
    --teal-600: #0d9488;
    --teal-700: #0f766e;
    --teal-800: #115e59;
    --teal-900: #134e4a;

    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.8);
    --bg-glass-strong: rgba(255, 255, 255, 0.95);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 40px rgba(16, 185, 129, 0.15);
    --nav-bg: rgba(255, 255, 255, 0.85);

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode */
body.dark {
    --bg-primary: #0b1120;
    --bg-secondary: #111827;
    --bg-tertiary: #1e293b;
    --bg-card: #1e293b;
    --bg-glass: rgba(15, 23, 42, 0.85);
    --bg-glass-strong: rgba(15, 23, 42, 0.95);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: rgba(255, 255, 255, 0.08);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 60px rgba(16, 185, 129, 0.2);
    --nav-bg: rgba(11, 17, 32, 0.88);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

/* ---- Custom Scrollbar ---- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--emerald-500), var(--teal-500));
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--emerald-600), var(--teal-600));
}

/* ---- Custom Cursor ---- */
.cursor-dot {
    width: 8px;
    height: 8px;
    background: var(--emerald-500);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 10000;
    transition: transform 0.1s ease;
    mix-blend-mode: difference;
}
.cursor-outline {
    width: 36px;
    height: 36px;
    border: 2px solid var(--emerald-400);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 10000;
    transition: transform 0.15s ease, width 0.3s, height 0.3s, border-color 0.3s;
    opacity: 0.6;
}
.cursor-outline.hover {
    width: 56px;
    height: 56px;
    border-color: var(--emerald-300);
    opacity: 1;
}
@media (max-width: 768px) {
    .cursor-dot, .cursor-outline { display: none; }
}

/* ---- Particles Canvas ---- */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}
body.dark #particles-canvas { opacity: 0.2; }

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

/* ---- Section Base ---- */
.section {
    position: relative;
    z-index: 1;
    padding: 120px 0;
}
.section:nth-child(even) {
    background: var(--bg-secondary);
}
body.dark .section:nth-child(even) {
    background: var(--bg-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}
.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--emerald-600);
    background: var(--emerald-50);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}
body.dark .section-tag {
    background: rgba(16, 185, 129, 0.1);
    color: var(--emerald-400);
}
.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-primary), var(--emerald-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}
.section-desc {
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto;
    font-size: 1.05rem;
}
.section-line {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--emerald-500), var(--teal-500));
    border-radius: var(--radius-full);
    margin: 20px auto 0;
}
.section-subtitle {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 32px;
    margin-top: 48px;
}
.section-subtitle i {
    color: var(--emerald-600);
}

/* ==========================================
   NAVIGATION
   ========================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}
.navbar.scrolled {
    box-shadow: var(--shadow-md);
}
.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.2rem;
}
.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--emerald-500), var(--teal-500));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    transition: transform var(--transition);
}
.nav-logo:hover .logo-icon {
    transform: rotate(360deg);
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--emerald-500), var(--teal-500));
    border-radius: var(--radius-full);
    transition: var(--transition);
    transform: translateX(-50%);
}
.nav-link:hover, .nav-link.active {
    color: var(--emerald-600);
}
.nav-link:hover::after, .nav-link.active::after {
    width: 60%;
}
.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-social {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    font-size: 1rem;
}
.nav-social:hover {
    color: var(--emerald-600);
    background: var(--emerald-50);
    transform: translateY(-2px);
}
body.dark .nav-social:hover {
    background: rgba(16, 185, 129, 0.1);
}
.theme-toggle {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
}
.theme-toggle:hover {
    color: var(--emerald-600);
    border-color: var(--emerald-500);
    background: var(--emerald-50);
}
body.dark .theme-toggle:hover {
    background: rgba(16, 185, 129, 0.1);
}
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-progress {
    height: 3px;
    background: linear-gradient(90deg, var(--emerald-500), var(--teal-500), var(--cyan-400));
    width: 0%;
    transition: width 0.1s linear;
    position: absolute;
    bottom: 0;
    left: 0;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-glass-strong);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 999;
    padding: 24px;
    transform: translateY(-120%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}
.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
}
.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.mobile-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    transition: var(--transition);
}
.mobile-link:hover {
    color: var(--emerald-600);
    background: var(--emerald-50);
}
body.dark .mobile-link:hover {
    background: rgba(16, 185, 129, 0.1);
}

@media (max-width: 900px) {
    .nav-links { display: none; }
    .hamburger { display: flex; }
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--emerald-50), var(--teal-50), var(--bg-primary));
}
body.dark .hero {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(13, 148, 136, 0.05), var(--bg-primary));
}

/* Animated background shapes */
.hero-bg-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
}
.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: floatShape 20s infinite ease-in-out;
}
body.dark .shape { opacity: 0.1; }
.shape-1 {
    width: 500px; height: 500px;
    background: var(--emerald-300);
    top: -100px; right: -100px;
    animation-delay: 0s;
}
.shape-2 {
    width: 400px; height: 400px;
    background: var(--teal-300);
    bottom: -50px; left: -50px;
    animation-delay: -5s;
}
.shape-3 {
    width: 300px; height: 300px;
    background: var(--cyan-300);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}
.shape-4 {
    width: 200px; height: 200px;
    background: var(--emerald-200);
    top: 20%; left: 20%;
    animation-delay: -15s;
}
.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--border-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.3;
    animation: gridMove 30s linear infinite;
}
body.dark .hero-grid { opacity: 0.05; }

@keyframes floatShape {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(50px, -30px) scale(1.1); }
    50% { transform: translate(-20px, 50px) scale(0.95); }
    75% { transform: translate(30px, 20px) scale(1.05); }
}
@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.hero-text {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--emerald-200);
    color: var(--emerald-700);
    padding: 8px 20px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    width: fit-content;
    box-shadow: var(--shadow-sm);
}
body.dark .hero-badge {
    border-color: rgba(16, 185, 129, 0.2);
    color: var(--emerald-400);
}
.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--emerald-500);
    border-radius: 50%;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.02em;
}
.title-line {
    display: block;
}
.title-line.accent {
    background: linear-gradient(135deg, var(--emerald-500), var(--teal-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 600;
    color: var(--emerald-600);
    min-height: 2em;
}
.typewriter-cursor {
    font-weight: 300;
    color: var(--emerald-500);
    animation: blink 0.8s infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-description {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 560px;
    line-height: 1.8;
}
.hero-description strong { color: var(--text-primary); }

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}
.btn-primary {
    background: linear-gradient(135deg, var(--emerald-500), var(--teal-500));
    color: white;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.4);
}
.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: var(--transition);
}
.btn-primary:hover::after { opacity: 1; }

.btn-outline {
    background: transparent;
    color: var(--emerald-600);
    border: 2px solid var(--emerald-500);
}
.btn-outline:hover {
    background: var(--emerald-50);
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.15);
}
body.dark .btn-outline:hover {
    background: rgba(16, 185, 129, 0.1);
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 32px;
    margin-top: 12px;
}
.hero-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--emerald-600);
    font-family: var(--font-mono);
}
.stat-suffix {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--emerald-600);
}
.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.hero-stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border-color);
}

/* Hero Image */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}
.portrait-card {
    position: relative;
    padding: 18px;
    border-radius: 36px;
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.2)),
        linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(45, 212, 191, 0.3));
    border: 1px solid rgba(255, 255, 255, 0.38);
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(18px);
}
body.dark .portrait-card {
    background:
        linear-gradient(160deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.38)),
        linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(45, 212, 191, 0.18));
    border-color: rgba(148, 163, 184, 0.18);
}
.portrait-frame {
    width: 360px;
    height: 460px;
    overflow: hidden;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(15, 118, 110, 0.12), rgba(15, 23, 42, 0.08));
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}
.portrait-frame img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center top;
}
.portrait-frame img.is-fallback {
    object-position: center;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: scrollBounce 2s infinite;
}
.scroll-mouse {
    width: 24px;
    height: 38px;
    border: 2px solid var(--text-muted);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}
.scroll-wheel {
    width: 3px;
    height: 8px;
    background: var(--emerald-500);
    border-radius: 2px;
    animation: scrollWheel 2s infinite;
}
@keyframes scrollWheel {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(10px); }
}
@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

@media (max-width: 900px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-text { align-items: center; }
    .hero-description { max-width: 100%; }
    .hero-buttons { justify-content: center; }
    .hero-stats { justify-content: center; flex-wrap: wrap; }
    .portrait-frame { width: 280px; height: 360px; }
    .scroll-indicator { display: none; }
}
@media (max-width: 480px) {
    .hero-stats { gap: 20px; }
    .hero-stat-divider { display: none; }
    .portrait-card { padding: 12px; border-radius: 24px; }
    .portrait-frame { width: 220px; height: 300px; border-radius: 20px; }
}

/* ==========================================
   ABOUT SECTION
   ========================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 48px;
    margin-bottom: 48px;
}
.about-bio h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}
.about-bio p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.8;
}
.about-bio strong { color: var(--emerald-600); }

.info-card {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 8px;
    box-shadow: var(--shadow-md);
}
.info-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: var(--radius-md);
    transition: var(--transition);
}
.info-item:hover {
    background: var(--emerald-50);
}
body.dark .info-item:hover {
    background: rgba(16, 185, 129, 0.05);
}
.info-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--emerald-50), var(--teal-50));
    color: var(--emerald-600);
    border-radius: var(--radius-md);
    font-size: 1rem;
    flex-shrink: 0;
}
body.dark .info-icon {
    background: rgba(16, 185, 129, 0.1);
}
.info-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
}
.info-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
}

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

/* Education Cards */
.edu-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}
.edu-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.edu-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--emerald-500), var(--teal-500));
    transform: scaleX(0);
    transition: transform var(--transition);
    transform-origin: left;
}
.edu-card:hover::before { transform: scaleX(1); }
.edu-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}
.edu-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--emerald-50), var(--teal-50));
    color: var(--emerald-600);
    border-radius: var(--radius-md);
    font-size: 1.2rem;
    margin-bottom: 16px;
}
body.dark .edu-icon { background: rgba(16, 185, 129, 0.1); }
.edu-period {
    font-size: 0.8rem;
    color: var(--emerald-600);
    font-weight: 600;
    margin-bottom: 8px;
}
.edu-card h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.edu-degree {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}
.edu-grade {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--emerald-700);
    background: var(--emerald-50);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    margin-bottom: 12px;
}
body.dark .edu-grade {
    background: rgba(16, 185, 129, 0.1);
    color: var(--emerald-400);
}
.edu-details {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Certifications */
.certs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}
.cert-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    transition: var(--transition);
    font-size: 0.9rem;
    color: var(--text-primary);
}
.cert-item:hover {
    border-color: var(--emerald-300);
    box-shadow: var(--shadow-glow);
    transform: translateX(6px);
}
.cert-icon {
    color: var(--emerald-500);
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* ==========================================
   RESEARCH SECTION
   ========================================== */
.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 24px;
}
.research-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.research-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(135deg, transparent, var(--emerald-400), var(--teal-400), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: var(--transition);
}
.research-card:hover::before { opacity: 1; }
.research-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}
.research-date {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--emerald-600);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}
.research-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}
.research-card > p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}
.research-insights {
    list-style: none;
    margin-bottom: 16px;
}
.research-insights li {
    position: relative;
    padding-left: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
    line-height: 1.5;
}
.research-insights li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--emerald-400), var(--teal-400));
}

/* Card Tags */
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.card-tags span {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--emerald-700);
    background: var(--emerald-50);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
body.dark .card-tags span {
    color: var(--emerald-400);
    background: rgba(16, 185, 129, 0.1);
}

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

/* ==========================================
   SKILLS SECTION
   ========================================== */
.skills-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}
.skills-category {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 28px;
}
.skills-category i { color: var(--emerald-600); }

.skill-item {
    margin-bottom: 22px;
}
.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}
.skill-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}
.skill-pct {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--emerald-600);
    font-family: var(--font-mono);
}
.skill-bar {
    height: 10px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}
.skill-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--emerald-500), var(--teal-500));
    border-radius: var(--radius-full);
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
.skill-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
.skill-fill.animated {
    width: var(--target-width);
}

@media (max-width: 768px) {
    .skills-wrapper { grid-template-columns: 1fr; gap: 36px; }
}

/* ==========================================
   AI TOPICS SECTION
   ========================================== */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}
.topic-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.topic-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    border-color: var(--emerald-200);
}
.topic-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--emerald-50), var(--teal-50));
    color: var(--emerald-600);
    border-radius: var(--radius-md);
    font-size: 1.3rem;
    margin-bottom: 18px;
    transition: var(--transition);
}
body.dark .topic-icon { background: rgba(16, 185, 129, 0.1); }
.topic-card:hover .topic-icon {
    background: linear-gradient(135deg, var(--emerald-500), var(--teal-500));
    color: white;
    transform: scale(1.1) rotate(-5deg);
}
.topic-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}
.topic-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

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

/* ==========================================
   EXPERIENCE / TIMELINE
   ========================================== */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 40px;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--emerald-500), var(--teal-500), var(--emerald-200));
}
.timeline-item {
    position: relative;
    margin-bottom: 40px;
}
.timeline-dot {
    position: absolute;
    left: -33px;
    top: 8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 3px solid var(--emerald-500);
    z-index: 1;
}
.timeline-dot.current {
    background: var(--emerald-500);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
    animation: pulse 2s infinite;
}
.timeline-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}
.timeline-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateX(6px);
}
.timeline-period {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--emerald-600);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.timeline-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.timeline-card h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--emerald-700);
    margin-bottom: 14px;
}
body.dark .timeline-card h4 { color: var(--emerald-400); }
.timeline-location {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.85rem;
}
.timeline-location i { margin-right: 4px; }
.timeline-card ul {
    list-style: none;
    padding: 0;
}
.timeline-card li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}
.timeline-card li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--emerald-400);
}

@media (max-width: 600px) {
    .timeline { padding-left: 30px; }
    .timeline::before { left: 8px; }
    .timeline-dot { left: -27px; }
}

/* ==========================================
   PROJECTS SECTION
   ========================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}
.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}
.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}
.project-header {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.project-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
}
.project-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.3);
}
.project-body {
    padding: 24px;
    position: relative;
}
.project-body h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}
.project-body p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 14px;
}
.project-link {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}
.project-link:hover {
    color: var(--emerald-600);
    background: var(--emerald-50);
    transform: translate(2px, -2px);
}
body.dark .project-link:hover {
    background: rgba(16, 185, 129, 0.1);
}

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

/* ==========================================
   PUBLICATIONS SECTION
   ========================================== */
.publications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}
.pub-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.pub-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}
.pub-year {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 2rem;
    font-weight: 900;
    color: var(--emerald-100);
    line-height: 1;
    z-index: 0;
}
body.dark .pub-year { color: rgba(16, 185, 129, 0.08); }
.pub-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}
.pub-venue {
    font-size: 0.82rem;
    color: var(--emerald-600);
    font-weight: 500;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}
body.dark .pub-venue { color: var(--emerald-400); }
.pub-venue i { margin-right: 6px; }
.pub-card > p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}
.pub-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--emerald-600);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    z-index: 1;
}
.pub-link:hover { color: var(--emerald-700); gap: 12px; }

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

/* ==========================================
   CONTACT SECTION
   ========================================== */
.contact-grid {
    max-width: 700px;
    margin: 0 auto;
}
.contact-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.contact-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}
.contact-card:hover {
    transform: translateX(8px);
    border-color: var(--emerald-300);
    box-shadow: var(--shadow-glow);
}
.contact-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--emerald-50), var(--teal-50));
    color: var(--emerald-600);
    border-radius: var(--radius-md);
    font-size: 1.2rem;
    flex-shrink: 0;
    transition: var(--transition);
}
body.dark .contact-icon { background: rgba(16, 185, 129, 0.1); }
.contact-card:hover .contact-icon {
    background: linear-gradient(135deg, var(--emerald-500), var(--teal-500));
    color: white;
}
.contact-card h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.contact-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 48px 0 32px;
    text-align: center;
}
.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-primary);
}
.footer-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.footer-socials {
    display: flex;
    gap: 12px;
}
.footer-socials a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}
.footer-socials a:hover {
    color: var(--emerald-600);
    border-color: var(--emerald-400);
    background: var(--emerald-50);
    transform: translateY(-3px);
}
body.dark .footer-socials a:hover {
    background: rgba(16, 185, 129, 0.1);
}
.footer-copyright {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ==========================================
   BACK TO TOP
   ========================================== */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--emerald-500), var(--teal-500));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    cursor: pointer;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.4);
}

/* ==========================================
   REVEAL ANIMATIONS
   ========================================== */
.reveal-up, .reveal-left, .reveal-right, .reveal-scale {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
    transition-delay: var(--delay, 0s);
}
.reveal-up { transform: translateY(40px); }
.reveal-left { transform: translateX(-40px); }
.reveal-right { transform: translateX(40px); }
.reveal-scale { transform: scale(0.9); }

.reveal-up.revealed,
.reveal-left.revealed,
.reveal-right.revealed,
.reveal-scale.revealed {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

/* ==========================================
   SELECTION & FOCUS
   ========================================== */
::selection {
    background: var(--emerald-300);
    color: var(--emerald-900);
}
body.dark ::selection {
    background: var(--emerald-700);
    color: var(--emerald-100);
}
:focus-visible {
    outline: 2px solid var(--emerald-500);
    outline-offset: 2px;
}
