/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --bg:          #edf1f7;
  --surface:     #ffffff;
  --surface-alt: #f5f7fa;
  --border:      #dde3ed;
  --primary:     #0b2240;
  --accent:      #1460a0;
  --teal:        #0091c2;
  --teal-light:  #38bdd8;
  --text:        #182842;
  --muted:       #5e728a;
  --shadow:      0 2px 20px rgba(11, 34, 64, 0.07);
  --shadow-hover:0 8px 32px rgba(11, 34, 64, 0.13);
  --radius:      16px;
  --sidebar-w:   262px;
  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 15.5px;
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  line-height: 1.74;
  min-height: 100vh;
  overflow-x: hidden;
}

/* DM Mono for UI labels, nav, tags — technical/monospace feel */
.sidebar-nav a,
.sidebar-name,
.entry-meta,
.timeline-meta,
.pub-year,
.tag,
.hero-badge,
.subsection-title,
.btn {
  font-family: 'DM Mono', 'Courier New', monospace;
}

/* ============================================================
   POLYMER / ENERGY CANVAS
   ============================================================ */
#polymer-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.site-wrapper {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  gap: 24px;
  max-width: 1140px;
  margin: 0 auto;
  padding: 30px 20px;
  align-items: start;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  position: sticky;
  top: 30px;
  background: rgba(255,255,255,0.87);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.95);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 20px;
  text-align: center;
  transition: box-shadow 0.3s var(--ease);
}
.sidebar:hover { box-shadow: var(--shadow-hover); }

/* ── Animated profile ring ── */
.profile-ring {
  position: relative;
  width: 132px;
  height: 132px;
  margin: 0 auto 16px;
}
.profile-ring::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(
    #0091c2 0%,
    #38bdd8 22%,
    #1460a0 46%,
    #0b2240 68%,
    #2e9e58 84%,   /* green — renewable energy nod */
    #0091c2 100%
  );
  animation: ring-spin 5s linear infinite;
  z-index: 0;
}
.profile-ring::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  background: var(--surface);
  z-index: 1;
}
@keyframes ring-spin { to { transform: rotate(360deg); } }
.profile-ring img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* ── Name & role ── */
.sidebar-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.sidebar-role {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

/* ── Nav ── */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 18px;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 0.80rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.22s var(--ease);
}
.sidebar-nav a i { width: 14px; text-align: center; font-size: 0.78rem; flex-shrink: 0; }
.sidebar-nav a:hover {
  background: rgba(0,145,194,0.08);
  color: var(--accent);
  transform: translateX(3px);
}
.sidebar-nav a.active {
  background: linear-gradient(135deg, rgba(0,145,194,0.12), rgba(20,96,160,0.07));
  color: var(--teal);
  font-weight: 600;
  transform: translateX(3px);
}

/* ── Social ── */
.sidebar-social {
  display: flex;
  justify-content: center;
  gap: 7px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.sidebar-social a {
  width: 31px;
  height: 31px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  transition: all 0.22s var(--ease);
}
.sidebar-social a:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(20,96,160,0.28);
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ── Cards ── */
.card {
  background: rgba(255,255,255,0.90);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.95);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px 34px;
  transition: box-shadow 0.28s var(--ease), transform 0.28s var(--ease);
}
.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

/* ── Section title ── */
.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  padding-bottom: 10px;
  position: relative;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 36px; height: 2.5px;
  background: linear-gradient(90deg, var(--teal), var(--teal-light));
  border-radius: 2px;
  transition: width 0.45s var(--ease);
}
.card:hover .section-title::after { width: 72px; }

