/* ===== CSS Variables ===== */
:root {
    --black: #0a0a0a;
    --white: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;

    --font-sans: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Space Mono', monospace;

    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== 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);
    background-color: var(--black);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

/* ===== Subtle Background ===== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(40, 40, 40, 0.4) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(30, 30, 30, 0.3) 0%, transparent 50%);
    pointer-events: none;
}

/* ===== Container ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Navigation ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 48px;
    mix-blend-mode: difference;
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 48px;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: opacity 0.3s ease;
}

.nav-links a:hover {
    opacity: 0.6;
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 120px 48px 80px;
    position: relative;
}

.hero-content {
    max-width: 900px;
    position: relative;
}

.hero-tag {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--gray-400);
    margin-bottom: 24px;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 32px;
}

.hero-title .line {
    display: block;
}

.hero-title .highlight {
    color: var(--white);
    background: linear-gradient(135deg, #fff 0%, #a0a0a0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.4s var(--ease-out-expo);
}

.hero-title:hover .highlight {
    background: linear-gradient(135deg, #fff 0%, #fff 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray-200);
    max-width: 550px;
    margin-bottom: 48px;
    line-height: 1.7;
}

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

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: none;
    cursor: pointer;
    transition: all 0.3s var(--ease-out-quad);
}

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

.btn-primary:hover {
    background: var(--gray-200);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 1px solid var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-900);
    border-color: var(--gray-600);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* ===== Scroll Indicator ===== */
.scroll-indicator {
    position: absolute;
    bottom: 48px;
    left: 48px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.scroll-indicator span {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--gray-500);
}

.scroll-line {
    width: 60px;
    height: 1px;
    background: var(--gray-700);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--white);
    animation: scrollLine 2s infinite;
}

@keyframes scrollLine {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* ===== Sections ===== */
.section {
    padding: 120px 0;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 64px;
}

/* ===== Work Section ===== */
.work {
    background: var(--gray-900);
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 48px;
}

.work-item {
    background: var(--black);
    border: 1px solid var(--gray-800);
    transition: all 0.4s var(--ease-out-expo);
}

.work-item:hover {
    border-color: var(--gray-600);
    transform: translateY(-8px);
}

.work-image {
    aspect-ratio: 16/10;
    overflow: hidden;
}

.work-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--gray-800) 0%, var(--black) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 4rem;
    font-weight: 700;
    color: var(--gray-600);
    text-shadow: 0 0 40px rgba(255,255,255,0.1);
}

.work-info {
    padding: 32px;
}

.work-category {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--gray-500);
}

.work-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 12px 0;
}

.work-desc {
    color: var(--gray-400);
    font-size: 0.9375rem;
}

/* ===== About Section ===== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.about-text {
    font-size: 1.125rem;
    color: var(--gray-300);
    margin-bottom: 24px;
    line-height: 1.8;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 40px;
}

.skill {
    padding: 8px 16px;
    background: var(--gray-900);
    border: 1px solid var(--gray-800);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--gray-300);
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 48px;
    padding-top: 20px;
}

.stat {
    text-align: left;
}

.stat-number {
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
    display: block;
    background: linear-gradient(180deg, #fff 0%, #666 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--gray-500);
    margin-top: 8px;
    display: block;
}

/* ===== Contact Section ===== */
.contact {
    background: var(--gray-900);
}

.contact-subtitle {
    font-size: 1.125rem;
    color: var(--gray-400);
    margin-top: -40px;
    margin-bottom: 64px;
}

.contact-form {
    max-width: 600px;
}

.form-group {
    position: relative;
    margin-bottom: 32px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 20px 0 12px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--gray-700);
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--white);
    transition: border-color 0.3s ease;
    resize: none;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--white);
}

.form-group label {
    position: absolute;
    left: 0;
    top: 20px;
    font-size: 1rem;
    color: var(--gray-500);
    pointer-events: none;
    transition: all 0.3s ease;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: 0;
    font-size: 0.75rem;
    color: var(--gray-400);
}

.contact-alt {
    margin-top: 64px;
    text-align: center;
}

.contact-alt p {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 16px;
}

.email-link {
    font-size: 1.5rem;
    font-weight: 500;
    border-bottom: 2px solid var(--gray-700);
    padding-bottom: 4px;
    transition: border-color 0.3s ease;
}

.email-link:hover {
    border-color: var(--white);
}

/* ===== Footer ===== */
.footer {
    padding: 48px 0;
    border-top: 1px solid var(--gray-800);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.footer-logo {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 700;
}

.footer-copy {
    font-size: 0.875rem;
    color: var(--gray-500);
}

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

.footer-links a {
    font-size: 0.875rem;
    color: var(--gray-400);
    transition: color 0.3s ease;
}

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

/* ===== Toast ===== */
.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--white);
    color: var(--black);
    padding: 16px 32px;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0;
    opacity: 0;
    transition: all 0.4s var(--ease-out-expo);
    z-index: 1000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ===== Responsive ===== */
@media (max-width: 968px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .about-stats {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 32px;
    }

    .stat-number {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .nav {
        padding: 20px 24px;
    }

    .nav-links {
        gap: 24px;
    }

    .hero {
        padding: 100px 24px 60px;
    }

    .scroll-indicator {
        display: none;
    }

    .section {
        padding: 80px 0;
    }

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

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

    .footer-left {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .nav-links a {
        font-size: 0.75rem;
        padding: 12px 8px; /* Better touch targets */
    }

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

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

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

    .btn {
        width: 100%;
        justify-content: center;
        min-height: 48px; /* Touch-friendly */
    }

    .section-title {
        font-size: 1.75rem;
    }

    .work-title {
        font-size: 1.25rem;
    }

    .about-text {
        font-size: 1rem;
    }

    .skill {
        padding: 10px 14px;
        font-size: 0.75rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .form-group input,
    .form-group textarea {
        font-size: 16px; /* Prevents iOS zoom on focus */
    }

    .contact-subtitle {
        font-size: 1rem;
        margin-top: -24px;
    }
}
