/* =====================================================
   Modern Academic Portfolio - Light Theme Design
   Inspired by deyangh.github.io with vibrant light colors
   ===================================================== */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,600;0,700;1,600&display=swap');

/* CSS Variables - Design System */
:root {
    /* Gradient Colors - Blue Theme */
    --gradient-start: #1e3a8a;
    --gradient-mid: #3b82f6;
    --gradient-end: #06b6d4;

    /* Accent Colors */
    --accent-coral: #ff6b6b;
    --accent-teal: #4ecdc4;
    --accent-gold: #feca57;
    --accent-purple: #a55eea;

    /* Primary Colors */
    --primary-color: #667eea;
    --primary-dark: #5a67d8;
    --primary-light: #e0e7ff;

    /* Text Colors */
    --text-main: #1a1a2e;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --text-light: #a0aec0;
    --text-white: #ffffff;

    /* Background Colors */
    --bg-body: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.75);
    --bg-card-hover: rgba(30, 41, 59, 0.85);
    --bg-glass: rgba(15, 23, 42, 0.4);

    /* Border and Shadow */
    --border-color: rgba(102, 126, 234, 0.2);
    --border-glass: rgba(255, 255, 255, 0.3);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(102, 126, 234, 0.1);
    --shadow-md: 0 8px 30px rgba(102, 126, 234, 0.15);
    --shadow-lg: 0 15px 50px rgba(102, 126, 234, 0.2);
    --shadow-glow: 0 0 40px rgba(102, 126, 234, 0.3);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2.5rem;
    --spacing-xl: 4rem;
    --spacing-2xl: 6rem;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    --radius-full: 50%;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #0c4a6e 100%);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated Background Gradient */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 80%, rgba(6, 182, 212, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(30, 58, 138, 0.15) 0%, transparent 40%);
    pointer-events: none;
    z-index: -1;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

/* Meteor Shower Effect */
.meteor-shower {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.meteor {
    position: absolute;
    width: 2px;
    height: 80px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0));
    transform: rotate(45deg);
    animation: meteorFall linear forwards;
    opacity: 0;
    filter: blur(0.5px);
    box-shadow: 0 0 6px 1px rgba(255, 255, 255, 0.3);
}

.meteor::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.5);
}

@keyframes meteorFall {
    0% {
        opacity: 0;
        transform: rotate(45deg) translateY(0);
    }

    10% {
        opacity: 1;
    }

    80% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: rotate(45deg) translateY(100vh);
    }
}

/* Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 2rem;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    padding: 0.75rem 2rem;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-white);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.navbar.scrolled .nav-logo {
    color: var(--primary-color);
}

/* Language Switch Button */
.lang-switch {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-white);
    text-decoration: none;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    margin-left: 0.75rem;
    transition: all var(--transition-fast);
}

.lang-switch:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--text-white);
    color: var(--text-white);
}

.navbar.scrolled .lang-switch {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.navbar.scrolled .lang-switch:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-white);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-xl);
    transition: all var(--transition-fast);
    position: relative;
}

.navbar.scrolled .nav-links a {
    color: var(--text-secondary);
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-white);
}

.navbar.scrolled .nav-links a:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
}

/* Mobile Menu Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-white);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

.navbar.scrolled .nav-toggle span {
    background: var(--primary-color);
}

/* Main Container */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: var(--spacing-md);
    padding-top: 100px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-2xl) var(--spacing-md);
    text-align: center;
    position: relative;
}

.hero-content {
    max-width: 800px;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-avatar {
    width: 180px;
    height: 180px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 5px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    margin-bottom: var(--spacing-lg);
    transition: all var(--transition-normal);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

.hero-avatar:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg), 0 0 60px rgba(102, 126, 234, 0.5);
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: var(--spacing-sm);
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--spacing-md);
    font-weight: 400;
}

.hero-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto var(--spacing-lg);
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: var(--radius-xl);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all var(--transition-normal);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: transparent;
    color: var(--text-white);
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--text-white);
    transform: translateY(-3px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-white);
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--text-white);
    transform: translateY(-3px);
}

/* Social Links in Hero */
.hero-social {
    margin-top: var(--spacing-lg);
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-white);
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
}

.social-link:hover {
    background: var(--text-white);
    color: var(--primary-color);
    transform: translateY(-5px) scale(1.1);
    box-shadow: var(--shadow-md);
}

