:root {
    --bg: #090909;
    --bg-surface: #111111;
    --bg-surface-hover: #191919;
    --text-primary: #e8e8e8;
    --text-secondary: #777777;
    --accent: #5eead4;
    --accent-dim: rgba(94, 234, 212, 0.07);
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(94, 234, 212, 0.25);
    --font-display: 'Syne', sans-serif;
    --font-body: 'Manrope', sans-serif;
    --container: 1080px;
    --section-padding: clamp(80px, 12vh, 140px);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 72px;
}

body {
    background-color: var(--bg);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

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

/* ---- Container ---- */

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* ---- Navigation ---- */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    height: 72px;
    transition: background-color 0.4s ease, border-color 0.4s ease;
    border-bottom: 1px solid transparent;
}

.nav.scrolled {
    background-color: rgba(9, 9, 9, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom-color: var(--border);
}

.nav-brand {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

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

.nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.3s ease;
    letter-spacing: 0.01em;
}

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

/* ---- Hero ---- */

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    background: radial-gradient(ellipse at 50% 40%, #111 0%, var(--bg) 70%);
}

.hero::before {
    content: '';
    position: absolute;
    width: clamp(300px, 50vw, 700px);
    height: clamp(300px, 50vw, 700px);
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-dim) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
    pointer-events: none;
}

.hero-content {
    text-align: center;
    z-index: 1;
}

.hero-logo {
    width: clamp(260px, 38vw, 460px);
    margin: 0 auto 28px;
    opacity: 0;
    animation: fadeUp 0.9s ease forwards;
    animation-delay: 0.3s;
    /* If logo has a white background, uncomment the next line: */
    /* filter: invert(1) brightness(2); */
}

.hero-tagline {
    font-family: var(--font-body);
    font-size: clamp(13px, 1.8vw, 17px);
    font-weight: 400;
    color: var(--text-secondary);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    opacity: 0;
    animation: fadeUp 0.9s ease forwards;
    animation-delay: 0.6s;
}

.hero-scroll {
    position: absolute;
    bottom: 40px;
    color: var(--text-secondary);
    opacity: 0;
    animation: fadeUp 0.9s ease 0.9s forwards, bounce 2.5s ease-in-out 2s infinite;
    transition: color 0.3s ease;
    z-index: 1;
}

.hero-scroll:hover {
    color: var(--text-primary);
}

/* ---- Sections ---- */

.section {
    padding: var(--section-padding) 0;
}

.section-label {
    display: block;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(28px, 5vw, 44px);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.15;
    margin-bottom: 48px;
}

/* ---- About ---- */

.about-content {
    max-width: 640px;
}

.about-content p {
    font-size: clamp(16px, 1.8vw, 18px);
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
}

.about-content p:last-child {
    margin-bottom: 0;
}

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

/* ---- Projects ---- */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.project-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    transition: transform 0.35s ease, border-color 0.35s ease, background-color 0.35s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    background-color: var(--bg-surface-hover);
}

.project-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.project-folder {
    color: var(--accent);
}

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

.project-links a {
    color: var(--text-secondary);
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

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

.project-name {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.project-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 24px;
    flex-grow: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.project-tags span {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    letter-spacing: 0.02em;
}

/* ---- Contact ---- */

.section-contact {
    text-align: center;
}

.section-contact .section-label,
.section-contact .section-title {
    text-align: center;
}

.contact-content {
    max-width: 540px;
    margin: 0 auto;
}

.contact-content p {
    font-size: clamp(16px, 1.8vw, 18px);
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 36px;
}

.contact-link {
    display: inline-block;
    font-family: var(--font-display);
    font-size: clamp(22px, 3.5vw, 36px);
    font-weight: 600;
    color: var(--accent);
    position: relative;
    padding-bottom: 4px;
}

.contact-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.4s ease;
}

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

/* ---- Footer ---- */

.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
}

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

.social-links {
    display: flex;
    gap: 20px;
}

.social-link {
    color: var(--text-secondary);
    transition: color 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
}

.social-link:hover {
    color: var(--text-primary);
    transform: translateY(-2px);
}

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

/* ---- Reveal Animations ---- */

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ---- Keyframes ---- */

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

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

/* ---- Responsive ---- */

@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .nav-links {
        gap: 20px;
    }

    .nav-links a {
        font-size: 13px;
    }

    .container {
        padding: 0 20px;
    }

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

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