header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--surface);
    border-bottom: var(--border);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    text-decoration: none;
}

.monogram {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    background: var(--yellow);
    color: #000;
    border: var(--border);
    box-shadow: 3px 3px 0 var(--line);
    font-family: var(--heading);
}

.navlinks {
    display: flex;
    gap: 18px;
    align-items: center;
}

.navlinks a {
    text-decoration: none;
    font-weight: 700;
}

.menu {
    display: none;
    border: var(--border);
    background: var(--surface);
    padding: 8px 12px;
}

.hero {
    padding: 90px 0 100px;
    display: grid;
    grid-template-columns: 1.25fr .75fr;
    gap: 45px;
    align-items: center;
}

.hero h1 span {
    display: block;
    font-size: clamp(1.4rem, 3.5vw, 2.5rem);
    letter-spacing: -.02em;
}

.hero-photo {
    min-height: 350px;
    display: grid;
    place-items: center;
    background: var(--yellow);
    border: var(--border);
    box-shadow: 12px 12px 0 var(--line);
    transform: rotate(2deg);
}

.hero-photo img {
    width: 100%;
    max-width: 390px;
    display: block;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 26px 0;
}

.marquee {
    overflow: hidden;
    white-space: nowrap;
    background: var(--yellow);
    color: #000;
    border-block: var(--border);
    padding: 13px 0;
    font-weight: 800;
    font-family: var(--heading);
    font-size: 1.3rem;
}

.marquee span {
    display: inline-block;
    animation: marquee 28s linear infinite;
}

@keyframes marquee {
    to {
        transform: translateX(-50%);
    }
}


/* =========================
   CARD GRID
   ========================= */

.cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.cards .panel {
    min-width: 0;
    box-sizing: border-box;
}


/* =========================
   SERVICES
   ========================= */

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 30px;
    margin-bottom: 30px;
}

.section-heading>div {
    max-width: 650px;
}

.section-heading .muted {
    max-width: 420px;
    margin: 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.service-card {
    position: relative;
    padding: 30px;
    background: var(--surface);
    border: var(--border);
    box-shadow: 7px 7px 0 var(--line);
    overflow: hidden;
    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.service-card:hover {
    transform: translate(-3px, -3px);
    box-shadow: 10px 10px 0 var(--line);
}

.service-number {
    position: absolute;
    top: 20px;
    right: 24px;
    font-family: var(--heading);
    font-size: 1rem;
    font-weight: 800;
    opacity: .45;
}

.service-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    margin-bottom: 22px;
    background: var(--yellow);
    color: #000;
    border: var(--border);
    font-family: var(--heading);
    font-size: 1.5rem;
    font-weight: 800;
    box-shadow: 4px 4px 0 var(--line);
}

.service-card h3 {
    margin: 0 0 12px;
    font-size: 1.45rem;
}

.service-card>p {
    margin-bottom: 20px;
    max-width: 560px;
}

.service-card ul {
    margin: 0 0 24px;
    padding-left: 20px;
}

.service-card li {
    margin: 7px 0;
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    text-decoration: none;
}

.service-link span {
    font-size: 1.2rem;
    transition: transform .2s ease;
}

.service-link:hover span {
    transform: translateX(5px);
}

.security-card {
    background:
        linear-gradient(135deg,
            var(--surface) 0%,
            var(--surface) 80%,
            var(--yellow) 80%,
            var(--yellow) 100%);
}


/* =========================
   SKILL CHIPS
   ========================= */

.chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.chip {
    background: var(--surface);
    border: 2px solid var(--line);
    padding: 5px 10px;
    font-weight: 600;
}


/* =========================
   PROJECTS
   ========================= */

.project {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.project .tag {
    align-self: flex-start;
}


/* =========================
   FAQ
   ========================= */

.faq details {
    background: var(--surface);
    border: var(--border);
    padding: 18px 20px;
    margin: 12px 0;
}

.faq summary {
    font-weight: 800;
    cursor: pointer;
}


/* =========================
   CONTACT
   ========================= */

.contact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.contact form {
    display: grid;
    gap: 14px;
}

.contact label {
    font-weight: 700;
}

.contact input,
.contact textarea,
.contact select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--line);
    background: var(--bg);
    color: var(--ink);
    font: inherit;
}

