/* ========================================
   Modern Portfolio - Kamran Suleman
   ======================================== */

:root {
    --primary-gradient: linear-gradient(135deg, #06001f 0%, #180640 50%, #0c0030 100%);
    --accent-color: #a855f7;
    --accent-gradient: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    --dark-bg: #04000f;
    --light-bg: #f9f7ff;
    --card-bg: #ffffff;
    --text-primary: #120a2e;
    --text-secondary: #5c4f7c;
    --shadow-sm: 0 2px 12px rgba(80, 20, 120, 0.07);
    --shadow-md: 0 6px 24px rgba(80, 20, 120, 0.11);
    --shadow-lg: 0 14px 44px rgba(80, 20, 120, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --nav-height: 68px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-height); }

body {
    font-family: 'Segoe UI', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}
body.loading { overflow: hidden; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================
   Custom Cursor
   ======================================== */
@media (pointer: fine) {
    * { cursor: none !important; }
}

.c-dot {
    position: fixed;
    width: 5px; height: 5px;
    background: var(--accent-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 999999;
    opacity: 0;
    box-shadow: 0 0 6px var(--accent-color);
    transition: transform 0.15s, background 0.15s, box-shadow 0.15s, opacity 0.3s;
    will-change: left, top;
}

.c-ring {
    position: fixed;
    width: 22px; height: 22px;
    border: 1.5px solid rgba(168, 85, 247, 0.6);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 999998;
    opacity: 0;
    transition: width 0.2s, height 0.2s, border-color 0.2s, opacity 0.3s;
    will-change: left, top;
}

.c-dot.hover {
    background: #ec4899;
    box-shadow: 0 0 8px #ec4899;
    transform: translate(-50%, -50%) scale(1.5);
}
.c-ring.hover {
    width: 32px; height: 32px;
    border-color: rgba(236, 72, 153, 0.7);
}

/* ========================================
   Scroll Progress Bar
   ======================================== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: var(--accent-gradient);
    z-index: 10001;
    transition: width 0.1s linear;
    border-radius: 0 2px 2px 0;
}

/* ========================================
   Sticky Navigation
   ======================================== */
.sticky-nav {
    position: fixed;
    top: 3px;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

.sticky-nav.scrolled {
    background: rgba(12, 10, 35, 0.93);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.45);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-logo {
    font-size: 0.95em;
    font-weight: 800;
    color: var(--accent-color);
    text-decoration: none;
    letter-spacing: 2px;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border: 2px solid rgba(168, 85, 247, 0.6);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.nav-logo:hover {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
}

.nav-links {
    display: flex;
    gap: 4px;
    flex: 1;
}

.nav-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.88em;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 8px;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-cta {
    color: #fff;
    background: var(--accent-color);
    text-decoration: none;
    font-size: 0.88em;
    font-weight: 700;
    padding: 10px 24px;
    border-radius: 50px;
    transition: var(--transition);
    flex-shrink: 0;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.nav-cta:hover {
    background: #c084fc;
    box-shadow: 0 0 24px rgba(168, 85, 247, 0.5);
    transform: translateY(-2px);
}

.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: auto;
}

.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: var(--transition);
}

.nav-hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; }
.nav-hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ========================================
   Loading Screen
   ======================================== */
#loader {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100vh;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    overflow: hidden;
    transition: opacity 0.9s ease, visibility 0.9s ease;
}

#loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

/* Subtle grid overlay */
.loader-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(168, 85, 247, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(168, 85, 247, 0.06) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, black, transparent);
    -webkit-mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, black, transparent);
}

/* Ambient glow orb */
.loader-glow-bg {
    position: absolute;
    width: 500px; height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.18) 0%, rgba(236, 72, 153, 0.06) 50%, transparent 70%);
    animation: ambientPulse 3s ease-in-out infinite;
}

@keyframes ambientPulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.15); opacity: 1; }
}

