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

:root {
    --bg: #080808;
    --surface: #111111;
    --surface-2: #181818;
    --border: #242424;
    --border-2: #323232;
    --text: #e8e8e8;
    --text-dim: #a0a0a0;
    --text-faint: #606060;
    --accent: #00c8ff;
    --accent-glow: rgba(0, 200, 255, 0.07);
    --accent-border: rgba(0, 200, 255, 0.28);
    --font: 'Inter', sans-serif;
    --mono: 'JetBrains Mono', monospace;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.7;
    font-weight: 300;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

#glow {
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 200, 255, 0.04) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
    transform: translate(-50%, -50%);
    transition: left 0.15s ease, top 0.15s ease;
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 22px 0;
    background: linear-gradient(to bottom, rgba(8, 8, 8, 0.95) 70%, transparent);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.nav-inner {
    max-width: 740px;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: 0.02em;
    opacity: 0;
    animation: fadeDown 0.5s ease 0.1s forwards;
    text-shadow: 0 0 12px rgba(0, 200, 255, 0.7), 0 0 24px rgba(0, 200, 255, 0.3);
}

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

.nav-links li {
    opacity: 0;
    animation: fadeDown 0.5s ease forwards;
}

.nav-links li:nth-child(1) { animation-delay: 0.15s; }
.nav-links li:nth-child(2) { animation-delay: 0.20s; }
.nav-links li:nth-child(3) { animation-delay: 0.25s; }
.nav-links li:nth-child(4) { animation-delay: 0.30s; }
.nav-links li:nth-child(5) { animation-delay: 0.35s; }
.nav-links li:nth-child(6) { animation-delay: 0.40s; }

.nav-links a {
    font-size: 12px;
    font-family: var(--mono);
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.2s;
    letter-spacing: 0.04em;
}

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

.nav-links a.active {
    color: var(--accent);
    text-shadow: 0 0 10px rgba(0, 200, 255, 0.75), 0 0 20px rgba(0, 200, 255, 0.3);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
    background: none;
    border: none;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 1px;
    background: var(--text-dim);
    transition: all 0.2s;
}

@media (max-width: 560px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: rgba(8, 8, 8, 0.98);
        padding: 16px 28px 24px;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links li {
        animation: none;
        opacity: 1;
    }

    .nav-links a {
        display: block;
        padding: 12px 0;
        border-bottom: 1px solid var(--border);
    }

    .nav-toggle {
        display: flex;
    }
}

main {
    max-width: 740px;
    margin: 0 auto;
    padding: 0 28px;
    position: relative;
    z-index: 1;
}

section {
    padding: 100px 0;
    border-bottom: 1px solid var(--border);
}

section:last-child {
    border-bottom: none;
}

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

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

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

.reveal-children.visible > *:nth-child(1) { opacity: 1; transform: none; transition-delay: 0.00s; }
.reveal-children.visible > *:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.08s; }
.reveal-children.visible > *:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.16s; }
.reveal-children.visible > *:nth-child(4) { opacity: 1; transform: none; transition-delay: 0.24s; }
.reveal-children.visible > *:nth-child(5) { opacity: 1; transform: none; transition-delay: 0.32s; }
.reveal-children.visible > *:nth-child(6) { opacity: 1; transform: none; transition-delay: 0.40s; }

.section-label {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--accent);
    letter-spacing: 0.18em;
    text-transform: lowercase;
    margin-bottom: 36px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-shadow: 0 0 10px rgba(0, 200, 255, 0.65), 0 0 20px rgba(0, 200, 255, 0.25);
}

.section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--border-2), transparent);
}

#hero {
    padding-top: 170px;
    padding-bottom: 120px;
    border-bottom: 1px solid var(--border);
}

.hero-eyebrow {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 18px;
    opacity: 0;
    animation: fadeUp 0.6s ease 0.3s forwards;
}

.hero-name {
    font-size: clamp(38px, 8vw, 60px);
    font-weight: 500;
    letter-spacing: -0.035em;
    color: #f4f4f4;
    line-height: 1.05;
    margin-bottom: 22px;
    opacity: 0;
    animation: fadeUp 0.6s ease 0.45s forwards;
}

.hero-name .accent-dot {
    color: var(--accent);
    text-shadow: 0 0 12px rgba(0, 200, 255, 0.9), 0 0 28px rgba(0, 200, 255, 0.4);
}

.hero-subtitle {
    font-size: 15px;
    color: var(--text-dim);
    margin-bottom: 28px;
    opacity: 0;
    animation: fadeUp 0.6s ease 0.6s forwards;
}

.hero-subtitle .hl {
    color: var(--accent);
    font-weight: 400;
}

