:root {
    --font-base: "Manrope", "Inter", "Satoshi", Arial, sans-serif;
    --font-heading: "Manrope", "Inter", "Satoshi", Arial, sans-serif;
    --bg: #f6f5ef;
    --bg-alt: #f0efe7;
    --surface: #ffffff;
    --text: #161513;
    --text-muted: #3d3c38;
    --accent: #000000;
    --outline: #000000;
    --shadow-sm: 4px 6px 0 rgba(0, 0, 0, 0.9);
    --shadow-md: 6px 8px 0 rgba(0, 0, 0, 0.9);
    --shadow-lg: 10px 14px 0 rgba(0, 0, 0, 0.9);
    --radius-pill: 999px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --spacing-section: clamp(4rem, 6vw, 6rem);
    --transition: 0.18s cubic-bezier(0.4, 1.2, 0.6, 1);
    --content-max-width: 1200px;
    --page-gutter: clamp(1.25rem, 5vw, 3.25rem);
    --nav-control-size: 3.1rem;
    --nav-menu-shadow: 0 18px 0 rgba(0, 0, 0, 0.12);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-base);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

main > section + section {
    margin-top: var(--spacing-section);
}

.nav-container,
.hero-container,
.container,
.footer-container {
    max-width: var(--content-max-width);
    margin-inline: auto;
    padding-inline: var(--page-gutter);
}

img,
video {
    display: block;
    max-width: 100%;
    border-radius: var(--radius-md);
}

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

ul,
ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