/* Main content wrapper */
.loader-content {
    text-align: center;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

/* Ring animation */
.circular-loader {
    position: relative;
    width: 180px; height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 36px;
}

.circle-ring {
    position: absolute;
    width: 100%; height: 100%;
    border-radius: 50%;
    border: 2.5px solid transparent;
    border-top-color: #a855f7;
    border-right-color: rgba(168, 85, 247, 0.4);
    animation: spin 1.6s linear infinite;
    box-shadow: 0 0 28px rgba(168, 85, 247, 0.35);
}
.circle-ring.ring-2 {
    width: 72%; height: 72%;
    border-top-color: transparent;
    border-bottom-color: #ec4899;
    border-left-color: rgba(236, 72, 153, 0.4);
    animation: spin 2.2s linear infinite reverse;
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.25);
}
.circle-ring.ring-3 {
    width: 42%; height: 42%;
    border: 2px solid rgba(168, 85, 247, 0.25);
    border-top-color: #c084fc;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 16px rgba(168, 85, 247, 0.5);
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Neuron orbit dots */
.neuron-circle {
    position: absolute;
    width: 130px; height: 130px;
    border-radius: 50%;
}

.c-neuron {
    position: absolute;
    width: 8px; height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-color), 0 0 20px var(--accent-color);
    animation: neuronPulse 2s ease-in-out infinite;
}

.c-neuron.n1 { top: 0; left: 50%; transform: translateX(-50%); animation-delay: 0s; }
.c-neuron.n2 { top: 25%; right: 10%; animation-delay: 0.25s; }
.c-neuron.n3 { right: 0; top: 50%; transform: translateY(-50%); animation-delay: 0.5s; }
.c-neuron.n4 { bottom: 25%; right: 10%; animation-delay: 0.75s; }
.c-neuron.n5 { bottom: 0; left: 50%; transform: translateX(-50%); animation-delay: 1s; }
.c-neuron.n6 { bottom: 25%; left: 10%; animation-delay: 1.25s; }
.c-neuron.n7 { left: 0; top: 50%; transform: translateY(-50%); animation-delay: 1.5s; }
.c-neuron.n8 { top: 25%; left: 10%; animation-delay: 1.75s; }

@keyframes neuronPulse {
    0%, 100% { opacity: 0.5; box-shadow: 0 0 10px var(--accent-color); }
    50% { opacity: 1; box-shadow: 0 0 20px var(--accent-color), 0 0 40px var(--accent-color); }
}

/* Center initials */
.center-initials {
    position: absolute;
    font-size: 1.25em;
    font-weight: 800;
    color: white;
    letter-spacing: 4px;
    animation: centerPulse 2s ease-in-out infinite;
}

@keyframes centerPulse {
    0%, 100% {
        opacity: 0.85;
        text-shadow: 0 0 20px rgba(168, 85, 247, 0.8), 0 0 40px rgba(168, 85, 247, 0.4);
    }
    50% {
        opacity: 1;
        text-shadow: 0 0 30px rgba(168, 85, 247, 1), 0 0 60px rgba(236, 72, 153, 0.6), 0 0 90px rgba(168, 85, 247, 0.3);
    }
}

/* Name + role */
.loader-text {
    margin-bottom: 28px;
    animation: fadeInUp 0.7s ease-out 0.4s backwards;
}

.loader-name {
    font-size: 1.5em;
    font-weight: 700;
    color: white;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.loader-role {
    font-size: 0.7em;
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: 5px;
    text-transform: uppercase;
    opacity: 0.85;
}

/* Progress bar */
.loader-bar-wrap {
    width: 200px;
    height: 3px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 16px;
    animation: fadeIn 0.5s ease 0.3s backwards;
}

.loader-bar {
    height: 100%;
    width: 0;
    background: var(--accent-gradient);
    border-radius: inherit;
    animation: loadProgress 1.85s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.6);
}

@keyframes loadProgress {
    0%   { width: 0%; }
    20%  { width: 22%; }
    50%  { width: 58%; }
    80%  { width: 84%; }
    100% { width: 100%; }
}

/* Status text */
.loader-status {
    font-size: 0.65em;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 2.5px;
    text-transform: uppercase;
    animation: fadeIn 0.5s ease 0.5s backwards;
}

.loader-dots::after {
    content: '';
    animation: dotsAnim 1.2s steps(4, end) infinite;
}

