/* Same language as the portfolio: black, Liquid Glass, app wallpapers and the activity-ring colours. */
:root {
  --red: #fa114f;
  --green: #92e82a;
  --cyan: #1eeaef;
  --ink: #f5f5f7;
  --soft: rgb(245 245 247 / 0.62);
  --spring: cubic-bezier(0.34, 1.36, 0.64, 1);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: clamp(1rem, 4vw, 3rem);
}

* { box-sizing: border-box; margin: 0; }

html { background: #000; color-scheme: dark; -webkit-text-size-adjust: 100%; }

body {
  min-height: 100dvh;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, system-ui, sans-serif;
  background: #000;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-bottom: 8rem;
}

a { color: inherit; text-decoration: none; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.fill { fill: currentColor; stroke: none; }

/* The ring glow behind everything. */
.glow {
  position: fixed;
  inset: -20vh -10vw auto;
  height: 95vh;
  pointer-events: none;
  background:
    radial-gradient(30% 40% at 22% 35%, rgb(250 17 79 / 0.30), transparent 70%),
    radial-gradient(28% 38% at 52% 22%, rgb(146 232 42 / 0.18), transparent 70%),
    radial-gradient(30% 42% at 80% 38%, rgb(30 234 239 / 0.24), transparent 70%);
  filter: blur(50px);
}

/* Liquid Glass */
.pill, .dock {
  background: linear-gradient(180deg, rgb(255 255 255 / 0.12), rgb(255 255 255 / 0.03) 45%, rgb(255 255 255 / 0.06)), rgb(22 22 26 / 0.5);
  -webkit-backdrop-filter: blur(20px) saturate(185%);
  backdrop-filter: blur(20px) saturate(185%);
  box-shadow:
    0 14px 36px -14px rgb(0 0 0 / 0.6),
    inset 0 1px 1px -0.5px rgb(255 255 255 / 0.35),
    inset 0 0 0 0.5px rgb(255 255 255 / 0.12);
}

/* Top bar */
.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: max(0.75rem, env(safe-area-inset-top)) var(--gutter) 0;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  padding: 0.35rem 1rem 0.35rem 0.4rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
}
.brand { font-weight: 600; transition: scale 0.5s var(--spring); }
.brand:active { scale: 0.95; }
.brand-avatar { width: 2rem; height: 2rem; border-radius: 50%; object-fit: contain; object-position: center 30%; background: linear-gradient(160deg, #5a5a60, #2a2a2e); padding-top: 2px; }
.brand-role { color: var(--soft); font-weight: 400; }
.brand-role::before { content: "· "; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.status { padding-left: 1rem; color: var(--soft); }
.status strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: #8e8e93; flex-shrink: 0; }
.dot.working { background: #30d158; box-shadow: 0 0 0 0 rgb(48 209 88 / 0.6); animation: ping 2s infinite; }
.dot.evening { background: #ffd60a; }
.dot.sleeping { background: #bf5af2; }
@keyframes ping { 70% { box-shadow: 0 0 0 7px rgb(48 209 88 / 0); } 100% { box-shadow: 0 0 0 0 rgb(48 209 88 / 0); } }

main { position: relative; max-width: 80rem; margin: 0 auto; padding: 1rem var(--gutter) 0; }

/* Bento of destinations */
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-areas:
    "portfolio studio it"
    "portfolio vancoli vancoli";
  grid-template-rows: 1fr 1fr;
}
/* Everything in one screen on laptops and up: the grid takes what the bar and dock leave over. */
@media (min-width: 961px) and (min-height: 600px) {
  body { padding-bottom: 0; }
  .grid { height: calc(100dvh - 4.25rem - 7.25rem); min-height: 30rem; }
  .card, .card-portfolio { min-height: 0; }
  .footer { position: fixed; left: var(--gutter); bottom: max(1.75rem, env(safe-area-inset-bottom)); margin: 0; padding: 0; z-index: 5; }
}
.card {
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2.5rem;
  min-height: 15.5rem;
  padding: 1.5rem;
  overflow: hidden;
  border-radius: 2rem;
  isolation: isolate;
  background: var(--wall, radial-gradient(80% 75% at 100% 0%, rgb(var(--accent) / 0.22), transparent 70%) , linear-gradient(180deg, #1c1c1e, #0e0e10));
  box-shadow: inset 0 0 0 0.5px rgb(255 255 255 / 0.16), inset 0 1px 0 rgb(255 255 255 / 0.06), 0 30px 60px -30px rgb(0 0 0 / 0.9);
  transform: perspective(1100px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.8s var(--spring), scale 0.6s var(--spring), opacity 0.4s var(--ease), filter 0.4s var(--ease);
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 50%), rgb(255 255 255 / 0.18), transparent 70%);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
@media (hover: hover) {
  .card:hover::after { opacity: 1; }
  .card:hover { scale: 1.015; }
  .grid:hover .card:not(:hover) { opacity: 0.6; filter: saturate(0.7); }
  .card:hover .go { background: rgb(var(--accent)); color: #000; rotate: 45deg; }
  .card-portfolio:hover .card-rings { rotate: -70deg; opacity: 0.8; }
}
.card:active { scale: 0.98; transition-duration: 0.15s; }
.card:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }

.card-portfolio { grid-area: portfolio; --accent: 250 17 79; --wall: radial-gradient(70% 55% at 100% 0%, rgb(250 17 79 / 0.32), transparent 70%), radial-gradient(70% 55% at 0% 100%, rgb(30 234 239 / 0.18), transparent 70%), linear-gradient(180deg, #1c1c1e, #0e0e10); }
.card-studio { grid-area: studio; --accent: 30 234 239; }
.card-it { grid-area: it; --accent: 146 232 42; }
.card-vancoli { grid-area: vancoli; --accent: 255 159 10; }

.card-top { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.icon {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 27%;
  color: rgb(var(--accent));
  background: rgb(var(--accent) / 0.14);
  box-shadow: inset 0 0 0 0.5px rgb(var(--accent) / 0.35);
}
.card-portfolio .icon { color: #fff; background: rgb(255 255 255 / 0.1); box-shadow: inset 0 0 0 0.5px rgb(255 255 255 / 0.25); }
.icon svg { width: 1.6rem; height: 1.6rem; stroke-width: 1.9; }
.badge {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: #fff;
  color: #1d1d1f;
}
.card-body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 0.35rem; max-width: 26rem; }
.domain { font-size: 0.8125rem; font-weight: 600; color: rgb(var(--accent)); }
.card-portfolio .domain { color: rgb(255 255 255 / 0.6); }
.title { font-size: clamp(1.75rem, 2.6vw, 2.5rem); font-weight: 600; line-height: 1.05; letter-spacing: -0.03em; }
.card-portfolio .title { font-size: clamp(2.5rem, 4.5vw, 4rem); }
.desc { font-size: 1rem; line-height: 1.35; color: rgb(255 255 255 / 0.65); }
.card-rings {
  position: absolute;
  top: -12%;
  right: -14%;
  z-index: 0;
  width: min(30rem, 95%);
  fill: none;
  stroke-width: 15;
  stroke-linecap: round;
  rotate: -90deg;
  opacity: 0.55;
  transition: rotate 1.2s var(--spring), opacity 0.6s var(--ease);
}
.card-portfolio .card-body { padding-right: 0; }
.go {
  position: absolute;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.08);
  box-shadow: inset 0 0 0 0.5px rgb(255 255 255 / 0.18);
  transition: background 0.3s var(--ease), color 0.3s var(--ease), rotate 0.6s var(--spring);
}
.go svg { width: 1rem; height: 1rem; stroke-width: 2; }
.card-portfolio .go { display: none; }
.card-portfolio .badge + .go { display: none; }
.card:not(.card-portfolio) .card-body { padding-right: 3rem; }

/* Dock, like the one on iPhone */
.dock {
  position: fixed;
  left: 50%;
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 10;
  display: flex;
  gap: 0.35rem;
  padding: 0.5rem 0.6rem 0.35rem;
  border-radius: 1.75rem;
  translate: -50% 0;
}
.dock-app { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; width: 4rem; font-size: 0.6875rem; font-weight: 500; }
.dock-icon {
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 27%;
  background: var(--bg);
  color: #fff;
  box-shadow: inset 0 0 0 0.5px rgb(255 255 255 / 0.35), 0 4px 10px -3px rgb(0 0 0 / 0.5);
  transition: scale 0.45s var(--spring), translate 0.45s var(--spring);
}
.dock-icon svg { width: 1.45rem; height: 1.45rem; }
@media (hover: hover) { .dock-app:hover .dock-icon { scale: 1.18; translate: 0 -0.35rem; } }
.dock-app:active .dock-icon { scale: 0.86; }

.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3.5rem;
  padding: 0 var(--gutter);
  font-size: 0.8125rem;
  color: rgb(245 245 247 / 0.45);
  text-align: center;
  flex-wrap: wrap;
}
.footer > span { white-space: nowrap; }
.footer a { color: var(--ink); font-weight: 700; letter-spacing: 0.06em; }
.footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ring-dots { display: inline-flex; gap: 0.25rem; }
.ring-dots i { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--red); }
.ring-dots i:nth-child(2) { background: var(--green); }
.ring-dots i:nth-child(3) { background: var(--cyan); }

/* Entrance: everything rises into place, one after the other. */
.rise { animation: rise 0.9s var(--ease) both; animation-delay: calc(var(--d, 0) * 70ms + 80ms); }
.dock.rise { animation-name: rise-dock; }
@keyframes rise { from { opacity: 0; translate: 0 1.5rem; filter: blur(6px); } }
@keyframes rise-dock { from { opacity: 0; translate: -50% 2rem; } }

/* Tablet: portfolio across the top, the rest below. */
@media (max-width: 960px) {
  .brand-role { display: none; }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "portfolio portfolio"
      "studio it"
      "vancoli vancoli";
  }
  .card-portfolio { min-height: 22rem; }
  .card-rings { top: -30%; right: -8%; width: 18rem; }
}

/* Phone */
@media (max-width: 600px) {
  .status-text { display: none; }
  .bar .brand > span:last-child { display: none; }
  .brand { padding-right: 0.4rem; }
  .grid { grid-template-columns: 1fr; grid-template-areas: "portfolio" "studio" "it" "vancoli"; }
  .pill { white-space: nowrap; }
  .status .where { display: none; }
  .card { min-height: 0; gap: 1.25rem; padding: 1.25rem; border-radius: 1.75rem; }
  .icon { width: 2.75rem; height: 2.75rem; }
  .icon svg { width: 1.35rem; height: 1.35rem; }
  .title { font-size: 1.75rem; }
  .card-portfolio .title { font-size: 2.25rem; }
  .desc { font-size: 0.9375rem; }
  .card-rings { top: -45%; right: -18%; width: 14rem; opacity: 0.4; }
  .card-portfolio .card-body { padding-right: 0; }
  .dock-app { width: 3.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .pill, .dock { background: #1c1c1e; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
