:root{
  /* Option C — Light Cloud Slate */
  --bg:#2d3748;
  --border:rgba(148,163,184,0.28);
  --text:#e5e7eb;
  --muted:#9ca3af;
  --accent:#38bdf8;
  --shadow:0 18px 40px rgba(0,0,0,.22);
}

*{ box-sizing:border-box; margin:0; padding:0; }

body{
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.45;

  /* Option C background — lighter center */
  background: radial-gradient(
    1200px 750px at 20% 0%,
    #6b7f99 0%,
    #475569 40%,
    #2d3748 100%
  );
}

.app{
  display:flex;
  min-height:100vh;
  width:100%;
}

/* ================= Sidebar ================= */

.sidebar{
  width:300px;
  padding:22px 18px;

  /* Lighter sidebar (Option C tuned) */
  background:linear-gradient(
    180deg,
    rgba(71,85,105,.95),
    rgba(71,85,105,.82)
  );

  border-right:1px solid rgba(148,163,184,.32);
  display:flex;
  flex-direction:column;

  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand{
  display:flex;
  gap:12px;
  align-items:center;
  padding-bottom:18px;
  border-bottom:1px solid rgba(148,163,184,.32);
  margin-bottom:18px;
}

/* Badge untouched */
.badge{
  width:48px;
  height:48px;
  border-radius:14px;
  background:rgba(56,189,248,.18);
  border:1px solid rgba(56,189,248,.45);
  display:grid;
  place-items:center;
  overflow:hidden;
}

.badge-img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.badge-fallback{
  font-weight:800;
  color:#ffffff;
}

.brand strong{
  font-size:18px;
  color:#ffffff;
}

.brand small{
  display:block;
  color:#e2e8f0;
  margin-top:4px;
}

/* ================= Navigation ================= */

.nav{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-top:18px;
}

.nav a{
  padding:14px 16px;
  border-radius:12px;
  font-size:18px;
  font-weight:600;
  color:#f8fafc;
  text-decoration:none;
  border:1px solid transparent;
  outline:none;
}

.nav a:hover{
  background:rgba(56,189,248,.18);
  border-color:rgba(56,189,248,.32);
}

.nav a.active{
  background:rgba(56,189,248,.30);
  border-color:rgba(56,189,248,.55);
  box-shadow:0 10px 25px rgba(0,0,0,.18);
}

.nav a:focus-visible{
  outline:2px solid rgba(56,189,248,.75);
  outline-offset:2px;
}

/* Spacer */
.spacer{
  flex:1 1 auto;
  min-height:56px;
}

/* ================= Contact ================= */

details.contact{
  border-top:1px solid rgba(148,163,184,.30);
  padding-top:14px;
}

details.contact summary{
  padding:14px 16px;
  border-radius:12px;
  font-size:18px;
  font-weight:600;
  display:flex;
  justify-content:space-between;
  cursor:pointer;
  color:#f8fafc;
  list-style:none;
}

details.contact summary:hover{
  background:rgba(56,189,248,.16);
}

details.contact summary::-webkit-details-marker{ display:none; }

.chev{
  width:10px;height:10px;
  border-right:2px solid rgba(226,232,240,.7);
  border-bottom:2px solid rgba(226,232,240,.7);
  transform:rotate(-45deg);
  transition:transform .2s;
}

details[open] .chev{ transform:rotate(45deg); }

.contact-items{
  display:grid;
  gap:10px;
  padding:10px 6px 12px;
}

.contact-item{
  display:flex;
  gap:10px;
  padding:10px;
  border-radius:12px;
  background:rgba(71,85,105,.60);
}

.contact-item:hover{
  background:rgba(56,189,248,.14);
}

.contact-item a{
  color:#f8fafc;
  text-decoration:none;
  overflow-wrap:anywhere; /* prevents long email from breaking layout */
}

.contact-label{
  font-size:12px;
  color:var(--muted);
}

/* ================= Main ================= */

.main{
  flex:1;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:32px 24px;
}

.hero{
  width:min(980px,92%);
  padding:70px 60px;
  border-radius:22px;

  /* Slightly lighter hero to match Option C */
  background:linear-gradient(
    180deg,
    rgba(71,85,105,.88),
    rgba(51,65,85,.62)
  );

  border:1px solid var(--border);
  box-shadow:var(--shadow);
  text-align:center;
}

.divider{
  width:110px;height:4px;
  background:var(--accent);
  border-radius:999px;
  margin:0 auto 18px;
}

h1{
  font-size:clamp(34px,4vw,54px);
  margin-bottom:12px;
}
h1 span{ color:var(--accent); }

.subtitle{
  font-size:20px;
  color:var(--muted);
  max-width:70ch;
  margin:0 auto;
}

/* ================= Biography ================= */

.hero-left{ text-align:left; }
.divider-left{ margin-left:0; }

.portrait-wrap{ margin:18px 0; }

.portrait{
  width:160px;
  height:160px;
  border-radius:50%;
  object-fit:cover;
  border:3px solid rgba(56,189,248,.45);
  box-shadow:
    0 0 0 6px rgba(56,189,248,.15),
    0 18px 40px rgba(0,0,0,.45);
}

/* ================= Learning Logos ================= */

.logo-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:18px;
}

