/* ==========================================================================
   Portfolio stylesheet
   --------------------------------------------------------------------------
   Table of contents
     01 · Design tokens
     02 · Base & reset
     03 · Header / navbar
     04 · Home (hero)
     05 · About
     06 · Skills (chip grid)
     07 · Shared card blocks (education / certificates)
     07b · Experience timeline (2-column zigzag)
     08 · Projects
     09 · Two-column cards (certificates & courses)
     10 · Contact
     11 · Footer & back-to-top
     12 · Modals, galleries & lightbox
     13 · Animations
     14 · Accessibility helpers
     15 · Responsive (≤900px, ≤700px, ≤400px)
   ========================================================================== */

/* ============================ 01 · Design tokens ========================== */

:root {
    --accent: #0ef;
    --accent-soft: rgba(0, 238, 255, 0.08);
    --bg: #000;
    --surface: #252525;
    --text: #fff;
    --text-muted: #b1b1b1;
    --on-accent: #081b29;
    --card-glow: 1px 1px 20px #012290f7, 1px 1px 40px #0053b8f7;
    /* toned-down variant: smaller blur + lower opacity, so cards sitting close
       together in a grid don't bleed their halos into each other */
    --card-glow-soft: 0 2px 10px rgba(1, 34, 144, .45), 0 4px 20px rgba(0, 83, 184, .28);
    --card-glow-soft-hover: 0 2px 14px rgba(1, 34, 144, .6), 0 6px 26px rgba(0, 83, 184, .42);
    --accent-glow: 0 0 5px var(--accent), 0 0 25px var(--accent);
}

/* ============================ 02 · Base & reset =========================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

html {
    scroll-behavior: smooth;
}

/* stop the fixed header from covering a section heading on nav jumps */
section[id] {
    scroll-margin-top: 90px;
}

body {
    color: var(--text);
    background-color: var(--bg);
}

/* ========================== 03 · Header / navbar ========================== */

.header {
    position: fixed;
    width: 100%;
    padding: 20px 10%;
    background: var(--surface);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    overflow: hidden;
}

.logo {
    position: relative;
    font-size: 25px;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 5px;
    opacity: 0;
    animation: slideRight 1s ease forwards;
}

.navbar a {
    font-size: 20px;
    display: inline-block;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    margin-left: 35px;
    transition: .3s;
    opacity: 0;
    animation: slideUP .5s ease forwards;
    animation-delay: calc(.2s * var(--i));
}

.navbar a:hover,
.navbar a.active {
    color: var(--accent);
    text-decoration: underline;
}

/* ============================ 04 · Home (hero) ============================ */

.home {
    position: relative;
    width: 100%;
    justify-content: space-between;
    min-height: 100vh;
    background-color: var(--bg);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    padding: 60px 10% 0;
}

.home-content {
    max-width: 600px;
}

.home-content h1 {
    font-size: 50px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 5px;
    opacity: 0;
    padding: 10px 0;
    animation: slideBottom 1s ease forwards;
    animation-delay: 1s;
}

.home-content h3 {
    font-size: 30px;
    font-weight: 700;
    opacity: 0;
    animation: slideBottom 1s ease forwards;
    animation-delay: .7s;
}

.home-content h4 {
    font-size: 30px;
    font-weight: 700;
    opacity: 0;
    animation: slideTop 1s ease forwards;
    animation-delay: calc(.2s * var(--i));
    margin-bottom: 30px;
}

.home-content h4 span {
    color: var(--accent);
    font-size: 30px;
    font-weight: 700;
}

.home-sci a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 2px solid var(--accent);
    border-radius: 50%;
    font-size: 20px;
    color: var(--accent);
    text-decoration: none;
    margin: 30px 15px 30px 0;
    opacity: 0;
    animation: slideTop 1s ease forwards;
    animation-delay: calc(.2s * var(--i));
}

.home-sci a:hover {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 20px var(--accent);
}

.btn-box {
    display: inline-block;
    padding: 12px 28px;
    background: var(--accent);
    border-radius: 40px;
    font-size: 15px;
    text-align: center;
    color: var(--on-accent);
    letter-spacing: 1px;
    text-decoration: none;
    font-weight: 600;
    opacity: 0;
    animation: slideTop .5s ease forwards;
    animation-delay: calc(.2s * var(--i));
}

