/* ============================================
   ULTRA MODERN 3D CSS - ENHANCED
   ============================================ */

:root {
    --primary: #6366f1;
    --primary-rgb: 99, 102, 241;
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --bg-primary: #0a0a0f;
    --bg-secondary: #13131a;
    --bg-tertiary: #1a1a24;
    --surface: rgba(255, 255, 255, 0.03);
    
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-tertiary: #71717a;
    
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-rainbow: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1, #96e6a1, #ffd93d);
    
    --shadow-3d: 0 50px 100px rgba(0, 0, 0, 0.5);
    --glow: 0 0 30px rgba(99, 102, 241, 0.5);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --spring: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

body.light-theme {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --surface: rgba(0, 0, 0, 0.03);
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;
    
    --shadow-3d: 0 25px 50px rgba(0, 0, 0, 0.1);
    --glow: 0 0 20px rgba(99, 102, 241, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    transition: background 0.3s ease;
}

/* Preloader - Enhanced */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s, visibility 0.5s;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.cube-loader {
    width: 80px;
    height: 80px;
    position: relative;
    transform-style: preserve-3d;
    animation: rotate-cube 2s infinite ease-in-out;
}

@keyframes rotate-cube {
    0% { transform: rotateX(0) rotateY(0) rotateZ(0); }
    33% { transform: rotateX(30deg) rotateY(-30deg) rotateZ(90deg); }
    66% { transform: rotateX(90deg) rotateY(180deg) rotateZ(180deg); }
    100% { transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg); }
}

.cube-face {
    position: absolute;
    width: 80px;
    height: 80px;
    border: 3px solid var(--primary);
    background: rgba(99, 102, 241, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary);
    opacity: 0.8;
}

.cube-face:nth-child(1) { transform: translateZ(40px); }
.cube-face:nth-child(2) { transform: rotateY(90deg) translateZ(40px); }
.cube-face:nth-child(3) { transform: rotateY(180deg) translateZ(40px); }
.cube-face:nth-child(4) { transform: rotateY(-90deg) translateZ(40px); }
.cube-face:nth-child(5) { transform: rotateX(90deg) translateZ(40px); }
.cube-face:nth-child(6) { transform: rotateX(-90deg) translateZ(40px); }

/* Background - Enhanced */
.bg-animation {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    background: linear-gradient(45deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    overflow: hidden;
}

.bg-animation::before,
.bg-animation::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    animation: float-orb 20s infinite ease-in-out;
}

.bg-animation::before {
    background: var(--gradient-1);
    top: -200px;
    left: -200px;
}

.bg-animation::after {
    background: var(--gradient-2);
    bottom: -200px;
    right: -200px;
    animation-delay: 10s;
}

@keyframes float-orb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* Particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.3;
    animation: float-particle 15s infinite linear;
}

@keyframes float-particle {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100px) rotate(720deg);
        opacity: 0;
    }
}

/* Island Navigation - Enhanced */
.navbar {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    padding: 0.75rem 1.5rem;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 90%;
}

body.light-theme .navbar {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    color: var(--text-primary);
    text-decoration: none;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-rainbow);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.logo:hover::after {
    transform: translateX(0);
}

.logo i {
    font-size: 1.5rem;
    color: var(--primary);
    animation: rotate-logo 3s infinite linear;
}

@keyframes rotate-logo {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.theme-toggle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--gradient-1);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.theme-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255, 255, 255, 0.2), transparent);
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.theme-toggle:hover::before {
    transform: translateY(0);
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(180deg);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

#createOwnBtn {
    padding: 0.5rem 1rem;
    margin-left: 1rem;
    background: var(--gradient-1);
    color: white;
    border-radius: 50px;
    text-decoration: none;
}

/* App Container */
.app-container {
    min-height: 100vh;
    padding-top: 6rem;
}

/* Hero Section - Enhanced */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.5s ease;
}

.hero-content {
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    transition: all 0.5s ease;
}

.hero.hidden {
    min-height: 0;
    height: 0;
    padding: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-20px);
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: var(--gradient-rainbow);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: gradient-shift 3s ease infinite, text-glitch 5s infinite;
    position: relative;
    display: inline-block;
}

.hero-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-rainbow);
    transform: scaleX(0);
    transform-origin: left;
    animation: expand-line 2s 1s forwards;
}

