/* yyahn.com-inspired single-page home layout.
   Scoped to body.home-layout so it never bleeds into other pages. */

body.home-layout {
  /* yyahn palette */
  --uva-blue: #232d4b;
  --uva-blue-dark: #133584;
  --uva-orange-muted: #a54d17;
  --text-primary: #111;
  --text-gray: #666;
  --text-gray-light: #aaa;
  --border-light: #e0e0e0;

  margin: 0;
  /* Override academic theme's masthead-height top padding (no masthead here) */
  padding: 0 0 4em !important;
  background: #ffffff;
  color: var(--text-primary);
  font-family: "Inter", "SF Pro Display", "Helvetica Neue", -apple-system,
    BlinkMacSystemFont, sans-serif;
  font-size: 1.05rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Neutralize academic theme heading margins inside the home layout */
body.home-layout h1,
body.home-layout h2,
body.home-layout h3,
body.home-layout h4 {
  margin-top: 0;
  font-family: inherit;
}

/* Suppress global animation transitions that the academic theme applies */
body.home-layout h1,
body.home-layout h2,
body.home-layout p,
body.home-layout a,
body.home-layout img {
  transition: none;
  -webkit-transition: none;
}

body.home-layout a {
  color: var(--uva-blue-dark);
  text-decoration: none;
}
body.home-layout a:hover {
  color: var(--uva-orange-muted);
  text-decoration: underline;
}

body.home-layout p,
body.home-layout ul,
body.home-layout ol {
  margin: 0 0 14px;
}

body.home-layout ul,
body.home-layout ol {
  padding-left: 22px;
}

body.home-layout li {
  margin-bottom: 4px;
}

/* ---- centered column ---- */
.home-header,
.home-main,
.home-footer {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 5%;
  box-sizing: border-box;
}

/* ---- top profile block ---- */
.home-header {
  text-align: center;
  padding-top: 56px;
  padding-bottom: 8px;
}

.home-avatar {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 18px;
  display: block;
}

.home-name {
  font-size: 1.9rem;
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
  color: var(--uva-blue);
}

.home-tagline {
  font-size: 1rem;
  color: var(--text-gray);
  margin: 0 0 14px;
}

.home-social {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  gap: 18px;
  font-size: 1.2rem;
}

.home-social a {
  color: var(--text-gray);
}
.home-social a:hover {
  color: var(--uva-orange-muted);
  text-decoration: none;
}
.home-social .hf-icon {
  font-size: 1.1rem;
  line-height: 1;
}

/* ---- bracket-style anchor nav (sticky) ---- */
.home-nav {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  padding: 12px 20px;
  z-index: 10;
  margin-top: 14px;
  font-size: 0.95rem;
}

.home-nav a {
  color: var(--uva-blue);
  font-weight: 400;
  padding: 0 14px;
  position: relative;
  text-decoration: none;
}
.home-nav a + a::before {
  content: "·";
  position: absolute;
  left: -3px;
  color: var(--text-gray-light);
}
.home-nav a:hover {
  color: var(--uva-orange-muted);
  text-decoration: none;
}

/* ---- main content area ---- */
.home-main {
  padding-top: 32px;
  padding-bottom: 64px;
}

.home-main section {
  margin-bottom: 0; /* spacing handled by asterisk divider below */
  scroll-margin-top: 70px; /* offset so sticky nav doesn't cover headings */
}

/* yyahn-style asterisk divider between sections */
.home-main section + section::before {
  content: "* * *";
  display: block;
  text-align: center;
  letter-spacing: 0.5em;
  color: var(--text-gray-light);
  margin: 44px 0 40px;
  font-size: 1rem;
}

/* yyahn heading colors:
   h2 -> orange-muted, h3 -> gray, h4 -> navy blue */
.home-main h2 {
  font-size: 1.4rem;
  font-weight: 400;
  margin: 0 0 18px;
  color: var(--uva-orange-muted);
  letter-spacing: -0.005em;
}

.home-main h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 22px 0 6px;
  color: var(--text-gray);
}

