/* =============================================
   A1ex Y. · V5 — style.css
   ============================================= */

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

:root {
  --c1: #55CDFC;   /* flag blue  */
  --c2: #F7A8B8;   /* flag pink  */
  --c3: #ffffff;   /* flag white */

  --flag-grad: linear-gradient(90deg,
    #55CDFC 0%, #F7A8B8 25%, #ffffff 50%, #F7A8B8 75%, #55CDFC 100%
  );

  --cream:  #fdf6ee;
  --cream2: #f7ede0;
  --cream3: #eddcc8;
  --ink:    #3a2e28;
  --ink2:   #7a6a60;
  --ink3:   #b0a090;

  --mono:    'JetBrains Mono', monospace;
  --display: 'M PLUS Rounded 1c', sans-serif;
  --jp:      'Zen Kaku Gothic New', sans-serif;
  --r:       22px;
  --sh:      0 4px 24px rgba(58,46,40,0.11), 0 1px 4px rgba(58,46,40,0.06);
  --sh-h:    0 8px 36px rgba(58,46,40,0.16), 0 2px 8px rgba(58,46,40,0.08);
}

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  font-family: var(--display);
  -webkit-font-smoothing: antialiased;
  color: var(--ink);
}

a { color: inherit; text-decoration: none; }
.mono { font-family: var(--mono); }

/* =============================================
   BACKGROUND
   ============================================= */
#bg-layer {
  position: fixed; inset: 0; z-index: 0;
  background-image: url('../img/background/main-bg.avif');
  background-size: cover;
  background-position: center;
  filter: blur(1.5px) brightness(0.86) saturate(1.1);
  transform: scale(1.04);
}

/* =============================================
   SAKURA CANVAS
   ============================================= */
#sakura-canvas {
  position: fixed; inset: 0; z-index: 2;
  pointer-events: none;
  width: 100%; height: 100%;
}

/* =============================================
   FX / SPARKLE LAYER
   ============================================= */
#fx-layer {
  position: fixed; inset: 0; z-index: 3;
  pointer-events: none;
}

.spark {
  position: absolute;
  pointer-events: none;
}
.spark::before, .spark::after {
  content: '';
  position: absolute;
  border-radius: 1px;
}
.spark::before { width: 2px; height: 100%; left: 50%; transform: translateX(-50%); }
.spark::after  { height: 2px; width: 100%; top: 50%;  transform: translateY(-50%); }
.spark.blue::before,  .spark.blue::after  { background: var(--c1); }
.spark.pink::before,  .spark.pink::after  { background: var(--c2); }
.spark.white::before, .spark.white::after { background: #e8d8c8; }

/* =============================================
   FLOATING DECO
   ============================================= */
#deco-layer {
  position: fixed; inset: 0; z-index: 3;
  pointer-events: none;
}

.floatie {
  position: absolute;
  font-style: normal;
  user-select: none;
  animation: fl linear infinite;
}

.f-1 { font-size: 18px; color: var(--c2); top: 8%;    left: 7%;    animation-duration: 7s;   opacity: 0.6;  }
.f-2 { font-size: 13px; color: var(--c1); top: 18%;   right: 9%;   animation-duration: 9s;   opacity: 0.5;  animation-delay: 1s;   }
.f-3 { font-size: 16px; color: var(--c2); bottom: 19%;left: 6%;    animation-duration: 8s;   opacity: 0.55; animation-delay: 2s;   }
.f-4 { font-size: 11px; color: var(--c1); top: 56%;   right: 7%;   animation-duration: 10s;  opacity: 0.45; animation-delay: 0.5s; }
.f-5 { font-size: 21px; color: var(--c2); bottom: 11%;right: 12%;  animation-duration: 6.5s; opacity: 0.5;  animation-delay: 3s;   }
.f-6 { font-size: 12px; color: var(--c1); top: 40%;   left: 10%;   animation-duration: 11s;  opacity: 0.4;  animation-delay: 1.5s; }

