/* ================================
   CSS VARIABLES & ROOT STYLES
   ================================ */
:root {
    /* Light Mode */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fc;
    --bg-tertiary: #eef0f7;
    --bg-glass: rgba(255, 255, 255, 0.8);
    --text-primary: #0f1117;
    --text-secondary: #4a5263;
    --text-tertiary: #8892a4;
    --border-color: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(99, 91, 255, 0.4);

    /* Accent — indigo + violet */
    --accent-1: #635bff;
    --accent-2: #8b5cf6;
    --accent-3: #06b6d4;
    --accent-gradient: linear-gradient(135deg, #635bff 0%, #8b5cf6 100%);
    --accent-gradient-wide: linear-gradient(135deg, #635bff 0%, #8b5cf6 55%, #06b6d4 100%);
    --accent-glow: rgba(99, 91, 255, 0.2);

    --particle-color: 99, 91, 255;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 50px rgba(0,0,0,0.12);
    --shadow-accent: 0 6px 24px rgba(99, 91, 255, 0.3);

    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Inter', sans-serif;

    --section-padding: 100px 0;
    --container-padding: 0 24px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 999px;

    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
    --transition-slow: 0.45s ease;
    --header-h: 72px;
}

/* Dark Mode */
[data-theme="dark"] {
    --bg-primary: #09090f;
    --bg-secondary: #111118;
    --bg-tertiary: #191922;
    --bg-glass: rgba(9, 9, 15, 0.85);
    --text-primary: #f0f1f5;
    --text-secondary: #9aa0b0;
    --text-tertiary: #5c6476;
    --border-color: rgba(255, 255, 255, 0.07);
    --border-hover: rgba(99, 91, 255, 0.5);

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.55);
    --shadow-xl: 0 20px 50px rgba(0,0,0,0.6);
    --shadow-accent: 0 6px 24px rgba(99, 91, 255, 0.4);
    --particle-color: 139, 120, 255;
}

/* ================================
   RESET & BASE
   ================================ */
*, *::before, *::after {
    margin: 0; padding: 0; box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Background color also on html for dark mode flash prevention */
html {
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease;
}

a { text-decoration: none; color: inherit; transition: color var(--transition-fast); }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* ================================
   CUSTOM CURSOR
   ================================ */
.cursor,
.cursor-follower {
    position: fixed;
    top: 0; left: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    will-change: transform;
    transform: translate(-50%, -50%);
}

.cursor {
    width: 8px; height: 8px;
    background: var(--accent-1);
}

.cursor-follower {
    width: 36px; height: 36px;
    border: 1.5px solid var(--accent-1);
    opacity: 0.45;
    transition: width 0.18s ease, height 0.18s ease, opacity 0.18s ease;
    background: transparent;
}

@media (max-width: 768px) {
    .cursor, .cursor-follower { display: none; }
}

/* ================================
   ANIMATED BACKGROUND
   ================================ */
.animated-background {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}

#particles-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Ensure all content sits above particles */
.header, .hero, .section, .about, .skills, .experience,
.services, .projects, .education, .contact, footer,
.back-to-top, .cursor, .cursor-follower {
    position: relative;
    z-index: 1;
}

/* ================================
   TYPOGRAPHY
   ================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.15;
    color: var(--text-primary);
    letter-spacing: -0.025em;
}

/* ================================
   CONTAINER
   ================================ */
.container {
    max-width: 1160px;
    margin: 0 auto;
    padding: var(--container-padding);
}

/* ================================
   BUTTONS
   ================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 13px 26px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    border: 1.5px solid transparent;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 36px rgba(99, 91, 255, 0.45);
}

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

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

/* ================================
   HEADER
   ================================ */
.header {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: var(--header-h);
    display: flex;
    align-items: center;
    background: transparent;
    z-index: 1000;
    transition: background var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.header .container {
    width: 100%;
}

.header.scrolled {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

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

.logo {
    font-size: 22px;
    font-weight: 800;
    display: flex;
    align-items: center;
    letter-spacing: -0.04em;
}

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

.logo-dot {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 28px;
    line-height: 0.85;
}

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

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 4px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 1.5px;
    background: var(--accent-gradient);
    border-radius: 2px;
    transition: width var(--transition-base);
}

.nav-link:hover, .nav-link.active { color: var(--text-primary); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.theme-toggle {
    width: 40px; height: 40px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border-color);
    background: var(--bg-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all var(--transition-base);
}

.theme-toggle:hover {
    border-color: var(--accent-1);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.theme-toggle i {
    font-size: 16px;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity var(--transition-base), transform var(--transition-base);
}

/* Light mode: show sun, hide moon */
.sun-icon {
    color: #f59e0b;
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg);
}
.moon-icon {
    color: var(--accent-2);
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-90deg);
}

/* Dark mode: hide sun, show moon */
[data-theme="dark"] .sun-icon {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(90deg);
}
[data-theme="dark"] .moon-icon {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg);
}

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

.mobile-toggle span {
    width: 24px; height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-base);
    display: block;
}

.mobile-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.mobile-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ================================
   HERO
   ================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    position: relative;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.hero-text { animation: fadeInUp 0.8s ease both; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.pulse {
    width: 7px; height: 7px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2.5s infinite;
    flex-shrink: 0;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.4); }
    50% { box-shadow: 0 0 0 6px rgba(16,185,129,0); transform: scale(1.1); }
}

