/* N3XOE — Ika typography, full-width editorial */
@font-face {
    font-family: 'Ika';
    src: url('fonts/Ika-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Ika';
    src: url('fonts/Ika-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Ika';
    src: url('fonts/Ika-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --color-primary: #1a1a1a;
    --color-primary-soft: #2d2d2d;
    --color-text: #1a1a1a;
    --color-text-muted: #555;
    --color-bg: #fff;
    --color-bg-alt: #f8f8f8;
    --color-border: #e5e5e5;
    --font-heading: 'Ika', 'DM Sans', -apple-system, sans-serif;
    --font-body: 'Ika', 'DM Sans', -apple-system, sans-serif;
    --font-ui: 'Ika', 'DM Sans', -apple-system, sans-serif;
    --content-max: 720px;
    --spacing-unit: 1rem;
    --space-xs: 0.5rem;
    --space-sm: 1.25rem;
    --space-md: 2rem;
    --space-lg: 3.5rem;
    --space-xl: 5rem;
    --space-2xl: 7rem;
    --space-3xl: 10rem;
    --letter-tight: -0.02em;
    --letter-normal: 0;
    --letter-wide: 0.04em;
    --letter-wider: 0.08em;
    --letter-heading: 0.06em;
    --letter-label: 0.12em;
    --letter-label-wide: 0.22em;
    --letter-header: 0.14em;
    --line-tight: 1.15;
    --line-body: 1.7;
    --line-loose: 1.85;
    --transition: 0.25s ease;
}

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

html {
    scroll-behavior: smooth;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
    border: none;
}

a {
    color: var(--color-text);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-text-muted);
}

/* Full-width section wrapper */
.section-full {
    width: 100%;
}

.section-inner {
    width: 100%;
    padding-left: var(--space-md);
    padding-right: var(--space-md);
}

@media (min-width: 900px) {
    .section-inner {
        padding-left: var(--space-xl);
        padding-right: var(--space-xl);
    }
}

/* Navigation — minimal, full width (rh-ark style) */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    min-height: 3.75rem;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
}

.nav-container {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s ease;
}

.nav-container.nav-container--hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-100%);
}

@media (min-width: 900px) {
    .nav-container {
        padding-left: calc(var(--space-xl) + 1.25rem);
        padding-right: var(--space-xl);
    }
}

.nav-logo {
    display: flex;
    align-items: center;
    color: var(--color-text);
    background: none !important;
    padding: 0;
}

.nav-logo img {
    height: 5rem;
    width: auto;
    display: block;
    object-fit: contain;
    background: none !important;
    background-color: transparent !important;
    vertical-align: middle;
}

@media (min-width: 900px) {
    .nav-logo img {
        height: 6rem;
    }
}

.nav-logo:hover img {
    opacity: 0.85;
}

.nav-menu {
    display: flex;
    position: fixed;
    top: 0;
    right: 0;
    width:  min(320px, 85vw);
    height: 100vh;
    background: var(--color-bg);
    flex-direction: column;
    align-items: flex-end;
    padding: 5rem var(--space-xl) var(--space-xl);
    gap: 0;
    list-style: none;
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s, visibility 0.3s;
    z-index: 999;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08);
}

.nav-menu.active {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

.nav-link {
    display: block;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--color-border);
    width: 100%;
    text-align: right;
}

.nav-link:last-child {
    border-bottom: none;
}

.nav-link {
    font-family: var(--font-ui);
    font-size: 0.875rem;
    font-weight: 200;
    letter-spacing: var(--letter-header);
    text-transform: uppercase;
    color: var(--color-text);
}

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

.nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-xs);
    position: relative;
    z-index: 1000;
}

.nav-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--color-text);
    transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(5.5px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    transform: translateY(-5.5px) rotate(-45deg);
}

/* Buttons — understated */
.btn {
    display: inline-block;
    padding: 0.9rem 1.75rem;
    font-family: var(--font-ui);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: var(--letter-label);
    text-transform: uppercase;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-bg);
}

