:root {
    --bg: #0d0f12;
    --surface: #15181d;
    --border: #262b33;
    --text: #e8eaed;
    --muted: #9aa3ae;
    --accent: #34d0c3;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

a:hover {
    text-decoration: underline;
}

/* ---------- Nav ---------- */

.nav {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(13, 15, 18, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.wordmark {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    color: var(--text);
}

.wordmark:hover {
    text-decoration: none;
    color: var(--accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav-links a {
    color: var(--muted);
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--text);
    text-decoration: none;
}

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

/* ---------- Hero ---------- */

.hero {
    padding-bottom: 72px;
}

.hero-banner {
    display: block;
    width: 100%;
    height: clamp(200px, 34vw, 360px);
    object-fit: cover;
    object-position: center 30%;
    border-bottom: 1px solid var(--border);
    -webkit-mask-image: linear-gradient(to bottom, #000 62%, rgba(0, 0, 0, 0.55));
    mask-image: linear-gradient(to bottom, #000 62%, rgba(0, 0, 0, 0.55));
}

.hero-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

.hero-photo {
    width: 152px;
    height: 152px;
    object-fit: cover;
    border-radius: 20px;
    border: 4px solid var(--bg);
    display: block;
    margin-top: -76px;
    position: relative;
}

.hero-text {
    max-width: 640px;
    margin-top: 22px;
}

.eyebrow {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    line-height: 1.1;
    margin-bottom: 18px;
}

.lede {
    color: var(--muted);
    font-size: 1.1rem;
    margin-bottom: 28px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 11px 22px;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.btn:hover {
    text-decoration: none;
    border-color: var(--accent);
}

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #08302c;
}

.btn-primary:hover {
    background: #4adfd2;
}

/* ---------- Projects ---------- */

.projects {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

.projects h2 {
    font-size: 1.7rem;
    margin-bottom: 28px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
    gap: 24px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
    border-color: #3a4250;
    transform: translateY(-2px);
}

.card-media {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
    background: #000;
    border-bottom: 1px solid var(--border);
}

.card-media-embed {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    border-bottom: 1px solid var(--border);
    display: block;
    background: #000;
}

.card-media.split {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 2px;
}

.card-media.split img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 0;
}

.card-body {
    padding: 22px 24px 26px;
}

.card-body h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.tags li {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent);
    background: rgba(52, 208, 195, 0.08);
    border: 1px solid rgba(52, 208, 195, 0.25);
    border-radius: 999px;
    padding: 3px 11px;
}

.card-body p {
    color: var(--muted);
    font-size: 0.95rem;
}

/* ---------- Card extras (expandable + detail link) ---------- */

.card-more {
    margin-top: 14px;
}

.card-more summary {
    cursor: pointer;
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 600;
    user-select: none;
    list-style: none;
}

.card-more summary::-webkit-details-marker {
    display: none;
}

.card-more summary::before {
    content: "▸ ";
}

.card-more[open] summary::before {
    content: "▾ ";
}

.card-more[open] {
    padding-bottom: 4px;
}

.card-more .gallery {
    margin: 14px 0;
    grid-template-columns: 1fr 1fr;
}

.card-more p {
    margin-top: 12px;
}

/* ---------- Gallery ---------- */

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    gap: 12px;
}

.gallery img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--border);
    display: block;
}

.gallery .video-wrap {
    min-width: 0;
}

.gallery .video-wrap video {
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #000;
    display: block;
}

.gallery figure {
    margin: 0;
}

.gallery figcaption {
    color: var(--muted);
    font-size: 0.85rem;
    margin-top: 6px;
    text-align: center;
}

/* ---------- Lightbox ---------- */

.card img {
    cursor: zoom-in;
}

.lightbox {
    border: none;
    background: transparent;
    padding: 0;
    margin: auto;
    max-width: none;
    max-height: none;
    cursor: zoom-out;
}

.lightbox [hidden] {
    display: none;
}

.lightbox::backdrop {
    background: rgba(0, 0, 0, 0.85);
}

.lightbox img,
.lightbox video {
    display: block;
    max-width: min(92vw, 1200px);
    max-height: 88vh;
    object-fit: contain;
    border-radius: 10px;
}

.lightbox video {
    cursor: auto;
}

.video-wrap {
    position: relative;
}

.enlarge-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(21, 24, 29, 0.85);
    color: var(--text);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.enlarge-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ---------- Resume ---------- */

.resume {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

.resume h2 {
    font-size: 1.7rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.resume-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.resume-frame {
    width: 100%;
    height: 85vh;
    min-height: 480px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    display: block;
}

.resume-fallback {
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 12px;
    text-align: center;
}

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

.footer {
    border-top: 1px solid var(--border);
    padding: 32px 24px 40px;
    text-align: center;
    color: var(--muted);
    font-size: 0.95rem;
}

.footer p + p {
    margin-top: 6px;
}

/* ---------- Mobile ---------- */

@media (max-width: 760px) {
    .hero {
        padding-bottom: 48px;
    }

    .hero-photo {
        width: 116px;
        height: 116px;
        margin-top: -58px;
        border-radius: 16px;
    }

    .hero-text {
        margin-top: 16px;
    }

    .nav-links {
        gap: 14px;
    }
}
