/* ==========================================================================
   DrJAG.ID Research Institute — stylesheet
   Palette:  blue  #0000C1 (primary)   gold #CF8B30 (lining/accent)
             black #000000 (text)      white #FFFFFF (surfaces)
   Type:     Roboto (Google Fonts), falls back to Tahoma/Arial
   ========================================================================== */

:root{
  /* --- brand colour ramp, derived from the two required colours --- */
  --blue-900:#000090;
  --blue-800:#0000A6;
  --blue-700:#0000C1;   /* primary blue — RGB(0,0,193) */
  --blue-600:#1414d1;
  --blue-050:#eceeFA;   /* pale blue tint for alternating sections */
  --blue-025:#f6f7fd;

  --gold-700:#a66f26;
  --gold-600:#b87c2c;
  --gold-500:#CF8B30;   /* lining / accent — RGB(207,139,48) */
  --gold-300:#e0ad6c;
  --gold-100:#f5e6d0;
  --gold-050:#faf1e3;

  --ink:#000000;        /* body text, as specified */
  --ink-soft:#2b2b33;   /* only for text sitting on dark surfaces where pure
                            black would disappear entirely (see components) */
  --paper:#ffffff;
  --paper-dim:#fafafc;
  --line:#e4e1da;       /* neutral hairline for non-accent dividers */

  --font-base:'Roboto', Tahoma, Arial, sans-serif;

  --container:1180px;
  --radius:6px;
  --gap:1.5rem;

  --shadow-soft:0 1px 2px rgba(0,0,20,.06);
}

/* ---------------------------------------------------------------------- */
/* Reset                                                                   */
/* ---------------------------------------------------------------------- */
*,*::before,*::after{box-sizing:border-box;}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth;}
body{
  margin:0;
  font-family:var(--font-base);
  color:var(--ink);
  background:var(--paper);
  line-height:1.6;
  font-size:16px;
  -webkit-font-smoothing:antialiased;
}
@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto;}
  *,*::before,*::after{animation-duration:.001ms !important;animation-iteration-count:1 !important;transition-duration:.001ms !important;}
}
img{max-width:100%;display:block;}
a{color:var(--blue-700);text-decoration:none;}
a:hover{text-decoration:underline;}
h1,h2,h3,h4{
  font-family:var(--font-base);
  font-weight:700;
  line-height:1.2;
  margin:0 0 .6em;
  color:var(--ink);
  letter-spacing:-.01em;
}
p{margin:0 0 1.1em;max-width:70ch;}
ul,ol{margin:0 0 1.1em;padding-left:1.25em;}
button{font-family:inherit;}
:focus-visible{outline:3px solid var(--gold-500);outline-offset:2px;}

.container{
  width:100%;
  max-width:var(--container);
  margin-inline:auto;
  padding-inline:1.25rem;
}
.visually-hidden{
  position:absolute !important;width:1px;height:1px;padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;
}
.section{padding:4.5rem 0;}
.section--tint{background:var(--blue-025);}
.section-head{max-width:62ch;margin-bottom:2.5rem;}
.section-head h2{font-size:clamp(1.6rem,2.6vw,2.15rem);}
.section-head p{color:var(--ink);opacity:.82;}

