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

:root {
    /* Black & hot pink palette — black dominating */
    --black: #0a0a0a;
    --black-mid: #141414;
    --black-light: #1a1a1a;
    --hotpink: #ff69b4;
    --hotpink-bright: #ff85c1;
    --hotpink-dark: #e91e8c;
    --hotpink-muted: #c2185b;
    /* Semantic */
    --bg-dark: var(--black);
    --bg-mid: var(--black-mid);
    --white: #f5f5f5;
    --gray: var(--black-light);
    --light-gray: #2a2a2a;
    --border: var(--hotpink-dark);
    --accent: var(--hotpink);
    --accent-hover: var(--hotpink-bright);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
    color: var(--white);
    background-color: var(--black);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--black);
    border-bottom: 2px solid var(--hotpink);
    z-index: 1000;
    padding: 1.5rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--hotpink);
    letter-spacing: 0.5px;
    text-transform: lowercase;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-size: 0.875rem;
    text-decoration: none;
    color: var(--hotpink);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--hotpink-bright);
}

main {
    margin-top: 80px;
}

.hero {
    padding: 8rem 2rem;
    text-align: center;
    background-color: var(--black);
    border-bottom: 2px solid var(--hotpink);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 4rem;
    font-weight: 300;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    line-height: 1.1;
    color: var(--hotpink);
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--hotpink-muted);
    font-weight: 400;
    letter-spacing: 0.01em;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 2rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 3rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--white);
}

.section-title .resume-dl {
    font-size: 0.85rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--hotpink-dark);
    text-decoration: none;
}

.section-title .resume-dl:hover {
    color: var(--hotpink);
}

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

.project-card {
    border: 2px solid var(--hotpink-dark);
    padding: 2rem;
    transition: all 0.3s ease;
    cursor: pointer;
    background-color: var(--black-mid);
}

.project-card:hover {
    border-color: var(--hotpink);
    box-shadow: 0 4px 20px rgba(255, 105, 180, 0.15);
    transform: translateY(-2px);
}

.project-title {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
    color: var(--white);
}

.project-description {
    font-size: 0.875rem;
    color: var(--hotpink-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.project-meta {
    font-size: 0.75rem;
    color: var(--hotpink-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray);
}

.about-content {
    max-width: 700px;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--hotpink-muted);
}

.about-content a {
    color: var(--hotpink-dark);
    font-weight: 500;
}

.about-content a:hover {
    color: var(--hotpink);
}

/* Email gate: full-screen overlay until user enters email */
.email-gate {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background-color: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.email-gate.hidden {
    display: none;
}

.email-gate-content {
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.email-gate-title {
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: lowercase;
    margin-bottom: 0.5rem;
    color: var(--hotpink);
}

.email-gate-subtitle {
    font-size: 0.875rem;
    color: var(--hotpink-muted);
    margin-bottom: 2rem;
}

.email-gate-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.email-gate-form input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--hotpink-dark);
    background-color: var(--black-mid);
    font-family: inherit;
    font-size: 1rem;
    color: var(--white);
    transition: border-color 0.2s;
}

.email-gate-form input:focus {
    outline: none;
    border-color: var(--hotpink);
}

.gate-message {
    margin-top: 1rem;
    font-size: 0.875rem;
    min-height: 1.25rem;
}

.gate-message.error {
    color: var(--hotpink-bright);
}

main.content-hidden {
    visibility: hidden;
    position: absolute;
    left: -9999px;
}

.submit-btn {
    background-color: var(--hotpink);
    color: var(--black);
    border: none;
    padding: 1rem 2rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    font-family: inherit;
}

.submit-btn:hover {
    background-color: var(--hotpink-bright);
    color: var(--black);
}

.form-message {
    margin-top: 1.5rem;
    padding: 1rem;
    font-size: 0.875rem;
    display: none;
}

.form-message.success {
    display: block;
    background-color: var(--hotpink-muted);
    color: var(--black);
}

.form-message.error {
    display: block;
    background-color: var(--black-light);
    color: var(--hotpink-bright);
}

.resume {
    border-top: 2px solid var(--hotpink);
}

.timeline-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* Time-axis timeline (Gantt/calendar style): vertical axis = time, boxes positioned by date */
.timeline.timeline-axis {
    position: relative;
    height: var(--timeline-height, 900px);
    padding: 0 0.5rem;
}

.timeline-axis-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--hotpink-dark), var(--hotpink), var(--hotpink-dark));
    transform: translateX(-50%);
    z-index: 1;
}

.timeline-axis-labels {
    position: absolute;
    left: 52%;
    top: 0;
    bottom: 0;
    width: 4rem;
    margin-left: 0;
    transform: none;
    z-index: 25;
    pointer-events: none;
}

.timeline-year {
    position: absolute;
    left: 0;
    transform: translateY(-50%);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--hotpink-dark);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Tick marks on axis at each box start date */
.timeline-start-mark {
    position: absolute;
    left: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--hotpink-bright);
    transform: translate(-50%, -50%);
    z-index: 4;
    box-sizing: border-box;
    border: 2px solid var(--black);
}

.timeline-box {
    position: absolute;
    margin: 0 2px;
    box-sizing: border-box;
    z-index: 3;
    padding: 0.25rem;
    transition: z-index 0s 0.25s, width 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), height 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), min-width 0.35s ease, min-height 0.35s ease, left 0.35s ease, top 0.35s ease, bottom 0.35s ease;
}

