/* ============================================================
   PAVLY — PORTFOLIO
   A premium, interactive portfolio experience
   ============================================================ */

/* ---------- VARIABLES ---------- */
:root {
    --bg: #0a0e1a;
    --bg-2: #0f1424;
    --card: #111827;
    --card-hover: #161d2f;
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --muted: #8892a4;
    --text: #e2e8f0;
    --text-bright: #f1f5f9;
    --accent: #7c3aed;
    --accent-light: #a78bfa;
    --accent-2: #06b6d4;
    --accent-2-light: #22d3ee;
    --gradient: linear-gradient(135deg, var(--accent), var(--accent-2));
    --gradient-text: linear-gradient(135deg, var(--accent-light), var(--accent-2-light));
    --glass: rgba(255, 255, 255, 0.03);
    --glass-hover: rgba(255, 255, 255, 0.06);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(124, 58, 237, 0.15);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --max-width: 1200px;
    --section-padding: 120px;
    --font-sans: 'Space Grotesk', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(124, 58, 237, 0.3) transparent;
}

html::-webkit-scrollbar {
    width: 6px;
}

html::-webkit-scrollbar-track {
    background: transparent;
}

html::-webkit-scrollbar-thumb {
    background: rgba(124, 58, 237, 0.3);
    border-radius: 3px;
}

html::-webkit-scrollbar-thumb:hover {
    background: rgba(124, 58, 237, 0.5);
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
    overflow-x: hidden;
    cursor: default;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

img {
    display: block;
    max-width: 100%;
}

button {
    font-family: inherit;
    cursor: pointer;
}

::selection {
    background: rgba(124, 58, 237, 0.3);
    color: var(--text-bright);
}

/* ---------- LOADER ---------- */
.loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s var(--ease-out-expo), visibility 0.6s;
}

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

.loader-inner {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-ring {
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-top-color: var(--accent);
    border-right-color: var(--accent-2);
    border-radius: 50%;
    animation: loaderSpin 1s linear infinite;
}

.loader-text {
    font-family: var(--font-mono);
    font-size: 28px;
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* ---------- CUSTOM CURSOR ---------- */
.cursor,
.cursor-follower {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    mix-blend-mode: difference;
    transition: transform 0.15s ease;
}

.cursor {
    width: 8px;
    height: 8px;
    background: #fff;
    transform: translate(-50%, -50%);
}

.cursor-follower {
    width: 36px;
    height: 36px;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.3s var(--ease-spring),
                height 0.3s var(--ease-spring),
                border-color 0.3s ease;
}

.cursor-follower.hover {
    width: 56px;
    height: 56px;
    border-color: var(--accent-light);
}

@media (hover: none), (pointer: coarse) {
    .cursor, .cursor-follower { display: none; }
}

/* ---------- SCROLL PROGRESS ---------- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--gradient);
    z-index: 1000;
    transform-origin: left;
    transform: scaleX(0);
    transition: none;
    box-shadow: 0 0 12px rgba(124, 58, 237, 0.4);
}

/* ---------- PARTICLE CANVAS ---------- */
#particleCanvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
}

/* ---------- NAV ---------- */
.nav-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 0 32px;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

.nav-header.scrolled {
    background: rgba(10, 14, 26, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 1px 0 var(--border);
    padding-top: 0;
    padding-bottom: 0;
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

/* Brand */
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    z-index: 101;
}

.logo-mark {
    position: relative;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.logo-img {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: cover;
    position: relative;
    z-index: 1;
}

.logo-pulse {
    position: absolute;
    inset: -3px;
    border-radius: 14px;
    background: var(--gradient);
    opacity: 0;
    z-index: 0;
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { opacity: 0; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.05); }
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-name {
    font-weight: 700;
    font-size: 16px;
    color: var(--text-bright);
}

.brand-role {
    font-size: 11px;
    color: var(--muted);
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
}

/* Nav links */
.nav-links {
    display: flex;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    transition: color 0.3s ease, background 0.3s ease;
    text-decoration: none;
}

.nav-link:hover {
    color: var(--text-bright);
    background: var(--glass-hover);
}

.nav-link.active {
    color: var(--accent-light);
    background: rgba(124, 58, 237, 0.1);
}

.nav-link-number {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--accent);
    opacity: 0.7;
}

/* Nav toggle (mobile) */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 101;
}

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

.nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

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

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav */
.mobile-nav {
    position: fixed;
    inset: 0;
    z-index: 99;
    background: rgba(10, 14, 26, 0.97);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s var(--ease-out-expo), visibility 0.5s;
}

.mobile-nav.open {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: center;
}

.mobile-link {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 32px;
    font-weight: 700;
    color: var(--text-bright);
    text-decoration: none;
    padding: 12px 24px;
    border-radius: var(--radius);
    transition: background 0.3s ease, transform 0.4s var(--ease-spring);
    opacity: 0;
    transform: translateY(20px);
}

.mobile-nav.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-nav.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-nav.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-nav.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-nav.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
.mobile-nav.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

.mobile-link:hover {
    background: var(--glass-hover);
}

.mobile-link-number {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--accent);
    opacity: 0.6;
    min-width: 30px;
}

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