.btn-box:hover {
    box-shadow: var(--accent-glow);
}

/* flex item beside .home-content — vertically centred by .home's align-items */
.img {
    flex: 0 0 auto;
    width: 40%;
    max-width: 520px;
    margin-left: 4%;
    opacity: 0;
    animation: slideUP 1s ease forwards;
    animation-delay: 1s;
}

.responsive {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    box-shadow: 0 0 5pc var(--accent), 0 0 5px var(--accent), 0 0 10px var(--accent);
    border-radius: 50%;
}

/* =============================== 05 · About =============================== */

.about {
    background-color: var(--bg);
    display: grid;
    grid-template-columns: repeat(2, .5fr);
    width: 100%;
    justify-content: space-between;
    min-height: 100vh;
    padding: 70px 5% 0;
}

.about-img {
    display: inline-block;
    padding-right: 10%;
    margin-top: 2.5%;
}

.abt-res {
    width: 100%;
    height: auto;
    max-width: 470px;
    max-height: 470px;
    border-radius: 90px;
    box-shadow: 0 0 5pc var(--accent), 0 0 5px var(--accent), 0 0 10px var(--accent);
    border: var(--accent) 5px solid;
}

.about-text {
    margin-right: 2%;
}

.about-text h2 {
    font-size: 60px;
    letter-spacing: 5px;
}

.about-text h2 span {
    color: var(--accent);
}

/* multi-paragraph bio: tighter type and per-paragraph spacing so three
   paragraphs fit the two-column layout without overflowing */
.about-text p {
    margin-top: 5px;
    font-size: 17px;
    line-height: 1.8;
    letter-spacing: .3px;
    margin-bottom: 1.1rem;
    text-align: left;
}

.abtbtn-box {
    display: inline-block;
    margin-top: 1.6rem;
    padding: 12px 28px;
    background: var(--accent);
    border-radius: 40px;
    font-size: 15px;
    text-align: center;
    color: var(--on-accent);
    letter-spacing: 1px;
    text-decoration: none;
    font-weight: 600;
}

.abtbtn-box:hover {
    box-shadow: var(--accent-glow);
}

/* ======================== 06 · Skills (chip grid) ========================= */

.subtitle {
    text-align: center;
    font-size: 60px;
    padding-bottom: 10px;
    padding-top: 70px;
}

.subtitle span {
    color: var(--accent);
}

.skills-groups {
    max-width: 1050px;
    margin: 0 auto;
    padding: 30px 20px 70px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px 60px;
}

.skills-group-title {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 16px;
    border-left: 4px solid var(--accent);
    padding-left: 12px;
}

.skills-grid {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid var(--accent);
    border-radius: 999px;
    font-size: 15px;
    font-weight: 500;
    background: var(--accent-soft);
    transition: box-shadow .3s, transform .3s;
}

.chip:hover {
    box-shadow: 0 0 12px var(--accent);
    transform: translateY(-2px);
}

.chip i {
    font-size: 22px;
}

.chip-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

/* ============ 07 · Shared card blocks (edu / experience / certs) ========== */

.main-text h2 {
    font-size: 60px;
    line-height: 1;
    text-align: center;
    padding: 50px;
    padding-bottom: 110px;
}

.main-text h2 span {
    color: var(--accent);
}

.edu-container {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    gap: 20px;
}

.edu-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    width: 300px;
    height: auto;
    gap: 20px;
    background-color: white;
    position: relative;
    border-radius: 5px;
    cursor: pointer;
    padding: 20px;
    overflow: hidden;
    box-shadow: var(--card-glow);
    text-decoration: none;
    color: #007bff;
}

.edu-row img {
    width: 100%;
    max-width: 300px;
    max-height: 300px;
    object-fit: contain;
    border-radius: 5px;
    display: block;
    transition: transform 0.5s;
    padding: 10px;
}

.edu-row:hover img {
    transform: scale(1.01);
}

.edu-row:hover .layer {
    height: 100%;
    opacity: 1;
}

.sub-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 600px;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.sub-text a {
    color: #007bff;
    text-decoration: none;
}

.sub-text a:hover {
    text-decoration: underline;
}

.sub-text p {
    line-height: 1.6;
    margin: 15px 0;
    text-align: justify;
}

