/* ==========================================================================
   Mariana Roa — portfolio
   Sage adaptation of the DESIGN-stripe.md system; greens sampled from
   adaline.ai. Hero backdrop is Monet's "Antibes, Afternoon Effect" (MFA).
   ========================================================================== */

/* ---- Tokens -------------------------------------------------------------- */

:root {
  --primary: #4a6d47;
  --primary-deep: #3a4a37;
  --primary-press: #2a332a;
  --primary-soft: #6d8f69;
  --primary-subdued: #d8e3dd;

  --canvas: #fdfefb;
  --canvas-soft: #fafbf7;
  --canvas-sage: #f1f5ef;
  --hairline: #e1e6df;
  --hairline-strong: #ccd9d3;

  --ink: #2a332a;
  --ink-secondary: #3a4a37;
  --ink-mute: #62705f;
  --on-primary: #ffffff;

  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-pill: 9999px;

  --s-xs: 4px;
  --s-sm: 8px;
  --s-md: 12px;
  --s-lg: 16px;
  --s-xl: 24px;
  --s-xxl: 32px;
  --s-huge: 64px;

  --lift-1: 0 1px 3px rgba(42, 51, 42, 0.08);
  --lift-2: 0 8px 24px rgba(42, 51, 42, 0.12), 0 2px 6px rgba(42, 51, 42, 0.06);

  --container: 1120px;
  --nav-h: 82px;
}

/* ---- Reset --------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, "SF Pro Display", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.4;
  font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

figure,
blockquote {
  margin: 0;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 300;
}

/* ---- Type ---------------------------------------------------------------- */

.display-lg {
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.64px;
}

.heading-lg {
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: -0.22px;
}

.caption {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.39px;
  font-feature-settings: "tnum";
}

.tnum {
  font-feature-settings: "tnum";
  letter-spacing: -0.42px;
}

/* ---- Layout -------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--s-xl);
}

.section {
  padding: 96px 0;
}

.hero + .section {
  padding-top: 72px;
}

.section-title {
  margin-bottom: 40px;
}

/* ---- Buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: var(--s-sm) var(--s-lg);
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn--primary {
  background: var(--primary);
  color: var(--on-primary);
}

.btn--primary:hover {
  background: var(--primary-deep);
}

.btn--primary:active {
  background: var(--primary-press);
}

.btn--secondary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn--secondary:hover {
  background: var(--canvas-sage);
}

.btn--sm {
  font-size: 14px;
  min-height: 36px;
}

.btn:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

/* ---- Nav ----------------------------------------------------------------- */

/* Transparent over the painting; picks up a soft fill once it scrolls off,
   so it never draws a hard edge against the artwork. */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: transparent;
  transition: background-color 0.25s ease, backdrop-filter 0.25s ease;
}

.nav--stuck {
  background: rgba(253, 254, 251, 0.82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
}

.nav__inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-xl);
  padding-block: var(--s-xl);
}

.nav__mark {
  font-size: 24px;
  letter-spacing: -0.3px;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}

.nav__links {
  display: flex;
  gap: var(--s-xl);
}

.nav__links a {
  font-size: 15px;
  text-decoration: none;
  color: var(--ink-secondary);
  transition: color 0.15s ease;
}

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

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

.hero {
  position: relative;
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: calc(var(--nav-h) * -1) 0 0 0;
  z-index: -1;
  background-image: url("assets/monet-antibes.jpg");
  background-size: cover;
  background-position: center 42%;
}

/* Warm-white scrim: heavy on the left so the copy reads, clearing to the
   right so the painting stays visible behind the portrait. */
.hero__bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(253, 254, 251, 0.9) 0%,
    rgba(253, 254, 251, 0.66) 26%,
    rgba(253, 254, 251, 0.14) 52%,
    rgba(253, 254, 251, 0) 78%
  );
}

/* Dissolve the painting into the page below it. */
.hero__bg::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 14%;
  background: linear-gradient(to bottom, rgba(253, 254, 251, 0), var(--canvas));
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s-huge);
  align-items: center;
  min-height: 520px;
  padding-block: 56px 104px;
}

/* Soft halo so the copy clears the painting's busy mid-ground. */
.hero__copy {
  position: relative;
}

.hero__copy::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -56px -96px -56px -140px;
  background: radial-gradient(
    ellipse at 42% 50%,
    rgba(253, 254, 251, 0.95) 0%,
    rgba(253, 254, 251, 0.8) 42%,
    rgba(253, 254, 251, 0) 74%
  );
}

.hero__title {
  font-size: 60px;
  line-height: 1.04;
  letter-spacing: -1.5px;
}

.hero__text {
  margin: var(--s-xl) 0 var(--s-xxl);
  max-width: 46ch;
  font-size: 19px;
  line-height: 1.55;
  letter-spacing: -0.2px;
  color: var(--ink-secondary);
}

