/* ==============================
   CSS RESET & ROOT
============================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #EBEBEB;
    --bg-alt: #F3F3F3;
    --black: #000000;
    --dark: #222222;
    --grey: #555555;
    --light-grey: #AAAAAA;
    --border: #DADADA;
    --yellow: #EBA92B;
    --red: #D9534F;
    --teal: #5BC0DE;
    --white: #FFFFFF;
    --font: 'Work Sans', sans-serif;
    --nav-h: 68px;
    --max-w: 1100px;
    --radius: 50px;
    --transition: 0.22s ease;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font);
    background-color: var(--bg);
    color: var(--dark);
    line-height: 1.7;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ==============================
   LAYOUT HELPERS
============================== */
.container {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 32px;
}

.section {
    padding: 90px 0;
}

/* Inner pages — full-height main area */
.page-main {
    min-height: calc(100vh - var(--nav-h) - 100px);
}

.section-alt {
    background-color: var(--bg-alt);
}

.section-heading {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    color: var(--black);
    letter-spacing: -0.02em;
    margin-bottom: 56px;
    position: relative;
    display: inline-block;
}

.section-heading::after {
    content: '';
    display: block;
    width: 48px;
    height: 4px;
    background: var(--yellow);
    border-radius: 2px;
    margin-top: 10px;
}

/* ==============================
   HEADER / NAV
============================== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(235, 235, 235, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    height: var(--nav-h);
    display: flex;
    align-items: center;
}

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

.nav-brand {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--black);
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.nav-dot {
    display: inline-block;
    width: 28px;
    height: 28px;
    background: transparent;
    flex-shrink: 0;
    transition: transform var(--transition);
}

.nav-brand:hover .nav-dot {
    transform: scale(1.25);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--grey);
    padding: 4px 12px;
    border-radius: 4px;
    transition: color var(--transition), background var(--transition);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.nav-link:hover {
    color: var(--black);
    background: rgba(0, 0, 0, 0.05);
}

.nav-active {
    color: var(--black) !important;
    font-weight: 700;
    border-bottom: 2px solid var(--yellow);
    padding-bottom: 2px;
}

.nav-sep {
    color: var(--border);
    font-weight: 300;
    user-select: none;
    padding: 0 2px;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.3rem;
    color: var(--dark);
    padding: 6px;
    border-radius: 6px;
}

.nav-toggle:hover {
    background: rgba(0, 0, 0, 0.07);
}

/* Mobile nav */
@media (max-width: 640px) {
    .nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-h);
        left: 0;
        right: 0;
        background: var(--bg);
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 32px 24px;
        border-bottom: 1px solid var(--border);
        gap: 0;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-sep {
        display: none;
    }

    .nav-link {
        padding: 10px 0;
        font-size: 1rem;
        width: 100%;
    }
}

/* ==============================
   HERO
============================== */
.hero {
    background-color: var(--bg);
    min-height: calc(100vh - var(--nav-h));
    display: flex;
    align-items: stretch;
    padding-bottom: 0;
}

.hero-container {
    display: flex;
    align-items: stretch;
    gap: 72px;
}

/* Hero Image (right side) */
.hero-image-wrap {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.hero-image {
    max-height: 665px;
    width: auto;
    object-fit: contain;
    object-position: bottom;
    display: block;
}

/* Hero Text */
.hero-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-heading {
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 900;
    line-height: 0.95;
    color: var(--black);
    letter-spacing: -0.04em;
    margin-bottom: 20px;
    animation: fadeUp 0.6s ease both;
}

.hero-sub {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--grey);
    max-width: 460px;
    margin-bottom: 40px;
    font-weight: 400;
    animation: fadeUp 0.7s 0.1s ease both;
}

.hero-sub strong {
    color: var(--black);
    font-weight: 700;
}

/* CTA Buttons */
.hero-cta-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    animation: fadeUp 0.7s 0.2s ease both;
    /* allow orbiting ink blob to extend outside button bounds */
    overflow: visible;
}

/* Blob wrapper — positions canvas exactly over the circle button */
.blob-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 110px;
    height: 110px;
    /* allow orbiting blob to show outside the button rim */
    overflow: visible;
}

.blob-canvas {
    position: absolute;
    /* centred on the wrapper, but larger so orbit trail spans outside */
    width: 200%;
    height: 200%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    /* NO border-radius — we clip via the canvas clip path in JS, not CSS */
    z-index: 1;
}

.blob-wrapper .cta-btn {
    position: relative;
    z-index: 2;
    /* background is now drawn by canvas during animation, then restored */
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--white);
    transition: transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    text-align: center;
}

.cta-btn:hover {
    transform: translateY(-5px) scale(1.06);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
    color: var(--white);
}

.cta-yellow {
    background-color: var(--yellow);
}

.cta-red {
    background-color: var(--red);
}

.cta-teal {
    background-color: var(--teal);
}

/* Responsive hero */
@media (max-width: 860px) {
    .hero-container {
        flex-direction: column;
        gap: 40px;
        text-align: center;
    }

    .hero-sub {
        margin: 0 auto 36px;
    }

    .hero-cta-row {
        justify-content: center;
    }

    .hero-heading {
        font-size: clamp(3.5rem, 15vw, 6rem);
    }

    .hero-image {
        max-height: 320px;
    }
}

@media (max-width: 480px) {
    .hero-image {
        max-height: 360px;
    }

    .cta-btn {
        width: 90px;
        height: 90px;
        font-size: 0.8rem;
    }

    .blob-wrapper {
        width: 90px;
        height: 90px;
    }
}

