/* Moana Renton — sunlit skyline, navy, gold, cream */
:root {
  --void: #e9f0f7;
  --card: #fffaf2;
  --ink: #0B2A5B;
  --muted: #5a6578;
  --navy: #0B2A5B;
  --navy-deep: #081c3d;
  --gold: #C9A24B;
  --gold-deep: #8F6E28;
  --gold-light: #E0C575;
  --cream: #F7F1E6;
  --cream-deep: #EFE6D4;
  --blue: #C9A24B;
  --blue-core: #0B2A5B;
  --blue-deep: #081c3d;
  --blue-rgb: 11, 42, 91;
  --blue-bright-rgb: 201, 162, 75;
  --save-top: #163a73;
  --save-press: #06142c;
  --ambience-top: rgba(255, 248, 230, 0.35);
  --ambience-bot: rgba(11, 42, 91, 0.18);
  --line: rgba(11, 42, 91, 0.12);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  background: #d8e4f0;
  color: var(--ink);
  font-family: Outfit, "Segoe UI", sans-serif;
  font-weight: 400;
  line-height: 1.5;
}

.ambiance {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(247, 241, 230, 0.28) 0%, rgba(247, 241, 230, 0.08) 38%, rgba(11, 42, 91, 0.18) 100%),
    #cfe0f0 url("../images/atmosphere.jpg") center 30% / cover no-repeat;
  filter: saturate(1.08);
}

.ambiance::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 140px 140px;
  mix-blend-mode: overlay;
}

