/* ========================================
   Juan Martinez Garcia — Arte & Gestión
   Blueprint Lines — Ultra Fine
   ======================================== */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Figtree', ui-sans-serif, -apple-system, system-ui, sans-serif;
  background: #1a1817;
  color: #f0ece4;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  position: relative;
  overflow-x: hidden;
}

/* --- Grain --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
}

/* --- Glow --- */
body::after {
  content: '';
  position: fixed;
  pointer-events: none;
  z-index: 0;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 70vmin;
  height: 70vmin;
  background: radial-gradient(circle, rgba(189, 173, 106, 0.04) 0%, transparent 65%);
  animation: glowPulse 8s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.4; transform: translateX(-50%) scale(1); }
  50%      { opacity: 1;   transform: translateX(-50%) scale(1.08); }
}

/* =============================================
   BLUEPRINT SVG — Ultra-thin structural lines
   ============================================= */
#blueprint {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.bp-line {
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 0.06;
  stroke-linecap: round;
  fill: none;
  stroke-dasharray: 1500;
  stroke-dashoffset: 1500;
}

.bp-line.solid {
  stroke: rgba(255, 255, 255, 0.04);
  stroke-width: 0.04;
}

.bp-line.faint {
  stroke: rgba(255, 255, 255, 0.025);
  stroke-width: 0.03;
}

.bp-line.mark {
  stroke: rgba(255, 255, 255, 0.07);
  stroke-width: 0.08;
}

/* --- Keyframes: appear by drawing, then disappear --- */
@keyframes drawA {
  0%   { stroke-dashoffset: 1500; opacity: 0; }
  6%   { opacity: 0.5; }
  20%  { stroke-dashoffset: 0; opacity: 0.55; }
  45%  { opacity: 0.4; }
  65%  { opacity: 0; stroke-dashoffset: -1500; }
  100% { stroke-dashoffset: -1500; opacity: 0; }
}

@keyframes drawB {
  0%   { stroke-dashoffset: 1200; opacity: 0; }
  8%   { opacity: 0.4; }
  22%  { stroke-dashoffset: 0; opacity: 0.45; }
  50%  { opacity: 0.35; }
  70%  { opacity: 0; stroke-dashoffset: -1200; }
  100% { stroke-dashoffset: -1200; opacity: 0; }
}

@keyframes drawC {
  0%   { stroke-dashoffset: 1800; opacity: 0; }
  5%   { opacity: 0.35; }
  18%  { stroke-dashoffset: 0; opacity: 0.4; }
  55%  { opacity: 0.3; }
  72%  { opacity: 0; stroke-dashoffset: -1800; }
  100% { stroke-dashoffset: -1800; opacity: 0; }
}

@keyframes drawD {
  0%   { stroke-dashoffset: 800; opacity: 0; }
  4%   { opacity: 0.6; }
  15%  { stroke-dashoffset: 0; opacity: 0.65; }
  35%  { opacity: 0.45; }
  55%  { opacity: 0; stroke-dashoffset: -800; }
  100% { stroke-dashoffset: -800; opacity: 0; }
}

/* --- HORIZONTALS --- */
.bp-line.h-1  { animation: drawA 14s ease-in-out 0s infinite; }
.bp-line.h-2  { animation: drawB 12s ease-in-out 1.3s infinite; }
.bp-line.h-3  { animation: drawC 16s ease-in-out 0.7s infinite; }
.bp-line.h-4  { animation: drawA 11s ease-in-out 3.1s infinite; }
.bp-line.h-5  { animation: drawB 13s ease-in-out 0.2s infinite; }
.bp-line.h-6  { animation: drawD 10s ease-in-out 2.5s infinite; }
.bp-line.h-7  { animation: drawA 15s ease-in-out 4.2s infinite; }
.bp-line.h-8  { animation: drawC 14s ease-in-out 0.9s infinite; }
.bp-line.h-9  { animation: drawB 11s ease-in-out 3.8s infinite; }
.bp-line.h-10 { animation: drawD 13s ease-in-out 1.8s infinite; }
.bp-line.h-11 { animation: drawA 16s ease-in-out 5.5s infinite; }
.bp-line.h-12 { animation: drawC 12s ease-in-out 0.4s infinite; }
.bp-line.h-13 { animation: drawB 14s ease-in-out 2.9s infinite; }
.bp-line.h-14 { animation: drawD 15s ease-in-out 1.1s infinite; }
.bp-line.h-15 { animation: drawA 11s ease-in-out 4.7s infinite; }

