/* Global Styles */
:root {
    --bg-color: #ffffff;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --accent-color: #1a73e8;
    --card-bg: #ffffff;
    --card-border: #e0e0e0;
    --tag-bg: #e8f0fe;
    --tag-text: #1967d2;
    --font-main: 'Google Sans', 'Inter', sans-serif;
    --font-code: 'Google Sans Mono', 'Fira Code', monospace;
}

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

html {
    background-color: var(--bg-color);
}

body {
    font-family: var(--font-main);
    background-color: transparent;
    /* Allow particles to show */
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

html.motion-reduce * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
}

a {
    -webkit-tap-highlight-color: transparent;
}

/* Canvas Background */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    contain: strict;
}

/* Navigation */
nav {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 16px;
    padding: 28px 0 20px;
    position: relative;
    z-index: 10;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.logo {
    font-weight: 700;
    font-size: 20px;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 32px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s;
}

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

.cta-button {
    background-color: var(--text-primary);
    color: white;
    padding: 10px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
    display: inline-block;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    padding: 11px 16px;
    border-radius: 999px;
    background: rgba(26, 115, 232, 0.08);
    border: 1px solid #d2e3fc;
    color: #185abc;
    font-weight: 600;
    box-shadow: none;
    line-height: 1;
    margin-top: 2px;
}

.nav-cta i {
    font-size: 0.78rem;
}

.nav-cta:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    box-shadow: 0 8px 20px rgba(26, 115, 232, 0.22);
}

.nav-cta:focus-visible {
    outline: 2px solid #8ab4f8;
    outline-offset: 2px;
}

.motion-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 112px;
    padding: 10px 13px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: rgba(95, 99, 104, 0.1);
    color: var(--text-secondary);
    font-family: var(--font-main);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s, border-color 0.2s, color 0.2s;
}

.motion-toggle::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #34a853;
    box-shadow: 0 0 0 0 rgba(52, 168, 83, 0.28);
}

.motion-toggle:hover {
    transform: translateY(-1px);
    border-color: #d2e3fc;
    color: #174ea6;
    background: rgba(26, 115, 232, 0.1);
    box-shadow: 0 6px 16px rgba(26, 115, 232, 0.12);
}

html.motion-freeze-preview .motion-toggle:hover {
    transform: none;
    box-shadow: none;
}

.motion-toggle:focus-visible {
    outline: 2px solid #8ab4f8;
    outline-offset: 2px;
}

.motion-toggle[data-mode="reduced"] {
    background: rgba(26, 115, 232, 0.08);
    border-color: #aecbfa;
    color: #185abc;
}

.motion-toggle[data-mode="reduced"]::before {
    background: #1a73e8;
    box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.15);
}

/* Hero Section */
.hero {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: 60px;
}

.hero-intro {
    font-family: var(--font-code);
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    text-transform: uppercase;
}

.hero-name {
    font-size: 8vw;
    line-height: 0.9;
    font-weight: 900;
    color: var(--text-primary);
    text-transform: uppercase;
    margin-bottom: 24px;
    letter-spacing: -2px;
}

.hero-bio {
    max-width: 700px;
    margin: 0 auto 32px;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.social-links {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.social-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #f1f3f4;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 20px;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-3px);
}

.gravity-btn {
    padding: 16px 40px;
    font-size: 1.1rem;
    border-radius: 50px;
}

/* Experience */
#experience {
    padding: 32px 24px 56px;
}

#experience .section-title {
    margin-bottom: 42px;
}

.experience-timeline {
    max-width: 940px;
    margin: 0 auto;
}

.experience-entry {
    position: relative;
    padding: 0 0 30px 26px;
    border-bottom: 1px solid #e3e7eb;
}

.experience-entry::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    bottom: 30px;
    width: 2px;
    background: linear-gradient(180deg, #cfd8e3 0%, #e5eaf0 100%);
}

.experience-entry::after {
    content: '';
    position: absolute;
    left: -5px;
    top: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--accent-color);
}

.experience-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 28px;
    margin-bottom: 12px;
}

.experience-role {
    font-size: 1.35rem;
    line-height: 1.3;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.experience-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    flex-shrink: 0;
    text-align: right;
}

.experience-company a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

.experience-company a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.experience-date {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.experience-desc {
    color: var(--text-secondary);
    max-width: 760px;
    font-size: 1rem;
}

/* Areas of Interest */
#interests {
    padding: 80px 24px;
    /* background-color: #ffffff; Removed to show particles */
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-top: -40px;
    /* Pull closer to title */
    margin-bottom: 40px;
}

.interests-grid {
    --interest-slot-height: 220px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 60px;
    text-align: center;
}

.interest-item {
    --interest-pad-y: 20px;
    --interest-pad-x: 20px;
    padding: var(--interest-pad-y) var(--interest-pad-x);
    height: var(--interest-slot-height);
    min-height: 0;
    display: grid;
    grid-template-areas: "stack";
    align-items: start;
    justify-items: center;
    position: relative;
    overflow: hidden;
    contain: layout paint;
    transition: transform 0.3s ease;
}

