/* ============================================================
   anirudh.ai — shared design system
   Dark "precision engineering" aesthetic
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --bg:        #07090e;
  --bg-2:      #0b0f17;
  --surface:   #11161f;
  --surface-2: #161c28;
  --border:    rgba(255,255,255,.08);
  --border-2:  rgba(255,255,255,.14);

  --text:      #e8eef6;
  --muted:     #9aa6b8;
  --faint:     #64708500;

  --accent:    #4f8cff;
  --accent-2:  #6f6cff;
  --accent-3:  #29d6c8;
  --accent-grad: linear-gradient(120deg,#4f8cff 0%,#6f6cff 55%,#29d6c8 120%);
  --glow:      0 0 0 1px rgba(79,140,255,.25), 0 8px 40px -8px rgba(79,140,255,.35);

  --radius:    16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --shadow:    0 12px 40px -16px rgba(0,0,0,.6);
  --maxw:      1120px;

  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body:    "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

/* ---------- Reset / base ---------- */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  letter-spacing: .005em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: rgba(79,140,255,.35); color: #fff; }

/* ---------- Ambient background ---------- */
.bg-fx { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-fx::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 50% at 15% -5%, rgba(79,140,255,.16), transparent 60%),
    radial-gradient(50% 45% at 100% 0%, rgba(111,108,255,.14), transparent 60%),
    radial-gradient(45% 40% at 85% 100%, rgba(41,214,200,.10), transparent 60%);
}
.bg-fx::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 80%);
}
.orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; animation: float 18s ease-in-out infinite; }
.orb.a { width: 380px; height: 380px; background: #2a4cff; top: -80px; left: -60px; }
.orb.b { width: 320px; height: 320px; background: #29d6c8; bottom: -100px; right: -40px; animation-delay: -6s; }
@keyframes float { 0%,100%{ transform: translate(0,0) scale(1);} 50%{ transform: translate(30px,-20px) scale(1.08);} }
@media (prefers-reduced-motion: reduce){ .orb{ animation:none; } html{ scroll-behavior:auto; } }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
section { padding: 92px 0; }
.section-eyebrow {
  font-family: var(--font-mono); font-size: .78rem; letter-spacing: .22em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
  display: inline-flex; align-items: center; gap: 10px;
}
.section-eyebrow::before { content:""; width: 26px; height: 1px; background: var(--accent); opacity:.6; }
.section-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.7rem,3.4vw,2.5rem); line-height: 1.12; letter-spacing:-.02em; }
.section-head { margin-bottom: 48px; max-width: 720px; }
.section-head p { color: var(--muted); margin-top: 14px; font-size: 1.05rem; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(7,9,14,.62);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; font-size: 1.02rem; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: var(--accent-grad); color: #fff; font-weight: 700; font-size: .82rem;
  box-shadow: var(--glow);
}
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  font-size: .92rem; color: var(--muted); padding: 8px 14px; border-radius: 9px;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,.05); }
.nav-links a.active { color: var(--text); background: rgba(79,140,255,.12); }
.nav-toggle { display: none; background: none; border: 1px solid var(--border-2); color: var(--text); width: 40px; height: 40px; border-radius: 10px; cursor: pointer; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: .95rem;
  padding: 13px 22px; border-radius: 12px; cursor: pointer; border: 1px solid transparent;
  transition: transform .18s ease, box-shadow .25s ease, background .2s, border-color .2s;
  font-family: var(--font-body);
}
.btn-primary { background: var(--accent-grad); color: #fff; box-shadow: 0 10px 30px -10px rgba(79,140,255,.6); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -10px rgba(79,140,255,.75); }
.btn-ghost { background: rgba(255,255,255,.04); border-color: var(--border-2); color: var(--text); }
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--accent); background: rgba(79,140,255,.08); }

/* ---------- Hero ---------- */
.hero { padding: clamp(70px,11vw,140px) 0 80px; position: relative; }
.hero .badge {
  display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-mono);
  font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  border: 1px solid var(--border-2); padding: 7px 14px; border-radius: 999px; margin-bottom: 26px;
  background: rgba(255,255,255,.03);
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-3); box-shadow: 0 0 10px var(--accent-3); }
.hero h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.6rem,7vw,4.7rem); line-height: 1.02; letter-spacing: -.035em; }
.grad-text { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lede { color: var(--muted); font-size: clamp(1.05rem,2vw,1.32rem); margin-top: 22px; max-width: 620px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }

/* ---------- Grid helpers ---------- */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2,1fr); }
.grid-3 { grid-template-columns: repeat(3,1fr); }
.grid-4 { grid-template-columns: repeat(4,1fr); }

/* ---------- Cards ---------- */
.card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 26px;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
  position: relative; overflow: hidden;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-2); box-shadow: var(--shadow); }
.card h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.18rem; letter-spacing: -.01em; }
.card p { color: var(--muted); font-size: .97rem; margin-top: 8px; }

/* credential highlight card */
.cred {
  display: flex; align-items: center; gap: 16px; padding: 20px 22px;
  background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm); transition: transform .2s, border-color .2s, background .2s;
}
.cred:hover { transform: translateX(4px); background: var(--surface-2); }
.cred .num { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.cred .num.big { font-size: 1.6rem; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* feature icon card */
.feat .ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: rgba(79,140,255,.12); border: 1px solid rgba(79,140,255,.25); color: var(--accent); margin-bottom: 16px; }
.feat .ic svg { width: 22px; height: 22px; }

/* list with arrow markers */
.arrow-list { list-style: none; display: grid; gap: 2px; }
.arrow-list li { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--border); color: var(--text); font-size: 1rem; }
.arrow-list li::before { content: "▸"; color: var(--accent); font-size: .9rem; }
.arrow-list li:last-child { border-bottom: none; }