.btn-primary:hover {
    background: var(--color-primary-soft);
    color: var(--color-bg);
}

.btn-secondary {
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-text);
}

.btn-secondary:hover {
    background: var(--color-text);
    color: var(--color-bg);
}

/* Hero — full width, large type (rh-ark style) */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-3xl) var(--space-md);
    background: var(--color-bg);
    padding-top: 14rem;
}

@media (min-width: 900px) {
    .hero {
        padding-top: 18rem;
    }
}

.hero-content {
    width: 100%;
    padding: 0 var(--space-md);
}

@media (min-width: 900px) {
    .hero-content {
        padding: 0 var(--space-xl);
    }
}

.hero-label {
    font-family: var(--font-ui);
    font-size: 0.6875rem;
    font-weight: 200;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(1.875rem, 5.5vw, 3.25rem);
    font-weight: 200;
    line-height: 1.25;
    letter-spacing: var(--letter-header);
    text-transform: uppercase;
    color: var(--color-text);
    margin-bottom: var(--space-md);
    max-width: 22ch;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.5vw, 1.125rem);
    font-weight: 400;
    line-height: var(--line-loose);
    letter-spacing: var(--letter-normal);
    color: var(--color-text-muted);
    max-width: var(--content-max);
    margin-bottom: var(--space-xl);
}

.hero .btn {
    margin-top: var(--space-sm);
    font-weight: 300;
}

/* Section titles — editorial, thin rh-ark style */
.section-title {
    font-family: var(--font-ui);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 200;
    letter-spacing: var(--letter-header);
    line-height: var(--line-tight);
    color: var(--color-text);
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
}

.section-subtitle {
    font-size: 1rem;
    font-weight: 300;
    line-height: var(--line-loose);
    color: var(--color-text-muted);
    max-width: var(--content-max);
    margin-bottom: var(--space-lg);
}

/* Projects — full width, content to top when nav hidden (rh-ark style) */
.projects {
    padding: var(--space-xl) 0 var(--space-3xl);
    background: var(--color-bg);
}

.projects-intro {
    margin-bottom: var(--space-2xl);
}

.projects-category {
    font-family: var(--font-ui);
    font-size: 0.6875rem;
    font-weight: 200;
    letter-spacing: var(--letter-header);
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

@media (min-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-md);
    }
}

.project-card {
    background: var(--color-bg);
    overflow: hidden;
    transition: opacity var(--transition);
    display: flex;
    flex-direction: column;
    border: none;
    outline: none;
}

.project-card:focus,
.project-card:focus-within {
    outline: none;
}

.project-image-wrap:focus,
.project-image-wrap:focus-within {
    outline: none;
}

.project-card:hover {
    opacity: 0.92;
}

.project-image-wrap {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--color-bg-alt);
    border: none;
    border-radius: 0.5rem;
    overflow: hidden;
    outline: none;
    box-shadow: none;
}

.project-image {
    position: absolute;
    inset: 0;
    overflow: hidden;
    cursor: pointer;
    border: none;
    border-radius: 0.5rem;
    outline: none;
    box-shadow: none;
}

.project-image:focus,
.project-image:focus-visible {
    outline: none;
    box-shadow: none;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    border: none;
    border-radius: 0.5rem;
    outline: none;
    box-shadow: none;
}

.project-image img:focus,
.project-image img:focus-visible {
    outline: none;
    box-shadow: none;
}

.project-card:hover .project-image img {
    transform: scale(1.03);
}

.project-card-prev,
.project-card-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: var(--color-text);
    font-size: 1.25rem;
    cursor: pointer;
    transition: background var(--transition), opacity var(--transition);
    z-index: 2;
}

.project-card-prev { left: 0; }
.project-card-next { right: 0; }

.project-card-prev:hover,
.project-card-next:hover {
    background: #fff;
}

