/* ============================================================
   Portfolio — Advaith
   Base: Pico CSS v2 (reset + typography)
   Custom: everything below
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ---- Tokens ---- */
:root {
  --ac:    #6366f1;
  --acl:   #818cf8;
  --acs:   #eef2ff;
  --ga:    #6366f1;
  --gb:    #06b6d4;
  --bd:    #e5e7eb;
  --bg:    #f9fafb;
  --tm:    #6b7280;
  --tb:    #374151;
  --th:    #111827;
  --r:     0.875rem;     /* card border-radius */
  --rp:    999px;        /* pill radius */
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; color: var(--tb); background: #fff; margin: 0; }

/* ============================================================
   NAV — solid white, no backdrop-filter (avoids Chrome glitch)
   ============================================================ */
header {
  background: #fff;
  border-bottom: 1px solid var(--bd);
  position: sticky;
  top: 0;
  z-index: 200;
}
header nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--ac);
  transition: color .18s;
}
.nav-brand:hover { color: var(--acl); }
.nav-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--tb);
  text-decoration: none;
  transition: color .18s;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--ac); }

/* ============================================================
   CONTAINER
   ============================================================ */
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 3rem 0 2rem;
  position: relative;
  overflow: hidden;
}

/* Dot grid background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(99,102,241,0.13) 1.5px, transparent 1.5px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 100px;
  background: linear-gradient(transparent, #fff);
  pointer-events: none;
  z-index: 1;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 3.5rem;
}

/* ---- Text side ---- */
.hero-text { flex: 1; min-width: 0; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ac);
  background: var(--acs);
  border: 1px solid #c7d2fe;
  border-radius: var(--rp);
  padding: 0.3rem 0.85rem;
  margin-bottom: 1.1rem;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--th);
  margin: 0 0 1rem;
}
.hero-title span {
  background: linear-gradient(135deg, var(--ga) 20%, var(--gb) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--tm);
  max-width: 460px;
  margin: 0 0 2rem;
}

/* ---- Buttons — must NOT stretch full width ---- */
.hero-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;    /* prevents vertical stretch */
}

.btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: auto !important;
  min-width: 0 !important;
  padding: 0.6rem 1.5rem;
  border-radius: var(--rp);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .15s, border-color .15s;
  white-space: nowrap;
  border: 2px solid transparent;
  line-height: 1;
}

.btn-primary {
  background: linear-gradient(135deg, var(--ga), var(--gb));
  color: #fff;
  box-shadow: 0 4px 14px rgba(99,102,241,0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(99,102,241,0.45); color: #fff; }

.btn-outline {
  background: #fff;
  color: var(--tb);
  border-color: var(--bd);
}
.btn-outline:hover { border-color: var(--ac); color: var(--ac); transform: translateY(-2px); }

/* ---- Photo side ---- */
.hero-photo-wrap {
  flex-shrink: 0;
  position: relative;
  width: 340px;
  height: 340px;
}

/* decorative blob */
.hero-photo-wrap::before {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 2rem;
  background: linear-gradient(135deg, rgba(99,102,241,.25), rgba(6,182,212,.15));
  filter: blur(20px);
  z-index: 0;
}

.hero-photo {
  position: relative;
  z-index: 1;
  width: 340px;
  height: 340px;
  border-radius: 1.75rem;
  object-fit: cover;
  object-position: center top;
  box-shadow:
    0 0 0 4px #fff,
    0 0 0 7px rgba(99,102,241,.35),
    0 20px 50px rgba(99,102,241,.18),
    0 6px 18px rgba(0,0,0,.08);
  display: block;
}

/* ============================================================
   SECTION CHROME
   ============================================================ */
.section { padding: 3rem 0; }
.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--th);
  margin: 0 0 1.25rem;
}

