*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-bg: #000000;
    --color-surface: #111111;
    --color-surface-2: #1a1a1a;
    --color-text: #f5f5f7;
    --color-text-secondary: #86868b;
    --color-accent-start: #ff3b30;
    --color-accent-end: #9b0021;
    --color-border: rgba(255, 255, 255, 0.08);
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --transition-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --max-width: 1200px;
    --hero-logo-size: clamp(140px, 18vw, 180px);
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-main);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

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

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

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 clamp(24px, 5vw, 80px);
}

.text-gradient {
    background: linear-gradient(135deg, var(--color-accent-start), var(--color-accent-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    position: relative;
    padding: 0 24px;
    overflow: hidden;
}

.hero-intro {
    text-align: center;
    margin-top: 150px;
    z-index: 2;
}

.hero-logo-shell {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    pointer-events: none;
    z-index: 1200;
}

.hero-logo {
    margin-top: 31vh;
    transform: translateY(-50%);
    width: var(--hero-logo-size);
    transition:
        margin-top 0.55s var(--transition-smooth),
        width 0.55s var(--transition-smooth),
        transform 0.55s var(--transition-smooth);
}

body.logo-scrolled .hero-logo {
    margin-top: 20px;
    width: clamp(60px, 7vw, 82px);
    transform: translateY(0);
}

.hero::before {
    content: '';
    position: absolute;
    top: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(41, 151, 255, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-name {
    font-size: clamp(40px, 8vw, 88px);
    font-weight: 700;
    line-height: 1.0;
    letter-spacing: -0.04em;
    margin-bottom: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #a0a0a5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-tagline {
    font-size: clamp(18px, 2.5vw, 24px);
    font-weight: 300;
    color: var(--color-text-secondary);
    margin-bottom: 0;
    letter-spacing: -0.01em;
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 40px;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.hero-scroll-indicator span {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-text-secondary);
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--color-text-secondary), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* --- Sections --- */
.section {
    padding: clamp(80px, 12vw, 160px) 0;
    position: relative;
}

.section-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-accent-start);
    margin-bottom: 24px;
    font-weight: 500;
}

.section-title {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 64px;
}

/* --- Projects Section --- */
.projects {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
}

.projects-grid {
    display: grid;
    gap: 40px;
}

.project-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    padding: 40px;
    background: var(--color-surface-2);
    border-radius: 24px;
    border: 1px solid var(--color-border);
    transition: transform 0.5s var(--transition-smooth), border-color 0.3s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: rgba(41, 151, 255, 0.15);
}

.project-image-placeholder {
    aspect-ratio: 16 / 10;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 500;
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
}

.project-img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.project-image--dual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
}

.project-img--dual {
    flex: 0 0 auto;
    width: auto;
    max-width: 45%;
    height: 140px;
    object-fit: contain;
}

.project-category {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent-start);
    font-weight: 500;
    display: block;
    margin-bottom: 12px;
}

.project-info h3 {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.project-info p {
    font-size: 15px;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
    font-weight: 300;
}

.project-link {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-accent-start);
    transition: gap 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.project-link:hover {
    gap: 8px;
}

/* --- Contact Section --- */
.contact {
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
}

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

.contact-text p {
    font-size: 20px;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 32px;
    font-weight: 300;
}

.contact-email {
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 600;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--color-accent-start), var(--color-accent-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: opacity 0.3s ease;
}

.contact-email:hover {
    opacity: 0.8;
}

.contact-links {
    display: flex;
    flex-direction: column;
}

.contact-link-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 17px;
    font-weight: 400;
    color: var(--color-text);
    transition: color 0.3s ease, padding-left 0.3s var(--transition-smooth);
}

.contact-link-item:first-child {
    border-top: 1px solid var(--color-border);
}

.contact-link-item:hover {
    color: var(--color-accent-start);
    padding-left: 8px;
}

/* --- Footer --- */
.footer {
    padding: 32px 0;
    border-top: 1px solid var(--color-border);
}

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

.footer-logo {
    font-weight: 700;
    font-size: 16px;
    background: linear-gradient(135deg, var(--color-accent-start), var(--color-accent-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-logo img {
    height: 50px;
}

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

/* --- Animations --- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s var(--transition-smooth) forwards;
}

.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }

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

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--transition-smooth), transform 0.8s var(--transition-smooth);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }

/* --- Responsive --- */
@media (max-width: 768px) {
    .project-card {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 24px;
    }

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

    .footer-inner {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .hero-scroll-indicator {
        display: none;
    }

    body.logo-scrolled .hero-logo {
        margin-top: 14px;
        width: 56px;
    }
}
