/* ==========================================================================
   New sections (Nov 2026): new project cards, skill tags, Events,
   Claude certificates + MLE tracker. Loaded after main.css.
   ========================================================================== */

/* ---------- Mobile menu: room for the two new links ---------- */
@media only screen and (max-width: 993px) {
    .nav-bar.active {
        height: 560px;
    }
}

/* ---------- Skills: "new" tag ---------- */
.skill-new {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    border-radius: 99px;
    background: #9b1f1f;
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .04em;
    text-transform: uppercase;
    vertical-align: 2px;
}

.skill-soon {
    background: transparent;
    border: 1px dashed #919090;
    color: #6f6e6e;
}

/* ---------- Skills: "Others" group ----------
   In the HTML, "Others" comes after the main skills list, so phones and
   tablets show it last with no tricks. On desktop a CSS grid moves it to the
   left column, under "Hello There!", and lines its end up with "Frameworks".
   (No display: contents or order here: iPhone Safari has bugs with both.) */
@media (min-width: 994px) {
    .skills {
        display: grid;
        grid-template-columns: calc(40% + 11.5rem) minmax(0, 1fr);
        grid-template-rows: auto 1fr;
        align-items: start;
    }

    .skills_text {
        grid-column: 1;
        grid-row: 1;
        max-width: none;
    }

    .skills_others {
        grid-column: 1;
        grid-row: 2;
        align-self: end;
        margin: 2.5rem 1.5rem 0 10rem;
        text-align: left;
    }

    .skills_div {
        grid-column: 2;
        grid-row: 1 / span 2;
        align-self: stretch;
        width: auto;
        display: flex;
        flex-direction: column;
    }

    /* if the left column is ever the taller one, the right list moves down instead */
    .skills_div .appear {
        margin-top: auto;
    }

    .skills_others h4 {
        padding-left: 0;
    }

    .skills_others ul {
        padding-left: 0;
    }

    .skills_others li {
        padding-right: 0;
    }
}

/* ---------- Projects: Clothing Recognition + Chess Board Detector stacked next to Sepira ---------- */
.projects-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

@media (min-width: 769px) {
    .projects > .projects-stack {
        justify-content: space-between;
        gap: 40px;
        margin: 20px 0;
    }

    .projects-stack .clothing_project,
    .projects-stack .chess_project {
        width: 100%;
        max-width: 460px;
        margin: 0 auto;
        padding-top: 0;
    }
}

