/* Mahesh Gareja — portfolio (2026) */

:root {
  --bg-deep: #06060a;
  --bg-elevated: rgba(18, 18, 28, 0.72);
  --stroke: rgba(255, 255, 255, 0.08);
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --accent: #7c3aed;
  --accent-soft: rgba(124, 58, 237, 0.35);
  --accent-2: #06b6d4;
  --radius-lg: 1.25rem;
  --radius-full: 9999px;
  --font-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --shadow-glow: 0 0 80px -20px rgba(124, 58, 237, 0.55);
}

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

html {
  scroll-behavior: smooth;
}

@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;
  }
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
}

/* Ambient background */
.bg-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-scene::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(124, 58, 237, 0.28), transparent 55%),
    radial-gradient(ellipse 60% 40% at 85% 15%, rgba(6, 182, 212, 0.2), transparent 50%),
    radial-gradient(ellipse 50% 35% at 50% 100%, rgba(124, 58, 237, 0.12), transparent 45%);
  animation: drift 28s ease-in-out infinite alternate;
}

.bg-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  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.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.45;
  mix-blend-mode: overlay;
}

@keyframes drift {
  from {
    transform: translate(0, 0) rotate(0deg);
  }
  to {
    transform: translate(-3%, 2%) rotate(2deg);
  }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.75rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--text);
  color: var(--bg-deep);
  border-radius: var(--radius-full);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  left: 0.75rem;
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: clamp(1.25rem, 4vw, 2.5rem);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 72rem;
  margin: 0 auto;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.65rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: -0.02em;
  box-shadow: var(--shadow-glow);
}

.brand-text {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.brand-text span {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.header-meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: right;
}

main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: clamp(2rem, 6vw, 4rem) 0;
}

.hero {
  width: 100%;
  max-width: 44rem;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--stroke);
  background: var(--bg-elevated);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  animation: fade-up 0.8s ease both;
}

.hero-badge .dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 12px var(--accent-2);
  animation: pulse 2.5s ease-in-out infinite;
}

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

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  animation: fade-up 0.8s ease 0.08s both;
}

.hero h1 .gradient {
  background: linear-gradient(120deg, #fff 0%, #c4b5fd 40%, #67e8f9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .lead {
  margin: 0 auto 2rem;
  max-width: 32rem;
  font-size: 1.05rem;
  color: var(--text-muted);
  animation: fade-up 0.8s ease 0.16s both;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2.25rem;
  animation: fade-up 0.8s ease 0.22s both;
}

.chip {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: 0.65rem;
  max-width: 36rem;
  margin: 0 auto;
  animation: fade-up 0.8s ease 0.28s both;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--stroke);
  background: var(--bg-elevated);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.social-link svg {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
  opacity: 0.9;
}

.social-link:hover {
  border-color: var(--accent-soft);
  background: rgba(124, 58, 237, 0.12);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px -16px rgba(0, 0, 0, 0.6);
}

.social-link:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

.social-link span {
  white-space: nowrap;
}

.site-footer {
  max-width: 72rem;
  margin: 0 auto;
  width: 100%;
  padding-top: 1.5rem;
  border-top: 1px solid var(--stroke);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-footer a:hover {
  color: var(--text);
  border-bottom-color: var(--accent-soft);
}

.site-footer a:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
  border-radius: 2px;
}

@media (max-width: 520px) {
  .header-meta {
    display: none;
  }

  .social-grid {
    grid-template-columns: 1fr 1fr;
  }

  .social-link span {
    font-size: 0.8rem;
  }
}