.hero-title {
    font-size: 58px;
    margin-bottom: 16px;
    line-height: 1.05;
    letter-spacing: -0.035em;
}

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

.hero-subtitle {
    font-size: 22px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 18px;
    min-height: 34px;
    letter-spacing: -0.02em;
}

.typing-text::after {
    content: '|';
    color: var(--accent-1);
    animation: blink 0.75s infinite;
    font-weight: 300;
    margin-left: 1px;
}

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

.hero-description {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 18px;
    line-height: 1.75;
}

.hero-location {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text-tertiary);
    font-size: 14px;
    margin-bottom: 30px;
}

.hero-location i { color: var(--accent-1); font-size: 12px; }

.hero-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}

.hero-social { display: flex; gap: 10px; }

.social-link {
    width: 40px; height: 40px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 14px;
    transition: all var(--transition-base);
    background: var(--bg-primary);
}

.social-link:hover {
    color: var(--accent-1);
    border-color: var(--accent-1);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

/* Profile */
.hero-image {
    display: flex;
    justify-content: center;
    animation: fadeInRight 0.8s ease both;
}

.profile-wrapper {
    position: relative;
    width: 380px; height: 380px;
}

.profile-border {
    position: absolute;
    inset: -3px;
    background: var(--accent-gradient-wide);
    border-radius: 50%;
    animation: rotate 14s linear infinite;
    opacity: 0.75;
}

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

.profile-glow {
    position: absolute;
    inset: -24px;
    background: var(--accent-gradient);
    border-radius: 50%;
    filter: blur(55px);
    opacity: 0.18;
    animation: glowPulse 4s ease-in-out infinite;
}

[data-theme="dark"] .profile-glow { opacity: 0.32; }

@keyframes glowPulse {
    0%, 100% { opacity: 0.18; transform: scale(1); }
    50% { opacity: 0.28; transform: scale(1.04); }
}

.profile-img {
    position: relative;
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--bg-primary);
    z-index: 1;
    background: var(--bg-tertiary);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-tertiary);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.7;
}

.mouse {
    width: 22px; height: 36px;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    position: relative;
    display: flex;
    justify-content: center;
}

.wheel {
    width: 2px; height: 6px;
    background: var(--text-tertiary);
    border-radius: 2px;
    position: absolute;
    top: 7px;
    animation: scrollWheel 2s infinite;
}

@keyframes scrollWheel {
    0% { top: 7px; opacity: 1; }
    100% { top: 22px; opacity: 0; }
}

/* ================================
   SECTIONS
   ================================ */
.section { padding: var(--section-padding); }

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    padding: 5px 13px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-1);
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.section-title {
    font-size: 44px;
    margin-bottom: 12px;
    letter-spacing: -0.03em;
}