@keyframes navMenuFadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes navMenuFadeOut {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

@keyframes navMenuItemIn {
    0% {
        transform: translateX(1.5rem);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes navMenuItemOut {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(1rem);
        opacity: 0;
    }
}

@keyframes navMenuActionsIn {
    0% {
        transform: translate(-50%, 1.5rem);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

@keyframes navMenuActionsOut {
    0% {
        transform: translate(-50%, 0);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, 1.25rem);
        opacity: 0;
    }
}

h4 {
    font-family: var(--font-heading);
    color: var(--text);
    font-weight: 900;
    letter-spacing: -0.01em;
}

h1 {
    font-size: clamp(2.8rem, 6vw, 4rem);
    line-height: 1.05;
}
h2 {
    font-size: clamp(2.2rem, 4vw, 3rem);
    margin-bottom: 1.5rem;
}

h3 {
    font-size: clamp(1.5rem, 2.8vw, 2rem);
    margin-bottom: 1rem;
}

p {
    font-size: 1.05rem;
    color: var(--text-muted);
}

.btn,
.nav-logo,
.nav-link,
.skill-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    border: 3px solid var(--outline);
    border-radius: var(--radius-pill);
    background: var(--surface);
    color: var(--text);
    padding: 0.75rem 1.6rem;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
    cursor: pointer;
    user-select: none;
    -webkit-user-drag: none;
    touch-action: manipulation;
    -webkit-user-select: none;
    -moz-user-select: none;
    text-align: center;
}

.btn:hover,
.btn:focus-visible,
.nav-link:hover,
.nav-link:focus-visible {
    transform: translate(-4px, -4px);
    box-shadow: 8px 10px 0 rgba(0, 0, 0, 0.9);
}


.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover,
.btn-primary:focus-visible {
    background: #ffffff;
    color: var(--text);
}

.skill-chip:hover,
.skill-chip:focus-visible {
    transform: translate(-3px, -3px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: var(--surface);
}

.btn-link {
    border: none;
    background: transparent;
    box-shadow: none;
    padding: 0;
    text-decoration: underline 3px;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--bg);
    border-bottom: 3px solid var(--outline);
    box-shadow: 0 8px 0 rgba(0, 0, 0, 0.12);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding-block: 1.1rem;
    flex-wrap: nowrap;
}

.nav-logo {
    font-size: 1rem;
    letter-spacing: 0.1em;
    text-transform: lowercase;
    padding: 0.6rem 1.2rem;
    white-space: nowrap;
}

.skelly-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
        border: 3px solid var(--outline);
        object-fit: contain;
        object-position: center;
        background: transparent;
        padding: 0;
        flex-shrink: 0;
        transform: none;
        margin: 0;
        box-sizing: border-box;
}

.icon {
    width: 1.08rem;
    height: 1.08rem;
    flex: none;
    display: block;
}

.social-link .icon,
.project-links .icon,
.project-link-button .icon,
.footer-social .icon {
    width: 1.25rem;
    height: 1.25rem;
}

.icon-badge .icon {
    width: calc(100% - 10px);
    height: calc(100% - 10px);
}

.nav-menu {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: nowrap;
}

.nav-menu.active {
    display: flex;
}

.nav-link {
    padding: 0.6rem 1.3rem;
    font-size: 0.95rem;
    white-space: nowrap;
}

.nav-actions {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}

.nav-actions .btn {
    white-space: nowrap;
}

.hamburger {
    display: none;
    position: relative;
    width: var(--nav-control-size);
    height: var(--nav-control-size);
    min-width: var(--nav-control-size);
    min-height: var(--nav-control-size);
    border: 3px solid var(--outline);
    background: var(--surface);
    padding: 0;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.4rem;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
    flex-shrink: 0;
}


.hamburger.active {
    transform: translate(-2px, -2px);
    box-shadow: 6px 8px 0 rgba(0, 0, 0, 0.9);
}

.hamburger.active:hover {
    transform: translate(-2px, -2px);
}

.hamburger .bar {
    display: block;
    width: 1.4rem;
    height: 2px;
    background: var(--outline);
    border-radius: 999px;
    transition: transform 0.32s cubic-bezier(0.2, 0.9, 0.3, 1), opacity 0.22s ease;
    transform-origin: center;
    will-change: transform, opacity;
}

.hamburger .bar:nth-child(2) {
    transition: transform 0.26s cubic-bezier(0.2, 0.9, 0.3, 1), opacity 0.18s ease;
}

.hamburger.active .bar:nth-child(1) {
    transform: translateX(-3px);
}

.hamburger.active .bar:nth-child(2) {
    transform: translateX(0);
}

.hamburger.active .bar:nth-child(3) {
    transform: translateX(3px);
}

.hamburger:focus-visible {
    outline: 3px solid rgba(0, 0, 0, 0.12);
    box-shadow: var(--shadow-sm);
}

@media (prefers-reduced-motion: reduce) {
    .hamburger .bar,
    .hamburger .bar + .bar {
        transition: none !important;
    }

    .nav-menu.active,
    .nav-menu.closing,
    .nav-menu.active .nav-link,
    .nav-menu.closing .nav-link,
    .nav-menu.active ~ .nav-actions,
    .nav-menu.closing ~ .nav-actions {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

.hero {
    padding-top: clamp(4rem, 6vw, 6rem);
}

.hero-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(2.5rem, 5vw, 4rem);
    align-items: stretch;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.4rem;
    height: 100%;
}

.hero-intro {
    font-size: 1.2rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.hero-title {
    margin-bottom: 1.5rem;
    font-family: "pacifico";
}

.hero-description {
    margin-bottom: 1.8rem;
    max-width: 42ch;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.8rem;
}

.hero-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 2.2rem;
    font-weight: 700;
}

.hero-highlights li {
    padding: 0.65rem 1.2rem;
    border: 3px solid var(--outline);
    border-radius: var(--radius-pill);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.hero-highlights span {
    display: inline-block;
    margin-right: 0.5rem;
    font-weight: 900;
    color: var(--text);
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-weight: 700;
    margin-top: auto;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}



.hero-media {
    display: grid;
    position: relative;
    gap: 1.1rem;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    align-self: start;
    align-content: start;
    --hero-scale-factor-width: 1;
    --hero-scale-factor-aspect: 1;
    --hero-scale-factor: calc(var(--hero-scale-factor-width) * var(--hero-scale-factor-aspect));
}

@media (min-width: 1600px) {
    .hero-media {
        --hero-scale-factor-width: 0.95;
    }
}

@media (min-width: 1900px) {
    .hero-media {
        --hero-scale-factor-width: 0.9;
    }
}

.hero-project-card {
    --hero-offset-x: 0rem;
    --hero-offset-y: 0rem;
    --hero-offset-y-adjust: 0rem;
    --hero-scale: 1.55;
    --hero-scale-effective: calc(var(--hero-scale) * var(--hero-scale-factor, 1));
    --hero-z-index: 1;
    display: grid;
    gap: 0.7rem;
    padding: 0.9rem;
    border-radius: var(--radius-md);
    border: 3px solid var(--outline);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    align-content: start;
    position: relative;
    z-index: var(--hero-z-index, 1);
    transform: translate(var(--hero-offset-x), calc(var(--hero-offset-y) + var(--hero-offset-y-adjust))) scale(var(--hero-scale-effective));
}

.hero-project-card:hover {
    box-shadow: 8px 10px 0 rgba(0, 0, 0, 0.9);
    border-color: var(--accent);
    transform: translate(
        calc(var(--hero-offset-x) - 4px),
        calc(var(--hero-offset-y) + var(--hero-offset-y-adjust) - 4px)
    ) scale(var(--hero-scale-effective));
}

.hero-project-card:focus-visible {
    box-shadow: 8px 10px 0 rgba(0, 0, 0, 0.9);
    border-color: var(--accent);
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    transform: translate(
        calc(var(--hero-offset-x) - 2px),
        calc(var(--hero-offset-y) + var(--hero-offset-y-adjust) - 2px)
    ) scale(var(--hero-scale-effective));
}

.hero-project-card[data-hero-size="large"] {
    --hero-scale: 1.7;
}

.hero-project-card[data-hero-size="small"] {
    --hero-scale: 1.35;
}

.hero-project-card[data-hero-size="xlarge"] {
    --hero-scale: 1.85;
}

.hero-project-cover {
    position: relative;
    aspect-ratio: 3 / 2;
    border-radius: var(--radius-sm);
    border: 2px solid var(--outline);
    overflow: hidden;
    background: var(--bg-alt);
    display: grid;
    place-items: center;
}

.hero-project-cover img,
.hero-project-cover video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.18);
    overflow: hidden;
}

.hero-project-cover video {
    display: block;
}

.hero-project-cover--placeholder span {
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text);
}

