/* ===== CSS Variables ===== */
:root {
    --color-primary: #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-secondary: #0f172a;
    --color-text: #334155;
    --color-text-light: #64748b;
    --color-bg: #ffffff;
    --color-bg-alt: #f8fafc;
    --color-border: #e2e8f0;
    --font-sans: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 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);
    --transition: all 0.3s ease;
    --radius: 12px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== Utilities ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 120px 0;
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.nav-logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-bg);
    letter-spacing: 2px;
}

.navbar.scrolled .nav-logo {
    color: var(--color-secondary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    font-size: 15px;
    position: relative;
    padding: 8px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.navbar.scrolled .nav-link {
    color: var(--color-text);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-bg);
    transition: var(--transition);
}

.navbar.scrolled .nav-toggle span {
    background: var(--color-secondary);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

.btn-full {
    width: 100%;
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--color-secondary) 0%, #1e3a5f 100%);
    z-index: -1;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.hero-text {
    color: #fff;
}

.hero-greeting {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.hero-name {
    font-size: 72px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.1;
}

.hero-title {
    font-size: 24px;
    font-weight: 500;
    color: var(--color-primary);
    margin-bottom: 24px;
}

.hero-desc {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-avatar {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), #60a5fa);
    padding: 6px;
    box-shadow: 0 0 60px rgba(37, 99, 235, 0.4);
    overflow: hidden;
}

.avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    letter-spacing: 1px;
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 24px;
    height: 24px;
    border-right: 2px solid rgba(255, 255, 255, 0.5);
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
    transform: rotate(45deg);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* ===== Section Header ===== */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 16px;
}

.section-title {
    font-size: 48px;
    font-weight: 700;
    color: var(--color-secondary);
}

/* ===== About Section ===== */
.about {
    background: var(--color-bg);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text p {
    font-size: 18px;
    line-height: 1.8;
    color: var(--color-text-light);
    margin-bottom: 24px;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 60px;
    padding-top: 60px;
    border-top: 1px solid var(--color-border);
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 56px;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
}

.stat-number::after {
    content: '+';
}

.stat-label {
    display: block;
    font-size: 16px;
    color: var(--color-text-light);
    margin-top: 8px;
}

/* ===== Skills Section ===== */
.skills {
    background: var(--color-bg-alt);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.skill-card {
    background: var(--color-bg);
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.skill-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.skill-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--color-primary), #60a5fa);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.skill-icon svg {
    width: 28px;
    height: 28px;
    color: #fff;
}

.skill-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-secondary);
    margin-bottom: 12px;
}

.skill-desc {
    font-size: 14px;
    color: var(--color-text-light);
    margin-bottom: 20px;
    line-height: 1.6;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tags span {
    font-size: 12px;
    padding: 4px 12px;
    background: var(--color-bg-alt);
    color: var(--color-text);
    border-radius: 20px;
}

/* ===== Portfolio Section ===== */
.portfolio {
    background: var(--color-bg);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.portfolio-item {
    background: var(--color-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.portfolio-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.portfolio-image {
    aspect-ratio: 16 / 10;
    background: var(--color-bg-alt);
    overflow: hidden;
}

.portfolio-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-img {
    transform: scale(1.05);
}

.portfolio-info {
    padding: 24px;
}

.portfolio-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-secondary);
    margin-bottom: 12px;
}

.portfolio-desc {
    font-size: 14px;
    color: var(--color-text-light);
    margin-bottom: 16px;
    line-height: 1.6;
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.portfolio-tags span {
    font-size: 12px;
    padding: 4px 12px;
    background: var(--color-bg-alt);
    color: var(--color-primary);
    border-radius: 20px;
    font-weight: 500;
}

/* ===== Contact Section ===== */
.contact {
    background: var(--color-bg-alt);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-intro {
    font-size: 18px;
    color: var(--color-text-light);
    margin-bottom: 40px;
    line-height: 1.8;
}

.contact-items {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 40px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: var(--color-bg);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.contact-icon svg {
    width: 24px;
    height: 24px;
    color: var(--color-primary);
}

.contact-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-label {
    font-size: 14px;
    color: var(--color-text-light);
}

.contact-value {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-secondary);
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-link {
    width: 44px;
    height: 44px;
    background: var(--color-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.social-link:hover {
    background: var(--color-primary);
    transform: translateY(-4px);
}

.social-link svg {
    width: 20px;
    height: 20px;
    color: var(--color-text);
}

.social-link:hover svg {
    color: #fff;
}

/* ===== Contact Form ===== */
.contact-form {
    background: var(--color-bg);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px 20px;
    font-size: 15px;
    font-family: inherit;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-bg);
    color: var(--color-secondary);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--color-text-light);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* ===== Footer ===== */
.footer {
    background: var(--color-secondary);
    color: #fff;
    padding: 60px 0 30px;
}

.footer-content {
    text-align: center;
    margin-bottom: 40px;
}

.footer-logo {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 16px;
}

.footer-text {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
}

/* ===== Animations ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-name {
        font-size: 56px;
    }
    
    .hero-avatar {
        width: 280px;
        height: 280px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--color-bg);
        flex-direction: column;
        align-items: center;
        padding: 40px 0;
        gap: 24px;
        box-shadow: var(--shadow-lg);
        transform: translateY(-150%);
        opacity: 0;
        transition: var(--transition);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
    }
    
    .nav-link {
        color: var(--color-text);
        font-size: 18px;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    
    .hero-name {
        font-size: 48px;
    }
    
    .hero-desc {
        margin: 0 auto 40px;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-image {
        order: -1;
    }
    
    .hero-avatar {
        width: 200px;
        height: 200px;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .section {
        padding: 80px 0;
    }
    
    .section-title {
        font-size: 36px;
    }
    
    .stat-number {
        font-size: 40px;
    }
}

@media (max-width: 480px) {
    .hero-name {
        font-size: 36px;
    }
    
    .hero-title {
        font-size: 18px;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}
