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

:root {
  --bg:           #080808;
  --surface:      #0e0e0e;
  --surface-2:    #131313;
  --border:       #1a1a1a;
  --border-hover: #282828;
  --text:         #f0f0f0;
  --text-2:       #777;
  --muted:        #333;
  --green:        #4ade80;
}

html, body { height: 100%; overflow: hidden; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 13px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

a { color: inherit; text-decoration: none; pointer-events: auto; }

img { pointer-events: none; user-drag: none; -webkit-user-drag: none; }

/*
  ┌──────────────┬──────────────────────┬──────────────┐
  │ FOTO         │        STACK         │              │
  │ IDENTIDAD    │          ↓           │    STATUS    │
  │              │                      │       ↓      │
  │              │                      │              │
  │              │                      │              │
  │ CONTACT      │                      │              │
  └──────────────┴──────────────────────┴──────────────┘
*/
.layout {
  display: grid;
  grid-template-columns: 380px 1fr 360px;
  height: 100vh;
  gap: 0;
}

/* ── panels ── */
.panel {
  background: var(--bg);
  overflow: hidden;
  position: relative;
}

/* Left column: identity top, contact in middle area */
.panel-left {
  display: flex;
  flex-direction: column;
  padding: 40px;
}

.panel-left .identity {
  margin-bottom: 32px;
}

.panel-left > div:last-child {
  margin-top: auto;
}

.panel-left > div:last-child .label {
  text-align: center;
}

.panel-left > div:last-child .label {
  text-align: center;
}

/* Center column: stack centered vertically */
.panel-center {
  padding: 48px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Right column: status centered vertically */
.panel-right {
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-content {
  width: 100%;
}

.status-content .label {
  text-align: center;
}

.stack-wrapper { 
  width: 100%; 
  max-width: 680px;
  margin: 0 auto;
  transform: translateY(-30px);
}

/* ── label ── */
.label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 20px;
}

.stack-wrapper .label {
  text-align: center;
  margin-bottom: 32px;
}

/* ────────────────────────
   IDENTITY
──────────────────────── */
.identity-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.pfp {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
  image-rendering: high-quality;
  image-rendering: -webkit-optimize-contrast;
}

.identity h1 {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -1px;
  color: var(--text);
  line-height: 1;
}

.identity h1 span { color: var(--muted); }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 11px;
  color: var(--text-2);
  margin-bottom: 16px;
  width: fit-content;
}

.status-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px #4ade8066;
  animation: blink 2.4s ease-in-out infinite;
}

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

.bio {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.75;
}

.bio strong { color: var(--text); font-weight: 500; }

.bio-note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-2);
}

/* ────────────────────────
   CONTACT
──────────────────────── */
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  transition: border-color 0.2s, background 0.2s;
}

.contact-link:hover {
  border-color: var(--border-hover);
  background: var(--surface-2);
}

.c-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 7px;
  flex-shrink: 0;
  transition: border-color 0.2s;
}

.contact-link:hover .c-icon { border-color: var(--border-hover); }
.c-icon i, .c-icon svg { font-size: 13px; color: var(--text-2); }

.c-info { display: flex; flex-direction: column; gap: 1px; }

.c-type {
  font-size: 9.5px;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.9px;
}

.c-val { font-size: 12px; color: var(--text); }

.c-chevron {
  margin-left: auto;
  color: var(--text-2);
  opacity: 0.5;
  transition: color 0.15s, transform 0.15s, opacity 0.15s;
}

.contact-link:hover .c-chevron {
  color: var(--text-2);
  transform: translateX(2px);
}

/* ────────────────────────
   STACK
──────────────────────── */
.stack-group {
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
}