.hero-project-body {
    display: grid;
    gap: 0.45rem;
}

.hero-project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
}

.hero-project-title {
    font-size: 1.08rem;
    line-height: 1.2;
}

.hero-project-description {
    display: none;
}

@media (max-width: 1360px) {
    .hero-media {
        --hero-scale-factor-width: 0.95;
    }

    .hero-project-card[data-hero-size="small"] {
        --hero-offset-y-adjust: 1.2rem;
    }
}

@media (max-width: 1240px) {
    .hero-media {
        --hero-scale-factor-width: 0.92;
    }
}

@media (max-width: 1120px) {
    .hero-media {
        --hero-scale-factor-width: 0.88;
    }
}

@media (max-width: 1024px) {
    .hero-media {
        --hero-scale-factor-width: 0.85;
    }
}

@media (max-width: 940px) {
    .hero-media {
        --hero-scale-factor-width: 0.82;
    }
}

@media (max-width: 820px) {
    .hero-media {
        --hero-scale-factor-width: 0.8;
    }
}

@media (max-width: 640px) {
    .hero-media {
        --hero-scale-factor-width: 0.9;
    }
}

@media (max-width: 520px) {
    .hero-media {
        --hero-scale-factor-width: 0.96;
    }
}

@media (max-aspect-ratio: 5/4) {
    .hero-media {
        --hero-scale-factor-aspect: 0.88;
    }
}

@media (max-aspect-ratio: 11/10) {
    .hero-media {
        --hero-scale-factor-aspect: 0.84;
    }
}

@media (max-height: 880px) and (min-width: 900px) {
    .hero-media {
        --hero-scale-factor-aspect: 0.82;
    }
}

.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(2rem, 4vw, 3.5rem);
    align-items: start;
}

.about-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.6rem;
}

.about-cards {
    display: grid;
    gap: 1.5rem;
}

.about-card {
    background: var(--surface);
    border: 3px solid var(--outline);
    border-radius: var(--radius-md);
    padding: 1.6rem;
    box-shadow: var(--shadow-md);
}

.about-card ul {
    display: grid;
    gap: 0.6rem;
    color: var(--text-muted);
}

.section-header {
    margin-bottom: 2.5rem;
}


.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1.6rem, 4vw, 2.4rem);
    justify-content: center;
}

.projects-grid.is-collapsed:not(.is-expanded) .project-card:nth-child(n+4) {
    display: none;
}

.projects-grid.is-collapsed.is-expanded .project-card {
    display: flex;
}