.interest-item:hover {
    transform: translateY(-5px);
}

.interest-content {
    position: absolute;
    inset: var(--interest-pad-y) var(--interest-pad-x);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    transform: translate3d(0, 0, 0);
    opacity: 1;
    backface-visibility: hidden;
    will-change: transform, opacity;
}

.interest-content.interest-content--measure {
    visibility: hidden;
    pointer-events: none;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
}

.interest-content.is-animating {
    transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.42s ease;
}

.interest-content.is-entering {
    transform: translate3d(0, 52%, 0);
    opacity: 0;
}

.interest-content.is-leaving {
    transform: translate3d(0, -52%, 0);
    opacity: 0;
}

.interest-icon {
    font-size: 48px;
    color: var(--text-primary);
    margin-bottom: 24px;
    display: inline-block;
}

.interest-item h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.interest-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 320px;
    margin: 0 auto;
}

/* Section Titles */
.section-title {
    font-size: 3rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 60px;
    text-transform: uppercase;
    color: var(--text-primary);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 100px;
}

.project-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 32px;
    border-radius: 16px;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 350px;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: var(--text-primary);
}

.card-header {
    margin-bottom: 16px;
}

.project-card h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
    line-height: 1.2;
    color: var(--text-primary);
}

.project-topic {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 12px;
}

.project-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 24px;
    flex-grow: 1;
}

.tech-stack-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.tech-tag {
    background-color: #f1f3f4;
    color: var(--text-primary);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.card-footer {
    display: flex;
    justify-content: flex-end;
}

.forward-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f1f3f4;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.forward-btn:hover {
    background-color: var(--text-primary);
    color: white;
    transform: translateX(4px);
}

/* Skills Section */
#skills {
    padding-top: 12px;
}

.skills-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 48px;
}

.skills-header .section-title {
    margin-bottom: 14px;
}

.skills-intro {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
}

.skills-lanes {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 52px 44px;
    max-width: 980px;
    margin: 0 auto;
    margin-bottom: 100px;
    text-align: center;
}

.skill-lane {
    --lane-accent: #1a73e8;
    padding: 8px 10px;
    transition: transform 0.25s ease;
}

.skill-lane[data-lane="core"] {
    --lane-accent: #1a73e8;
}

.skill-lane[data-lane="agentic"] {
    --lane-accent: #0f9d8b;
}

.skill-lane[data-lane="ml-llm"] {
    --lane-accent: #4f46e5;
}

.skill-lane[data-lane="infra"] {
    --lane-accent: #546e7a;
}

.skill-lane:hover {
    transform: translateY(-4px);
}

.lane-head {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 10px;
    margin-bottom: 18px;
}

.lane-head h3 {
    font-size: 1.45rem;
    margin: 0;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    border-bottom: 2px solid var(--lane-accent);
    padding-bottom: 4px;
}

.lane-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 16px;
}

.skill-pill {
    background: none;
    color: var(--text-secondary);
    border: none;
    border-radius: 0;
    padding: 0;
    font-size: 0.96rem;
    font-weight: 600;
    transition: color 0.22s ease;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
    position: relative;
}

.skill-pill::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1px;
    background: var(--lane-accent);
    transition: width 0.22s ease;
}

.skill-pill:hover {
    color: var(--text-primary);
}

.skill-pill:hover::after {
    width: 100%;
}

/* Footer */
footer {
    text-align: center;
    padding: 60px 0;
    color: var(--text-secondary);
    border-top: 1px solid #eee;
}