.section-description {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ================================
   ABOUT
   ================================ */
.about-content {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 64px;
    align-items: start;
}

.about-text .lead {
    font-size: 19px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 18px;
    line-height: 1.6;
    letter-spacing: -0.02em;
}

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

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 36px;
}

.stat-item {
    text-align: center;
    padding: 22px 14px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
}

.stat-item:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: 38px;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
    letter-spacing: -0.04em;
}

.stat-label {
    font-size: 10px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.about-features { display: grid; gap: 12px; }

.feature-card {
    padding: 22px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}

.feature-icon {
    width: 42px; height: 42px;
    border-radius: var(--radius-md);
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.feature-icon i { font-size: 17px; color: #fff; }

.feature-card h3 {
    font-size: 15px;
    margin-bottom: 5px;
    letter-spacing: -0.01em;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 13.5px;
    margin: 0;
}

/* ================================
   SKILLS
   ================================ */
.skills { background: var(--bg-secondary); }

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 18px;
}

.skill-card {
    padding: 30px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

.skill-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-hover);
}

.skill-icon {
    width: 52px; height: 52px;
    border-radius: var(--radius-md);
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

.skill-icon i { font-size: 24px; color: #fff; }

.skill-card h3 {
    font-size: 17px;
    margin-bottom: 9px;
    letter-spacing: -0.015em;
}

.skill-card p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.65;
    font-size: 14px;
}

.skill-bar {
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 4px;
    width: 0;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Skill tag chips */
.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
}

.skill-tags .tag {
    padding: 4px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: all var(--transition-fast);
}

.skill-card:hover .skill-tags .tag {
    background: var(--bg-secondary);
    border-color: var(--border-hover);
    color: var(--accent-1);
}

/* ================================
   EXPERIENCE
   ================================ */
.timeline {
    position: relative;
    max-width: 860px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%; top: 0; bottom: 0;
    width: 1px;
    background: var(--border-color);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 44px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 44px;
    align-items: start;
}

.timeline-item:nth-child(even) { direction: rtl; }
.timeline-item:nth-child(even) > * { direction: ltr; }

.timeline-dot {
    position: absolute;
    left: 50%; top: 22px;
    width: 12px; height: 12px;
    background: var(--accent-gradient);
    border: 3px solid var(--bg-primary);
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 1;
    box-shadow: 0 0 0 3px var(--border-color);
}

.timeline-date {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-1);
    text-align: right;
    padding: 10px 18px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    align-self: start;
    margin-top: 6px;
}

.timeline-item:nth-child(even) .timeline-date { text-align: left; }

.timeline-content {
    padding: 26px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

.timeline-content:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-hover);
}

.timeline-content h3 {
    font-size: 17px;
    margin-bottom: 5px;
    letter-spacing: -0.015em;
}

.timeline-company {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 16px;
    font-weight: 500;
}

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

.timeline-list li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 9px;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 14px;
}

.timeline-list li::before {
    content: '';
    position: absolute;
    left: 0; top: 8px;
    width: 5px; height: 5px;
    background: var(--accent-1);
    border-radius: 50%;
}

/* ================================
   SERVICES
   ================================ */
.services { background: var(--bg-secondary); }

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

.service-card {
    padding: 34px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-base);
}

.service-card:hover::after { transform: scaleX(1); }

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-hover);
}

.service-icon {
    width: 64px; height: 64px;
    margin: 0 auto 20px;
    border-radius: var(--radius-lg);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
}

.service-card:hover .service-icon { background: var(--accent-gradient); }

.service-icon i {
    font-size: 26px;
    color: var(--accent-1);
    transition: color var(--transition-base);
}