.projects-toggle {
    margin-top: 1.5rem;
    width: 100%;
    display: inline-flex;
    justify-content: center;
}

@media (min-width: 769px) {
    .projects-grid.is-collapsed:not(.is-expanded) .project-card:nth-child(n+4) {
        display: flex;
    }

    .projects-toggle {
        display: none;
    }
}

.project-card {
    background: var(--surface);
    border: 3px solid var(--outline);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition), box-shadow var(--transition);
    height: 100%;
}

.project-card:hover {
    transform: translate(-4px, -4px);
    box-shadow: var(--shadow-lg);
}


.project-cover--media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    padding: 0;
    overflow: hidden;
}

.project-cover--media img,
.project-cover--media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0 !important;
}

.project-cover:not(.project-cover--logo) > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 0 !important;
    margin: 0;
}

.project-cover-toggle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.88);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.3rem;
    height: 3.3rem;
    border: 3px solid var(--outline);
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: none;
    color: var(--text);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.45s ease 0.2s, transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.project-cover-toggle-icon {
    width: 1.55rem;
    height: 1.55rem;
}

.project-cover--media:hover .project-cover-toggle,
.project-cover--media:focus-within .project-cover-toggle,
.project-cover--media.is-paused .project-cover-toggle,
.project-cover--media.has-touch-toggle .project-cover-toggle {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
    box-shadow: none;
    transition: opacity 0.18s ease-out 0s, transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.project-cover-toggle:hover,
.project-cover-toggle:focus-visible {
    background: rgba(255, 255, 255, 1);
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: none;
}


.project-cover--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    padding: 0;
    text-align: center;
    background-image: none !important;
    border-top-left-radius: calc(var(--radius-md) - 3px);
    border-top-right-radius: calc(var(--radius-md) - 3px);
}

.project-cover--placeholder span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text);
}

.project-cover--contain {
    background-size: contain;
    background-repeat: no-repeat;
    background-color: var(--surface);
}

.project-cover {
    aspect-ratio: 4 / 3;
    width: 100%;
    background: var(--bg-alt);
    background-size: cover;
    background-position: center;
    border-bottom: 3px solid var(--outline);
    overflow: hidden;
    border-top-left-radius: calc(var(--radius-md) - 3px);
    border-top-right-radius: calc(var(--radius-md) - 3px);
}

.project-cover.project-cover-dark[style*="khromapen.png"] {
    background-size: contain !important;
    background-repeat: no-repeat;
    background-position: center center !important;
    background-color: var(--bg);
}

.project-cover--logo {
    display: grid;
    place-items: center;
    background: var(--surface);
    background-image: none !important;
    padding: 1.5rem;
}

.project-logo-lockup {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    text-align: center;
}

.project-logo-image {
    width: min(520px, 90%);
    height: auto;
    object-fit: cover;
}

.project-content {
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: var(--text-muted);
}

.project-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    order: 2;
    margin-top: auto;
}

.project-stack:empty {
    display: none;
}

.project-stack li {
    padding: 0.45rem 1rem;
    border-radius: var(--radius-pill);
    border: 2px solid var(--outline);
    background: var(--bg-alt);
    font-size: 0.85rem;
    font-weight: 700;
}
.project-stack li.project-stack-link-item {
    padding: 0;
    border: none;
    background: none;
}

.project-stack .project-stack-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.45rem 1rem;
    border-radius: var(--radius-pill);
    border: 2px solid var(--outline);
    background: var(--bg-alt);
    font-size: 0.85rem;
    font-weight: 700;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: color var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.project-stack .project-stack-chip:hover,
.project-stack .project-stack-chip:focus-visible {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-2px);
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    font-weight: 700;
    order: 1;
}

.project-content > .project-stack:last-child {
    margin-top: auto;
}

.project-content > .project-links:last-child {
    margin-top: auto;
}

.project-links a,
.project-link-button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: none;
    background: none;
    font: inherit;
    cursor: pointer;
    text-decoration: underline 2px;
}

.projects + .showcase {
    margin-top: clamp(2rem, 5vw, 3rem);
}

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.showcase-card {
    background: var(--surface);
    border: 3px solid var(--outline);
    border-radius: var(--radius-md);
    padding: 1.6rem;
    box-shadow: var(--shadow-md);
}

.software {
    padding-block: clamp(4.5rem, 7vw, 6.5rem);
}