.contact textarea {
    min-height: 140px;
}


/* =========================
   FOOTER
   ========================= */

footer {
    background: var(--ink);
    color: var(--bg);
    padding: 45px 0;
}

footer a {
    color: inherit;
}


/* =========================
   SERVICE PAGES
   ========================= */

.breadcrumbs {
    padding: 22px 0;
    font-weight: 700;
}

.service-hero {
    padding: 40px 0 60px;
}

.service-content {
    max-width: 820px;
}

.service-content section {
    padding: 24px 0;
    border-bottom: 2px solid var(--line);
}

.service-content h2 {
    font-size: 2rem;
}


/* =========================
   THEME
   ========================= */

.theme-toggle {
    border: var(--border);
    background: var(--surface);
    padding: 10px;
    cursor: pointer;
}


/* =========================
   TABLET
   ========================= */

@media (max-width: 900px) {

    .navlinks {
        display: none;
        position: absolute;
        top: 76px;
        left: 0;
        right: 0;
        background: var(--surface);
        padding: 20px;
        border-bottom: var(--border);
        flex-direction: column;
        align-items: stretch;
    }

    .navlinks.open {
        display: flex;
    }

    .menu {
        display: block;
    }

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

    .hero-photo {
        max-width: 480px;
    }

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

    /* Skills / project cards */
    .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* =========================
   MOBILE
   ========================= */

@media (max-width: 600px) {

    .hero {
        padding: 60px 0;
    }

    .nav .btn {
        display: none;
    }

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

    .service-card {
        padding: 24px;
    }

    .service-icon {
        width: 42px;
        height: 42px;
    }

    .section-heading {
        gap: 12px;
    }
}




/* ==========================================
   CERTIFICATES & CREDENTIALS
   ========================================== */

.certificates-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    align-items: stretch;
}

/* Main card */

.certificate-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: var(--border);
    box-shadow: 7px 7px 0 var(--line);
    overflow: hidden;

    transition:
        transform .25s ease,
        box-shadow .25s ease;
}

.certificate-card:hover {
    transform: translateY(-5px);
    box-shadow: 10px 12px 0 var(--line);
}

/* Certificate preview */

.certificate-preview {
    width: 100%;
    min-height: 240px;
    padding: 14px;
    box-sizing: border-box;

    display: grid;
    place-items: center;

    background: var(--yellow);
    border-bottom: var(--border);
    overflow: hidden;
}

.certificate-preview a {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
}

/* Automatic image sizing */

.certificate-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 320px;

    object-fit: contain;
    object-position: center;

    background: #fff;
    border: 2px solid var(--line);
    box-shadow: 3px 3px 0 rgba(0, 0, 0, .12);

    transition: transform .3s ease;
}

.certificate-card:hover .certificate-image {
    transform: scale(1.025);
}

/* Card information */

.certificate-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 22px;
}

/* Category label */

.certificate-category {
    align-self: flex-start;
    display: inline-block;

    padding: 7px 12px;
    margin-bottom: 14px;

    background: var(--yellow);
    color: #000;
    border: var(--border);

    font-size: .8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .03em;
}

/* Certificate title */

.certificate-info h3 {
    margin: 0 0 8px;
    font-size: 1.3rem;
    line-height: 1.35;
    font-weight: 800;
}

/* Issuer */

.certificate-issuer {
    margin: 0 0 18px;
    color: var(--ink);
    opacity: .75;
    font-size: 1rem;
}

/* Metadata */

.certificate-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 18px;

    padding: 16px 0;
    margin-top: auto;

    border-top: 2px solid var(--line);
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    font-size: .88rem;
    font-weight: 600;
    white-space: nowrap;
}

.meta-icon {
    display: inline-grid;
    place-items: center;
    font-size: 1.15rem;
    font-weight: 800;
}

/* Verification button */