/* ---------------------------------------------------------------------- */
/* Buttons                                                                 */
/* ---------------------------------------------------------------------- */
.btn{
  display:inline-flex;align-items:center;gap:.5em;
  padding:.75em 1.4em;
  border-radius:var(--radius);
  font-weight:700;
  font-size:.95rem;
  border:2px solid transparent;
  cursor:pointer;
  transition:transform .15s ease, background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover{text-decoration:none;transform:translateY(-1px);}
.btn-primary{background:var(--gold-500);color:var(--ink);border-color:var(--gold-500);}
.btn-primary:hover{background:var(--gold-600);border-color:var(--gold-600);}
.btn-outline{background:transparent;color:#fff;border-color:rgba(255,255,255,.65);}
.btn-outline:hover{background:rgba(255,255,255,.12);border-color:#fff;}
.btn-ghost{background:transparent;color:var(--blue-700);border-color:var(--blue-700);}
.btn-ghost:hover{background:var(--blue-700);color:#fff;}
.btn-sm{padding:.5em 1em;font-size:.85rem;}

/* ---------------------------------------------------------------------- */
/* Header + nav                                                           */
/* ---------------------------------------------------------------------- */
.site-header{
  position:sticky;top:0;z-index:50;
  background:linear-gradient(180deg,var(--blue-700),var(--blue-800));
  border-bottom:3px solid var(--gold-500);
}
.site-header .container{
  display:flex;align-items:center;justify-content:space-between;
  padding-block:.65rem;
  gap:1rem;
}
.brand{display:flex;align-items:center;gap:.7rem;color:#fff;}
.brand:hover{text-decoration:none;}
.brand-mark{width:42px;height:42px;flex:none;}
.brand-text{line-height:1.15;}
.brand-text .name{display:block;font-weight:700;font-size:1.05rem;letter-spacing:.01em;}
.brand-text .tagline{display:block;font-size:.72rem;color:var(--gold-300);}

.nav-toggle{
  display:none;
  background:transparent;border:2px solid rgba(255,255,255,.55);
  border-radius:var(--radius);
  width:44px;height:40px;
  align-items:center;justify-content:center;
  color:#fff;
}
.nav-toggle svg{width:22px;height:22px;}

.site-nav ul{
  display:flex;gap:.25rem;
  list-style:none;margin:0;padding:0;
}
.site-nav a{
  display:inline-block;
  color:#fff;opacity:.85;
  font-weight:500;
  font-size:.95rem;
  padding:.55rem .8rem;
  border-radius:var(--radius);
  border-bottom:2px solid transparent;
}
.site-nav a:hover{opacity:1;text-decoration:none;background:rgba(255,255,255,.08);}
.site-nav a[aria-current="page"]{opacity:1;border-bottom-color:var(--gold-500);}

/* ---------------------------------------------------------------------- */
/* Neural stage — the animated canvas backdrop, used in every page banner */
/* ---------------------------------------------------------------------- */
.neural-stage{
  position:relative;
  overflow:hidden;
  background:radial-gradient(120% 140% at 15% 0%,#00009c 0%,#000063 55%,#00003c 100%);
  color:#fff;
}
.neural-stage canvas{
  position:absolute;inset:0;
  width:100%;height:100%;
  display:block;
}
.neural-stage::after{ /* faint vignette so text stays legible over the network */
  content:"";
  position:absolute;inset:0;
  background:linear-gradient(180deg,rgba(0,0,40,.35),rgba(0,0,40,.55) 60%,rgba(0,0,40,.75));
  pointer-events:none;
}
.neural-stage .container{position:relative;z-index:2;}

/* Homepage hero (tall neural stage) */
.hero{padding-block:5.5rem 6rem;}
.hero-inner{max-width:44rem;}
.hero h1{
  color:#fff;
  font-size:clamp(2.1rem,4.4vw,3.4rem);
  font-weight:900;
  letter-spacing:-.02em;
}
.hero p.lede{
  color:#f0f1fb;
  font-size:1.15rem;
  max-width:48ch;
  text-align: justify;
}
.hero-cta{display:flex;flex-wrap:wrap;gap:.9rem;margin-top:1.8rem;}
.hero-credentials{
  margin-top:3rem;
  display:flex;flex-wrap:wrap;gap:1.6rem 2.2rem;
  border-top:1px solid rgba(255,255,255,.22);
  padding-top:1.6rem;
}
.hero-credentials div{max-width:16rem;}
.hero-credentials strong{display:block;color:#fff;font-size:1rem;}
.hero-credentials span{display:block;color:#cfd3f5;font-size:.85rem;margin-top:.15rem;}

/* Short page banner (News / Events / Blogs & Test / Contact) */
.page-banner{padding-block:3.1rem;}
.page-banner h1{color:#fff;font-size:clamp(1.7rem,3.4vw,2.4rem);margin-bottom:.4rem;}
.page-banner p.lede{color:#e7e8fb;max-width:56ch;margin-bottom:0;}
.page-banner-row{
  display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:1.2rem;
}

/* Freshness / sync bar (News, Events, Blogs & Test) */
.sync-bar{
  display:inline-flex;align-items:center;gap:.6rem;
  background:rgba(255,255,255,.1);
  border:1px solid rgba(255,255,255,.35);
  border-radius:999px;
  padding:.5rem .9rem .5rem .7rem;
  font-size:.85rem;
  color:#fff;
}
.sync-dot{
  width:9px;height:9px;border-radius:50%;
  background:var(--gold-500);
  box-shadow:0 0 0 0 rgba(207,139,48,.7);
  animation:pulse-dot 2.4s ease-out infinite;
}
@keyframes pulse-dot{
  0%{box-shadow:0 0 0 0 rgba(207,139,48,.55);}
  70%{box-shadow:0 0 0 7px rgba(207,139,48,0);}
  100%{box-shadow:0 0 0 0 rgba(207,139,48,0);}
}
.sync-bar button{
  background:none;border:0;color:var(--gold-300);font-weight:700;
  font-size:.85rem;cursor:pointer;padding:0;margin-left:.35rem;
}
.sync-bar button:hover{color:#fff;text-decoration:underline;}
.sync-bar.is-loading .sync-dot{animation:none;opacity:.5;}

/* Light variant, for use on white section backgrounds (e.g. Blogs & Test subtab panels) */
.sync-bar--light{
  background:var(--gold-050);
  border:1px solid var(--gold-500);
  color:var(--ink);
}
.sync-bar--light button{color:var(--blue-700);}
.sync-bar--light button:hover{color:var(--gold-700);}

/* ---------------------------------------------------------------------- */
/* Cards — thin gold lining, no heavy shadow                              */
/* ---------------------------------------------------------------------- */
.grid{display:grid;gap:var(--gap);}
.grid-4{grid-template-columns:repeat(4,1fr);}
.grid-3{grid-template-columns:repeat(3,1fr);}
.grid-2{grid-template-columns:repeat(2,1fr);}

.card{
  background:var(--paper);
  border:1px solid var(--gold-500);
  border-radius:var(--radius);
  padding:1.7rem;
  box-shadow:var(--shadow-soft);
}
.focus-card .icon{
  width:46px;height:46px;color:var(--blue-700);margin-bottom:1rem;
}
.focus-card h3{font-size:1.08rem;margin-bottom:.5rem;}
.focus-card p{font-size:.94rem;opacity:.85;margin-bottom:0;}

.pub-card{
  display:flex;flex-direction:column;gap:.6rem;
  border-left:4px solid var(--gold-500);
  border-top:1px solid var(--line);
  border-right:1px solid var(--line);
  border-bottom:1px solid var(--line);
  border-radius:0 var(--radius) var(--radius) 0;
  padding:1.4rem 1.5rem;
  background:var(--paper);
}
.pub-card .pub-venue{font-size:.78rem;font-weight:700;color:var(--gold-700);}
.pub-card h3{font-size:1.05rem;margin-bottom:0;}
.pub-card p{font-size:.92rem;opacity:.85;margin-bottom:.2rem;}
.pub-card .pub-link{font-weight:700;font-size:.9rem;}

/* Feed cards (News / Events / Blog) */
.feed-list{display:grid;gap:1.1rem;}
.feed-card{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:1.2rem;
  padding:1.3rem 1.5rem;
  background:var(--paper);
  border:1px solid var(--line);
  border-left:4px solid var(--blue-700);
  border-radius:0 var(--radius) var(--radius) 0;
}
.feed-card .date-chip{
  text-align:center;
  background:var(--blue-050);
  border:1px solid var(--blue-700);
  border-radius:var(--radius);
  padding:.5rem .7rem;
  min-width:64px;
  height:fit-content;
}
.feed-card .date-chip .d{display:block;font-size:1.15rem;font-weight:900;color:var(--blue-700);line-height:1;}
.feed-card .date-chip .m{display:block;font-size:.7rem;font-weight:700;color:var(--blue-700);text-transform:uppercase;margin-top:.2rem;}
.feed-card h3{font-size:1.08rem;margin-bottom:.3rem;}
.feed-card .meta{font-size:.8rem;color:var(--gold-700);font-weight:700;margin-bottom:.4rem;}
.feed-card p{font-size:.93rem;opacity:.86;margin-bottom:.5rem;}
.feed-card .tags{display:flex;flex-wrap:wrap;gap:.4rem;margin-bottom:.5rem;}
.feed-card .tags span{
  font-size:.72rem;font-weight:700;color:var(--blue-700);
  background:var(--blue-050);border-radius:999px;padding:.2rem .6rem;
}
.feed-card .read-link{font-weight:700;font-size:.9rem;}

.feed-state{
  padding:2.4rem 1.5rem;text-align:center;
  border:1px dashed var(--gold-500);
  border-radius:var(--radius);
  background:var(--gold-050);
  color:var(--ink);
}
.feed-state.is-error{border-color:#b3341f;background:#fdf1ee;}
.feed-skeleton{
  height:96px;border-radius:var(--radius);
  background:linear-gradient(90deg,var(--paper-dim) 25%,var(--blue-050) 37%,var(--paper-dim) 63%);
  background-size:400% 100%;
  animation:shimmer 1.4s ease infinite;
  border:1px solid var(--line);
}
@keyframes shimmer{0%{background-position:100% 0;}100%{background-position:0 0;}}

.feed-toolbar{display:flex;justify-content:flex-end;margin-bottom:1.2rem;}

/* Sub-tabs (Blogs & Test) */
.subtabs{display:flex;gap:.5rem;margin-bottom:1.8rem;border-bottom:1px solid var(--line);}
.subtabs button{
  background:none;border:0;cursor:pointer;
  padding:.75rem 1rem;
  font-weight:700;font-size:.95rem;
  color:var(--ink);opacity:.6;
  border-bottom:3px solid transparent;
  margin-bottom:-1px;
}
.subtabs button[aria-selected="true"]{opacity:1;color:var(--blue-700);border-bottom-color:var(--gold-500);}
.subtabs button:hover{opacity:1;}

/* ---------------------------------------------------------------------- */
/* Contact page                                                           */
/* ---------------------------------------------------------------------- */
.contact-grid{display:grid;grid-template-columns:1fr 1.15fr;gap:2.5rem;align-items:start;}
.contact-info .item{display:flex;gap:.9rem;margin-bottom:1.4rem;}
.contact-info .icon{width:22px;height:22px;flex:none;color:var(--gold-600);margin-top:.15rem;}
.contact-info h3{font-size:.78rem;text-transform:none;font-weight:700;color:var(--gold-700);margin-bottom:.15rem;}
.contact-info p{margin-bottom:0;font-size:.97rem;}

.form-field{margin-bottom:1.1rem;}
.form-field label{display:block;font-weight:700;font-size:.88rem;margin-bottom:.35rem;}
.form-field input,.form-field textarea{
  width:100%;
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:.7rem .8rem;
  font-family:inherit;font-size:.96rem;
  background:var(--paper);color:var(--ink);
}
.form-field input:focus,.form-field textarea:focus{border-color:var(--blue-700);}
.form-field textarea{resize:vertical;min-height:130px;}
.form-note{font-size:.8rem;opacity:.75;margin-top:.6rem;}
.hp-field{position:absolute;left:-9999px;top:-9999px;}
.form-status{
  display:none;margin-top:1rem;padding:.8rem 1rem;
  border-radius:var(--radius);font-size:.9rem;font-weight:600;
}
.form-status.show{display:block;}
.form-status.ok{background:#eaf6ec;color:#1c5a2c;border:1px solid #bfe3c6;}
.form-status.err{background:#fdf1ee;color:#8a2a17;border:1px solid #f0c6bb;}

/* ---------------------------------------------------------------------- */
/* Footer                                                                  */
/* ---------------------------------------------------------------------- */
.site-footer{
  background:linear-gradient(180deg,var(--blue-800),var(--blue-900));
  color:#e9eaf9;
  border-top:3px solid var(--gold-500);
  padding-block:3rem 1.6rem;
}
.footer-grid{
  display:grid;grid-template-columns:1.3fr 1fr 1fr;gap:2.4rem;
  padding-bottom:2.2rem;
  border-bottom:1px solid rgba(255,255,255,.18);
}
.footer-grid h4{color:#fff;font-size:.85rem;margin-bottom:1rem;}
.footer-grid p{color:#c6c9ee;font-size:.9rem;}
.footer-grid ul{list-style:none;margin:0;padding:0;}
.footer-grid li{margin-bottom:.55rem;}
.footer-grid a{color:#dfe1f7;font-size:.9rem;}
.footer-grid a:hover{color:#fff;}
.social-row{display:flex;gap:.6rem;margin-top:.3rem;}
.social-row a{
  width:38px;height:38px;border-radius:50%;
  border:1px solid var(--gold-500);
  display:flex;align-items:center;justify-content:center;
  color:var(--gold-300);
  font-weight:700;font-size:.7rem;letter-spacing:.01em;
}
.social-row a:hover{background:var(--gold-500);color:var(--blue-900);text-decoration:none;}
.social-row svg{width:18px;height:18px;}
.footer-bottom{
  display:flex;flex-wrap:wrap;gap:.8rem;justify-content:space-between;
  padding-top:1.4rem;font-size:.82rem;color:#aeb2df;
}
.footer-bottom a{color:#aeb2df;}
.footer-bottom a:hover{color:#fff;}

/* ---------------------------------------------------------------------- */
/* Responsive                                                              */
/* ---------------------------------------------------------------------- */
@media (max-width:959px){
  .nav-toggle{display:inline-flex;}
  .site-nav{
    position:absolute;top:100%;left:0;right:0;
    background:var(--blue-800);
    border-bottom:3px solid var(--gold-500);
    max-height:0;overflow:hidden;
    transition:max-height .25s ease;
  }
  .site-nav.is-open{max-height:22rem;}
  .site-nav ul{flex-direction:column;padding:.5rem 1.25rem 1rem;gap:0;}
  .site-nav a{display:block;padding:.85rem .3rem;border-bottom:1px solid rgba(255,255,255,.12);border-radius:0;}
  .site-nav a[aria-current="page"]{border-bottom-color:var(--gold-500);}
}

@media (max-width:1024px){
  .grid-4{grid-template-columns:repeat(2,1fr);}
  .grid-3{grid-template-columns:repeat(2,1fr);}
  .contact-grid{grid-template-columns:1fr;}
  .footer-grid{grid-template-columns:1fr 1fr;row-gap:2rem;}
}

@media (max-width:640px){
  .section{padding:3.2rem 0;}
  .hero{padding-block:3.4rem 3.6rem;}
  .grid-4,.grid-3,.grid-2{grid-template-columns:1fr;}
  .footer-grid{grid-template-columns:1fr;}
  .feed-card{grid-template-columns:1fr;}
  .feed-card .date-chip{display:inline-flex;gap:.4rem;min-width:auto;width:fit-content;padding:.35rem .7rem;}
  .feed-card .date-chip .d,.feed-card .date-chip .m{display:inline;}
  .page-banner-row{align-items:flex-start;}
  .hero-credentials{gap:1.2rem;}
}

@media (min-width:1025px){
  .hero-inner{max-width:40rem;}
}