.hero-tagline {
    font-size: 15px;
    color: var(--text-dim);
    max-width: 460px;
    line-height: 1.85;
    margin-bottom: 44px;
    opacity: 0;
    animation: fadeUp 0.6s ease 0.75s forwards;
}

.hero-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeUp 0.6s ease 0.9s forwards;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-family: var(--mono);
    color: var(--text-dim);
    text-decoration: none;
    padding: 8px 15px;
    border: 1px solid var(--border-2);
    border-radius: 6px;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.pill:hover {
    color: var(--accent);
    border-color: var(--accent-border);
    background: var(--accent-glow);
}

.pill svg {
    flex-shrink: 0;
}

.pill--primary {
    color: var(--accent);
    border-color: var(--accent-border);
    background: var(--accent-glow);
}

.prose p {
    color: var(--text-dim);
    margin-bottom: 18px;
    line-height: 1.9;
    font-size: 15px;
}

.prose p:last-child {
    margin-bottom: 0;
}

.prose a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid var(--accent-border);
    transition: border-color 0.2s;
}

.prose a:hover {
    border-color: var(--accent);
}

.now-list {
    list-style: none;
}

.now-item {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 14px;
    line-height: 1.75;
}

.now-item:last-child {
    border-bottom: none;
}

.now-arrow {
    color: var(--accent);
    font-family: var(--mono);
    font-size: 12px;
    flex-shrink: 0;
    margin-top: 3px;
    text-shadow: 0 0 8px rgba(0, 200, 255, 0.7);
}

.exp-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.exp-card {
    padding: 22px 24px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    transition: border-color 0.25s, background 0.25s;
}

.exp-card:hover {
    border-color: var(--border-2);
    background: var(--surface-2);
}

.exp-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 4px;
}

.exp-role {
    font-size: 14px;
    font-weight: 500;
    color: #ececec;
}

.exp-period {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-dim);
    flex-shrink: 0;
}

.exp-company {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--accent);
    margin-bottom: 12px;
    letter-spacing: 0.04em;
    text-shadow: 0 0 8px rgba(0, 200, 255, 0.5);
}

.exp-desc {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.75;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

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

.project-card {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 10%, var(--accent) 50%, transparent 90%);
    opacity: 0;
    transition: opacity 0.3s;
}

.project-card:hover {
    border-color: var(--border-2);
    background: var(--surface-2);
    transform: translateY(-3px);
}

.project-card:hover::before {
    opacity: 0.6;
}

.project-name {
    font-size: 13px;
    font-weight: 500;
    color: #ececec;
    margin-bottom: 8px;
}

.project-desc {
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.7;
    flex: 1;
    margin-bottom: 16px;
}

.project-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tag {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--text-faint);
    padding: 3px 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
}

.project-link-icon {
    position: absolute;
    top: 18px;
    right: 18px;
    color: var(--text-faint);
    opacity: 0;
    transition: opacity 0.2s;
}

.project-card:hover .project-link-icon {
    opacity: 1;
    color: var(--text-dim);
}

.writing-list {
    display: flex;
    flex-direction: column;
}

.writing-link {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    transition: padding-left 0.2s;
}

.writing-link:last-child {
    border-bottom: none;
}

.writing-link:hover {
    padding-left: 6px;
}

.writing-link:hover .writing-title {
    color: var(--accent);
}

.writing-title {
    font-size: 14px;
    color: var(--text);
    transition: color 0.2s;
}

.writing-meta {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-dim);
    flex-shrink: 0;
}

.contact-intro {
    font-size: 15px;
    color: var(--text-dim);
    line-height: 1.85;
    margin-bottom: 36px;
    max-width: 460px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

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

.contact-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border: 1px solid var(--border);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-dim);
    font-size: 12px;
    font-family: var(--mono);
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    background: var(--surface);
}

.contact-link:hover {
    color: var(--accent);
    border-color: var(--accent-border);
    background: var(--accent-glow);
}

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

.contact-link--preferred {
    border-color: var(--accent-border);
    color: var(--accent);
}

.preferred-badge {
    margin-left: auto;
    font-size: 0.6rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    background: var(--accent-glow);
    border: 1px solid var(--accent-border);
    border-radius: 4px;
    padding: 2px 6px;
}

footer {
    max-width: 740px;
    margin: 0 auto;
    padding: 36px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
}

.footer-copy {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-dim);
}

.footer-built {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-faint);
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 2px; }

::selection {
    background: rgba(0, 200, 255, 0.2);
    color: #fff;
}

.status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    margin-right: 8px;
    box-shadow: 0 0 6px var(--accent);
    animation: pulse 2.5s ease infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 8px rgba(0, 200, 255, 0.9), 0 0 16px rgba(0, 200, 255, 0.4);
    }
    50% {
        opacity: 0.5;
        box-shadow: 0 0 3px rgba(0, 200, 255, 0.5);
    }
}
