/* ═══════════════════════════════════════════
   Shrinath Prabhu - Portfolio
   Light default · Dark via system preference
   ═══════════════════════════════════════════ */

/* Google Fonts loaded via <link> in HTML for performance - no @import */

/* ── Tokens ── */
:root {
  --font-heading: 'Outfit', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;

  /* Light mode */
  --bg: #fafaf9;
  --bg-card: #ffffff;
  --bg-card-hover: #f5f5f4;
  --bg-tag: #f0eeeb;
  --bg-nav: rgba(250, 250, 249, 0.85);
  --text-primary: #1a1a19;
  --text-secondary: #666;
  --text-tertiary: #888;
  --border: #e7e5e2;
  --border-light: #f0eeeb;
  --accent: #2d5be3;
  --accent-hover: #1d4ed8;
  --accent-bg: #eef2ff;
  --star: #e8a838;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
  --radius: 10px;
  --radius-sm: 6px;
  --max-w: 720px;
  --max-w-wide: 960px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e10;
    --bg-card: #1a1a1e;
    --bg-card-hover: #222226;
    --bg-tag: #27272b;
    --bg-nav: rgba(14, 14, 16, 0.88);
    --text-primary: #ededec;
    --text-secondary: #9e9e9a;
    --text-tertiary: #6b6b68;
    --border: #2a2a2e;
    --border-light: #222226;
    --accent: #6b8aff;
    --accent-hover: #8da3ff;
    --accent-bg: rgba(107, 138, 255, 0.1);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.4);
  }
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg);
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }

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

/* ── Typography ── */
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 600; line-height: 1.25; }
h1 { font-size: 2.25rem; letter-spacing: -0.03em; }
h2 { font-size: 1.5rem; letter-spacing: -0.02em; }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; }
p { color: var(--text-secondary); }

code, .mono {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--bg-tag);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ── Layout ── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.container--wide { max-width: var(--max-w-wide); margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; }
.section + .section { border-top: 1px solid var(--border-light); }

/* ── Navigation ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
.nav__inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.nav__logo {
  display: flex;
  align-items: center;
}
.nav__logo img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  transition: transform 0.2s ease;
}
.nav__logo:hover img { transform: scale(1.08); }
.nav__links { display: flex; gap: 28px; align-items: center; }
.nav__links a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}
.nav__links a:hover, .nav__links a.active { color: var(--text-primary); }
.nav__links a.active::after {
  content: '';
  position: absolute;
  bottom: -18px;
  left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

/* Mobile nav */
.nav__toggle { display: none; background: none; border: none; cursor: pointer; color: var(--text-primary); }
@media (max-width: 640px) {
  .nav__links {
    display: none;
    position: absolute;
    top: 56px; left: 0; right: 0;
    flex-direction: column;
    background: var(--bg-nav);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    gap: 12px;
  }
  .nav__links.open { display: flex; }
  .nav__links a.active::after { display: none; }
  .nav__toggle { display: block; }
}

/* ── Hero ── */
.hero { padding-top: 56px; padding-bottom: 40px; }
.hero__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}
.hero h1 { margin-bottom: 16px; }
.hero__subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.5;
  margin-top: 12px;
}
.hero__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}
.hero__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 40px;
  flex-shrink: 0;
  padding: 28px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.hero__stat-value {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.hero__stat-label {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 2px;
}
.hero__actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.status__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(34, 197, 94, 0.1);
  color: #166534;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid rgba(34, 197, 94, 0.2);
}
.status__dot {
  position: relative;
  width: 8px;
  height: 8px;
  background-color: #22c55e;
  border-radius: 50%;
}
.status__dot::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #22c55e;
  border-radius: 50%;
  z-index: -1;
  animation: status-pulse 2s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
}

@keyframes status-pulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  70% {
    transform: scale(2.5);
    opacity: 0;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
}
.btn--primary {
  background: var(--accent);
  color: #fff;
}
.btn--primary:hover { background: var(--accent-hover); color: #fff; }
.btn--secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn--secondary:hover { background: var(--bg-card-hover); color: var(--text-primary); }

/* ── Tags / Chips ── */
.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 99px;
  background: var(--bg-tag);
  color: var(--text-secondary);
}
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── Project Cards ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.project-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.project-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: inherit;
}
.project-card__title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.project-card__desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
}
.project-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
  font-size: 0.8rem;
  color: var(--text-tertiary);
}
.project-card__stat {
  display: flex;
  align-items: center;
  gap: 4px;
}
.project-card__stat .star { color: var(--star); }
.project-card__link {
  text-transform: capitalize;
  font-weight: 500;
  white-space: nowrap;
}
.project-card__link:where(:hover, :focus-visible) {
  text-decoration: underline;
}

.project-card__link::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
}


