/* ============================================
   Apple-Inspired Design System
   ============================================ */

/* Root Variables */
:root {
    --primary-color: #000000;
    --secondary-color: #1d1d1f;
    --text-color: #1d1d1f;
    --text-secondary: #6e6e73;
    --background: #ffffff;
    --background-alt: #fbfbfd;
    --accent: #0071e3;
    --border-color: #d2d2d7;
    --transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 22px;
}

/* ============================================
   Navigation
   ============================================ */

.navbar {
    position: sticky;
    top: 0;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 48px;
}

.nav-logo {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: var(--transition);
}

.nav-logo:hover {
    opacity: 0.7;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--accent);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.nav-toggle span {
    width: 20px;
    height: 2px;
    background-color: var(--primary-color);
    margin: 3px 0;
    transition: var(--transition);
}

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

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

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

/* ============================================
   Hero Section
   ============================================ */

.hero {
    padding: 120px 0;
    text-align: center;
    background: linear-gradient(135deg, var(--background) 0%, var(--background-alt) 100%);
}

.hero-title {
    font-size: 64px;
    font-weight: 700;
    letter-spacing: -2px;
    margin-bottom: 16px;
    color: var(--primary-color);
}

.hero-subtitle {
    font-size: 28px;
    font-weight: 400;
    color: var(--text-secondary);
    letter-spacing: -0.5px;
    max-width: 700px;
    margin: 0 auto;
}

/* ============================================
   Intro Section
   ============================================ */

.intro {
    padding: 100px 0;
    background-color: var(--background);
}

.intro-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.intro-content h2 {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -1.5px;
    margin-bottom: 24px;
    color: var(--primary-color);
}

.intro-content p {
    font-size: 21px;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* ============================================
   CTA Section
   ============================================ */

.cta {
    padding: 100px 0;
    background-color: var(--background-alt);
    text-align: center;
}

.cta-content h2 {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -1.5px;
    margin-bottom: 16px;
    color: var(--primary-color);
}

.cta-content p {
    font-size: 21px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.btn {
    display: inline-block;
    padding: 12px 32px;
    background-color: var(--accent);
    color: white;
    text-decoration: none;
    font-size: 17px;
    font-weight: 500;
    border-radius: 980px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #0077ed;
    transform: scale(1.02);
}

/* ============================================
   Page Header
   ============================================ */

.page-header {
    padding: 80px 0 40px;
    text-align: center;
    background-color: var(--background);
}

.page-header h1 {
    font-size: 56px;
    font-weight: 700;
    letter-spacing: -2px;
    margin-bottom: 12px;
    color: var(--primary-color);
}

.page-subtitle {
    font-size: 24px;
    color: var(--text-secondary);
}

/* ============================================
   About Section
   ============================================ */

.about-section {
    padding: 60px 0 100px;
}

.about-content,
.mission-content,
.skills-content {
    margin-bottom: 80px;
}

.about-content h2,
.mission-content h2,
.skills-content h2 {
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 24px;
    color: var(--primary-color);
}

.about-content p,
.mission-content p {
    font-size: 19px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin-top: 32px;
}

.skill-item {
    padding: 32px;
    background-color: var(--background-alt);
    border-radius: 12px;
    transition: var(--transition);
}

.skill-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.skill-item h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--primary-color);
}

.skill-item p {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ============================================
   Projects Section
   ============================================ */

.projects-section {
    padding: 60px 0 100px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.project-card {
    background-color: var(--background);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

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

.project-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.project-card:nth-child(2) .project-image {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.project-card:nth-child(3) .project-image {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.project-card:nth-child(4) .project-image {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.project-card:nth-child(5) .project-image {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.project-card:nth-child(6) .project-image {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

.project-content {
    padding: 24px;
}

.project-content h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--primary-color);
}

.project-content p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.project-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition);
}

.project-link:hover {
    opacity: 0.7;
}

/* ============================================
   Research Section
   ============================================ */

.research-content {
    margin-bottom: 80px;
}

.research-content h2 {
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 32px;
    color: var(--primary-color);
}

.research-subsection {
    margin-bottom: 32px;
}

.research-subsection h3 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--primary-color);
}

.publications-list {
    list-style: none;
    padding-left: 0;
}

.publications-list li {
    font-size: 17px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 12px;
    padding-left: 24px;
    position: relative;
}

.publications-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
    font-size: 20px;
}

.research-subsection p {
    font-size: 17px;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* ============================================
   Contact Section
   ============================================ */

.contact-section {
    padding: 60px 0 100px;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.contact-form {
    background-color: var(--background-alt);
    padding: 40px;
    border-radius: 12px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    font-family: inherit;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--background);
    color: var(--text-color);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

.form-group textarea {
    resize: vertical;
}

.contact-info {
    padding-top: 40px;
}

.contact-info h2 {
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 24px;
    color: var(--primary-color);
}

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

/* ============================================
   Footer
   ============================================ */

.footer {
    padding: 40px 0;
    text-align: center;
    background-color: var(--background-alt);
    border-top: 1px solid var(--border-color);
}

.footer p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ============================================
   Animations
   ============================================ */

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Mobile Responsive
   ============================================ */

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 48px;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: saturate(180%) blur(20px);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
        width: 100%;
        text-align: center;
        transition: left 0.3s ease;
        padding: 32px 0;
        gap: 0;
        box-shadow: var(--shadow);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        padding: 16px 0;
    }

    .nav-link {
        font-size: 17px;
    }

    .nav-link.active::after {
        display: none;
    }

    .hero {
        padding: 80px 0;
    }

    .hero-title {
        font-size: 48px;
        letter-spacing: -1.5px;
    }

    .hero-subtitle {
        font-size: 21px;
    }

    .intro,
    .cta,
    .about-section,
    .projects-section,
    .contact-section {
        padding: 60px 0;
    }

    .intro-content h2,
    .cta-content h2,
    .about-content h2,
    .mission-content h2,
    .skills-content h2,
    .contact-info h2 {
        font-size: 32px;
    }

    .intro-content p,
    .cta-content p {
        font-size: 17px;
    }

    .page-header h1 {
        font-size: 40px;
    }

    .page-subtitle {
        font-size: 19px;
    }

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

    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-form {
        padding: 32px 24px;
    }

    .contact-info {
        padding-top: 0;
    }

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

@media (max-width: 480px) {
    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 19px;
    }

    .intro-content h2,
    .cta-content h2,
    .about-content h2,
    .mission-content h2,
    .skills-content h2,
    .contact-info h2 {
        font-size: 28px;
    }

    .page-header h1 {
        font-size: 32px;
    }
}