@keyframes expand-line {
    to { transform: scaleX(1); }
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes text-glitch {
    0%, 100% { transform: translateX(0); }
    95% { transform: translateX(0); }
    96% { transform: translateX(-2px); }
    97% { transform: translateX(2px); }
    98% { transform: translateX(-2px); }
    99% { transform: translateX(2px); }
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    animation: fade-up 1s ease, subtitle-pulse 3s infinite;
}

@keyframes subtitle-pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cards 3D - Enhanced with Graphics */
.floating-cards {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin: 3rem 0;
    perspective: 1000px;
}

.card-3d {
    width: 250px;
    height: 350px;
    border-radius: 20px;
    transform-style: preserve-3d;
    transition: transform 0.6s, box-shadow 0.6s;
    animation: float-card 3s ease-in-out infinite;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    background: var(--gradient-1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    color: white;
    text-align: center;
}

.card-3d::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.2));
    opacity: 0;
    transition: opacity 0.6s;
    z-index: 1;
    pointer-events: none;
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.3));
    z-index: 2;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    z-index: 2;
}

.card-description {
    font-size: 0.9rem;
    opacity: 0.9;
    z-index: 2;
}

.card-3d:nth-child(1) {
    background: var(--gradient-1);
    animation-delay: 0s;
}

.card-3d:nth-child(2) {
    background: var(--gradient-2);
    animation-delay: 1s;
}

.card-3d:nth-child(3) {
    background: var(--gradient-3);
    animation-delay: 2s;
}

@keyframes float-card {
    0%, 100% { transform: translateY(0) rotateX(0) rotateY(0) scale(1); }
    33% { transform: translateY(-20px) rotateX(5deg) rotateY(5deg) scale(1.05); }
    66% { transform: translateY(10px) rotateX(-3deg) rotateY(-3deg) scale(1.03); }
}

.card-3d:hover {
    transform: rotateY(180deg) scale(1.05);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}

.card-3d:hover::before {
    opacity: 1;
}

/* Input Section - Enhanced */
.input-section {
    padding: 4rem 2rem;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    transition: all 0.5s ease;
}

.input-section.hidden {
    padding: 0;
    height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-20px);
}

.input-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--gradient-rainbow);
    border-radius: 0 0 10px 10px;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: var(--shadow-3d);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

body.light-theme .glass-panel {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to bottom right, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(30deg);
    pointer-events: none;
}

.glass-panel:hover {
    transform: translateY(-5px);
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-1);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.glass-panel:hover .section-title::after {
    transform: scaleX(1);
}

.input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.input-3d {
    flex: 1;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
    position: relative;
}

body.light-theme .input-3d {
    border: 2px solid rgba(0, 0, 0, 0.1);
}

.input-3d:focus {
    outline: none;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.btn-3d {
    padding: 1rem 2rem;
    background: var(--gradient-1);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
}

.btn-3d::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255, 255, 255, 0.2), transparent);
    transform: translateY(100%);
    transition: transform 0.6s ease;
    z-index: 1;
}

.btn-3d:hover::before {
    transform: translateY(0);
}

.btn-3d:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.4);
}

.quick-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.quick-links p {
    color: var(--text-secondary);
    width: 100%;
    text-align: center;
}

/* Profile Section - Improved Layout */
.profile-section {
    padding: 2rem;
    max-width: 1200px;
    margin: 2rem auto;
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.profile-section.visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.profile-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    width: 100%;
    overflow: hidden;
}

.profile-sidebar {
    background: var(--surface);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    align-self: start;
    width: 100%;
    box-sizing: border-box;
}