.software-head {
    display: grid;
    gap: 1.2rem;
    max-width: 720px;
    justify-items: start;
}

.software-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 0.4rem;
}

.software-tags li {
    list-style: none;
}

.software-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1.6rem, 4vw, 2.4rem);
    margin-top: clamp(2.5rem, 5vw, 4rem);
    justify-content: center;
}
.software-cta-card {
    background: var(--surface);
    border: 3px solid var(--outline);
    border-radius: var(--radius-lg);
    padding: clamp(2rem, 5vw, 3rem);
    display: grid;
    gap: 1rem;
    box-shadow: var(--shadow-lg);
    text-align: center;
    max-width: 720px;
    margin: clamp(3rem, 6vw, 4.5rem) auto 0;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: none;
    border-radius: var(--radius-pill);
    padding: 0.6rem 1.3rem;
    font-weight: 700;
    background: var(--surface);
    box-shadow: none;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform var(--transition);
    position: relative;
    z-index: 0;
}

.skill-chip::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 3px solid var(--outline);
    border-radius: inherit;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition);
    z-index: -1;
}


.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2.5rem, 5vw, 4rem);
    align-items: start;
}

.contact-details {
    display: grid;
    gap: 0.9rem;
    margin-top: 1.5rem;
}

.contact-details li {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    font-weight: 700;
    min-height: 46px;
}

.contact-details a,
.contact-details li > span:not(.icon-badge) {
    display: inline-block;
    line-height: 1.15;
}

.icon-badge {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-pill);
    border: 3px solid var(--outline);
    background: var(--surface);
    display: grid;
    place-items: center;
    box-shadow: var(--shadow-sm);
}

.contact-form {
    background: var(--surface);
    border: 3px solid var(--outline);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    display: grid;
    gap: 1.2rem;
}

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

.form-group {
    display: grid;
    gap: 0.5rem;
}

label {
    font-weight: 700;
}

input,
textarea {
    border: 3px solid var(--outline);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    font: inherit;
    background: var(--bg);
    transition: transform var(--transition), box-shadow var(--transition);
}

input:focus,
textarea:focus {
    outline: none;
    transform: translate(-3px, -3px);
    box-shadow: var(--shadow-sm);
}

textarea {
    resize: vertical;
}

.form-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.form-feedback {
    font-size: 0.9rem;
    font-weight: 700;
}

.footer {
    border-top: 3px solid var(--outline);
    margin-top: var(--spacing-section);
    padding: 2.5rem 0 2rem;
    background: var(--bg);
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    align-items: start;
}

.footer-title {
    font-size: 1.8rem;
}

.footer-links,
.footer-social {
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
    font-weight: 700;
}

.footer-social a {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid var(--outline);
    display: grid;
    place-items: center;
    background: var(--surface);
    padding: 4px;
}

.footer-copy {
    margin-top: 1.8rem;
    text-align: center;
    font-weight: 700;
    color: var(--text-muted);
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    display: grid;
    place-items: center;
}

.modal[hidden] {
    display: none;
}

.modal-content {
    width: min(960px, 92vw);
    background: var(--surface);
    border: 3px solid var(--outline);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    border: 3px solid var(--outline);
    background: var(--surface);
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 0;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    color: var(--text);
    position: relative;
}

.modal-close::before,
.modal-close::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 2.5px;
    background: currentColor;
}

.modal-close::before {
    transform: rotate(45deg);
}

.modal-close::after {
    transform: rotate(-45deg);
}

.model-stage {
    border: 3px solid var(--outline);
    border-radius: var(--radius-md);
    padding: 1rem;
    background: var(--bg-alt);
}