.sub-text ul {
    padding-left: 20px;
    line-height: 1.6;
    margin: 10px 0;
    text-align: justify;
}

.date {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    margin: 6px 0 0;
}

/* Hover overlay shared by cards */

.layer {
    width: 100%;
    max-height: 500px;
    height: 0;
    opacity: 0;
    /* fully opaque so the card text underneath never bleeds through */
    background: linear-gradient(180deg, #04141d, #00606f);
    position: absolute;
    border-radius: 8px;
    left: 0;
    bottom: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    transition: height 0.5s;
}

.layer h5 {
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.layer p {
    color: #f0f0f0;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.55;
    text-align: center;
}

.layer i {
    color: var(--accent);
    margin-top: 18px;
    font-size: 20px;
    background: #000;
    border: 1px solid var(--accent);
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: box-shadow .3s;
}

.layer a:hover i {
    box-shadow: 0 0 14px var(--accent);
}

.layer-hint {
    margin-top: 14px;
    font-size: 12px;
    letter-spacing: .5px;
    color: var(--accent);
}

/* ============= 07b · Experience timeline (2-column zigzag) ================ */

.timeline {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 20px 90px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
}

/* the vertical accent line */
.timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    background: linear-gradient(180deg, var(--accent), rgba(0, 238, 255, 0.1));
}

/* auto-placement pairs the cards left/right around the line */
.timeline-item {
    position: relative;
    padding: 0 44px 48px 0;
}

.timeline-item:nth-child(even) {
    padding: 0 0 48px 44px;
}

/* glowing dot on the line */
.timeline-item::after {
    content: "";
    position: absolute;
    top: 26px;
    right: -9px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg);
    border: 3px solid var(--accent);
    box-shadow: 0 0 12px var(--accent);
}

.timeline-item:nth-child(even)::after {
    right: auto;
    left: -9px;
}

.timeline-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 238, 255, 0.25);
    border-radius: 14px;
    padding: 24px;
    text-align: left;
    transition: transform .3s, box-shadow .3s, border-color .3s;
}

.timeline-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 0 18px rgba(0, 238, 255, 0.35);
}

.timeline-head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 14px;
}

.timeline-logo {
    flex-shrink: 0;
    width: 54px;
    height: 54px;
    object-fit: contain;
    background: #fff;
    border-radius: 10px;
    padding: 6px;
}

.timeline-role {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

.timeline-company {
    display: inline-block;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    margin-top: 2px;
}

.timeline-company:hover {
    text-decoration: underline;
}

.timeline-date {
    display: inline-block;
    margin-top: 8px;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--accent);
    border: 1px solid rgba(0, 238, 255, 0.45);
    border-radius: 999px;
    padding: 2px 12px;
    background: var(--accent-soft);
}

.timeline-points {
    list-style: none;
}

.timeline-points li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 8px;
    font-size: 15px;
    line-height: 1.6;
    color: #ddd;
}

.timeline-points li::before {
    content: "\25B9";
    /* ▹ */
    position: absolute;
    left: 0;
    color: var(--accent);
}

.timeline-tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.timeline-tags li {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .5px;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid rgba(0, 238, 255, 0.35);
    border-radius: 999px;
    padding: 3px 12px;
}

/* ============================= 08 · Projects ============================== */

/* 4 cards per row on desktop. Flexbox (not grid) so a final incomplete
   row centers itself instead of hugging the left edge. */
.serv-container {
    --card-gap: 34px;
    --cards-per-row: 4;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: var(--card-gap);
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 40px 60px;
}

.row {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    flex: 0 0 calc((100% - (var(--cards-per-row) - 1) * var(--card-gap)) / var(--cards-per-row));
    min-height: 440px;
    border: 1px solid rgba(0, 238, 255, 0.3);
    padding: 20px;
    position: relative;
    border-radius: 8px;
    cursor: pointer;
    overflow: hidden;
    box-shadow: var(--card-glow-soft);
    transition: transform .3s, box-shadow .3s;
}

.row:hover {
    transform: translateY(-6px);
    box-shadow: var(--card-glow-soft-hover);
}

.row img {
    width: 100%;
    height: 220px;
    /* uniform image area keeps all cards aligned */
    object-fit: contain;
    border-radius: 15px;
    display: block;
    transition: transform 0.5s;
    padding: 10px;
}