body.light-theme .profile-sidebar {
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.profile-image {
    width: 100%;
    border-radius: 50%;
    margin-bottom: 1.5rem;
    border: 3px solid var(--primary);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.profile-name {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    word-break: break-word;
}

.profile-username {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: block;
    word-break: break-word;
}

.profile-bio {
    margin-bottom: 1.5rem;
    line-height: 1.5;
    word-break: break-word;
}

.profile-details {
    margin-bottom: 1.5rem;
}

.profile-detail {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    word-break: break-word;
}

.profile-detail i {
    margin-right: 0.5rem;
    color: var(--primary);
    width: 20px;
    flex-shrink: 0;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.profile-stat {
    text-align: center;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    transition: var(--transition);
}

body.light-theme .profile-stat {
    background: var(--bg-tertiary);
}

.profile-stat:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.stat-count {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.profile-content {
    background: var(--surface);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

body.light-theme .profile-content {
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.profile-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
    overflow-x: auto;
    scrollbar-width: none;
}

body.light-theme .profile-tabs {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.profile-tabs::-webkit-scrollbar {
    display: none;
}

.profile-tab {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    white-space: nowrap;
}

.profile-tab.active {
    border-bottom: 2px solid var(--primary);
    color: var(--primary);
}

.profile-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.back-btn {
    padding: 0.75rem 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

body.light-theme .back-btn {
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.share-btn {
    padding: 0.75rem 1.5rem;
    background: var(--gradient-1);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.share-modal.visible {
    opacity: 1;
    visibility: visible;
}

.share-content {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-3d);
    position: relative;
}

body.light-theme .share-content {
    background: var(--bg-primary);
}

.share-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

.share-title {
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--text-primary);
}

.share-url {
    display: flex;
    margin-bottom: 1.5rem;
}

.share-input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px 0 0 8px;
    color: var(--text-primary);
}

body.light-theme .share-input {
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.copy-btn {
    padding: 0 1rem;
    background: var(--gradient-1);
    border: none;
    border-radius: 0 8px 8px 0;
    color: white;
    cursor: pointer;
}

.share-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.social-share {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-share:hover {
    transform: translateY(-3px);
}

.share-twitter {
    background: #1DA1F2;
}

.share-linkedin {
    background: #0077B5;
}

.share-facebook {
    background: #4267B2;
}

.markdown-body {
    background: transparent;
    color: var(--text-primary);
    padding: 0;
    max-width: 100%;
    overflow: hidden;
}

.markdown-body > * {
    max-width: 100%;
    overflow-wrap: break-word;
}

.markdown-body h1, 
.markdown-body h2, 
.markdown-body h3, 
.markdown-body h4, 
.markdown-body h5, 
.markdown-body h6 {
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.3em;
    overflow-wrap: break-word;
}

body.light-theme .markdown-body h1, 
body.light-theme .markdown-body h2, 
body.light-theme .markdown-body h3, 
body.light-theme .markdown-body h4, 
body.light-theme .markdown-body h5, 
body.light-theme .markdown-body h6 {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.markdown-body a {
    color: var(--primary);
}

.markdown-body code {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 6px;
    padding: 0.2em 0.4em;
    word-break: break-word;
}

body.light-theme .markdown-body code {
    background: var(--bg-tertiary);
}

.markdown-body pre {
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 1rem;
    overflow: auto;
}

body.light-theme .markdown-body pre {
    background: var(--bg-tertiary);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.markdown-body pre code {
    background: transparent;
    padding: 0;
}

.markdown-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.markdown-body table {
    display: block;
    width: 100%;
    overflow: auto;
    border-spacing: 0;
    border-collapse: collapse;
}

.markdown-body table th,
.markdown-body table td {
    padding: 6px 13px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.light-theme .markdown-body table th,
body.light-theme .markdown-body table td {
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Controls - Enhanced */
.controls {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.search-box {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: var(--bg-secondary);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: var(--text-primary);
    transition: var(--transition);
}

body.light-theme .search-input {
    border: 2px solid rgba(0, 0, 0, 0.1);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--glow);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    transition: color 0.3s ease;
}

.search-input:focus + .search-icon {
    color: var(--primary);
}

.filter-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pill {
    padding: 0.5rem 1rem;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

body.light-theme .pill {
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.pill::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255, 255, 255, 0.1), transparent);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    pointer-events: none;
}

.pill:hover::before {
    transform: translateY(0);
}

.pill:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    color: var(--primary);
}

.pill.active {
    background: var(--gradient-1);
    color: white;
    border-color: transparent;
}

#sortSelect {
    width: 200px;
}

/* Projects Grid - Enhanced */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.project-card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
    transform-style: preserve-3d;
    position: relative;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
}

body.light-theme .project-card {
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.project-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.project-card:hover {
    transform: perspective(1000px) rotateX(5deg) translateY(-10px);
    box-shadow: 0 30px 60px rgba(99, 102, 241, 0.3);
}

.project-image {
    height: 200px;
    background: var(--gradient-1);
    position: relative;
    overflow: hidden;
}

.project-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.7));
    z-index: 1;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.project-card:hover .project-image::before {
    opacity: 1;
}

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

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

.project-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    transform: translateY(-10px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.project-card:hover .project-badge {
    transform: translateY(0);
    opacity: 1;
}

.project-content {
    padding: 1.5rem;
    position: relative;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
    word-break: break-word;
}

.project-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-1);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

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

.project-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orject: vertical;
    overflow: hidden;
    word-break: break-word;
}

.project-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.3s ease;
}

.stat-item:hover {
    color: var(--primary);
}

.stat-item i {
    color: var(--primary);
}

.project-links {
    display: flex;
    gap: 0.5rem;
}

.project-link {
    flex: 1;
    padding: 0.5rem;
    text-align: center;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

body.light-theme .project-link {
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.project-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255, 255, 255, 0.1), transparent);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    pointer-events: none;
}

.project-link:hover::before {
    transform: translateY(0);
}

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

/* Loading State - Enhanced */
.loading-container {
    text-align: center;
    padding: 4rem;
    grid-column: 1/-1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 2rem;
    border: 3px solid var(--surface);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite, pulse 2s ease-in-out infinite;
    position: relative;
}

.spinner::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 3px solid transparent;
    border-top-color: var(--secondary);
    border-radius: 50%;
    animation: spin 1.5s linear infinite reverse;
}

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

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

/* Stats - Enhanced */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding: 2rem;
    max-width: 1000px;
    margin: 2rem auto;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.stats-container.visible {
    opacity: 1;
    transform: translateY(0);
}

.stat-card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

body.light-theme .stat-card {
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255, 255, 255, 0.05), transparent);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    pointer-events: none;
}

.stat-card:hover::before {
    transform: translateY(0);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    position: relative;
    display: inline-block;
}

.stat-number::after {
    content: '+';
    position: absolute;
    right: -15px;
    top: 0;
    font-size: 1.5rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.stat-card:hover .stat-number::after {
    opacity: 1;
    transform: translateY(0);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-tertiary);
}

/* Floating Action Button - Enhanced */
.fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: var(--gradient-1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
    transition: var(--transition);
    z-index: 100;
    transform: scale(0);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab.visible {
    transform: scale(1);
}

.fab:hover {
    transform: scale(1.1) rotate(90deg);
}

/* Toast - Enhanced */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-secondary);
    padding: 1rem 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: var(--transition);
    z-index: 1000;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

body.light-theme .toast {
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Footer - Enhanced */
.footer {
    padding: 4rem 2rem 2rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
}

body.light-theme .footer {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--gradient-rainbow);
    border-radius: 0 0 10px 10px;
}

.footer-text {
    color: var(--text-secondary);
}

.footer-text a {
    color: var(--primary);
    text-decoration: none;
}

.heart {
    color: var(--danger);
    animation: pulse 1.5s ease-in-out infinite;
}

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

/* Responsive */
@media (max-width: 1024px) {
    .profile-container {
        grid-template-columns: 1fr;
    }
    
    .profile-sidebar {
        display: grid;
        grid-template-columns: 150px 1fr;
        gap: 1.5rem;
        align-items: start;
    }
    
    .profile-image {
        grid-row: 1 / 3;
        margin-bottom: 0;
    }
    
    .profile-stats {
        grid-column: 1 / -1;
    }

    .navbar {
        width: 90%;
    }

    .nav-links {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .floating-cards {
        flex-direction: column;
        align-items: center;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .profile-sidebar {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .profile-image {
        justify-self: center;
        width: 150px;
    }
    
    .profile-detail {
        justify-content: center;
    }

    .navbar {
        padding: 0.75rem 1rem;
    }

    .logo span {
        display: none;
    }

    .profile-actions {
        justify-content: center;
    }
    
    .quick-links {
        flex-direction: column;
        align-items: center;
    }
}

/* Print Styles */
@media print {
    /* Hide unnecessary elements */
    .preloader,
    .bg-animation,
    .particles,
    .navbar,
    .input-section,
    .controls,
    .fab,
    .footer,
    .profile-actions,
    .profile-tabs,
    .share-modal,
    .stats-container,
    .floating-cards,
    .hero-subtitle,
    .hero-title {
        display: none !important;
    }
    
    /* Reset body styles for printing */
    body {
        background: white !important;
        color: black !important;
        font-family: Arial, sans-serif !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Ensure proper page breaks */
    .app-container {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
    }
    
    /* Profile section adjustments */
    .profile-section {
        display: block !important;
        height: auto !important;
        opacity: 1 !important;
        transform: none !important;
        page-break-after: always; /* Force new page after README */
    }
    
    .profile-container {
        flex-direction: column !important;
        width: 100% !important;
        box-shadow: none !important;
        background: white !important;
    }
    
    .profile-sidebar {
        width: 100% !important;
        border-right: none !important;
        border-bottom: 1px solid #ccc;
        padding: 20px;
        margin-bottom: 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .profile-content {
        width: 100% !important;
        padding: 20px;
    }
    
    /* Profile image adjustments */
    .profile-image {
        width: 120px !important;
        height: 120px !important;
        margin: 0 auto 15px !important;
    }
    
    /* Markdown content adjustments */
    .markdown-body {
        color: black !important;
        background: white !important;
        font-size: 14px !important;
    }
    
    .markdown-body pre {
        background-color: #f6f8fa !important;
        border: 1px solid #e1e4e8 !important;
        page-break-inside: avoid;
    }
    
    .markdown-body code {
        color: black !important;
        background: #f6f8fa !important;
    }
    
    .markdown-body table {
        border: 1px solid #ddd !important;
    }
    
    .markdown-body th,
    .markdown-body td {
        border: 1px solid #ddd !important;
        padding: 8px !important;
    }
    
    /* Projects grid adjustments */
    .projects-grid {
        display: block !important;
        opacity: 1 !important;
        height: auto !important;
        page-break-before: always; /* Start on new page */
    }
    
    .project-card {
        width: 100% !important;
        margin: 0 0 20px 0 !important;
        break-inside: avoid;
        page-break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        background: white !important;
        color: black !important;
    }
    
    .project-card h3 {
        color: black !important;
    }
    
    .project-stats {
        color: #666 !important;
    }
    
    /* Limit to top 15 projects */
    .project-card:nth-child(n+16) {
        display: none !important;
    }
    
    /* Links in print */
    a {
        color: #0000EE !important;
        text-decoration: underline !important;
    }
    
    /* Show URLs after links for print */
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 12px;
        color: #666;
    }
    
    /* Don't show URLs for these elements */
    .profile-image a[href]:after,
    .profile-username a[href]:after {
        content: "" !important;
    }
    
    /* Print header/footer */
    @page {
        margin: 1cm;
        size: portrait;
    }
    
    @page :first {
        margin: 1cm;
    }
    
    /* Add title to each page */
    .profile-section::before,
    .projects-grid::before {
        content: "GitHub Portfolio - " attr(data-username);
        display: block;
        font-size: 18px;
        font-weight: bold;
        margin-bottom: 20px;
        padding-bottom: 10px;
        border-bottom: 2px solid #000;
    }
    
    .projects-grid::before {
        content: "GitHub Portfolio - Top Projects - " attr(data-username);
    }
    
    /* Add page number */
    @page {
        @bottom-right {
            content: "Page " counter(page) " of " counter(pages);
            font-size: 10px;
            color: #666;
        }
    }
}

/* ============================================
   CUSTOM PORTFOLIO CREATION STYLES
   ============================================ */

.custom-portfolio-section {
    padding: 2rem 0;
    display: none;
}

.custom-portfolio-section.visible {
    display: block;
}

.custom-portfolio-form {
    max-width: 1000px;
    margin: 0 auto;
}

.form-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-section-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

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

/* Skills Section */
.skills-container {
    display: flex;
    gap: 1rem;
    align-items: end;
    margin-bottom: 1rem;
}

.skill-categories {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skill-category {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.skill-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.skill-category-title {
    font-weight: 600;
    color: var(--text-primary);
}

.remove-skill-category {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: var(--transition);
}

.remove-skill-category:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Experience Section */
.experience-container,
.projects-container,
.education-container {
    margin-bottom: 1rem;
}

.experience-list,
.custom-projects-list,
.education-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.experience-item,
.custom-project-item,
.education-item {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.experience-header,
.project-header,
.education-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.experience-title,
.project-title,
.education-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.remove-item {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: var(--transition);
    font-size: 0.9rem;
}

.remove-item:hover {
    background: rgba(239, 68, 68, 0.1);
}

.experience-details,
.project-details,
.education-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.experience-description,
.project-description {
    grid-column: 1 / -1;
}

.experience-description textarea,
.project-description textarea {
    min-height: 80px;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    padding: 2rem 0;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Custom Portfolio Display */
.custom-portfolio-display {
    padding: 2rem 0;
    width: 100%;
}

.custom-profile-section {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    width: 100%;
}

.custom-profile-sidebar {
    flex: 1;
    max-width: 300px;
}

.custom-profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 3rem;
    color: white;
}

.custom-profile-info h2 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.custom-profile-title {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.custom-profile-bio {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.custom-profile-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.custom-profile-detail {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.custom-profile-content {
    flex: 2;
}

.custom-section {
    margin-bottom: 2rem;
}

.custom-section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.custom-skill-item {
    background: var(--surface);
    padding: 0.75rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.custom-skill-category {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.custom-skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.custom-skill-tag {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.custom-experience-item,
.custom-project-item,
.custom-education-item {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.custom-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.custom-item-title {
    font-weight: 600;
    color: var(--text-primary);
}

.custom-item-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.custom-item-meta {
    color: var(--text-tertiary);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.custom-item-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .custom-profile-section {
        flex-direction: column;
    }
    
    .custom-profile-sidebar {
        max-width: none;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .experience-details,
    .project-details,
    .education-details {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: center;
    }
}

/* Custom Portfolio Links */
.custom-item-links {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
}

.custom-item-links a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.custom-item-links a:hover {
    color: var(--accent);
}

/* Custom Portfolio Wrapper */
.custom-portfolio-wrapper {
    grid-column: 1 / -1;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: 0 auto;
    max-width: 1200px;
    padding: 0 1rem;
}

/* Override projects-grid when it contains custom portfolio */
.projects-grid .custom-portfolio-wrapper {
    display: flex;
}

/* Custom Portfolio Action Buttons */
.custom-portfolio-wrapper .profile-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
    flex-wrap: wrap;
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.custom-portfolio-wrapper .profile-actions::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 1px;
    background: var(--primary);
    border-radius: 1px;
}

.custom-portfolio-wrapper .back-btn,
.custom-portfolio-wrapper .share-btn,
.custom-portfolio-wrapper .btn-secondary {
    min-width: 160px;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.875rem 1.75rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.custom-portfolio-wrapper .back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.custom-portfolio-wrapper .share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.custom-portfolio-wrapper .btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
}

/* Print Styles for Custom Portfolio */
@media print {
    .custom-portfolio-display[data-print-mode="true"] {
        padding: 0;
        margin: 0;
    }

    .custom-portfolio-display[data-print-mode="true"] .custom-profile-section {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .custom-portfolio-display[data-print-mode="true"] .custom-section {
        break-inside: avoid;
        page-break-inside: avoid;
        margin-bottom: 1.5rem;
    }

    .custom-portfolio-display[data-print-mode="true"] .custom-skill-item,
    .custom-portfolio-display[data-print-mode="true"] .custom-experience-item,
    .custom-portfolio-display[data-print-mode="true"] .custom-project-item,
    .custom-portfolio-display[data-print-mode="true"] .custom-education-item {
        break-inside: avoid;
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .custom-portfolio-display[data-print-mode="true"] .custom-profile-image {
        border: 2px solid #333;
    }

    .custom-portfolio-display[data-print-mode="true"] .custom-profile-info h2 {
        color: #000 !important;
        font-size: 1.8rem;
    }

    .custom-portfolio-display[data-print-mode="true"] .custom-section-title {
        color: #000 !important;
        border-bottom: 2px solid #333;
        padding-bottom: 0.5rem;
    }

    .custom-portfolio-display[data-print-mode="true"] .custom-skill-tag {
        background: #f0f0f0 !important;
        color: #333 !important;
        border: 1px solid #ccc;
    }

    /* Hide action buttons in print */
    .custom-portfolio-wrapper .profile-actions {
        display: none !important;
    }

    /* Ensure proper page breaks */
    .custom-portfolio-display[data-print-mode="true"] .custom-skills-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .custom-portfolio-display[data-print-mode="true"] .custom-skill-item {
        flex: 1;
        min-width: 200px;
    }
}

/* Responsive Design for Custom Portfolio */
@media (max-width: 768px) {
    .custom-portfolio-wrapper .profile-actions {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .custom-portfolio-wrapper .back-btn,
    .custom-portfolio-wrapper .share-btn,
    .custom-portfolio-wrapper .btn-secondary {
        min-width: 200px;
        width: 100%;
        max-width: 280px;
    }
}

/* Input Section Enhancements */
.section-divider {
    text-align: center;
    margin: 2rem 0;
    position: relative;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.section-divider span {
    background: var(--bg-secondary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

.custom-option {
    text-align: center;
}

.custom-option p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}