/* ===== CSS Variables ===== */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary-color: #0ea5e9;
    --accent-color: #06b6d4;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s ease;
    --container-max: 1200px;
    --header-height: 72px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

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

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-menu a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: var(--transition);
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: calc(var(--header-height) + 40px) 0 80px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, #e0f2fe 50%, var(--bg-secondary) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 150%;
    background: radial-gradient(ellipse, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.6s ease 0.1s both;
}

.hero-subtitle {
    font-size: 1.35rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 32px;
    animation: fadeInUp 0.6s ease 0.3s both;
}

.meta-item {
    font-size: 0.95rem;
    color: var(--text-light);
}

.hero-contact {
    animation: fadeInUp 0.6s ease 0.4s both;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

/* Code Block Decoration */
.hero-decoration {
    animation: fadeIn 0.8s ease 0.5s both;
}

.code-block {
    background: #1e293b;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-xl);
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: var(--transition);
}

.code-block:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.code-block pre {
    margin: 0;
    overflow-x: auto;
}

.code-block code {
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
}

.code-keyword { color: #c678dd; }
.code-variable { color: #e5c07b; }
.code-property { color: #e06c75; }
.code-string { color: #98c379; }
.code-number { color: #d19a66; }

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-indicator span {
    display: block;
    width: 24px;
    height: 40px;
    border: 2px solid var(--text-light);
    border-radius: 12px;
    position: relative;
}

.scroll-indicator span::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--text-light);
    border-radius: 2px;
    animation: scrollDot 2s infinite;
}

/* ===== Section Base ===== */
.section {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* ===== Advantages Section ===== */
.advantages {
    background: var(--bg-primary);
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.advantage-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.advantage-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.advantage-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.advantage-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.advantage-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== Experience Section ===== */
.experience {
    background: var(--bg-secondary);
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
}

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

.timeline-marker {
    position: absolute;
    left: -6px;
    top: 4px;
    width: 14px;
    height: 14px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 3px solid var(--bg-primary);
    box-shadow: 0 0 0 3px var(--primary-color);
}

.timeline-content {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.timeline-header {
    margin-bottom: 20px;
}

.timeline-header h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.timeline-role {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-right: 12px;
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--text-light);
}

.timeline-details {
    list-style: none;
}

.timeline-details li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.timeline-details li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* ===== Projects Section ===== */
.projects {
    background: var(--bg-primary);
}

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

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

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

.project-card.featured {
    grid-column: span 2;
    background: linear-gradient(135deg, var(--bg-primary), #eff6ff);
    border-color: var(--primary-light);
}

.project-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid var(--border-color);
}

.project-tag {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.project-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.project-role {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 500;
    margin-right: 16px;
}

.project-date {
    font-size: 0.875rem;
    color: var(--text-light);
}

.project-body {
    padding: 20px 24px 24px;
}

.project-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
}

.project-highlights {
    list-style: none;
    margin-bottom: 20px;
}

.project-highlights li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.project-highlights li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tag {
    padding: 4px 10px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
}

/* ===== Skills Section ===== */
.skills {
    background: var(--bg-secondary);
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.skill-category {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 28px;
    border: 1px solid var(--border-color);
}

.skill-category h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.category-icon {
    font-size: 1.4rem;
}

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

.skill-tag {
    padding: 6px 14px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid transparent;
}

.skill-tag:hover {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

.skill-tag.expert {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    font-weight: 600;
}

/* ===== Education Section ===== */
.education {
    background: var(--bg-primary);
    padding: 80px 0;
}

.education-card {
    display: flex;
    align-items: center;
    gap: 24px;
    max-width: 400px;
    margin: 0 auto;
    background: var(--bg-secondary);
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.education-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.edu-icon {
    font-size: 3rem;
}

.edu-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.edu-major {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* ===== Contact Section ===== */
.contact {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 100px 0;
    color: white;
}

.contact .section-title {
    color: white;
}

.contact .section-title::after {
    background: rgba(255, 255, 255, 0.5);
}

.contact-content {
    text-align: center;
}

.contact-text {
    font-size: 1.2rem;
    margin-bottom: 32px;
    opacity: 0.9;
}

.contact-phone {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.15);
    padding: 20px 40px;
    border-radius: var(--radius-xl);
    backdrop-filter: blur(10px);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-phone:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-4px);
}

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

.phone-number {
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: 1px;
}

/* ===== Footer ===== */
.footer {
    background: var(--text-primary);
    color: var(--text-light);
    padding: 40px 0;
    text-align: center;
}

.footer p {
    margin-bottom: 8px;
}

.footer-made {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

@keyframes scrollDot {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(12px);
    }
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-meta {
        justify-content: center;
    }
    
    .hero-decoration {
        display: none;
    }
    
    .advantages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .project-card.featured {
        grid-column: span 1;
    }
    
    .skills-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 64px;
    }
    
    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border-color);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .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(5px, -5px);
    }
    
    .hero {
        padding: calc(var(--header-height) + 30px) 0 60px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-meta {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 40px;
    }
    
    .advantages-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline::before {
        left: 8px;
    }
    
    .timeline-item {
        padding-left: 32px;
    }
    
    .timeline-marker {
        left: 2px;
    }
    
    .timeline-content {
        padding: 24px;
    }
    
    .project-header,
    .project-body {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .skill-category {
        padding: 20px;
    }
    
    .contact-phone {
        padding: 16px 28px;
    }
    
    .phone-number {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
    
    .skill-tags {
        gap: 6px;
    }
    
    .skill-tag {
        padding: 4px 10px;
        font-size: 0.8rem;
    }
    
    .contact-phone {
        flex-direction: column;
        gap: 8px;
    }
}

/* Scroll Reveal Animation */
[data-aos] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos].aos-animate {
    opacity: 1;
    transform: translateY(0);
}