.social-link svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Content Sections */
.section {
    padding: var(--spacing-2xl) 0;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

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

.section-header {
    margin-bottom: var(--spacing-xl);
}

h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.section-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-coral), var(--accent-teal), var(--accent-gold));
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    background: var(--bg-card-hover);
}

.glass-card:hover::before {
    opacity: 1;
}

/* Cards - Education, Experience, Research, Projects */
.education-item,
.experience-item,
.project-item,
.research-item {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

/* Education Card with Logo */
.education-content {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
}

.school-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    background: white;
    padding: 8px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.education-item:hover .school-logo {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.education-details {
    flex: 1;
}

.education-item::before,
.experience-item::before,
.project-item::before,
.research-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-teal));
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.education-item:hover,
.experience-item:hover,
.project-item:hover,
.research-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    background: var(--bg-card-hover);
}

.education-item:hover::before,
.experience-item:hover::before,
.project-item:hover::before,
.research-item:hover::before {
    opacity: 1;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-xs);
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.item-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

.item-date {
    font-size: 0.9rem;
    color: var(--text-white);
    font-weight: 500;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-purple));
    padding: 6px 14px;
    border-radius: var(--radius-xl);
}

.item-subtitle {
    font-size: 1.05rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

ul {
    list-style: none;
    padding-left: 0;
}

li {
    position: relative;
    padding-left: 1.5em;
    margin-bottom: 0.6em;
    color: rgba(203, 213, 225, 0.9);
    line-height: 1.6;
}

li::before {
    content: "▹";
    color: var(--accent-teal);
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.skill-category {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    transition: all var(--transition-normal);
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.skill-category-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--primary-light);
}

.skill-icon {
    font-size: 1.5rem;
}

.skill-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

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

.skill-tag {
    font-size: 0.85rem;
    background: rgba(100, 116, 139, 0.4);
    color: rgba(255, 255, 255, 0.9);
    padding: 6px 14px;
    border-radius: var(--radius-xl);
    font-weight: 500;
    transition: all var(--transition-fast);
    cursor: default;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.skill-tag:hover {
    background: rgba(100, 116, 139, 0.6);
    color: var(--text-white);
    transform: translateY(-2px);
    border-color: rgba(148, 163, 184, 0.5);
}

/* Contact Section */
.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.contact-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    padding: 10px 18px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-glass);
    transition: all var(--transition-fast);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.contact-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    background: var(--bg-card-hover);
    color: var(--primary-color);
}

.contact-icon {
    display: flex;
    align-items: center;
    color: var(--primary-color);
}

.contact-icon svg {
    width: 20px;
    height: 20px;
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* Footer */
.footer {
    text-align: center;
    padding: var(--spacing-xl) 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: var(--spacing-2xl);
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-coral), var(--accent-teal), var(--accent-gold));
    z-index: 1001;
    width: 0%;
    transition: width 0.1s linear;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
    z-index: 999;
}

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

.back-to-top:hover {
    transform: translateY(-5px);
    background: var(--primary-color);
    color: var(--text-white);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Header (for profile section) */
.header {
    display: none;
    /* Hidden - replaced by hero section */
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        padding: var(--spacing-md);
        gap: 0;
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
        box-shadow: var(--shadow-lg);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        color: var(--text-main);
        padding: var(--spacing-sm);
        border-radius: var(--radius-md);
    }

    .nav-links a:hover {
        background: var(--primary-light);
        color: var(--primary-dark);
    }

    .nav-toggle {
        display: flex;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-avatar {
        width: 140px;
        height: 140px;
    }

    h2 {
        font-size: 1.8rem;
    }

    .item-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .item-date {
        font-size: 0.8rem;
        padding: 4px 10px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

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

@media (max-width: 480px) {
    .container {
        padding: var(--spacing-sm);
        padding-top: 80px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .section {
        padding: var(--spacing-xl) 0;
    }

    .education-item,
    .experience-item,
    .project-item,
    .research-item,
    .skill-category {
        padding: var(--spacing-md);
    }
}

/* Animation Classes for JS */
.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out forwards;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Staggered animation delays */
.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

.delay-5 {
    animation-delay: 0.5s;
}

/* Typing cursor effect */
.typing-cursor::after {
    content: '|';
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    from,
    to {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}