
:root {
  --font: "Aptos", "Aptos Display", "Segoe UI", Arial, sans-serif;
  --dark-bg: #061a20;
  --dark-text: #c69a6b;
  --dark-text-soft: #dc9a63;
  --dark-muted: rgba(198, 154, 107, .74);
  --light-text: #233e27;
  --light-soft: #2e4b33;
  --light-line: #b86b45;
  --panel-max: 620px;
}

* { box-sizing: border-box; }

html, body {
  min-height: 100%;
  margin: 0;
}

body {
  font-family: var(--font);
  overflow-x: hidden;
  background: var(--dark-bg);
}

body[data-mode="dark"] {
  --text: var(--dark-text);
  --soft: var(--dark-text-soft);
  --muted: var(--dark-muted);
  --line: #c98958;
  --logo: url("../img/logo-copper.png");
  --bg: url("../img/bg-dark.jpg");
  --left-overlay: linear-gradient(90deg, rgba(3,15,19,.98) 0%, rgba(3,15,19,.94) 33%, rgba(3,15,19,.64) 52%, rgba(3,15,19,.16) 68%, rgba(3,15,19,0) 100%);
  --top-overlay: radial-gradient(circle at 72% 58%, rgba(186,94,45,.14) 0%, rgba(186,94,45,.06) 24%, transparent 48%);
}

body[data-mode="light"] {
  --text: var(--light-text);
  --soft: var(--light-soft);
  --muted: rgba(35,62,39,.80);
  --line: var(--light-line);
  --logo: url("../img/logo-green.png");
  --bg: url("../img/bg-light.jpg");
  --left-overlay: linear-gradient(90deg, rgba(248,243,234,.98) 0%, rgba(248,243,234,.93) 31%, rgba(248,243,234,.62) 51%, rgba(248,243,234,.18) 68%, rgba(248,243,234,0) 100%);
  --top-overlay: radial-gradient(circle at 74% 56%, rgba(235,171,107,.18) 0%, rgba(235,171,107,.07) 28%, transparent 52%);
}

.page {
  position: relative;
  min-height: max(100dvh, 860px);
  padding: clamp(42px, 5.1vw, 78px) clamp(42px, 7.6vw, 142px) clamp(38px, 5vw, 74px);
  color: var(--text);
  isolation: isolate;
}

.page::before,
.page::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  min-height: 100%;
}

.page::before {
  background-image: var(--bg);
  background-size: cover;
  background-position: right bottom;
  background-repeat: no-repeat;
}

.page::after {
  z-index: -1;
  background: var(--left-overlay), var(--top-overlay);
  pointer-events: none;
}

.top {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
}

.logo {
  width: clamp(305px, 31vw, 510px);
  height: auto;
  aspect-ratio: 1956 / 344;
  background-image: var(--logo);
  background-repeat: no-repeat;
  background-size: contain;
  background-position: left center;
}

.controls {
  display: grid;
  justify-items: end;
  gap: 14px;
  color: var(--text);
  font-size: clamp(16px, 1.05vw, 22px);
  letter-spacing: .035em;
  line-height: 1;
  user-select: none;
}

.controls .row {
  display: flex;
  gap: 28px;
  align-items: center;
}

.controls .separator {
  width: 142px;
  height: 1px;
  background: currentColor;
  opacity: .8;
}

.controls a,
.controls button {
  color: inherit;
  background: transparent;
  border: 0;
  padding: 0 0 9px;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  opacity: .74;
  position: relative;
}

.controls .active {
  opacity: 1;
  font-weight: 600;
}

.controls .active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: currentColor;
}

.content-wrap {
  width: min(100%, var(--panel-max));
  margin-top: clamp(68px, 8.5vw, 118px);
}

.rule {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 26px;
  color: var(--line);
  margin: 0;
}

.rule::before,
.rule::after {
  content: "";
  height: 1px;
  background: currentColor;
}

.rule span {
  font-size: 18px;
  line-height: 1;
  transform: translateY(-1px);
}

.message {
  padding: clamp(54px, 5.5vw, 80px) 0 clamp(48px, 5vw, 76px);
}

.message-inner {
  text-align: left;
  max-width: 520px;
}