.project-card-dots {
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.35rem;
    z-index: 2;
}

.project-card-dots:empty {
    display: none;
}

.project-dot {
    width: 6px;
    height: 6px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background var(--transition);
}

.project-dot:hover,
.project-dot.active {
    background: #fff;
}

.project-content {
    padding: var(--space-md) 0;
}

.project-title {
    font-family: var(--font-ui);
    font-size: 1.25rem;
    font-weight: 200;
    letter-spacing: var(--letter-header);
    line-height: var(--line-tight);
    text-transform: uppercase;
    margin-bottom: var(--space-xs);
    color: var(--color-text);
}

.project-description {
    font-size: 1rem;
    font-weight: 300;
    line-height: var(--line-loose);
    color: var(--color-text-muted);
}

/* Software project — full width block */
.software-project {
    width: 100%;
    padding: var(--space-2xl) 0;
    border-top: 1px solid var(--color-border);
}

.software-project-header {
    margin-bottom: var(--space-xl);
}

/* Match projects-intro: section-title + section-subtitle style */
.software-project-info {
    position: relative;
    z-index: 1;
    margin-bottom: 0;
}

.software-project-info .project-title {
    font-family: var(--font-ui);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 200;
    letter-spacing: var(--letter-header);
    line-height: var(--line-tight);
    color: var(--color-text);
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
}

.software-project-info .project-description {
    font-size: 1rem;
    font-weight: 300;
    line-height: var(--line-loose);
    color: var(--color-text-muted);
    max-width: var(--content-max);
    margin-bottom: var(--space-lg);
}

.software-project-info .btn {
    font-weight: 300;
}

/* Gallery */
.gallery {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.gallery-main {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.gallery-main img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
}

.gallery-nav:hover {
    background: white;
}

.gallery-prev { left: var(--space-sm); }
.gallery-next { right: var(--space-sm); }

.gallery-thumbnails {
    display: flex;
    gap: var(--space-xs);
    overflow-x: auto;
    padding: var(--space-xs) 0;
    scrollbar-width: thin;
}

.gallery-thumb {
    flex-shrink: 0;
    width: 100px;
    height: 60px;
    border: 2px solid transparent;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    background: none;
    transition: border-color var(--transition), opacity var(--transition);
    opacity: 0.7;
}

.gallery-thumb:hover { opacity: 1; }
.gallery-thumb.active {
    border-color: var(--color-text);
    opacity: 1;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* About — full width, two-column on large */
.about {
    padding: var(--space-3xl) 0;
    background: var(--color-bg-alt);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
    align-items: start;
}

@media (min-width: 900px) {
    .about-content {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-3xl);
    }
}

.about-text {
    max-width: var(--content-max);
}

.about-text .section-title {
    margin-bottom: var(--space-sm);
}

.about-text p {
    font-size: 1rem;
    font-weight: 300;
    line-height: var(--line-loose);
    color: var(--color-text-muted);
    max-width: var(--content-max);
    margin-bottom: var(--space-lg);
}

.about-text p:last-of-type {
    margin-bottom: 0;
}

.founder {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-lg);
    align-items: flex-start;
}

.founder-photo {
    flex-shrink: 0;
    width: 160px;
}

.founder-photo img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    object-position: center 40%;
    border-radius: 50%;
}

.founder-info {
    flex: 1;
    min-width: 0;
}

.founder-name {
    font-family: var(--font-ui);
    font-size: 1.125rem;
    font-weight: 200;
    letter-spacing: var(--letter-header);
    text-transform: uppercase;
    color: var(--color-text);
    margin-bottom: var(--space-xs);
}

.founder-role {
    font-size: 1rem;
    font-weight: 300;
    color: var(--color-text-muted);
    line-height: var(--line-loose);
    margin-bottom: var(--space-sm);
}

