/* ── Reset & base ─────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --accent: #f0c0b0;
  --text: #fdf0ec;
  --text-dim: rgba(253, 240, 236, 0.848);
  --text-faint: rgba(253, 240, 236, 0.25);
  --frame-gap: 1.25rem;
  --frame-radius: 1.5rem;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

.hidden {
  display: none !important;
}

html,
body {
  width: 100%;
  min-height: 100dvh;
  background: #dedad6;
  font-family: "Figtree", sans-serif;
  cursor: none;
  overflow-y: auto;
  -webkit-font-smoothing: antialiased;
}

/* ── Card frame ───────────────────────────────────────── */
.frame {
  position: fixed;
  inset: var(--frame-gap);
  border-radius: var(--frame-radius);
  overflow: hidden;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.06),
    0 8px 32px rgba(0, 0, 0, 0.16),
    0 40px 80px rgba(0, 0, 0, 0.2);
}

/* ── Background layers ────────────────────────────────── */
.gradient-bg {
  position: absolute;
  inset: 0;
  transition: background 4s ease;
}

.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

.vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse at 50% 25%,
    transparent 40%,
    rgba(8, 4, 16, 0.55) 100%
  );
}

/* ── Header ───────────────────────────────────────────── */
.header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.75rem 2.5rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.3s var(--ease) forwards;
}

.name {
  font-family: "Figtree", sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.clock-widget {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.clock-location {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: "Outfit", sans-serif;
  font-size: 0.9rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.72);
}

/* ── Time SVG icon ────────────────────────────────────── */
.time-icon {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.time-icon svg {
  width: 16px;
  height: 16px;
  stroke: rgba(255, 255, 255, 0.7);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  overflow: visible;
}

.clock-sep {
  width: 1px;
  height: 10px;
  background: rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}

.clock-time {
  font-family: "Outfit", sans-serif;
  font-size: 0.92rem;
  font-weight: 200;
  color: rgba(255, 255, 255, 0.68);
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
}

/* ── Hero ─────────────────────────────────────────────── */
.hero {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 2.5rem;
  max-width: 980px;
}

.hero-title {
  font-family: "Outfit", sans-serif;
  font-size: clamp(2.8rem, 6.5vw, 6.5rem);
  font-weight: 300;
  color: var(--text);
  line-height: 1.08;
  letter-spacing: -0.025em;
  opacity: 0;
  animation: fadeUp 0.8s 0.65s var(--ease) forwards;
}

.typewriter-line {
  display: block;
}

#typewriter {
  color: var(--accent);
  transition: color 2s ease;
}

.type-cursor {
  display: inline-block;
  color: var(--accent);
  animation: blink 0.9s step-end infinite;
  font-weight: 200;
  margin-left: 1px;
  transition: color 2s ease;
}

.hero-sub {
  margin-top: 2rem;
  font-size: clamp(1.15rem, 1.2vw, 1rem);
  color: var(--text-dim);
  font-weight: 300;
  line-height: 1.75;
  max-width: 520px;
  opacity: 0;
  animation: fadeUp 0.7s 1s var(--ease) forwards;
}

.hero-work {
  margin-top: 0.75rem;
  font-size: clamp(1.15rem, 1.2vw, 1rem);
  color: var(--text-dim);
  font-weight: 300;
  line-height: 1.75;
  max-width: 520px;
  opacity: 0;
  animation: fadeUp 0.7s 1s var(--ease) forwards;
}

.hero-cta {
  display: flex;
  gap: 0.85rem;
  margin-top: 2.5rem;
  opacity: 0;
  animation: fadeUp 0.7s 1.2s var(--ease) forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.75rem 1.65rem;
  border-radius: 100px;
  font-family: "Outfit", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-decoration: none;
  border: none;
  cursor: none;
  transition:
    transform 0.35s var(--ease),
    box-shadow 0.35s ease,
    background 0.3s ease,
    border-color 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: rgba(255, 255, 255, 0.9);
  color: #180f1a;
}
.btn-primary:hover {
  background: #fff;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.32);
}

/* ── Footer ───────────────────────────────────────────── */
.footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: end;
  padding: 1.5rem 2.5rem;
  opacity: 0;
  animation: fadeUp 0.7s 1.5s var(--ease) forwards;
}