@keyframes fl {
  0%,100% { transform: translateY(0) rotate(0deg);     }
  25%      { transform: translateY(-13px) rotate(10deg);  }
  50%      { transform: translateY(-5px)  rotate(-8deg);  }
  75%      { transform: translateY(-17px) rotate(6deg);   }
}

/* =============================================
   LAYOUT
   ============================================= */
#site {
  position: relative; z-index: 10;
  width: 100vw; height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}

#layout {
  display: grid;
  grid-template-columns: 200px 1fr 1fr;
  grid-template-rows: auto;
  gap: 16px;
  width: min(960px, 94vw);
  max-height: 94vh;
  align-items: stretch;
}

/* =============================================
   CARD BASE
   ============================================= */
.card {
  background: var(--cream);
  border-radius: var(--r);
  box-shadow: var(--sh);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
}

.card:hover {
  box-shadow: var(--sh-h);
  transform: translateY(-3px);
}

/* Top pride-gradient stripe */
.top-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--flag-grad);
  border-radius: var(--r) var(--r) 0 0;
}

.card-label {
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--c1);
  margin-bottom: 16px;
  margin-top: 4px;
}

/* =============================================
   AVATAR CARD
   ============================================= */
.card-a {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
}

.avatar-area { position: relative; }

.ring-wrap {
  position: relative;
  width: 152px; height: 152px;
  display: flex; align-items: center; justify-content: center;
}

.ring {
  position: absolute;
  width: 152px; height: 152px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  background:
    linear-gradient(var(--cream), var(--cream)) padding-box,
    var(--flag-grad) border-box;
  animation: spin 9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.av-img {
  width: 108px; height: 108px;
  border-radius: 50%;
  object-fit: cover;
  position: relative; z-index: 2;
  box-shadow: 0 4px 18px rgba(58,46,40,0.14);
  animation: bob 4s ease-in-out infinite;
}

@keyframes bob {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}

/* Status pill */
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 14px;
  border-radius: 100px;
  border: 1.5px solid var(--cream3);
  background: var(--cream2);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink2);
}

.pill-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--c1);
  box-shadow: 0 0 6px var(--c1);
  animation: dot 2s ease-in-out infinite;
}
@keyframes dot {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.25; }
}



/* =============================================
   BIO CARD
   ============================================= */
.card-b {
  grid-column: 2;
  grid-row: 1;
}

.name-block { margin-bottom: 10px; }

.name-main {
  font-family: var(--display);
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
  color: var(--ink);
}

.name-sub {
  font-family: var(--jp);
  font-size: 13px;
  letter-spacing: 5px;
  color: var(--ink3);
  margin-top: 5px;
  font-weight: 300;
}

/* Identity tag */
.tag-row { margin: 12px 0; }

.tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1px;
  padding: 4px 13px;
  border-radius: 100px;
  background: linear-gradient(135deg, #d4f0fc 0%, #fce4ec 100%);
  color: #3a7fa8;
  border: 1px solid rgba(85,205,252,0.3);
}

/* Divider */
.divider {
  display: flex; align-items: center; gap: 8px;
  margin: 12px 0;
  color: var(--c2);
  font-size: 9px;
}
.div-line {
  flex: 1; height: 1.5px;
  background: linear-gradient(90deg, var(--c2), var(--c1), transparent);
  opacity: 0.4;
  border-radius: 1px;
}

/* Bio text */
.bio-body p {
  font-size: 13px;
  color: var(--ink2);
  line-height: 1.9;
}
.bio-loc {
  display: flex; align-items: center; gap: 5px;
}
.pin { width: 11px; height: 11px; color: var(--c2); flex-shrink: 0; }
.bio-note { font-size: 10px !important; color: var(--ink3) !important; letter-spacing: 1px; }

/* Side accent — flag colours vertical bar */
.side-accent {
  position: absolute;
  bottom: 0; right: 0;
  width: 5px; height: 70%;
  border-radius: 0 0 var(--r) 0;
  overflow: hidden;
  background: var(--flag-grad);
  opacity: 0.5;
  transform: rotate(90deg);
  transform-origin: bottom right;
}