/* --- VERTICALS --- */
.bp-line.v-1  { animation: drawC 13s ease-in-out 0.5s infinite; }
.bp-line.v-2  { animation: drawA 11s ease-in-out 2.2s infinite; }
.bp-line.v-3  { animation: drawB 15s ease-in-out 0.1s infinite; }
.bp-line.v-4  { animation: drawD 12s ease-in-out 3.5s infinite; }
.bp-line.v-5  { animation: drawC 14s ease-in-out 1.7s infinite; }
.bp-line.v-6  { animation: drawA 10s ease-in-out 4.0s infinite; }
.bp-line.v-7  { animation: drawB 16s ease-in-out 0.8s infinite; }
.bp-line.v-8  { animation: drawD 13s ease-in-out 2.6s infinite; }
.bp-line.v-9  { animation: drawC 11s ease-in-out 5.2s infinite; }
.bp-line.v-10 { animation: drawA 14s ease-in-out 1.4s infinite; }
.bp-line.v-11 { animation: drawB 12s ease-in-out 3.9s infinite; }
.bp-line.v-12 { animation: drawD 15s ease-in-out 0.3s infinite; }
.bp-line.v-13 { animation: drawC 13s ease-in-out 2.8s infinite; }
.bp-line.v-14 { animation: drawA 11s ease-in-out 4.5s infinite; }
.bp-line.v-15 { animation: drawB 14s ease-in-out 1.9s infinite; }

/* --- ERRATIC DIAGONALS (top) --- */
.bp-line.d-1  { animation: drawD 14s ease-in-out 0.6s infinite; }
.bp-line.d-2  { animation: drawC 16s ease-in-out 3.2s infinite; }
.bp-line.d-3  { animation: drawA 12s ease-in-out 1.5s infinite; }
.bp-line.d-4  { animation: drawB 15s ease-in-out 4.8s infinite; }
.bp-line.d-5  { animation: drawD 11s ease-in-out 0.9s infinite; }
.bp-line.d-6  { animation: drawC 13s ease-in-out 2.3s infinite; }
.bp-line.d-7  { animation: drawA 14s ease-in-out 5.1s infinite; }
.bp-line.d-8  { animation: drawB 12s ease-in-out 0.2s infinite; }
.bp-line.d-9  { animation: drawD 15s ease-in-out 3.7s infinite; }
.bp-line.d-10 { animation: drawC 11s ease-in-out 1.1s infinite; }
.bp-line.d-11 { animation: drawA 16s ease-in-out 4.4s infinite; }
.bp-line.d-12 { animation: drawB 13s ease-in-out 0.8s infinite; }
.bp-line.d-13 { animation: drawD 14s ease-in-out 2.9s infinite; }
.bp-line.d-14 { animation: drawC 12s ease-in-out 5.6s infinite; }
.bp-line.d-15 { animation: drawA 15s ease-in-out 1.3s infinite; }
.bp-line.d-16 { animation: drawB 11s ease-in-out 4.1s infinite; }

