/* ===== Mobile-first refinements (loaded after the inline page CSS, all pages) ===== */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;overflow-x:clip}
body{min-height:100vh;min-height:100dvh;overflow-x:clip;-webkit-tap-highlight-color:rgba(34,197,94,.18)}
img,svg,video,canvas{max-width:100%}
h1,h2,h3,p,li,dd,summary{overflow-wrap:anywhere}
.card a,.kv a{overflow-wrap:anywhere;word-break:break-word}
:focus-visible{outline:2px solid #4ade80;outline-offset:2px}
.btn,.icon-btn,.fld input,.fld select,.fld textarea,.faq summary,.socials a,.mobile-nav a{touch-action:manipulation}

/* ---- Live clock card (contact page) ---- */
.clocks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;margin-top:.4rem}
.clock{background:rgba(15,23,42,.9);border:1px solid rgba(148,163,184,.4);border-radius:1.25rem;padding:1.1rem 1.2rem;display:flex;flex-direction:column;gap:.25rem;min-width:0}
.clock.you{border-color:rgba(34,197,94,.45)}
.c-label{display:flex;align-items:center;gap:.5rem;color:var(--text-muted);font-size:.8rem;font-weight:500;letter-spacing:.02em}
.c-label svg{flex:none;width:14px;height:14px;color:#4ade80}
.c-time{font-size:clamp(1.7rem,6.5vw,2.3rem);font-weight:700;line-height:1.15;font-variant-numeric:tabular-nums;color:#e5e7eb;white-space:nowrap}
.c-time small{font-size:.5em;font-weight:500;color:var(--text-muted);margin-left:.25em}
.c-date{color:var(--text-muted);font-size:.85rem}
.c-zone{color:#a7f3d0;font-size:.78rem;font-weight:500}
.c-diff{margin-top:1rem!important;margin-bottom:0!important;font-size:.9rem}
.c-status{display:inline-flex;align-items:center;gap:.5rem;margin-top:.5rem;font-size:.8rem;color:var(--text-muted)}
.c-status i{width:9px;height:9px;border-radius:50%;background:#64748b;flex:none}
.c-status.on i{background:#22c55e;box-shadow:0 0 12px rgba(34,197,94,.9)}
.c-pick{display:grid;gap:.35rem;margin-top:1rem}
.c-pick span{font-size:.8rem;color:var(--text-muted)}
.c-pick select{width:100%;border-radius:.9rem;border:1px solid rgba(148,163,184,.6);background:rgba(15,23,42,.9);color:#e5e7eb;padding:.6rem .8rem;font:.9rem Poppins,sans-serif}

/* ---- Tablets / large phones ---- */
@media (max-width:900px){
  .page{padding-top:2rem}
  .section{padding:4rem 0 3rem}
}

/* ---- Phones ---- */
@media (max-width:720px){
  .wrap>header{padding-top:10px}
  .capsule{padding:6px 8px 6px 16px}
  .brand .logo-text{font-size:1.25rem}
  .icon-btn{width:44px;height:44px}
  .mobile-nav{max-height:calc(100dvh - 90px);overflow-y:auto}
  .mobile-nav a{min-height:44px;display:flex;align-items:center;padding:10px 16px}

  .page{padding:1.75rem 0 1.5rem}
  .page-head{margin-bottom:1.25rem}
  .page-head h1{font-size:clamp(1.9rem,9vw,2.4rem)}
  .page-head p{font-size:.95rem}
  .frame h1{font-size:clamp(2rem,10vw,2.6rem)}
  .role{font-size:1rem}
  .page>:not(.hero){margin-bottom:1.1rem}

  .card{padding:1.25rem 1.1rem;border-radius:1.25rem}
  .card h2{font-size:1.35rem}
  .card p,.card dd{font-size:.95rem;line-height:1.65}
  .grid2,.grid3,.stats{gap:1rem}
  .tile{min-height:0;gap:1rem}
  .stat{padding:1rem}
  .stat b{font-size:1.6rem}
  .glyph{width:38px;height:38px;margin-bottom:.7rem}

  /* buttons & links easy to tap */
  .btn{min-height:46px;padding:.7rem 1.4rem}
  .cta,.form-foot{gap:.75rem}
  .cta .btn{flex:1 1 calc(50% - .5rem)}
  .tile .btn{align-self:stretch}
  .form-foot .btn{width:100%}
  .socials{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem}
  .socials a,.socials.full a{min-height:46px;justify-content:center;padding:.6rem .8rem}
  .frame>.handle{min-height:40px}
  .tag{font-size:.82rem}
  .faq summary{min-height:48px;padding:.4rem 0}
  .foot-links{gap:0;flex-wrap:wrap}
  .foot-links a{padding:.7rem 1.1rem .7rem 0;min-height:44px;display:inline-flex;align-items:center}

  /* forms: 16px stops iOS from zooming in on focus */
  .fld input,.fld select,.fld textarea,.c-pick select{font-size:16px;min-height:48px;padding:.7rem .9rem}
  .fld textarea{min-height:150px}

  /* layout */
  .photo,.photo-frame{width:min(320px,100%);margin-inline:auto}
  .glow-ring{width:min(340px,100%)}
  .hero{padding:2.5rem 0 1.5rem}
  .jtrain .points{gap:.6rem}
  .roles,.jtop{gap:1rem}
  .kv dt{font-size:.8rem}
  .clocks{grid-template-columns:1fr}
  .c-time{font-size:clamp(1.9rem,10vw,2.4rem)}

  footer{padding-bottom:calc(1rem + env(safe-area-inset-bottom,0px))}
  .foot{gap:1rem}
  .wordmark{margin-top:1.25rem}
  .verified{flex-wrap:wrap;text-align:center;padding:.75rem 0}

  /* legal pages: comfortable reading width */
  .legal p,.legal li{font-size:.95rem;line-height:1.7}
}

/* ---- Small phones (≤ 380px) ---- */
@media (max-width:380px){
  .container,.page,.hero-container,.hero>.frame,.foot,.wordmark{width:calc(100% - 1.5rem)!important}
  .page:has(>.hero)>:not(.hero){width:calc(100% - 1.5rem)}
  .card{padding:1.1rem .95rem}
  .cta .btn{flex:1 1 100%}
  .socials{grid-template-columns:1fr}
  .stats{grid-template-columns:1fr 1fr}
  .stat b{font-size:1.4rem}
  .brand .logo-text{font-size:1.1rem}
  .c-time{font-size:1.8rem}
}

/* ---- Landscape phones: keep the sticky header from eating the screen ---- */
@media (max-height:480px) and (orientation:landscape){
  #welcome{padding:1rem;gap:.5rem}
  .w-ring{width:56px;height:56px}
}

/* ---- Touch devices: no sticky hover states ---- */
@media (hover:none){
  .card:hover,.stat:hover,.soft-card:hover,.skill-pill:hover,.btn:hover,.socials a:hover{transform:none}
}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .glow-ring::before{animation:none}
}

/* ===== Always-visible navbar with blurred backdrop ===== */
.wrap>header{position:-webkit-sticky;position:sticky;top:0;z-index:100;
  padding:calc(10px + env(safe-area-inset-top,0px)) 0 10px;
  background:rgba(2,6,23,.55);
  -webkit-backdrop-filter:blur(16px) saturate(140%);backdrop-filter:blur(16px) saturate(140%);
  border-bottom:1px solid rgba(148,163,184,.14)}
.capsule{background:rgba(15,23,42,.6)}
body::before{display:none}
.mobile-nav{position:relative}

/* ===== Footer credit ===== */
.dev{display:block;margin-top:.7rem;color:var(--text-muted);font-size:.8rem}
.dev a{color:#86efac;text-decoration:none;font-weight:500;display:inline-block;padding:.35rem 0}
.dev a:hover{text-decoration:underline}

.foot-bottom{width:min(1120px,100% - 3rem);margin:1rem auto 0;padding:.9rem 0 calc(.9rem + env(safe-area-inset-bottom,0px));border-top:1px solid rgba(148,163,184,.18)}
.foot-bottom .dev{margin:0}
@media (max-width:720px){.foot-bottom{width:min(100% - 2rem,100%)}}
@media (max-width:380px){.foot-bottom{width:calc(100% - 1.5rem)}}

/* Welcome screen: Garima's photo inside the spinning ring */
.w-ring{width:128px;height:128px}
.w-ring::after{display:none}
.w-ring img{position:absolute;inset:9px;width:calc(100% - 18px);height:calc(100% - 18px);border-radius:50%;object-fit:cover;object-position:center 30%;background:#0f172a;box-shadow:0 0 28px rgba(34,197,94,.35)}
@media (max-height:480px) and (orientation:landscape){.w-ring{width:84px;height:84px}.w-ring img{inset:7px;width:calc(100% - 14px);height:calc(100% - 14px)}}

/* Faster welcome screen */
#welcome{transition:opacity .4s ease,visibility .4s}
#welcome h2{animation-duration:.5s}
#welcome p{animation-duration:.5s;animation-delay:.15s}
#welcome small{animation-duration:.5s;animation-delay:.3s}

/* Looping hero typewriter */
#hero-type{min-height:2.5em;line-height:1.25}
#hero-type::after{content:"|";font-weight:300;color:#09ff01;margin-left:2px;animation:blink .8s infinite}
#hero-type .hl{background:linear-gradient(to right,#a7f3d0,#22c55e);-webkit-background-clip:text;background-clip:text;color:transparent}

/* About photo: same running green border as the home page */
.photo.glow-ring{width:100%;border:0;box-shadow:0 0 40px rgba(34,197,94,.2)}
.photo.glow-ring .glow-ring-inner img{display:block;width:100%;height:100%;object-fit:cover}
@media (max-width:900px){.photo.glow-ring{width:min(320px,100%);margin-inline:auto}}
