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

:root {
    --black: #000000;
    --white: #FFFFFF;
    --gray: #808080;
    --gray-light: #CCCCCC;
    --gray-dark: #1A1A1A;
    --accent: #00FF00;
    --bg: var(--white);
    --text: var(--black);
    --surface: #F5F5F5;
}

[data-theme="dark"] {
    --bg: var(--black);
    --text: var(--white);
    --surface: var(--gray-dark);
    --accent: #00FFCC;
}

html {
    scroll-behavior: auto;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    cursor: none;
    transition: background 0.8s cubic-bezier(0.4, 0, 0.2, 1), color 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== CURSOR ========== */
.cursor-lens {
    width: 100px;
    height: 100px;
    border: 1px solid var(--accent);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    backdrop-filter: invert(1);
    mix-blend-mode: exclusion;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.cursor-lens.active {
    transform: scale(1.5);
    backdrop-filter: invert(1) blur(4px);
}

/* ========== SCROLL PROGRESS ========== */
.scroll-progress {
    position: fixed;
    top: 2rem;
    right: 2rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.875rem;
    font-weight: 300;
    color: var(--text);
    z-index: 9000;
    letter-spacing: 0.05em;
    text-align: right;
}

.scroll-progress .percent {
    font-size: 2rem;
    font-weight: 600;
    display: block;
    line-height: 1;
    margin-bottom: 0.25rem;
}

/* ========== THEME TOGGLE ========== */
.theme-toggle {
    position: fixed;
    top: 2rem;
    left: 2rem;
    width: 60px;
    height: 60px;
    border: 1px solid var(--text);
    background: transparent;
    z-index: 9000;
    cursor: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--text);
}

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

/* ========== HERO ========== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6rem 4rem;
    position: relative;
}

.hero-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 2rem;
    /* leave room for fixed theme-toggle on the left */
    padding-left: 1rem;
}

.hero-title-wrapper {
    position: relative;
    overflow: visible;
    margin-bottom: 4rem;
}

.hero-title {
    font-family: 'Archivo Black', sans-serif;
    font-size: clamp(4rem, 15vw, 18rem);
    line-height: 0.85;
    letter-spacing: -0.03em;
    cursor: none;
    user-select: none;
    position: relative;
    filter: url('#gooey');
}

.hero-title .line {
    display: block;
}

.hero-title .line:nth-child(2) {
    text-align: right;
    margin-right: 10%;
}

.hero-metadata {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    max-width: 1400px;
    margin-top: 6rem;
}

.hero-meta-item {
    border-top: 1px solid var(--text);
    padding-top: 1rem;
}

.meta-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.625rem;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.meta-value {
    font-size: 1.125rem;
    font-weight: 500;
    line-height: 1.4;
}

/* ========== SECTION SHARED ========== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-number {
    font-family: 'Archivo Black', sans-serif;
    font-size: 8rem;
    line-height: 1;
    color: var(--accent);
    opacity: 0.1;
    /* prevent it from taking full row and pushing title down */
    flex-shrink: 0;
}

.section-title {
    font-family: 'Archivo Black', sans-serif;
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 1;
    letter-spacing: -0.02em;
}

/* ========== EDUCATION ========== */
.education {
    padding: 12rem 4rem;
    background: var(--surface);
}

.edu-list {
    max-width: 1200px;
}

.edu-item {
    border-top: 1px solid var(--text);
    padding: 3rem 0;
    display: grid;
    grid-template-columns: 200px 1fr 150px;
    gap: 3rem;
    align-items: start;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.edu-item:hover {
    padding-left: 2rem;
    background: var(--bg);
}

.edu-date {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    font-weight: 300;
    color: var(--gray);
}

.edu-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.edu-content p {
    font-size: 1rem;
    font-weight: 400;
    color: var(--gray);
}

.edu-score {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.25rem;
    font-weight: 600;
    text-align: right;
}

/* ========== EXPERIENCE ========== */
.experience {
    padding: 12rem 4rem;
    background: var(--bg);
}

.exp-container {
    max-width: 1400px;
}

.exp-card {
    border: 1px solid var(--text);
    padding: 4rem;
    margin-top: 6rem;
    position: relative;
    transition: color 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.exp-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--accent);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.exp-card:hover::before {
    width: 100%;
}

.exp-card:hover {
    color: var(--black);
    border-color: var(--accent);
}

/* Ensure all child text inherits the hover color */
.exp-card:hover .exp-role,
.exp-card:hover .exp-meta,
.exp-card:hover .exp-points,
.exp-card:hover .edu-content p {
    color: var(--black);
}

.exp-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3rem;
    margin-bottom: 3rem;
}