/* ---------- New project cards ---------- */
.projects .project_card {
    width: 100%;
    max-width: 520px;
    margin: 20px auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.projects .project_card p {
    margin-bottom: 1rem;
}

.projects .project_card .shown-pop-up {
    width: 100%;
    margin-top: auto;
}

.projects .project_card img.photo {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    background: #ddd;
}

.project-tag {
    display: inline-block;
    margin-bottom: .6rem;
    padding: 3px 12px;
    border-radius: 99px;
    border: 1px solid rgba(0, 0, 0, .18);
    color: #555;
    font-size: 13px;
    letter-spacing: .03em;
}

.project-tag--new {
    border-color: #9b1f1f;
    background: #9b1f1f;
    color: #fff;
}

.project-tag i {
    margin-right: 4px;
    color: #f3c969;
}

.project-link {
    display: inline-block;
    margin-top: 4px;
    color: #9b1f1f;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid rgba(155, 31, 31, .35);
}

.project-link i {
    font-size: 11px;
    margin-left: 2px;
}

.project-link:hover {
    color: #0D0A0B;
    border-color: #0D0A0B;
}

.modal-text-new {
    max-height: 68vh;
}

/* ---------- Dialess pop-up: demo video ---------- */
.modal-img--video {
    flex: 1 1 52%;
    min-width: 0;
    align-self: flex-start;
}

.modal-video {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    background: #000;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}

.modal-video-caption {
    margin: .6rem 0 0;
    font-size: 13px;
    color: #777;
    text-align: center;
}

/* Tablets and phones: video on top, text below */
@media (max-width: 993px) {
    .modal-body--video {
        flex-direction: column;
    }

    .modal-body--video .modal-img--video {
        display: block !important;
        flex: 0 0 auto;
        align-self: stretch;
        margin: 0 0 1rem;
    }

    .modal-body--video .modal-text {
        max-width: 100%;
    }
}

.modal-text-new em {
    color: #9b1f1f;
    font-style: normal;
    font-weight: 600;
}

@media (max-width: 768px) {
    .projects .project_card {
        max-width: 400px;
        padding: 0 4px;
    }
}

/* ==========================================================================
   Events
   ========================================================================== */
.events-section {
    background: #0D0A0B;
    color: #fff;
    font-family: "Space Grotesk", sans-serif;
}

.events {
    max-width: 1100px;
    margin: 0 auto;
    padding: 6rem 2rem 7rem;
}

.events-intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.events-intro::after {
    content: "";
    display: block;
    width: 16rem;
    height: 1px;
    margin: 2rem 0 3rem;
    background: rgba(255, 255, 255, .15);
}

.events-intro h3 {
    color: #c43a3a;
    text-transform: uppercase;
    font-size: 20px;
    margin: 0 0 .5rem;
}

.events-intro h1 {
    font-size: 30px;
    margin: 0;
}

.events-intro h5 {
    margin-top: .5rem;
    font-size: 20px;
    color: #919090;
    font-weight: 700;
}

.events-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.event-card {
    display: flex;
    gap: 24px;
    padding: 28px;
    border-radius: 18px;
    background: #161314;
    border: 1px solid #2a2526;
    transition: transform .25s ease, border-color .25s ease;
}

.event-card:hover {
    transform: translateY(-4px);
    border-color: #9b1f1f;
}

.event-date {
    flex: 0 0 92px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px 6px;
    border-radius: 14px;
    background: #9b1f1f;
    text-align: center;
    align-self: flex-start;
}

.event-day {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.1;
}

.event-month {
    margin-top: 4px;
    font-size: 13px;
    opacity: .85;
}

.event-body h2 {
    margin: .5rem 0 .6rem;
    font-size: 26px;
    font-weight: 700;
}

.event-body p {
    margin: 0 0 1rem;
    color: #c9c4c5;
    line-height: 1.55;
    font-size: 15px;
}

.event-body p strong {
    color: #fff;
}

.event-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: #919090;
    font-size: 14px;
}

.event-pill {
    padding: 2px 10px;
    border-radius: 99px;
    border: 1px solid rgba(255, 255, 255, .25);
    color: #fff;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.event-result {
    display: inline-block;
    margin: 0 0 .9rem !important;
    padding: 4px 12px;
    border-radius: 12px;
    background: rgba(243, 201, 105, .12);
    border: 1px solid rgba(243, 201, 105, .45);
    color: #f3d68f !important;
    font-size: 13px !important;
    font-weight: 500;
}

.event-result i {
    margin-right: 6px;
}

.event-links {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
}

.event-link {
    text-decoration: none;
    padding: 0;
    border: none;
    background: none;
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 1px solid #9b1f1f;
}

.event-link i {
    margin-left: 4px;
    transition: transform .2s;
}

.event-link:hover i {
    transform: translateX(4px);
}

@media (max-width: 993px) {
    .events-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .events {
        padding: 4.5rem 1.2rem 5rem;
    }

    .event-card {
        flex-direction: column;
        gap: 14px;
        padding: 22px;
    }

    .event-date {
        flex: 0 0 auto;
        flex-direction: row;
        gap: 8px;
        padding: 6px 14px;
    }

    .event-day {
        font-size: 18px;
    }

    .event-month {
        margin: 0;
    }
}

/* ==========================================================================
   Claude section: launch-post style (ivory, serif, clay)
   ========================================================================== */
.claude-section {
    --ivory: #F0EEE6;
    --paper: #FAF9F5;
    --ink: #141413;
    --muted: #5E5D59;
    --line: rgba(20, 20, 19, .12);
    --clay: #D97757;
    --clay-dark: #C6613F;
    --clay-light: #EBC9B7;
    --sage: #629987;
    --sage-light: #BCD1CA;
    --lilac-light: #D3CFE6;
    --oat: #E3DACC;
    --serif: "Source Serif 4", "Tiempos Headline", Georgia, serif;
    --sans: "Space Grotesk", system-ui, sans-serif;

    background: var(--ivory);
    color: var(--ink);
    font-family: var(--sans);
}

.claude-section h1,
.claude-section h2,
.claude-section h4,
.claude-section p,
.claude-section figure,
.claude-section ol {
    margin: 0;
    padding: 0;
}

.claude-section svg {
    width: 100%;
    height: 100%;
}

.claude-wrap {
    max-width: 1160px;
    margin: 0 auto;
    padding: 8rem 2rem 7rem;
}

/* ---- Hero ---- */
.claude-hero {
    text-align: center;
    max-width: 820px;
    margin: 0 auto 4.5rem;
}

.claude-eyebrow {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1.4rem !important;
}

.claude-title {
    font-family: var(--serif);
    font-weight: 500;
    font-size: clamp(2.6rem, 6vw, 4.75rem);
    line-height: 1.04;
    letter-spacing: -0.02em;
    font-optical-sizing: auto;
}

.claude-title em {
    font-style: italic;
    color: var(--clay);
}

.claude-lede {
    max-width: 600px;
    margin: 1.6rem auto 0 !important;
    font-size: 19px;
    line-height: 1.5;
    color: var(--muted);
}

.claude-stats {
    display: flex;
    justify-content: center;
    margin-top: 2.6rem;
    padding: 0;
}

.claude-stats li {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 2.2rem;
    border-left: 1px solid var(--line);
}

.claude-stats li:first-child {
    border-left: none;
}

.claude-stats b {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 34px;
    line-height: 1.1;
}

.claude-stats span {
    margin-top: 4px;
    font-size: 13px;
    color: var(--muted);
}

/* ---- Certificates grid ---- */
.claude-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 22px;
}

