@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
    --color-dark-bg: #02040a;
    --color-panel-bg: #070b19;
    --color-panel-soft: rgb(7 11 25 / 30%);
    --color-panel-hover: rgb(7 11 25 / 50%);
    --color-border-slate: #11192e;
    --color-border-soft: rgb(17 25 46 / 60%);
    --color-text: #f8fafc;
    --color-text-muted: #94a3b8;
    --color-text-soft: #64748b;
    --color-text-faint: #475569;
    --color-white: #ffffff;
    --color-accent-blue: #38bdf8;
    --color-scrollbar-hover: #1d2c55;
    --color-success: #10b981;

    --font-sans: 'Plus Jakarta Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --site-max-width: 80rem;
    --content-max-width: 56rem;
    --radius-sm: 0.75rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-pill: 9999px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-x: hidden;
    background: var(--color-dark-bg);
    color: var(--color-text);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

button,
input,
textarea {
    font: inherit;
}

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

button {
    border: 0;
    cursor: pointer;
}

img,
svg {
    display: block;
}

::selection {
    background-color: rgb(56 189 248 / 20%);
    color: var(--color-white);
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--color-dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border-slate);
    border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-scrollbar-hover);
}

.hidden {
    display: none !important;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    border-bottom: 1px solid var(--color-border-slate);
    background: rgb(2 4 10 / 95%);
    backdrop-filter: blur(12px);
}

.header-inner {
    max-width: var(--site-max-width);
    height: 5rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-link {
    display: flex;
    align-items: center;
}

.brand-logo {
    width: auto;
    height: 2.75rem;
    object-fit: contain;
    transition: opacity 180ms ease;
}

.brand-link:hover .brand-logo {
    opacity: 0.9;
}

.desktop-nav {
    display: none;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem;
    border: 1px solid var(--color-border-slate);
    border-radius: var(--radius-pill);
    background: rgb(7 11 25 / 40%);
    color: var(--color-text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.nav-link {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-pill);
    transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

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

.nav-link-primary {
    margin-left: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--color-white);
    color: var(--color-dark-bg);
}

.nav-link-primary:hover {
    background: #e2e8f0;
    color: var(--color-dark-bg);
}

.mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--color-white);
    transition: background 180ms ease;
}

.mobile-toggle:hover {
    background: rgb(255 255 255 / 5%);
}

.menu-icon {
    width: 1.5rem;
    height: 1.5rem;
}

