/* Site-wide styles: static, square-edged, no animation. */

:root {
    /* Palette */
    --bg: #110f0b;
    --text: #e7e6e4;
    --primary: #d4ba95;
    --secondary: #8f6122;
    --accent: #eaa547;

    /* Derived shades */
    --surface: #242019;   /* primary mixed into the background */
    --muted: #a3a19f;     /* text, toned down */
    --border: var(--secondary);
    --on-primary: var(--bg);
    --on-accent: var(--bg);

    /* Layout: content is centred, at most --max wide including its side margins */
    --max: 1600px;
    --gutter: clamp(20px, 5vw, 80px);
    --content-width: min(100% - 2 * var(--gutter), var(--max) - 2 * var(--gutter));

    /* Corner rounding, applied everywhere boxes have edges */
    --radius: 5px;
}

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

/* Hide scrollbars everywhere (page, modal, code blocks, anything else that
   scrolls). Content stays scrollable by wheel, trackpad, touch, drag and
   keyboard — only the visible scrollbar track/thumb is removed. */
* {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* older Edge/IE */
}

*::-webkit-scrollbar {
    display: none; /* Chrome, Safari, newer Edge */
    width: 0;
    height: 0;
}

body {
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.65;
    background: var(--bg);
    color: var(--text);
}

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

a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

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

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

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

/* The nav is injected into #navbar, so the wrapper is what sticks. */
#navbar {
    position: sticky;
    top: 0;
    z-index: 100;
}

#navbar header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.navbar {
    width: var(--content-width);
    margin: 0 auto;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-logo {
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
}

.navbar-menu {
    display: flex;
    gap: 4px;
    list-style: none;
}

.navbar-menu a {
    display: block;
    padding: 8px 14px;
    color: var(--text);
    font-weight: 500;
    text-decoration: none;
}

.navbar-menu a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.hamburger {
    display: none;
    width: 44px;
    height: 44px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
}

/* ---------- Layout ---------- */

.page-header,
.section {
    width: var(--content-width);
    margin: 0 auto;
}

.section {
    padding-top: 56px;
    padding-bottom: 56px;
    border-top: 1px solid var(--border);
}

.section h2,
.project-section h2 {
    margin-bottom: 28px;
    padding-left: 14px;
    border-left: 4px solid var(--primary);
    font-size: 1.6rem;
    line-height: 1.2;
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.btn-icon {
    width: 1.15em;
    height: 1.15em;
    flex-shrink: 0;
}

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

.btn-primary:hover {
    background: var(--text);
    border-color: var(--text);
    color: var(--on-primary);
}

.btn-secondary {
    background: none;
    border-color: var(--secondary);
    color: var(--text);
}

.btn-secondary:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent);
}

/* A small "go back" button, placed above a page or project title */
.back-link {
    margin-bottom: 16px;
    padding: 8px 18px;
    font-size: .95rem;
}

/* ---------- Home: intro ---------- */

/* Full-width video band under the nav, same pattern as #navbar/.navbar:
   the outer section runs edge to edge, the inner column stays centred. */
.intro-hero {
    position: relative;
    overflow: hidden;
}

.intro-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.intro-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--bg);
    opacity: .55;
    z-index: 1;
}

.intro {
    position: relative;
    z-index: 2;
    width: var(--content-width);
    margin: 0 auto;
    padding-top: 72px;
    padding-bottom: 56px;
}

.intro h1 {
    font-size: clamp(2.2rem, 5vw, 3.25rem);
    line-height: 1.1;
    margin-bottom: 8px;
}

.intro .role {
    margin-bottom: 20px;
    color: var(--primary);
    font-size: 1.2rem;
    font-weight: 600;
}

.intro .summary {
    max-width: 68ch;
    margin-bottom: 28px;
    font-size: 1.1rem;
}

.intro-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* ---------- Home: skills ---------- */

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

.skill-group {
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.skill-group h3 {
    margin-bottom: 16px;
    color: var(--primary);
    font-size: 1.1rem;
}

.skill-group ul {
    list-style: none;
}

.skill-group li + li {
    margin-top: 14px;
}

.skill-group strong {
    display: block;
}

.skill-group span {
    color: var(--muted);
    font-size: .95rem;
}

/* ---------- Home: education and accolades ---------- */

.entry-list .entry {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    padding: 20px 0;
}

.entry-list .entry + .entry {
    border-top: 1px solid var(--border);
}

.entry-list .entry:first-child {
    padding-top: 0;
}

.entry-date {
    color: var(--muted);
    font-weight: 500;
}

.entry h3 {
    font-size: 1.1rem;
}

.entry p {
    color: var(--muted);
}

/* ---------- Project cards (home + projects page) ---------- */

.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.work-grid.featured {
    grid-template-columns: repeat(3, 1fr);
}

.work-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    color: var(--text);
    text-decoration: none;
}

.work-card:hover {
    border-color: var(--accent);
    color: var(--text);
}

.work-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-bottom: 1px solid var(--border);
}

.work-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
    padding: 20px;
}

.work-body h3 {
    font-size: 1.2rem;
    line-height: 1.3;
}

.work-meta {
    color: var(--primary);
    font-size: .9rem;
    font-weight: 600;
}

.work-body p {
    color: var(--muted);
}

.work-body .work-tags {
    margin-top: auto;
    padding-top: 8px;
    font-size: .875rem;
}

.work-link {
    font-weight: 600;
    color: var(--accent);
}

.more-link {
    margin-top: 28px;
}

/* ---------- Page headers (projects, contact) ---------- */

.page-header {
    padding-top: 56px;
    padding-bottom: 32px;
}

.page-header h1 {
    margin-bottom: 8px;
    font-size: 2.4rem;
    line-height: 1.15;
}

.page-header p {
    max-width: 65ch;
    color: var(--muted);
    font-size: 1.1rem;
}

.page-body {
    width: var(--content-width);
    margin: 0 auto;
    padding: 24px 0 56px;
}

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

/* Narrower and centred, rather than pinned to the left of the full-width page */
.contact-header,
.contact-body {
    max-width: 640px;
}

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

.contact-header p {
    margin-left: auto;
    margin-right: auto;
}

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

.contact-form label {
    margin: 16px 0 6px;
    font-weight: 600;
}

.contact-form label:first-child {
    margin-top: 0;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font: inherit;
}

.contact-form textarea {
    margin-top: 16px;
    resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--accent);
}

.contact-form button {
    align-self: flex-start;
    margin-top: 20px;
    background: var(--primary);
    color: var(--on-primary);
}

.contact-form button:hover {
    background: var(--text);
    border-color: var(--text);
}

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

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

.footer-content {
    width: var(--content-width);
    margin: 0 auto;
}

footer h2 {
    font-size: 1.1rem;
}

footer p {
    color: var(--muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin: 16px 0;
}

.footer-message,
.footer-copyright {
    font-size: .9rem;
}

.footer-copyright {
    margin-top: 8px;
}

/* ---------- Small screens ---------- */

@media (max-width: 1000px) {
    .work-grid.featured {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 800px) {
    .skills-grid {
        grid-template-columns: 1fr;
    }

    .entry-list .entry {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

@media (max-width: 700px) {
    .hamburger {
        display: flex;
    }

    .navbar-menu {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        padding: 0 var(--gutter) 8px;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
    }

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

    .navbar-menu a {
        padding: 14px 0;
        border-top: 1px solid var(--border);
    }

    .intro {
        padding-top: 48px;
    }

    .intro-actions .btn {
        flex: 1 1 100%;
        text-align: center;
    }

    .page-header h1 {
        font-size: 2rem;
    }
}
