:root {
    --bg: #000000;
    --surface: #0f0f0f;
    --surface-soft: #161616;
    --text: #f5f5f5;
    --text-muted: #c9c9c9;
    --accent: #ffd700;
    --accent-soft: #f0c400;
    --border: #2a2a2a;
    --radius: 14px;
    --container: 1120px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

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

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

.container {
    width: min(100% - 2rem, var(--container));
    margin-inline: auto;
}

.section {
    padding: 4.5rem 0;
}

.section-title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    color: var(--accent);
    margin-bottom: 1.2rem;
}

.section-lead {
    color: var(--text-muted);
    max-width: 72ch;
    margin-bottom: 2rem;
}

.site-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.9);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    width: min(100% - 2rem, var(--container));
    margin-inline: auto;
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.brand img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
}

.brand span {
    color: var(--accent);
}

.menu-toggle {
    display: none;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    padding: 0.45rem 0.65rem;
    border-radius: 10px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    list-style: none;
}

.nav-link {
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent);
}

.hero {
    padding: 5.8rem 0 4rem;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.8rem);
    line-height: 1.1;
    color: var(--accent);
    max-width: 20ch;
}

.hero p {
    margin-top: 1rem;
    color: var(--text-muted);
    max-width: 65ch;
}

.cta-row {
    margin-top: 1.8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--accent);
    font-weight: 600;
    padding: 0.7rem 1rem;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

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

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

.btn-ghost {
    color: var(--accent);
    background: transparent;
}

.btn-ghost:hover {
    background: rgba(255, 215, 0, 0.1);
}

.grid {
    display: grid;
    gap: 1rem;
}

.card {
    background: linear-gradient(180deg, var(--surface-soft), var(--surface));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.2rem;
}

.card h3 {
    color: var(--accent);
    margin-bottom: 0.55rem;
}

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

.featured-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

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

.skill-focus-card {
    background: linear-gradient(180deg, var(--surface-soft), var(--surface));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.skill-focus-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
}

.skill-focus-card h3 {
    color: var(--accent);
    margin-bottom: 0.45rem;
}

.skills-summary-card {
    margin-top: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
}

.skills-summary-card h3 {
    color: var(--accent);
    margin-bottom: 0.45rem;
}

.skills-summary-list {
    padding-left: 1.1rem;
    display: grid;
    gap: 0.4rem;
}

.skills-item {
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
    font-weight: 600;
}

.projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
}

.project-image {
    aspect-ratio: 16 / 9;
    object-fit: cover;
    width: 100%;
}

.project-body {
    padding: 1rem;
}

.stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0.75rem 0;
}

.tag {
    font-size: 0.8rem;
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
}

.detail-hero {
    padding-top: 5rem;
}

.detail-layout {
    display: grid;
    gap: 1.3rem;
    grid-template-columns: 1.15fr 1fr;
}

.gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.gallery-item {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    cursor: default;
}

.gallery-item-media {
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 230px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.25s ease;
}

.gallery-item:hover img {
    transform: scale(1.03);
}

.gallery-item figcaption {
    padding: 0.75rem 0.85rem 0.9rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.45;
    border-top: 1px solid var(--border);
    background: var(--surface-soft);
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    padding: 1rem;
}

.modal.open {
    display: flex;
}

.modal img {
    max-height: 90vh;
    width: min(100%, 980px);
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    border: 1px solid var(--border);
    background: #111;
    color: var(--text);
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
}

.contact-wrap {
    max-width: 780px;
}

.contact-form {
    display: grid;
    gap: 0.85rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 10px;
    padding: 0.7rem 0.8rem;
}

.contact-form textarea {
    min-height: 140px;
    resize: vertical;
}

.social-list {
    list-style: none;
    display: grid;
    gap: 0.6rem;
    margin-top: 1rem;
}

.social-list a {
    color: var(--text-muted);
}

.social-list a:hover {
    color: var(--accent);
}

.site-footer {
    border-top: 1px solid var(--border);
    padding: 1.3rem 0;
    margin-top: 2.5rem;
}

.site-footer p {
    color: var(--text-muted);
    text-align: center;
    font-size: 0.92rem;
}

.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 900px) {
    .detail-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .menu-toggle {
        display: inline-flex;
    }
    .nav-links {
        position: absolute;
        right: 1rem;
        top: 68px;
        min-width: 220px;
        padding: 0.9rem;
        border-radius: 12px;
        border: 1px solid var(--border);
        background: var(--surface);
        flex-direction: column;
        align-items: flex-start;
        display: none;
    }
    .nav-links.open {
        display: flex;
    }
}