/* ---------- HERO ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 60px;
    align-items: center;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 120px 32px 80px;
    z-index: 1;
}

.hero-content {
    max-width: 640px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 999px;
    background: rgba(124, 58, 237, 0.08);
    border: 1px solid rgba(124, 58, 237, 0.2);
    font-size: 13px;
    font-weight: 500;
    color: var(--accent-light);
    font-family: var(--font-mono);
    letter-spacing: 0.02em;
    margin-bottom: 28px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
    animation: statusPulse 2s ease-in-out infinite;
}

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

.hero-title {
    font-size: clamp(36px, 5.5vw, 64px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--text-bright);
    margin-bottom: 24px;
}

.hero-line {
    display: block;
    opacity: 0.7;
    font-size: 0.6em;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--muted);
}

.hero-name {
    position: relative;
    display: inline-block;
}

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

.hero-underline {
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 12px;
    opacity: 0.6;
}

.hero-underline path {
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    animation: drawUnderline 1.5s var(--ease-out-expo) 1s forwards;
}

@keyframes drawUnderline {
    to { stroke-dashoffset: 0; }
}

.hero-tagline {
    display: block;
    font-size: 0.65em;
    margin-top: 8px;
    min-height: 1.2em;
    color: var(--text-bright);
    font-weight: 600;
}

.hero-desc {
    font-size: 17px;
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 520px;
}

.text-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

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

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    background: var(--gradient);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: transform 0.3s var(--ease-spring), box-shadow 0.3s ease;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.4);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-hover);
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    background: transparent;
    transition: transform 0.3s var(--ease-spring), border-color 0.3s ease, background 0.3s ease;
}

.btn-outline:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    background: rgba(124, 58, 237, 0.06);
}

/* Hero stats */
.hero-stats {
    display: flex;
    gap: 0;
    align-items: center;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 28px;
}

.stat:first-child {
    padding-left: 0;
}

.stat-number {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-bright);
    font-family: var(--font-mono);
    line-height: 1;
}

.stat-plus {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-light);
}

.stat-label {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
    white-space: nowrap;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* Hero visual */
.hero-visual {
    display: flex;
    justify-content: center;
}

.profile-card {
    position: relative;
    width: 100%;
    max-width: 340px;
    perspective: 1000px;
}

.project-card-glow {
    position: absolute;
    inset: -1px;
    border-radius: calc(var(--radius) + 1px);
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 0;
    filter: blur(1px);
}

.profile-card:hover .project-card-glow,
.project-card:hover .project-card-glow {
    opacity: 0.5;
}

.profile-card-inner {
    position: relative;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    z-index: 1;
    transition: border-color 0.3s ease;
}

.profile-card:hover .profile-card-inner {
    border-color: var(--border-hover);
}

.profile-avatar-wrap {
    position: relative;
    width: 120px;
    height: 120px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 20px;
    object-fit: cover;
    position: relative;
    z-index: 1;
}

.avatar-ring {
    position: absolute;
    inset: -4px;
    border-radius: 24px;
    background: var(--gradient);
    z-index: 0;
    opacity: 0.7;
    animation: avatarRotate 6s linear infinite;
}

@keyframes avatarRotate {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

.profile-info {
    text-align: center;
}

.profile-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-bright);
    margin: 0;
}

.profile-role {
    font-size: 13px;
    color: var(--muted);
    font-family: var(--font-mono);
    margin-top: 4px;
}

.profile-techs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.profile-techs span {
    font-size: 11px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--glass);
    border: 1px solid var(--border);
    color: var(--muted);
    font-family: var(--font-mono);
    transition: border-color 0.3s ease, color 0.3s ease;
}

.profile-techs span:hover {
    border-color: var(--accent);
    color: var(--accent-light);
}