@media (max-width: 1120px) {
    .nav-menu {
        display: none;
    }

    .nav-menu.active {
        display: grid;
        position: fixed;
        top: 72px;
        right: 0;
        left: 0;
        padding: 2rem 1.5rem 6rem;
        gap: 1.2rem;
        background-color: rgba(246, 245, 239, 0.6);
        border-top: 3px solid rgba(22, 21, 19, 0.6);
        border-bottom: 3px solid rgba(22, 21, 19, 0.6);
        box-shadow: var(--nav-menu-shadow);
        z-index: 15;
        text-align: center;
        justify-items: center;
        max-height: calc(100vh - 72px);
        overflow-y: auto;
        opacity: 0;
        pointer-events: none;
        animation: navMenuFadeIn 0.35s ease forwards;
    }

    .nav-menu.active:not(.closing) {
        pointer-events: auto;
    }

    .nav-menu.closing {
        pointer-events: none;
        animation: navMenuFadeOut 0.25s ease forwards;
    }

    .nav-menu .nav-link {
        width: min(260px, 80vw);
        justify-content: center;
    }

    .nav-menu.active:not(.closing) .nav-link {
        opacity: 0;
        transform: translateX(1.25rem);
        animation: navMenuItemIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    }

    .nav-menu.active:not(.closing) li:nth-child(1) .nav-link { animation-delay: 0.08s; }
    .nav-menu.active:not(.closing) li:nth-child(2) .nav-link { animation-delay: 0.12s; }
    .nav-menu.active:not(.closing) li:nth-child(3) .nav-link { animation-delay: 0.16s; }
    .nav-menu.active:not(.closing) li:nth-child(4) .nav-link { animation-delay: 0.2s; }
    .nav-menu.active:not(.closing) li:nth-child(5) .nav-link { animation-delay: 0.24s; }
    .nav-menu.active:not(.closing) li:nth-child(6) .nav-link { animation-delay: 0.28s; }

    .nav-menu.closing .nav-link {
        animation: navMenuItemOut 0.3s cubic-bezier(0.4, 0, 0.6, 1) forwards;
        animation-delay: 0s !important;
    }

    .nav-actions {
        display: none;
    }

    .nav-menu.active:not(.closing) ~ .nav-actions,
    .nav-menu.closing ~ .nav-actions {
        display: flex;
        position: fixed;
        bottom: 2rem;
        left: 50%;
        transform: translate(-50%, 0);
        z-index: 16;
    }

    .nav-menu.active:not(.closing) ~ .nav-actions {
        opacity: 0;
        animation: navMenuActionsIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards 0.2s;
        pointer-events: auto;
    }

    .nav-menu.closing ~ .nav-actions {
        pointer-events: none;
        animation: navMenuActionsOut 0.3s cubic-bezier(0.4, 0, 0.6, 1) forwards;
    }

    .nav-menu.active ~ .nav-actions .btn,
    .nav-menu.closing ~ .nav-actions .btn {
        width: min(240px, 80vw);
        justify-content: center;
    }

    .hamburger {
        display: inline-flex;
    }

    .hamburger .bar {
        width: 1.35rem;
    }
}

@media (max-width: 1024px) {
    .hero-container,
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .hero-content {
        align-items: center;
        text-align: center;
        height: auto;
        gap: 1.6rem;
    }

    .software-head {
        text-align: center;
        justify-items: center;
    }

    .hero-description {
        margin-inline: auto;
    }

    .hero-buttons,
    .hero-highlights,
    .social-links,
    .software-actions,
    .software-tags {
        justify-content: center;
    }

    .social-links {
        margin-top: 0;
    }

    .software-cta-card {
        text-align: center;
    }

    .hero-media {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .hero-media[data-count] {
        display: none;
    }

    .hero-project-card {
        width: min(360px, 100%);
        transform: scale(var(--hero-scale-effective));
    }

    .hero-project-card:hover {
        transform: translate(-4px, -4px) scale(var(--hero-scale-effective));
    }

    .hero-project-card:focus-visible {
        transform: translate(-2px, -2px) scale(var(--hero-scale-effective));
    }
}

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

@media (max-width: 720px) {
    .projects-grid,
    .software-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 980px) {
    .hero-buttons,
    .about-actions,
    .hero-highlights,
    .form-footer,
    .social-links,
    .skills-grid {
        justify-content: center;
    }

    .hero {
        padding-top: clamp(3.5rem, 8vw, 5rem);
        text-align: center;
    }

    .hero-content {
        align-items: center;
    }

    .hero-highlights li {
        width: 100%;
        text-align: center;
    }

    .footer-container {
        text-align: center;
        justify-items: center;
    }

    .contact-details {
        justify-items: left;
        text-align: center;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .project-card,
    .project-card:hover {
        transform: none !important;
        box-shadow: var(--shadow-md);
    }

    .project-card {
        max-width: 360px;
        margin-inline: auto;
        width: 100%;
    }
}