.certificate-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    width: 100%;
    box-sizing: border-box;

    padding: 16px;
    margin-top: 8px;

    background: var(--yellow);
    color: #000;

    border: var(--border);
    box-shadow: 4px 4px 0 var(--line);

    text-decoration: none;
    font-size: 1rem;
    font-weight: 800;

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}

.certificate-link:hover {
    transform: translate(-3px, -3px);
    box-shadow: 7px 7px 0 var(--line);
}

.certificate-link:focus-visible {
    outline: 3px solid var(--ink);
    outline-offset: 4px;
}

.link-icon {
    display: grid;
    place-items: center;

    width: 30px;
    height: 30px;
    flex-shrink: 0;

    background: var(--ink);
    color: var(--yellow);

    font-size: 1.1rem;
    font-weight: 900;
}

.link-arrow {
    margin-left: auto;
    font-size: 1.4rem;
    transition: transform .2s ease;
}

.certificate-link:hover .link-arrow {
    transform: translate(3px, -3px);
}

/* ==========================================
   RESPONSIVE
   ========================================== */

/* Tablet */

@media (max-width: 1000px) {
    .certificates-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobile */

@media (max-width: 600px) {
    .certificates-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .certificate-preview {
        min-height: 190px;
        padding: 12px;
    }

    .certificate-image {
        max-height: 280px;
    }

    .certificate-info {
        padding: 20px;
    }

    .certificate-info h3 {
        font-size: 1.2rem;
    }

    .certificate-meta {
        gap: 12px;
    }

    .certificate-link {
        padding: 14px;
    }
}

/* Reduced motion accessibility */

@media (prefers-reduced-motion: reduce) {
    .certificate-card,
    .certificate-image,
    .certificate-link,
    .link-arrow {
        transition: none;
    }
}


/* ========================================
   MOBILE NAVIGATION FIX
======================================== */

@media (max-width: 768px) {

  /* Keep header above page content */
  .site-header {
    position: sticky;
    top: 0;
    z-index: 1100;
    background: var(--surface, #fff);
  }

  /* Drawer */
  .navlinks {
    position: fixed !important;
    top: 0;
    right: 0;
    bottom: 0;

    width: 75vw;
    max-width: 360px;
    height: 100dvh;

    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;

    padding: 24px;
    padding-top: 32px;

    background: var(--surface, #fff);
    border-left: 3px solid var(--ink, #111);

    overflow-y: auto;
    overflow-x: hidden;

    transform: translateX(100%);
    visibility: hidden;
    pointer-events: none;

    z-index: 1101;

    transition:
      transform 0.35s ease,
      visibility 0s linear 0.35s;
  }

  /* Open drawer */
  .navlinks.open,
  .navlinks.active {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;

    transition:
      transform 0.35s ease,
      visibility 0s;
  }

  /* Drawer heading */
  .nav-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
  }

  /* Navigation links */
  .navlinks a {
    display: block;
    width: 100%;
    padding: 14px 0;
    text-decoration: none;
  }

  /* Theme toggle inside drawer */
  .nav-theme {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
  }

  /* Prevent page scrolling while drawer is open */
  body.nav-open {
    overflow: hidden;
  }

  /* Dark overlay */
  body.nav-open::after {
    content: "";
    position: fixed;
    inset: 0;

    background: rgba(0, 0, 0, 0.5);
    z-index: 1099;
  }

  /* Keep hamburger visible */
  .menu {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 48px;
    height: 48px;
    padding: 0;

    background: var(--surface, #fff);
    border: 3px solid var(--ink, #111);
    color: var(--ink, #111);

    cursor: pointer;
    z-index: 1102;
  }

  /* Hamburger icon */
  .menu::before {
    content: "☰";
    font-size: 25px;
    line-height: 1;
  }

  /* Hide default menu text if present */
  .menu span {
    display: none;
  }

  /* Close button */
  .nav-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    font-size: 24px;
    cursor: pointer;
  }
}

/* ========================================
   HORIZONTAL OVERFLOW FIX
======================================== */

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

img,
video,
iframe {
  max-width: 100%;
}

/* Prevent oversized sections */
section,
.site-header,
main,
footer {
  max-width: 100%;
}