.row:hover img {
    transform: scale(1.01);
}

.row:hover .layer {
    height: 100%;
    opacity: 1;
}

.center-text {
    text-align: center;
    margin: 0 auto;
    padding: 10px 0;
}

.project-title {
    font-size: 16px;
    font-weight: 600;
    padding: 8px 0 4px;
}

.project-summary {
    font-size: 13px;
    color: #ccc;
    line-height: 1.5;
    padding: 4px 0;
}

.accent-icon {
    color: var(--accent);
}

/* ============= 09 · Two-column cards (certificates & courses) ============= */

.cards-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 34px;
    align-items: stretch;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 40px 90px;
}

.info-card {
    display: flex;
    flex-direction: column;
    /* gap + margin-top:auto on the link keeps every card's button bottom-aligned
       with consistent spacing, whatever the text length */
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 238, 255, 0.25);
    border-radius: 14px;
    padding: 26px;
    text-align: left;
    transition: transform .3s, border-color .3s, box-shadow .3s;
}

.info-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 0 18px rgba(0, 238, 255, 0.35);
}

.info-card-head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.info-card-logo {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    object-fit: contain;
    background: #fff;
    border-radius: 10px;
    padding: 6px;
}

.info-card-icon {
    flex-shrink: 0;
    font-size: 46px;
    line-height: 1;
    color: var(--accent);
}

.info-card-title {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.35;
}

.info-card-issuer {
    margin-top: 4px;
    font-size: 14px;
    font-weight: 500;
    color: var(--accent);
}

.info-card p {
    font-size: 14.5px;
    line-height: 1.6;
    color: #ddd;
}

.info-card-meta {
    font-size: 13px;
    letter-spacing: .5px;
    color: var(--text-muted);
}

.info-card .date {
    margin-top: 0;
}

.info-card-link {
    margin-top: auto;
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    background: var(--accent-soft);
    border: 1px solid rgba(0, 238, 255, 0.45);
    border-radius: 999px;
    transition: background .3s, color .3s, box-shadow .3s;
}

.info-card-link:hover {
    background: var(--accent);
    color: var(--on-accent);
    box-shadow: 0 0 14px var(--accent);
}

/* ============================== 10 · Contact ============================== */

.contacts {
    display: grid;
    align-items: center;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    padding-left: 50px;
    margin-top: 100px;
}

.contact-text h2 {
    font-size: 90px;
    line-height: 1;
    margin-bottom: 25px;
    text-align: center;
}

.contact-text h2 span {
    color: var(--accent);
}

.contact-text h4 {
    margin: 15px 0;
    color: rgb(228, 228, 228);
    font-size: 20px;
    font-weight: 600;
}

.contact-text p {
    color: var(--text-muted);
    font-size: 20px;
    line-height: 30px;
    margin-bottom: 2rem;
}

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

.contact-list li {
    margin-bottom: 15px;
    display: block;
    letter-spacing: 2px;
}

.contact-list i {
    display: inline-block;
    color: var(--accent);
    font-size: 20px;
    font-weight: 600;
    margin-right: 8px;
}

.contact-list a {
    color: inherit;
    text-decoration: none;
}

.contact-list a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.contact-icons a {
    text-decoration: none;
}

.contact-icons i {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 2px solid var(--accent);
    border-radius: 50%;
    font-size: 20px;
    color: var(--accent);
    margin: 0 10px;
}

.contact-icons i:hover {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 20px var(--accent);
}

.contact-form form {
    position: relative;
}

.contact-form form input,
.contact-form form textarea {
    border: none;
    outline: none;
    width: 90%;
    padding: 18px;
    background: #555557;
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    border-radius: 0.5rem;
}

.contact-form textarea {
    resize: none;
    height: 220px;
}

.contact-form form .send {
    display: inline-block;
    padding: 14px 60px;
    background: var(--accent);
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: var(--on-accent);
    letter-spacing: 1px;
    text-decoration: none;
    font-weight: 600;
    opacity: 0;
    animation: slideTop 1s ease forwards;
    animation-delay: 2s;
    box-shadow: var(--accent-glow);
}

