/* Stephen Feeney — portfolio */
:root {
  --navy: #16283f;
  --navy-deep: #0e1b2c;
  --ink: #23282e;
  --muted: #66707c;
  --paper: #fbfaf7;
  --paper-alt: #f2f0ea;
  --hair: #dfdcd4;
  --link: #0f4c94;
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --body-font: "Lora", Georgia, serif;
  --ui: "Jost", "Avenir Next", "Helvetica Neue", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body-font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--link); text-decoration: none; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 28px; }
.section { padding: 96px 0; }
.section-alt { background: var(--paper-alt); }

.kicker {
  font-family: var(--ui);
  font-size: 12px; font-weight: 500; letter-spacing: 0.32em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 14px;
}
.kicker.light { color: rgba(255,255,255,0.65); }
h2 {
  font-family: var(--serif); font-weight: 600; color: var(--navy);
  font-size: clamp(36px, 5vw, 54px); line-height: 1.08; margin-bottom: 28px;
}
h2.light { color: #fff; }

/* ---------- Nav ---------- */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 18px 0; transition: background 0.35s ease, box-shadow 0.35s ease, padding 0.35s ease;
}
#nav.scrolled {
  background: rgba(251,250,247,0.94); backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--hair); padding: 12px 0;
}
.nav-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand {
  font-family: var(--serif); font-size: 22px; font-weight: 600; color: #fff;
  transition: color 0.35s ease;
}
#nav.scrolled .brand { color: var(--navy); }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a {
  font-family: var(--ui);
  font-size: 13.5px; font-weight: 500; letter-spacing: 0.08em;
  color: rgba(255,255,255,0.85); transition: color 0.35s ease;
}
#nav.scrolled .nav-links a { color: var(--ink); }
.nav-links a:hover { color: #7fa8d9; }
.nav-cta {
  border: 1px solid rgba(255,255,255,0.5); padding: 7px 16px; border-radius: 999px;
  transition: border-color 0.35s ease, background 0.2s ease;
}
#nav.scrolled .nav-cta { border-color: var(--navy); }
.nav-cta:hover { background: rgba(255,255,255,0.12); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; color: #fff; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  transform: scale(1.05); animation: heroDrift 18s ease-out forwards;
}
@keyframes heroDrift { to { transform: scale(1.0); } }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,20,32,0.55) 0%, rgba(10,20,32,0.35) 45%, rgba(10,20,32,0.72) 100%);
}
.hero-content { position: relative; z-index: 2; max-width: 820px; padding: 120px 28px 80px; }
.eyebrow {
  font-family: var(--ui);
  font-size: 13px; font-weight: 500; letter-spacing: 0.34em; text-transform: uppercase;
  color: rgba(255,255,255,0.82); margin-bottom: 22px;
}
.hero h1 {
  font-family: var(--serif); font-size: clamp(60px, 10vw, 108px);
  font-weight: 600; line-height: 1.0; margin-bottom: 24px;
  text-shadow: 0 2px 24px rgba(0,0,0,0.35);
}
.hero-sub {
  font-size: clamp(16px, 2vw, 19px); line-height: 1.65; color: rgba(255,255,255,0.92);
  max-width: 640px; margin: 0 auto 36px;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 13px 32px; border-radius: 999px;
  font-family: var(--ui);
  font-size: 14px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-solid { background: #fff; color: var(--navy); }
.btn-solid:hover { background: #e9eef5; }
.btn-ghost { border: 1.5px solid rgba(255,255,255,0.75); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,0.12); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: #21395a; }
.hero-scroll {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 2;
}
.hero-scroll span {
  display: block; width: 22px; height: 36px; border: 2px solid rgba(255,255,255,0.6);
  border-radius: 12px; position: relative;
}
.hero-scroll span::after {
  content: ""; position: absolute; top: 6px; left: 50%; margin-left: -2px;
  width: 4px; height: 8px; border-radius: 2px; background: rgba(255,255,255,0.8);
  animation: scrollHint 1.8s ease-in-out infinite;
}
@keyframes scrollHint { 0%,100% { transform: translateY(0); opacity: 1; } 60% { transform: translateY(10px); opacity: 0.2; } }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 340px 1fr; gap: 64px; align-items: start; }
.about-photo img { border-radius: 6px; box-shadow: 0 24px 60px -24px rgba(22,40,63,0.45); }
.about-text p { margin-bottom: 18px; max-width: 58ch; }
.about-text h2 { margin-bottom: 22px; }
.about-tags { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.about-tags span {
  font-family: var(--ui);
  font-size: 12.5px; font-weight: 500; letter-spacing: 0.08em; color: var(--navy);
  border: 1px solid var(--hair); background: #fff; padding: 7px 14px; border-radius: 999px;
}

/* ---------- Stats ---------- */
.stats { background: var(--navy); color: #fff; padding: 64px 0; }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px; text-align: center;
}
.stat strong {
  display: block; font-family: var(--serif); font-size: clamp(38px, 4.4vw, 56px);
  font-weight: 600; margin-bottom: 8px; color: #fff; line-height: 1;
}
.stat span {
  font-family: var(--ui);
  font-size: 13px; line-height: 1.55; color: rgba(255,255,255,0.75); display: block;
  letter-spacing: 0.03em;
}

/* ---------- Timeline ---------- */
.timeline { border-left: 2px solid var(--hair); margin-left: 8px; padding-left: 0; margin-top: 44px; }
.t-entry {
  display: grid; grid-template-columns: 170px 1fr; gap: 28px;
  padding: 0 0 44px 36px; position: relative;
}
.t-entry::before {
  content: ""; position: absolute; left: -7px; top: 7px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--paper); border: 3px solid var(--navy);
}
.t-when {
  font-family: var(--ui);
  font-size: 12.5px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); padding-top: 5px; white-space: nowrap;
}
.t-body h3 { font-family: var(--serif); font-size: 24px; font-weight: 600; color: var(--navy); margin-bottom: 8px; }
.t-body h3 span { font-family: var(--body-font); font-weight: 400; color: var(--ink); font-size: 16.5px; }
.t-body p { max-width: 62ch; color: #3a4048; }

/* ---------- Globe ---------- */
.globe-section {
  background: var(--navy-deep); color: #fff; padding: 96px 0 0;
}
.globe-hint {
  font-family: var(--ui); font-size: 14px; color: rgba(255,255,255,0.6);
  margin: -10px 0 34px; letter-spacing: 0.04em;
}
.globe-wrap { position: relative; }
#globe { width: 100%; height: 620px; background: var(--navy-deep); }
#globe canvas { outline: none; }
.globe-back {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  font-family: var(--ui); font-size: 13.5px; font-weight: 500; letter-spacing: 0.08em;
  color: #fff; background: rgba(14,27,44,0.85); border: 1px solid rgba(255,255,255,0.35);
  border-radius: 999px; padding: 10px 22px; cursor: pointer; z-index: 5;
  transition: background 0.2s ease;
}
.globe-back:hover { background: rgba(14,27,44,1); }
.globe-ledger {
  position: absolute; z-index: 5; top: 22px; left: 22px; bottom: 40px;
  width: 300px; overflow-y: auto; overscroll-behavior: contain;
  background: rgba(14,27,44,0.82); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.16); border-radius: 12px;
  padding: 10px;
}
.ledger-item {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: none; border: none; border-left: 3px solid transparent;
  padding: 12px 14px; border-radius: 8px;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.ledger-item + .ledger-item { margin-top: 2px; }
.ledger-item:hover { background: rgba(255,255,255,0.08); }
.ledger-item.active { background: rgba(255,255,255,0.1); border-left-color: #9fc1e8; border-radius: 4px 8px 8px 4px; }
.ledger-item .l-name {
  display: block; font-family: var(--serif); font-size: 18.5px; font-weight: 600;
  color: #fff; line-height: 1.25;
}
.ledger-item .l-role {
  display: block; font-family: var(--ui); font-size: 11px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.6);
  margin-top: 3px;
}
.maplibregl-popup { max-width: 300px !important; }
.maplibregl-popup-content {
  font-family: var(--body-font); color: var(--ink);
  border-radius: 8px; padding: 16px 18px; box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}
.maplibregl-popup-content h4 { font-family: var(--serif); font-size: 19px; font-weight: 600; color: var(--navy); margin-bottom: 2px; }
.maplibregl-popup-content .pop-role {
  font-family: var(--ui); font-size: 11px; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 8px;
}
.maplibregl-popup-content p { font-size: 13.5px; line-height: 1.55; }
.maplibregl-popup-close-button { font-size: 18px; padding: 2px 8px; }
.maplibregl-ctrl-attrib { font-size: 10px; }

/* ---------- Panorama quote ---------- */
.pano {
  position: relative; min-height: 420px; background-size: cover; background-position: center 65%;
  background-attachment: fixed; display: flex; align-items: center; justify-content: center;
}
.pano::after { content: ""; position: absolute; inset: 0; background: rgba(10,20,32,0.45); }
.pano p {
  position: relative; z-index: 2; font-family: var(--serif); font-style: italic;
  font-size: clamp(24px, 3.4vw, 34px); line-height: 1.45; color: #fff;
  max-width: 820px; text-align: center; padding: 80px 28px;
}

/* ---------- Projects ---------- */
.project {
  display: grid; grid-template-columns: minmax(300px, 5fr) 7fr; gap: 48px;
  align-items: center; padding: 56px 0; border-bottom: 1px solid var(--hair);
}
.project:last-child { border-bottom: none; padding-bottom: 0; }
.project:first-of-type { margin-top: 20px; }
.project:nth-child(even) .p-text { order: 2; }
.project:nth-child(even) .p-media { order: 1; }
.p-text h3 { font-family: var(--serif); font-size: 30px; font-weight: 600; color: var(--navy); margin-bottom: 4px; }
.p-club {
  font-family: var(--ui);
  font-size: 12px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 16px;
}
.p-text p { color: #3a4048; font-size: 15.5px; }
.p-media { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.p-media figure { position: relative; }
.p-media img {
  border-radius: 6px; width: 100%; height: 240px; object-fit: cover;
  box-shadow: 0 18px 40px -20px rgba(22,40,63,0.4);
  transition: transform 0.3s ease;
}
.p-media figure:hover img { transform: scale(1.02); }
.p-media figcaption { font-family: var(--ui); font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.chip {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  font-family: var(--ui);
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  background: rgba(14,27,44,0.82); color: #fff; padding: 5px 12px; border-radius: 999px;
}
.chip-after { background: rgba(29,92,56,0.88); }

/* ---------- Turfile ---------- */
.turfile { background: var(--paper); }
.turfile-grid { max-width: 760px; }
.turfile-text p { margin-bottom: 18px; max-width: 62ch; }
.turfile-actions { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; margin-top: 30px; }
.turfile-press-link { font-family: var(--ui); font-size: 14px; font-weight: 500; letter-spacing: 0.04em; }

/* ---------- Press ---------- */
.press { position: relative; color: #fff; overflow: hidden; }
.press-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.press-bg::after { content: ""; position: absolute; inset: 0; background: rgba(10,20,32,0.72); }
.press .container { position: relative; z-index: 2; }
.press-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 16px; }
.press-card {
  display: flex; flex-direction: column; gap: 10px;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.18);
  border-radius: 10px; padding: 30px 32px; backdrop-filter: blur(6px);
  transition: background 0.25s ease, transform 0.15s ease;
}
.press-card:hover { background: rgba(255,255,255,0.13); transform: translateY(-2px); }
.press-pub {
  font-family: var(--ui);
  font-size: 12px; font-weight: 600; letter-spacing: 0.26em; text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}
.press-title { font-family: var(--serif); font-size: 23px; font-weight: 500; line-height: 1.35; color: #fff; }
.press-more { font-family: var(--ui); font-size: 13.5px; font-weight: 500; color: #9fc1e8; margin-top: auto; }

/* ---------- Education ---------- */
.edu-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 16px; }
.edu-card {
  background: #fff; border: 1px solid var(--hair); border-radius: 10px; overflow: hidden;
}
.edu-card img { height: 150px; width: 100%; object-fit: contain; background: #fff; padding: 14px; border-bottom: 1px solid var(--hair); }
.edu-card h3 { font-family: var(--serif); font-size: 19px; font-weight: 600; color: var(--navy); padding: 16px 18px 4px; line-height: 1.3; }
.edu-card p { font-family: var(--ui); font-size: 13px; color: var(--muted); padding: 0 18px 18px; line-height: 1.55; }
.volunteer { margin-top: 56px; }
.volunteer h3 { font-family: var(--serif); font-size: 27px; font-weight: 600; color: var(--navy); margin-bottom: 16px; }
.volunteer ul { list-style: none; }
.volunteer li {
  padding: 12px 0 12px 22px; position: relative; border-bottom: 1px solid var(--hair);
  font-size: 15.5px; color: #3a4048;
}
.volunteer li::before { content: "–"; position: absolute; left: 0; color: var(--navy); font-weight: 600; }

/* ---------- Contact ---------- */
.contact { position: relative; color: #fff; overflow: hidden; text-align: center; }
.contact-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.contact-bg::after { content: ""; position: absolute; inset: 0; background: rgba(10,20,32,0.78); }
.contact-inner { position: relative; z-index: 2; padding-top: 110px; padding-bottom: 90px; }
.contact-links {
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 34px 0 44px;
}
.contact-links a {
  font-family: var(--ui);
  border: 1.5px solid rgba(255,255,255,0.4); color: #fff; border-radius: 999px;
  padding: 11px 24px; font-size: 14px; font-weight: 500; letter-spacing: 0.04em;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.contact-links a:hover { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.8); }
.fineprint { font-family: var(--ui); font-size: 13px; color: rgba(255,255,255,0.55); letter-spacing: 0.06em; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .project { grid-template-columns: 1fr; gap: 26px; }
  .project:nth-child(even) .p-text { order: 1; }
  .project:nth-child(even) .p-media { order: 2; }
  .edu-grid { grid-template-columns: repeat(2, 1fr); }
  .press-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-photo { max-width: 300px; }
  .pano { background-attachment: scroll; }
  #globe { height: 520px; }
  .globe-ledger {
    position: static; width: auto; margin: 0 28px 18px;
    display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; padding: 8px;
  }
  .ledger-item { flex: none; width: 220px; border-left: none; border-top: 3px solid transparent; }
  .ledger-item.active { border-left: none; border-top-color: #9fc1e8; border-radius: 4px 4px 8px 8px; }
}
@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .nav-links a:not(.nav-cta) { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .t-entry { grid-template-columns: 1fr; gap: 6px; }
  .p-media { grid-template-columns: 1fr; }
  .p-media img { height: 220px; }
  .edu-grid { grid-template-columns: 1fr; }
  #globe { height: 440px; }
}
