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

:root {
    --bg: #0a0a0b;
    --bg-subtle: #111113;
    --surface: #18181b;
    --border: #27272a;
    --border-hover: #3f3f46;
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #52525b;
    --accent: #a78bfa;
    --accent-dim: #7c3aed;
    --accent-glow: rgba(167, 139, 250, 0.15);
    --green: #4ade80;
    --green-dim: rgba(74, 222, 128, 0.2);
    --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', 'Cascadia Code', monospace;
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-mono);
    background-color: var(--bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

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

/* ============================================
   BACKGROUND EFFECTS
   ============================================ */
.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 0;
    opacity: 0.03;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

.grid-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(167, 139, 250, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(167, 139, 250, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 20%, transparent 70%);
}

.cursor-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* ============================================
   LAYOUT
   ============================================ */
.hero {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 2rem 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* ============================================
   NAV
   ============================================ */
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    animation: fadeInDown 0.6s ease both;
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    user-select: none;
}

.logo-bracket {
    color: var(--accent);
    transition: color var(--transition-fast);
}

.logo-text {
    color: var(--text-primary);
    margin: 0 2px;
}

.nav-logo:hover .logo-bracket {
    color: var(--text-primary);
}

.nav-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--green);
    box-shadow: 0 0 8px var(--green-dim), 0 0 20px var(--green-dim);
    animation: pulse 2s ease-in-out infinite;
}

/* ============================================
   HERO CONTENT
   ============================================ */
.hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2.5rem;
    padding: 4rem 0;
}

.hero-tag {
    animation: fadeInUp 0.6s ease 0.2s both;
}

.tag-line {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

/* TITLE */
.hero-title {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    line-height: 1.1;
}

.title-line {
    display: flex;
    flex-wrap: wrap;
    gap: 0 0.6rem;
    overflow: hidden;
}

.title-word {
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    animation: revealUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: calc(var(--delay) * 0.15s + 0.3s);
}

.title-word.accent {
    color: var(--accent);
    position: relative;
}

.title-word.accent::after {
    content: '';
    position: absolute;
    bottom: 0.1em;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
    opacity: 0.5;
    animation: expandWidth 0.6s ease 1s both;
}

/* DESCRIPTION */
.hero-description {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    animation: fadeInUp 0.6s ease 0.7s both;
}

.description-text {
    font-size: clamp(0.85rem, 1.4vw, 1rem);
    color: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 0.01em;
    line-height: 1.7;
    display: flex;
    align-items: baseline;
    gap: 1rem;
}

.line-number {
    font-size: 0.7rem;
    color: var(--text-muted);
    min-width: 1.5rem;
    user-select: none;
}

.highlight {
    color: var(--accent);
    font-weight: 500;
    position: relative;
}

.highlight::before {
    content: '';
    position: absolute;
    inset: -2px -6px;
    background: var(--accent-glow);
    border-radius: 4px;
    z-index: -1;
}

/* TECH STACK */
.hero-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    animation: fadeInUp 0.6s ease 0.9s both;
}

.stack-item {
    font-size: 0.7rem;
    color: var(--text-muted);
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    letter-spacing: 0.04em;
    transition: all var(--transition-fast);
    cursor: default;
    animation: fadeInUp 0.4s ease both;
    animation-delay: calc(var(--i) * 0.08s + 1s);
}

.stack-item:hover {
    color: var(--accent);
    border-color: var(--accent-dim);
    background: var(--accent-glow);
    transform: translateY(-2px);
}

/* CTA */
.hero-cta {
    display: flex;
    align-items: center;
    gap: 2rem;
    animation: fadeInUp 0.6s ease 1.1s both;
    flex-wrap: wrap;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-glow), transparent);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.cta-button:hover {
    border-color: var(--accent-dim);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(167, 139, 250, 0.1);
}

.cta-button:hover::before {
    opacity: 1;
}

.cta-icon {
    font-size: 1rem;
    transition: transform var(--transition-fast);
    position: relative;
    z-index: 1;
}

.cta-button:hover .cta-icon {
    transform: translateX(4px);
}

.cta-label {
    position: relative;
    z-index: 1;
}

.cta-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

/* ============================================
   FOOTER
   ============================================ */
.hero-footer {
    animation: fadeInUp 0.6s ease 1.3s both;
}

.footer-line {
    height: 1px;
    background: var(--border);
    margin-bottom: 1.5rem;
}

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

.footer-copy {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-link {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    transition: color var(--transition-fast);
    position: relative;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width var(--transition-base);
}

.footer-link:hover {
    color: var(--text-primary);
}

.footer-link:hover::after {
    width: 100%;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes revealUp {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes expandWidth {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

.blink {
    animation: blink 1s step-end infinite;
    color: var(--accent);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .hero {
        padding: 1.5rem;
    }

    .hero-content {
        gap: 2rem;
        padding: 2rem 0;
    }

    .nav-status .status-text {
        display: none;
    }

    .description-text {
        font-size: 0.85rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 1rem;
    }

    .title-word {
        font-size: 2.2rem;
    }

    .line-number {
        display: none;
    }
}