/* ── Hero card ── */
.hero-card {
  background: linear-gradient(135deg, #0b2240 0%, #1460a0 52%, #0091c2 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero-card::before {
  content: '';
  position: absolute;
  top: -55%; right: -12%;
  width: 340px; height: 340px;
  background: radial-gradient(circle, rgba(56,189,216,0.16) 0%, transparent 70%);
  border-radius: 50%;
  animation: glow-pulse 5s ease-in-out infinite;
  pointer-events: none;
}
.hero-card::after {
  content: '';
  position: absolute;
  bottom: -45%; left: -8%;
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(46,158,88,0.10) 0%, transparent 68%);
  border-radius: 50%;
  animation: glow-pulse 7s ease-in-out infinite reverse;
  pointer-events: none;
}
@keyframes glow-pulse {
  0%,100% { transform: scale(1);   opacity: 0.55; }
  50%      { transform: scale(1.1); opacity: 1;    }
}
.hero-card .section-title         { color: #fff; font-size: 1.6rem; }
.hero-card .section-title::after  { background: linear-gradient(90deg,#38bdd8,rgba(255,255,255,0.35)); }
.hero-card p                      { color: rgba(255,255,255,0.87); position: relative; z-index: 1; }
.hero-card strong                 { color: #fff; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  color: rgba(255,255,255,0.88);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 20px;
  margin-bottom: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  position: relative; z-index: 1;
}

/* ── Subsection title ── */
.subsection-title {
  font-size: 0.90rem;
  font-weight: 600;
  color: var(--primary);
  margin: 22px 0 10px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.subsection-title::before {
  content: '';
  display: block;
  width: 3px; height: 15px;
  background: linear-gradient(180deg, var(--teal), var(--teal-light));
  border-radius: 2px;
  flex-shrink: 0;
}

/* ── Entry cards ── */
.entry-card {
  padding: 18px 20px;
  border-radius: 11px;
  border: 1px solid var(--border);
  margin-bottom: 12px;
  background: var(--surface-alt);
  position: relative;
  overflow: hidden;
  transition: all 0.22s var(--ease);
}
.entry-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2.5px;
  background: linear-gradient(180deg, var(--teal), var(--teal-light));
  border-radius: 3px 0 0 3px;
  transform: scaleY(0);
  transition: transform 0.25s var(--ease);
  transform-origin: bottom;
}
.entry-card:hover                { border-color: rgba(0,145,194,0.30); transform: translateX(4px); box-shadow: 0 3px 14px rgba(0,145,194,0.09); }
.entry-card:hover::before        { transform: scaleY(1); }
.entry-card h3                   { font-size: 0.92rem; font-weight: 600; color: var(--primary); margin-bottom: 5px; }
.entry-meta {
  font-size: 0.68rem;
  color: var(--teal);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.entry-card p                    { font-size: 0.83rem; color: var(--muted); line-height: 1.65; margin-bottom: 7px; }
.entry-card p:last-child         { margin-bottom: 0; }

/* ── Publications ── */
.pub-entry {
  padding: 18px 20px;
  border-radius: 11px;
  border: 1px solid var(--border);
  margin-bottom: 12px;
  background: var(--surface-alt);
  font-size: 0.84rem;
  line-height: 1.68;
  color: var(--text);
  transition: all 0.22s var(--ease);
}
.pub-entry:hover { border-color: rgba(0,145,194,0.28); box-shadow: 0 4px 14px rgba(0,145,194,0.09); }
.pub-year {
  display: inline-block;
  background: linear-gradient(135deg, var(--teal), var(--accent));
  color: #fff;
  font-size: 0.67rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 20px;
  margin-bottom: 7px;
  letter-spacing: 0.06em;
}
.pub-entry a { color: var(--accent); font-size: 0.82rem; }
.pub-entry a:hover { color: var(--teal); }

/* ── Tags ── */
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.tag {
  padding: 3px 10px;
  background: rgba(0,145,194,0.07);
  color: var(--accent);
  border: 1px solid rgba(0,145,194,0.18);
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 500;
  transition: all 0.18s var(--ease);
  cursor: default;
}
.tag:hover { background: var(--teal); color: #fff; border-color: var(--teal); }

/* ── Timeline ── */
.timeline { position: relative; padding-left: 24px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 6px; top: 8px; bottom: 8px;
  width: 1.5px;
  background: linear-gradient(180deg, var(--teal), var(--teal-light));
  border-radius: 1px;
}
.timeline-item {
  position: relative;
  margin-bottom: 14px;
  padding: 16px 18px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  transition: all 0.22s var(--ease);
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -27px; top: 22px;
  width: 11px; height: 11px;
  background: var(--teal);
  border-radius: 50%;
  border: 2.5px solid var(--bg);
  box-shadow: 0 0 0 1.5px var(--teal-light);
}
.timeline-item:hover { border-color: rgba(0,145,194,0.28); transform: translateX(4px); }
.timeline-title { font-weight: 700; color: var(--primary); font-size: 0.88rem; margin-bottom: 3px; }
.timeline-meta  { font-size: 0.72rem; color: var(--teal); font-weight: 600; margin-bottom: 6px; }
.timeline-body  { font-size: 0.82rem; color: var(--muted); line-height: 1.60; }

/* ── Contact grid ── */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 12px; }
.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 11px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  background: var(--surface-alt);
  font-size: 0.80rem;
  font-weight: 500;
  transition: all 0.22s var(--ease);
}
.contact-item i { font-size: 1.05rem; color: var(--teal); width: 20px; text-align: center; }
.contact-item:hover { border-color: var(--teal); background: rgba(0,145,194,0.05); transform: translateY(-2px); box-shadow: 0 5px 16px rgba(0,145,194,0.12); color: var(--accent); }

/* ── Button ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.22s var(--ease);
  font-family: inherit;
}
.btn-primary {
  background: linear-gradient(135deg, var(--teal), var(--accent));
  color: #fff;
  box-shadow: 0 3px 12px rgba(0,145,194,0.28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,145,194,0.36); color: #fff; }

/* ── Scroll reveal ── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.58s var(--ease), transform 0.58s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── Global text ── */
p { color: var(--text); line-height: 1.72; margin-bottom: 10px; font-size: 0.875rem; }
p:last-child { margin-bottom: 0; }
a { color: var(--accent); transition: color 0.18s; }
a:hover { color: var(--teal); }
ul { padding-left: 18px; }
li { font-size: 0.83rem; color: var(--muted); margin-bottom: 4px; }
strong { color: var(--primary); font-weight: 600; }

/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 840px) {
  .site-wrapper { grid-template-columns: 1fr; padding: 14px 12px; gap: 16px; }
  .sidebar { position: static; padding: 22px 16px; }
  .profile-ring { width: 100px; height: 100px; }
  .sidebar-nav { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .sidebar-nav a:hover, .sidebar-nav a.active { transform: none; }
  .card { padding: 22px 16px; }
  .hero-card .section-title { font-size: 1.25rem; }
}
