/*
 * Editorial Light — custom theme for Gianmarco's links
 * Magazine-inspired: serif display, warm paper, hairline rules, one accent.
 */

:root {
  --paper:        #faf8f3;
  --paper-2:      #f3efe6; /* subtle row hover wash */
  --ink:          #17140f;
  --muted:        #7a7268;
  --muted-2:      #9a9388;
  --hairline:     #e6e1d7;
  --hairline-2:   #d8d2c5;
  --accent:       #9c2f26; /* oxblood */
  --accent-soft:  rgba(156, 47, 38, 0.10);

  --maxw: 580px;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
}

html {
  background: var(--paper);
}

/* Paper texture: faint warm vignette + the barest grain feel via layered gradients */
body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(120% 80% at 50% -10%, #ffffff 0%, rgba(255,255,255,0) 55%),
    radial-gradient(140% 120% at 100% 100%, #f1ece1 0%, rgba(241,236,225,0) 45%),
    var(--paper);
  background-attachment: fixed;
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

/* Override the reset's blue focus ring with our accent */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

::selection {
  background: var(--accent);
  color: var(--paper);
}

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

.container {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: clamp(2.5rem, 7vw, 5rem) 1.5rem 3rem;
}

.column {
  width: 100%;
  max-width: var(--maxw);
}

/* ---------- Header ---------- */

.masthead {
  text-align: left;
}

.kicker {
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.6rem;
}

.kicker::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--hairline-2);
}

.avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--hairline-2), 0 8px 24px -12px rgba(23, 20, 15, 0.45);
  margin-bottom: 1.4rem;
}

h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.6rem, 9vw, 3.7rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 0, "WONK" 0;
  margin-bottom: 1rem;
}

h1 .given { display: block; color: var(--ink); }
h1 .family { display: block; color: var(--muted); font-style: italic; font-weight: 400; }

.role {
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 2.6s ease-out infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(156,47,38,0.45); }
  70%  { box-shadow: 0 0 0 7px rgba(156,47,38,0); }
  100% { box-shadow: 0 0 0 0 rgba(156,47,38,0); }
}

.bio {
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 42ch;
}

.rule {
  height: 1px;
  background: var(--hairline);
  border: 0;
  margin: 2.4rem 0 0.5rem;
}

/* ---------- Link sections ---------- */

.section-label {
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 700;
  margin: 2rem 0 0.25rem;
}

.link-list {
  border-top: 1px solid var(--hairline);
}

.link-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--hairline);
}

.link-row .link {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.05rem 0.4rem 1.05rem 0.2rem;
  text-decoration: none;
  color: var(--ink);
  transition: padding-left 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

/* accent slab that grows from the left on hover */
.link-row::before {
  content: "";
  position: absolute;
  left: -1.5rem;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.link-row:hover::before,
.link-row:focus-within::before { transform: scaleY(1); }

.link-row:hover,
.link-row:focus-within { background: linear-gradient(90deg, var(--accent-soft), transparent 80%); }

.link-row:hover .link,
.link-row:focus-within .link { padding-left: 0.9rem; }

.icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  /* force any colored brand SVG to monochrome ink */
  filter: brightness(0);
  opacity: 0.7;
  transition: opacity 0.25s ease;
}

.link-row:hover .icon,
.link-row:focus-within .icon { opacity: 1; }

.label {
  font-size: 1.06rem;
  font-weight: 500;
  letter-spacing: -0.005em;
}

.label .handle {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0.01em;
  margin-top: 1px;
}

.arrow {
  margin-left: auto;
  font-family: var(--font-body);
  color: var(--muted-2);
  font-size: 1.1rem;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), color 0.25s ease;
}

.link-row:hover .arrow,
.link-row:focus-within .arrow {
  color: var(--accent);
  transform: translateX(5px);
}

/* ---------- Copy button ---------- */

.copy-btn {
  flex: 0 0 auto;
  margin-right: 0.2rem;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hairline-2);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, transform 0.1s ease;
}

.copy-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.copy-btn:active { transform: scale(0.92); }
.copy-btn.copied { border-color: var(--accent); color: var(--accent); }

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

footer {
  margin-top: 3rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--hairline);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted-2);
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

footer a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--hairline-2);
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

footer a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Load animation (staggered reveal) ---------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

/* stagger via inline --i custom property set in markup */
.reveal { animation-delay: calc(var(--i, 0) * 70ms); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; animation: none; }
  .status-dot { animation: none; }
}