.stack-row {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

.stack-cat {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  text-align: center;
}

.stack-icons {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.icon-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: default;
}

.icon-wrap i {
  font-size: 32px;
  filter: grayscale(100%) brightness(0.5);
  transition: filter 0.2s, transform 0.2s;
}

.icon-wrap .custom-icon {
  width: 32px;
  height: 32px;
  filter: grayscale(100%) brightness(0.5);
  transition: filter 0.2s, transform 0.2s;
}

.icon-wrap:hover i,
.icon-wrap:hover .custom-icon {
  filter: grayscale(0%) brightness(1);
  transform: translateY(-3px);
}

.icon-wrap span {
  font-size: 10px;
  color: #555;
  transition: color 0.2s;
}

.icon-wrap:hover span { color: var(--text-2); }

/* ────────────────────────
   SOCIAL ICONS
──────────────────────── */
.social-icons {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  justify-content: center;
}

.social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  color: var(--text-2);
}

.social-link:hover {
  border-color: var(--border-hover);
  background: var(--surface-2);
  transform: translateY(-2px);
}

.social-link i {
  font-size: 18px;
}

.social-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.coffee-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.coffee-link:hover {
  border-color: var(--border-hover);
  background: var(--surface-2);
  color: #e8c547;
}

/* ────────────────────────
   DISCORD PROFILE CARD
──────────────────────── */
.discord-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 12px;
}

.profile-avatar-wrap {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.profile-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-2);
}

.profile-status {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 3px solid var(--surface);
}

.profile-status.online {
  background: #23a559;
}

.profile-status.idle {
  background: #f0b232;
}

.profile-status.dnd {
  background: #f23f43;
}

.profile-status.offline {
  background: #80848e;
}

.profile-info {
  flex: 1;
  min-width: 0;
}

.profile-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-tag {
  font-size: 11px;
  color: var(--text-2);
}

/* ────────────────────────
   DISCORD ACTIVITY (Lanyard)
──────────────────────── */
.discord-activity {
  margin-bottom: 20px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: none;
}

.discord-activity.active {
  display: block;
}

.activity-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.activity-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-2);
}

.activity-label.spotify {
  color: #1DB954;
}

.activity-type-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.activity-content {
  overflow: hidden;
  width: 100%;
}

.activity-slider {
  display: flex;
  width: 100%;
  transition: transform 0.35s ease;
}

.activity-item {
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  display: flex;
  gap: 12px;
  align-items: center;
}

.activity-art,
.activity-art-link {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}

.activity-art-link {
  display: block;
  pointer-events: auto;
}

.activity-image {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-2);
  display: block;
}

.activity-placeholder {
  width: 64px;
  height: 64px;
  padding: 16px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text-2);
}

.activity-image-small {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-2);
  border: 2px solid var(--surface);
}

.activity-details {
  flex: 1;
  min-width: 0;
}

.activity-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  line-height: 1.3;
}

.activity-state {
  font-size: 11px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  line-height: 1.35;
}

.activity-album {
  color: #555;
}

.activity-elapsed {
  margin-top: 6px;
  font-size: 10px;
  color: var(--text-2);
}

.progress-bar {
  margin-top: 8px;
  width: 100%;
  height: 4px;
  background: #1f1f1f;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: #1DB954;
  border-radius: 999px;
  transition: width 0.9s linear;
}

.progress-time {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 10px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.activity-dots {
  display: none;
  gap: 6px;
  justify-content: center;
  margin-top: 10px;
  padding-top: 2px;
}

.activity-dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--muted);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.activity-dot:hover {
  background: var(--text-2);
  transform: scale(1.3);
}

.activity-dot.active {
  background: var(--text);
  transform: scale(1.2);
}

@media (max-width: 1100px) {
  html, body {
    height: auto;
    overflow: auto;
  }

  .layout {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
  }

  .panel {
    overflow: visible;
  }

  .panel-left,
  .panel-center,
  .panel-right {
    padding: 32px 24px;
  }

  .panel-left > div:last-child {
    margin-top: 28px;
  }

  .stack-wrapper {
    transform: none;
  }
}
