/* ── General ─────────────────────────────────────────────── */

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 100px;
    background-color: #ffffff;
    background-image: radial-gradient(circle, #ffd6d6 1px, transparent 1px);
    background-size: 28px 28px;
}

h1 {
    font-family: 'Canva Sans', sans-serif;
    color: #ca3232;
    font-size: 50px;
    text-align: left;
    text-decoration: underline wavy #ffd6d6;
    text-underline-offset: 8px;
    text-decoration-thickness: 3px;
}

h2 {
    font-family: 'Canva Sans', sans-serif;
    color: #ca3232;
    font-size: 35px;
}


/* ── Hero ────────────────────────────────────────────────── */

.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    padding-top: 120px;
    position: relative;
}

.hero::before {
    content: "✦";
    position: absolute;
    top: 80px;
    left: 5%;
    font-size: 22px;
    color: #ffd6d6;
    animation: float 4s ease-in-out infinite;
}

.hero::after {
    content: "⋆";
    position: absolute;
    bottom: 20px;
    right: 8%;
    font-size: 30px;
    color: #ffd6d6;
    animation: float 5s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-10px); }
}

.hero-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-image {
    width: 400px;
    height: auto;
    border-radius: 20px;
    border: 4px solid #ffd6d6;
    transform: rotate(2deg);
    transition: transform 0.3s ease;
}

.hero-image:hover {
    transform: rotate(0deg);
}

.greeting-card {
    font-family: 'Canva Sans', sans-serif;
    font-size: 100px;
    font-weight: 700;
    color: #ca3232;
    text-align: left;
    margin: 0;
    line-height: 1;
    padding-top: 0;
    text-decoration: none;
}

.welcome-message {
    font-family: 'Canva Sans', sans-serif;
    font-size: 60px;
    font-weight: 10;
    color: #ca3232;
    text-align: left;
    margin: 0.5rem 0;
    line-height: 1;
}


/* ── Section divider ─────────────────────────────────────── */

.section-divider {
    text-align: center;
    font-size: 18px;
    letter-spacing: 12px;
    color: #ffd6d6;
    padding: 0;
    margin: 0 auto;
    user-select: none;
}

.section-divider::before {
    content: "✦  ✦  ✦  ✦  ✦";
}


/* ── About ───────────────────────────────────────────────── */

.about {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    padding-top: 160px;
}

.about-image {
    width: 400px;
    height: auto;
    border-radius: 20px;
    border: 4px solid #ffd6d6;
    transform: rotate(-2deg);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.about-image:hover {
    transform: rotate(0deg);
}

.about-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.about-description {
    font-family: 'Canva Sans', sans-serif;
    font-size: 25px;
    font-weight: 10;
    color: #ca3232;
    text-align: left;
    margin: 0.5rem 0;
    line-height: 1.6;
}


/* ── Academic Projects ───────────────────────────────────── */

.academic-projects {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding-top: 160px;
}

.projects-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 80%;
}

.projects-header h1 {
    margin: 0;
    padding: 10px;
    line-height: 1;
}

.projects-header p {
    font-family: 'Canva Sans', sans-serif;
    font-size: 25px;
    font-weight: 10;
    color: #ca3232;
    text-align: left;
    margin: 0;
    padding: 10px;
    line-height: 1;
}

.project-image {
    width: 10%;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
    padding: 10px;
    flex-shrink: 0;
}

.project-box {
    width: 80%;
    height: auto;
    border: 3px solid #ca3232;
    border-radius: 15px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 0.25rem;
    text-align: center;
    background: #fff8f8;
    box-shadow: 6px 6px 0 #ffd6d6;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-box:hover {
    transform: translateY(-5px);
    box-shadow: 8px 8px 0 #ffb3b3;
}

.project-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.project-text h2 {
    margin: 0;
}

.project-text p {
    font-family: 'Canva Sans', sans-serif;
    font-size: 17px;
    font-weight: 10;
    color: #ca3232;
    text-align: left;
    line-height: 1.4;
    margin: 0.5rem 0 0 0;
}

.project-link {
    display: flex;
    justify-content: center;
    width: 100%;
    text-decoration: none;
    color: inherit;
}


/* ── Professional Experiences ────────────────────────────── */

.professional-experiences {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding-top: 160px;
}

.experiences-header {
    width: 80%;
}

.experiences-header h1 {
    margin: 0;
}

.experience-scroll-wrapper {
    width: 100vw;
    position: relative;
    overflow: hidden;
}

.experience-scroll-wrapper::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 350px;
    height: 100%;
    z-index: 10;
    pointer-events: none;
    background: linear-gradient(to right, #ffffff, rgba(255, 255, 255, 0));
}

.experience-scroll-wrapper::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    width: 350px;
    height: 100%;
    z-index: 10;
    pointer-events: none;
    background: linear-gradient(to left, #ffffff, rgba(255, 255, 255, 0));
}

.scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.scroll-arrow:hover {
    opacity: 1;
}

.scroll-arrow.left  { left: 24px; }
.scroll-arrow.right { right: 24px; }