@keyframes dotsAnim {
    0%   { content: ''; }
    25%  { content: '.'; }
    50%  { content: '..'; }
    75%  { content: '...'; }
}

/* ========================================
   Header / Hero
   ======================================== */
#main-content.hidden { opacity: 0; visibility: hidden; transition: opacity 0.8s ease, visibility 0.8s ease; }
#main-content.visible { opacity: 1; visibility: visible; transition: opacity 0.8s ease, visibility 0.8s ease; }

header {
    background: var(--primary-gradient);
    color: white;
    padding: 130px 20px 220px;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 620px;
    display: flex;
    align-items: center;
    justify-content: center;
}

header::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
    animation: bgPulse 15s ease-in-out infinite;
}

@keyframes bgPulse {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(5deg); }
}

header .container {
    position: relative;
    z-index: 10;
    pointer-events: none;
}
header .container > * { pointer-events: auto; }

#neuron-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
    opacity: 0.65;
    display: block;
}

/* Hero Badge */
.hero-badge {
    position: absolute;
    top: calc(var(--nav-height) + 20px);
    right: 32px;
    z-index: 20;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: rgba(168, 85, 247, 0.12);
    border: 1px solid rgba(168, 85, 247, 0.4);
    color: var(--accent-color);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.75em;
    font-weight: 700;
    letter-spacing: 1.5px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: fadeIn 0.6s ease-out 2.2s backwards;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge-dot {
    width: 8px; height: 8px;
    background: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 8px #00ff88;
    animation: blink 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

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

header h1 {
    font-size: 4.5em;
    font-weight: 800;
    margin-bottom: 0;
    text-shadow: 0 4px 30px rgba(0,0,0,0.3);
    animation: fadeInDown 0.7s ease-out 0.1s backwards;
    letter-spacing: -2px;
    position: relative;
    display: inline-block;
    line-height: 1.1;
}

header h1::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 3px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

.hero-title {
    font-size: 1.35em;
    opacity: 0.9;
    animation: fadeInDown 0.7s ease-out 0.2s backwards;
    font-weight: 300;
    letter-spacing: 1px;
    margin-top: 24px;
    margin-bottom: 14px;
    color: rgba(255, 255, 255, 0.85);
    min-height: 2em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

/* Hero Grid Overlay */
.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(168, 85, 247, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(168, 85, 247, 0.05) 1px, transparent 1px);
    background-size: 64px 64px;
    z-index: 2;
    pointer-events: none;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
}

/* Avatar */
.hero-avatar {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: var(--accent-gradient);
    padding: 3px;
    margin: 0 auto 24px;
    animation: avatarGlow 3s ease-in-out infinite, fadeInDown 0.7s ease-out backwards;
}

.avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #180640, #0c0030);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    font-weight: 800;
    color: white;
    letter-spacing: 3px;
}

@keyframes avatarGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(168, 85, 247, 0.5); }
    50% { box-shadow: 0 0 40px rgba(168, 85, 247, 0.9), 0 0 70px rgba(236, 72, 153, 0.35); }
}

/* Gradient name */
.name-accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Typewriter cursor */
.typing-cursor {
    display: inline-block;
    color: var(--accent-color);
    font-weight: 200;
    margin-left: 2px;
    animation: cursorBlink 0.75s ease-in-out infinite;
}

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

/* Hero tech pills */
.hero-tech {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 36px;
    animation: fadeInUp 0.7s ease-out 0.5s backwards;
}

.hero-tech span {
    font-size: 0.76em;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 5px 15px;
    border-radius: 20px;
    letter-spacing: 0.3px;
    transition: var(--transition);
}

.hero-tech span:hover {
    color: var(--accent-color);
    border-color: rgba(168, 85, 247, 0.45);
    background: rgba(168, 85, 247, 0.1);
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.65em;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    animation: fadeIn 1s ease 3s backwards;
    pointer-events: none;
}

.scroll-arrow {
    width: 16px;
    height: 16px;
    border-right: 2px solid rgba(255, 255, 255, 0.25);
    border-bottom: 2px solid rgba(255, 255, 255, 0.25);
    transform: rotate(45deg);
    animation: bounceDown 1.6s ease-in-out infinite;
}

