/* ============================================================
   Parth Vashishta — personal site
   Shared styles for the landing page and the portfolio request page
   ============================================================ */

:root {
  --bg: #f7f4ee;
  --bg-soft: #ffffff;
  --text: #221d18;
  --text-muted: #756c60;
  --text-faint: #a89d8d;
  --accent: #9e1b32;
  --accent-soft: rgba(158, 27, 50, 0.08);
  --ring: rgba(158, 27, 50, 0.3);
  --card-border: rgba(34, 29, 24, 0.1);
  --danger: #b3261e;
  --success: #2f7d4f;
  --radius: 16px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  background: radial-gradient(circle at 50% 15%, #fbf9f5 0%, #f5f1e9 60%);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.brand-logo {
  /* Absolute (not fixed) so it scrolls away with the page on short
     viewports (e.g. landscape phones) instead of floating on top of
     content that scrolls underneath it. */
  position: absolute;
  top: 22px;
  left: 24px;
  z-index: 10;
  opacity: 0;
  transform: translateY(-6px);
}

body.is-loaded .brand-logo {
  animation: fadeUp 0.7s ease forwards;
  animation-delay: 0.15s;
}

.brand-logo img {
  display: block;
  height: 110px;
  width: auto;
}

@media (max-width: 560px), (max-height: 480px) {
  .brand-logo {
    top: 16px;
    left: 16px;
  }
  .brand-logo img {
    height: 76px;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

/* ---------------------------------------------------------
   Landing page
   --------------------------------------------------------- */

.landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px 56px;
  text-align: center;
}

.avatar-wrap {
  position: relative;
  width: 168px;
  height: 168px;
  opacity: 0;
  transform: scale(0.85);
}

body.is-loaded .avatar-wrap {
  animation: avatarIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.avatar-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    #6b1222,
    transparent 30%,
    transparent 70%,
    #6b1222
  );
  opacity: 0.7;
  filter: blur(0.5px);
  animation: spin 4.5s linear infinite;
}

.avatar {
  position: relative;
  width: 168px;
  height: 168px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-soft);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--card-border), 0 12px 32px rgba(34, 29, 24, 0.14);
  display: block;
}

.identity {
  margin-top: 26px;
  opacity: 0;
  transform: translateY(8px);
}

body.is-loaded .identity {
  animation: fadeUp 0.7s ease forwards;
  animation-delay: 0.55s;
}

.identity h1 {
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.identity p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
  font-weight: 400;
}

.icon-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 38px;
  flex-wrap: wrap;
}

.icon-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(14px) scale(0.9);
}

body.is-loaded .icon-link {
  animation: popIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

body.is-loaded .icon-link:nth-child(1) {
  animation-delay: 1.05s;
}
body.is-loaded .icon-link:nth-child(2) {
  animation-delay: 1.18s;
}
body.is-loaded .icon-link:nth-child(3) {
  animation-delay: 1.31s;
}

.icon-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, border-color 0.2s ease,
    background 0.2s ease;
}

.icon-circle svg {
  width: 24px;
  height: 24px;
  stroke: var(--text);
  transition: stroke 0.2s ease;
}

.icon-link:hover .icon-circle,
.icon-link:focus-visible .icon-circle {
  transform: translateY(-4px);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.icon-link:hover .icon-circle svg,
.icon-link:focus-visible .icon-circle svg {
  stroke: var(--accent);
}

.icon-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.calendly-cta {
  margin-top: 34px;
  opacity: 0;
  transform: translateY(10px);
}

body.is-loaded .calendly-cta {
  animation: fadeUp 0.6s ease forwards;
  animation-delay: 1.7s;
}

.calendly-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--bg-soft);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  transition: transform 0.2s ease, border-color 0.2s ease,
    background 0.2s ease;
}

.calendly-pill svg {
  width: 18px;
  height: 18px;
  stroke: var(--accent);
}

.calendly-pill:hover,
.calendly-pill:focus-visible {
  transform: translateY(-3px);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.site-footer {
  margin-top: 48px;
  opacity: 0;
}

body.is-loaded .site-footer {
  animation: fadeUp 0.6s ease forwards;
  animation-delay: 1.9s;
}

.site-footer p {
  margin: 0;
  color: var(--text-faint);
  font-size: 0.78rem;
}

@keyframes avatarIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes popIn {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@media (prefers-reduced-motion: reduce) {
  body.is-loaded .avatar-wrap,
  body.is-loaded .identity,
  body.is-loaded .icon-link,
  body.is-loaded .calendly-cta,
  body.is-loaded .site-footer,
  .avatar-ring {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

