/* ==========================================================================
   Daniel.tf — home
   A dark, glassy personal hub with an animated aurora backdrop.
   ========================================================================== */

:root {
  --bg: #05060c;
  --bg-elevated: #0a0c17;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.085);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f4fb;
  --text-soft: rgba(238, 238, 255, 0.72);
  --text-muted: rgba(226, 226, 245, 0.52);
  --violet: #9f91ff;
  --violet-strong: #7c6cf0;
  --teal: #5eead4;
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-pill: 999px;
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.05) inset;
  --shadow-hover: 0 24px 60px -24px rgba(0, 0, 0, 0.8);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --max-width: 62rem;
}

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

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body.home {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  padding: 7.5rem 1.5rem 3rem;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

::selection {
  background: rgba(159, 145, 255, 0.35);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-pill);
  background: var(--text);
  color: #0b0c16;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.25s var(--ease);
}

.skip-link:focus-visible {
  transform: translateY(0);
  outline-offset: 4px;
}

/* ==========================================================================
   Ambient backdrop
   ========================================================================== */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.6;
  will-change: transform;
}

.orb-one {
  top: -28rem;
  left: 50%;
  width: 52rem;
  height: 52rem;
  margin-left: -34rem;
  background: radial-gradient(circle, rgba(116, 96, 245, 0.6), transparent 68%);
  animation: drift 20s ease-in-out infinite;
}

.orb-two {
  right: -14rem;
  bottom: -18rem;
  width: 40rem;
  height: 40rem;
  background: radial-gradient(circle, rgba(0, 190, 150, 0.32), transparent 68%);
  animation: drift 26s ease-in-out infinite reverse;
}

.orb-three {
  bottom: 6%;
  left: -14rem;
  width: 32rem;
  height: 32rem;
  background: radial-gradient(circle, rgba(56, 132, 255, 0.28), transparent 68%);
  animation: drift 32s ease-in-out infinite;
  animation-delay: -8s;
}

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(2.5rem, 1.75rem, 0) scale(1.08);
  }
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 75% 65% at 50% 32%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(
    ellipse 75% 65% at 50% 32%,
    #000 0%,
    transparent 78%
  );
}

.noise {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   Top bar
   ========================================================================== */

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem clamp(1.25rem, 4vw, 2.5rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(5, 6, 12, 0.55);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  border-radius: 10px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9px;
  background: linear-gradient(140deg, var(--violet) 0%, #5b8def 60%, var(--teal) 130%);
  color: #0a0918;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow: 0 4px 18px -6px rgba(124, 108, 240, 0.8);
}

.brand-name {
  font-size: 0.98rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.brand-dot {
  color: var(--violet);
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.clock {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-soft);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.clock-dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0 rgba(94, 234, 212, 0.5);
  animation: heartbeat 2.6s ease-in-out infinite;
}

@keyframes heartbeat {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(94, 234, 212, 0.45);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(94, 234, 212, 0);
  }
}

.clock-zone {
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.topbar-link {
  color: var(--text-soft);
  font-size: 0.85rem;
  font-weight: 550;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.topbar-link:hover {
  color: #fff;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
  text-align: center;
  animation: rise 0.8s var(--ease) backwards;
}

.hero::before {
  content: "";
  position: absolute;
  top: 46%;
  left: 50%;
  z-index: -1;
  width: min(42rem, 95vw);
  height: 15rem;
  transform: translate(-50%, -55%);
  background: radial-gradient(
    closest-side,
    rgba(159, 145, 255, 0.2),
    transparent 72%
  );
  filter: blur(24px);
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid rgba(159, 145, 255, 0.26);
  border-radius: var(--radius-pill);
  background: rgba(159, 145, 255, 0.08);
  color: #cec7ff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.pulse {
  position: relative;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--violet);
}

.pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(159, 145, 255, 0.5);
  animation: pulse-ring 2.4s ease-out infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.6);
    opacity: 0.9;
  }
  70%,
  100% {
    transform: scale(1.7);
    opacity: 0;
  }
}