.badge-card {
    grid-column: span 2;
    display: flex;
    flex-direction: column;
    padding: 12px;
    border-radius: 20px;
    background: var(--paper);
    border: 1px solid var(--line);
    transition: transform .3s ease, box-shadow .3s ease;
}

.badge-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(20, 20, 19, .08);
}

.badge-img {
    display: block;
    border-radius: 12px;
    overflow: hidden;
}

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

.badge-card figcaption {
    padding: 16px 8px 6px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.badge-card h4 {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 21px;
    line-height: 1.2;
}

.badge-card p {
    margin-top: 6px !important;
    font-size: 14px;
    color: var(--muted);
}

.badge-card figcaption a {
    margin-top: auto;
    padding-top: 14px;
    align-self: flex-start;
    color: var(--clay-dark);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.badge-card figcaption a i {
    font-size: 11px;
    margin-left: 3px;
}

.badge-card figcaption a:hover {
    color: var(--ink);
}

.course-card {
    grid-column: span 3;
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 22px 24px;
    border-radius: 20px;
    background: var(--paper);
    border: 1px solid var(--line);
}

.course-shape {
    flex: 0 0 88px;
    height: 88px;
    padding: 20px;
    /* hand-cut polygon, echoing the badges */
    clip-path: polygon(30% 2%, 72% 0%, 96% 22%, 100% 62%, 82% 94%, 40% 100%, 6% 84%, 0% 40%);
    background: var(--sage-light);
}

.course-card--lilac .course-shape {
    background: var(--lilac-light);
}

.course-card h4 {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 21px;
    line-height: 1.2;
}

.course-card p {
    margin-top: 4px !important;
    font-size: 14px;
    color: var(--muted);
}

.course-done {
    display: inline-block;
    margin-top: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
}

.course-done i {
    color: var(--sage);
    margin-right: 4px;
}

/* ---- Tracker ---- */
.tracker {
    margin-top: 6rem;
    padding: 3.5rem;
    border-radius: 28px;
    background: var(--paper);
    border: 1px solid var(--line);
}

.tracker-head {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 3rem;
    align-items: end;
}

.claude-h2 {
    font-family: var(--serif);
    font-weight: 500;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.08;
    letter-spacing: -0.015em;
}

.tracker-intro {
    font-size: 16px;
    line-height: 1.6;
    color: var(--muted);
}

.tracker-meter {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    margin: 3rem 0 2.6rem;
    padding: 2.2rem 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.tracker-number {
    flex: 0 0 auto;
    font-family: var(--serif);
    font-weight: 500;
    font-size: clamp(4.5rem, 10vw, 7.5rem);
    line-height: .9;
    letter-spacing: -0.04em;
    color: var(--clay);
    font-variant-numeric: tabular-nums;
}

.tracker-sign {
    font-size: .5em;
    margin-left: 2px;
    vertical-align: .62em;
}

.tracker-track {
    flex: 1;
}

.tracker-bar {
    position: relative;
    height: 18px;
    border-radius: 99px;
    background: var(--oat);
    overflow: hidden;
}

/* faint quarter marks */
.tracker-bar::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(90deg, transparent 0 calc(25% - 1px), rgba(20, 20, 19, .12) calc(25% - 1px) 25%);
}

.tracker-fill {
    height: 100%;
    width: 0;
    border-radius: 99px;
    background: var(--clay);
    transition: width 1.8s cubic-bezier(.2, .8, .2, 1);
}

.tracker-axis {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    font-size: 13px;
    color: var(--muted);
}

.milestones {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 3rem;
    padding: 0;
}

.ms {
    display: grid;
    grid-template-columns: 18px 1fr 92px;
    align-items: center;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}

.ms-text h4 {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.ms-text p {
    margin-top: 3px !important;
    font-size: 14px;
    line-height: 1.4;
    color: var(--muted);
}

.ms-bar {
    position: relative;
    height: 6px;
    border-radius: 99px;
    background: var(--oat);
}

.ms-bar i {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    border-radius: 99px;
    background: var(--clay);
    transition: width 1.4s cubic-bezier(.2, .8, .2, 1);
}

.ms-bar::after {
    content: attr(data-pct);
    position: absolute;
    right: 0;
    top: 10px;
    font-size: 12px;
    color: var(--muted);
}

.ms-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--clay);
    background: transparent;
}

.ms.is-done .ms-dot,
.ms-dot--done {
    background: var(--clay);
}

.ms.is-active .ms-dot,
.ms-dot--active {
    background: linear-gradient(90deg, var(--clay) 50%, transparent 50%);
}

.ms.is-todo .ms-dot,
.ms-dot--todo {
    border-color: rgba(20, 20, 19, .3);
}

.ms.is-todo .ms-text h4 {
    color: var(--muted);
}

.tracker-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    margin-top: 2rem;
    font-size: 13px;
    color: var(--muted);
}