.profile-links {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.profile-social {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--glass);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    transition: all 0.3s ease;
    text-decoration: none;
}

.profile-social:hover {
    background: rgba(124, 58, 237, 0.1);
    border-color: var(--accent);
    color: var(--accent-light);
    transform: translateY(-2px);
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    animation: scrollBounce 2.5s ease-in-out infinite;
}

.scroll-indicator span {
    font-size: 11px;
    color: var(--muted);
    font-family: var(--font-mono);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.scroll-mouse {
    width: 24px;
    height: 38px;
    border: 2px solid var(--border-hover);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.scroll-wheel {
    width: 3px;
    height: 8px;
    background: var(--accent);
    border-radius: 2px;
    animation: scrollWheel 2s ease-in-out infinite;
}

@keyframes scrollWheel {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(8px); opacity: 0.2; }
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ---------- SECTIONS ---------- */
.section {
    position: relative;
    z-index: 1;
    padding: var(--section-padding) 0;
}

.section-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 32px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 60px;
}

.section-number {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--accent);
    font-weight: 500;
}

.section-title {
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 800;
    color: var(--text-bright);
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border-hover), transparent);
}

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

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

.about-text strong {
    color: var(--text-bright);
}

.about-highlights {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.highlight-card {
    padding: 24px;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid var(--border);
    transition: border-color 0.3s ease, transform 0.3s var(--ease-spring);
}

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

.highlight-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: rgba(124, 58, 237, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-light);
    margin-bottom: 14px;
}

.highlight-card h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 8px;
}

.highlight-card p {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
}

/* ---------- EXPERIENCE TIMELINE ---------- */
.timeline {
    position: relative;
    padding-left: 48px;
}

.timeline-line {
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent), var(--accent-2), transparent);
    border-radius: 1px;
}

.timeline-item {
    position: relative;
    padding-bottom: 40px;
}

.timeline-dot {
    position: absolute;
    left: -42px;
    top: 8px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-dot-inner {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(0.7); }
}

.timeline-content {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: border-color 0.3s ease, transform 0.3s var(--ease-spring);
}

.timeline-content:hover {
    border-color: var(--border-hover);
    transform: translateX(4px);
}

.timeline-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--accent);
    margin-bottom: 12px;
}

.timeline-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 6px;
}

.timeline-company {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    color: var(--muted);
    margin-bottom: 16px;
    font-weight: 500;
}

.timeline-desc {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 16px;
    line-height: 1.6;
}

.timeline-bullets {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}

.timeline-bullets li {
    position: relative;
    padding-left: 20px;
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 8px;
    line-height: 1.6;
}

.timeline-bullets li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 14px;
}

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

.pill {
    font-size: 11px;
    font-family: var(--font-mono);
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(124, 58, 237, 0.08);
    color: var(--accent-light);
    border: 1px solid rgba(124, 58, 237, 0.15);
}

/* ---------- PROJECTS ---------- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.project-card {
    position: relative;
    border-radius: var(--radius);
    cursor: pointer;
    transition: transform 0.4s var(--ease-spring);
}

.project-card:hover {
    transform: translateY(-8px);
}

.project-card-inner {
    position: relative;
    z-index: 1;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: border-color 0.3s ease;
}

.project-card:hover .project-card-inner {
    border-color: var(--border-hover);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.project-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: rgba(124, 58, 237, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-light);
}

.project-ext {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    border-radius: var(--radius-xs);
    transition: color 0.3s ease, transform 0.3s ease;
}

.project-ext:hover {
    color: var(--accent-light);
    transform: translateY(-2px);
}

.project-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 10px;
}

.project-desc {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

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

.project-tags span {
    font-size: 11px;
    font-family: var(--font-mono);
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--glass);
    border: 1px solid var(--border);
    color: var(--muted);
}

.project-year {
    font-size: 12px;
    font-family: var(--font-mono);
    color: var(--muted);
    opacity: 0.6;
}

/* ---------- SKILLS ---------- */
.skills-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.skills-category {
    padding: 28px;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid var(--border);
    transition: border-color 0.3s ease;
}

.skills-category:hover {
    border-color: var(--border-hover);
}

.skills-cat-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 18px;
}

.skills-cat-title svg {
    color: var(--accent-light);
}

.skills-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-chip {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    background: var(--glass);
    border: 1px solid var(--border);
    font-size: 13px;
    font-family: var(--font-mono);
    color: var(--muted);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: default;
}