.scroll-arrow svg {
    width: 36px;
    height: 36px;
    stroke: #ca3232;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.experience-container {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    overflow-x: auto;
    scroll-behavior: auto;
    padding: 1rem 2rem;
    box-sizing: border-box;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.experience-container::-webkit-scrollbar {
    display: none;
}

.experience-card {
    flex: 0 0 400px;
    min-height: 450px;
    border: 3px solid #ca3232;
    border-radius: 15px;
    background: #fff8f8;
    box-shadow: 6px 6px 0 #ffd6d6;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.experience-card:hover {
    transform: translateY(-5px);
    box-shadow: 8px 8px 0 #ffb3b3;
}

.experience-card h2 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    line-height: 1.1;
}

.experience-card p {
    font-family: 'Canva Sans', sans-serif;
    color: #ca3232;
    font-size: 17px;
    line-height: 1.6;
    margin: 0.5rem 0;
}

.experience-card .company { font-weight: 700; }
.experience-card .date    { font-style: italic; opacity: 0.8; }


/* ── Contact ─────────────────────────────────────────────── */

.contact-me {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding-top: 160px;
    padding-bottom: 100px;
}

.contact-squiggle {
    width: 120px;
    height: 6px;
    border-radius: 99px;
    background: #ffd6d6;
}

.contact-me h1 {
    margin: 0;
    text-align: center;
}

.contact-sub {
    font-family: 'Canva Sans', sans-serif;
    font-size: 20px;
    color: #ca3232;
    opacity: 0.75;
    margin: 0;
    text-align: center;
}

.contact-tiles {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.contact-tile {
    width: 130px;
    height: 130px;
    border: 3px solid #ca3232;
    border-radius: 20px;
    background: #fff8f8;
    box-shadow: 5px 5px 0 #ffd6d6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-tile:hover {
    transform: translateY(-5px);
    box-shadow: 7px 7px 0 #ffb3b3;
}

.contact-tile img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.contact-tile-label {
    font-family: 'Canva Sans', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #ca3232;
    letter-spacing: 0.03em;
}

.contact-deco {
    font-size: 28px;
    letter-spacing: 6px;
    color: #ffd6d6;
    margin: 0.5rem 0 0;
}


/* ── Nav ─────────────────────────────────────────────────── */

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 0;
    padding: 1rem 0;
}

nav a {
    font-family: 'Canva Sans', sans-serif;
    color: #ca3232;
    font-size: 20px;
    text-align: center;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

nav a:hover {
    opacity: 0.6;
}


/* ── Mobile (max-width: 768px) ───────────────────────────── */

@media (max-width: 768px) {

    /* Tighten body padding so content isn't squished */
    body {
        padding: 24px 20px;
    }

    /* Smaller base headings */
    h1 {
        font-size: 32px;
        text-underline-offset: 5px;
    }

    h2 {
        font-size: 22px;
    }

    /* ── Hero ── */
    .hero {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding-top: 80px;
        gap: 2rem;
    }

    .hero-text {
        align-items: center;
    }

    .hero-image {
        width: 80vw;
        max-width: 320px;
        transform: rotate(2deg); /* keep the tilt */
    }

    .greeting-card {
        font-size: 58px;
        text-align: center;
    }

    .welcome-message {
        font-size: 32px;
        text-align: center;
    }

    /* ── About ── */
    .about {
        flex-direction: column;
        align-items: center;
        padding-top: 80px;
        gap: 2rem;
    }

    .about-image {
        width: 80vw;
        max-width: 320px;
        transform: rotate(-2deg); /* keep the tilt */
    }

    .about-description {
        font-size: 17px;
    }

    /* ── Academic Projects ── */
    .academic-projects {
        padding-top: 80px;
        gap: 1.25rem;
    }

    .projects-header {
        width: 100%;
    }

    .projects-header p {
        font-size: 16px;
        line-height: 1.4;
    }

    .project-box {
        width: 100%;
        flex-direction: column;  /* stack image above text */
        align-items: flex-start;
        padding: 1rem;
        gap: 0.75rem;
        box-sizing: border-box;
    }

    .project-image {
        width: 48px;   /* fixed small icon size instead of % */
        padding: 0;
    }

    .project-text h2 {
        font-size: 18px;
    }

    /* ── Professional Experiences ── */
    .professional-experiences {
        padding-top: 80px;
    }

    .experiences-header {
        width: 100%;
    }

    /* Narrower fades so arrows are still reachable */
    .experience-scroll-wrapper::before,
    .experience-scroll-wrapper::after {
        width: 60px;
    }

    /* Smaller cards that still peek to hint at scrolling */
    .experience-card {
        flex: 0 0 80vw;
        min-height: unset;
    }

    .scroll-arrow.left  { left: 8px; }
    .scroll-arrow.right { right: 8px; }

    /* ── Contact ── */
    .contact-me {
        padding-top: 80px;
        padding-bottom: 60px;
    }

    .contact-me h1 {
        font-size: 28px;
    }

    .contact-sub {
        font-size: 16px;
    }

    .contact-tiles {
        gap: 1rem;
    }

    .contact-tile {
        width: 100px;
        height: 100px;
    }

    .contact-tile img {
        width: 36px;
        height: 36px;
    }

    /* ── Nav ── */
    nav ul {
        flex-wrap: wrap;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
        justify-content: center;
    }

    nav a {
        font-size: 14px;
    }

    /* Shrink section divider spacing */
    .section-divider {
        letter-spacing: 6px;
        font-size: 14px;
    }
}