/* ==========================================================================
   Francisco Pérez-Arce — recreation of the Wix site
   Plain HTML/CSS/JS, designed to deploy on GitHub Pages.
   ========================================================================== */

:root {
  --color-bg: #ffffff;
  --color-text: #2b2b2b;
  --color-muted: #6f6f6f;
  --color-rule: #cfcfcf;
  --color-accent: #1f1f1f;
  --color-overlay: rgba(170, 170, 170, 0.55);
  --color-overlay-strong: rgba(150, 150, 150, 0.99);
  --max-width: 1200px;
  --nav-height: 130px;
  --font-sans: "Avenir Next", "Avenir", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "Avenir Next", "Avenir", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

a { color: inherit; text-decoration: none; }
a:hover { color: #000; }

img { max-width: 100%; display: block; }

/* ---------- Header ---------- */
.site-header {
  position: relative;
  width: 100%;
  background: #fff;
  padding: 18px 0 0;
  z-index: 10;
}

.site-header .header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 80px;
}

.site-header .logo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  display: block;
  background: #eee;
  flex: 0 0 72px;
}

.site-header .logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.site-header .cart {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #1f5b6b;
  font-size: 13px;
}
.site-header .cart svg { width: 22px; height: 22px; }

/* ---------- Navigation ---------- */
.site-nav {
  border-top: 1px solid var(--color-rule);
  margin-top: 14px;
}

.site-nav .nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  font-size: 14px;
  position: relative;
}

.site-nav a.nav-link {
  color: var(--color-text);
  letter-spacing: 0.02em;
  padding: 4px 2px;
  transition: color 0.15s ease;
}
.site-nav a.nav-link:hover,
.site-nav a.nav-link.active { color: #000; font-weight: 500; }

.site-nav .social {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  color: #555;
}
.site-nav .social svg { width: 18px; height: 18px; }

/* ---------- Hero (homepage) ---------- */
.hero {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 160px);
  background-color: #3a3a3a; /* fallback before image loads */
  background-image: url("https://static.wixstatic.com/media/e48f7f_e3622eef1cb646fda3a1598dcc807bcc~mv2.jpg/v1/fill/w_1920,h_1500,al_c,q_90/e48f7f_e3622eef1cb646fda3a1598dcc807bcc~mv2.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 24px 80px;
  color: #f0f0f0;
}

.hero h1 {
  margin: 0 auto 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 4.2vw, 50px);
  text-align: center;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 14px rgba(0,0,0,0.25);
  color: #e9e9e9;
}

.hero .subtitle {
  margin: 0 auto 36px;
  font-size: clamp(13px, 1.4vw, 17px);
  text-align: center;
  color: #d8d8d8;
  text-shadow: 0 1px 10px rgba(0,0,0,0.25);
}

.hero .center-card {
  position: relative;
  width: min(620px, 96%);
  margin: 16px auto 0;
  background-image: url("../assets/podium.png");
  background-size: cover;
  background-position: center;
  background-color: #1a1a1a;
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 22px 32px;
}

.hero .menu-overlay {
  width: 100%;
  background: var(--color-overlay-strong);
  padding: 38px 36px;
  color: #ffffff;
}

.hero .menu-overlay a {
  display: block;
  font-size: clamp(18px, 1.7vw, 22px);
  letter-spacing: 0.01em;
  padding: 12px 4px;
  color: #fff;
  font-weight: 400;
  transition: opacity 0.15s ease;
}
.hero .menu-overlay a:hover { opacity: 0.75; }

/* ---------- Generic page (subpages) ---------- */
.page {
  max-width: 980px;
  margin: 0 auto;
  padding: 56px 24px 60px;
}

.page h1.page-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: 0.06em;
  text-align: center;
  margin: 8px 0 12px;
}

.page p.page-sub {
  text-align: center;
  color: var(--color-muted);
  margin: 0 0 36px;
  font-size: 15px;
}

/* Research page cards */
.papers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  margin: 30px auto 14px;
  max-width: 760px;
}

.paper-card {
  background: #d9d9d9;
  color: #1f1f1f;
  padding: 30px 22px;
  text-align: center;
  font-size: 17px;
  line-height: 1.4;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.paper-figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
  max-width: 760px;
  margin: 4px auto 0;
}
.paper-figures img { width: 100%; height: auto; }

/* News page */
.news-block {
  max-width: 760px;
  margin: 0 auto;
}
.news-block h2 {
  font-weight: 500;
  font-size: 22px;
  margin-top: 36px;
  margin-bottom: 12px;
}
.news-block .news-figure { margin-top: 18px; }
.news-block p { font-size: 16px; }

/* Publications page */
.publications {
  max-width: 820px;
  margin: 0 auto;
}
.publications h2.section-head {
  font-weight: 500;
  font-size: 18px;
  margin: 32px 0 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #444;
  border-bottom: 1px solid var(--color-rule);
  padding-bottom: 8px;
}
.publications ol {
  list-style: none;
  padding: 0;
  margin: 0;
}
.publications li {
  font-size: 15px;
  line-height: 1.55;
  margin-bottom: 18px;
  text-align: left;
  color: #2b2b2b;
}
.publications li a {
  color: #1a4f7a;
  text-decoration: underline;
  text-decoration-color: #aac0d4;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  word-break: break-word;
}
.publications li a:hover { color: #0a2d4d; }

/* Contact page */
.contact-block {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  font-size: 18px;
  line-height: 1.7;
}
.contact-block .name { font-weight: 600; }
.contact-block a { text-decoration: underline; color: #1a4f7a; }

/* Blog page */
.blog-list {
  max-width: 760px;
  margin: 0 auto;
}
.blog-post {
  border-top: 1px solid var(--color-rule);
  padding: 26px 0;
}
.blog-post:last-child { border-bottom: 1px solid var(--color-rule); }
.blog-post h2 {
  font-size: 20px;
  font-weight: 500;
  margin: 0 0 8px;
}
.blog-post .meta {
  font-size: 13px;
  color: var(--color-muted);
  margin: 6px 0 10px;
}
.blog-post p { font-size: 15px; color: #404040; margin: 0; }

/* CV page */
.cv-link-wrap {
  text-align: center;
  padding: 80px 0 120px;
}
.cv-link-wrap a {
  font-size: 64px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #1f1f1f;
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #fff;
  padding: 36px 24px 30px;
  text-align: center;
  font-size: 13px;
  color: var(--color-muted);
  border-top: 1px solid var(--color-rule);
}
.site-footer .email {
  font-size: 15px;
  margin-bottom: 12px;
  color: #2b2b2b;
}
.site-footer .email a { color: #1a4f7a; text-decoration: underline; }
.site-footer .social-row {
  margin: 10px 0 16px;
  display: flex;
  justify-content: center;
  gap: 16px;
}
.site-footer .social-row a { color: #555; }
.site-footer .copyright { color: var(--color-muted); }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .site-nav .nav-inner { gap: 14px; flex-wrap: wrap; padding-right: 50px; padding-left: 50px; }
  .site-header .cart { right: 14px; }
  .site-nav .social { right: 14px; }
  .hero { padding: 40px 18px 60px; min-height: 80vh; }
  .hero .center-card { padding: 28px 18px; }
  .hero .menu-overlay { padding: 22px 22px; }
  .papers-grid { grid-template-columns: 1fr; }
  .cv-link-wrap a { font-size: 44px; }
}
