/* ══════════════════════════════════════════════════
   RETRO DARK + ORANGE — DESIGN TOKENS
   ══════════════════════════════════════════════════ */
:root {
    --bg: #0e0e0e;
    --bg-raised: #161616;
    --bg-hover: #1c1c1c;
    --orange: #e8772e;
    --orange-dim: #c4631f;
    --orange-glow: rgba(232, 119, 46, 0.15);
    --cream: #f0e6d3;
    --cream-dim: #b8a78e;
    --muted: #5a5549;
    --border: #2a2725;
    --border-hi: #3d3832;
    --font-body: 'Outfit', system-ui, sans-serif;
    --font-mono: 'Space Mono', 'Courier New', monospace;
}

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

html {
    font-size: 18px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--orange-dim) var(--bg);
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--cream);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

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

strong {
    color: var(--orange);
    font-weight: 600;
}

::selection {
    background: var(--orange);
    color: var(--bg);
}

::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--orange-dim);
    border-radius: 4px;
}

/* ══════════════════════════════════════════════════
   RETRO OVERLAYS
   ══════════════════════════════════════════════════ */
.scanlines {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    background: repeating-linear-gradient(0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.03) 2px,
            rgba(0, 0, 0, 0.03) 4px);
}

.grain {
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ══════════════════════════════════════════════════
   CONTAINER
   ══════════════════════════════════════════════════ */
.container {
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 48px;
}

/* ══════════════════════════════════════════════════
   NAVIGATION
   ══════════════════════════════════════════════════ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 0 28px;
    transition: background 0.3s, backdrop-filter 0.3s;
}

.nav.scrolled {
    background: rgba(14, 14, 14, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1380px;
    margin: 0 auto;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--orange);
    letter-spacing: 2px;
}

.nav-menu {
    display: flex;
    gap: 28px;
}

.nav-menu a {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--cream-dim);
    letter-spacing: 1px;
    position: relative;
    transition: color 0.25s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--orange);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--orange);
    transition: width 0.3s;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.burger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.burger span {
    width: 22px;
    height: 1.5px;
    background: var(--cream);
    transition: all 0.3s;
}

.burger.open span:first-child {
    transform: rotate(45deg) translate(3px, 3px);
}

.burger.open span:last-child {
    transform: rotate(-45deg) translate(3px, -3px);
}

/* ══════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════ */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding: 100px 100px 40px;
}

.hero-inner {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 72px;
    align-items: center;
    justify-items: stretch;
}

.hero-tag {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--muted);
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.hero-title {
    font-size: clamp(2.8rem, 6vw, 5rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -2px;
    color: var(--cream);
    white-space: nowrap;
}

.hero-title-accent {
    color: var(--orange);
    display: inline-block;
    position: relative;
}

.hero-title-accent::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--orange);
    opacity: 0.4;
}

.hero-sub {
    margin-top: 24px;
    font-size: 1.15rem;
    color: var(--cream-dim);
    line-height: 1.7;
}

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

.btn-main {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 16px 32px;
    background: var(--orange);
    color: var(--bg);
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
    transition: background 0.25s, transform 0.25s;
}

.btn-main:hover {
    background: #f28a3d;
    transform: translateY(-2px);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 16px 32px;
    border: 1px solid var(--border-hi);
    color: var(--cream-dim);
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: border-color 0.25s, color 0.25s, transform 0.25s;
}

.btn-ghost:hover {
    border-color: var(--orange);
    color: var(--orange);
    transform: translateY(-2px);
}

/* Photo */
.hero-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.hero-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.photo-frame {
    position: relative;
    width: 340px;
    height: 400px;
}

.photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    filter: grayscale(20%) contrast(1.05) brightness(0.95);
    position: relative;
    z-index: 2;
}

.photo-border {
    position: absolute;
    inset: -8px;
    border: 1px solid var(--orange);
    opacity: 0.3;
    z-index: 1;
    transition: opacity 0.4s;
}

.photo-frame:hover .photo-border {
    opacity: 0.7;
}

.photo-corner {
    position: absolute;
    width: 16px;
    height: 16px;
    z-index: 3;
}

.photo-corner::before,
.photo-corner::after {
    content: '';
    position: absolute;
    background: var(--orange);
}

.tl {
    top: -8px;
    left: -8px;
}

.tl::before {
    top: 0;
    left: 0;
    width: 16px;
    height: 1.5px;
}

.tl::after {
    top: 0;
    left: 0;
    width: 1.5px;
    height: 16px;
}

.tr {
    top: -8px;
    right: -8px;
}

.tr::before {
    top: 0;
    right: 0;
    width: 16px;
    height: 1.5px;
}

.tr::after {
    top: 0;
    right: 0;
    width: 1.5px;
    height: 16px;
}

