@import url('variables.css');

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

body {
  font-family: var(--font-inter);
  background-color: var(--color-white);

  background-image: radial-gradient(at 0% 0%, rgba(135,234,92,0.1) 0px, transparent 50%),
                    radial-gradient(at 100% 0%, rgba(255,189,137,0.15) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--color-forest-ink);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  cursor: none;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

.anton {
  font-family: 'Anton', sans-serif;
  text-transform: uppercase;
}

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 16px;
  height: 16px;
  background-color: var(--color-forest-ink);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), height 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease;
  mix-blend-mode: difference;
}
.cursor.active {
  width: 64px;
  height: 64px;
  background-color: var(--color-lime-volt);
  mix-blend-mode: normal;
  opacity: 0.8;
}

.loader {
  position: fixed;
  inset: 0;
  background-color: var(--color-forest-ink);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.loader-text {
  font-family: 'Anton', sans-serif;
  font-size: 8vw;
  color: var(--color-lime-volt);
  clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0% 100%);
}

.marquee-wrapper {
  position: absolute;
  top: 15vh;
  left: 0;
  width: 100vw;
  overflow: hidden;
  white-space: nowrap;
  pointer-events: none;
  z-index: 0;
  opacity: 0.05;
  transform: rotate(-5deg) scale(1.2);
}
.marquee {
  display: inline-block;
  font-family: 'Anton', sans-serif;
  font-size: 15vw;
  line-height: 1;
  color: var(--color-forest-ink);
  will-change: transform;
}
.marquee .star {
  color: var(--color-lime-volt);
  margin: 0 4vw;
  font-size: 8vw;
  vertical-align: middle;
}

.dashboard {
  position: relative;
  z-index: 1;
  padding: 80px 40px;
  max-width: var(--page-max-width);
  margin: 0 auto;
}

.dashboard-header {
  margin-bottom: 80px;
  display: flex;
  flex-direction: column;
}
.header-reveal {
  overflow: hidden;
}
.header-title {
  font-family: 'Anton', sans-serif;
  font-size: clamp(80px, 15vw, 240px);
  line-height: 0.85;
  letter-spacing: -0.02em;
  color: var(--color-forest-ink);
  text-transform: uppercase;
  margin: 0;
}
.header-title .dot {
  color: var(--color-lime-volt);
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-flow: dense;
  gap: 24px;
  width: 100%;
  perspective: 2000px;
}

@media (max-width: 1024px) {
  .bento-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .bento-grid { grid-template-columns: 1fr; }
}

.bento-card {
  position: relative;
  border-radius: var(--radius-cards);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 40px;
  min-height: 280px;
  cursor: none;
  transform-style: preserve-3d;
  will-change: transform;
}

.bento-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bg-color);
  z-index: 0;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-card:hover::before {
  transform: scale(0.96);
  border-radius: calc(var(--radius-cards) - 10px);
}

.card-glare {
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(255,255,255,0.3) 0%, transparent 60%);
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  mix-blend-mode: overlay;
}

.bento-me { grid-column: span 2; grid-row: span 2; min-height: 584px; }
.bento-music { grid-column: span 2; grid-row: span 1; }
.bento-song { grid-column: span 1; grid-row: span 2; min-height: 584px; }
.bento-2fa { grid-column: span 1; grid-row: span 1; }
.bento-md3 { grid-column: span 2; grid-row: span 1; }
.bento-giffgaff { grid-column: span 1; grid-row: span 1; }
.bento-crypt { grid-column: span 2; grid-row: span 1; }
.bento-indy { grid-column: span 2; grid-row: span 1; }

@media (max-width: 1024px) {
  .bento-me, .bento-music, .bento-md3, .bento-crypt, .bento-indy, .bento-song {
    grid-column: span 2;
    grid-row: span 1;
    min-height: 280px;
  }
}
@media (max-width: 768px) {
  .bento-me, .bento-music, .bento-md3, .bento-crypt, .bento-indy, .bento-song {
    grid-column: span 1;
  }
}

.theme-lime { --bg-color: var(--color-lime-volt); --text-color: var(--color-forest-ink); }
.theme-cotton { --bg-color: var(--color-cotton-candy); --text-color: var(--color-aubergine-night); }
.theme-aubergine { --bg-color: var(--color-aubergine-night); --text-color: var(--color-cotton-candy); }
.theme-white { --bg-color: var(--color-fog); --text-color: var(--color-white); }
.theme-papaya { --bg-color: var(--color-papaya); --text-color: var(--color-crimson-depth); }
.theme-yellow { --bg-color: var(--color-volt-yellow); --text-color: var(--color-forest-ink); }
.theme-crimson { --bg-color: var(--color-crimson-depth); --text-color: var(--color-white); }
.theme-ink { --bg-color: var(--color-forest-ink); --text-color: var(--color-lime-volt); }