/* ── Experience Timeline ── */
.exp-item {
  padding: 24px 0;
  border-bottom: 1px solid var(--border-light);
}
.exp-item:last-child { border-bottom: none; }
.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}
.exp-company {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-primary);
}
.exp-dates {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}
.exp-role {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.exp-desc {
  font-size: 0.875rem;
  color: var(--text-tertiary);
}
.exp-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--accent-bg);
  color: var(--accent);
  margin-left: 8px;
}

/* ── Case Study (Work page) ── */
.case-study {
  padding: 48px 0;
  border-bottom: 1px solid var(--border-light);
}
.case-study:last-child { border-bottom: none; }
.case-study__header {
  margin-bottom: 32px;
}
.case-study__title {
  font-size: 1.6rem;
  margin-bottom: 12px;
}
.case-study__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-bottom: 16px;
}
.case-study__meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.case-study__body h3 {
  color: var(--text-primary);
  margin: 28px 0 12px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.case-study__body p {
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 12px;
}
.case-study__outcome {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-top: 20px;
}
.case-study__outcome p { color: var(--text-primary); font-weight: 500; font-size: 0.9rem; }
.case-study__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-weight: 600;
  font-size: 0.875rem;
}

/* ── Blog list ── */
.blog-item {
  padding: 24px 0;
  border-bottom: 1px solid var(--border-light);
}
.blog-item:last-child { border-bottom: none; }
.blog-item__title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.blog-item__desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 8px;
}
.blog-item__meta { font-size: 0.8rem; color: var(--text-tertiary); }
.blog-item__tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--accent-bg);
  color: var(--accent);
}

/* ── Resume page ── */
.resume-section { margin-bottom: 40px; }
.resume-section__title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--text-tertiary);
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}
.resume-entry { margin-bottom: 28px; }
.resume-entry__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
}
.resume-entry__company { font-weight: 600; color: var(--text-primary); }
.resume-entry__dates { font-size: 0.8rem; color: var(--text-tertiary); font-family: var(--font-mono); }
.resume-entry__role { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 8px; }
.resume-bullet {
  position: relative;
  padding-left: 16px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 8px;
}
.resume-bullet::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-tertiary);
}

/* ATS-friendly semantic list bullets */
.resume-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
}
.resume-bullets li {
  position: relative;
  padding-left: 16px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 8px;
}
.resume-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-tertiary);
}
.resume-bullets li a {
  font-weight: 500;
}

/* ── Contact page ── */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
}
.contact-item:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
  color: inherit;
}
.contact-item__icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--bg-tag);
  font-size: 1.1rem;
  flex-shrink: 0;
}
.contact-item__label { font-size: 0.8rem; color: var(--text-tertiary); }
.contact-item__value { font-weight: 500; color: var(--text-primary); font-size: 0.9rem; }

/* ── Uses page ── */
.uses-category { margin-bottom: 36px; }
.uses-category__title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.uses-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
}
.uses-item:last-child { border-bottom: none; }
.uses-item__name { font-weight: 500; color: var(--text-primary); }
.uses-item__desc { color: var(--text-tertiary); font-size: 0.85rem; text-align: right; }

/* ── Skills row ── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.skill-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.skill-group__title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.skill-group__items {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border-light);
  padding: 32px 24px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-tertiary);
}
.footer a { color: var(--text-tertiary); }
.footer a:hover { color: var(--text-primary); }
.footer__links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 12px;
}

/* ── Visually hidden (for LLM/screen reader content) ── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Fade-in animation ── */
.fade-in {
  opacity: 0;
  transform: translateY(12px);
  animation: fadeUp 0.5s ease forwards;
}
.fade-in:nth-child(2) { animation-delay: 0.08s; }
.fade-in:nth-child(3) { animation-delay: 0.16s; }
.fade-in:nth-child(4) { animation-delay: 0.24s; }
.fade-in:nth-child(5) { animation-delay: 0.32s; }
.fade-in:nth-child(6) { animation-delay: 0.40s; }

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

/* ── Page header (used on subpages) ── */
.page-header {
  padding: 48px 0 24px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 8px;
}
.page-header h1 { margin-bottom: 8px; }
.page-header p { font-size: 1rem; max-width: 560px; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero__content { flex-direction: column; gap: 24px; }
  .hero__stats { width: 100%; }
}
@media (max-width: 640px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.25rem; }
  .hero { padding-top: 40px; padding-bottom: 24px; }
  .hero__stats { gap: 12px 20px; padding: 20px; }
  .hero__stat-value { font-size: 1.25rem; }
  .section { padding: 40px 0; }
  .projects-grid { grid-template-columns: 1fr; }
  .case-study__title { font-size: 1.3rem; }
  .exp-header { flex-direction: column; gap: 2px; }
  .resume-entry__header { flex-direction: column; }
  .skills-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .uses-item { flex-direction: column; gap: 2px; }
  .uses-item__desc { text-align: left; }
}