/* Responsive */
@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .experience-role {
        font-size: 1.25rem;
    }

    .experience-desc {
        max-width: 100%;
    }

    .skills-lanes {
        max-width: 900px;
        gap: 44px 30px;
    }

    .skill-lane {
        padding: 6px;
    }

    .lane-head h3 {
        font-size: 1.34rem;
    }
}

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

    nav {
        padding: 18px 0 14px;
        gap: 12px;
    }

    .nav-links {
        display: none;
    }

    .nav-actions {
        gap: 8px;
    }

    .logo svg {
        width: 72px;
        height: auto;
    }

    .motion-toggle {
        min-width: 96px;
        padding: 8px 10px;
        font-size: 0.72rem;
    }

    .nav-cta {
        padding: 8px 13px;
        font-size: 0.84rem;
        gap: 6px;
        margin-top: 0;
    }

    .nav-cta i {
        font-size: 0.7rem;
    }

    .hero {
        min-height: auto;
        padding-top: 36px;
        padding-bottom: 40px;
    }

    .hero-intro {
        font-size: 0.78rem;
        letter-spacing: 1.4px;
        margin-bottom: 10px;
    }

    .hero-name {
        font-size: clamp(2.2rem, 13vw, 4rem);
        line-height: 0.95;
        margin-bottom: 16px;
        letter-spacing: -1px;
    }

    .hero-bio {
        font-size: 0.98rem;
        margin-bottom: 24px;
        max-width: 100%;
    }

    .hero-bio p + p {
        margin-top: 8px;
    }

    .social-links {
        gap: 14px;
        margin-bottom: 28px;
    }

    .social-icon {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }

    .gravity-btn {
        padding: 13px 30px;
        font-size: 0.98rem;
    }

    #particle-canvas {
        opacity: 0.6;
    }

    .section-title {
        font-size: clamp(1.9rem, 8.8vw, 2.4rem);
        margin-bottom: 34px;
    }

    .section-header {
        margin-bottom: 36px;
    }

    .section-subtitle {
        font-size: 0.98rem;
        margin-top: 8px;
        margin-bottom: 0;
    }

    #experience {
        padding: 10px 16px 44px;
    }

    #experience .section-title {
        margin-bottom: 26px;
    }

    .experience-entry {
        padding: 0 0 22px 20px;
    }

    .experience-entry::before {
        bottom: 22px;
    }

    .experience-head {
        flex-direction: column;
        gap: 10px;
    }

    .experience-role {
        font-size: 1.12rem;
    }

    .experience-meta {
        align-items: flex-start;
        text-align: left;
    }

    .experience-date {
        font-size: 0.9rem;
    }

    .experience-desc {
        font-size: 0.94rem;
        line-height: 1.6;
    }

    #interests {
        padding: 56px 16px 68px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 18px;
        margin-bottom: 72px;
    }

    .interests-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .interest-item {
        --interest-pad-y: 8px;
        --interest-pad-x: 6px;
        padding: var(--interest-pad-y) var(--interest-pad-x);
        min-height: 0;
    }

    .interest-icon {
        font-size: 38px;
        margin-bottom: 14px;
    }

    .interest-item h3 {
        font-size: 1.08rem;
        margin-bottom: 8px;
    }

    .interest-item p {
        font-size: 0.92rem;
    }

    .project-card {
        padding: 22px;
        min-height: 0;
        border-radius: 14px;
    }

    .project-card h3 {
        font-size: 1.2rem;
    }

    .project-topic {
        font-size: 0.82rem;
        margin-bottom: 10px;
    }

    .project-card p {
        font-size: 0.92rem;
        margin-bottom: 16px;
    }

    .tech-stack-tags {
        margin-bottom: 16px;
        gap: 6px;
    }

    .tech-tag {
        font-size: 0.7rem;
        padding: 4px 8px;
    }

    .forward-btn {
        width: 36px;
        height: 36px;
    }

    #skills {
        padding-top: 6px;
    }

    .skills-header {
        margin: 0 auto 34px;
    }

    .skills-intro {
        font-size: 0.96rem;
        line-height: 1.6;
    }

    .skills-lanes {
        grid-template-columns: 1fr;
        margin-bottom: 72px;
        gap: 28px;
    }

    .skill-lane {
        padding: 2px 0;
    }

    .lane-head {
        margin-bottom: 12px;
    }

    .lane-head h3 {
        font-size: 1.15rem;
    }

    .skill-pill {
        font-size: 0.9rem;
    }

    footer {
        padding: 42px 0;
    }
}

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

    nav {
        padding: 16px 0 12px;
    }

    .nav-cta {
        padding: 7px 11px;
        font-size: 0.8rem;
    }

    .motion-toggle {
        min-width: 80px;
        padding: 7px 9px;
        font-size: 0.68rem;
    }

    .nav-cta span {
        max-width: 82px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .hero-name {
        font-size: clamp(2rem, 14vw, 3.2rem);
    }

    .hero-bio {
        font-size: 0.92rem;
    }

    .social-icon {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

    .gravity-btn {
        width: 100%;
        max-width: 250px;
        padding: 12px 16px;
    }

    #experience {
        padding: 8px 14px 40px;
    }

    .experience-entry {
        padding-left: 16px;
    }

    .experience-entry::after {
        left: -4px;
        width: 10px;
        height: 10px;
    }

    .experience-role {
        font-size: 1.02rem;
    }

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

    .project-card {
        padding: 18px;
    }

    .skills-lanes {
        gap: 22px;
        margin-bottom: 64px;
    }

    .lane-head h3 {
        font-size: 1.08rem;
    }

    .skill-pill {
        font-size: 0.86rem;
    }
}

@media (hover: none) and (pointer: coarse) {
    .cta-button:hover,
    .social-icon:hover,
    .interest-item:hover,
    .project-card:hover,
    .forward-btn:hover,
    .skill-lane:hover,
    .skill-pill:hover {
        transform: none;
        box-shadow: none;
    }

    .project-card:hover {
        border-color: var(--card-border);
    }

    .social-icon:hover {
        background-color: #f1f3f4;
        color: var(--text-primary);
    }

    .forward-btn:hover {
        background-color: #f1f3f4;
        color: var(--text-primary);
    }

    .nav-cta:hover {
        background: rgba(26, 115, 232, 0.08);
        color: #185abc;
        border-color: #d2e3fc;
    }

    .motion-toggle:hover {
        transform: none;
        box-shadow: none;
    }

    .skill-pill:hover::after {
        width: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    html:not([data-motion="full"]) * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