.contact-form form .send:hover {
    box-shadow: 0 0 5px var(--accent), 0 0 25px var(--accent), 0 0 50px var(--accent);
}

.contact-form form .send:disabled {
    opacity: .6;
    cursor: wait;
}

.form-status {
    min-height: 24px;
    margin-top: 12px;
    color: var(--accent);
    font-weight: 600;
}

/* ======================= 11 · Footer & back-to-top ======================== */

.last-text p {
    width: 100%;
    text-align: center;
    padding: 25px;
    background: var(--bg);
    font-weight: 300;
    margin-top: 25px;
}

.last-text p span {
    color: var(--accent);
}

.top {
    position: fixed;
    bottom: 2.1rem;
    right: 2.1rem;
    opacity: 0;
    pointer-events: none;
    transition: all .4s;
}

.top.active {
    bottom: 32px;
    pointer-events: auto;
    opacity: 1;
}

.top i {
    color: #000;
    background: var(--accent);
    font-size: 20px;
    padding: 10px;
    border-radius: 0.5rem;
}

.top i:hover {
    box-shadow: 0 0 5px var(--accent), 0 0 25px var(--accent), 0 0 50px var(--accent);
}

/* ================== 12 · Modals, galleries & lightbox ===================== */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    justify-content: center;
    align-items: center;
}

.modal.is-open {
    display: flex;
}

.modal-content {
    position: relative;
    background-color: white;
    color: black;
    margin: auto;
    padding: 30px 20px 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.modal-close {
    position: absolute;
    top: 8px;
    right: 16px;
    background: none;
    border: none;
    color: #555;
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
}

.modal-close:hover,
.modal-close:focus {
    color: #000;
}

.gallery-modal {
    width: 90%;
    max-width: 800px;
    background-color: #fefefe;
    border-radius: 10px;
    padding: 20px;
    position: relative;
    box-shadow: var(--card-glow);
}

.gallery-title {
    color: black;
    margin-bottom: 20px;
}

.gallery-link {
    color: black;
    text-decoration: none;
    transition: 0.3s;
}

.gallery-link:hover {
    color: #0053b8f7;
    text-decoration: underline;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.gallery-grid img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    background: #eee;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.gallery-grid img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Lightbox */

#lightbox-modal {
    background-color: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 900px;
    max-height: 80vh;
    object-fit: contain;
    animation: zoom 0.6s;
}

.close-lightbox {
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    z-index: 100;
}

.close-lightbox:hover,
.close-lightbox:focus {
    color: #bbb;
}

.lightbox-prev,
.lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    background: transparent;
    border: none;
    color: white;
    font-weight: bold;
    font-size: 30px;
    transition: 0.6s ease;
    user-select: none;
    -webkit-user-select: none;
    z-index: 1001;
}

.lightbox-next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.lightbox-prev {
    left: 0;
    border-radius: 0 3px 3px 0;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
}

/* ============================ 13 · Animations ============================= */

