/* =========================================================
   LUIS FERNANDO MORA REYES
   Mockup-faithful academic profile
========================================================= */

:root {
  --paper: #f7f4ee;
  --paper-strong: #fffdf9;
  --ink: #181914;
  --muted: #68675f;
  --dark: #10110e;
  --dark-soft: #1a1c16;
  --olive: #3f4831;
  --olive-dark: #2d3424;
  --brick: #a74728;
  --brick-dark: #7f321d;
  --ochre: #b68b36;
  --line: #ddd5c9;
  --white: #ffffff;

  --font-body:
    Inter, "Avenir Next", Avenir, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Helvetica, Arial, sans-serif;

  --font-display: Georgia, "Times New Roman", Times, serif;

  --shell: 1180px;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
}

.shell {
  width: min(calc(100% - 40px), var(--shell));
  margin-inline: auto;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--brick);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  line-height: 1.3;
}

.eyebrow--gold {
  color: #d3a348;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1,
h2,
h3 {
  margin-top: 0;
}

h1,
.section-heading h2,
.contact-card h2 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.025em;
}

h1 {
  max-width: 680px;
  margin-bottom: 0;
  color: #fffdf7;
  font-size: clamp(3rem, 5.4vw, 5.15rem);
  line-height: 1.01;
}

.section-heading h2,
.contact-card h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 3.7vw, 3rem);
  line-height: 1.08;
}

.section {
  padding: 78px 0;
}

/* Header */

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 244, 238, 0.96);
  backdrop-filter: blur(14px);
}

.nav {
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(220px, auto) 1fr auto;
  align-items: center;
  gap: 28px;
}

.brand {
  color: var(--ink);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 760;
  letter-spacing: -0.025em;
}

.nav__links {
  display: flex;
  justify-content: center;
  gap: 28px;
}

.nav__links a {
  color: #3e3f39;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 550;
}

.nav__links a:hover {
  color: var(--brick);
}

.nav__cta {
  min-height: 40px;
  padding: 9px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--white);
  background: var(--brick);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
}

/* Hero */

.hero {
  min-height: 590px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(440px, 1fr);
  background: var(--dark);
}

.hero__copy {
  min-width: 0;
  display: flex;
  align-items: center;
  background:
    radial-gradient(circle at 80% 50%, rgba(92, 93, 69, 0.15), transparent 40%),
    var(--dark);
}

.hero__copy-inner {
  width: min(100% - 70px, 660px);
  margin-left: max(36px, calc((100vw - var(--shell)) / 2));
  padding-block: 66px;
}

.hero__lead {
  max-width: 610px;
  margin: 28px 0 0;
  color: #d8d7cf;
  font-size: 1.04rem;
  line-height: 1.72;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero__social {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 24px;
}

.hero__social a {
  color: #c9c7bd;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
}

.hero__media {
  min-width: 0;
  min-height: 590px;
  overflow: hidden;
  position: relative;
  background: #3a1c14;
}

.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      rgba(16, 17, 14, 0.88) 0%,
      rgba(16, 17, 14, 0.16) 24%,
      transparent 48%
    ),
    linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.18));
}

.hero__media img {
  width: 100%;
  height: 100%;
  min-height: 590px;
  object-fit: cover;
  object-position: 47% 38%;
}

/* Buttons */

.button {
  min-height: 48px;
  padding: 11px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 1px solid transparent;
  border-radius: 4px;
  text-align: center;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
}

.button--brick {
  color: var(--white);
  background: var(--brick);
}

.button--brick:hover {
  background: var(--brick-dark);
}

.button--outline-light {
  border-color: #8c7034;
  color: #f4f0e8;
  background: transparent;
}

.button--outline-light:hover {
  background: rgba(255, 255, 255, 0.05);
}

.button--outline {
  border-color: var(--line);
  color: var(--ink);
  background: var(--paper-strong);
}

.button--wide {
  width: 100%;
}

/* Credential strip */

.credentials {
  border-bottom: 1px solid var(--line);
  background: var(--paper-strong);
}

.credentials__grid {
  min-height: 104px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.credentials article {
  min-width: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 22px 28px;
}

.credentials article:not(:last-child) {
  border-right: 1px solid var(--line);
}

.credential__mark {
  min-width: 48px;
  color: var(--ochre);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
}

.credentials h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.credentials p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

/* Section heading */

.section-heading {
  max-width: 760px;
  margin-bottom: 30px;
}

.section-heading > p:not(.eyebrow) {
  max-width: 620px;
  margin: 12px 0 0;
  color: var(--muted);
}

.section-heading--compact {
  margin-bottom: 22px;
}

/* Areas */

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.service-card {
  min-width: 0;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
}

.service-card__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  border-radius: 50%;
  color: #fff;
  background: var(--olive);
  font-size: 0.78rem;
  font-weight: 800;
}

.service-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
}

.service-card p {
  min-height: 92px;
  margin: 9px 0 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.service-card > span:last-child {
  display: block;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: var(--olive);
  font-size: 0.78rem;
  font-weight: 650;
}

/* Interests */

.interest-section {
  padding: 0 0 74px;
}

.interest-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--paper-strong);
}

