/* =============================================================
   Pavan Prasad Gorintla - Academic Portfolio
   Inspired by the layout and typography of cristinaclerici.com
   ============================================================= */

:root {
  --text: #1a1a1a;
  --text-soft: #555;
  --link: #1a1a1a;
  --link-hover: #999;
  --bg: #ffffff;
  --rule: #e5e5e5;
  --max-width: 980px;
  --gutter: 2rem;
  --serif: "Source Serif Pro", "Source Serif 4", "Charter", Georgia, serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 0.5px;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--link-hover);
}

/* ---------- Header / Nav ---------- */

header.site-header {
  border-bottom: 1px solid var(--rule);
  padding: 1.75rem var(--gutter) 1.25rem;
  margin-bottom: 3rem;
}

.site-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-title a {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
}

.site-nav {
  display: flex;
  gap: 1.75rem;
}

.site-nav a {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--text);
  position: relative;
  padding-bottom: 2px;
}

.site-nav a:hover {
  color: var(--text);
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.site-nav a:hover::after,
.site-nav a.active::after {
  transform: scaleX(1);
}

/* ---------- Page wrapper ---------- */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter) 5rem;
}

/* ---------- Home page (stacked: photo on top, text below) ---------- */

.home-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  padding-top: 1rem;
}

.home-photo {
  max-width: 480px;
  width: 100%;
}

.home-photo img {
  width: 100%;
  height: auto;
  display: block;
}

.home-text {
  max-width: 640px;
  width: 100%;
}

.home-text p {
  margin: 0 0 1.1rem;
  font-size: 1.08rem;
  line-height: 1.75;
}

.home-text p:last-child {
  margin-bottom: 0;
}

/* ---------- Research page ---------- */

.research-section {
  margin-top: 1rem;
  margin-bottom: 3rem;
}

.research-section h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.005em;
  margin: 0 0 1.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}

.paper {
  margin-bottom: 2.25rem;
}

.paper-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0 0 0.35rem;
}

.paper-meta {
  font-size: 0.95rem;
  color: var(--text-soft);
  margin: 0 0 0.6rem;
}

.paper-abstract {
  font-size: 0.97rem;
  line-height: 1.65;
  margin: 0;
  color: var(--text);
}

.paper-status {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
  border: 1px solid var(--rule);
  padding: 0.15rem 0.5rem;
  margin-left: 0.5rem;
  border-radius: 2px;
  vertical-align: middle;
}

/* ---------- Contacts page ---------- */

.contacts-page {
  text-align: center;
  padding-top: 1rem;
}

.contacts-page h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.85rem;
  margin: 0 0 2.5rem;
}

.contacts-photo {
  max-width: 380px;
  margin: 0 auto 2.5rem;
}

.contacts-photo img {
  width: 100%;
  height: auto;
  display: block;
}

.contacts-list {
  font-size: 1.05rem;
  line-height: 2;
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
}

.contacts-list strong {
  font-weight: 700;
}

.photo-credit {
  font-size: 0.85rem;
  color: var(--text-soft);
  font-style: italic;
  margin-top: 2.5rem;
}

/* ---------- Mobile ---------- */

@media (max-width: 720px) {
  :root { --gutter: 1.25rem; }
  body { font-size: 16px; }
  header.site-header { padding-top: 1.25rem; margin-bottom: 2rem; }
  .site-header-inner { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .site-nav { gap: 1.25rem; flex-wrap: wrap; }
  .home-grid { gap: 1.75rem; }
  .home-photo { max-width: 100%; }
  .home-text p { font-size: 1rem; }
}
