/* ════════════════════════════════════════════
   Jonny Kingslake — Personal Website
   ════════════════════════════════════════════ */

:root {
  --blue:       #003087;
  --blue-mid:   #1a4d9e;
  --blue-light: #75aadb;
  --blue-pale:  #ebf3fb;
  --text:       #1e1e2e;
  --text-light: #5b6880;
  --border:     #e2e8f0;
  --bg:         #ffffff;
  --bg-alt:     #f7f9fc;
  --max-w:      900px;
  --shadow:     0 2px 12px rgba(0,48,135,.08);
}

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

body {
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.8;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin-bottom: 1.1rem; }
ul { padding-left: 1.4rem; }
li { margin-bottom: .35rem; }
img { max-width: 100%; height: auto; display: block; }

/* ── Navigation ────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  box-shadow: 0 1px 8px rgba(0,0,0,.07);
}

.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .25rem;
}

.nav-brand {
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: .03em;
  color: var(--blue);
  padding: .9rem 0;
  white-space: nowrap;
}

.nav-brand:hover { text-decoration: none; color: var(--blue-mid); }

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.nav-links a {
  display: inline-block;
  padding: .85rem .75rem;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-light);
  transition: color .15s;
}

.nav-links a:hover { color: var(--blue); text-decoration: none; }

/* ── Section shells ────────────────────────── */
section { padding: 5rem 1.5rem; }
section:nth-child(even) { background: var(--bg-alt); }

.container { max-width: var(--max-w); margin: 0 auto; }

/* ── Section title ─────────────────────────── */
.section-title {
  font-size: 1.75rem;
  font-weight: 300;
  color: var(--blue);
  letter-spacing: .025em;
  margin-bottom: 2rem;
  padding-bottom: .7rem;
  border-bottom: 2px solid var(--blue-light);
}

/* ── Sub-headings ──────────────────────────── */
h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 2.2rem 0 .6rem;
}

/* ══════════════════════════════════════════
   HOME — hero + content
   ══════════════════════════════════════════ */
#home { padding: 0; }

/* Hero banner */
.hero {
  position: relative;
  min-height: 90vh;
  background-image: url('../images/gilkey-glacier.jpg');
  background-size: cover;
  background-position: center 40%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 15, 50, 0.38) 0%,
    rgba(0, 10, 40, 0.55) 100%
  );
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #fff;
  padding: 2rem;
  max-width: 840px;
}

.hero-name {
  font-size: 4rem;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  text-shadow: 0 2px 20px rgba(0,0,0,.45);
}

.hero-role {
  font-size: 1.05rem;
  font-weight: 300;
  letter-spacing: .06em;
  line-height: 1.8;
  opacity: .93;
}

.hero-location {
  position: absolute;
  bottom: 1.8rem;
  left: 2rem;
  color: rgba(255,255,255,.72);
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
}

/* Content section below hero */
.home-content {
  padding: 4.5rem 1.5rem;
}

.home-content-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 2.5rem 3rem;
  align-items: start;
}

.profile-photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 24px rgba(0,0,0,.15);
  border: 4px solid #fff;
  outline: 1px solid var(--border);
}

.logo-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  margin: 1.8rem 0;
}

.logo-row img {
  height: 44px;
  width: auto;
  object-fit: contain;
}

.contact-bar {
  font-size: .93rem;
  color: var(--text-light);
  margin-top: 1.6rem;
}

.contact-bar a { margin-right: 1.2rem; }

/* ── Announce box ──────────────────────────── */
.announce {
  background: var(--blue-pale);
  border-left: 4px solid var(--blue);
  padding: 1rem 1.4rem;
  border-radius: 0 6px 6px 0;
  margin: 1.8rem 0;
  font-size: .96rem;
  line-height: 1.65;
}

/* ══════════════════════════════════════════
   PHOTO STRIP — horizontal scrollable gallery
   ══════════════════════════════════════════ */
.photo-strip-label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: .6rem;
  margin-top: 1.8rem;
}

.photo-strip {
  display: flex;
  gap: .6rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: .75rem;
  margin-bottom: 1rem;
  cursor: grab;
}

.photo-strip:active { cursor: grabbing; }

.photo-strip img {
  height: 260px;
  width: auto;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 6px;
  scroll-snap-align: start;
  box-shadow: var(--shadow);
  transition: transform .15s;
  user-select: none;
}

.photo-strip img:hover { transform: scale(1.015); }

.photo-strip::-webkit-scrollbar { height: 4px; }
.photo-strip::-webkit-scrollbar-track { background: transparent; }
.photo-strip::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ══════════════════════════════════════════
   RESEARCH — figure gallery
   ══════════════════════════════════════════ */
.fig-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}

.fig-gallery figure {
  flex: 1 1 260px;
  max-width: 420px;
}

.fig-gallery figure img {
  width: 100%;
  border-radius: 6px;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}

.fig-gallery figure img:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,48,135,.14);
}

.fig-gallery figcaption {
  font-size: .78rem;
  color: var(--text-light);
  font-style: italic;
  margin-top: .5rem;
  line-height: 1.4;
}