/* --- ERRATIC DIAGONALS (bottom) --- */
.bp-line.e-1  { animation: drawC 14s ease-in-out 0.4s infinite; }
.bp-line.e-2  { animation: drawA 12s ease-in-out 3.6s infinite; }
.bp-line.e-3  { animation: drawD 16s ease-in-out 1.2s infinite; }
.bp-line.e-4  { animation: drawB 13s ease-in-out 4.9s infinite; }
.bp-line.e-5  { animation: drawC 11s ease-in-out 0.7s infinite; }
.bp-line.e-6  { animation: drawA 15s ease-in-out 2.4s infinite; }
.bp-line.e-7  { animation: drawD 12s ease-in-out 5.3s infinite; }
.bp-line.e-8  { animation: drawB 14s ease-in-out 1.6s infinite; }
.bp-line.e-9  { animation: drawC 13s ease-in-out 3.0s infinite; }
.bp-line.e-10 { animation: drawA 11s ease-in-out 0.1s infinite; }
.bp-line.e-11 { animation: drawD 15s ease-in-out 4.6s infinite; }
.bp-line.e-12 { animation: drawB 16s ease-in-out 2.1s infinite; }
.bp-line.e-13 { animation: drawC 12s ease-in-out 5.8s infinite; }
.bp-line.e-14 { animation: drawA 14s ease-in-out 0.3s infinite; }
.bp-line.e-15 { animation: drawD 13s ease-in-out 3.4s infinite; }
.bp-line.e-16 { animation: drawB 11s ease-in-out 1.8s infinite; }

/* --- LONG DIAGONALS --- */
.bp-line.x-1  { animation: drawC 18s ease-in-out 0.2s infinite; }
.bp-line.x-2  { animation: drawA 15s ease-in-out 4.3s infinite; }
.bp-line.x-3  { animation: drawB 20s ease-in-out 1.0s infinite; }
.bp-line.x-4  { animation: drawD 16s ease-in-out 6.1s infinite; }
.bp-line.x-5  { animation: drawC 19s ease-in-out 2.7s infinite; }
.bp-line.x-6  { animation: drawA 14s ease-in-out 5.4s infinite; }
.bp-line.x-7  { animation: drawB 17s ease-in-out 0.5s infinite; }
.bp-line.x-8  { animation: drawD 15s ease-in-out 3.8s infinite; }
.bp-line.x-9  { animation: drawC 18s ease-in-out 1.9s infinite; }
.bp-line.x-10 { animation: drawA 13s ease-in-out 4.7s infinite; }
.bp-line.x-11 { animation: drawB 16s ease-in-out 0.8s infinite; }
.bp-line.x-12 { animation: drawD 20s ease-in-out 3.3s infinite; }
.bp-line.x-13 { animation: drawC 14s ease-in-out 5.9s infinite; }
.bp-line.x-14 { animation: drawA 17s ease-in-out 2.5s infinite; }

/* --- FRAGMENT LINES (short segments) --- */
.bp-line.t-1  { animation: drawD 10s ease-in-out 0.1s infinite; }
.bp-line.t-2  { animation: drawB 9s ease-in-out 2.0s infinite; }
.bp-line.t-3  { animation: drawA 11s ease-in-out 4.2s infinite; }
.bp-line.t-4  { animation: drawD 8s ease-in-out 1.4s infinite; }
.bp-line.t-5  { animation: drawC 10s ease-in-out 3.5s infinite; }
.bp-line.t-6  { animation: drawB 9s ease-in-out 0.7s infinite; }
.bp-line.t-7  { animation: drawA 12s ease-in-out 5.0s infinite; }
.bp-line.t-8  { animation: drawD 8s ease-in-out 2.8s infinite; }
.bp-line.t-9  { animation: drawC 11s ease-in-out 4.6s infinite; }
.bp-line.t-10 { animation: drawB 10s ease-in-out 1.1s infinite; }
.bp-line.t-11 { animation: drawA 9s ease-in-out 3.9s infinite; }
.bp-line.t-12 { animation: drawD 12s ease-in-out 0.4s infinite; }
.bp-line.t-13 { animation: drawC 8s ease-in-out 2.2s infinite; }
.bp-line.t-14 { animation: drawB 11s ease-in-out 5.3s infinite; }
.bp-line.t-15 { animation: drawA 10s ease-in-out 1.7s infinite; }
.bp-line.t-16 { animation: drawD 9s ease-in-out 4.4s infinite; }
.bp-line.t-17 { animation: drawC 12s ease-in-out 0.9s infinite; }
.bp-line.t-18 { animation: drawB 8s ease-in-out 3.1s infinite; }
.bp-line.t-19 { animation: drawA 11s ease-in-out 5.7s infinite; }
.bp-line.t-20 { animation: drawD 10s ease-in-out 2.6s infinite; }
.bp-line.t-21 { animation: drawC 9s ease-in-out 4.8s infinite; }
.bp-line.t-22 { animation: drawB 12s ease-in-out 1.5s infinite; }
.bp-line.t-23 { animation: drawA 8s ease-in-out 3.4s infinite; }
.bp-line.t-24 { animation: drawD 11s ease-in-out 0.3s infinite; }