/* =============================================
   CONNECT CARD
   ============================================= */
.card-c {
  grid-column: 3;
  grid-row: 1;
}

.link-list {
  display: flex; flex-direction: column; gap: 5px;
  margin-bottom: 14px;
}

.link-row {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px;
  border-radius: 14px;
  border: 1.5px solid transparent;
  background: var(--cream2);
  transition: background 0.2s, border-color 0.2s,
              transform 0.25s cubic-bezier(0.34,1.56,0.64,1),
              box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.link-row::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--flag-grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
  border-radius: 0 0 14px 14px;
}

.link-row:hover {
  background: var(--cream);
  border-color: rgba(85,205,252,0.3);
  transform: translateX(5px);
  box-shadow: 0 2px 12px rgba(85,205,252,0.1);
}
.link-row:hover::after { transform: scaleX(1); }

.link-ico {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--cream3);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}
.link-ico svg { width: 13px; height: 13px; color: var(--ink2); }
.link-row:hover .link-ico { background: linear-gradient(135deg, #d4f0fc, #fce4ec); }
.link-row:hover .link-ico svg { color: #3a7fa8; }

.link-text { flex: 1; }
.link-name { display: block; font-size: 13px; font-weight: 700; color: var(--ink);  line-height: 1.3; }
.link-sub  { display: block; font-size: 9px;  letter-spacing: 1px; color: var(--ink3); }

.link-arr {
  font-size: 13px; color: var(--ink3);
  transition: color 0.2s, transform 0.2s;
}
.link-row:hover .link-arr { color: var(--c1); transform: translateX(3px); }

.footer-note {
  font-size: 9px; letter-spacing: 2px; color: var(--ink3); text-align: center;
}
.footer-note a:hover { color: var(--c1); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 680px) {
  html, body { overflow: hidden; }

  /* Keep cards vertically centred */
  #site { align-items: center; }

  #layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    overflow-y: auto;
    max-height: 96vh;
    gap: 10px;
    padding: 16px 14px;
    align-content: center;
    scrollbar-width: none;
  }
  #layout::-webkit-scrollbar { display: none; }

  /* ---- Avatar card hidden on mobile ---- */
  /* Avatar is shown inside bio card instead */
  .card-a { display: none; }

  /* ---- Bio card: name left, avatar right ---- */
  .card-b {
    grid-column: 1; grid-row: 1;
    padding: 16px 18px;
  }

  /* Wrap name-block and injected avatar side by side */
  .name-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
  }

  /* Avatar injected via ::after trick — we use a real element instead,
     so we inject it with JS; here we just style the placeholder */
  .mobile-avatar {
    flex-shrink: 0;
    width: 76px; height: 76px;
    border-radius: 50%;
    border: 2.5px solid transparent;
    background:
      linear-gradient(var(--cream), var(--cream)) padding-box,
      var(--flag-grad) border-box;
    overflow: hidden;
    box-shadow: 0 3px 14px rgba(58,46,40,0.13);
  }
  .mobile-avatar img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    animation: bob 4s ease-in-out infinite;
  }

  .name-main { font-size: 32px; }
  .name-sub  { font-size: 10px; letter-spacing: 3px; }
  .bio-body p { font-size: 12px; }

  /* ---- Connect card ---- */
  .card-c {
    grid-column: 1; grid-row: 2;
    padding: 16px 18px 18px;
  }

  .link-row  { padding: 8px 10px; }
  .link-name { font-size: 12px; }
  .link-ico  { width: 26px; height: 26px; }
  .link-ico svg { width: 12px; height: 12px; }

  .floatie { display: none; }
}

#layout::-webkit-scrollbar { width: 4px; }
#layout::-webkit-scrollbar-track { background: transparent; }
#layout::-webkit-scrollbar-thumb { background: rgba(85,205,252,0.3); border-radius: 2px; }