@keyframes bounceDown {
    0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 0.4; }
    50% { transform: rotate(45deg) translate(4px, 4px); opacity: 1; }
}

.hero-sub {
    font-size: 1em;
    opacity: 0.5;
    animation: fadeInDown 0.7s ease-out 0.3s backwards;
    font-weight: 300;
    margin-bottom: 28px;
}

.contact-info {
    animation: fadeInUp 0.7s ease-out 0.4s backwards;
}

.avail-time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8em;
    color: rgba(255,255,255,0.45);
    letter-spacing: 0.3px;
    margin-top: 8px;
    margin-bottom: 20px;
}

.avail-sep { color: rgba(255,255,255,0.2); }

.avail-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.avail-dot.online {
    background: #22c55e;
    box-shadow: 0 0 6px #22c55e;
    animation: pulse-online 2s ease-in-out infinite;
}

.avail-dot.offline {
    background: rgba(255,255,255,0.25);
    box-shadow: none;
}

#avail-label.online { color: #4ade80; }
#avail-label.offline { color: rgba(255,255,255,0.35); }

@keyframes pulse-online {
    0%, 100% { opacity: 1; box-shadow: 0 0 6px #22c55e; }
    50% { opacity: 0.6; box-shadow: 0 0 12px #22c55e; }
}

.contact-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.contact-link {
    color: rgba(255,255,255,0.65) !important;
    text-decoration: none !important;
    font-size: 0.88em !important;
    font-weight: 400 !important;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    backdrop-filter: none !important;
    transition: color 0.2s !important;
    box-shadow: none !important;
    transform: none !important;
}

.contact-link:hover {
    color: rgba(255,255,255,0.95) !important;
    background: none !important;
    border-color: transparent !important;
    transform: none !important;
    box-shadow: none !important;
}

.contact-sep {
    color: rgba(255,255,255,0.25);
    font-size: 1em;
}

.hero-links {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

header a {
    color: #fff;
    text-decoration: none;
    padding: 10px 20px;
    border: 1.5px solid rgba(255,255,255,0.25);
    border-radius: 50px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.06);
    font-size: 0.87em;
    white-space: nowrap;
}


header a:hover {
    background: rgba(255,255,255,0.16);
    border-color: rgba(255,255,255,0.7);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

/* ========================================
   Section Styling
   ======================================== */
section { padding: 90px 0; }

section h2 {
    text-align: center;
    font-size: 2.4em;
    margin-bottom: 60px;
    color: var(--text-primary);
    position: relative;
    font-weight: 700;
    letter-spacing: -0.5px;
}

section h2::after {
    content: '';
    display: block;
    width: 52px;
    height: 4px;
    background: var(--accent-gradient);
    margin: 16px auto 0;
    border-radius: 2px;
}

/* ========================================
   About Section
   ======================================== */
.about { background: var(--card-bg); }

.about p {
    font-size: 1.18em;
    text-align: center;
    max-width: 760px;
    margin: 0 auto 60px;
    color: var(--text-secondary);
    line-height: 1.9;
}

.about-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
    padding: 28px 36px;
    background: var(--light-bg);
    border-radius: 18px;
    min-width: 130px;
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
}

.stat:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stat-num {
    display: block;
    font-size: 2.4em;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.stat-label {
    display: block;
    font-size: 0.78em;
    color: var(--text-secondary);
    font-weight: 600;
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

/* ========================================
   Projects Section
   ======================================== */
.projects { background: var(--light-bg); }

.projects-header {
    margin-bottom: 48px;
}

.projects-header h2 { margin-bottom: 10px; }

.projects-sub {
    font-size: 1.05em;
    color: var(--text-secondary);
    font-weight: 400;
}

.project-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 1024px) {
    .project-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .project-list { grid-template-columns: 1fr; }
}

.project-item {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e8e6f0;
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: var(--transition);
    position: relative;
}

.project-item::before {
    content: '';
    position: absolute;
    left: 0; top: 20%; bottom: 20%;
    width: 3px;
    background: var(--accent-gradient);
    border-radius: 0 3px 3px 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-item:hover {
    border-color: rgba(168,85,247,0.2);
    box-shadow: 0 8px 32px rgba(168,85,247,0.08);
    transform: translateY(-4px);
}

.project-item:hover::before { opacity: 1; }

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

.project-num {
    font-size: 0.75em;
    font-weight: 800;
    color: rgba(168,85,247,0.35);
    letter-spacing: 2px;
}

.project-cat {
    font-size: 0.7em;
    font-weight: 600;
    color: var(--accent-color);
    background: rgba(168,85,247,0.08);
    border: 1px solid rgba(168,85,247,0.18);
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.3px;
}

.project-item h3 {
    font-size: 1.08em;
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
}

.project-item p {
    font-size: 0.88em;
    color: var(--text-secondary);
    line-height: 1.75;
    margin: 0;
    flex: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: auto;
}

.project-tags span {
    font-size: 0.73em;
    font-weight: 600;
    color: var(--accent-color);
    background: rgba(168, 85, 247, 0.07);
    border: 1px solid rgba(168, 85, 247, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.3px;
    transition: var(--transition);
}

.project-tags span:hover {
    background: rgba(168, 85, 247, 0.18);
    border-color: rgba(168, 85, 247, 0.5);
}

/* ========================================
   Skills Section
   ======================================== */
.skills { background: var(--card-bg); }

.skills-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 56px;
    align-items: start;
}

/* --- Left: competency bars --- */
.skills-col-title {
    font-size: 0.72em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.core-skills {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.core-skill-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 12px;
}

.core-skill-name {
    font-size: 0.95em;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.core-skill-sub {
    font-size: 0.76em;
    color: var(--text-secondary);
    margin-top: 3px;
    font-weight: 400;
}

.core-skill-pct {
    font-size: 0.82em;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 2px;
}

.skill-track {
    height: 7px;
    background: var(--light-bg);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
}

.skill-fill {
    height: 100%;
    width: 0;
    background: var(--accent-gradient);
    border-radius: inherit;
    transition: width 1.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.skill-fill::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 20px; height: 100%;
    background: rgba(255, 255, 255, 0.35);
    border-radius: inherit;
    filter: blur(3px);
}

.skills-left.visible .core-skill:nth-child(1) .skill-fill { width: var(--fw); transition-delay: 0.05s; }
.skills-left.visible .core-skill:nth-child(2) .skill-fill { width: var(--fw); transition-delay: 0.2s; }
.skills-left.visible .core-skill:nth-child(3) .skill-fill { width: var(--fw); transition-delay: 0.35s; }
.skills-left.visible .core-skill:nth-child(4) .skill-fill { width: var(--fw); transition-delay: 0.5s; }
.skills-left.visible .core-skill:nth-child(5) .skill-fill { width: var(--fw); transition-delay: 0.65s; }

/* --- Right: tool groups --- */
.skills-right {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.skill-group {
    background: var(--light-bg);
    border-radius: 16px;
    padding: 22px 24px;
    border: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition);
}

.skill-group:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.skill-group-title {
    font-size: 0.7em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-color);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(168, 85, 247, 0.15);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.skill-tags span {
    background: var(--card-bg);
    color: var(--text-primary);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.8em;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.06);
    cursor: default;
}

.skill-tags span:hover {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ========================================
   Achievements Section
   ======================================== */
.achievements { background: var(--light-bg); }

.achievements ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.achievements li {
    background: var(--card-bg);
    padding: 24px 28px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: var(--transition);
    font-size: 0.95em;
    color: var(--text-secondary);
    line-height: 1.6;
    border-left: 4px solid var(--accent-color);
}

.achievements li::before {
    content: '🏆';
    font-size: 1.4em;
    flex-shrink: 0;
    margin-top: 2px;
}

.achievements li:hover {
    transform: translateX(6px);
    box-shadow: var(--shadow-md);
}

/* ========================================
   Certifications Section
   ======================================== */
.certifications { background: var(--card-bg); }

.certifications ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    max-width: 860px;
    margin: 0 auto;
}

.certifications li {
    background: var(--light-bg);
    padding: 28px 32px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
}

.certifications li::before {
    content: '📜';
    font-size: 2em;
    flex-shrink: 0;
}

.certifications li:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.cert-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cert-content strong {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1em;
    line-height: 1.4;
}

.cert-issuer {
    font-size: 0.75em;
    font-weight: 700;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ========================================
   Footer
   ======================================== */
footer {
    background: var(--dark-bg);
    color: white;
    text-align: center;
    padding: 64px 20px 40px;
}

.footer-name {
    font-size: 1.5em;
    font-weight: 700;
    margin-bottom: 6px;
}

.footer-role {
    font-size: 0.8em;
    color: var(--accent-color);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 32px;
    opacity: 0.85;
}

.footer-links {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.footer-links a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.88em;
    padding: 8px 22px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    border-color: var(--accent-color);
    background: rgba(168, 85, 247, 0.08);
}

.footer-copy {
    opacity: 0.35;
    font-size: 0.82em;
}

/* ========================================
   Back to Top
   ======================================== */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    background: var(--accent-color);
    color: var(--dark-bg);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.4);
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

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

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(168, 85, 247, 0.55);
    background: #c084fc;
}

/* ========================================
   Lightbox
   ======================================== */
.lightbox {
    display: none;
    position: fixed;
    z-index: 10000;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.92);
}

.lightbox.active { display: flex; align-items: center; justify-content: center; }

.lightbox-content {
    max-width: 90%; max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(168, 85, 247, 0.3);
    animation: zoomIn 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 20px; right: 35px;
    font-size: 50px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10001;
    line-height: 1;
}

.lightbox-close:hover { color: var(--accent-color); transform: scale(1.2); }

/* ========================================
   Animations
   ======================================== */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-28px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(28px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* ========================================
   Scroll Animations
   ======================================== */
.fade-in {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

.slide-in-left {
    opacity: 0;
    transform: translateX(-56px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.slide-in-left.visible { opacity: 1; transform: translateX(0); }

.slide-in-right {
    opacity: 0;
    transform: translateX(56px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.slide-in-right.visible { opacity: 1; transform: translateX(0); }

.scale-in {
    opacity: 0;
    transform: scale(0.88);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.scale-in.visible { opacity: 1; transform: scale(1); }

.stagger-1 { transition-delay: 0.05s; }
.stagger-2 { transition-delay: 0.15s; }
.stagger-3 { transition-delay: 0.25s; }
.stagger-4 { transition-delay: 0.35s; }
.stagger-5 { transition-delay: 0.45s; }
.stagger-6 { transition-delay: 0.55s; }

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        flex-direction: column;
        background: rgba(12, 10, 35, 0.97);
        padding: 12px 24px 24px;
        gap: 2px;
        backdrop-filter: blur(20px);
        box-shadow: 0 8px 30px rgba(0,0,0,0.5);
    }
    .nav-links.open { display: flex; }
    .nav-hamburger { display: flex; }
    .nav-cta { display: none; }

    header { padding: 90px 20px 110px; min-height: 520px; }
    header h1 { font-size: 2.8em; letter-spacing: -1px; }
    .hero-title { font-size: 1.05em; letter-spacing: 0.5px; }
    .hero-avatar { width: 78px; height: 78px; }
    .hero-tech { gap: 7px; }
    .scroll-indicator { display: none; }
    .hero-sub { font-size: 0.9em; }

    section { padding: 60px 0; }
    section h2 { font-size: 2em; margin-bottom: 44px; }

    .project-list { grid-template-columns: 1fr; }
    .skills-layout { grid-template-columns: 1fr; gap: 36px; }
    .about-stats { gap: 12px; }
    .stat { padding: 20px 26px; min-width: 110px; }
    .achievements ul { grid-template-columns: 1fr; }
    .certifications ul { grid-template-columns: 1fr; }
    .back-to-top { bottom: 20px; right: 20px; }
}

@media (max-width: 480px) {
    header h1 { font-size: 2.1em; }
    .hero-badge { display: none; }
    .about p { font-size: 1.05em; }
    .project-item { padding: 28px 24px; }
}
