.card {
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.5rem;
}

.h2 {
    margin-bottom: 2.5rem;
    font-family: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.h2::after {
    display: block;
    width: 3.5rem;
    height: 0.375rem;
    margin-top: 0.75rem;
    border-radius: 9999px;
    background-color: #f5b335;
    content: '';
}

.navlink {
    border-radius: 9999px;
    padding: 0.375rem 0.75rem;
    color: #e2e8f0;
    font-size: 0.875rem;
    font-weight: 700;
}

.navlink:hover {
    background-color: rgb(255 255 255 / 10%);
    color: #fff;
}

.meta {
    display: inline-block;
    margin-top: 0.25rem;
    margin-bottom: 0.75rem;
    border-radius: 9999px;
    background-color: #f1f5f9;
    padding: 0.125rem 0.75rem;
    color: #475569;
    font-size: 0.875rem;
}

.job {
    position: relative;
    margin-left: 0.75rem;
    border-left: 2px solid #e2e8f0;
    padding-bottom: 2rem;
    padding-left: 2rem;
}

.job-periods {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.job-periods .meta {
    margin-bottom: 0.75rem;
}

.job::before {
    position: absolute;
    top: 0.5rem;
    left: -9px;
    width: 1rem;
    height: 1rem;
    border-radius: 9999px;
    background-color: #3aa0e8;
    box-shadow: 0 0 0 4px #f8fafc;
    content: '';
}

.btn {
    display: inline-block;
    border-radius: 9999px;
    background-color: #f5b335;
    padding: 0.75rem 1.75rem;
    color: #0f172a;
    font-family: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
    font-weight: 700;
    transition:
        transform 150ms,
        box-shadow 150ms;
}

.btn:hover {
    transform: translateY(-0.125rem);
    box-shadow: 0 10px 15px -3px rgb(245 179 53 / 30%);
}

.site-header {
    padding-top: env(safe-area-inset-top);
}

.site-footer {
    padding-bottom: calc(2rem + env(safe-area-inset-bottom));
}

.contact-field::placeholder {
    color: #64748b;
}

.contact-field:focus-visible {
    outline-offset: 2px;
    box-shadow: 0 0 0 4px #f5b335;
}

a:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px #0a1226;
}

@keyframes slide {
    to {
        transform: translateX(-50%);
    }
}

.marquee {
    animation: slide 28s linear infinite;
}

.grid-bg {
    background-image: radial-gradient(rgb(255 255 255 / 9%) 1px, transparent 1px);
    background-size: 26px 26px;
}

.mobile-nav {
    scrollbar-width: none;
}

.mobile-nav::-webkit-scrollbar {
    display: none;
}

.mobile-menu-button {
    display: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
}

.hero-heading {
    width: 100%;
    max-width: 100%;
}

#atas > div,
#atas > div > div {
    min-width: 0;
}

.code-window {
    min-width: 0;
    max-width: 100%;
}

.code-window pre {
    max-width: 100%;
}

@media (width >= 768px) {
    .h2 {
        font-size: 3rem;
    }
}

@media (width <= 480px) {
    .mobile-nav {
        justify-content: space-between;
        overflow: visible;
        padding-block: 0.625rem;
    }

    .mobile-brand {
        font-size: 0.75rem;
    }

    .mobile-menu-button {
        display: grid;
        flex-shrink: 0;
        width: 44px;
        height: 44px;
        border: 1px solid rgb(255 255 255 / 14%);
        background: rgb(255 255 255 / 8%);
        border-radius: 0.625rem;
        font-size: 0.6875rem;
        pointer-events: auto;
        touch-action: manipulation;
        z-index: 60;
    }

    .nav-links {
        position: absolute;
        z-index: 50;
        top: calc(100% + 0.5rem);
        right: 0;
        left: auto;
        display: none;
        width: min(280px, calc(100vw - 32px));
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        border: 1px solid rgb(255 255 255 / 10%);
        border-radius: 1rem;
        background: rgb(10 18 38 / 96%);
        padding: 0.5rem;
        box-shadow: 0 16px 40px rgb(0 0 0 / 35%);
        backdrop-filter: blur(16px);
    }

    .nav-links.is-open {
        display: grid;
    }

    .navlink {
        flex-shrink: 0;
        padding: 0.625rem 0.75rem;
        text-align: center;
        font-size: 0.75rem;
    }

    .hero-heading {
        max-width: 100%;
        font-size: 2.5rem;
        overflow-wrap: anywhere;
    }

    .hero-actions a {
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
    }

    .card {
        padding: 1.25rem;
    }

    .h2 {
        margin-bottom: 2rem;
        font-size: 2rem;
    }

    .job {
        margin-left: 0.25rem;
        padding-left: 1.25rem;
    }

    .job > h3 span {
        display: block;
        margin-top: 0.125rem;
    }

    .project-card-body h3 {
        font-size: 1.625rem;
    }

    .project-card-body .btn,
    .project-card-body a.rounded-full {
        width: 100%;
        min-height: 48px;
        text-align: center;
    }

    #contact h2 {
        font-size: 2rem;
        line-height: 1.1;
    }

    #contact {
        scroll-margin-top: 5rem;
    }
}

