@media (min-width: 1440px) {
  .hero { min-height: 840px; }
}
@media (max-width: 1100px) {
  :root { --container: 1000px; }
  .hero { grid-template-columns: minmax(0,1fr) minmax(340px,.85fr); gap: 35px; }
  .hero h1 { font-size: clamp(52px,6.3vw,72px); }
  .hero-art { min-height: 440px; }
  .chip-top { right: -4%; }.chip-bottom { left: -4%; }
  .about-layout { gap: 55px; }
  .skills-layout { grid-template-columns: minmax(180px,.55fr) minmax(0,1.45fr); gap: 25px; }
}
@media (max-width: 820px) {
  .site-header { min-height: 72px; padding-inline: 25px; }
  .primary-nav { position: fixed; top: 72px; right: 0; left: 0; display: flex; flex-direction: column; align-items: stretch; gap: 0; margin: 0; padding: 14px 25px 22px; border-bottom: 1px solid var(--line); background: rgba(10,10,17,.98); opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all .22s ease; }
  .primary-nav.open { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav-link { padding: 14px 3px; border-bottom: 1px solid rgba(255,255,255,.05); font-size: 13px; }
  .nav-link::after { display: none; }
  .menu-trigger { display: grid; }
  .menu-trigger[aria-expanded="true"] span:first-child { transform: translateY(3.3px) rotate(45deg); }.menu-trigger[aria-expanded="true"] span:last-child { transform: translateY(-3.3px) rotate(-45deg); }
  .hero { grid-template-columns: minmax(0,1fr) minmax(280px,.85fr); min-height: auto; padding-block: 90px 105px; }
  .hero h1 { font-size: clamp(47px,7vw,64px); }
  .hero-art { min-height: 380px; }.terminal-content { padding: 23px; }
  .terminal-heading { font-size: 36px; }
  .floating-chip { font-size: 7px; }
  .hero-footnote { margin-top: 38px; }
  .section-pad { padding-block: 100px; }
  .about-layout { grid-template-columns: 1fr 1fr; gap: 28px; }
  .section-heading-row { gap: 25px; }
  .journey-card { min-height: 270px; padding: 20px; }
  .project-featured { grid-template-columns: 1fr 1fr; }
  .project-featured .project-visual { min-height: 300px; }
  .project-featured .project-info { padding: 23px; }
  .project-info { padding: 20px; }
  .skills-layout { grid-template-columns: 1fr; }
  .skills-intro { position: static; display: flex; align-items: center; gap: 25px; padding: 18px 22px; }.skills-intro p { flex: 1; margin: 0; font-size: 12px; }.skills-caption { display: none; }
}
@media (max-width: 620px) {
  .section-shell { width: min(100% - 38px, var(--container)); }
  .site-header { min-height: 66px; padding-inline: 19px; }
  .brand-mark { width: 31px; height: 31px; }.brand-word { font-size: 20px; }
  .header-cta { display: inline-flex; padding: 7px 9px; gap: 6px; }.header-cta img { width: 20px; height: 20px; }.header-cta span:nth-of-type(1) { display: none; }.icon-button { width: 39px; height: 39px; }.header-actions { gap: 8px; }
  .primary-nav { top: 66px; padding-inline: 20px; }
  .hero { display: flex; flex-direction: column; align-items: stretch; gap: 22px; padding-block: 74px 85px; }
  .eyebrow { flex-wrap: wrap; gap: 8px; font-size: 8px; }
  .hero h1 { margin: 24px 0 18px; font-size: clamp(45px,13vw,64px); line-height: 1.02; }
  .hero-intro { max-width: 470px; font-size: 13px; }
  .hero-actions { margin-top: 25px; gap: 9px; }.button { min-height: 46px; padding-inline: 15px; font-size: 11px; gap: 10px; }
  .hero-footnote { margin-top: 28px; gap: 8px; font-size: 9px; }.hero-footnote .mono-text { font-size: 8px; }
  .hero-art { min-height: 350px; margin-top: 4px; }.terminal-card { width: min(82%, 390px); }.terminal-content { padding: 20px; }.terminal-heading { font-size: 36px; }.terminal-code { font-size: 10px; }
  .chip-top { top: 13%; right: 0; }.chip-bottom { bottom: 10%; left: -1%; }.art-index { right: 3%; bottom: 0; }.hero-scroll { display: none; }
  .marquee-track { gap: 22px; padding: 14px 0; }.marquee-track span { font-size: 9px; }
  .section-pad { padding-block: 84px; }.section-kicker { margin-bottom: 21px; font-size: 8px; }.section-heading-row { display: block; margin-bottom: 35px; }.section-title { font-size: clamp(36px,10vw,50px); }.section-side-note { max-width: 440px; margin-top: 17px; font-size: 11px; }
  .about-layout { grid-template-columns: 1fr; gap: 36px; }.about-story { padding-left: 24px; }.story-mark { left: 17px; }.about-story p { margin: 18px 0; font-size: 12px; }.story-signature { margin-top: 30px; font-size: 9px; }
  .profile-panel { padding: 21px; }.profile-monogram { width: 72px; height: 72px; font-size: 41px; }
  .journey { padding-top: 5px; }.compact-heading .section-title { font-size: clamp(32px,8.5vw,43px); }.journey-grid { grid-template-columns: 1fr; gap: 10px; }.journey-card { min-height: auto; padding: 20px; }.journey-icon { margin: 17px 0 13px; }.journey-card p { max-width: 430px; }
  .projects { padding-top: 82px; }.projects-heading { margin-bottom: 28px; }.project-toolbar { align-items: flex-start; flex-direction: column; gap: 10px; padding: 13px 0; }.project-filters { width: 100%; gap: 4px; }.filter-btn { padding: 8px 10px; font-size: 9px; }.project-count { font-size: 8px; }
  .projects-grid { grid-template-columns: 1fr; gap: 14px; padding-top: 16px; }.project-featured { grid-column: auto; display: flex; flex-direction: column; }.project-visual, .project-featured .project-visual { min-height: 258px; }.project-featured .project-info, .project-info { padding: 20px; }.project-info h3 { font-size: 21px; }.project-info p { min-height: 0; font-size: 10px; }.quran-window { width: 78%; }.sfl-window, .vyra-window, .tiktok-window, .mail-window { width: 78%; }.preview-disclaimer { align-items: flex-start; font-size: 9px; line-height: 1.7; }
  .skills { padding-top: 86px; }.skills-heading { margin-bottom: 30px; }.skills-layout { gap: 17px; }.skills-intro { gap: 14px; padding: 15px; }.skills-stamp { flex: 0 0 auto; font-size: 7px; }.skills-intro p { font-size: 10px; }.skills-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }.skill-card { padding: 14px 12px; }.skill-top { font-size: 7px; }.skill-card h3 { font-size: 16px; }.skill-card p { font-size: 8px; line-height: 1.6; }.skills-footnote { font-size: 8px; line-height: 1.7; }
  .contact { padding-block: 72px 86px; }.contact-panel { padding: 29px 22px; border-radius: 18px; }.contact-decoration { top: 2%; right: -5%; font-size: 165px; }.contact-title { margin: 20px 0 12px; font-size: clamp(42px,12vw,61px); }.contact-intro { max-width: 390px; font-size: 11px; }.contact-actions { gap: 8px; }.contact-actions .button { flex: 1 1 100%; justify-content: space-between; }.contact-details { grid-template-columns: 1fr; gap: 14px; margin-top: 34px; padding-top: 18px; }.contact-details > * { display: grid; grid-template-columns: 80px 1fr auto; align-items: center; gap: 6px; }.contact-details strong { font-size: 9px; }.contact-details i { display: block; }.contact-status { align-items: flex-start; font-size: 7px; line-height: 1.7; }
  .site-footer { grid-template-columns: 1fr auto; width: calc(100% - 38px); gap: 10px; padding-block: 21px calc(21px + env(safe-area-inset-bottom)); }.site-footer p { grid-column: 1/-1; grid-row: 2; text-align: left; }.footer-end { grid-column: 2; grid-row: 1; flex-direction: column; align-items: flex-end; gap: 5px; font-size: 8px; }
  .back-to-top { right: 15px; bottom: 15px; width: 40px; height: 40px; }.toast { left: 15px; bottom: 15px; }
}
@media (max-width: 360px) {
  .section-shell { width: calc(100% - 30px); }.hero h1 { font-size: 43px; }.hero-actions { align-items: stretch; }.hero-actions .button { flex: 1 1 100%; }.hero-art { min-height: 315px; }.terminal-card { width: 85%; }.terminal-code { font-size: 9px; }.chip-top { right: -4%; }.chip-bottom { left: -4%; }.project-filters { gap: 2px; }.filter-btn { padding-inline: 8px; }.skills-grid { grid-template-columns: 1fr; }.skills-intro { align-items: flex-start; flex-direction: column; }.profile-details { gap: 13px 10px; }
}
@media (hover: none) and (pointer: coarse) {
  .project-card:hover, .journey-card:hover, .skill-card:hover, .button:hover, .icon-button:hover { transform: none; }
}