.logo {
  font-size: clamp(3.5rem, 9.5vw, 6rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.05em;
  background: linear-gradient(
    180deg,
    #ffffff 8%,
    #ded9ff 46%,
    #a99cff 82%,
    #8b7cff 100%
  );
  background-size: 100% 220%;
  background-position: 0% 0%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: shimmer 9s ease-in-out infinite;
}

.logo-accent {
  background: linear-gradient(135deg, #8ee9ff 0%, var(--teal) 52%, #b7f7d8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

@keyframes shimmer {
  0%,
  100% {
    background-position: 0% 0%;
  }
  50% {
    background-position: 0% 100%;
  }
}

.tagline {
  max-width: 33rem;
  margin: 1.25rem auto 0;
  color: var(--text-soft);
  font-size: clamp(1rem, 1.9vw, 1.14rem);
  line-height: 1.6;
  letter-spacing: 0.005em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.82rem 1.4rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 0.25s var(--ease),
    background-color 0.25s var(--ease),
    border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.btn svg {
  width: 1.05rem;
  height: 1.05rem;
  transition: transform 0.25s var(--ease);
}

.btn-primary {
  background: linear-gradient(135deg, #8b7cff 0%, #6d5ce8 55%, #5b7cf0 100%);
  color: #fff;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.24) inset,
    0 14px 34px -14px rgba(124, 108, 240, 0.9);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.28) inset,
    0 20px 42px -14px rgba(124, 108, 240, 1);
}

.btn-primary:hover svg {
  transform: translateX(3px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   Bento grid
   ========================================================================== */

.bento {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.card {
  --accent: var(--violet);
  --accent-soft: rgba(159, 145, 255, 0.14);
  --accent-border: rgba(159, 145, 255, 0.28);

  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 10.5rem;
  padding: 1.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(10, 12, 23, 0.55);
  color: var(--text);
  text-decoration: none;
  text-align: left;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
  isolation: isolate;
  transition:
    transform 0.35s var(--ease),
    border-color 0.35s var(--ease),
    background-color 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
  animation: rise 0.8s var(--ease) backwards;
}

.card > * {
  position: relative;
  z-index: 1;
}

/* Cursor-following spotlight */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: radial-gradient(
    340px circle at var(--mx, 50%) var(--my, 0%),
    rgba(159, 145, 255, 0.16),
    transparent 62%
  );
  background: radial-gradient(
    340px circle at var(--mx, 50%) var(--my, 0%),
    color-mix(in srgb, var(--accent) 16%, transparent),
    transparent 62%
  );
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}

/* Gradient border on hover */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(
    140deg,
    rgba(159, 145, 255, 0.65),
    rgba(159, 145, 255, 0.05) 42%,
    rgba(94, 234, 212, 0.4)
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  pointer-events: none;
}

.card:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: var(--shadow-hover);
}

.card:hover::before,
.card:hover::after {
  opacity: 1;
}

.card:active {
  transform: translateY(-1px) scale(0.995);
}

.card:nth-child(1) {
  animation-delay: 0.05s;
}
.card:nth-child(2) {
  animation-delay: 0.12s;
}
.card:nth-child(3) {
  animation-delay: 0.19s;
}
.card:nth-child(4) {
  animation-delay: 0.26s;
}
.card:nth-child(5) {
  animation-delay: 0.33s;
}

/* Per-card accents */
.card:nth-child(2) {
  --accent: #fbbf24;
  --accent-soft: rgba(251, 191, 36, 0.13);
  --accent-border: rgba(251, 191, 36, 0.28);
}
.card:nth-child(3) {
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.13);
  --accent-border: rgba(56, 189, 248, 0.28);
}
.card:nth-child(4) {
  --accent: #fb7185;
  --accent-soft: rgba(251, 113, 133, 0.13);
  --accent-border: rgba(251, 113, 133, 0.28);
}
.card:nth-child(5) {
  --accent: var(--teal);
  --accent-soft: rgba(94, 234, 212, 0.13);
  --accent-border: rgba(94, 234, 212, 0.28);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 1.15rem;
}

.card-icon {
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  border: 1px solid var(--accent-border);
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent);
  transition:
    transform 0.35s var(--ease),
    background-color 0.35s var(--ease),
    border-color 0.35s var(--ease);
}

.card-icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

.card:hover .card-icon {
  transform: scale(1.06) rotate(-3deg);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 20%, transparent);
}

.card-text {
  margin-top: auto;
}

.card-title {
  font-size: 1.06rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.card-sub {
  margin-top: 0.28rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.chip {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chip-violet {
  border: 1px solid rgba(159, 145, 255, 0.32);
  background: rgba(159, 145, 255, 0.14);
  color: #d5cfff;
}

.chip-teal {
  border: 1px solid rgba(94, 234, 212, 0.32);
  background: rgba(94, 234, 212, 0.13);
  color: #b8fff3;
}

.arrow {
  position: absolute;
  top: 1.35rem;
  right: 1.35rem;
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  opacity: 0.75;
  transition:
    transform 0.35s var(--ease),
    opacity 0.35s var(--ease),
    color 0.35s var(--ease),
    border-color 0.35s var(--ease),
    background-color 0.35s var(--ease);
}

.arrow svg {
  width: 0.95rem;
  height: 0.95rem;
}

.card:hover .arrow {
  transform: translateX(3px);
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent);
  opacity: 1;
}

/* Featured card */
.card--featured {
  grid-column: 1 / -1;
  min-height: 15rem;
  padding: clamp(1.5rem, 3vw, 2.1rem);
  background:
    radial-gradient(
      120% 160% at 100% 0%,
      rgba(159, 145, 255, 0.16),
      transparent 55%
    ),
    linear-gradient(150deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)),
    rgba(10, 12, 23, 0.6);
}

.card--featured .card-body {
  max-width: 27rem;
}

.card--featured .card-title {
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  letter-spacing: -0.03em;
}

.card--featured .card-sub {
  margin-top: 0.45rem;
  font-size: 0.93rem;
}

.card--featured .arrow {
  top: auto;
  right: 1.6rem;
  bottom: 1.6rem;
}

.card-art {
  position: absolute;
  top: 50%;
  right: 4%;
  z-index: 0;
  display: grid;
  place-items: center;
  width: 19rem;
  height: 19rem;
  transform: translateY(-50%);
  color: rgba(196, 189, 255, 0.85);
  opacity: 0.55;
  transition:
    transform 0.6s var(--ease),
    opacity 0.6s var(--ease);
}

.card-art svg {
  position: relative;
  z-index: 1;
  width: 8rem;
  height: 8rem;
  filter: drop-shadow(0 10px 30px rgba(124, 108, 240, 0.5));
}

.card-art .ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(159, 145, 255, 0.2);
}

.ring-one {
  inset: 15%;
  background: radial-gradient(
    circle,
    rgba(159, 145, 255, 0.13),
    transparent 70%
  );
}

.ring-two {
  inset: 0;
  border-style: dashed;
  border-color: rgba(94, 234, 212, 0.14);
  animation: spin 46s linear infinite;
}

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

.card--featured:hover .card-art {
  transform: translateY(-50%) scale(1.05);
  opacity: 0.8;
}

/* Share card */
.card--share {
  background:
    radial-gradient(
      100% 180% at 0% 0%,
      rgba(94, 234, 212, 0.16),
      transparent 55%
    ),
    linear-gradient(150deg, rgba(94, 234, 212, 0.09), rgba(255, 255, 255, 0.02)),
    rgba(8, 16, 20, 0.55);
  border-color: rgba(94, 234, 212, 0.18);
}

.card--share .card-body {
  flex-direction: column;
  align-items: flex-start;
  gap: 1.15rem;
}

.card--share .card-text {
  margin-top: auto;
}

.card--share .chip {
  margin-left: 0;
}

.card--share .card-sub {
  color: rgba(190, 255, 246, 0.6);
}

.card--share:hover {
  border-color: transparent;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.credits {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  color: var(--text-muted);
  font-size: 0.82rem;
  animation: rise 0.8s var(--ease) 0.45s backwards;
}

.credits-sep {
  opacity: 0.5;
}

.credits a {
  color: var(--violet);
  font-weight: 550;
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color 0.2s var(--ease);
}

.credits a:hover {
  color: #fff;
  text-decoration: underline;
}

/* ==========================================================================
   Motion
   ========================================================================== */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 760px) {
  body.home {
    padding-top: 6.75rem;
  }

  .bento {
    grid-template-columns: minmax(0, 1fr);
  }

  .card,
  .card--featured,
  .card--share {
    grid-column: 1 / -1;
  }

  .card {
    min-height: 9.5rem;
  }

  .card-art {
    right: -3rem;
    width: 16rem;
    height: 16rem;
    opacity: 0.35;
  }

  .card-art svg {
    width: 6.5rem;
    height: 6.5rem;
  }
}

@media (max-width: 520px) {
  body.home {
    padding-right: 1.1rem;
    padding-left: 1.1rem;
  }

  .topbar {
    padding: 0.8rem 1.1rem;
  }

  .topbar-link {
    display: none;
  }

  .logo {
    letter-spacing: -0.045em;
  }

  .tagline-break {
    display: none;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .card--featured {
    min-height: 14rem;
  }

  .card--featured .card-art {
    top: 1.5rem;
    right: -4.5rem;
    width: 13rem;
    height: 13rem;
    transform: none;
  }

  .card--featured:hover .card-art {
    transform: scale(1.04);
  }

  .card--share .card-body {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
  }

  .card--share .chip {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .card:hover {
    transform: none;
  }
}