/* Full-width single figure */
.fig-full { margin: 1.5rem 0 2rem; }
.fig-full img {
  width: 100%;
  border-radius: 6px;
  box-shadow: var(--shadow);
}
.fig-full figcaption {
  font-size: .78rem;
  color: var(--text-light);
  font-style: italic;
  margin-top: .5rem;
}

/* ══════════════════════════════════════════
   VIDEO EMBEDS
   ══════════════════════════════════════════ */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 1.8rem 0;
}

.video-card { }

.video-card .video-title {
  font-size: .9rem;
  font-weight: 700;
  margin-bottom: .5rem;
  color: var(--text);
}

.video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: var(--shadow);
  background: #111;
}

.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ══════════════════════════════════════════
   PUBLICATIONS
   ══════════════════════════════════════════ */
.pub-year {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--blue);
  margin-top: 2.5rem;
  margin-bottom: .9rem;
  padding-bottom: .3rem;
  border-bottom: 1px solid var(--border);
}

.pub-item {
  margin-bottom: .9rem;
  padding-left: 1rem;
  border-left: 3px solid var(--blue-light);
  line-height: 1.6;
  font-size: .95rem;
}

.pub-item em { font-style: italic; }

.pub-subsection-head {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-light);
  margin-top: 3rem;
  margin-bottom: .8rem;
}

/* ══════════════════════════════════════════
   CV
   ══════════════════════════════════════════ */
.cv-group { margin-bottom: .5rem; }

.cv-group h3 {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--blue);
  margin-top: 2.4rem;
  margin-bottom: .75rem;
  padding-bottom: .3rem;
  border-bottom: 1px solid var(--border);
}

.cv-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: .4rem 1.2rem;
  margin-bottom: 1.1rem;
  font-size: .95rem;
  line-height: 1.65;
}

.cv-year {
  font-weight: 700;
  color: var(--text-light);
  font-size: .85rem;
  padding-top: .1rem;
}

/* ══════════════════════════════════════════
   GROUP
   ══════════════════════════════════════════ */
.group-member {
  margin-bottom: 1.1rem;
  padding-left: 1rem;
  border-left: 3px solid var(--blue-light);
  font-size: .95rem;
  line-height: 1.6;
}

.group-member strong { color: var(--text); }

.group-dates {
  font-size: .85rem;
  font-weight: 400;
  color: var(--text-light);
  margin-left: .5rem;
}

.group-tag {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--blue-mid);
  margin-left: .5rem;
  opacity: .75;
}

.group-meta {
  font-size: .87rem;
  color: var(--text-light);
  margin-top: .1rem;
}

.group-now {
  color: var(--blue);
  font-weight: 700;
}

/* ══════════════════════════════════════════
   OPEN POSITIONS
   ══════════════════════════════════════════ */
.position-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.4rem 1.6rem;
  margin-bottom: 1.4rem;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
  transition: box-shadow .2s;
}

.position-card:hover { box-shadow: var(--shadow); }

.position-card--open {
  border-left: 4px solid var(--blue);
}

.position-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: .65rem;
}

.position-title {
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--text);
}

.position-badge {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .2rem .65rem;
  border-radius: 99px;
  background: var(--bg-alt);
  color: var(--text-light);
  border: 1px solid var(--border);
}

.position-badge--open {
  background: #e6f4ea;
  color: #1a6930;
  border-color: #b2dfbf;
}

.position-card p { font-size: .95rem; margin-bottom: .8rem; }

.position-link {
  font-size: .9rem;
  font-weight: 700;
  color: var(--blue);
}

/* ══════════════════════════════════════════
   TEACHING
   ══════════════════════════════════════════ */
.course-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.2rem;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
  transition: box-shadow .2s;
}

.course-card:hover { box-shadow: var(--shadow); }

.course-card .course-name {
  font-weight: 700;
  font-size: 1.02rem;
  margin-bottom: .2rem;
}

.course-card .course-meta {
  font-size: .85rem;
  color: var(--text-light);
  margin-bottom: .6rem;
}

.course-card p { margin-bottom: 0; font-size: .95rem; }

/* ══════════════════════════════════════════
   FIELDWORK  — cards
   ══════════════════════════════════════════ */
.fieldwork-entry { margin-bottom: 3.5rem; }
.fieldwork-entry h3 { font-size: 1.15rem; }

/* ══════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════ */
footer {
  background: #111827;
  color: #9ca3af;
  text-align: center;
  padding: 2.8rem 1.5rem;
  font-size: .87rem;
  line-height: 2;
}

footer a { color: var(--blue-light); }
footer a:hover { text-decoration: underline; }

/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */
@media (max-width: 720px) {
  .hero-name { font-size: 2.4rem; letter-spacing: .08em; }
  .hero-role { font-size: .93rem; }
  .hero { min-height: 70vh; }
  .home-content-inner { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .logo-row { justify-content: center; }
  .section-title { font-size: 1.45rem; }
  .nav-brand { font-size: .9rem; }
  .nav-links a { padding: .7rem .5rem; font-size: .68rem; }
  section { padding: 3.5rem 1rem; }
  .cv-row { grid-template-columns: 1fr; gap: .1rem; }
  .fig-gallery figure { flex: 1 1 100%; max-width: 100%; }
}
