/* =========================================================
   ANURAG VAID — PORTFOLIO
   style.css
   Design system + sections + responsive
   ========================================================= */

/* ---------- 1. DESIGN TOKENS ---------- */
:root {
  --ink: #0F1115;
  --ink-soft: #565C6B;
  --bg: #FAFAFA;
  --paper: #FFFFFF;
  --accent: #4F46E5;
  --accent-soft: #EEF0FF;
  --border: #E7E8EC;
  --dark-section: #0F1115;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(15, 17, 21, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 17, 21, 0.06);
  --shadow-lg: 0 20px 50px rgba(15, 17, 21, 0.10);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 180ms;
  --t-base: 320ms;
}

/* ---------- 2. RESET & BASE ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: "Sora", "Space Grotesk", "Inter", sans-serif;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; color: var(--ink-soft); }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}
a:hover { color: var(--ink); }

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ---------- 3. UTILITIES ---------- */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

.section-head {
  max-width: 680px;
  margin: 0 auto 56px;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  transition: all var(--t-base) var(--ease);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--paper);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.25);
}
.btn-primary:hover {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 17, 21, 0.18);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.btn-sm { padding: 10px 18px; font-size: 0.88rem; }

/* ---------- 4. NAVIGATION ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 18px 0;
  background: transparent;
  transition: background var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease),
              padding var(--t-base) var(--ease);
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  box-shadow: var(--shadow-sm);
  padding: 12px 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wordmark {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
  position: relative;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  height: 2px; width: 0;
  background: var(--accent);
  transition: width var(--t-base) var(--ease);
}
.nav-links a:hover::after { width: 100%; }

.nav-cta { display: flex; align-items: center; gap: 8px; }

.hamburger {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  position: relative;
  transition: background var(--t-fast) var(--ease);
}
.hamburger span::before,
.hamburger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: transform var(--t-base) var(--ease);
}
.hamburger span::before { top: -7px; }
.hamburger span::after  { top: 7px; }

.hamburger.is-open span { background: transparent; }
.hamburger.is-open span::before { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span::after  { transform: translateY(-7px) rotate(-45deg); }

/* Mobile slide-in */
.mobile-menu {
  position: fixed;
  top: 0; right: 0;
  height: 100vh;
  width: min(320px, 80vw);
  background: var(--paper);
  z-index: 99;
  padding: 96px 32px 32px;
  transform: translateX(100%);
  transition: transform var(--t-base) var(--ease);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mobile-menu.is-open { transform: translateX(0); }
.mobile-menu a {
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 500;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.mobile-menu a:last-child { border-bottom: none; }

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(15, 17, 21, 0.4);
  opacity: 0;
  pointer-events: none;
  z-index: 98;
  transition: opacity var(--t-base) var(--ease);
}
.scrim.is-open { opacity: 1; pointer-events: auto; }

/* ---------- 5. HERO ---------- */
.hero {
  position: relative;
  padding: 168px 0 120px;
  overflow: hidden;
  background: var(--bg);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(15, 17, 21, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 17, 21, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 80%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  top: 10%;
  right: -10%;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.10), transparent 60%);
  filter: blur(40px);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.hero h1 {
  margin: 18px 0 24px;
}

.hero p.subtext {
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  color: var(--ink-soft);
  max-width: 640px;
  margin: 0 auto 40px;
}

.hero-ctas {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Hero fade-in (line reveal) */
.hero .reveal-line {
  display: block;
  opacity: 0;
  transform: translateY(14px);
  animation: lineIn 700ms var(--ease) forwards;
}
.hero .reveal-line:nth-child(1) { animation-delay: 80ms; }
.hero .reveal-line:nth-child(2) { animation-delay: 200ms; }
.hero .reveal-line:nth-child(3) { animation-delay: 320ms; }
.hero .reveal-line:nth-child(4) { animation-delay: 440ms; }

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

/* ---------- 6. ABOUT ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-text p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink);
}

.about-photo {
  aspect-ratio: 4 / 5;
  background: linear-gradient(135deg, var(--accent-soft), #fff);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-photo .photo-placeholder {
  color: var(--ink-soft);
  font-size: 0.9rem;
  text-align: center;
  padding: 0 24px;
}
.about-photo .photo-placeholder svg {
  margin: 0 auto 12px;
  opacity: 0.4;
}

/* ---------- 7. SERVICES ---------- */
.services {
  background: var(--paper);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
  transition: transform var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease);
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.service-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.service-card h3 { margin-bottom: 10px; }
.service-card p { margin: 0; font-size: 0.96rem; }

/* ---------- 8. WORK / PORTFOLIO ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.work-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease);
  display: flex;
  flex-direction: column;
}
.work-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.work-thumb {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--accent-soft), #f0f2ff);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border);
}
.work-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(15, 17, 21, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 17, 21, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
}

.work-body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.work-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
  align-self: flex-start;
}

.work-card h3 { margin: 4px 0 0; font-size: 1.1rem; }
.work-card p { margin: 0; font-size: 0.92rem; }

.work-link {
  margin-top: auto;
  padding-top: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
}
.work-link:hover { color: var(--ink); }
.work-link svg { transition: transform var(--t-base) var(--ease); }
.work-link:hover svg { transform: translateX(3px); }

/* ---------- 9. PROCESS ---------- */
.process {
  background: var(--paper);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}

.process-steps::before {
  content: "";
  position: absolute;
  top: 24px;
  left: 12%;
  right: 12%;
  height: 1px;
  background: var(--border);
  z-index: 0;
}

.process-step {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 8px;
}

.process-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--border);
  color: var(--accent);
  font-family: "Sora", sans-serif;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  transition: all var(--t-base) var(--ease);
}
.process-step:hover .process-num {
  background: var(--accent);
  color: var(--paper);
  border-color: var(--accent);
  transform: scale(1.05);
}