.service-card:hover .service-icon i { color: #fff; }

.service-card h3 { font-size: 17px; margin-bottom: 10px; letter-spacing: -0.015em; }
.service-card p { color: var(--text-secondary); line-height: 1.7; font-size: 14px; }

/* ================================
   PROJECTS
   ================================ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 18px;
}

.project-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--border-hover);
}

.project-image {
    position: relative;
    overflow: hidden;
    height: 230px;
    background: var(--bg-tertiary);
}

.project-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(5,5,12,0.92) 0%, rgba(5,5,12,0.2) 55%, transparent 100%);
    display: flex;
    align-items: flex-end;
    padding: 22px;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.project-card:hover .project-overlay { opacity: 1; }

.project-info h3 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.project-info p {
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    margin-bottom: 12px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(99,91,255,0.85);
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    transition: all var(--transition-base);
}

.project-link:hover {
    background: var(--accent-1);
    transform: translateY(-2px);
}

.project-tags {
    padding: 14px 18px;
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

.tag {
    padding: 3px 10px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

/* ================================
   TESTIMONIALS
   ================================ */
.testimonials {
    background: var(--bg-secondary);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.testimonial-card {
    padding: 32px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-hover);
}

.testimonial-stars {
    font-size: 16px;
    color: #f59e0b;
    letter-spacing: 2px;
}

.testimonial-card blockquote {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.75;
    font-style: italic;
    flex: 1;
    margin: 0;
    position: relative;
    padding-left: 18px;
}

.testimonial-card blockquote::before {
    content: '';
    position: absolute;
    left: 0; top: 4px;
    width: 3px;
    height: calc(100% - 8px);
    background: var(--accent-gradient);
    border-radius: 2px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 14px;
}

.testimonial-avatar {
    width: 44px; height: 44px;
    border-radius: var(--radius-md);
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

.testimonial-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.testimonial-meta strong {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.testimonial-meta span {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* Availability status */
.availability-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-lg);
    font-size: 13.5px;
    font-weight: 500;
    color: #4a526300;
    margin-top: 4px;
}

.availability-status .pulse {
    background: #10b981;
    flex-shrink: 0;
}

.availability-status span {
    color: var(--text-primary);
}

/* ================================
   EDUCATION
   ================================ */
.education { background: var(--bg-secondary); }

.education-card {
    max-width: 680px;
    margin: 0 auto;
    padding: 42px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    gap: 32px;
    transition: all var(--transition-base);
}

.education-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--border-hover);
}

.education-icon {
    width: 68px; height: 68px;
    border-radius: var(--radius-lg);
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.education-icon i { font-size: 28px; color: #fff; }

.education-content h3 {
    font-size: 19px;
    margin-bottom: 7px;
    letter-spacing: -0.02em;
}

.education-school { font-size: 14px; color: var(--text-secondary); margin-bottom: 4px; }
.education-year { font-size: 13px; color: var(--accent-1); font-weight: 600; }

/* ================================
   CONTACT
   ================================ */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 44px;
    align-items: start;
}

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

.info-card {
    padding: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all var(--transition-base);
}

.info-card:hover {
    transform: translateX(5px);
    border-color: var(--border-hover);
}

.info-icon {
    width: 42px; height: 42px;
    border-radius: var(--radius-md);
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-icon i { font-size: 16px; color: #fff; }

.info-content h4 {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--text-tertiary);
    letter-spacing: 0.1em;
    margin-bottom: 3px;
    font-weight: 700;
}

.info-content a,
.info-content p {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}

.info-content a:hover { color: var(--accent-1); }

.contact-form {
    padding: 34px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
}

.form-group {
    position: relative;
    margin-bottom: 24px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-primary);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: inherit;
    color: var(--text-primary);
    transition: all var(--transition-base);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent-1);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Select fields */
.form-group--select {
    position: relative;
}

.form-group select {
    width: 100%;
    padding: 14px 40px 14px 16px;
    background: var(--bg-primary);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: inherit;
    color: var(--text-primary);
    transition: all var(--transition-base);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.form-group select:focus {
    border-color: var(--accent-1);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Show label as floated when option selected */
.form-group select:not([value=""]):valid + label,
.form-group select:focus + label,
.form-group--select label.floated {
    top: -9px; left: 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    background: var(--bg-secondary);
    padding: 0 5px;
    color: var(--accent-1);
    text-transform: uppercase;
}

.select-arrow {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 12px;
    pointer-events: none;
    transition: transform var(--transition-base);
}

.form-group select:focus ~ .select-arrow {
    transform: translateY(-50%) rotate(180deg);
    color: var(--accent-1);
}

.form-group label {
    position: absolute;
    left: 16px; top: 14px;
    color: var(--text-tertiary);
    font-size: 15px;
    pointer-events: none;
    transition: all var(--transition-base);
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -9px; left: 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    background: var(--bg-secondary);
    padding: 0 5px;
    color: var(--accent-1);
    text-transform: uppercase;
}

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

.form-message {
    margin-top: 16px;
    padding: 12px;
    border-radius: var(--radius-md);
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    display: none;
}

.form-message.success {
    background: rgba(16,185,129,0.08);
    color: #10b981;
    border: 1px solid rgba(16,185,129,0.2);
    display: block;
}

.form-message.error {
    background: rgba(239,68,68,0.08);
    color: #ef4444;
    border: 1px solid rgba(239,68,68,0.2);
    display: block;
}

/* ================================
   FOOTER
   ================================ */
.footer {
    background: var(--bg-secondary);
    padding: 52px 0 26px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 52px;
    margin-bottom: 36px;
}

.footer-brand p {
    color: var(--text-secondary);
    margin-top: 12px;
    line-height: 1.7;
    font-size: 14px;
}

.footer-links h4,
.footer-social h4 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    margin-bottom: 16px;
}

.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 9px; }

.footer-links a {
    color: var(--text-secondary);
    font-size: 14px;
    transition: color var(--transition-fast);
}

.footer-links a:hover { color: var(--accent-1); }

.social-links { display: flex; gap: 9px; flex-wrap: wrap; }

.social-links a {
    width: 34px; height: 34px;
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 13px;
    transition: all var(--transition-base);
}

.social-links a:hover {
    background: var(--accent-gradient);
    border-color: transparent;
    color: #fff;
    transform: translateY(-3px);
}

.footer-bottom {
    padding-top: 22px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-tertiary);
    font-size: 13px;
}