h1 {
  font-weight: 400;
  letter-spacing: -.035em;
  font-size: clamp(46px, 4.15vw, 76px);
  line-height: 1.14;
  margin: 0 0 22px;
  color: var(--text);
}

.lead {
  color: var(--soft);
  font-size: clamp(18px, 1.35vw, 25px);
  line-height: 1.42;
  max-width: 520px;
  margin: 0;
  font-weight: 400;
}

.contact {
  width: 100%;
  text-align: center;
  margin-top: clamp(34px, 4vw, 56px);
  color: var(--soft);
}

.mail {
  display: inline-block;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  font-size: clamp(18px, 1.3vw, 24px);
  line-height: 1;
  margin-bottom: 10px;
}

.mail:hover,
.linkedin-link:hover {
  opacity: .82;
}

.socials {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  color: inherit;
}

.social-group {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 28px;
}

.social-divider {
  width: 1px;
  height: 32px;
  background: var(--line);
  opacity: .8;
}

.linkedin-link {
  color: inherit;
  text-decoration: none;
  font-size: clamp(17px, 1.25vw, 23px);
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.linkedin-icon {
  width: 26px;
  height: 26px;
  border: 1.4px solid currentColor;
  border-radius: 4px;
  display: inline-grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1;
  box-shadow: none;
  text-shadow: none;
  flex: 0 0 auto;
}

@media (min-width: 1100px) {
  .content-wrap {
    margin-left: 2px;
  }

  .message-inner {
    margin-left: 0;
  }

  .contact {
    padding-left: 0;
  }
}

@media (max-width: 980px) {
  .page {
    padding: 30px 26px 36px;
  }

  .page::before {
    background-position: 66% bottom;
  }

  body[data-mode="dark"] .page::after {
    background:
      linear-gradient(180deg, rgba(3,15,19,.96) 0%, rgba(3,15,19,.80) 44%, rgba(3,15,19,.58) 100%),
      var(--top-overlay);
  }

  body[data-mode="light"] .page::after {
    background:
      linear-gradient(180deg, rgba(248,243,234,.95) 0%, rgba(248,243,234,.76) 46%, rgba(248,243,234,.48) 100%),
      var(--top-overlay);
  }

  .top {
    align-items: flex-start;
  }

  .logo {
    width: min(62vw, 360px);
  }

  .controls {
    font-size: 15px;
    gap: 10px;
  }

  .controls .row {
    gap: 16px;
  }

  .controls .separator {
    width: 92px;
  }

  .content-wrap {
    margin-top: 70px;
    width: 100%;
    max-width: 540px;
  }

  .message {
    padding: 44px 0 42px;
  }

  h1 {
    font-size: clamp(42px, 9vw, 58px);
  }

  .lead {
    font-size: 18px;
  }

  .contact {
    text-align: left;
    margin-top: 34px;
  }

  .socials {
    justify-content: flex-start;
    gap: 18px;
  }

  .social-divider {
    display: none;
  }
}

@media (max-width: 560px) {
  .page {
    padding: 24px 20px 34px;
  }

  .top {
    display: grid;
    gap: 22px;
  }

  .controls {
    justify-self: start;
    justify-items: start;
    grid-template-columns: auto;
  }

  .logo {
    width: min(78vw, 315px);
  }

  .content-wrap {
    margin-top: 44px;
  }

  .rule {
    column-gap: 16px;
  }

  .message {
    padding: 34px 0 34px;
  }

  h1 {
    font-size: clamp(37px, 11vw, 48px);
  }

  .lead {
    font-size: 16px;
  }

  .mail {
    font-size: 18px;
  }

  .socials {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .linkedin-icon {
    width: 21px;
    height: 21px;
    font-size: 11px;
    border-width: 1.1px;
    border-radius: 3px;
  }

  .linkedin-link {
    font-size: 15px;
  }
}


/* FIX v2: keep page scrollable on short screens and avoid cropping the heron. */
@media (max-height: 760px) and (min-width: 981px) {
  .page {
    min-height: 900px;
  }
}

/* FIX v2: extra-small mobile social icon refinement. */
@media (max-width: 380px) {
  .social-group {
    gap: 8px;
  }

  .linkedin-link {
    font-size: 14px;
  }
}