.process-step h3 { font-size: 1.05rem; margin-bottom: 6px; }
.process-step p { font-size: 0.9rem; margin: 0; }

/* ---------- 10. SKILLS ---------- */
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  max-width: 820px;
  margin: 0 auto;
}

.skill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  transition: all var(--t-base) var(--ease);
}
.skill:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.skill svg { color: var(--accent); }

/* ---------- 11. PLATFORMS ---------- */
.platforms {
  background: var(--paper);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.platforms-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.platform-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--t-base) var(--ease);
  color: var(--ink);
}
.platform-card:hover {
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  color: var(--ink);
}

.platform-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.platform-card .label {
  display: block;
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.2;
}
.platform-card .sub {
  display: block;
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 2px;
}
.platform-card .arrow {
  margin-left: auto;
  color: var(--ink-soft);
  transition: transform var(--t-base) var(--ease), color var(--t-base) var(--ease);
}
.platform-card:hover .arrow {
  color: var(--accent);
  transform: translateX(3px);
}

/* ---------- 12. CONTACT (DARK) ---------- */
.contact-dark {
  background: var(--dark-section);
  color: var(--paper);
  position: relative;
  overflow: hidden;
}

.contact-dark::before {
  content: "";
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.25), transparent 60%);
  filter: blur(60px);
  pointer-events: none;
}

.contact-dark h2 { color: var(--paper); position: relative; }
.contact-dark .section-head p { color: rgba(255, 255, 255, 0.7); }

.contact-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: start;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.02em;
}
.field input,
.field textarea {
  font: inherit;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  color: var(--paper);
  transition: border-color var(--t-base) var(--ease),
              background var(--t-base) var(--ease);
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder { color: rgba(255, 255, 255, 0.4); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.10);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 32px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--radius-md);
}

.contact-info h3 {
  color: var(--paper);
  font-size: 1.1rem;
  margin: 0 0 4px;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--paper);
  font-size: 0.95rem;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.contact-row:last-of-type { border-bottom: none; }
.contact-row svg { color: var(--accent); flex-shrink: 0; }
.contact-row a { color: var(--paper); }
.contact-row a:hover { color: var(--accent); }

.contact-meta {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 4px;
}

/* ---------- 13. FOOTER ---------- */
.footer {
  background: var(--dark-section);
  color: rgba(255, 255, 255, 0.6);
  padding: 64px 0 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer .wordmark { color: var(--paper); }
.footer-tag { font-size: 0.9rem; margin-top: 10px; }

.footer-col h4 {
  color: var(--paper);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.92rem;
}
.footer-col a:hover { color: var(--paper); }

.social-row {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.social-row a {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--paper);
  transition: all var(--t-base) var(--ease);
}
.social-row a:hover {
  background: var(--accent);
  color: var(--paper);
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 20px;
  text-align: center;
  font-size: 0.85rem;
}

/* ---------- 14. SCROLL REVEAL ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger helpers (children of a container with .stagger) */
.stagger > .reveal:nth-child(1) { transition-delay: 0ms; }
.stagger > .reveal:nth-child(2) { transition-delay: 80ms; }
.stagger > .reveal:nth-child(3) { transition-delay: 160ms; }
.stagger > .reveal:nth-child(4) { transition-delay: 240ms; }
.stagger > .reveal:nth-child(5) { transition-delay: 320ms; }
.stagger > .reveal:nth-child(6) { transition-delay: 400ms; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 15. RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .section { padding: 80px 0; }
  .hero { padding: 140px 0 96px; }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .process-steps { grid-template-columns: repeat(2, 1fr); gap: 36px 24px; }
  .process-steps::before { display: none; }
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .section { padding: 64px 0; }
  .hero { padding: 120px 0 72px; }

  .nav-links, .nav .btn { display: none; }
  .hamburger { display: flex; }

  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-photo { aspect-ratio: 3 / 4; max-width: 360px; margin: 0 auto; }

  .services-grid { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; }
  .platforms-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { width: 100%; }
  .process-steps { grid-template-columns: 1fr; }
  .service-card { padding: 26px; }
  .work-body { padding: 18px 20px 22px; }
  .contact-info { padding: 24px; }
}