.exp-company {
    font-family: 'Archivo Black', sans-serif;
    font-size: clamp(1.75rem, 4vw, 3rem);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.exp-role {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--gray);
    transition: color 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.exp-meta {
    text-align: right;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.875rem;
    transition: color 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.exp-points {
    list-style: none;
    margin-bottom: 3rem;
}

.exp-points li {
    padding-left: 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    line-height: 1.6;
}

.exp-points li::before {
    content: '—';
    position: absolute;
    left: 0;
    font-weight: 600;
}

.certificate-link {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid currentColor;
    padding: 1rem 2rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.certificate-link:hover {
    background: var(--text);
    color: var(--bg);
}

.exp-card:hover .certificate-link:hover {
    background: var(--black);
    color: var(--accent);
}

.cert-icon {
    width: 24px;
    height: 24px;
    background: currentColor;
    border-radius: 50%;
}

/* ========== PROJECTS ========== */
.projects-section-title {
    padding: 12rem 4rem 4rem;
    background: var(--surface);
}

.projects-wrapper {
    background: var(--surface);
    position: relative;
}

.projects-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
}

.projects-scroll-container {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 4rem;
    padding: 0 4rem;
    will-change: transform;
}

.project-card {
    flex-shrink: 0;
    width: 500px;
    height: 70vh;
    background: var(--bg);
    border: 1px solid var(--text);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: none;
}

/* Top content block grows, pushing link to bottom while respecting card padding */
.project-card > div:first-child {
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.project-card:hover {
    border-color: var(--accent);
    transform: scale(1.02);
}

.project-header-card {
    margin-bottom: 2rem;
}

.project-tag {
    display: inline-block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 1rem;
}

.project-title-card {
    font-family: 'Archivo Black', sans-serif;
    font-size: 2.5rem;
    line-height: 1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.project-desc {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--gray);
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.tech-tag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--text);
    font-weight: 400;
}

.project-link {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s ease;
    padding-top: 1.5rem;
    border-top: 1px solid var(--text);
    align-self: flex-start;
    width: 100%;
}

.project-link:hover {
    gap: 1rem;
}

/* ========== SKILLS ========== */
.skills {
    padding: 12rem 4rem;
    background: var(--bg);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--text);
    max-width: 1400px;
    margin-top: 6rem;
}

.skill-category {
    background: var(--bg);
    padding: 3rem 2rem;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-category:hover {
    background: var(--accent);
    color: var(--black);
}

.skill-category h3 {
    font-family: 'Archivo Black', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    line-height: 1;
}

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

.skill-list li {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    opacity: 0.8;
}

/* ========== CONNECT ========== */
.connect {
    padding: 12rem 4rem;
    background: var(--surface);
}

.connect-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--text);
    max-width: 1400px;
    margin-top: 6rem;
    margin-left: auto;
    margin-right: auto;
}

.connect-card {
    background: var(--bg);
    padding: 4rem 3rem;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.connect-card:hover {
    background: var(--accent);
    color: var(--black);
}

.connect-icon {
    font-family: 'Archivo Black', sans-serif;
    font-size: 4rem;
    margin-bottom: 2rem;
    display: block;
}

.connect-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

/* ========== FOOTER ========== */
.footer {
    padding: 6rem 4rem;
    background: var(--bg);
    border-top: 1px solid var(--text);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
}

.footer-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--gray);
}

.footer-year {
    font-family: 'Archivo Black', sans-serif;
    font-size: 4rem;
    line-height: 1;
    color: var(--accent);
    opacity: 0.2;
}

/* ========== SVG FILTER ========== */
#gooey {
    visibility: hidden;
    position: absolute;
}

