/* =========================================================
   Gabriela Covatariu — academic site
   Design tokens
   ========================================================= */
:root{
  --bg: #ffffff;
  --bg-subtle: #f7f8fa;
  --ink: #14171c;
  --ink-soft: #565d66;
  --ink-faint: #8a909a;
  --line: #e4e7ec;

  --accent: #2554c7;
  --accent-dark: #122a63;
  --accent-mid: #1c3f9e;
  --accent-ink: #ffffff;
  --accent-soft: #eef2fc;

  --teal: #0f9d8c;
  --teal-soft: #e6f6f3;
  --amber: #e2a63b;
  --amber-soft: #fdf3e3;

  --max: 780px;
  --max-wide: 1080px;
  --gutter: clamp(20px, 5vw, 56px);
  --shadow-sm: 0 1px 2px rgba(20,23,28,0.06), 0 1px 1px rgba(20,23,28,0.04);
  --shadow-md: 0 6px 20px rgba(20,23,28,0.08), 0 2px 6px rgba(20,23,28,0.05);
  --shadow-lg: 0 18px 44px rgba(20,23,28,0.14), 0 4px 14px rgba(20,23,28,0.08);
  --radius: 12px;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body{
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3{
  font-family: "Archivo", "Inter", sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 0.4em;
  color: var(--ink);
}

h1{ font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -0.02em; }
h2{ font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
h3{ font-size: 1.15rem; font-weight: 700; }

p{ margin: 0 0 1em; color: var(--ink); }
a{ color: var(--accent); text-decoration-color: rgba(37,84,199,0.35); text-underline-offset: 3px; }
a:hover{ text-decoration-color: var(--accent); }
a:focus-visible, button:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}
img{ max-width: 100%; display: block; }

.mono{
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.86em;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}

.eyebrow{
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.76rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 20px;
  padding: 5px 12px;
  margin-bottom: 1em;
  display: inline-block;
}

/* ---------- Signature element: scale-bar rule ---------- */
.scale-bar{
  --tick: 14px;
  width: 100%;
  height: var(--tick);
  margin: 2.4rem 0;
  background-image:
    linear-gradient(var(--line), var(--line)),
    repeating-linear-gradient(
      90deg,
      var(--ink-faint) 0,
      var(--ink-faint) 1px,
      transparent 1px,
      transparent 28px
    );
  background-repeat: no-repeat;
  background-position: center, top left;
  background-size: 100% 1px, 100% 8px;
  position: relative;
}
.scale-bar.short{ width: 84px; margin: 1.2rem 0 2rem; }

/* ---------- Layout shells ---------- */
.wrap{ max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-wide{ max-width: var(--max-wide); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Header : colored professional nav ---------- */
header.site-header{
  position: sticky; top: 0; z-index: 30;
  background: linear-gradient(100deg, var(--accent-dark), var(--accent-mid) 60%, var(--accent));
  box-shadow: var(--shadow-md);
}
.header-stripe{
  height: 4px;
  background: linear-gradient(90deg, var(--teal), var(--accent) 35%, var(--amber) 70%, var(--teal));
  background-size: 200% 100%;
}
.header-inner{
  max-width: var(--max-wide); margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  height: 66px;
  position: relative;
  gap: 1rem;
}

.partner-logos{
  display: flex; align-items: center; background: #fff; border-radius: 8px;
  padding: 4px 8px; box-shadow: var(--shadow-sm); flex-shrink: 0;
}
.partner-logos a{ display: flex; align-items: center; height: 30px; }
.partner-logos img{ height: 30px; width: auto; display: block; }

.brand{
  font-family: "Archivo", sans-serif; font-weight: 800; font-size: 0.98rem;
  color: #fff; text-decoration: none; letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 10px; white-space: nowrap;
}

.nav-wrap{ display: flex; align-items: center; gap: 14px; margin-left: auto; }
nav.main-nav{ display: flex; align-items: center; gap: clamp(8px, 1.6vw, 22px); }
nav.main-nav a{
  font-size: 0.92rem; color: rgba(255,255,255,0.82); text-decoration: none; font-weight: 500;
  padding: 8px 2px; border-bottom: 2px solid transparent;
}
nav.main-nav a:hover{ color: #fff; border-bottom-color: rgba(255,255,255,0.5); }
nav.main-nav a[aria-current="page"]{ color: #fff; border-bottom-color: var(--amber); }

#lang-toggle{
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem; font-weight: 700;
  border: 1px solid rgba(255,255,255,0.35); background: rgba(255,255,255,0.12);
  color: #fff; border-radius: 20px;
  padding: 6px 14px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
#lang-toggle:hover{ background: #fff; color: var(--accent-dark); border-color: #fff; }

/* ---------- Mobile nav ---------- */
.nav-toggle{
  display: none; width: 38px; height: 38px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.35); background: rgba(255,255,255,0.1);
  cursor: pointer; align-items: center; justify-content: center;
  flex-direction: column; gap: 4px; flex-shrink: 0;
}
.nav-toggle span{ width: 18px; height: 2px; background: #fff; border-radius: 2px; }

@media (max-width: 860px){
  nav.main-nav{
    position: absolute; top: 66px; left: 0; right: 0;
    background: var(--accent-dark); border-bottom: 1px solid rgba(255,255,255,0.15);
    box-shadow: var(--shadow-md);
    flex-direction: column; align-items: flex-start; gap: 0;
    padding: 0.6rem var(--gutter) 1.1rem;
    max-height: 0; overflow: hidden;
    transition: max-height 0.25s ease;
  }
  nav.main-nav.open{ max-height: 420px; }
  nav.main-nav a{ width: 100%; padding: 0.7rem 0; border-bottom: 1px solid rgba(255,255,255,0.12); }
  nav.main-nav a:last-of-type{ border-bottom: none; }
  #lang-toggle{ margin-top: 0.8rem; }
  .nav-toggle{ display: inline-flex; }
  .brand span.brand-text{ display: none; }
}
@media (max-width: 560px){
  .partner-logos img{ height: 24px; }
  .partner-logos a{ height: 24px; }
}

main{ display: block; }

section{ padding: 3.2rem 0; }
section.tight{ padding: 2rem 0; }
.bg-subtle{ background: var(--bg-subtle); }

hr.hair{ border: none; border-top: 1px solid var(--line); margin: 2rem 0; }

/* ---------- Hero (home) ---------- */
.hero{ padding: clamp(2.4rem, 7vw, 4.6rem) 0 2.2rem; }
.hero .role{ font-size: 1.2rem; color: var(--ink-soft); margin: 0 0 1.6rem; font-weight: 500; }
.hero .affil{ font-size: 1rem; color: var(--ink-soft); }
.hero .affil strong{ color: var(--ink); font-weight: 600; }

.hero-banner{
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin: 2.2rem 0 0;
  border: 1px solid var(--line);
}
.hero-banner img{ width: 100%; height: auto; display: block; }

/* ---------- Tile grid (home quick links) ---------- */
.tiles{
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
  margin-top: 2.4rem;
}
.tile{
  background: var(--bg); padding: 1.6rem 1.7rem; text-decoration: none;
  display: flex; flex-direction: column; gap: 0.4rem;
  border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.tile:nth-child(2){ border-top-color: var(--teal); }
.tile:nth-child(3){ border-top-color: var(--amber); }
.tile:nth-child(4){ border-top-color: var(--accent-dark); }
.tile:hover{ box-shadow: var(--shadow-md); transform: translateY(-2px); }
.tile .t-num{ font-family: "IBM Plex Mono", monospace; font-size: 0.8rem; color: var(--accent); }
.tile .t-title{ font-family: "Archivo", sans-serif; font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.tile .t-desc{ font-size: 0.92rem; color: var(--ink-soft); }
@media (max-width: 560px){ .tiles{ grid-template-columns: 1fr; } }

/* ---------- Two-column data rows (studies, courses, publications) ---------- */
.two-col{
  display: grid; grid-template-columns: 168px 1fr; gap: 1.4rem;
  padding: 1.15rem 0; border-bottom: 1px solid var(--line);
}
.two-col:first-child{ border-top: 1px solid var(--line); }
.two-col .col-a{ }
.two-col .col-b{ }
@media (max-width: 600px){
  .two-col{ grid-template-columns: 1fr; gap: 0.3rem; }
}

.period-chip{
  display: inline-block; font-family: "IBM Plex Mono", monospace; font-size: 0.8rem;
  font-weight: 600; color: var(--accent); background: var(--accent-soft);
  border-radius: 6px; padding: 4px 9px; white-space: nowrap;
}
.title{ font-weight: 600; }
.detail{ color: var(--ink-soft); font-size: 0.95rem; margin-top: 0.25rem; }

/* ---------- Entries (publications) ---------- */
.entry-list{ list-style: none; margin: 0; padding: 0; }
.entry-list li{
  padding: 1.05rem 0; border-bottom: 1px solid var(--line);
  display: grid; grid-template-columns: 74px 1fr; gap: 1.2rem;
}
.entry-list li:first-child{ border-top: 1px solid var(--line); }
.entry-year{
  font-family: "IBM Plex Mono", monospace; color: var(--accent); font-size: 0.82rem;
  font-weight: 700; padding-top: 0.15rem;
}
.entry-body p{ margin: 0; font-size: 0.97rem; }
.entry-body .authors{ color: var(--ink-soft); }
.entry-body .lead-author{ color: var(--ink); font-weight: 600; }
.entry-body .venue{ font-style: italic; color: var(--ink-soft); }
@media (max-width: 620px){
  .entry-list li{ grid-template-columns: 1fr; gap: 0.25rem; }
}

/* ---------- Badges with logos (credentials) : fixed 60px ---------- */
.badge-row{ display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.1rem; }
.badge{
  display: inline-flex; align-items: center; gap: 14px;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 20px 10px 12px; font-size: 0.92rem; text-decoration: none; color: var(--ink);
  background: var(--bg); box-shadow: var(--shadow-sm);
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
a.badge:hover{ box-shadow: var(--shadow-md); transform: translateY(-2px); color: var(--accent); }
.badge img{ height: 60px; width: auto; object-fit: contain; }
.badge .badge-text{ display: flex; flex-direction: column; line-height: 1.25; }
.badge .badge-text strong{ font-size: 0.94rem; color: var(--ink); }
.badge .badge-text span{ font-size: 0.79rem; color: var(--ink-soft); }

/* ---------- Profile grid : image-only links, 40px ---------- */
.profile-grid{ display: flex; flex-wrap: wrap; align-items: center; gap: 1.4rem; margin-top: 1.2rem; }
.profile-grid a{
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); box-shadow: var(--shadow-sm);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.profile-grid a:hover{ box-shadow: var(--shadow-md); transform: translateY(-2px); }
.profile-grid a img{ height: 40px; width: auto; object-fit: contain; }

/* ---------- Course cards -> two columns ---------- */
.course{
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 1.2rem;
  border: 1px solid var(--line); border-left: 3px solid var(--teal); border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  margin-bottom: 1rem; box-shadow: var(--shadow-sm);
  transition: box-shadow 0.18s ease;
}
.course:hover{ box-shadow: var(--shadow-md); }
.course .level{
  font-family: "IBM Plex Mono", monospace; font-size: 0.74rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--teal); margin-bottom: 0.4rem; display:block;
}
.course h3{ margin-bottom: 0; font-size: 1.05rem; }
.course a.moodle{
  font-size: 0.88rem; font-weight: 700; white-space: nowrap;
  background: var(--accent-soft); color: var(--accent); padding: 8px 16px; border-radius: 8px;
  text-decoration: none;
}
.course a.moodle:hover{ background: var(--accent); color: #fff; }
@media (max-width: 560px){
  .course{ grid-template-columns: 1fr; }
  .course a.moodle{ justify-self: start; }
}

blockquote{
  margin: 2rem 0; padding: 1.4rem 1.6rem; border-left: 3px solid var(--amber);
  background: var(--amber-soft); border-radius: 0 var(--radius) var(--radius) 0;
  font-family: "Archivo", sans-serif; font-size: 1.2rem; font-weight: 600;
  color: var(--ink);
}
blockquote cite{ display:block; font-family: "Inter", sans-serif; font-weight: 400; font-size: 0.9rem; color: var(--ink-soft); margin-top: 0.5rem; font-style: normal; }

/* ---------- Project blocks (activities/funds) ---------- */
.project{ padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
.project:first-child{ border-top: 1px solid var(--line); }
.project h3{ margin-bottom: 0.3rem; }
.project .code{ font-family:"IBM Plex Mono", monospace; font-size:0.82rem; color: var(--ink-faint); }
.project .role{ color: var(--ink-soft); font-size: 0.94rem; margin-top: 0.3rem; }
.project-head{ display:flex; align-items:center; gap: 1rem; }
.project-head img{ height: 50px; width: auto; object-fit: contain; }

/* ---------- Activity groups (BIM-iss, CCE, BSEE) ---------- */
.activity-group{
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem 1.7rem; margin-bottom: 1.6rem; box-shadow: var(--shadow-sm);
}
.activity-head{
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 0.4rem;
}
.activity-title{ display: flex; align-items: center; gap: 14px; }
.activity-title img{ height: 60px; width: auto; object-fit: contain; }
#bimiss-logo{ height: 42px; } /* wordmark has extra internal whitespace, so it needs a smaller height than the round logos to look the same size */
.activity-title h3{ margin: 0; font-size: 1.25rem; }
.activity-social{ display: flex; align-items: center; gap: 10px; }
.activity-social a{
  display: inline-flex; width: 34px; height: 34px; border-radius: 50%;
  overflow: hidden; box-shadow: var(--shadow-sm); flex-shrink: 0;
}
.activity-social img{ width: 100%; height: 100%; object-fit: cover; }
.activity-editions{ list-style: none; margin: 1rem 0 0; padding: 0; }
.activity-editions li{
  display: flex; align-items: baseline; gap: 0.8rem;
  padding: 0.55rem 0; border-top: 1px solid var(--line); font-size: 0.95rem;
}
.activity-editions .ed-year{ font-family: "IBM Plex Mono", monospace; color: var(--accent); font-weight: 700; width: 44px; flex-shrink: 0; }

/* ---------- Contact ---------- */
.contact-block{ display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; margin-top: 1.5rem; }
@media (max-width: 700px){ .contact-block{ grid-template-columns: 1fr; gap: 2rem; } }
.addr{ font-size: 1rem; line-height: 1.9; }
.addr strong{ display:block; color: var(--ink); font-size: 1.05rem; margin-bottom: 0.3rem; }
.addr-card{
  border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--radius); padding: 1.6rem 1.8rem;
  box-shadow: var(--shadow-sm);
}
.addr-head{ display: flex; align-items: flex-start; gap: 12px; }
.addr-head img{ height: 28px; width: auto; margin-top: 4px; flex-shrink: 0; }
.contact-line{ display:flex; align-items:center; gap:10px; margin: 0 0 6px; }
.contact-line img{ height: 20px; width: auto; }

form.contact-form{
  display: flex; flex-direction: column; gap: 0.9rem;
  border: 1px solid var(--line); border-top: 3px solid var(--teal); border-radius: var(--radius); padding: 1.6rem 1.8rem;
  box-shadow: var(--shadow-sm);
}
form.contact-form label{ font-size: 0.86rem; color: var(--ink-soft); font-weight: 600; }
form.contact-form input, form.contact-form textarea{
  width: 100%; font-family: inherit; font-size: 0.96rem; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg-subtle);
  color: var(--ink);
}
form.contact-form input:focus, form.contact-form textarea:focus{ outline: none; border-color: var(--accent); background: var(--bg); }
form.contact-form button{
  align-self: flex-start; font-family: "Archivo", sans-serif; font-weight: 700;
  background: var(--accent); color: var(--accent-ink); border: none;
  padding: 11px 24px; border-radius: 8px; cursor: pointer; font-size: 0.96rem;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
form.contact-form button:hover{ background: var(--accent-dark); box-shadow: var(--shadow-md); }

.map-embed{
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md);
  border: 1px solid var(--line); margin-top: 2.2rem;
  position: relative; width: 100%; padding-bottom: 42%; height: 0;
}
.map-embed iframe{ position: absolute; top:0; left:0; width:100%; height:100%; border:0; }
@media (max-width: 700px){ .map-embed{ padding-bottom: 80%; } }

/* ---------- Footer ---------- */
footer{ background: var(--accent-dark); padding: 2.4rem 0; margin-top: 2rem; }
footer .wrap-wide{ display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
footer p{ margin:0; color: rgba(255,255,255,0.65); font-size: 0.86rem; }

/* ---------- Language visibility ---------- */
html[lang="ro"] [data-lang="en"]{ display: none !important; }
html[lang="en"] [data-lang="ro"]{ display: none !important; }

/* section heading with number tag */
.sec-head{ display:flex; align-items:baseline; gap: 0.7rem; margin-bottom: 0.3rem; }
.sec-head .tag{
  font-family:"IBM Plex Mono", monospace; font-size:0.76rem; font-weight: 700;
  color: #fff; background: var(--accent); border-radius: 50%;
  width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center;
}

/* ---------- Photo frame (about page portrait) ---------- */
.portrait{
  width: 132px; height: 132px; border-radius: 50%;
  object-fit: cover; border: 3px solid var(--bg);
  box-shadow: var(--shadow-md);
}