.bl {
    bottom: -8px;
    left: -8px;
}

.bl::before {
    bottom: 0;
    left: 0;
    width: 16px;
    height: 1.5px;
}

.bl::after {
    bottom: 0;
    left: 0;
    width: 1.5px;
    height: 16px;
}

.br {
    bottom: -8px;
    right: -8px;
}

.br::before {
    bottom: 0;
    right: 0;
    width: 16px;
    height: 1.5px;
}

.br::after {
    bottom: 0;
    right: 0;
    width: 1.5px;
    height: 16px;
}

/* Scroll indicator */
.hero-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.scroll-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--orange);
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {

    0%,
    100% {
        transform: translateY(0);
        opacity: 1;
    }

    50% {
        transform: translateY(10px);
        opacity: 0.4;
    }
}

.scroll-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--muted);
    letter-spacing: 3px;
    text-transform: uppercase;
}

.hero-scroll {
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.hero-scroll.hidden {
    opacity: 0;
    visibility: hidden;
}

/* ══════════════════════════════════════════════════
   SECTIONS — SHARED
   ══════════════════════════════════════════════════ */
.section {
    padding: 100px 0;
    position: relative;
}

.section-label {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 52px;
}

.label-num {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--orange);
    font-weight: 700;
}

.label-line {
    flex: 1;
    max-width: 60px;
    height: 1px;
    background: var(--border-hi);
}

.label-text {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--cream-dim);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Scroll animation */
.fade-up {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s, transform 0.6s;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.accent {
    color: var(--orange);
}

/* ══════════════════════════════════════════════════
   ABOUT + SKILLS (COMBINED)
   ══════════════════════════════════════════════════ */
.about-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    align-items: start;
}

.about-text {
    padding: 24px 52px 24px 0;
}

.about-skills {
    padding: 24px 0 24px 52px;
}

.about-heading {
    font-size: 2.1rem;
    font-weight: 700;
    margin-bottom: 28px;
    letter-spacing: -0.5px;
}

.about-text p {
    color: var(--cream-dim);
    font-size: 1.08rem;
    margin-bottom: 16px;
    line-height: 1.9;
}

.skills-heading {
    font-family: var(--font-body);
    font-size: 2.1rem;
    font-weight: 700;
    color: var(--cream);
    letter-spacing: -0.5px;
    margin-bottom: 24px;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-chip {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    padding: 12px 22px;
    border: 1px solid var(--border);
    color: var(--cream-dim);
    background: var(--bg-raised);
    cursor: default;
    transition: all 0.25s;
    position: relative;
}

.skill-chip:hover {
    border-color: var(--orange);
    color: var(--orange);
    background: var(--orange-glow);
    transform: translateY(-2px);
}

.about-links {
    margin-top: 36px;
    display: flex;
    gap: 24px;
}

.about-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--cream-dim);
    transition: color 0.25s;
}

.about-link:hover {
    color: var(--orange);
}

/* ══════════════════════════════════════════════════
   PROJECTS
   ══════════════════════════════════════════════════ */
.projects-list {
    display: flex;
    flex-direction: column;
}

.project-row {
    display: grid;
    grid-template-columns: 40px 1fr auto 32px;
    gap: 24px;
    align-items: center;
    padding: 32px 0;
    border-top: 1px solid var(--border);
    transition: background 0.3s;
    cursor: pointer;
}

.project-row:last-child {
    border-bottom: 1px solid var(--border);
}

.project-row:hover {
    background: var(--bg-raised);
    padding-left: 16px;
    padding-right: 16px;
    margin-left: -16px;
    margin-right: -16px;
}

.project-num {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--orange);
    font-weight: 700;
}

.project-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    transition: color 0.25s;
}

.project-row:hover .project-name {
    color: var(--orange);
}

.project-desc {
    font-size: 1rem;
    color: var(--cream-dim);
    line-height: 1.7;
    max-width: 520px;
}

.project-tech {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.project-tech span {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    padding: 5px 12px;
    border: 1px solid var(--border);
    color: var(--muted);
    white-space: nowrap;
}

.project-arrow {
    font-size: 1.2rem;
    color: var(--muted);
    transition: color 0.25s, transform 0.25s;
}

.project-row:hover .project-arrow {
    color: var(--orange);
    transform: translate(3px, -3px);
}

/* ══════════════════════════════════════════════════
   INTERESTS
   ══════════════════════════════════════════════════ */
.interests-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.interest-block {
    padding: 36px;
    border: 1px solid var(--border);
    background: var(--bg-raised);
    position: relative;
    transition: border-color 0.3s, transform 0.3s;
}

.interest-block:hover {
    border-color: var(--orange-dim);
    transform: translateY(-4px);
}

.interest-marker {
    width: 8px;
    height: 8px;
    background: var(--orange);
    margin-bottom: 20px;
}

.interest-block h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 14px;
}