.bento-2fa { --bg-color: #f0f0f0; --text-color: var(--color-forest-ink); }

.card-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--text-color);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.card-bottom {
  position: relative;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  background: var(--text-color);
  color: var(--bg-color);
  padding: 6px 16px;
  border-radius: var(--radius-tags);
  font-size: 14px;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.5px;
}

.card-title {
  font-family: 'Anton', sans-serif;
  font-size: clamp(32px, 4vw, 58px);
  line-height: 1;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.card-desc {
  font-size: var(--text-body-sm);
  font-weight: var(--font-weight-semibold);
  opacity: 0.8;
  max-width: 80%;
}

.btn-circle {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 48px;
  height: 48px;
  background: var(--text-color);
  color: var(--bg-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0) rotate(-45deg);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-card:hover .btn-circle {
  opacity: 1;
  transform: scale(1) rotate(0);
}

.domain-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: rgba(0,0,0,0.1);
  padding: 4px;
  border-radius: 9999px;
  z-index: 10;
  pointer-events: auto;
  box-sizing: border-box;
}
.theme-lime .domain-switch { background: rgba(0,0,0,0.1); }
.theme-cotton .domain-switch { background: rgba(255,255,255,0.4); }

.switch-bg {
  position: absolute;
  top: 4px;
  left: 4px;
  height: calc(100% - 8px);
  width: calc(50% - 4px);
  background: var(--text-color);
  border-radius: 9999px;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.domain-switch.toggled .switch-bg {
  transform: translateX(100%);
}

.switch-btn {
  flex: 1 1 0;
  min-width: 64px;
  position: relative;
  z-index: 2;
  background: none;
  border: none;
  padding: 6px 14px;
  font-family: var(--font-inter);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-color);
  cursor: pointer;
  transition: color 0.3s ease;
}
.switch-btn.active {
  color: var(--bg-color);
}

.card-bg svg {
  width: 100%;
  height: 100%;
}
.bento-me .card-bg svg {
  width: 120%;
  height: 120%;
  transition: transform 10s linear;
  transform-origin: center;
  animation: spinBlob 20s infinite linear;
}
@keyframes spinBlob {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.1); }
  100% { transform: rotate(360deg) scale(1); }
}

.wave-bars {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  height: 120px;
  opacity: 0.08;
  transform: translateX(20px);
}
.wave-bars .bar {
  width: 32px;
  background: var(--text-color);
  border-radius: 16px;
  animation: wave 1.2s ease-in-out infinite alternate;
}
.wave-bars .bar:nth-child(1) { height: 40%; animation-delay: 0.0s; }
.wave-bars .bar:nth-child(2) { height: 80%; animation-delay: 0.2s; }
.wave-bars .bar:nth-child(3) { height: 100%; animation-delay: 0.4s; }
.wave-bars .bar:nth-child(4) { height: 60%; animation-delay: 0.6s; }
.wave-bars .bar:nth-child(5) { height: 30%; animation-delay: 0.8s; }
@keyframes wave {
  0% { transform: scaleY(0.4); }
  100% { transform: scaleY(1); }
}

.bento-song .card-bg {
  perspective: 1000px;
}
.petal {
  position: absolute;
  width: 40px;
  height: 40px;
  background: var(--text-color);
  border-radius: 4px 30px 4px 30px;
  opacity: 0.15;
}
.petal:nth-child(1) { top: 20%; left: 20%; transform: rotate(45deg); }
.petal:nth-child(2) { top: 60%; left: 70%; transform: rotate(15deg) scale(1.5); }
.petal:nth-child(3) { top: 80%; left: 30%; transform: rotate(-30deg) scale(0.8); }
.bento-song:hover .petal:nth-child(1) { transform: rotate(135deg) translate(20px, 20px); transition: 1s; }
.bento-song:hover .petal:nth-child(2) { transform: rotate(105deg) translate(-20px, 30px) scale(1.5); transition: 1.5s; }