/* ============================================================
   PROJECT CARDS — index + projects page
   ============================================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

.card {
  border: 1.5px solid var(--bd);
  border-radius: var(--r);
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--tb);
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.card:hover {
  box-shadow: 0 8px 28px rgba(99,102,241,.1);
  transform: translateY(-3px);
  border-color: var(--acl);
}

.card-img {
  height: 110px;
  display: flex;
  align-items: flex-end;
  padding: 0.75rem;
}
.card-img--1 { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.card-img--2 { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
.card-img--3 { background: linear-gradient(135deg, #f59e0b, #ef4444); }

.card-img-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,.9);
}

.card-body { padding: 1rem 1.1rem; flex: 1; display: flex; flex-direction: column; gap: 0.35rem; }
.card-body h3 { font-size: 0.95rem; font-weight: 700; color: var(--th); margin: 0; }
.card-body p  { font-size: 0.82rem; color: #4b5563; line-height: 1.6; margin: 0; flex: 1; }
.card-link    { font-size: 0.82rem; font-weight: 600; color: var(--ac); margin-top: 0.5rem; }

/* tags on index cards */
.card-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.ctag {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--ac); background: var(--acs); border-radius: var(--rp);
  padding: 0.18rem 0.55rem;
}

/* ============================================================
   PROJECTS PAGE — horizontal cards with image panel
   ============================================================ */
.proj-list { display: flex; flex-direction: column; gap: 1.1rem; }