/* ========== TABLET (≤ 1024px) ========== */
@media (max-width: 1024px) {
    .hero {
        padding: 5rem 2rem 4rem;
    }

    .hero-title .line:nth-child(2) {
        text-align: left;
        margin-right: 0;
    }

    .hero-metadata {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
        margin-top: 4rem;
    }

    .education,
    .experience,
    .skills,
    .connect {
        padding: 8rem 2rem;
    }

    .projects-section-title {
        padding: 8rem 2rem 4rem;
    }

    .section-header {
        margin-bottom: 4rem;
    }

    .section-number {
        font-size: 5rem;
    }

    .edu-item {
        grid-template-columns: 1fr 2fr;
        gap: 1.5rem;
    }

    .edu-score {
        grid-column: 2;
        text-align: left;
    }

    .exp-header {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .exp-meta {
        text-align: left;
    }

    .project-card {
        width: 420px;
    }

    .connect-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========== MOBILE (≤ 768px) ========== */
@media (max-width: 768px) {
    body {
        cursor: auto;
    }

    .cursor-lens {
        display: none;
    }

    /* Fixed UI elements — tighter on mobile */
    .scroll-progress {
        top: 1rem;
        right: 1rem;
        font-size: 0.75rem;
    }

    .scroll-progress .percent {
        font-size: 1.25rem;
    }

    .theme-toggle {
        top: 1rem;
        left: 1rem;
        width: 44px;
        height: 44px;
    }

    /* Hero */
    .hero {
        padding: 5rem 1.25rem 3rem;
        min-height: 100svh; /* use svh to avoid mobile browser chrome issues */
    }

    .hero-label {
        font-size: 0.625rem;
        letter-spacing: 0.1em;
        padding-left: 0;
        margin-top: 1rem;
    }

    .hero-title-wrapper {
        margin-bottom: 2rem;
    }

    .hero-title {
        font-size: clamp(3rem, 18vw, 5rem);
    }

    .hero-title .line:nth-child(2) {
        text-align: left;
        margin-right: 0;
    }

    .hero-metadata {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        margin-top: 2.5rem;
    }

    .meta-value {
        font-size: 0.875rem;
    }

    /* Section shared */
    .section-header {
        flex-direction: row;
        align-items: baseline;
        gap: 0.75rem;
        margin-bottom: 3rem;
    }

    .section-number {
        font-size: 3rem;
        opacity: 0.08;
        line-height: 1;
        /* pin it so it doesn't push title onto next line */
        flex-basis: auto;
        flex-shrink: 0;
    }

    .section-title {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    /* Education */
    .education {
        padding: 5rem 1.25rem;
    }

    .edu-item {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 2rem 0;
    }

    .edu-item:hover {
        padding-left: 0.75rem;
    }

    .edu-score {
        text-align: left;
        grid-column: auto;
    }

    /* Experience */
    .experience {
        padding: 5rem 1.25rem;
    }

    .exp-card {
        padding: 2rem 1.5rem;
        margin-top: 2rem;
    }

    .exp-company {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
    }

    .exp-role {
        font-size: 1rem;
    }

    .exp-meta {
        font-size: 0.75rem;
    }

    .exp-points li {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    /* Projects */
    .projects-section-title {
        padding: 5rem 1.25rem 3rem;
    }

    .project-card {
        width: 280px;
        height: auto;
        min-height: unset;
        padding: 2rem 1.5rem;
    }

    /* on auto-height cards the content div shouldn't flex-grow */
    .project-card > div:first-child {
        flex: unset;
        overflow: visible;
    }

    .project-title-card {
        font-size: 1.75rem;
    }

    .project-desc {
        font-size: 0.875rem;
    }

    /* Skills */
    .skills {
        padding: 5rem 1.25rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        margin-top: 3rem;
    }

    /* Connect */
    .connect {
        padding: 5rem 1.25rem;
    }

    .connect-grid {
        grid-template-columns: repeat(2, 1fr);
        margin-top: 3rem;
    }

    .connect-card {
        min-height: 180px;
        padding: 2.5rem 1.5rem;
    }

    .connect-icon {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }

    /* Footer */
    .footer {
        padding: 3rem 1.25rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
    }

    .footer-year {
        font-size: 2.5rem;
    }
}

/* ========== VERY SMALL (≤ 390px) ========== */
@media (max-width: 390px) {
    .hero-metadata {
        grid-template-columns: 1fr;
    }

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

    .hero-title {
        font-size: clamp(2.5rem, 20vw, 4rem);
    }
}