/* ============================================================
   Abhinav Anand — Portfolio  ·  Modern dark / developer theme
   ============================================================ */

:root {
  --bg:        #0a0e14;
  --bg-alt:    #0e1420;
  --surface:   #121a26;
  --surface-2: #182231;
  --border:    #1e2a3a;
  --text:      #e6edf3;
  --muted:     #8b98a9;
  --muted-2:   #5f6d7e;
  --accent:    #4ee6a8;   /* mint-green terminal accent */
  --accent-2:  #38bdf8;   /* cyan */
  --accent-dim:#153a2e;
  --danger:    #ff6b6b;
  --radius:    14px;
  --maxw:      1080px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Subtle grid glow background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px circle at 15% 5%, rgba(78,230,168,0.07), transparent 40%),
    radial-gradient(700px circle at 90% 15%, rgba(56,189,248,0.06), transparent 45%);
  pointer-events: none;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: 0.92rem; font-weight: 500;
  padding: 12px 20px;
  border-radius: 10px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.btn--primary {
  background: var(--accent);
  color: #05130d;
  border-color: var(--accent);
  font-weight: 700;
}
.btn--primary:hover { box-shadow: 0 8px 30px rgba(78,230,168,0.25); transform: translateY(-2px); }
.btn--ghost { background: var(--surface); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn--sm { padding: 8px 14px; font-size: 0.82rem; }
.btn--lg { padding: 16px 28px; font-size: 1.05rem; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,14,20,0.72);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.brand__mark { font-family: var(--mono); color: var(--accent); font-size: 1.05rem; }
.brand__name { font-size: 0.98rem; letter-spacing: -0.01em; }
.nav__links { display: flex; gap: 28px; }
.nav__links a {
  font-size: 0.9rem; color: var(--muted); font-weight: 500;
  position: relative; transition: color .2s ease;
}
.nav__links a:hover { color: var(--text); }
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--accent); transition: width .2s ease;
}
.nav__links a:hover::after { width: 100%; }
.nav__cta { display: flex; align-items: center; gap: 12px; }
.nav__toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.4rem; cursor: pointer; }
.nav__mobile { display: none; flex-direction: column; padding: 8px 24px 16px; border-bottom: 1px solid var(--border); background: var(--bg-alt); }
.nav__mobile a { padding: 12px 0; color: var(--muted); border-bottom: 1px solid var(--border); }
.nav__mobile a:last-child { border-bottom: none; }
.nav__mobile.open { display: flex; }