.logo-card{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:22px;
  border-radius:18px;
  border:1px solid rgba(148,163,184,.30);

  background:linear-gradient(
    180deg,
    rgba(100,116,139,.88),
    rgba(71,85,105,.78)
  );

  transition:transform .15s ease, border-color .15s ease;
}

.logo-card:hover{
  transform:translateY(-3px);
  border-color:rgba(56,189,248,.40);
}

.logo-card:focus-visible{
  outline:2px solid rgba(56,189,248,.75);
  outline-offset:3px;
}

.logo-img{
  max-width:240px;
  width:100%;
  object-fit:contain;
  filter:
    brightness(1.55)
    contrast(1.3)
    drop-shadow(0 3px 8px rgba(56,189,248,.45));
}

.logo-card:hover .logo-img{
  filter:
    brightness(1.8)
    contrast(1.45)
    drop-shadow(0 5px 14px rgba(56,189,248,.65));
}

/* ================= Publications ================= */

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

.pub-card{
  display:flex;
  gap:14px;
  align-items:center;
  padding:16px;
  border-radius:16px;
  border:1px solid rgba(148,163,184,.30);
  background: linear-gradient(180deg, rgba(100,116,139,.82), rgba(71,85,105,.72));
  text-decoration:none;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.pub-card:hover{
  transform: translateY(-2px);
  border-color: rgba(56,189,248,.45);
  background: linear-gradient(180deg, rgba(120,136,159,.86), rgba(71,85,105,.76));
}

.pub-card:focus-visible{
  outline:2px solid rgba(56,189,248,.75);
  outline-offset:3px;
}

.pub-icon{
  width:54px;
  height:54px;
  border-radius:14px;
  display:grid;
  place-items:center;
  font-weight:800;
  letter-spacing:.06em;
  color:#0b1220;
  background: rgba(56,189,248,.85);
  box-shadow: 0 10px 22px rgba(0,0,0,.20);
  flex:0 0 auto;
}

.pub-title{
  font-weight:700;
  color:#f8fafc;
  line-height:1.2;
  overflow-wrap:anywhere; /* long titles won’t overflow */
}

.pub-sub{
  margin-top:6px;
  color: rgba(226,232,240,.75);
  font-size: 13px;
}

/* ================= Mobile ================= */

@media(max-width:900px){
  .app{ flex-direction:column; }

  .sidebar{
    width:100%;
    position:relative;
    height:auto;
    overflow:visible;
    border-right:none;
    border-bottom:1px solid rgba(148,163,184,.35);
  }

  .hero{ padding:44px 22px; }
  .nav a{ font-size:16px; }

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

@media(max-width:700px){
  .logo-grid{ grid-template-columns:1fr; }
}

/* ================= Auth (UI only) ================= */

.auth-dock{
  position:fixed;
  top:14px;
  right:16px;
  z-index:1000;
}

.auth-btn{
  padding:10px 14px;
  border-radius:12px;
  border:1px solid rgba(56,189,248,.55);
  background: rgba(56,189,248,.18);
  color:#ffffff;
  font-weight:700;
  cursor:pointer;
  box-shadow: 0 12px 26px rgba(0,0,0,.18);
}

.auth-btn:hover{
  background: rgba(56,189,248,.28);
}

.auth-btn:focus-visible{
  outline:2px solid rgba(56,189,248,.75);
  outline-offset:3px;
}

.auth-overlay{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  background: rgba(2,6,23,.65);
  z-index:1100;
  padding:18px;
}

.auth-overlay.open{
  display:flex;
}

.auth-modal{
  /* KEY FIX: allow .auth-close absolute positioning relative to the modal */
  position: relative;

  width:min(420px, 92vw);
  border-radius:18px;
  border:1px solid rgba(148,163,184,.30);
  background: linear-gradient(180deg, rgba(71,85,105,.94), rgba(51,65,85,.86));
  box-shadow: 0 22px 60px rgba(0,0,0,.45);
  padding:16px;
}

/* Close X (single, authoritative definition) */
.auth-close{
  position:absolute;
  top:10px;
  right:12px;
  z-index:1;

  border:none;
  background:transparent;
  color: rgba(226,232,240,.9);
  font-size:22px;
  line-height:1;
  cursor:pointer;
  padding:4px 8px;
  border-radius:8px;
}

.auth-close:hover{
  background: rgba(56,189,248,.15);
}

.auth-input{
  width:100%;
  padding:12px 12px;
  border-radius:12px;
  border:1px solid rgba(148,163,184,.28);
  background: rgba(15,23,42,.35);
  color:#f8fafc;
  outline:none;
  margin-top:10px;
}

.auth-input:focus{
  border-color: rgba(56,189,248,.55);
  box-shadow: 0 0 0 4px rgba(56,189,248,.18);
}

.auth-primary{
  margin-top:12px;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid rgba(56,189,248,.70);
  background: rgba(56,189,248,.30);
  color:#ffffff;
  font-weight:800;
  cursor:pointer;
  width:100%;
}

.auth-primary:hover{
  background: rgba(56,189,248,.38);
}

.auth-foot{
  margin-top:10px;
  font-size:13px;
  color: rgba(226,232,240,.75);
}