.timeline-box:hover {
    z-index: 20;
    transition: z-index 0s 0s, width 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), height 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), min-width 0.35s ease, min-height 0.35s ease, left 0.35s ease, top 0.35s ease, bottom 0.35s ease;
    min-width: 300px;
    width: 320px !important;
    min-height: 380px;
    height: 420px !important;
    bottom: auto;
    margin-left: -2px;
    margin-right: -2px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 0 2px var(--hotpink);
    border-radius: 10px;
}

.timeline-box-inner {
    height: 100%;
    min-height: 0;
    border-radius: 8px;
    background-color: var(--box-color, var(--black-mid));
    color: var(--white);
    padding: 0.75rem 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease, border-radius 0.3s ease;
    border: 1px solid var(--hotpink-dark);
}

.timeline-box:hover .timeline-box-inner {
    overflow-y: auto;
    border-radius: 8px;
    box-shadow: none;
}

/* Always visible: date, title, company */
.timeline-box-header {
    flex-shrink: 0;
}

.timeline-box .timeline-date {
    color: var(--hotpink-bright);
    font-size: 0.6rem;
    margin-top: 0.4rem;
    margin-bottom: 0;
    letter-spacing: 0.03em;
    font-weight: 400;
    font-style: italic;
    line-height: 1.3;
}

.timeline-box .timeline-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--hotpink);
    margin-bottom: 0.25rem;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.timeline-box .timeline-company {
    font-size: 0.875rem;
    color: var(--hotpink-bright);
    margin-bottom: 0;
    margin-top: 0.2rem;
    line-height: 1.35;
    font-weight: 600;
}

/* Expand on hover: location, description, achievements */
.timeline-box-body {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease 0.05s;
}

.timeline-box:hover .timeline-box-body {
    max-height: 500px;
    opacity: 1;
    transition: max-height 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.05s, opacity 0.28s ease 0.02s;
}

.timeline-box-body .timeline-location {
    font-size: 0.75rem;
    color: var(--hotpink-bright);
    margin-top: 0.6rem;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    line-height: 1.3;
}

.timeline-box-body .timeline-description {
    font-size: 0.8125rem;
    color: var(--hotpink-bright);
    line-height: 1.55;
    margin-bottom: 0.6rem;
    -webkit-line-clamp: unset;
    display: block;
}

.timeline-box .timeline-achievements {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.75rem;
    color: var(--hotpink-bright);
    line-height: 1.5;
}

.timeline-box .timeline-achievements li {
    padding-left: 1rem;
    position: relative;
    margin-bottom: 0.35rem;
}

.timeline-box .timeline-achievements li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--hotpink-bright);
}

.timeline-content {
    width: calc(50% - 3rem);
    min-height: calc(8rem + var(--duration-ratio, 0.5) * 14rem);
    padding: 2rem;
    background-color: var(--black-mid);
    border: 2px solid var(--hotpink-dark);
    transition: all 0.3s ease;
}

.timeline-date {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--hotpink-dark);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.timeline-title {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
    color: var(--white);
}

.timeline-company {
    font-size: 1rem;
    color: var(--hotpink-muted);
    margin-bottom: 0.25rem;
    font-weight: 400;
}

.timeline-location {
    font-size: 0.875rem;
    color: var(--hotpink-dark);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-description {
    font-size: 0.875rem;
    color: var(--hotpink-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.timeline-achievements {
    list-style: none;
    padding: 0;
    margin: 0;
}

.timeline-achievements li {
    font-size: 0.875rem;
    color: var(--hotpink-muted);
    line-height: 1.8;
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
}

.timeline-achievements li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--hotpink);
}

.timeline-placeholder {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--hotpink-muted);
}

.footer {
    border-top: 2px solid var(--hotpink);
    padding: 3rem 2rem;
    text-align: center;
    background-color: var(--black);
    color: var(--hotpink-muted);
    font-size: 0.875rem;
}

.notebook-viewer {
    margin-top: 2rem;
    border: 2px solid var(--hotpink-dark);
    padding: 2rem;
    background-color: var(--black-light);
}

.notebook-viewer iframe {
    width: 100%;
    min-height: 600px;
    border: none;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.92);
    z-index: 2000;
    padding: 2rem;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--black-mid);
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 3rem;
    position: relative;
    border: 2px solid var(--hotpink);
}

.modal-content h2 {
    color: var(--white);
}

.modal-content p {
    color: var(--hotpink-muted);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--black);
    border: 2px solid var(--hotpink);
    font-size: 2rem;
    cursor: pointer;
    color: var(--hotpink);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, color 0.2s;
}

.modal-close:hover {
    background-color: var(--hotpink);
    color: var(--black);
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

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

    .container {
        padding: 4rem 1.5rem;
    }

    .timeline.timeline-axis {
        --timeline-height: 700px;
        height: var(--timeline-height);
    }

    .timeline-axis-line {
        left: 2rem;
        margin-left: 0;
        transform: none;
    }

    .timeline-axis-labels {
        left: 2rem;
        margin-left: 0;
        transform: none;
    }

    .timeline-year {
        left: 0;
        transform: translateY(-50%);
    }

    .timeline-box {
        left: 2.5rem !important;
        width: calc(100% - 2.5rem - 0.5rem) !important;
    }

    .timeline-box:hover {
        max-width: calc(100vw - 2rem);
        width: min(320px, calc(100% - 0.5rem)) !important;
    }
}
