/* =====================================================
   M. Colin Marvin — Academic Website
   style.css  (v3)
   ===================================================== */

/* ── CSS Variables ─────────────────────────────────── */
:root {
  --nav-bg:     #466362;
  --nav-text:   #dfdfdf;
  --heading:    #2a0c4e;
  --accent:     #466362;
  --item-bg:    #dfdfdf;
  --white:      #ffffff;
  --text:       #222222;
  --text-mid:   #444444;
  --text-light: #666666;
  --border:     #ccc;
  --shadow:     rgba(42, 12, 78, 0.08);
  --max-width:  960px;
  --font:       'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* ── Reset & Base ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--white);
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--heading); text-decoration: underline; }
img { max-width: 100%; display: block; }
p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

h1, h2, h3, h4 {
  font-family: var(--font);
  color: var(--heading);
  line-height: 1.3;
}

/* ── Navigation ────────────────────────────────────── */
nav {
  background: var(--nav-bg);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-name {
  font-family: var(--font);
  font-size: 18px;
  font-weight: 600;
  color: var(--nav-text);
  letter-spacing: 0.04em;
  padding: 1.5rem 0;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 0;
}

.nav-links a {
  display: block;
  padding: 1.5rem 0.9rem;
  color: var(--nav-text);
  font-family: var(--font);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  border-bottom-color: var(--white);
}

/* ── Page wrapper ──────────────────────────────────── */
.page-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

/* ══════════════════════════════════════════════════════
   HOME PAGE
   ══════════════════════════════════════════════════════ */

/* Profile header: circle photo left, info right */
.profile-header {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

.headshot-circle {
  width: 160px;
  height: 160px;
  min-width: 160px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  box-shadow: 0 3px 16px var(--shadow);
  border: 3px solid var(--border);
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.profile-info p {
  margin-bottom: 0;
}

.profile-name-large {
  font-size: 35px;
  font-weight: 700;
  color: var(--heading);
  font-family: var(--font);
  line-height: 1.15;
}

.profile-position {
  font-family: var(--font);
  font-size: 18px;
  color: var(--text-light);
  margin-top: 0.1rem;
}

.profile-email {
  font-family: var(--font);
  font-size: 18px;
  margin-top: 0.15rem;
}

/* Social / link icons row */
.social-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.65rem;
}

.social-links a {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.18s, transform 0.18s;
}

.social-links a:hover {
  opacity: 0.72;
  transform: translateY(-1px);
  text-decoration: none;
}

/* Logo image icons */
.social-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 5px;
}

/* CV text pill */
.social-cv {
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--heading);
  border: 1.5px solid var(--heading);
  border-radius: 4px;
  padding: 0.26rem 0.72rem;
  letter-spacing: 0.04em;
  transition: background 0.18s, color 0.18s;
}

.social-links a:hover .social-cv {
  background: var(--heading);
  color: var(--white);
  opacity: 1;
}

/* Bio paragraph */
.home-bio {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-mid);
  margin-bottom: 2.25rem;
  text-align: justify;
}

/* Research theme blocks */
.theme-block {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.theme-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.theme-title {
  font-size: 25px;
  font-weight: 700;
  color: var(--heading);
  font-family: var(--font);
  margin-bottom: 0.5rem;
}

.theme-text {
  font-size: 16px;
  color: var(--text-mid);
  line-height: 1.78;
  margin: 0 0 0.9rem 0;
  text-align: justify;
}

.theme-img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  margin-top: 0.5rem;
}

.theme-relevant {
  font-size: 18px;
  color: var(--text);
  margin-top: 0.6rem;
  margin-bottom: 0;
}

.theme-relevant strong {
  color: var(--heading);
  font-weight: 700;
}

.theme-relevant a {
  color: var(--text);
  font-size: 18px;
  text-decoration: underline;
}

.theme-relevant a:hover {
  color: var(--heading);
}

.theme-credit {
  font-size: 11px;
  font-style: normal;
  color: var(--text-light);
  text-align: right;
  margin-top: 0.3rem;
  margin-bottom: 0;
}

.theme-img--natural {
  max-height: none;
  object-fit: contain;
  height: auto;
}

/* ══════════════════════════════════════════════════════
   PUBLICATIONS PAGE
   ══════════════════════════════════════════════════════ */

.pub-section-title {
  font-size: 1.2rem;
  font-weight: 700;
  font-family: var(--font);
  color: var(--heading);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
  margin-bottom: 1.5rem;
}

.pub-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-bottom: 3rem;
}

.pub-item {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.pub-num {
  font-family: var(--font);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  padding-top: 0.05rem;
  min-width: 2.5rem;
}

.pub-text {
  font-size: 18px;
  line-height: 1.65;
  color: var(--text-mid);
  margin: 0;
}

.pub-text .pub-author-me { font-weight: 700; color: var(--text); }
.pub-text .pub-journal { font-style: italic; }
.pub-text a {
  font-family: var(--font);
  font-size: 18px;
  color: var(--accent);
}

/* ══════════════════════════════════════════════════════
   FIELD PHOTOS PAGE — 2-column card grid
   ══════════════════════════════════════════════════════ */

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.field-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 1px 4px var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
}

.field-card:hover {
  box-shadow: 0 6px 20px var(--shadow);
  transform: translateY(-2px);
}

.field-card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #d4d0c8;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.field-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.field-img-placeholder {
  font-size: 0.7rem;
  color: #888;
  font-family: var(--font);
  text-align: center;
  line-height: 1.5;
}

.field-card-body {
  padding: 0.9rem 1.1rem 1rem;
}

.field-card-title {
  font-family: var(--font);
  font-size: 18px;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 0.3rem;
}

.field-card-desc {
  font-size: 16px;
  color: var(--text-mid);
  line-height: 1.55;
  margin: 0;
}

/* ══════════════════════════════════════════════════════
   MEDIA PAGE
   ══════════════════════════════════════════════════════ */

.media-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.media-item {
  display: flex;
  gap: 0.85rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.media-year {
  font-family: var(--font);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  min-width: 2.5rem;
  padding-top: 0.05rem;
}

.media-text {
  font-size: 18px;
  line-height: 1.65;
  color: var(--text-mid);
  margin: 0;
}

.media-text a { color: var(--accent); }

/* ══════════════════════════════════════════════════════
   SHARED — page header, footer
   ══════════════════════════════════════════════════════ */

.page-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.page-title {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--heading);
  font-family: var(--font);
}

footer {
  background: #f4f4f4;
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 1.5rem;
  font-family: var(--font);
  font-size: 0.78rem;
  color: var(--text-light);
}

footer a { color: var(--accent); }

/* ══════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════ */

@media (max-width: 680px) {
  .profile-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }

  .headshot-circle { width: 120px; height: 120px; min-width: 120px; }

  .profile-name-large { font-size: 1.6rem; }

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

  .nav-inner { flex-wrap: wrap; padding: 0.4rem 1rem; }
  .nav-name { padding: 0.5rem 0; }
  .nav-links a { padding: 0.5rem 0.6rem; font-size: 0.8rem; }
}

@media (max-width: 420px) {
  .page-wrapper { padding: 1.75rem 1rem 4rem; }
}