.bento-2fa .ring {
  opacity: 0.1;
  width: 140%;
  height: 140%;
  transform: translate(20%, 20%);
}
.bento-2fa:hover .ring {
  transform: translate(20%, 20%) rotate(90deg);
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-giffgaff .signal {
  opacity: 0.1;
  width: 140%;
  height: 140%;
  transform: translate(15%, 15%);
}
.bento-giffgaff .signal rect {
  transform-origin: bottom;
  transition: transform 0.3s ease;
}
.bento-giffgaff:hover .signal rect:nth-child(1) { transform: scaleY(1.2); }
.bento-giffgaff:hover .signal rect:nth-child(2) { transform: scaleY(1.5); }
.bento-giffgaff:hover .signal rect:nth-child(3) { transform: scaleY(1.1); }

.crypto-matrix {
  font-family: monospace;
  font-size: 32px;
  font-weight: bold;
  opacity: 0.08;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  transform: scale(1.5) rotate(-15deg);
}
.bento-crypt:hover .crypto-matrix span {
  animation: scramble 0.5s steps(2, end) infinite;
}
@keyframes scramble {
  0% { opacity: 1; }
  50% { opacity: 0; }
  100% { opacity: 1; }
}

.md3-shapes .shape {
  position: absolute;
  background: var(--text-color);
  opacity: 0.08;
  border-radius: 30px;
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.s1 { width: 140px; height: 140px; top: -10%; right: -10%; border-radius: 50%; }
.s2 { width: 160px; height: 80px; bottom: 10%; left: -10%; }
.s3 { width: 100px; height: 100px; top: 30%; left: 30%; border-radius: 24px; }
.bento-md3:hover .s1 { transform: scale(1.5) translate(-20px, 20px); border-radius: 16px; }
.bento-md3:hover .s2 { transform: rotate(45deg) scale(1.2); border-radius: 40px; }
.bento-md3:hover .s3 { transform: scale(0.5); border-radius: 50%; }

.code-lines {
  display: flex;
  flex-direction: column;
  gap: 16px;
  opacity: 0.08;
  width: 120%;
  transform: rotate(-10deg) scale(1.2) translate(10%, 10%);
}
.code-lines .line {
  height: 12px;
  background: var(--text-color);
  border-radius: 6px;
  transition: width 0.5s ease;
}
.l1 { width: 100%; }
.l2 { width: 60%; margin-left: 40px; }
.l3 { width: 80%; }
.bento-indy:hover .l1 { width: 40%; }
.bento-indy:hover .l2 { width: 100%; margin-left: 0; }
.bento-indy:hover .l3 { width: 50%; }

.site-footer {
  text-align: center;
  padding: 40px 20px;
  font-size: 14px;
  font-weight: 600;
  opacity: 0.6;
}
.site-footer a {
  color: var(--color-forest-ink);
  text-decoration: none;
  position: relative;
  transition: opacity 0.3s ease;
}
.site-footer a:hover {
  opacity: 1;
}
.site-footer a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: var(--color-forest-ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.site-footer a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

@media (max-width: 768px) {
  .dashboard {
    padding: 32px 16px;
  }
  .dashboard-header {
    margin-bottom: 40px;
  }
  .bento-card {
    padding: 32px 24px;
    min-height: 280px;
    border-radius: 48px;
  }
  .bento-card::before {

    border-radius: 48px;
  }

  @media (hover: none) {
    .bento-card:hover::before {
      transform: none;
      border-radius: 48px;
    }
  }

  .card-title {
    font-size: clamp(40px, 10vw, 64px);
  }
  .header-title {

    font-size: clamp(60px, 20vw, 120px);
  }

  .card-bg svg {
    opacity: 0.05 !important;
    transform: scale(1.5) translate(10%, 10%) !important;
  }
  .wave-bars { opacity: 0.05; transform: scale(1.2) translateX(30px); }
  .petal { opacity: 0.1; }
  .bento-2fa .ring { opacity: 0.05; transform: scale(1.5); }
  .bento-giffgaff .signal { opacity: 0.05; transform: scale(1.5); }
  .crypto-matrix { opacity: 0.05; font-size: 20px; }
  .md3-shapes .shape { opacity: 0.05; }
  .code-lines { opacity: 0.05; transform: scale(1.5) rotate(-10deg); }
}

@media (max-width: 768px) {
  body::before {
    display: none !important;
  }
  .bento-card {
    will-change: transform, opacity;
  }
  .card-bg svg, .wave-bars .bar, .bento-giffgaff .signal, .crypto-matrix {
    animation: none !important;
  }
}


@media (max-width: 768px) {
  body {
    background-attachment: scroll !important;
  }
  .card-glare, .cursor {
    display: none !important;
  }
  
}

.contact-pill {
  position: absolute;
  bottom: 24px;
  right: 24px;
  background: var(--color-lime);
  border-radius: 64px;
  display: flex;
  align-items: center;
  padding: 8px;
  width: 56px;
  height: 56px;
  overflow: hidden;
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s, color 0.3s;
  color: var(--color-forest-ink);
  z-index: 10;
}
.contact-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.contact-icon svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s;
}
.bento-me:hover .contact-pill .contact-icon svg {
  transform: rotate(45deg);
}
.contact-text {
  white-space: nowrap;
  font-weight: 800;
  font-size: 14px;
  opacity: 0;
  padding-left: 4px;
  padding-right: 16px;
  transition: opacity 0.3s 0s;
  letter-spacing: -0.02em;
}
.bento-me:hover .contact-pill {
  width: 310px;
  background: var(--color-forest-ink);
  color: var(--color-lime);
}
.bento-me:hover .contact-pill .contact-text {
  opacity: 1;
  transition: opacity 0.3s 0.2s;
}
@media (max-width: 768px) {
  .contact-text { display: none; }
  .bento-me:hover .contact-pill { width: 56px; background: var(--color-lime); color: var(--color-forest-ink); }
}