.skill-chip::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: var(--gradient);
    transition: width 0.4s var(--ease-out-expo);
}

.skill-chip:hover {
    border-color: var(--accent);
    color: var(--accent-light);
    background: rgba(124, 58, 237, 0.06);
    transform: translateY(-2px);
}

.skill-chip:hover::after {
    width: 100%;
}

.skill-chip.soft {
    background: rgba(6, 182, 212, 0.05);
    border-color: rgba(6, 182, 212, 0.1);
}

.skill-chip.soft:hover {
    border-color: var(--accent-2);
    color: var(--accent-2-light);
    background: rgba(6, 182, 212, 0.1);
}

.skill-chip.soft::after {
    background: linear-gradient(90deg, var(--accent-2), var(--accent));
}

/* ---------- CONTACT ---------- */
.contact-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.contact-heading {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    color: var(--text-bright);
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.contact-text p {
    font-size: 16px;
    color: var(--muted);
    margin-bottom: 40px;
    line-height: 1.7;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 600px;
    margin: 0 auto;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid var(--border);
    text-decoration: none;
    transition: all 0.3s ease;
}

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

.contact-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: rgba(124, 58, 237, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-light);
    flex-shrink: 0;
}

.contact-card h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 2px;
}

.contact-card span {
    font-size: 13px;
    color: var(--muted);
    font-family: var(--font-mono);
}

.contact-card.location {
    cursor: default;
}

/* ---------- FOOTER ---------- */
.footer {
    position: relative;
    z-index: 1;
    padding: 0 32px 48px;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-line {
    height: 1px;
    background: var(--border);
    margin-bottom: 32px;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 13px;
    color: var(--muted);
    flex-wrap: wrap;
}

.footer-dot {
    opacity: 0.3;
}

/* ---------- SCROLL TO TOP ---------- */
.scroll-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 90;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s var(--ease-spring);
    box-shadow: var(--shadow-md);
}

.scroll-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-4px);
}

/* ---------- MODAL ---------- */
#modalRoot {
    display: none;
}

#modalRoot.active {
    display: block;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.35s var(--ease-out-expo);
}

.modal-backdrop.show {
    opacity: 1;
}

.modal {
    background: var(--card);
    border: 1px solid var(--border-hover);
    border-radius: var(--radius);
    max-width: 600px;
    width: 100%;
    padding: 36px;
    transform: scale(0.92) translateY(20px);
    opacity: 0;
    transition: transform 0.45s var(--ease-out-expo), opacity 0.35s ease;
    box-shadow: var(--shadow-lg), 0 0 80px rgba(124, 58, 237, 0.1);
}

.modal-backdrop.show .modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-bright);
}

.modal-title a {
    color: var(--text-bright);
    text-decoration: none;
    transition: color 0.3s ease;
}

.modal-title a:hover {
    color: var(--accent-light);
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-xs);
    background: var(--glass);
    border: 1px solid var(--border);
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.modal-desc {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 24px;
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.modal-tags .pill {
    font-size: 12px;
}

.modal-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    background: var(--gradient);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    transition: transform 0.3s var(--ease-spring), box-shadow 0.3s ease;
}

.modal-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
}

/* ---------- REVEAL ANIMATIONS ---------- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-out-expo),
                transform 0.8s var(--ease-out-expo);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.15s; }
.reveal-delay-2 { transition-delay: 0.3s; }
.reveal-delay-3 { transition-delay: 0.45s; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
        padding-top: 140px;
        gap: 40px;
    }

    .hero-visual {
        order: -1;
    }

    .profile-card {
        max-width: 300px;
    }

    .scroll-indicator {
        display: none;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 768px) {
    :root {
        --section-padding: 80px;
    }

    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        padding: 120px 20px 60px;
    }

    .section-inner {
        padding: 0 20px;
    }

    .hero-title {
        font-size: clamp(32px, 8vw, 48px);
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 16px;
    }

    .stat-divider {
        display: none;
    }

    .stat {
        padding: 0 16px;
    }

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

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

    .contact-cards {
        grid-template-columns: 1fr;
    }

    .timeline {
        padding-left: 36px;
    }

    .timeline-dot {
        left: -30px;
    }

    .timeline-line {
        left: 10px;
    }

    .nav-header {
        padding: 0 20px;
    }

    .footer {
        padding: 0 20px 32px;
    }
}

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

    .btn-primary,
    .btn-outline {
        justify-content: center;
        width: 100%;
    }
}