/* ---------- Tech pills (with devicon) ---------- */
.tech-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono);
  font-size: .8rem; padding: 7px 13px; border-radius: 999px;
  background: rgba(255,255,255,.04); border: 1px solid var(--border-2); color: var(--text);
  transition: transform .18s, border-color .18s, background .18s;
}
.pill:hover { transform: translateY(-2px); border-color: var(--accent); background: rgba(79,140,255,.1); }
.pill i { font-size: 1.05rem; line-height: 1; }
.pill .swatch { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }

/* ---------- Stat / metric ---------- */
.metric { text-align: center; padding: 30px 18px; }
.metric .v { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.2rem,5vw,3.1rem); background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.metric .l { color: var(--muted); font-size: .9rem; margin-top: 10px; font-family: var(--font-mono); letter-spacing: .04em; }

/* ---------- Timeline (experience) ---------- */
.timeline { position: relative; display: grid; gap: 22px; }
.tl-item {
  position: relative; padding: 26px 26px 26px 30px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
  border: 1px solid var(--border); border-radius: var(--radius);
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.tl-item:hover { transform: translateY(-3px); border-color: var(--border-2); box-shadow: var(--shadow); }
.tl-item::before { content:""; position: absolute; left: 0; top: 26px; bottom: 26px; width: 3px; border-radius: 3px; background: var(--accent-grad); }
.tl-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.tl-role { font-family: var(--font-display); font-weight: 600; font-size: 1.22rem; letter-spacing: -.01em; }
.tl-meta { color: var(--accent); font-weight: 600; font-size: .92rem; }
.tl-when { font-family: var(--font-mono); font-size: .8rem; color: var(--muted); white-space: nowrap; }
.tl-item p { color: var(--muted); margin-top: 12px; font-size: .98rem; }

/* ---------- Profile header ---------- */
.phead { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.avatar { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-grad); font-family: var(--font-display); font-weight: 700; font-size: 2rem; color: #fff; box-shadow: var(--glow); flex-shrink: 0; }
.phead .handle { font-family: var(--font-mono); color: var(--accent); font-size: .95rem; }
.phead h1 { font-family: var(--font-display); font-size: clamp(2rem,5vw,3rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.05; }
.phead .bio { color: var(--muted); margin-top: 12px; max-width: 720px; }

/* ---------- Table ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tbl td, .tbl th { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.tbl tr:hover td { background: rgba(255,255,255,.025); }
.tbl .yr { font-family: var(--font-mono); color: var(--muted); text-align: right; white-space: nowrap; }
.tbl .ev { color: var(--muted); }
.tbl .res { font-weight: 600; }

/* status chip */
.chip { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: .74rem; letter-spacing:.08em; text-transform: uppercase; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--border-2); color: var(--muted); }
.chip.warn { color: #ffcf6b; border-color: rgba(255,207,107,.35); background: rgba(255,207,107,.08); }
.chip.live { color: var(--accent-3); border-color: rgba(41,214,200,.35); background: rgba(41,214,200,.08); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 48px 0; margin-top: 40px; }
.foot-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.foot-wrap .mail { font-family: var(--font-mono); color: var(--text); font-size: 1rem; }
.foot-wrap .mail:hover { color: var(--accent); }
.foot-copy { color: var(--muted); font-size: .85rem; font-family: var(--font-mono); }

/* ---------- Scroll reveal ---------- */
html.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
html.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Landing (index) ---------- */
.landing { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 40px 24px; }
.landing-inner { max-width: 640px; }
.landing .mono-tag { font-family: var(--font-mono); font-size: .8rem; letter-spacing: .25em; text-transform: uppercase; color: var(--muted); margin-bottom: 28px; }
.landing h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.8rem,9vw,5.4rem); letter-spacing: -.04em; line-height: 1; }
.landing .tagline { color: var(--muted); font-size: clamp(1.05rem,2.4vw,1.35rem); margin-top: 24px; }
.landing .contact { margin-top: 42px; display: inline-flex; flex-direction: column; align-items: center; gap: 16px; }
.landing .mailbtn { font-family: var(--font-mono); font-size: 1.05rem; }

/* ---------- Responsive ---------- */
@media (max-width: 860px){
  .grid-3,.grid-4 { grid-template-columns: repeat(2,1fr); }
  section { padding: 70px 0; }
}
@media (max-width: 600px){
  body { font-size: 16px; }
  .grid-2,.grid-3,.grid-4 { grid-template-columns: 1fr; }
  .nav-links { position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch; gap: 2px; padding: 14px 20px 22px; background: rgba(7,9,14,.96); border-bottom: 1px solid var(--border); transform: translateY(-130%); transition: transform .3s ease; }
  .nav-links.open { transform: none; }
  .nav-links a { padding: 13px 14px; }
  .nav-toggle { display: grid; place-items: center; }
  .phead { gap: 20px; }
  .avatar { width: 76px; height: 76px; font-size: 1.6rem; }
  .tl-when { width: 100%; }
}