.interest-block p {
    font-size: 1.02rem;
    color: var(--cream-dim);
    line-height: 1.85;
}

/* ══════════════════════════════════════════════════
   CONTACT
   ══════════════════════════════════════════════════ */
.section-contact {
    border-top: 1px solid var(--border);
}

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

.contact-heading {
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 14px;
}

.contact-sub {
    font-size: 1.1rem;
    color: var(--cream-dim);
    margin-bottom: 36px;
}

.contact-links {
    display: flex;
    flex-direction: row;
    gap: 16px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 28px;
    border: 1px solid var(--border);
    background: var(--bg-raised);
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--cream-dim);
    transition: all 0.25s;
    width: auto;
    flex-shrink: 0;
}

.contact-pill:hover {
    border-color: var(--orange);
    color: var(--orange);
    transform: translateY(-2px);
}

.contact-pill svg {
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════ */
.footer {
    padding: 28px 0;
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-brand {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--orange);
    letter-spacing: 2px;
}

.footer-copy {
    font-size: 0.75rem;
    color: var(--muted);
}

.footer-note {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--muted);
    letter-spacing: 1px;
}

/* ══════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════ */

/* ── Tablet landscape (≤1024px) ── */
@media (max-width: 1024px) {
    .container {
        padding: 0 36px;
    }

    .hero {
        padding: 100px 56px 40px;
    }

    .hero-inner {
        gap: 48px;
    }

    .photo-frame {
        width: 280px;
        height: 340px;
    }

    .about-text {
        padding-right: 32px;
    }

    .about-skills {
        padding-left: 32px;
    }
}

/* ── Tablet portrait (≤860px) ── */
@media (max-width: 860px) {
    /* Slide-in mobile nav active from here */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 240px;
        height: 100vh;
        background: var(--bg);
        border-left: 1px solid var(--border);
        flex-direction: column;
        padding: 88px 32px 40px;
        gap: 24px;
        transition: right 0.35s;
        z-index: 99;
    }

    .nav-menu.open {
        right: 0;
    }

    .burger {
        display: flex;
    }

    .hero {
        padding: 90px 48px 40px;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 36px;
    }

    .hero-left {
        order: 2;
    }

    .hero-right {
        order: 1;
        justify-content: center;
    }

    .hero-actions {
        justify-content: center;
    }

    .photo-frame {
        width: 220px;
        height: 270px;
    }

    .about-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .about-text {
        padding: 0 0 40px 0;
    }

    .about-skills {
        padding: 40px 0 0 0;
        border-top: 1px solid var(--border);
    }

    .project-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .project-num {
        display: none;
    }

    .project-arrow {
        display: none;
    }

    .project-row:hover {
        padding-left: 0;
        padding-right: 0;
        margin-left: 0;
        margin-right: 0;
    }

    .interests-layout {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .footer-note {
        display: none;
    }
}

/* ── Mobile (≤600px) ── */
@media (max-width: 600px) {
    html {
        font-size: 16px;
    }

    .container {
        padding: 0 20px;
    }

    .hero-scroll {
        display: none;
    }

    .hero {
        padding: 80px 20px 40px;
    }

    .hero-title {
        font-size: 2.2rem;
        letter-spacing: -1px;
        white-space: normal;
    }

    .hero-sub {
        font-size: 1rem;
    }

    .btn-main,
    .btn-ghost {
        padding: 14px 24px;
        font-size: 0.88rem;
    }

    .section {
        padding: 60px 0;
    }

    .section-label {
        margin-bottom: 36px;
    }

    .photo-frame {
        width: 190px;
        height: 240px;
    }

    .about-heading,
    .skills-heading {
        font-size: 1.75rem;
    }

    .skill-chip {
        padding: 8px 14px;
        font-size: 0.75rem;
    }

    .project-name {
        font-size: 1.25rem;
    }

    .project-desc {
        font-size: 0.95rem;
        max-width: 100%;
    }

    .interest-block {
        padding: 24px;
    }

    .contact-heading {
        font-size: 1.6rem;
    }

    .contact-pill {
        font-size: 0.85rem;
        padding: 13px 20px;
    }

    .nav-menu {
        width: 200px;
        padding: 88px 24px 40px;
    }
}

/* ── Small phones (≤400px) ── */
@media (max-width: 400px) {
    .container {
        padding: 0 16px;
    }

    .hero-title {
        font-size: 1.9rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn-main,
    .btn-ghost {
        width: 100%;
        justify-content: center;
    }

    .contact-links {
        flex-direction: column;
        width: 100%;
    }

    .contact-pill {
        width: 100%;
        justify-content: center;
    }
}