.card {
  position: relative;
  z-index: 1;
  width: min(420px, calc(100% - 24px));
  margin: 16px auto 28px;
  padding: 0 0 8px;
  overflow: hidden;
  background: linear-gradient(180deg, #fffdf8 0%, #fffaf2 42%, #f3ead8 100%);
  border: 1px solid rgba(201, 162, 75, 0.45);
  border-radius: 22px;
  box-shadow:
    0 24px 60px rgba(11, 42, 91, 0.22),
    0 0 0 1px rgba(11, 42, 91, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.identity,
.actions,
.qr-block,
.card-foot {
  padding-left: 24px;
  padding-right: 24px;
}

.hero {
  position: relative;
  line-height: 0;
  overflow: hidden;
  background: #0B2A5B;
}

.cover {
  width: 100%;
  height: 228px;
  object-fit: cover;
  object-position: center 58%;
  display: block;
  transform-origin: center center;
  animation: kenburns 1.8s var(--ease) both;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(11, 42, 91, 0.04) 30%, rgba(247, 241, 230, 0.2) 72%, #fffaf2 100%),
    linear-gradient(to right, rgba(201, 162, 75, 0.12), transparent 45%);
  pointer-events: none;
}

.identity { padding-top: 0; text-align: center; }

.portrait-wrap {
  width: 116px;
  height: 116px;
  margin: -58px auto 20px;
  position: relative;
  filter: drop-shadow(0 8px 18px rgba(11, 42, 91, 0.28));
}

.ring {
  position: absolute;
  inset: -6px;
  width: calc(100% + 12px);
  height: calc(100% + 12px);
  transform: rotate(-90deg);
  overflow: visible;
}

.ring circle {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-dasharray: 377;
  stroke-dashoffset: 377;
  animation: ringDraw 1s var(--ease) 0.3s forwards;
}

.portrait {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  background: var(--cream);
  border: 3px solid #fffaf2;
  box-shadow: 0 0 0 1px rgba(201, 162, 75, 0.7);
  display: block;
  animation: portraitIn 0.7s var(--ease) 0.15s backwards;
}

h1 {
  margin: 0;
  padding: 0.08em 0 0.2em;
  overflow: visible;
  font-family: "Plus Jakarta Sans", Outfit, "Segoe UI", sans-serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: var(--navy);
}

.title {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  color: #3a4d6b;
}

.company {
  margin: 6px 0 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
}

.tagline {
  margin: 10px auto 0;
  max-width: 22em;
  font-size: 13px;
  font-weight: 500;
  font-style: italic;
  line-height: 1.4;
  color: var(--gold-deep);
}

.tagline::before,
.tagline::after {
  content: "";
  display: block;
  width: 48px;
  height: 1px;
  margin: 8px auto;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.tagline::before { margin-top: 12px; }
.tagline::after { margin-bottom: 0; }

.bio {
  margin: 16px auto 0;
  max-width: 34em;
  font-size: 15px;
  line-height: 1.6;
  text-align: left;
  color: #3e4a5c;
}

.status {
  display: inline-block;
  margin: 18px 0 0;
  padding: 6px 14px;
  color: var(--navy);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid rgba(201, 162, 75, 0.7);
  border-radius: 999px;
  background: linear-gradient(180deg, #fff8e8 0%, #f3e6c8 100%);
}

.skills-label {
  margin: 16px 0 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.skills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.skills span {
  padding: 6px 12px;
  border: 1px solid rgba(201, 162, 75, 0.55);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--navy);
}

.actions { padding-top: 24px; }

.contacts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  border-top: none;
}

.contacts li + li { border-top: none; }

.contact-link {
  position: relative;
  overflow: hidden;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 8px;
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
}

.contact-link > svg:first-child {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  padding: 7px;
  border-radius: 10px;
  background: var(--navy);
  color: var(--gold-light);
  box-shadow: inset 0 0 0 1px rgba(201, 162, 75, 0.45);
}

.contact-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  column-gap: 12px;
  row-gap: 2px;
}

.contact-label {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--navy);
}

.contact-value {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  text-align: right;
  overflow-wrap: anywhere;
}

.contact-link.contact-stack {
  align-items: flex-start;
}

.contact-link.contact-stack > svg:first-child {
  margin-top: 2px;
}

.contact-link.contact-stack .contact-copy {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 2px 0;
}

.contact-link.contact-stack .contact-value {
  text-align: left;
}

.contact-link .contact-go {
  flex-shrink: 0;
  color: #8a7a58;
}

.contact-link:active { background: rgba(201, 162, 75, 0.16); }

.contact-link:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.btn {
  position: relative;
  overflow: hidden;
  min-height: 54px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font: 600 15px/1.2 Outfit, "Segoe UI", sans-serif;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
  cursor: pointer;
  padding: 0 16px;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn-save {
  width: 100%;
  margin-top: 16px;
  background: linear-gradient(180deg, var(--save-top) 0%, var(--navy) 100%);
  color: #fff;
  border-color: rgba(201, 162, 75, 0.65);
  box-shadow:
    0 10px 28px rgba(11, 42, 91, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 0 0 1px rgba(201, 162, 75, 0.25);
}

.ripple {
  position: absolute;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: rgba(201, 162, 75, 0.28);
  transform: scale(1);
  animation: ripple 500ms ease-out forwards;
  pointer-events: none;
}

.btn-save .ripple { background: rgba(255, 255, 255, 0.4); }

@media (hover: hover) {
  .contact-link:hover {
    background: #fff;
    border-color: rgba(201, 162, 75, 0.7);
    box-shadow: 0 8px 22px rgba(11, 42, 91, 0.1);
  }

  .contact-link:hover .contact-label { color: var(--navy-deep); }
  .contact-link:hover > svg:first-child { color: #fff; background: var(--navy-deep); }

  .btn-save:hover {
    filter: brightness(1.08);
    box-shadow:
      0 14px 32px rgba(11, 42, 91, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.28),
      inset 0 0 0 1px rgba(201, 162, 75, 0.4);
  }
}

.btn:active { transform: scale(0.98); }

.btn.is-opening {
  background: linear-gradient(180deg, var(--navy) 0%, var(--save-press) 100%);
}

.qr-block {
  position: relative;
  overflow: hidden;
  margin-top: 24px;
  padding: 24px 20px 20px;
  text-align: center;
  border: 1px solid rgba(201, 162, 75, 0.45);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.55);
}

.qr-frame {
  display: inline-block;
  padding: 18px;
  line-height: 0;
  background: #F7F1E6;
  border-radius: 16px;
  box-shadow: 0 0 0 1px rgba(201, 162, 75, 0.28);
}

.qr-block canvas {
  display: block;
  width: 168px;
  height: 168px;
  background: #F7F1E6;
}

.qr-block p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.qr-block.is-visible::after {
  content: "";
  position: absolute;
  left: 22%;
  right: 22%;
  height: 1px;
  background: var(--gold);
  top: 16%;
  animation: scan 0.9s ease 0.1s 1 forwards;
  pointer-events: none;
}

.card-foot { padding-top: 20px; padding-bottom: 24px; text-align: center; }

.card-foot p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.rise { animation: fadeUp 0.7s var(--ease) backwards; }
.d1 { animation-delay: 0.02s; }
.d2 { animation-delay: 0.08s; }
.d3 { animation-delay: 0.14s; }
.d4 { animation-delay: 0.2s; }
.d5 { animation-delay: 0.26s; }
.d6 { animation-delay: 0.32s; }
.d7 { animation-delay: 0.38s; }
.d8 { animation-delay: 0.44s; }

@media (min-width: 520px) {
  body { padding: 36px 16px 48px; }
}

@media (max-width: 360px) {
  h1 { font-size: 26px; }
  .cover { height: 200px; }
  .card { width: min(420px, calc(100% - 16px)); margin: 12px auto 20px; }
}

@media (prefers-reduced-motion: no-preference) {
  html.js .qr-block:not(.is-visible) {
    opacity: 0;
    transform: translateY(12px);
  }

  html.js .qr-block.is-visible {
    animation: fadeUp 0.7s var(--ease) forwards;
  }
}

@keyframes kenburns {
  from { transform: scale(1.08); }
  to { transform: scale(1); }
}

@keyframes portraitIn {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: none; }
}

@keyframes ringDraw {
  to { stroke-dashoffset: 0; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@keyframes ripple {
  to { transform: scale(18); opacity: 0; }
}

@keyframes scan {
  from { top: 18%; opacity: 1; }
  to { top: 78%; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .rise,
  .portrait,
  .cover,
  html.js .qr-block {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }

  .ring circle { stroke-dashoffset: 0 !important; }
  .qr-block.is-visible::after { display: none !important; }
}
