/* ============================================================
   Personal Site — quiet space aesthetic
   Dark sky · single ice accent · Space Grotesk + JetBrains Mono
   ============================================================ */

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

:root {
    /* Background — deep, slightly cool, never pure black */
    --bg: #0a0d14;
    --bg-2: #0d1119;
    --surface: rgba(255, 255, 255, 0.025);
    --surface-hi: rgba(255, 255, 255, 0.04);
    --hairline: rgba(255, 255, 255, 0.08);
    --hairline-hi: rgba(255, 255, 255, 0.16);

    /* Text — desaturated cool whites */
    --fg: #e6e9ef;
    --fg-soft: rgba(230, 233, 239, 0.78);
    --fg-muted: rgba(230, 233, 239, 0.55);
    --fg-faint: rgba(230, 233, 239, 0.32);

    /* Single accent — pale ice / starlight blue */
    --accent: oklch(0.86 0.04 235);
    --accent-soft: oklch(0.86 0.04 235 / 0.55);
    --accent-glow: oklch(0.86 0.04 235 / 0.12);
    --accent-line: oklch(0.86 0.04 235 / 0.22);

    /* Type */
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;
    --font-body: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;

    --section-pad: 7rem 0;
    --container-max: 1120px;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.65;
    color: var(--fg-soft);
    background: var(--bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Starfield ── */
#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ── Ambient wash — barely-there ── */
.bg-wash {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 70% 50% at 15% 90%, rgba(120, 145, 200, 0.05) 0%, transparent 60%),
        radial-gradient(ellipse 60% 70% at 85% 10%, rgba(140, 160, 210, 0.04) 0%, transparent 60%);
}

/* ── Layout ── */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: var(--section-pad);
    position: relative;
    z-index: 1;
}

/* ── Section heading ── */
.section-head {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--accent-soft);
    letter-spacing: 0.18em;
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.section-title {
    font-family: var(--font-body);
    font-size: 2.2rem;
    font-weight: 500;
    color: var(--fg);
    letter-spacing: -0.01em;
}

/* ── Card primitive ── */
.card {
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: 14px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 2rem;
    position: relative;
    transition: border-color 0.4s var(--ease), background 0.4s var(--ease), transform 0.4s var(--ease);
}

.card:hover {
    border-color: var(--hairline-hi);
    background: var(--surface-hi);
}

/* ── Tech tags ── */
.tech-modules {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 1rem 0;
}

.tech-tag {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--fg-muted);
    background: transparent;
    border: 1px solid var(--hairline);
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    letter-spacing: 0.02em;
    transition: all 0.3s var(--ease);
}

.tech-tag:hover {
    color: var(--fg);
    border-color: var(--hairline-hi);
}

/* =====================================================
   NAVIGATION
   ===================================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: 0.85rem 0;
    background: rgba(10, 13, 20, 0.7);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent;
    transition: all 0.35s var(--ease);
}

.navbar.scrolled {
    background: rgba(10, 13, 20, 0.92);
    border-bottom-color: var(--hairline);
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--fg);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    transition: color 0.3s var(--ease);
}

.logo-mark {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
    display: inline-block;
}

.logo-text {
    font-weight: 500;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.1rem;
}

.nav-link {
    font-family: var(--font-body);
    font-size: 0.88rem;
    color: var(--fg-muted);
    text-decoration: none;
    padding: 0.5rem 0.85rem;
    border-radius: 6px;
    letter-spacing: 0.01em;
    transition: color 0.3s var(--ease);
    position: relative;
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
}

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

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 1px;
    background: var(--accent);
}

.nav-index {
    color: var(--fg-faint);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 400;
}

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

/* Status — quiet observatory */
.nav-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--fg-faint);
    letter-spacing: 0.05em;
}

.status-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.7;
    animation: pulse-dot 3s infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 0.9;
    }
}

.status-time {
    color: var(--fg-muted);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 5px;
    padding: 4px;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--fg-soft);
    border-radius: 2px;
    transition: all 0.3s var(--ease);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* =====================================================
   HERO
   ===================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    padding-top: 80px;
    overflow: hidden;
}

.hero-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    z-index: 2;
}

.hero-pretext {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--fg-faint);
    margin-bottom: 1.4rem;
    letter-spacing: 0.08em;
    opacity: 0;
    animation: fadeUp 0.7s var(--ease) 0.3s forwards;
}

.caret {
    color: var(--accent-soft);
    margin-right: 0.5rem;
}

.hero-title {
    margin-bottom: 1.2rem;
}

.title-line {
    display: block;
    font-family: var(--font-body);
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--fg-muted);
    margin-bottom: 0.4rem;
    opacity: 0;
    animation: fadeUp 0.7s var(--ease) 0.5s forwards;
}