.proj-card {
  display: flex;
  border: 1.5px solid var(--bd);
  border-radius: var(--r);
  background: #fff;
  overflow: hidden;
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.proj-card:hover {
  box-shadow: 0 8px 28px rgba(99,102,241,.1);
  transform: translateY(-2px);
  border-color: var(--acl);
}

.proj-card__img {
  width: 180px;
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  padding: 0.75rem;
}
.proj-card__img--1 { background: linear-gradient(160deg, #6366f1, #8b5cf6); }
.proj-card__img--2 { background: linear-gradient(160deg, #06b6d4, #3b82f6); }
.proj-card__img--3 { background: linear-gradient(160deg, #f59e0b, #ef4444); }

.proj-card__img-label {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: rgba(255,255,255,.9); line-height: 1.5;
}

.proj-card__body  { padding: 1.1rem 1.25rem; flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 0.4rem; }
.proj-card__body h3 { font-size: 1rem; font-weight: 700; color: var(--th); margin: 0; }
.proj-card__body p  { font-size: 0.875rem; color: #4b5563; line-height: 1.65; margin: 0; flex: 1; }
.proj-card__links { display: flex; align-items: center; gap: 1rem; margin-top: 0.5rem; flex-wrap: wrap; }
.proj-card__link  { font-size: 0.85rem; font-weight: 600; color: var(--ac); text-decoration: none; }
.proj-card__link:hover { text-decoration: underline; }
.proj-card__gh    { font-size: 0.82rem; font-weight: 500; color: var(--tm); text-decoration: none; display: inline-flex; align-items: center; gap: 0.3rem; }
.proj-card__gh:hover { color: var(--th); }

/* ============================================================
   SKILLS — table layout
   ============================================================ */
.sk-table {
  border: 1.5px solid var(--bd);
  border-radius: var(--r);
  overflow: hidden;
  background: #fff;
}
.sk-row {
  display: flex;
  border-bottom: 1px solid var(--bd);
}
.sk-row:last-child { border-bottom: none; }
.sk-row:hover { background: #fafbff; }

.sk-label {
  width: 200px;
  min-width: 200px;
  padding: 0.85rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--th);
  background: var(--bg);
  border-right: 1px solid var(--bd);
  display: flex;
  align-items: center;
}

.sk-chips {
  flex: 1;
  padding: 0.7rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.sc {
  font-size: 0.775rem;
  font-weight: 500;
  white-space: nowrap;
  padding: 0.25rem 0.7rem;
  border-radius: var(--rp);
  background: #f0f4ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
  cursor: default;
  transition: background .15s, color .15s;
}
.sc:hover { background: var(--ac); color: #fff; border-color: var(--ac); }

.sc--green { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.sc--green:hover { background: #16a34a; color: #fff; border-color: #16a34a; }

/* ============================================================
   CTA STRIP — lightweight availability bar
   ============================================================ */
.cta-strip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border: 1.5px solid #bbf7d0;
  border-radius: var(--r);
  background: #f0fdf4;
  margin: 2rem 0 2.5rem;
}
.cta-strip-dot {
  width: 9px; height: 9px; border-radius: 50%; background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34,197,94,.25); flex-shrink: 0;
  animation: pulse 2s infinite;
}
.cta-strip-text { flex: 1; font-size: 0.875rem; color: #166534; font-weight: 500; }
.cta-strip-text strong { color: #14532d; }

/* ============================================================
   ABOUT page
   ============================================================ */
.about-grid { display: grid; grid-template-columns: 240px 1fr; gap: 2.5rem; align-items: start; }
.about-photo { width: 100%; border-radius: 1.25rem; object-fit: cover; box-shadow: 0 8px 32px rgba(99,102,241,.15); }
.about-lead  { font-size: 1rem; font-weight: 500; color: var(--th); line-height: 1.75; margin-bottom: 0.85rem; }
.about-list  { list-style: none; padding: 0; margin: 0; }
.about-list li { padding: 0.5rem 0; border-bottom: 1px solid #f3f4f6; font-size: 0.875rem; color: #4b5563; line-height: 1.6; }
.about-list li:last-child { border-bottom: none; }

.pill-row  { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1.1rem; }
.pill {
  display: inline-block; padding: 0.28rem 0.75rem; border-radius: var(--rp);
  font-size: 0.75rem; font-weight: 600; white-space: nowrap;
  background: linear-gradient(135deg, var(--ga), var(--gb)); color: #fff;
}

/* ============================================================
   CONTACT page
   ============================================================ */
.contact-list { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.5rem; }

.contact-card {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.25rem;
  border: 1.5px solid var(--bd); border-radius: var(--r);
  text-decoration: none; color: var(--tb); background: #fff;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.contact-card:hover { border-color: var(--ac); box-shadow: 0 4px 18px rgba(99,102,241,.1); transform: translateX(4px); color: var(--tb); }
.contact-card--li:hover { border-color: #0077b5; }
.contact-card--gh:hover { border-color: #333; }

.cc-icon {
  width: 42px; height: 42px; border-radius: 0.6rem;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  border: 1px solid var(--bd);
}
.contact-card--li .cc-icon { background: #e8f4fc; border-color: #bfdbfe; color: #0077b5; }
.contact-card--gh .cc-icon { background: #f6f8fa; border-color: #d1d5db; color: #333; }
.contact-card--em .cc-icon { background: var(--acs); border-color: #c7d2fe; color: var(--ac); }

.cc-body  { flex: 1; }
.cc-label { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--tm); }
.cc-value { font-weight: 600; font-size: 0.9rem; color: var(--th); }
.cc-note  { font-size: 0.75rem; color: var(--tm); margin-top: 0.1rem; }
.cc-arr   { font-size: 0.95rem; color: var(--tm); transition: transform .2s, color .2s; }
.contact-card:hover .cc-arr { transform: translateX(3px); color: var(--ac); }

.avail-bar {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.85rem 1rem; background: #f0fdf4;
  border: 1px solid #bbf7d0; border-radius: 0.75rem;
  font-size: 0.85rem; color: #166534;
}
.avail-dot {
  width: 9px; height: 9px; border-radius: 50%; background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34,197,94,.25); flex-shrink: 0;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 3px rgba(34,197,94,.25); }
  50%      { box-shadow: 0 0 0 6px rgba(34,197,94,.08); }
}

/* ============================================================
   PROJECT DETAIL pages
   ============================================================ */
.proj-header { border-bottom: 1px solid var(--bd); padding-bottom: 1.5rem; margin-bottom: 1.75rem; }
.back-link   { font-size: 0.82rem; color: var(--tm); text-decoration: none; }
.back-link:hover { color: var(--ac); }
.proj-tags   { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.6rem 0 0.85rem; }
.ptag {
  font-size: 0.68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--ac); background: var(--acs); border-radius: var(--rp); padding: .18rem .6rem;
}

.feature-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 0.875rem; margin: 1.25rem 0 1.75rem; }
.feature-card { padding: 1.1rem; border: 1.5px solid var(--bd); border-radius: 0.75rem; background: #fff; transition: border-color .2s, box-shadow .2s; }
.feature-card:hover { border-color: var(--acl); box-shadow: 0 4px 14px rgba(99,102,241,.07); }
.fi { font-size: 1.35rem; margin-bottom: 0.45rem; }
.feature-card h4 { font-size: 0.88rem; font-weight: 700; margin: 0 0 0.3rem; color: var(--th); }
.feature-card p  { font-size: 0.8rem; color: #4b5563; line-height: 1.55; margin: 0; }

.roadmap { display: flex; flex-direction: column; margin: 0.5rem 0 1.75rem; }
.rm-item { display: flex; gap: 1rem; padding: 0.85rem 1rem; border-left: 3px solid var(--bd); margin-left: 0.5rem; position: relative; }
.rm-item::before { content:''; position:absolute; left:-7px; top:1rem; width:11px; height:11px; border-radius:50%; background:#e5e7eb; border:2px solid #fff; box-shadow:0 0 0 2px #e5e7eb; }
.rm-done     { border-left-color: #22c55e; }
.rm-done::before     { background:#22c55e; box-shadow:0 0 0 2px #bbf7d0; }
.rm-progress { border-left-color: var(--ac); }
.rm-progress::before { background:var(--ac); box-shadow:0 0 0 2px #c7d2fe; }

.rm-status { font-size:.67rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; white-space:nowrap; min-width:72px; padding-top:0.1rem; }
.rm-done     .rm-status { color:#16a34a; }
.rm-progress .rm-status { color:var(--ac); }
.rm-item:not(.rm-done):not(.rm-progress) .rm-status { color:var(--tm); }
.rm-item div strong { font-size:.88rem; color:var(--th); display:block; margin-bottom:.18rem; }
.rm-item div p { font-size:.8rem; color:#4b5563; margin:0; line-height:1.55; }

.qex { display:flex; flex-direction:column; gap:.5rem; margin:.75rem 0 1.75rem; }
.qex-item { padding:.7rem 1rem; border:1.5px solid var(--bd); border-radius:.65rem; background:#fff; }
.qq { font-weight:600; font-size:.875rem; color:var(--th); font-style:italic; display:block; margin-bottom:.2rem; }
.qn { font-size:.75rem; color:var(--tm); font-family:monospace; }

/* ============================================================
   SHARED UTILITIES
   ============================================================ */
.page-lead  { color:var(--tm); font-size:.9rem; margin-bottom:1.75rem; }
.tag { display:inline-block; font-size:.68rem; font-weight:600; letter-spacing:.05em; text-transform:uppercase; color:var(--ac); background:var(--acs); padding:.18rem .6rem; border-radius:var(--rp); margin:.15rem .2rem .15rem 0; }
.skills-grid { display:flex; flex-wrap:wrap; gap:.4rem; margin-top:.5rem; }
.skill-chip { display:inline-block; padding:.25rem .75rem; border-radius:var(--rp); font-size:.775rem; font-weight:500; white-space:nowrap; background:#f0f4ff; color:#4338ca; border:1px solid #c7d2fe; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { text-align:center; padding:2rem 0; color:var(--tm); font-size:.82rem; border-top:1px solid var(--bd); margin-top:3rem; }
.site-footer a { color:#6b7280; text-decoration:none; }
.site-footer a:hover { color:var(--ac); }

/* ============================================================
   FADE-IN
   ============================================================ */
@keyframes fadeUp { from{opacity:0;transform:translateY(14px)} to{opacity:1;transform:translateY(0)} }
.fade-up { animation: fadeUp .45s ease both; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .hero-inner { flex-direction: column-reverse; gap: 2rem; text-align: center; }
  .hero-sub   { margin-left: auto; margin-right: auto; }
  .hero-btns  { justify-content: center; }
  .hero-photo-wrap, .hero-photo { width: 220px; height: 220px; }
  .card-grid  { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 200px; }
}
@media (max-width: 600px) {
  .hero-title { font-size: 2rem; }
  .card-grid  { grid-template-columns: 1fr; }
  .proj-card  { flex-direction: column; }
  .proj-card__img { width: 100%; height: 100px; }
  .feature-grid { grid-template-columns: 1fr; }
  .sk-row { flex-direction: column; }
  .sk-label { width: 100%; border-right: none; border-bottom: 1px solid var(--bd); }
  .rm-item { flex-direction: column; gap: .3rem; }
}