@keyframes zoom {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

@keyframes slideRight {
    0% {
        transform: translateX(-100px);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideTop {
    0% {
        transform: translateX(100px);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideBottom {
    0% {
        transform: translateX(-100px);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideUP {
    0% {
        transform: translateY(50px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ====================== 14 · Accessibility helpers ======================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ==================== 15 · Responsive (mobile-first-ish) ================== */

/* Laptop widths: keep all 9 nav links on one row */
@media (max-width: 1450px) {
    .header {
        padding: 20px 4%;
    }

    .navbar a {
        font-size: 17px;
        margin-left: 18px;
    }
}

@media (max-width: 1100px) {
    .serv-container {
        --cards-per-row: 2;
        max-width: 760px;
    }
}

@media (max-width: 900px) {
    body {
        overflow-x: hidden;
    }

    .header {
        display: block;
        text-align: center;
        padding: 14px 5%;
    }

    .logo {
        display: block;
        font-size: 25px;
        font-weight: 500;
    }

    .navbar {
        display: flex;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .navbar a {
        font-size: 18px;
        font-weight: 300;
        margin-left: 0;
        padding: 10px 10px 0 0;
    }

    .home-content {
        max-width: 500px;
    }

    .home-content h1 {
        font-size: 40px;
    }

    .home-content h3 {
        font-size: 25px;
    }

    .home-content h4 {
        font-size: 20px;
        width: 80%;
    }

    .home-content h4 span {
        font-size: 25px;
    }

    .img {
        width: 44%;
        margin-left: 2%;
    }

    .about-img {
        margin-top: 7.5%;
    }

    .about-text p {
        font-size: 15.5px;
        line-height: 1.7;
        margin-bottom: .9rem;
    }

    .main-text {
        padding-top: 50px;
        margin-top: 10px;
        padding-bottom: 50px;
    }

    .main-text h2 {
        padding: 0;
        padding-bottom: 50px;
    }

    /* timeline collapses to a single left-rail column */
    .timeline {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        left: 10px;
        transform: none;
    }

    .timeline-item,
    .timeline-item:nth-child(even) {
        padding: 0 0 40px 36px;
    }

    .timeline-item::after,
    .timeline-item:nth-child(even)::after {
        right: auto;
        left: 3px;
        top: 24px;
    }

    .contact-text h2 {
        font-size: 60px;
    }

    .contacts {
        margin-top: 50px;
    }
}

@media (max-width: 700px) {
    .navbar a {
        font-size: 15px;
    }

    /* stack the hero: text first, photo below */
    .home {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding-top: 18%;
        padding-bottom: 40px;
    }

    .home-content h1 {
        font-size: 40px;
        font-weight: 600;
    }

    .home-content h3 {
        font-size: 25px;
        font-weight: 300;
    }

    .home-content h4 {
        font-size: 18px;
        font-weight: 200;
    }

    .home-content h4 span {
        font-size: 18px;
        font-weight: 200;
    }

    .img {
        width: 78%;
        max-width: 340px;
        margin: 34px 0 0;
    }

    .home-content h4 {
        width: 100%;
    }

    .home-sci {
        display: flex;
        justify-content: center;
    }

    .btn-box {
        display: inline-block;
    }

    .about {
        padding-bottom: 0;
        min-height: auto;
    }

    .about-text {
        margin-right: 0;
        padding: 10px;
    }

    .about-text h2 {
        font-size: 30px;
    }

    .about-text p {
        font-size: 15px;
        line-height: 1.65;
        margin-bottom: .8rem;
    }

    .subtitle {
        font-size: 50px;
    }

    .main-text {
        padding-top: 20px;
    }

    .main-text h2 {
        font-size: 50px;
        padding-bottom: 15px;
    }

    .cards-2 {
        grid-template-columns: 1fr;
        max-width: 460px;
        padding: 0 20px 60px;
    }

    .layer p {
        line-height: normal;
    }

    .serv-container {
        --cards-per-row: 1;
        max-width: 420px;
        margin-top: 50px;
        padding: 30px 20px 60px;
    }

    .contacts h2 {
        font-size: 50px;
    }

    .contact-list i {
        font-size: 15px;
    }

    .top {
        left: 1rem;
        right: auto;
    }
}

@media (max-width: 400px) {
    .navbar a {
        font-size: 13px;
        padding: 10px 4px 0 0;
    }

    .home {
        padding-top: 34%;
    }

    .home-content h1 {
        font-size: 28px;
    }

    .home-content h3 {
        font-size: 18px;
    }

    .img {
        width: 85%;
        max-width: 280px;
    }

    .about {
        min-height: auto;
        display: block;
    }

    .about-img {
        display: contents;
    }

    .about-text h2 {
        margin-top: 25px;
    }

    .abtbtn-box {
        display: flex;
        justify-content: center;
    }

    .subtitle {
        padding: 0;
        margin-bottom: 10px;
    }

    .main-text {
        padding: 0;
        margin: 0;
    }

    .main-text h2 {
        padding-bottom: 30px;
    }

    .contacts {
        display: block;
        margin: 0;
        padding: 0 20px;
    }

    .contact-list {
        margin: 0;
    }

    .contact-list i {
        font-size: 13px;
    }

    .contact-text p {
        font-size: 15px;
        margin-bottom: 1rem;
    }

    .contact-icons {
        display: inline-flex;
        gap: 25px;
        margin: 20px 0;
    }

    .timeline-role {
        font-size: 16px;
    }

    .timeline-logo {
        width: 46px;
        height: 46px;
    }

    .timeline-card {
        padding: 18px;
    }
}
