/* ----- Base typography and colors ----- */
:root{
  --accent: #2816c3;
  --muted: #6b7280;
  --text: #2b2b2b;
  --bg: #fbfbfb;
  --card: #ffffff;
  --shadow: rgba(17,17,17,0.06);
}

/* body base */
body {
  font-family: "Roboto", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  padding: 0;
}

/* headings */
h1, h2, h3 {
  color: #1f2d3d;
  margin-top: 0.6em;
  margin-bottom: 0.35em;
  font-weight: 700;
}

/* links */
a {
  color: #0066cc;
  text-decoration: none;
}
a:hover { text-decoration: underline; }

/* global containers / sections */
section {
  margin-bottom: 2rem;
}

/* images */
img {
  border-radius: 10px;
  box-shadow: 0 6px 18px var(--shadow);
  max-width: 100%;
  height: auto;
}

/* subtle cards for callouts/boxes */
.callout, .card {
  background: var(--card);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 8px 24px var(--shadow);
  margin-bottom: 1rem;
}

/* profile image small */
.profile-img {
  border-radius: 14px;
  width: 100%;
  height: auto;
  display: block;
}

/* list & achievement styling */
#achievements li {
  margin-bottom: 0.45em;
  font-weight: 500;
  color: #34495e;
}

/* badges (for milestones, skills) */
.badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.85rem;
  background: #eef2ff;
  color: var(--accent);
  margin-right: 0.4rem;
  margin-bottom: 0.4rem;
  border: 1px solid rgba(40,22,195,0.06);
}

/* grid tweaks for Quarto grids */
.g-col-2 img, .g-col-3 img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Navbar tweaks (works with Litera theme) */
.navbar {
  font-weight: 600;
}
.navbar a {
  color: #2c3e50;
}
.navbar .active, .navbar a[aria-current="page"] {
  color: var(--accent);
  border-bottom: 2px solid rgba(40,22,195,0.12);
  padding-bottom: 0.35rem;
}

/* code block improvements */
pre, code {
  background: #f6f8fa;
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", monospace;
}
pre {
  padding: 1rem;
  overflow-x: auto;
  border: 1px solid rgba(0,0,0,0.03);
  box-shadow: none;
}

/* responsive utilities */
@media (max-width: 900px) {
  .g-col-3 { grid-column: span 12; }
  .g-col-9 { grid-column: span 12; }
  .callout, .card { padding: 0.85rem; }
}

/* dark mode support (respects system preference) */
@media (prefers-color-scheme: dark) {
  :root {
    --text: #e6eef8;
    --bg: #0b1220;
    --card: #071022;
    --shadow: rgba(0,0,0,0.6);
  }
  body { background-color: var(--bg); color: var(--text); }
  a { color: #66aaff; }
  .callout, .card { box-shadow: none; border: 1px solid rgba(255,255,255,0.03); }
  pre, code { background: #071026; color: #dbeafe; }
}

/* small helper: horizontal rule style */
hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, rgba(0,0,0,0.06), rgba(0,0,0,0.02));
  margin: 2rem 0;
}

/* ====== NEW: Layout: wider center + sections ====== */

/* Main content container wider + centered */
#quarto-content {
  max-width: 1400px;       /* sync with _quarto.yml if you change width */
  margin: 0 auto;
  padding: 1.5rem 2rem;
}

/* Section spacing helpers */
.section-block {
  padding: 3rem 0;
}

.section-alt {
  background: #f3f4ff1f;
}

/* ====== NEW: Hero area (for Home page) ====== */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr);
  gap: 2.5rem;
  align-items: center;
  padding: 3rem 0 2.5rem 0;
}

.hero-title {
  font-size: 2.6rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.hero-highlight {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.hero-cta-group {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn-primary-hero,
.btn-ghost-hero {
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary-hero {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 10px 28px var(--shadow);
}

.btn-primary-hero:hover {
  opacity: 0.93;
  text-decoration: none;
}

.btn-ghost-hero {
  background: transparent;
  color: var(--accent);
  border-color: rgba(40,22,195,0.28);
}

.btn-ghost-hero:hover {
  background: rgba(40,22,195,0.06);
  text-decoration: none;
}

/* Hero profile image on the right */
.hero-profile {
  max-width: 320px;
  margin-left: auto;
}

/* ====== NEW: Quick “cards” for Research / Teaching / Projects ====== */

.home-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.3rem;
  margin-top: 2rem;
}

.home-card {
  background: var(--card);
  border-radius: 16px;
  padding: 1.15rem 1.2rem;
  box-shadow: 0 12px 30px var(--shadow);
  border: 1px solid rgba(0,0,0,0.02);
}

.home-card h3 {
  margin-top: 0;
  margin-bottom: 0.35rem;
  font-size: 1.1rem;
}

.home-card p {
  font-size: 0.93rem;
  color: var(--muted);
  margin-bottom: 0.8rem;
}

.home-card a {
  font-size: 0.9rem;
  font-weight: 600;
}

/* ====== NEW: Footer ====== */

.site-footer {
  margin-top: 3rem;
  padding: 1.3rem 0 1.8rem 0;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid rgba(0,0,0,0.04);
  text-align: center;
}

/* ====== NEW: Responsive tweaks for hero/cards/layout ====== */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-profile {
    margin: 2rem auto 0 auto;
  }
  .home-cards {
    grid-template-columns: minmax(0, 1fr);
  }
  #quarto-content {
    padding: 1rem 1.2rem;
  }
}
