/* ---------------------------------------------------------
   Personal academic site - dark editorial style
   --------------------------------------------------------- */

:root {
  --navy: #0b182a;
  --charcoal: #2f2e2e;
  --charcoal-light: #3f4045;
  --text: #ffffff;
  --muted: #d8d5d0;
  --rule: rgba(255, 255, 255, 0.55);
  --green: #5fc98a;
  --red: #ea9a94;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--navy);
  color: var(--text);
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: 21px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.65;
}

/* Navigation ---------------------------------------------- */

.topnav {
  background: var(--charcoal);
  position: sticky;
  top: 0;
  z-index: 20;
}

.nav-inner {
  max-width: 1150px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 40px;
}

.nav-inner a {
  color: var(--muted);
  text-decoration: none;
  font-size: 22px;
  letter-spacing: 0.6px;
}

.nav-inner a:hover,
.nav-inner a.active {
  color: #ffffff;
  opacity: 1;
}

/* Hero ---------------------------------------------------- */

.hero {
  padding: 60px 24px 80px;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 55px;
}

.hero-photo {
  flex: 0 1 340px;
  max-width: 340px;
  margin-top: 120px;
}

.hero-photo img {
  width: 100%;
  display: block;
  filter: grayscale(100%);
}

.hero-text {
  flex: 1 1 420px;
  max-width: 620px;
  text-align: center;
}

h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 500;
  font-size: clamp(42px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: 1px;
  margin: 0 0 30px;
}

.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  width: 290px;
  max-width: 80%;
  margin: 0 auto 28px;
}

.line {
  font-style: italic;
  margin: 0 0 22px;
}

/* Sections ------------------------------------------------ */

main {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px 30px;
}

section {
  padding: 46px 0;
}

main section + section {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 400;
  font-size: 34px;
  letter-spacing: 5px;
  text-transform: uppercase;
  text-align: center;
  color: #e9e6e1;
  margin: 0 0 14px;
}

.h2-rule {
  width: 90px;
  height: 4px;
  background: var(--rule);
  margin: 0 auto 32px;
}

p {
  margin: 0 0 18px;
}

.centered {
  text-align: center;
}

.pubs {
  padding-left: 22px;
}

.pubs li {
  margin-bottom: 16px;
}

/* Contact and message form -------------------------------- */

.contact {
  background: var(--charcoal-light);
  padding: 60px 24px 70px;
}

.contact-inner {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.message-form {
  max-width: 620px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.message-form input[type="email"],
.message-form input[type="text"],
.message-form textarea {
  width: 100%;
  background: #ffffff;
  color: #1c1c1c;
  border: 0;
  border-bottom: 3px solid #d3d3d3;
  padding: 16px 20px;
  font-family: inherit;
  font-size: 19px;
  line-height: 1.4;
}

.message-form textarea {
  min-height: 150px;
  resize: vertical;
}

.message-form input::placeholder,
.message-form textarea::placeholder {
  color: #6d6d6d;
}

.message-form input:focus,
.message-form textarea:focus {
  outline: 0;
  border-bottom-color: #8f98a8;
}

.message-form .honey {
  display: none;
}

.message-form button {
  margin: 26px auto 0;
  background: none;
  border: 0;
  color: #ffffff;
  font-family: inherit;
  font-size: 26px;
  letter-spacing: 1px;
  cursor: pointer;
  padding: 6px 10px;
}

.message-form button:hover {
  opacity: 0.7;
}

.message-form button:disabled {
  cursor: default;
  opacity: 0.55;
}

/* Status message shown after sending ---------------------- */

.form-status {
  display: none;
  margin: 16px auto 0;
  text-align: center;
  font-size: 20px;
  line-height: 1.4;
}

.form-status.is-visible {
  display: block;
}

.form-status.success {
  color: var(--green);
}

.form-status.error {
  color: var(--red);
}

.form-status.success::before {
  content: "✓";
  display: inline-block;
  margin-right: 10px;
  font-size: 26px;
  line-height: 1;
  vertical-align: -2px;
  color: var(--green);
}

.contact .links {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
}

/* Footer -------------------------------------------------- */

footer {
  background: var(--navy);
  text-align: center;
  padding: 28px 24px 36px;
  font-size: 16px;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.6);
}

footer p {
  margin: 0;
}

/* ---------------------------------------------------------
   Top navigation: menu left, social buttons right
   --------------------------------------------------------- */

.nav-inner {
  justify-content: space-between;
  gap: 14px 24px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 40px;
}

.nav-social {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-social a.social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 3px;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.nav-social a.social:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.08);
}

.nav-social svg {
  width: 17px;
  height: 17px;
  display: block;
  fill: currentColor;
}

.nav-social svg[stroke] {
  fill: none;
}

.social-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0.5px;
}

/* Curriculum vitae timeline -------------------------------- */

.cv-intro {
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
  font-size: 22px;
  margin: 0 0 36px;
}

.cv-intro em {
  font-style: italic;
}

.cv-timeline {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 44px;
}

.cv-entry {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 10px 30px;
  padding: 30px 34px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 4px;
}

.cv-period {
  font-size: 16px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  padding-top: 6px;
}

.cv-body h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 400;
  font-size: 27px;
  margin: 0 0 12px;
  color: #ffffff;
}

.cv-body p {
  margin: 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.65;
}

@media (max-width: 700px) {
  .cv-entry {
    grid-template-columns: 1fr;
    padding: 24px 22px;
  }
}

/* Spam protection checkbox --------------------------------- */

.captcha-wrap {
  margin: 26px 0 6px;
  display: flex;
  justify-content: center;
}

#recaptcha {
  display: flex;
  justify-content: center;
}

.human-check {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  background: #f9f9f9;
  border: 1px solid #d3d3d3;
  border-radius: 3px;
  cursor: pointer;
  user-select: none;
}

.human-check input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
}

.human-box {
  position: relative;
  display: inline-block;
  width: 26px;
  height: 26px;
  background: #ffffff;
  border: 2px solid #b7b7b7;
  border-radius: 2px;
}

.human-check input:checked + .human-box::after {
  content: "\2713";
  position: absolute;
  top: -7px;
  left: 2px;
  font-size: 25px;
  line-height: 1;
  color: #1a9c5b;
}

.human-label {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 15px;
  color: #3c4043;
}