/* ---------- Hero ---------- */
.hero { padding: clamp(70px, 12vw, 140px) 0 clamp(50px, 8vw, 90px); }
.hero__inner { display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center; }
.hero__photo { order: 2; }
.hero__photo img {
  width: 260px; height: 260px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--border);
  box-shadow: 0 0 0 6px rgba(78,230,168,0.08), 0 30px 60px rgba(0,0,0,0.45);
}
.hero__text { order: 1; min-width: 0; }
.hero__eyebrow { font-family: var(--mono); color: var(--accent); font-size: 0.95rem; margin-bottom: 18px; }
.blink { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero__title {
  font-size: clamp(2.6rem, 8vw, 5rem);
  font-weight: 800; letter-spacing: -0.03em; line-height: 1.02;
  background: linear-gradient(120deg, #fff 20%, var(--accent) 120%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__role {
  font-family: var(--mono);
  font-size: clamp(1rem, 3.2vw, 1.5rem);
  font-weight: 500; color: var(--muted);
  margin-top: 14px;
}
.hero__role .sep { color: var(--accent); margin: 0 6px; }
.hero__pitch { max-width: 640px; margin-top: 26px; font-size: 1.1rem; color: #c3cdd9; }
.hero__pitch strong { color: var(--text); }
.hero__meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.chip {
  font-family: var(--mono); font-size: 0.82rem; color: var(--muted);
  background: var(--surface); border: 1px solid var(--border);
  padding: 7px 14px; border-radius: 999px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero__social { display: flex; gap: 22px; margin-top: 34px; font-family: var(--mono); font-size: 0.9rem; }
.hero__social a { color: var(--muted); border-bottom: 1px solid transparent; padding-bottom: 2px; transition: color .2s, border-color .2s; }
.hero__social a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Sections ---------- */
.section { padding: clamp(60px, 9vw, 110px) 0; }
.section--alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section__kicker { font-family: var(--mono); color: var(--accent); font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 12px; }
.section__title { font-size: clamp(1.7rem, 4.5vw, 2.6rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 44px; }

/* ---------- About ---------- */
.about__grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: start; }
.about__text p { color: #c3cdd9; margin-bottom: 18px; }
.about__text strong { color: var(--text); }
.terminal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,0.35); }
.terminal__bar { display: flex; gap: 8px; padding: 14px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.terminal__bar span { width: 12px; height: 12px; border-radius: 50%; background: #33404f; }
.terminal__bar span:nth-child(1) { background: #ff5f57; }
.terminal__bar span:nth-child(2) { background: #febc2e; }
.terminal__bar span:nth-child(3) { background: #28c840; }
.terminal__body { padding: 20px; font-family: var(--mono); font-size: 0.86rem; line-height: 1.7; color: var(--accent); white-space: pre-wrap; }

/* ---------- Skills ---------- */
.skills__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.skillcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; transition: transform .2s, border-color .2s; }
.skillcard:hover { transform: translateY(-4px); border-color: var(--accent-dim); }
.skillcard h3 { font-size: 1.02rem; margin-bottom: 16px; color: var(--text); }
.skillcard h3::before { content: "▸ "; color: var(--accent); }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); padding: 5px 11px; border-radius: 7px; }
.tags--inline { margin-top: 16px; }

/* ---------- Projects ---------- */
.project--featured {
  background: linear-gradient(160deg, var(--surface) 0%, var(--bg-alt) 100%);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 36px; margin-bottom: 24px; position: relative; overflow: hidden;
}
.project--featured::before {
  content: ""; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: linear-gradient(var(--accent), var(--accent-2));
}
.project__label { font-family: var(--mono); font-size: 0.8rem; color: var(--accent); margin-bottom: 10px; }
.project__title { font-size: 1.3rem; font-weight: 700; margin-bottom: 12px; }
.project__desc { color: #c3cdd9; margin-bottom: 16px; }
.project__desc strong { color: var(--text); }
.project__highlights { list-style: none; margin-bottom: 18px; }
.project__highlights li { color: var(--muted); padding-left: 24px; position: relative; margin-bottom: 8px; font-size: 0.95rem; }
.project__highlights li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.project__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.project { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; transition: transform .2s, border-color .2s; }
.project__grid .project:hover { transform: translateY(-4px); border-color: var(--accent-dim); }
.project__links { margin-top: 16px; }
.muted { color: var(--muted-2); font-weight: 400; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; position: relative; padding-left: 8px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.timeline__item { position: relative; padding-left: 34px; padding-bottom: 34px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot { position: absolute; left: 0; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); box-shadow: 0 0 0 4px rgba(78,230,168,0.12); }
.timeline__date { font-family: var(--mono); font-size: 0.82rem; color: var(--accent); margin-bottom: 4px; }
.timeline__role { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }
.timeline__desc { color: var(--muted); font-size: 0.95rem; }

.edu { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 44px; }
.edu__item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.edu__item h3 { font-size: 1.02rem; margin-bottom: 6px; }
.edu__item p { color: var(--muted); font-size: 0.9rem; }

/* ---------- Contact ---------- */
.section--contact { text-align: center; }
.contact__lead { max-width: 560px; margin: 0 auto 30px; color: #c3cdd9; font-size: 1.08rem; }
.contact .section__title { margin-bottom: 18px; }
.contact__social { display: flex; justify-content: center; flex-wrap: wrap; gap: 26px; margin-top: 30px; font-family: var(--mono); font-size: 0.9rem; }
.contact__social a { color: var(--muted); border-bottom: 1px solid transparent; padding-bottom: 2px; transition: color .2s, border-color .2s; }
.contact__social a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 30px 0; background: var(--bg-alt); }
.footer__inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer p { font-family: var(--mono); font-size: 0.82rem; color: var(--muted-2); }
.footer__top { font-family: var(--mono); font-size: 0.82rem; color: var(--muted); }
.footer__top:hover { color: var(--accent); }

/* ---------- Reveal on scroll ---------- */
.section, .project--featured { opacity: 1; }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__toggle { display: block; }
  .hero__inner { grid-template-columns: 1fr; gap: 28px; }
  .hero__photo { order: 1; justify-self: start; }
  .hero__photo img { width: 140px; height: 140px; }
  .hero__text { order: 2; }
  .about__grid { grid-template-columns: 1fr; gap: 30px; }
  .skills__grid { grid-template-columns: repeat(2, 1fr); }
  .project__grid { grid-template-columns: 1fr; }
  .edu { grid-template-columns: 1fr; }
  .nav__cta .btn--ghost { display: none; }
}
@media (max-width: 520px) {
  .skills__grid { grid-template-columns: 1fr; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