.hero__portrait {
  justify-self: end;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 6px solid var(--canvas);
  box-shadow: 0 18px 48px rgba(42, 51, 42, 0.26),
    0 2px 8px rgba(42, 51, 42, 0.12);
}

.hero__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- Experience ---------------------------------------------------------- */

.timeline {
  display: grid;
  gap: var(--s-lg);
}

.role {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--s-xxl);
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: var(--s-xxl);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.role:hover {
  border-color: var(--hairline-strong);
  box-shadow: var(--lift-1);
}

.role__when {
  color: var(--ink-mute);
  font-size: 14px;
  font-feature-settings: "tnum";
  letter-spacing: -0.42px;
}

.role__where {
  margin-top: var(--s-xs);
  color: var(--ink-mute);
  font-size: 14px;
}

/* Fixed box so wordmark lockups and the near-square N sit on one baseline. */
.role__logo {
  display: flex;
  align-items: center;
  height: 44px;
  margin-top: var(--s-lg);
}

.role__logo img {
  max-width: 190px;
  max-height: 100%;
  width: auto;
  height: auto;
}

.role__title {
  margin: 0;
}

.role__org {
  margin: var(--s-xs) 0 var(--s-lg);
  color: var(--primary-deep);
  font-size: 15px;
}

.bullets li {
  position: relative;
  padding-left: var(--s-xl);
  margin-bottom: var(--s-md);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-secondary);
}

.bullets li:last-child {
  margin-bottom: 0;
}

.bullets li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--primary-soft);
}

/* ---- Icon links ---------------------------------------------------------- */

.links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-md);
}

.icon-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s-sm);
  min-height: 40px;
  padding: var(--s-sm) var(--s-lg) var(--s-sm) var(--s-md);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-pill);
  background: rgba(253, 254, 251, 0.72);
  color: var(--ink-secondary);
  font-size: 15px;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease,
    color 0.15s ease;
}

.icon-link svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: var(--primary);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.15s ease;
}

.icon-link:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

.icon-link:hover svg {
  stroke: var(--on-primary);
}

.links--footer .icon-link {
  border-color: transparent;
  background: transparent;
  padding-inline: var(--s-sm);
  font-size: 14px;
}

.links--footer .icon-link:hover {
  background: var(--canvas-sage);
  color: var(--ink);
}

.links--footer .icon-link:hover svg {
  stroke: var(--primary);
}

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

.footer {
  padding-bottom: var(--s-huge);
  color: var(--ink-mute);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-lg);
  padding-top: var(--s-xl);
  border-top: 1px solid var(--hairline);
}

/* ---- Responsive ---------------------------------------------------------- */

@media (max-width: 1023px) {
  .section {
    padding: 72px 0;
  }

  /* Soft halo so the copy clears the painting's busy mid-ground. */
.hero__copy {
  position: relative;
}

.hero__copy::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -56px -96px -56px -140px;
  background: radial-gradient(
    ellipse at 42% 50%,
    rgba(253, 254, 251, 0.95) 0%,
    rgba(253, 254, 251, 0.8) 42%,
    rgba(253, 254, 251, 0) 74%
  );
}

.hero__title {
    font-size: 48px;
    letter-spacing: -1.1px;
  }

  .hero__inner {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-block: 48px 72px;
  }

  .hero__portrait {
    justify-self: start;
    max-width: 260px;
  }

  .hero__bg {
    inset: calc(var(--nav-h) * -1) 0 0 0;
  }

  /* The painting has no light gutter to hide behind in one column. */
  .hero__bg::before {
    background: linear-gradient(
      180deg,
      rgba(253, 254, 251, 0.9) 0%,
      rgba(253, 254, 251, 0.78) 55%,
      rgba(253, 254, 251, 0.5) 100%
    );
  }
}

@media (max-width: 767px) {
  :root {
    --nav-h: 74px;
  }

  .section {
    padding: 56px 0;
  }

  /* Soft halo so the copy clears the painting's busy mid-ground. */
.hero__copy {
  position: relative;
}

.hero__copy::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -56px -96px -56px -140px;
  background: radial-gradient(
    ellipse at 42% 50%,
    rgba(253, 254, 251, 0.95) 0%,
    rgba(253, 254, 251, 0.8) 42%,
    rgba(253, 254, 251, 0) 74%
  );
}

.hero__title {
    font-size: 36px;
    letter-spacing: -0.8px;
  }

  .hero__text {
    font-size: 17px;
  }

  .display-lg {
    font-size: 26px;
    letter-spacing: -0.4px;
  }

  .nav__mark {
    font-size: 20px;
  }

  .btn {
    min-height: 44px;
  }

  .role {
    grid-template-columns: 1fr;
    gap: var(--s-lg);
    padding: var(--s-xl);
  }

  .hero__portrait {
    max-width: 220px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
  }
}
