/* ==========================================================================
   style.css — homepage (hero, projects, about, footer)
   Depends on css/base.css for tokens and shared components.
   ========================================================================== */

/* Navigation
   ========================================================================== */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: background var(--transition-fast), border-color var(--transition-fast),
                box-shadow var(--transition-fast);
    border-bottom: 1px solid transparent;
}

.site-nav.scrolled {
    background: rgba(10, 15, 13, 0.85);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom-color: var(--border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.nav-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.brand-accent {
    color: var(--accent);
}

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

.nav-links a {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

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

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

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 50% 35%, rgba(52, 211, 153, 0.09), transparent 70%),
        radial-gradient(ellipse 45% 40% at 82% 85%, rgba(16, 185, 129, 0.05), transparent 70%);
}

.hero-backdrop::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(160, 180, 170, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(160, 180, 170, 0.07) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse 75% 60% at 50% 45%, black 25%, transparent 75%);
    mask-image: radial-gradient(ellipse 75% 60% at 50% 45%, black 25%, transparent 75%);
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
    max-width: 720px;
}

.hero-eyebrow {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--accent);
    margin-bottom: 20px;
    opacity: 0;
    animation: fade-slide-up 0.6s ease 0.1s forwards;
}

.hero-title {
    font-size: clamp(2.75rem, 8vw, 4.75rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
    min-height: 1.2em; /* reserve space while the name types out */
}

.cursor {
    display: inline-block;
    font-weight: 200;
    color: var(--accent);
    opacity: 0;
    animation: blink 1.1s step-end 0.4s infinite;
}

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

.hero-subtitle {
    font-size: clamp(1.5rem, 4.5vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-muted);
    margin-bottom: 24px;
    opacity: 0;
    animation: fade-slide-up 0.7s ease 1.9s forwards;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin: 0 auto 40px;
    opacity: 0;
    animation: fade-slide-up 0.7s ease 2.1s forwards;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    opacity: 0;
    animation: fade-slide-up 0.7s ease 2.3s forwards;
}

@keyframes fade-slide-up {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: fade-slide-up 0.7s ease 2.8s forwards;
}

.scroll-indicator span {
    display: block;
    width: 26px;
    height: 44px;
    border: 2px solid var(--text-muted);
    border-radius: 16px;
    position: relative;
    transition: border-color var(--transition-fast);
}

.scroll-indicator:hover span {
    border-color: var(--accent);
}

.scroll-indicator span::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    width: 4px;
    height: 9px;
    background: var(--accent);
    border-radius: 2px;
    transform: translateX(-50%);
    animation: scroll-dot 2.2s ease-in-out infinite;
}

@keyframes scroll-dot {
    0% { opacity: 0; transform: translate(-50%, 0); }
    35% { opacity: 1; }
    75% { opacity: 0; transform: translate(-50%, 14px); }
    100% { opacity: 0; transform: translate(-50%, 0); }
}

/* Sections
   ========================================================================== */
.section {
    max-width: var(--container);
    margin: 0 auto;
    padding: 110px 24px;
    scroll-margin-top: 64px;
}

.section-heading {
    margin-bottom: 56px;
}

.section-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--accent);
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(2rem, 5vw, 2.75rem);
    margin-bottom: 12px;
}

.section-lede {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 560px;
}

/* Projects grid
   ========================================================================== */
.projects {
    padding-top: 40px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.project-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    color: inherit;
    transition: transform var(--transition), border-color var(--transition-fast),
                background var(--transition-fast), box-shadow var(--transition);
}

.project-card:hover {
    transform: translateY(-6px);
    background: var(--surface-hover);
    border-color: rgba(52, 211, 153, 0.4);
    box-shadow: var(--shadow-glow);
}

.card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 22px;
}

.card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid rgba(52, 211, 153, 0.2);
}

.card-arrow {
    color: var(--text-muted);
    transition: color var(--transition-fast), transform var(--transition);
}

.project-card:hover .card-arrow {
    color: var(--accent);
    transform: translate(3px, -3px);
}

.project-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    transition: color var(--transition-fast);
}

.project-card:hover h3 {
    color: var(--accent);
}

.project-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    flex: 1;
}

.card-tech {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 22px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
}

.card-tech li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.tech-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

/* Technology colors */
.tech-dot.python  { background-color: #3776ab; }
.tech-dot.pytorch { background-color: #ee4c2c; }
.tech-dot.ai      { background-color: #34d399; }
.tech-dot.nodejs  { background-color: #339933; }
.tech-dot.js      { background-color: #f7df1e; }
.tech-dot.html    { background-color: #e34f26; }
.tech-dot.css     { background-color: #1572b6; }
.tech-dot.go      { background-color: #00add8; }
.tech-dot.json    { background-color: #a855f7; }
.tech-dot.api     { background-color: #ef4444; }
.tech-dot.java    { background-color: #f89820; }
.tech-dot.spring  { background-color: #6db33f; }

/* About
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 5fr 4fr;
    gap: 64px;
    align-items: start;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.02rem;
}

.about-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.about-skills {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 24px;
}

.skill-label {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    margin-bottom: 12px;
}

.skill-list {
    list-style: none;
}

.skill-list li {
    position: relative;
    padding: 4px 0 4px 18px;
    font-size: 0.92rem;
    color: var(--text-secondary);
}

.skill-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 0.8rem;
}

/* Footer
   ========================================================================== */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 48px 24px;
    text-align: center;
}

.footer-github {
    display: inline-flex;
    color: var(--text-muted);
    margin-bottom: 16px;
    transition: color var(--transition-fast), transform var(--transition-fast);
}

.footer-github:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

.footer-note {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.footer-meta {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 6px;
}

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

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

    .nav-inner {
        padding: 16px 20px;
    }

    .nav-links {
        gap: 20px;
    }

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

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}

@media (max-width: 480px) {
    .project-card {
        padding: 22px;
    }

    .about-skills {
        gap: 24px 16px;
    }

    .hero-actions .btn {
        width: 100%;
    }
}