.title-name {
    display: block;
    font-family: var(--font-body);
    font-size: 3.6rem;
    font-weight: 500;
    color: var(--fg);
    line-height: 1.05;
    letter-spacing: -0.02em;
    opacity: 0;
    animation: fadeUp 0.7s var(--ease) 0.7s forwards;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: 1.05rem;
    color: var(--fg-soft);
    margin-bottom: 1.3rem;
    margin-top: 0.4rem;
    font-weight: 400;
    opacity: 0;
    animation: fadeUp 0.7s var(--ease) 0.9s forwards;
}

.hero-description {
    font-size: 1rem;
    color: var(--fg-muted);
    max-width: 540px;
    margin-bottom: 2rem;
    line-height: 1.75;
    opacity: 0;
    animation: fadeUp 0.7s var(--ease) 1.1s forwards;
    text-wrap: pretty;
}

.hero-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeUp 0.7s var(--ease) 1.3s forwards;
}

/* Buttons */
.btn {
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 500;
    padding: 0.7rem 1.3rem;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    letter-spacing: 0;
    cursor: pointer;
    transition: all 0.3s var(--ease);
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--fg);
    color: var(--bg);
}

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

.btn-secondary {
    background: transparent;
    color: var(--fg-soft);
    border-color: var(--hairline-hi);
}

.btn-secondary:hover {
    color: var(--fg);
    border-color: var(--accent-line);
    background: var(--accent-glow);
    transform: translateY(-1px);
}

.btn-secondary i {
    font-size: 0.7rem;
}

.btn-outline {
    background: transparent;
    color: var(--fg-muted);
    border-color: var(--hairline);
}

.btn-outline:hover {
    color: var(--fg);
    border-color: var(--hairline-hi);
    transform: translateY(-1px);
}

/* Hero Image — single thin orbit */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.profile-image {
    width: 260px;
    height: 260px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--hairline-hi);
    position: relative;
    z-index: 2;
    opacity: 0;
    animation: fadeIn 1s var(--ease) 0.9s forwards;
}

.orbit {
    position: absolute;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    border: 1px solid var(--hairline);
    z-index: 1;
    animation: orbit 60s linear infinite;
}

.orbit::after {
    content: '';
    position: absolute;
    width: 5px;
    height: 5px;
    background: var(--accent);
    border-radius: 50%;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 8px var(--accent-glow);
}

@keyframes orbit {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    opacity: 0;
    animation: fadeIn 1s var(--ease) 2s forwards;
}

.scroll-indicator span {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--fg-faint);
    letter-spacing: 0.2em;
    display: block;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.scroll-arrow {
    width: 14px;
    height: 14px;
    margin: 0 auto;
    border-right: 1px solid var(--fg-faint);
    border-bottom: 1px solid var(--fg-faint);
    transform: rotate(45deg);
    animation: scrollBounce 2.4s infinite;
}

@keyframes scrollBounce {

    0%,
    100% {
        transform: rotate(45deg) translate(0, 0);
        opacity: 0.4;
    }

    50% {
        transform: rotate(45deg) translate(3px, 3px);
        opacity: 0.8;
    }
}

/* =====================================================
   ABOUT
   ===================================================== */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

.about-text p {
    font-size: 1rem;
    color: var(--fg-soft);
    margin-bottom: 1rem;
    line-height: 1.8;
    text-wrap: pretty;
}

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

.education-card h3 {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--fg);
    margin-bottom: 1.2rem;
    font-weight: 500;
}

.education-item h4 {
    font-size: 1.05rem;
    color: var(--fg);
    font-weight: 500;
    margin-bottom: 0.4rem;
}

.education-item p {
    color: var(--fg-muted);
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.education-item .degree {
    color: var(--fg-soft);
}

.education-item .concentration {
    color: var(--fg-muted);
}

.education-item .edu-timeline {
    color: var(--fg-faint);
    font-size: 0.82rem;
    font-family: var(--font-mono);
    margin-top: 0.5rem;
}

.education-item .coursework {
    color: var(--fg-muted);
    font-size: 0.82rem;
    margin-top: 0.9rem;
    line-height: 1.7;
    padding-top: 0.8rem;
    border-top: 1px solid var(--hairline);
}

/* =====================================================
   EXPERIENCE
   ===================================================== */
.mission-timeline {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    max-width: 880px;
    margin: 0 auto;
}

.mission-item {
    transform: translateY(24px);
    opacity: 0;
    transition: transform 0.7s var(--ease), opacity 0.7s var(--ease), border-color 0.4s var(--ease), background 0.4s var(--ease);
}

.mission-item.revealed {
    transform: translateY(0);
    opacity: 1;
}

.mission-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.mission-info h3 {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--fg);
    font-weight: 500;
    margin-bottom: 0.2rem;
}

.mission-org {
    font-size: 0.95rem;
    color: var(--fg-soft);
    font-weight: 400;
}

.mission-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    font-size: 0.78rem;
    color: var(--fg-faint);
    font-family: var(--font-mono);
}

.mission-location i {
    color: var(--fg-faint);
    margin-right: 0.3rem;
    font-size: 0.7rem;
}