/* ================================
   BACK TO TOP
   ================================ */
.back-to-top {
    position: fixed;
    bottom: 26px; right: 26px;
    width: 42px; height: 42px;
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: 999;
    box-shadow: var(--shadow-accent);
}

.back-to-top.active { opacity: 1; visibility: visible; }

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(99, 91, 255, 0.5);
}

/* ================================
   ANIMATIONS
   ================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 1024px) {
    .hero-content,
    .about-content,
    .contact-wrapper { grid-template-columns: 1fr; }

    .hero-image { order: -1; }

    .profile-wrapper { width: 280px; height: 280px; }

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

    .timeline-item {
        grid-template-columns: 1fr;
        padding-left: 60px;
    }

    .timeline-item:nth-child(even) { direction: ltr; }

    .timeline-dot { left: 24px; }

    .timeline-date { text-align: left !important; }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 64px 0;
        --header-h: 64px;
    }

    .mobile-toggle { display: flex; }

    .nav {
        position: fixed;
        top: var(--header-h);
        left: 0; right: 0;
        background: var(--bg-glass);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid var(--border-color);
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--transition-base);
    }

    .nav.active {
        max-height: 420px;
        box-shadow: var(--shadow-lg);
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
        padding: 14px 24px;
    }

    .nav-link {
        display: block;
        padding: 12px 0;
        border-bottom: 1px solid var(--border-color);
        font-size: 15px;
    }

    .hero-title { font-size: 38px; }
    .hero-subtitle { font-size: 20px; }
    .section-title { font-size: 34px; }
    .about-stats { grid-template-columns: 1fr; }

    .skills-grid,
    .services-grid,
    .projects-grid,
    .testimonials-grid { grid-template-columns: 1fr; }

    .footer-content { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 30px; }
    .section-title { font-size: 28px; }
    .profile-wrapper { width: 240px; height: 240px; }
    .hero-buttons { flex-direction: column; }
    .btn { width: 100%; justify-content: center; }

    .education-card {
        flex-direction: column;
        text-align: center;
        padding: 30px 22px;
        gap: 20px;
    }
}