/* ===========================================================================
   Business card — styled after blog.seclerp.me (Hugo "terminal" theme)
   Palette and font mirror ~/Pets/blog/static/style.css.
   =========================================================================== */

/* Light theme variables */
:root.theme-light {
  --background: #edebe6;
  --foreground: #1a170f;
  --accent: #c55f00;
  --muted: #6d6a62;
  --surface: #e3e0d8;
  --border: #d2cec3;
}

/* Dark theme variables */
:root.theme-dark {
  --background: #1a170f;
  --foreground: #dbd8d2;
  --accent: #ff7b00;
  --muted: #8c887e;
  --surface: #241f15;
  --border: #342e20;
}

/* Sensible default before the toggle script runs (dark, like the blog) */
:root {
  --background: #1a170f;
  --foreground: #dbd8d2;
  --accent: #ff7b00;
  --muted: #8c887e;
  --surface: #241f15;
  --border: #342e20;
  --font: "Fira Code", Monaco, Consolas, "Ubuntu Mono", monospace;
}

* {
  box-sizing: border-box;
}

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

body {
  /* Center the card both axes, exactly like the Linktree layout */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s ease, color 0.2s ease;
}

/* --- Card column ---------------------------------------------------------- */

.card {
  width: 100%;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.card__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 32px;
}

.avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  margin-bottom: 20px;
}

.name {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  color: var(--foreground);
}

/* Blinking terminal caret, mirroring the blog logo */
.caret {
  display: inline-block;
  width: 0.55em;
  height: 1.1em;
  background: var(--accent);
  margin-left: 0.4em;
  animation: blink 1000ms step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* --- Links ---------------------------------------------------------------- */

.links {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--foreground);
  text-decoration: none;
  font-weight: 500;
  transition: border-color 0.15s ease, transform 0.15s ease,
              background 0.15s ease, color 0.15s ease;
}

.link:hover,
.link:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  outline: none;
}

.link__icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  /* SVG lives in /icons; masking lets it inherit currentColor (hover/theme) */
  background-color: currentColor;
  -webkit-mask: var(--icon) no-repeat center / contain;
  mask: var(--icon) no-repeat center / contain;
}

.link__label {
  flex: 1 1 auto;
  text-align: left;
}

.link__host {
  flex: 0 0 auto;
  font-size: 0.8rem;
  color: var(--muted);
  transition: color 0.15s ease;
}

.link:hover .link__host,
.link:focus-visible .link__host {
  color: var(--accent);
}

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

.card__foot {
  margin-top: 36px;
  font-size: 0.8rem;
  color: var(--muted);
}

/* --- Theme toggle (top-right, mirrors the blog button) -------------------- */

.theme-toggle {
  position: fixed;
  top: 18px;
  right: 18px;
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
  padding: 3px 10px;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  border-radius: 6px;
}

.theme-toggle:hover {
  background: var(--accent);
  color: var(--background);
}

/* --- Small screens -------------------------------------------------------- */

@media (max-width: 420px) {
  .link__host {
    display: none;
  }
  .name {
    font-size: 1.4rem;
  }
}
