@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #1a365d;
    --secondary: #2c5282;
    --accent: #3182ce;
    --accent-light: #4299e1;
    --accent-dark: #2a69ac;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --surface: #ffffff;
    --surface-light: #f7fafc;
    --surface-card: #ffffff;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --success: #38a169;
    --warning: #d69e2e;
    --gradient-primary: linear-gradient(135deg, #3182ce 0%, #4299e1 100%);
    --gradient-light: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    --gradient-card: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
    --shadow-accent: 0 0 20px rgba(49, 130, 206, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.7;
    color: var(--text-secondary);
    background: var(--gradient-light);
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(49, 130, 206, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(66, 153, 225, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Hero Section */
.hero {
    padding: 4rem 0 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-bg-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: var(--gradient-primary);
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.05;
    z-index: -1;
}

.profile-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.profile-image {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: var(--surface);
    border: 4px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--text-muted);
    box-shadow: var(--shadow-accent);
    position: relative;
    overflow: hidden;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    border-radius: 50%;
}

.profile-image .placeholder {
    text-align: center;
    font-size: 0.9rem;
    padding: 1rem;
}

.profile-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0.05;
    z-index: -1;
}

.profile-info h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.profile-info .subtitle {
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 1rem;
    font-weight: 500;
}

.profile-info .age-badge {
    display: inline-block;
    background: var(--surface-light);
    color: var(--accent);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 2px solid var(--accent);
    margin-bottom: 2rem;
}

.hero-description {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-primary);
}

/* Navigation */
.nav-container {
    position: sticky;
    top: 20px;
    z-index: 1000;
    margin: 2rem 0;
}

nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    padding: 1.2rem 0;
    border-radius: 50px;
    margin: 0 auto;
    box-shadow: var(--shadow-md);
    max-width: 600px;
    transition: transform 0.3s ease;
}

.nav-list {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 0.8rem;
    flex-wrap: wrap;
    padding: 0 1.5rem;
}

.nav-list a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 1rem;
    padding: 0.8rem 1.8rem;
    border-radius: 30px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid transparent;
}

.nav-list a:hover {
    color: var(--primary);
    background: var(--surface-light);
    border-color: var(--border);
    transform: translateY(-1px);
}

.nav-list a.active {
    color: var(--accent-dark);
    background: rgba(49, 130, 206, 0.1);
    border-color: var(--accent);
    font-weight: 600;
}

/* Section Styles */
.section {
    background: var(--surface);
    border: 1px solid var(--border-light);
    margin-bottom: 3rem;
    padding: 3rem;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-primary);
}

.section-header {
    margin-bottom: 3rem;
}

.section h2 {
    color: var(--primary);
    font-size: 2.4rem;
    margin-bottom: 1rem;
    font-weight: 600;
    position: relative;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-style: italic;
    max-width: 600px;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.motivation-card {
    background: var(--surface-light);
    border: 2px solid var(--accent);
    padding: 2rem;
    border-radius: 16px;
    height: fit-content;
}

.motivation-card h3 {
    color: var(--primary);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.motivation-list {
    list-style: none;
}

.motivation-list li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 2rem;
}

.motivation-list li::before {
    content: "🎯";
    position: absolute;
    left: 0;
    top: 0.5rem;
}

/* Qualifications Grid */
.qualifications-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.education-card {
    background: var(--surface-light);
    border: 2px solid var(--accent);
    padding: 2.5rem;
    border-radius: 20px;
    position: relative;
}

.education-card::before {
    content: '🎓';
    position: absolute;
    top: -15px;
    left: 2rem;
    background: var(--surface);
    padding: 0 1rem;
    font-size: 1.5rem;
}

.education-card h3 {
    color: var(--primary);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.education-card .duration {
    color: var(--accent-dark);
    font-weight: 600;
    margin-bottom: 1rem;
}

.skills-overview {
    display: grid;
    gap: 1.5rem;
}

.skill-category {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 1.5rem;
    border-radius: 16px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.skill-category:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.skill-category h4 {
    color: var(--primary);
    margin-bottom: 0.8rem;
    font-size: 1rem;
    font-weight: 600;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    background: var(--surface-light);
    color: var(--text-secondary);
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--border);
}

.skill-tag.highlight {
    background: var(--accent);
    color: var(--surface);
    border-color: var(--accent);
    font-weight: 600;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 2.5rem;
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    min-height: 450px;
}

.project-content {
    flex: 1;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(49, 130, 206, 0.05), transparent);
    transition: left 0.6s ease;
}

.project-card:hover::before {
    left: 100%;
}

.project-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent);
}

.project-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.project-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.project-card h3 {
    color: var(--primary);
    font-size: 1.4rem;
    font-weight: 600;
}

.project-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.project-content strong {
    color: var(--primary);
    font-weight: 600;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.project-tag {
    background: var(--surface-light);
    color: var(--accent-dark);
    padding: 0.4rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--accent);
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
    margin-top: 3rem;
    background: var(--surface-light);
}

.footer-content p {
    margin-bottom: 0.5rem;
}

/* Utilities */
.highlight {
    color: var(--accent-dark);
    font-weight: 600;
}

.text-primary {
    color: var(--primary);
}

/* Touch Device Styles */
.touch-device .project-card.touch-hover,
.touch-device .skill-category.touch-hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .profile-section {
        flex-direction: column;
        gap: 2rem;
    }
    
    .profile-image {
        width: 150px;
        height: 150px;
        font-size: 3rem;
    }
    
    nav {
        max-width: 100%;
        margin: 0 10px;
    }
    
    .nav-list {
        gap: 0.3rem;
        padding: 0 0.5rem;
    }
    
    .nav-list a {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .section {
        padding: 2rem 1.5rem;
        margin-bottom: 2rem;
    }
    
    .section h2 {
        font-size: 2rem;
    }
    
    .about-content,
    .qualifications-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .project-card,
    .skill-category {
        padding: 1.5rem;
        min-height: auto;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 1.5rem 1rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .project-card,
    .education-card {
        padding: 1.2rem;
    }
    
    .profile-info h1 {
        font-size: 2rem;
    }
    
    .profile-info .subtitle {
        font-size: 1.1rem;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--surface-light);
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-dark);
}

/* Loading Animation */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Print Styles */
@media print {
    .nav-container,
    footer {
        display: none;
    }
    
    .section {
        box-shadow: none;
        border: 1px solid var(--border);
        break-inside: avoid;
        margin-bottom: 2rem;
    }
    
    .project-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid var(--border);
    }
    
    body {
        background: white;
    }
    
    body::before {
        display: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --border: #000000;
        --text-secondary: #000000;
        --text-muted: #333333;
    }
    
    .section {
        border: 2px solid var(--border);
    }
    
    .project-card,
    .skill-category {
        border: 2px solid var(--border);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .fade-in {
        opacity: 1;
        transform: translateY(0);
    }
}