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

:root,
[data-theme="dark"] {
    --bg: #302f2f;
    --surface: #111111;
    --surface2: #1a1a1a;
    --border: #222222;
    --border-light: #2e2e2e;
    --text: #f0ece4;
    --muted: #6b6b6b;
    --accent: #f0c54d;
    --accent-dim: #c7a036;
    --font-sans: 'Space Grotesk', sans-serif;
    --font-mono: 'Space Mono', monospace;
}

[data-theme="light"] {
    --bg: #f7f5f0;
    --surface: #ffffff;
    --surface2: #f0ede5;
    --border: #e3ded2;
    --border-light: #d8d2c3;
    --text: #1c1a16;
    --muted: #7a756a;
    --accent: #b8860b;
    --accent-dim: #96700a;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background 0.3s ease, color 0.3s ease;
}

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

/* NAV */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 48px;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="light"] nav {
    background: rgba(247, 245, 240, 0.85);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--accent);
    letter-spacing: 0.08em;
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border-light);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, transform 0.2s;
}

.theme-toggle:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: rotate(15deg);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    display: none;
}

/* dark mode shows the sun (click to go light) */
[data-theme="dark"] .theme-toggle .icon-sun {
    display: block;
}

/* light mode shows the moon (click to go dark) */
[data-theme="light"] .theme-toggle .icon-moon {
    display: block;
}

.nav-links {
    display: flex;
    gap: 36px;
    list-style: none;
}

.nav-links .resume {
    border: solid 1px var(--accent);
    padding: 5px 10px;
    color: var(--text);
}

.nav-links a {
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0.04em;
    transition: color 0.2s;
}

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

/* HERO */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 120px 48px 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(240, 197, 77, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.hero-eyebrow {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

/*.hero-eyebrow::before {
    content: '';
    display: inline-block;
    width: 32px;
    height: 1px;
    background: var(--accent);
}*/

.hero-name {
    font-size: clamp(52px, 8vw, 96px);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
    text-align: center;
}

.hero-name .accent-dot {
    color: var(--accent);
}

.hero-title {
    font-size: clamp(18px, 3vw, 28px);
    font-weight: 300;
    color: var(--muted);
    letter-spacing: 0.02em;
    margin-bottom: 40px;
    text-align: center;
}

.hero-bio {
    max-width: 480px;
    margin: 0 auto;
    font-size: 16px;
    color: var(--muted);
    line-height: 1.8;
    margin-bottom: 52px;
    text-align: center;
}

.hero-cta {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    color: #0a0a0a;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    padding: 14px 28px;
    border-radius: 4px;
    letter-spacing: 0.02em;
    transition: background 0.2s, transform 0.15s;
    cursor: pointer;
    border: none;
}

.btn-primary:hover {
    background: var(--accent-dim);
    transform: translateY(-1px);
}

.btn-ghost {
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 2px;
    letter-spacing: 0.02em;
    transition: color 0.2s, border-color 0.2s;
    cursor: pointer;
}

.btn-ghost:hover {
    color: var(--text);
    border-color: var(--muted);
}

.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.1em;
}

.scroll-line {
    width: 48px;
    height: 1px;
    background: var(--border-light);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent);
    animation: slide 2s ease-in-out infinite;
}

@keyframes slide {

    0%,
    100% {
        left: -100%
    }

    50% {
        left: 100%
    }
}

/* SECTION SHARED */
section {
    padding: 120px 48px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 72px;
}

.section-number {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--accent);
    letter-spacing: 0.15em;
}

.section-title {
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.section-line {
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* PROJECTS */
#projects {
    background: var(--surface);
    transition: background 0.3s ease;
}

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

.project-card {
    background: var(--bg);
    padding: 40px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: background 0.3s;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.project-card:hover {
    background: var(--surface2);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: var(--accent);
    transition: height 0.4s ease;
}

.project-card:hover::before {
    height: 100%;
}

.project-tag {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--accent);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.project-title {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.project-desc {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.7;
    flex: 1;
}

.project-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.stack-pill {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
    border: 1px solid var(--border);
    padding: 3px 10px;
    border-radius: 2px;
    letter-spacing: 0.05em;
}

.project-arrow {
    align-self: flex-end;
    font-size: 20px;
    color: var(--border-light);
    transition: color 0.2s, transform 0.2s;
}

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

/* TECH STACK */
#stack {

}

.stack_grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.stack_wrap {
    width: 49%;
}

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

.stack_pills .pill {
    border: solid 1px var(--text);
    width: fit-content;
    padding: 0 10px;
    transition: all 0.5s;
}

.stack_pills .pill:hover {
    border: solid 1px var(--accent);
    transition: all 0.5s;
}

/* CONTACT */
#contact {
    background: var(--surface);
    transition: background 0.3s ease;
}

.contact-inner {
    max-width: 640px;
}

.contact-heading {
    font-size: clamp(36px, 5vw, 60px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 24px;
}

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

.contact-sub {
    font-size: 16px;
    color: var(--muted);
    margin-bottom: 48px;
    line-height: 1.7;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.contact-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    transition: padding-left 0.2s;
    cursor: pointer;
}

.contact-link:hover {
    padding-left: 12px;
}

.contact-link-label {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.1em;
    margin-bottom: 4px;
}

.contact-link-value {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
}

.contact-link-icon {
    color: var(--muted);
    font-size: 18px;
    transition: color 0.2s, transform 0.2s;
}

.contact-link:hover .contact-link-icon {
    color: var(--accent);
    transform: translate(3px, -3px);
}

/* FOOTER */
footer {
    border-top: 1px solid var(--border);
    padding: 32px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-name {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.08em;
}

.footer-credit {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--border-light);
    letter-spacing: 0.06em;
}

@media (max-width: 640px) {
    nav {
        padding: 18px 24px;
    }

    .nav-links {
        gap: 20px;
    }

    .stack_wrap {
        width: 100%;
    }

    section,
    .hero {
        padding-left: 24px;
        padding-right: 24px;
    }

    footer {
        padding: 24px;
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}