.mission-log-entries {
    list-style: none;
    margin-top: 0.9rem;
}

.mission-log-entries li {
    color: var(--fg-muted);
    font-size: 0.93rem;
    padding: 0.35rem 0 0.35rem 1.3rem;
    position: relative;
    line-height: 1.65;
}

.mission-log-entries li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.85rem;
    width: 8px;
    height: 1px;
    background: var(--accent-soft);
}

/* =====================================================
   PROJECTS
   ===================================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    align-items: stretch;
}

.project-card {
    display: flex;
    flex-direction: column;
    transform: translateY(24px);
    opacity: 0;
    transition: transform 0.7s var(--ease), opacity 0.7s var(--ease), border-color 0.4s var(--ease), background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.project-card.revealed {
    transform: translateY(0);
    opacity: 1;
}

.project-card:hover {
    border-color: var(--accent-line) !important;
    background: var(--surface-hi) !important;
}

.project-name {
    font-family: var(--font-body);
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--fg);
    margin-bottom: 0.4rem;
    letter-spacing: -0.005em;
}

.project-brief {
    font-size: 0.92rem;
    color: var(--fg-muted);
    line-height: 1.6;
    margin-bottom: 0.4rem;
}

.project-bullets {
    list-style: none;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--hairline);
    flex-grow: 1;
}

.project-bullets li {
    color: var(--fg-muted);
    font-size: 0.88rem;
    padding: 0.3rem 0 0.3rem 1.1rem;
    position: relative;
    line-height: 1.6;
}

.project-bullets li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.8rem;
    width: 6px;
    height: 1px;
    background: var(--fg-faint);
}

/* =====================================================
   SKILLS
   ===================================================== */
.constellations-wrapper {
    position: relative;
}

#constellations-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

.skill-constellation h3 {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--fg);
    font-weight: 500;
    margin-bottom: 1.2rem;
}

.skill-nodes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-node {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--fg-muted);
    background: transparent;
    border: 1px solid var(--hairline);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    transition: all 0.3s var(--ease);
    cursor: default;
}

.skill-node:hover {
    color: var(--fg);
    border-color: var(--accent-line);
    background: var(--accent-glow);
}

/* =====================================================
   CONTACT
   ===================================================== */
.contact-subtitle {
    text-align: center;
    font-size: 1rem;
    color: var(--fg-muted);
    margin-top: -2rem;
    margin-bottom: 3rem;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
    text-wrap: pretty;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    max-width: 880px;
    margin: 0 auto;
}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    text-align: center;
    padding: 1.8rem 1.3rem;
    transition: all 0.4s var(--ease);
}

.contact-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-line);
    background: var(--surface-hi);
}

.contact-card i {
    font-size: 1.3rem;
    color: var(--fg-soft);
    transition: color 0.3s var(--ease);
}

.contact-card:hover i {
    color: var(--accent);
}

.contact-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--fg-faint);
    letter-spacing: 0.15em;
    font-weight: 400;
    text-transform: uppercase;
}

.contact-value {
    font-size: 0.88rem;
    color: var(--fg-soft);
    word-break: break-word;
}

/* =====================================================
   FOOTER
   ===================================================== */
.footer {
    padding: 2rem 0;
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--hairline);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer p {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--fg-faint);
    letter-spacing: 0.04em;
}

/* =====================================================
   ANIMATIONS
   ===================================================== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2.5rem;
    }

    .hero-content {
        order: 2;
    }

    .hero-image {
        order: 1;
    }

    .hero-description {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

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

    .title-name {
        font-size: 2.8rem;
    }

    .about-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --section-pad: 5rem 0;
    }

    .hamburger {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(10, 13, 20, 0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 1.2rem;
        border-bottom: 1px solid var(--hairline);
        gap: 0;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-link {
        padding: 0.7rem 0.9rem;
        font-size: 0.92rem;
    }

    .nav-status {
        display: none;
    }

    .title-name {
        font-size: 2.2rem;
    }

    .title-line {
        font-size: 1.05rem;
    }

    .profile-image {
        width: 200px;
        height: 200px;
    }

    .orbit {
        width: 270px;
        height: 270px;
    }

    .section-title {
        font-size: 1.7rem;
    }

    .projects-grid,
    .skills-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }

    .mission-header {
        flex-direction: column;
    }

    .mission-meta {
        align-items: flex-start;
        flex-direction: row;
        gap: 1rem;
        flex-wrap: wrap;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

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

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .profile-image {
        width: 170px;
        height: 170px;
    }

    .orbit {
        width: 230px;
        height: 230px;
    }
}

/* Focus */
.btn:focus-visible,
.nav-link:focus-visible,
.contact-card:focus-visible {
    outline: 1px solid var(--accent);
    outline-offset: 3px;
}

/* Selection */
::selection {
    background: var(--accent-glow);
    color: var(--fg);
}