.founder-bio {
    font-size: 1rem;
    font-weight: 300;
    line-height: var(--line-loose);
    color: var(--color-text-muted);
    margin-bottom: var(--space-sm);
}

.founder-links a {
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: var(--letter-wide);
}

.about-highlights {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.highlight {
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--color-border);
}

.highlight:last-child {
    border-bottom: none;
}

.highlight-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    color: var(--color-text);
    margin-bottom: var(--space-sm);
}

.highlight h4 {
    font-family: var(--font-ui);
    font-size: 0.8125rem;
    font-weight: 200;
    letter-spacing: var(--letter-header);
    text-transform: uppercase;
    margin-bottom: var(--space-xs);
    color: var(--color-text);
}

.highlight p {
    font-size: 1rem;
    font-weight: 300;
    line-height: var(--line-loose);
    color: var(--color-text-muted);
}

/* Contact — full width, minimal */
.contact {
    padding: var(--space-3xl) 0;
    background: var(--color-bg);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
}

@media (min-width: 769px) {
    .contact-content {
        grid-template-columns: 1fr auto;
        align-items: start;
    }
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.form-group label {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: var(--letter-label);
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.form-group input,
.form-group textarea {
    padding: 0.75rem 0;
    font-family: var(--font-body);
    font-size: 1rem;
    border: none;
    border-bottom: 1px solid var(--color-border);
    background: transparent;
    transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-bottom-color: var(--color-text);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1rem;
    font-weight: 300;
    color: var(--color-text);
}

.contact-item svg {
    flex-shrink: 0;
    color: var(--color-text-muted);
}

.contact-item a {
    color: var(--color-text);
}

.contact-item a:hover {
    color: var(--color-text-muted);
}

/* Footer — minimal, full width, logo + legal (rh-ark style) */
.footer {
    padding: var(--space-xl) 0;
    border-top: 1px solid var(--color-border);
    background: var(--color-bg);
}

.footer-inner {
    width: 100%;
    padding: 0 var(--space-md);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-md);
}

@media (min-width: 900px) {
    .footer-inner {
        padding: 0 var(--space-xl);
        gap: var(--space-lg);
    }
}

.footer-logo {
    display: block;
    flex-shrink: 0;
    background: none !important;
}

.footer-logo img {
    height: 3.5rem;
    width: auto;
    display: block;
    object-fit: contain;
    opacity: 0.9;
    background: none !important;
    background-color: transparent !important;
    vertical-align: middle;
}

.footer-logo:hover img {
    opacity: 1;
}

.footer-legal {
    font-size: 0.8125rem;
    letter-spacing: var(--letter-wide);
    color: var(--color-text-muted);
    margin: 0;
}

.footer-inner > p {
    font-size: 0.8125rem;
    letter-spacing: var(--letter-wide);
    color: var(--color-text-muted);
    margin: 0;
}

/* Container helper for sections that still use .container */
.container {
    width: 100%;
    padding-left: var(--space-md);
    padding-right: var(--space-md);
}

@media (min-width: 900px) {
    .container {
        padding-left: var(--space-xl);
        padding-right: var(--space-xl);
    }
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox.lightbox-single .lightbox-prev,
.lightbox.lightbox-single .lightbox-next {
    display: none;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: var(--space-xs);
    transition: opacity var(--transition);
}

.lightbox-close:hover {
    opacity: 0.7;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 56px;
    height: 56px;
    font-size: 1.75rem;
    cursor: pointer;
    transition: background var(--transition);
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev { left: var(--space-md); }
.lightbox-next { right: var(--space-md); }

/* Mobile */
@media (max-width: 768px) {
    .nav-container {
        height: auto;
        min-height: 3.5rem;
    }

    .software-project {
        padding: var(--space-lg) 0;
    }

    .gallery-thumb {
        width: 80px;
        height: 48px;
    }

    .lightbox-nav {
        width: 44px;
        height: 44px;
        font-size: 1.5rem;
    }
}
