/* ===== CSS Variables ===== */
:root {
    --color-bg: #fafafa;
    --color-bg-alt: #ffffff;
    --color-text: #1a1a1a;
    --color-text-muted: #666666;
    --color-text-light: #999999;
    --color-primary: #0a0a0a;
    --color-primary-hover: #333333;
    --color-accent: #10b981;
    --color-accent-light: #d1fae5;
    --color-border: #e5e5e5;
    --color-border-light: #f0f0f0;
    --color-card: #ffffff;
    --color-code-bg: #1a1a1a;
    --color-code-text: #e5e5e5;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.08);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;

    --transition: 0.2s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

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

ul {
    list-style: none;
}

/* ===== Navigation ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(250, 250, 250, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border-light);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 18px;
}

.logo-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    font-size: 12px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-muted);
    transition: color var(--transition);
}

.nav-links a:hover {
    color: var(--color-text);
}

.nav-icon {
    display: flex;
    align-items: center;
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 24px 80px;
}

.hero-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    margin-bottom: 16px;
}

.hero-title {
    font-size: clamp(40px, 6vw, 64px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

.highlight {
    background: linear-gradient(135deg, var(--color-accent) 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--color-text-muted);
    max-width: 480px;
    margin-bottom: 32px;
}

.hero-cta {
    display: flex;
    gap: 16px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--color-bg-alt);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    border-color: var(--color-text-muted);
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-ghost {
    background: transparent;
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
}

.btn-ghost:hover {
    background: var(--color-bg);
    color: var(--color-text);
}

/* Hero Visual */
.hero-visual {
    display: flex;
    justify-content: center;
}

.visual-card {
    background: var(--color-code-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
}

.visual-dots {
    display: flex;
    gap: 8px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.05);
}

.visual-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

.visual-dots span:first-child { background: #ff5f56; }
.visual-dots span:nth-child(2) { background: #ffbd2e; }
.visual-dots span:nth-child(3) { background: #27ca40; }

.visual-content {
    padding: 24px;
}

.visual-content code {
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.8;
    color: var(--color-code-text);
}

.code-keyword { color: #c792ea; }
.code-string { color: #c3e88d; }

/* ===== Projects Section ===== */
.projects {
    padding: 120px 24px;
    background: var(--color-bg-alt);
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 64px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
}

.section-header p {
    color: var(--color-text-muted);
    font-size: 18px;
}

.project-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 32px;
}

.project-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 32px;
    position: relative;
    transition: all var(--transition);
}

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

.project-card.featured {
    border-color: var(--color-accent);
    border-width: 2px;
}

.project-card.coming-soon {
    opacity: 0.7;
}

.project-badge {
    position: absolute;
    top: 24px;
    right: 24px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    background: var(--color-accent-light);
    color: #059669;
    border-radius: 20px;
}

.project-badge.secondary {
    background: var(--color-border-light);
    color: var(--color-text-muted);
}

.project-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-accent-light);
    color: var(--color-accent);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.project-icon.muted {
    background: var(--color-border-light);
    color: var(--color-text-light);
}

.project-icon.email-icon {
    background: #dbeafe;
    color: #2563eb;
}

.project-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.project-card > p {
    color: var(--color-text-muted);
    font-size: 15px;
    margin-bottom: 20px;
}

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

.project-tech span {
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    background: var(--color-bg);
    border-radius: 20px;
    color: var(--color-text-muted);
}

.project-tech.muted span {
    background: var(--color-border-light);
    color: var(--color-text-light);
}

.project-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 24px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--color-text-muted);
}

.feature svg {
    color: var(--color-accent);
    flex-shrink: 0;
}

.project-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ===== About Section ===== */
.about {
    padding: 120px 24px;
    background: var(--color-bg);
}

.about-content {
    max-width: 1000px;
    margin: 0 auto;
}

.about h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 32px;
}

.about-text {
    max-width: 700px;
    margin-bottom: 48px;
}

.about-text p {
    font-size: 17px;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.about-text strong {
    color: var(--color-text);
}

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

.skill-category h4 {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-accent);
    margin-bottom: 16px;
}

.skill-category ul li {
    font-size: 15px;
    color: var(--color-text-muted);
    padding: 6px 0;
}

/* ===== Footer ===== */
.footer {
    padding: 48px 24px;
    border-top: 1px solid var(--color-border-light);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    font-size: 14px;
    color: var(--color-text-muted);
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--color-text);
}

.footer-copy {
    font-size: 13px;
    color: var(--color-text-light);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 48px;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-cta {
        justify-content: center;
    }

    .project-features {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .nav-links a:not(.nav-icon) {
        display: none;
    }

    .hero {
        padding-top: 100px;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-cta {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

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

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

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}