/* ==============================
   RESUME SECTION
============================== */
.resume-section {
    background-color: var(--bg);
}

.resume-block {
    display: flex;
    gap: 48px;
    margin-bottom: 56px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--border);
}

.resume-block:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.resume-label {
    font-size: 1rem;
    font-weight: 800;
    color: var(--black);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    min-width: 180px;
    padding-top: 4px;
}

.resume-entries {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.resume-entry {
    display: flex;
    gap: 32px;
}

.resume-meta {
    min-width: 120px;
    flex-shrink: 0;
}

.resume-date {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--light-grey);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.resume-role {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 4px;
}

.resume-company {
    font-size: 0.9rem;
    color: var(--yellow);
    font-weight: 600;
    margin-bottom: 8px;
}

.resume-desc {
    font-size: 0.9rem;
    color: var(--grey);
    line-height: 1.7;
}

/* Education layout */
.edu-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 10px;
}

.edu-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 6px;
    margin-top: 2px;
}

.edu-grade {
    margin-top: 10px;
    font-weight: 600;
    color: var(--grey);
}

.skill-pill-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.skill-pill {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    color: var(--dark);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: background var(--transition), border-color var(--transition),
        color var(--transition);
    /* pop reveal — starts hidden */
    opacity: 0;
    transform: scale(0.5);
}

.skill-pill.popped {
    animation: popIn 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.skill-pill:hover {
    background: var(--yellow);
    border-color: var(--yellow);
    color: var(--white);
}

/* Responsive resume */
@media (max-width: 720px) {
    .resume-block {
        flex-direction: column;
        gap: 12px;
    }

    .resume-label {
        min-width: unset;
    }

    .resume-entry {
        flex-direction: column;
        gap: 8px;
    }

    .resume-meta {
        min-width: unset;
    }
}

/* ==============================
   PROJECTS SECTION
============================== */
.projects-section {
    background-color: var(--bg-alt);
}

.project-row {
    display: flex;
    align-items: center;
    gap: 64px;
    padding-bottom: 72px;
    margin-bottom: 72px;
    border-bottom: 1px solid var(--border);
}

.project-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

/* Alternate layout: image on left */
.project-row-alt {
    flex-direction: row-reverse;
}

.project-text {
    flex: 1;
}

.project-title {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 800;
    color: var(--black);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.project-desc {
    font-size: 0.95rem;
    color: var(--grey);
    margin-bottom: 20px;
    line-height: 1.75;
}

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

.p-tag {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--dark);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.project-btn {
    display: inline-block;
    padding: 11px 28px;
    border-radius: var(--radius);
    background: var(--black);
    color: var(--white);
    font-family: var(--font);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.project-btn:hover {
    background: var(--yellow);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(235, 169, 43, 0.35);
}

.project-img-wrap {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.1);
    transition: box-shadow var(--transition), transform var(--transition);
}

.project-img-wrap:hover {
    box-shadow: 0 16px 56px rgba(0, 0, 0, 0.16);
    transform: translateY(-4px);
}

.project-img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.project-img-wrap:hover .project-img {
    transform: scale(1.03);
}

/* Responsive projects */
@media (max-width: 800px) {

    .project-row,
    .project-row-alt {
        flex-direction: column;
        gap: 32px;
    }

    .project-img {
        height: 220px;
    }
}

/* ==============================
   CONTACT SECTION
============================== */
.contact-section {
    background-color: var(--bg);
}

.contact-wrapper {
    display: flex;
    gap: 72px;
    align-items: flex-start;
}

.contact-info {
    flex: 1;
    min-width: 220px;
}

.contact-intro {
    font-size: 1rem;
    color: var(--grey);
    margin-bottom: 32px;
    line-height: 1.75;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    font-size: 0.95rem;
    color: var(--dark);
    font-weight: 500;
}

.contact-icon {
    font-size: 1.1rem;
    color: var(--yellow);
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

/* Contact Form */
.contact-form {
    flex: 1.4;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 18px;
    flex: 1;
}

.form-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--grey);
    margin-bottom: 6px;
}

.form-input,
.form-textarea {
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    background: var(--white);
    font-family: var(--font);
    font-size: 0.95rem;
    color: var(--dark);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--yellow);
    box-shadow: 0 0 0 3px rgba(235, 169, 43, 0.15);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    padding: 13px 36px;
    background: var(--yellow);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.submit-btn:hover {
    background: #d4991f;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(235, 169, 43, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Responsive contact */
@media (max-width: 760px) {
    .contact-wrapper {
        flex-direction: column;
        gap: 40px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* ==============================
   FOOTER
============================== */
.footer {
    background-color: var(--black);
    color: var(--white);
    padding: 40px 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-name {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-icon {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.6);
    transition: color var(--transition), transform var(--transition);
}

.footer-icon:hover {
    color: var(--yellow);
    transform: translateY(-2px);
}

.footer-copy {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.02em;
}

@media (max-width: 580px) {
    .footer-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
    }
}

/* ==============================
   TOAST NOTIFICATION
============================== */
.toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    transform: translateY(120%);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    z-index: 999;
    border-left: 4px solid var(--yellow);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    border-left-color: #3bb077;
}

.toast.error {
    border-left-color: var(--red);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast-icon {
    font-size: 1rem;
    color: var(--yellow);
    flex-shrink: 0;
}

.toast.success .toast-icon {
    color: #3bb077;
}

.toast.error .toast-icon {
    color: var(--red);
}

.toast-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 2px;
}

.toast-message {
    font-size: 0.8rem;
    color: var(--grey);
}

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

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

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}