/* Mobile-first header without the extra web/CTA and hamburger buttons */
@media (max-width: 820px) {
  .site-header {
    position: sticky; top: 0; min-height: 0; height: auto;
    display: flex; flex-wrap: wrap; justify-content: center;
    padding: 13px 18px 0; gap: 0;
  }
  .site-header > .brand { width: 100%; justify-content: flex-start; padding-bottom: 12px; }
  .site-header .header-actions { display: none !important; }
  .primary-nav {
    position: static !important; inset: auto !important;
    width: calc(100% + 36px); margin: 0 -18px !important;
    padding: 0 18px 11px !important;
    display: flex !important; flex-direction: row !important;
    align-items: center !important; gap: 21px !important;
    overflow-x: auto; overscroll-behavior-x: contain;
    white-space: nowrap; border-top: 1px solid rgba(153,190,239,.09);
    border-bottom: 1px solid rgba(153,190,239,.13);
    background: rgba(8,15,28,.94) !important;
    opacity: 1 !important; visibility: visible !important; transform: none !important;
    scrollbar-width: none;
  }
  .primary-nav::-webkit-scrollbar { display: none; }
  .nav-link { flex: 0 0 auto; padding: 12px 0 9px !important; border: 0 !important; font-size: 11px !important; }
  .nav-link.active { color: #dceaff; }
  .nav-link.active::after { display: block !important; bottom: 3px; height: 2px; border-radius: 2px; background: linear-gradient(90deg,#8dbcf2,#aaa6f4); }
}
@media (max-width: 420px) {
  .site-header { padding-inline: 16px; }
  .primary-nav { width: calc(100% + 32px); margin-inline: -16px !important; padding-inline: 16px !important; gap: 19px !important; }
  .profile-monogram { width: 86px; height: 86px; border-radius: 25px; }
}