.interest-list span {
  min-width: 0;
  padding: 18px 14px;
  color: #35362f;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
}

.interest-list span:not(:last-child) {
  border-right: 1px solid var(--line);
}

/* Publications */

.publications {
  border-top: 1px solid var(--line);
  background: #fbf9f5;
}

.publication-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.publication-card {
  min-width: 0;
  min-height: 300px;
  display: grid;
  grid-template-columns: 74px 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper-strong);
}

.publication-card__accent {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 24px;
  color: #fff;
}

.publication-card__accent span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.publication-card__accent--brick {
  background: var(--brick);
}

.publication-card__accent--olive {
  background: var(--olive);
}

.publication-card__accent--ochre {
  background: var(--ochre);
}

.publication-card__content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 24px 22px;
}

.publication-card__topic {
  margin: 0 0 10px;
  color: var(--brick);
  font-size: 0.73rem;
  font-weight: 700;
}

.publication-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.2;
}

.publication-card__content > p:not(.publication-card__topic) {
  flex: 1;
  margin: 13px 0 22px;
  color: var(--muted);
  font-size: 0.86rem;
}

.publication-card a {
  width: fit-content;
  color: var(--brick);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
}

.publications__more {
  margin-top: 22px;
}

.publications__more a {
  color: var(--olive);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
}

/* Contact */

.contact-section {
  padding: 54px 0 0;
}

.contact-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(240px, 0.35fr);
  align-items: center;
  gap: 28px;
  padding: 28px 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
}

.contact-card__icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--olive);
  font-size: 1.25rem;
}

.contact-card__copy h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.contact-card__copy p:not(.eyebrow) {
  max-width: 660px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.contact-card__actions {
  display: grid;
  gap: 9px;
}

.direct-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  padding: 18px 0 54px;
}

.direct-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.78rem;
}

/* Footer */

.site-footer {
  padding: 28px 0;
  color: #f3efe7;
  background: var(--olive-dark);
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-footer p {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  margin: 0;
  font-size: 0.8rem;
}

.site-footer p span {
  color: #c8c7bc;
}

.site-footer__inner > div {
  display: flex;
  gap: 16px;
}

.site-footer a {
  color: #e1ddd2;
  text-decoration: none;
  font-size: 0.78rem;
}

/* Accessibility */

a:focus-visible {
  outline: 3px solid rgba(182, 139, 54, 0.68);
  outline-offset: 3px;
}

/* Responsive */

@media (max-width: 980px) {
  .nav {
    grid-template-columns: auto 1fr;
  }

  .nav__links {
    display: none;
  }

  .nav__cta {
    justify-self: end;
  }

  .hero {
    grid-template-columns: 1fr 0.78fr;
  }

  .hero__copy-inner {
    width: min(100% - 44px, 610px);
    margin-left: 24px;
  }

  .credentials__grid,
  .service-grid {
    grid-template-columns: 1fr;
  }

  .credentials article:not(:last-child) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .interest-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .interest-list span:nth-child(3n) {
    border-right: 0;
  }

  .interest-list span:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }

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

  .contact-card {
    grid-template-columns: auto 1fr;
  }

  .contact-card__actions {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  .shell {
    width: min(calc(100% - 28px), var(--shell));
  }

  .section {
    padding: 58px 0;
  }

  .nav {
    min-height: 64px;
    gap: 12px;
  }

  .brand {
    max-width: 210px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 0.88rem;
  }

  .nav__cta {
    min-height: 38px;
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  .hero {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .hero__copy {
    order: 1;
  }

  .hero__media {
    order: 2;
    min-height: 0;
    height: auto;
  }

  .hero__copy-inner {
    width: min(calc(100% - 28px), 620px);
    margin-inline: auto;
    padding: 52px 0;
  }

  h1 {
    font-size: clamp(2.55rem, 12vw, 4rem);
    line-height: 1.02;
  }

  .hero__lead {
    margin-top: 20px;
    font-size: 0.98rem;
  }

  .hero__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero__actions .button {
    width: 100%;
  }

  .hero__media::after {
    background: linear-gradient(
      180deg,
      rgba(16, 17, 14, 0.25),
      transparent 28%
    );
  }

  .hero__media img {
    min-height: 0;
    aspect-ratio: 4 / 3;
    object-position: center 34%;
  }

  .credentials__grid {
    width: 100%;
  }

  .credentials article {
    padding-inline: 20px;
  }

  .interest-list {
    grid-template-columns: 1fr 1fr;
  }

  .interest-list span,
  .interest-list span:nth-child(3n),
  .interest-list span:nth-child(-n + 3) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .interest-list span:nth-child(odd) {
    border-right: 1px solid var(--line);
  }

  .interest-list span:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .contact-card {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .contact-card__actions {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .contact-card__icon {
    width: 50px;
    height: 50px;
  }

  .site-footer__inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .publication-card {
    grid-template-columns: 58px 1fr;
  }

  .publication-card__content {
    padding: 20px 18px;
  }

  .interest-list {
    grid-template-columns: 1fr;
  }

  .interest-list span,
  .interest-list span:nth-child(odd) {
    border-right: 0;
  }

  .interest-list span:not(:last-child) {
    border-bottom: 1px solid var(--line);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