.home-main h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 16px 0 4px;
  color: var(--uva-blue);
}

.home-main hr {
  border: 0;
  border-top: 1px solid var(--border-light);
  margin: 32px 0;
}

/* project / publication entries */
.home-entry {
  margin-bottom: 22px;
}
.home-entry h3 {
  margin: 0 0 4px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--uva-blue);
}
.home-entry h3 a {
  color: var(--uva-blue-dark);
}
.home-entry .home-entry-meta {
  color: var(--text-gray);
  font-size: 0.88rem;
  margin: 0 0 6px;
}
.home-entry p {
  margin: 0 0 6px;
}

/* ---- vertical timeline (CV experience + education) ---- */
.timeline {
  position: relative;
  margin: 18px 0 24px;
  padding-left: 28px;
  border-left: 2px solid var(--border-light);
}

.timeline-item {
  position: relative;
  margin-bottom: 28px;
}
.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -35px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--uva-blue-dark);
  box-sizing: border-box;
}

.timeline-date {
  font-size: 0.82rem;
  color: var(--text-gray);
  font-weight: 500;
  margin-bottom: 2px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.timeline-item h4 {
  margin: 0 0 2px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--uva-blue);
}

.timeline-org {
  color: var(--text-gray);
  font-style: italic;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.timeline-item ul {
  margin-top: 6px;
  margin-bottom: 0;
}

.timeline-item ul li {
  font-size: 0.95rem;
  color: #333;
}

/* ---- inner post / project page content (no header on these pages) ---- */
.home-article {
  padding-top: 12px;
}

.post-title {
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--uva-blue);
  letter-spacing: -0.01em;
}

.post-meta {
  color: var(--text-gray);
  font-size: 0.9rem;
  margin: 0 0 22px;
}

.post-content h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 28px 0 10px;
  color: var(--uva-blue);
}

.post-content h2 {
  font-size: 1.3rem;
  font-weight: 400;
  margin: 24px 0 8px;
  color: var(--uva-orange-muted);
}

.post-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 20px 0 6px;
  color: var(--text-gray);
}

.post-content blockquote {
  margin: 14px 0;
  padding: 4px 0 4px 1.4rem;
  border-left: 3px solid var(--text-gray-light);
  color: var(--text-gray);
  font-style: italic;
  background: transparent;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.post-content code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
  font-size: 0.9em;
  background: #f8f8f8;
  padding: 1px 5px;
  border-radius: 3px;
}

.post-content pre {
  background: #f8f8f8;
  padding: 14px 16px;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.5;
}

.post-content pre code {
  background: transparent;
  padding: 0;
}

.post-refs {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
  font-size: 0.92rem;
  color: var(--text-gray);
}

.post-back {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
  font-size: 0.92rem;
}
.post-back a {
  color: var(--text-gray);
}
.post-back a:hover {
  color: var(--uva-orange-muted);
}

/* ---- footer ---- */
.home-footer {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-gray-light);
  padding-top: 22px;
  padding-bottom: 24px;
  margin-top: 48px;
  border-top: 1px solid var(--border-light);
}
.home-footer a {
  color: var(--text-gray-light);
}

/* ---- responsive tweaks ---- */
@media (max-width: 600px) {
  body.home-layout {
    font-size: 1rem;
  }
  .home-header {
    padding-top: 40px;
  }
  .home-avatar {
    width: 110px;
    height: 110px;
  }
  .home-name {
    font-size: 1.6rem;
  }
  .home-nav {
    padding: 10px 12px;
    font-size: 0.88rem;
  }
  .home-nav a {
    padding: 0 10px;
  }
  .home-main h2 {
    font-size: 1.2rem;
  }
  .timeline {
    padding-left: 22px;
  }
  .timeline-item::before {
    left: -29px;
  }
}
