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

:root {
  --bg:                #f5f5f7;
  --card:              #ffffff;
  --text:              #1d1d1f;
  --secondary:         #6e6e73;
  --separator:         rgba(0, 0, 0, 0.1);
  --btn-bg:            #ffffff;
  --btn-text:          #1d1d1f;
  --btn-primary-bg:    #1d1d1f;
  --btn-primary-text:  #f5f5f7;
  --btn-hover:         #e5e5ea;
  --btn-primary-hover: #3a3a3c;
  --card-fade:         rgba(255, 255, 255, 0.82);

  --wb:       #663BFF;
  --cof:      #CF2729;
  --unt:      #00853E;
  --rfs:      #1d1d1f;
  --rhhs:     #01A9EF;
  --cristina: #553C84;
  --hilary:   #007a73;
  --delia:    #b36b00;
  --beto:     #333333;
  --mochila:  #C23824;
  --palmagent:#007AFF;
  --lumon:    #05B4EE;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:                #000000;
    --card:              #1d1d1f;
    --text:              #f5f5f7;
    --separator:         rgba(255, 255, 255, 0.1);
    --btn-bg:            #1d1d1f;
    --btn-text:          #f5f5f7;
    --btn-primary-bg:    #f5f5f7;
    --btn-primary-text:  #000000;
    --btn-hover:         #2d2d2f;
    --btn-primary-hover: #d1d1d6;
    --card-fade:         rgba(29, 29, 31, 0.82);
  }

  .li-logo-invert { filter: invert(1); }

  .flip-overlay span {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow:
      inset 0 1.5px 0 rgba(255, 255, 255, 0.45),
      inset 0 -1px 0 rgba(0, 0, 0, 0.2),
      0 6px 20px rgba(0, 0, 0, 0.35),
      0 1px 3px rgba(0, 0, 0, 0.2);
  }
}

body {
  background: var(--bg);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  font-family: system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: var(--text);
}

.wrap {
  width: 100%;
  max-width: 60vw;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

.card {
  background: var(--card);
  border-radius: 20px;
  padding: 28px;
}

.card-front { padding: 36px; }

.flip-spacer { height: 48px; }

.card-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  padding: 40px 32px;
}

.portrait {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.bio p {
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.022em;
  text-align: center;
}

.bio a { text-decoration: none; font-weight: 600; }
.bio a:hover { text-decoration: underline; }

.card h3 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 16px;
}

.card ul { list-style: none; }

.card ul li {
  font-size: 15px;
  color: var(--text);
  padding: 16px 0;
  border-bottom: 0.5px solid var(--separator);
  line-height: 1.45;
  letter-spacing: -0.016em;
}

.card ul li:first-child { padding-top: 0; }
.card ul li:last-child  { border-bottom: none; padding-bottom: 0; }

.card-front ul li { font-weight: 600; }

.card ul li a { text-decoration: none; font-weight: 600; }
.card ul li a:hover { text-decoration: underline; }

.wb        { color: var(--wb); }
.cof       { color: var(--cof); }
.macadmins { background: linear-gradient(135deg, #5EBD3E 0%, #FFB900 23.66%, #F78200 35.33%, #E23838 49.99%, #973999 67.66%, #009CDF 79.22%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rfs       { color: var(--rfs); }
.rhhs      { color: var(--rhhs); }
.unt       { color: var(--unt); }
.cristina  { color: var(--cristina); }
.hilary    { color: var(--hilary); }
.delia     { color: var(--delia); }
.beto      { color: var(--beto); }
.mochila   { color: var(--mochila); }
.palmagent { color: var(--palmagent); }
.lumon     { color: var(--lumon); }

.now-playing {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: center;
  background: linear-gradient(180deg, #d2d2d2 0%, #b6b6b6 100%);
  padding: 10px 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), 0 1px 4px rgba(0,0,0,0.25);
  position: absolute;
  bottom: calc(100% + 12px);
  left: 0;
  right: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
              transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.now-playing.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.now-playing img {
  width: 52px;
  height: 52px;
  border-radius: 4px;
  object-fit: cover;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.now-playing img.hidden { display: none; }

.now-playing .meta {
  position: relative;
  background: #d6ddb4;
  border-radius: 4px;
  padding: 8px 12px;
  box-shadow: inset 0 1px 4px rgba(0,0,0,0.2), 0 1px 0 rgba(255,255,255,0.5);
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  overflow: hidden;
}

.now-playing .meta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.45) 0%, rgba(255,255,255,0.1) 50%, transparent 50%);
  pointer-events: none;
  border-radius: inherit;
}

.now-playing .label {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(0,0,0,0.38);
  margin-bottom: 2px;
}

.now-playing .title,
.now-playing .artist {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.now-playing .title  { font-size: 14px; font-weight: 700; color: #1a1a1a; }
.now-playing .artist { font-size: 12px; color: #3a3a3a; }

.fn {
  border-bottom: 1px dashed currentColor;
  cursor: help;
}

.fn:focus { outline: none; }

.fn-tip {
  position: fixed;
  background: var(--text);
  color: var(--card);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 100;
}

.card-flip {
  perspective: 1200px;
  cursor: pointer;
}

.card-flip-inner {
  display: grid;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.card-flip.flipped .card-flip-inner { transform: rotateY(180deg); }

.card-face {
  grid-area: 1 / 1;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  position: relative;
  overflow: hidden;
}

.card-back {
  transform: rotateY(180deg);
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}

.scroll-wrap {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  min-height: 0;
}

.scroll-wrap::-webkit-scrollbar { display: none; }

.scroll-fade {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 72px;
  background: linear-gradient(to top, var(--card-fade) 20%, transparent);
  border-radius: 0 0 20px 20px;
}

.flip-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 48px 20px 20px;
  background: linear-gradient(to top, var(--card-fade) 40%, transparent);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  cursor: pointer;
  border-radius: 0 0 20px 20px;
}

.flip-overlay:hover { opacity: 1; }

.flip-overlay span {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  border-radius: 100px;
  padding: 6px 14px;
  position: relative;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(28px) saturate(2.2) brightness(1.12);
  -webkit-backdrop-filter: blur(28px) saturate(2.2) brightness(1.12);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.82),
    inset 0 -1px 0 rgba(0, 0, 0, 0.06),
    inset 1px 0 0 rgba(255, 255, 255, 0.35),
    inset -1px 0 0 rgba(255, 255, 255, 0.18),
    0 6px 20px rgba(0, 0, 0, 0.12),
    0 1px 3px rgba(0, 0, 0, 0.08);
  filter: url(#glass-refract);
}

.flip-overlay span::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(165deg, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0.1) 40%, transparent 65%);
  pointer-events: none;
}

.li-logo-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.li-logo {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  flex-shrink: 0;
  overflow: hidden;
}

.li-logo-sm {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.li-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.card-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.card-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 12px;
  border-radius: 20px;
  background: var(--btn-bg);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.016em;
  text-decoration: none;
  color: var(--btn-text);
  transition: background 0.15s;
}

.card-btn:hover { background: var(--btn-hover); }

.card-btn.primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
}

.card-btn.primary:hover { background: var(--btn-primary-hover); }

.card-btn.workbrew {
  background: var(--wb);
  color: #ffffff;
}

.card-btn.workbrew:hover { background: #5530d4; }

@media (max-width: 768px) {
  body { padding: 32px 16px; }
  .wrap { max-width: 90vw; }
  .card { padding: 20px; }
  .card-front { padding: 24px; }
  .card-profile { padding: 28px 20px; }
  .card-links { grid-template-columns: 1fr; }
}