.tracker-legend span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tracker-legend .ms-dot {
    width: 12px;
    height: 12px;
}

.tracker-note {
    margin-top: 1rem !important;
    max-width: 760px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--muted);
}

.tracker-note a {
    color: var(--clay-dark);
}

/* ---- Claude section: tablet ---- */
@media (max-width: 993px) {
    .claude-wrap {
        padding: 6rem 1.6rem 5rem;
    }

    .claude-grid {
        gap: 16px;
    }

    .badge-card h4,
    .course-card h4 {
        font-size: 19px;
    }

    .tracker {
        padding: 2.5rem 2rem;
    }

    .tracker-head {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

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

/* ---- Claude section: phone ---- */
@media (max-width: 768px) {
    .claude-wrap {
        padding: 4.5rem 1.1rem 4rem;
    }

    .claude-hero {
        margin-bottom: 3rem;
    }

    .claude-lede {
        font-size: 17px;
    }

    .claude-stats li {
        padding: 0 1rem;
    }

    .claude-stats b {
        font-size: 26px;
    }

    .claude-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .badge-card,
    .course-card {
        grid-column: span 1;
    }

    .course-card {
        gap: 16px;
        padding: 18px;
    }

    .course-shape {
        flex: 0 0 70px;
        height: 70px;
        padding: 15px;
    }

    .tracker {
        margin-top: 4rem;
        padding: 2rem 1.2rem;
        border-radius: 22px;
    }

    .tracker-meter {
        flex-direction: column;
        align-items: stretch;
        gap: 1.4rem;
        margin: 2rem 0 1.6rem;
        padding: 1.6rem 0;
    }

    .tracker-axis {
        font-size: 11px;
    }

    .ms {
        grid-template-columns: 16px 1fr 64px;
        gap: 12px;
    }
}

.event-link:hover,
.event-link:focus {
    color: #fff;
}