.scroll-hint {
  display: none;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-faint);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.scroll-line {
  width: 32px;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: "";
  position: absolute;
  inset: 0;
  left: -100%;
  width: 100%;
  background: rgba(255, 255, 255, 0.45);
  animation: scanLine 2.2s ease-in-out infinite;
}

/* ── Social icons ─────────────────────────────────────── */
.social-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.56);
  text-decoration: none;
  transition:
    color 0.3s ease,
    transform 0.3s var(--ease);
}

.social-link:hover {
  color: rgba(255, 255, 255, 0.85);
  transform: translateY(-2px);
}

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

/* ── Mode switcher (remove before launch) ────────────── */
.mode-switcher {
  position: absolute;
  bottom: 3.8rem;
  left: 50%;
  translate: -50% 0;
  z-index: 20;
  display: flex;
  gap: 0.25rem;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  padding: 0.3rem;
  opacity: 0;
  animation: fadeUp 0.7s 2s var(--ease) forwards;
}

.mode-btn {
  padding: 0.38rem 0.95rem;
  border-radius: 100px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.42);
  font-family: "Outfit", sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  cursor: none;
  transition:
    background 0.3s ease,
    color 0.3s ease;
  white-space: nowrap;
}

.mode-btn:hover {
  color: rgba(255, 255, 255, 0.85);
}
.mode-btn.active {
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
}

/* ── Custom cursor ────────────────────────────────────── */
.cursor {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  pointer-events: none;
  z-index: 9999;
  translate: -50% -50%;
  transition:
    width 0.3s ease,
    height 0.3s ease;
}

.cursor-ring {
  position: fixed;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  pointer-events: none;
  z-index: 9998;
  translate: -50% -50%;
  transition:
    width 0.3s ease,
    height 0.3s ease,
    opacity 0.3s ease;
}

/* ── Keyframes ────────────────────────────────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes scanLine {
  0% {
    left: -100%;
  }
  50% {
    left: 100%;
  }
  100% {
    left: 100%;
  }
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 768px) {
  :root {
    --frame-gap: 0.9rem;
    --frame-radius: 1.2rem;
  }
  .header {
    padding: 1.4rem 1.8rem;
  }
  .hero {
    padding: 0 1.8rem;
  }
  .footer {
    padding: 1.2rem 1.8rem;
  }
  .hero-sub {
    max-width: 100%;
  }
  .hero-work {
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  :root {
    --frame-gap: 0.5rem;
    --frame-radius: 1rem;
  }

  body {
    padding-bottom: 3rem;
    height: auto !important;
  }

  .mode-switcher {
    transform: scale(0.8);
    transform-origin: bottom center;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 1.2rem 1.4rem;
  }

  .name {
    font-size: 0.78rem;
  }

  .clock-location {
    font-size: 0.78rem;
    display: none;
  }
  .clock-time {
    font-size: 0.82rem;
  }

  .hero {
    padding: 0 1.4rem !important;
    padding-top: 7rem;
    justify-content: center;
  }

  .hero-cta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .btn {
    width: 100%;
    justify-content: center;
  }

  .footer {
    padding: 1rem 1.4rem;
    justify-content: flex-end;
  }
  .scroll-hint {
    display: none;
  }

  .mode-switcher {
    scale: 0.8;
    bottom: 2.5rem;
    max-width: calc(100% - 2rem);
  }
}

@media (max-width: 380px) {
  .hero-title {
    letter-spacing: -0.03em;
  }
  .mode-switcher {
    scale: 0.72;
    transform-origin: bottom center;
  }
  .clock-location {
    display: none;
  }
}

@media (hover: none) {
  #cursor,
  #cursorRing {
    display: none;
  }
}