@media (prefers-color-scheme: dark) {
    .card {
        border-color: #1e293b;
        background-color: #0f172a;
    }

    .meta {
        background-color: #1e293b;
        color: #94a3b8;
    }

    .job {
        border-color: #1e293b;
    }

    .job::before {
        box-shadow: 0 0 0 4px #020617;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
.portfolio-main {
    color: inherit;
    text-rendering: optimizelegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.project-card {
    min-width: 0;
    border-color: rgb(226 232 240 / 85%);
    box-shadow: 0 18px 45px rgb(15 23 42 / 7%);
}

.project-card:hover {
    box-shadow: 0 24px 55px rgb(15 23 42 / 14%);
}

.project-card figure {
    overflow: hidden;
    padding: 0;
}

.project-card figure picture {
    display: block;
}

.project-card figure img {
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 0;
    transition: transform 500ms cubic-bezier(0.2, 0.65, 0.3, 1);
}

.project-card:hover figure img {
    transform: scale(1.025);
}

.project-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.project-card-body p {
    line-height: 1.75;
}

.project-card-body ul {
    line-height: 1.65;
}

.project-card-meta {
    display: grid;
    gap: 0.625rem;
}

.project-card-meta > :where(div) {
    display: grid;
    grid-template-columns: 5rem minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
}

.project-card-meta dt,
.project-card-meta dd {
    line-height: 1.55;
}

.project-card-body > a.btn {
    margin-top: auto;
    align-self: flex-start;
}

.project-card h3 {
    letter-spacing: -0.025em;
    line-height: 1.15;
}

#about p {
    max-width: 48rem;
    line-height: 1.8;
}

.contact-actions {
    border-top: 1px solid rgb(15 23 42 / 18%);
    padding-top: 1.5rem;
}

.contact-actions a {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (width <= 480px) {
    .contact-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .contact-actions a {
        width: 100%;
    }

    .project-card figure {
        padding: 0;
    }

    .project-card-meta {
        gap: 0.75rem;
    }

    .project-card-meta > :where(div) {
        grid-template-columns: 4.25rem minmax(0, 1fr);
        gap: 0.5rem;
    }

    .project-card figure img {
        aspect-ratio: 16 / 10;
    }

    .project-card-body {
        padding: 1.25rem;
    }

    .project-card-body p,
    .project-card-body ul,
    .project-card-meta {
        font-size: 0.9375rem;
    }

    .project-overview {
        margin-bottom: 1.25rem;
        max-width: 32rem;
        font-size: 0.9375rem;
        line-height: 1.65;
        text-wrap: pretty;
        overflow-wrap: anywhere;
    }

    .project-card-meta {
        margin-bottom: 1rem;
        border-top: 1px solid rgb(226 232 240 / 90%);
        border-bottom: 1px solid rgb(226 232 240 / 90%);
        padding-block: 1rem;
    }
}

.job ul {
    color: #475569;
    line-height: 1.75;
}

.job h3 {
    line-height: 1.35;
}

.job h3 span {
    margin-left: 0.25rem;
}

#contact h2 {
    max-width: 52rem;
    line-height: 1.02;
    text-wrap: balance;
}

#contact form {
    border-radius: 1.5rem;
    background: rgb(255 255 255 / 72%);
    padding: clamp(1.25rem, 3vw, 2rem);
    box-shadow: 0 22px 55px rgb(15 23 42 / 12%);
    backdrop-filter: blur(10px);
}

#contact form input,
#contact form textarea {
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease;
}

#contact form input:hover,
#contact form textarea:hover {
    border-color: rgb(15 23 42 / 45%);
}

@media (width <= 640px) {
    .portfolio-main {
        padding-top: 3.5rem;
        padding-bottom: 3.5rem;
    }

    .hero-heading {
        line-height: 0.98;
        letter-spacing: -0.04em;
    }

    .project-card-body {
        padding: 1.25rem;
    }

    .project-card-body p,
    .job ul {
        font-size: 0.9375rem;
    }

    .project-card-body ul {
        margin-bottom: 1.25rem;
    }

    .job h3 span {
        margin-left: 0;
    }

    #contact form {
        border-radius: 1rem;
        padding: 1rem;
    }

    #contact form textarea {
        min-height: 8rem;
    }

    #contact form button {
        width: 100%;
        min-height: 48px;
    }
}