/* =============================================
   SCANLINES
   ============================================= */
#scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.02) 2px,
    rgba(0, 0, 0, 0.02) 4px
  );
}

/* =============================================
   CONTAINER
   ============================================= */
.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.avatar-wrapper {
  position: relative;
  width: 110px;
  height: 110px;
  margin-bottom: 1.5rem;
}

.avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
  filter: sepia(0.15) saturate(0.85);
  transition: filter 0.4s ease;
}

.avatar-wrapper:hover .avatar {
  filter: sepia(0) saturate(1);
}

.avatar-ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid rgba(189, 173, 106, 0.25);
  z-index: 0;
  transition: border-color 0.4s ease;
}

.avatar-wrapper:hover .avatar-ring {
  border-color: rgba(189, 173, 106, 0.6);
}

h1 {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.2;
  margin-bottom: 0.3rem;
  color: #f0ece4;
}

.tagline {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: #bdad6a;
  text-transform: uppercase;
  margin-bottom: 2rem;
  opacity: 0.85;
}

.divider {
  width: 2.5rem;
  height: 1.5px;
  background: rgba(189, 173, 106, 0.2);
  margin-bottom: 1.5rem;
  border-radius: 1px;
}

.links {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: 1.75rem;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.85rem 1.25rem;
  background: rgba(240, 236, 228, 0.04);
  border: 1px solid rgba(240, 236, 228, 0.08);
  border-radius: 10px;
  color: #e8e2d6;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(2px);
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(189, 173, 106, 0.06), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn:hover {
  background: rgba(240, 236, 228, 0.07);
  border-color: rgba(189, 173, 106, 0.25);
  transform: translateY(-1.5px);
  color: #f0ece4;
}

.btn:hover::before {
  opacity: 1;
}

.btn:active {
  transform: translateY(0px);
  background: rgba(240, 236, 228, 0.03);
}

.social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: rgba(240, 236, 228, 0.35);
  transition: all 0.3s ease;
}

.social-link:hover {
  color: #bdad6a;
  background: rgba(189, 173, 106, 0.08);
  transform: translateY(-1.5px);
}

.social-link:active {
  transform: translateY(0);
}

.footer {
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: rgba(240, 236, 228, 0.12);
  letter-spacing: 0.05em;
}

@media (max-width: 480px) {
  body { padding: 1.5rem 1rem; }
  .container { max-width: 340px; }
  .avatar-wrapper { width: 95px; height: 95px; margin-bottom: 1.25rem; }
  .avatar { width: 95px; height: 95px; }
  h1 { font-size: 1.35rem; }
  .btn { padding: 0.8rem 1rem; font-size: 0.82rem; }
}

@media (min-width: 768px) {
  .container { max-width: 400px; }
}

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

.container > * {
  animation: fadeUp 0.6s ease both;
}

.container > *:nth-child(1) { animation-delay: 0.05s; }
.container > *:nth-child(2) { animation-delay: 0.12s; }
.container > *:nth-child(3) { animation-delay: 0.2s; }
.container > *:nth-child(4) { animation-delay: 0.28s; }
.container > *:nth-child(5) { animation-delay: 0.35s; }
.container > *:nth-child(6) { animation-delay: 0.42s; }