.mobile-dropdown {
    padding: 1.5rem;
    border-bottom: 1px solid var(--color-border-slate);
    background: var(--color-dark-bg);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-link {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    transition: color 180ms ease;
}

.mobile-link:hover,
.mobile-link-primary {
    color: var(--color-white);
}

.mobile-link-primary {
    font-weight: 700;
}

.hero-section {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: var(--site-max-width);
    margin: 0 auto;
    padding: 6rem 1.5rem;
    text-align: left;
}

.hero-copy {
    max-width: 56rem;
}

.hero-copy h1 {
    margin: 0;
    color: var(--color-white);
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: 0;
}

.hero-subtitle {
    margin: 1.5rem 0 0;
    color: #cbd5e1;
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: 0;
}

.hero-description {
    max-width: 42rem;
    margin: 1.5rem 0 0;
    color: var(--color-text-muted);
    font-size: 1rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding-top: 2rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 1rem 2rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.button-primary {
    background: var(--color-white);
    color: var(--color-dark-bg);
    box-shadow: 0 10px 30px rgb(255 255 255 / 5%);
}

.button-primary:hover {
    background: #e2e8f0;
}

.button-secondary {
    border: 1px solid var(--color-border-slate);
    background: transparent;
    color: #cbd5e1;
}

.button-secondary:hover {
    border-color: #334155;
    background: rgb(255 255 255 / 2%);
}

.page-section {
    position: relative;
    z-index: 10;
    scroll-margin-top: 5rem;
    border-top: 1px solid var(--color-border-soft);
    background: var(--color-dark-bg);
    padding: 6rem 0;
}

.page-section-muted {
    background: rgb(2 4 10 / 30%);
}

.section-inner,
.contact-inner {
    max-width: var(--site-max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-heading {
    margin-bottom: 4rem;
}

.section-heading.centered {
    margin-bottom: 3rem;
    text-align: center;
}

.section-heading h2,
.narrow-section h2 {
    margin: 0;
    color: var(--color-white);
    font-size: 1.875rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: 0;
}

.section-heading p {
    max-width: 36rem;
    margin: 1rem 0 0;
    color: var(--color-text-muted);
    font-size: 0.875rem;
    line-height: 1.6;
}

.section-heading.centered p {
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
}

.project-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.project-card {
    min-height: 13rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-md);
    background: var(--color-panel-soft);
    transition: background 180ms ease;
}

.project-card:hover {
    background: var(--color-panel-hover);
}

.project-card h3 {
    margin: 0;
    color: var(--color-white);
    font-size: 1.125rem;
    font-weight: 700;
    transition: color 180ms ease;
}

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

.project-card p {
    margin: 1rem 0 0;
    color: var(--color-text-muted);
    font-size: 0.75rem;
    line-height: 1.65;
}

.project-card span {
    margin-top: 1rem;
    color: var(--color-text-soft);
    font-family: var(--font-mono);
    font-size: 0.625rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.narrow-section {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: center;
}

.narrow-section p {
    max-width: 48rem;
    margin: 1.5rem auto 0;
    color: var(--color-text-muted);
    font-size: 1rem;
    line-height: 1.7;
}

.section-divider {
    width: 3rem;
    height: 1px;
    margin: 1.5rem auto 0;
    background: #1e293b;
}

.contact-inner {
    max-width: var(--content-max-width);
}

.contact-panel {
    padding: 2rem;
    border: 1px solid var(--color-border-slate);
    border-radius: var(--radius-lg);
    background: rgb(7 11 25 / 20%);
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 45%);
    backdrop-filter: blur(12px);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-field label {
    color: var(--color-text-muted);
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.form-field input,
.form-field textarea {
    width: 100%;
    border: 1px solid var(--color-border-slate);
    border-radius: var(--radius-sm);
    outline: none;
    background: var(--color-dark-bg);
    color: var(--color-white);
    font-size: 0.75rem;
    transition: border-color 180ms ease;
}

.form-field input {
    padding: 0.875rem 1rem;
}

.form-field textarea {
    min-height: 8rem;
    padding: 1rem;
    resize: none;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: var(--color-text-faint);
}

.form-field input:focus,
.form-field textarea:focus {
    border-color: var(--color-text-soft);
}

.form-actions {
    margin-top: 0.5rem;
    padding-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--color-border-soft);
}

.toast {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 50;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--color-border-slate);
    border-radius: var(--radius-md);
    background: rgb(7 11 25 / 95%);
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 45%);
    backdrop-filter: blur(12px);
}

.toast-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: var(--radius-pill);
    background: var(--color-success);
    animation: pulse 1.6s ease-in-out infinite;
}

.toast-title {
    margin: 0;
    color: var(--color-white);
    font-size: 0.75rem;
    font-weight: 700;
}

.toast-text {
    margin: 0.125rem 0 0;
    color: var(--color-text-muted);
    font-size: 0.625rem;
}

.site-footer {
    position: relative;
    z-index: 10;
    padding: 3rem 0;
    border-top: 1px solid var(--color-border-soft);
    background: var(--color-dark-bg);
    color: var(--color-text-soft);
}

.footer-inner {
    max-width: var(--site-max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    font-size: 0.75rem;
    text-align: center;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.footer-logo {
    color: var(--color-white);
    font-size: 0.875rem;
    font-weight: 800;
    letter-spacing: 0.2em;
}

.footer-logo span {
    color: var(--color-text-muted);
    font-weight: 300;
}

.footer-tagline {
    color: #475569;
    font-size: 0.625rem;
    font-weight: 500;
}

.footer-inner p {
    margin: 0;
}

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

.footer-links a {
    transition: color 180ms ease;
}

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

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.55;
        transform: scale(0.85);
    }
}

@media (min-width: 640px) {
    .brand-logo {
        height: 3rem;
    }

    .hero-copy h1 {
        font-size: 4.5rem;
    }

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

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

    .section-heading h2,
    .narrow-section h2 {
        font-size: 2.25rem;
    }

    .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .desktop-nav {
        display: flex;
    }

    .mobile-toggle,
    .mobile-dropdown {
        display: none !important;
    }

    .hero-section {
        padding-top: 9rem;
        padding-bottom: 9rem;
    }

    .project-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-inner {
        flex-direction: row;
        text-align: left;
    }

    .footer-brand {
        align-items: flex-start;
    }
}

@media (min-width: 1024px) {
    .project-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
