/* ============================================
   TechWithVarun — style.css
   Color Palette:
     Accent:      #0A66C2 (LinkedIn Blue)
     Dark bg:     #0f1117
     Dark card:   #1a1d27
     Light bg:    #f8f9fa
     Light card:  #ffffff
   Font: Inter (Google Fonts)
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  --accent: #0A66C2;
  --accent-hover: #084d96;
  --bg: #f8f9fa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #eef0f4;
  --text: #1a1a2e;
  --text-secondary: #555770;
  --border: #dde0e7;
  --card-shadow: 0 4px 24px rgba(0, 0, 0, .08);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: .25s ease;
  --max-width: 1200px;
  --nav-height: 70px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
ul { list-style: none; }

/* ---------- Utility ---------- */
.container { width: 90%; max-width: var(--max-width); margin: 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.section { padding: 80px 0; }
.section-title { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; margin-bottom: 12px; }
.section-subtitle { color: var(--text-secondary); font-size: 1.05rem; margin-bottom: 40px; max-width: 600px; }
.text-center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .95rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  text-align: center;
  justify-content: center;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; transform: translateY(-2px); }

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

.btn-ghost {
  background: var(--bg-tertiary);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.btn-sm { padding: 8px 18px; font-size: .85rem; }

/* ---------- Navigation ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(248, 249, 250, .85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
}
.nav-logo img {
  height: 52px;
  width: auto;
  mix-blend-mode: multiply;
}
.nav-logo:hover { opacity: .85; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: .95rem;
  position: relative;
  padding: 4px 0;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}
.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: all var(--transition);
  border-radius: 2px;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile Nav */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.mobile-nav.open { opacity: 1; pointer-events: auto; }
.mobile-nav a {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
}
.mobile-nav a:hover,
.mobile-nav a.active { color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  padding-top: calc(var(--nav-height) + 60px);
  padding-bottom: 60px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
  line-height: 1.1;
}
.hero h1 .accent { color: var(--accent); }

.hero .subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 500;
}

.hero .tagline {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
  font-style: italic;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Stats Bar ---------- */
.stats-bar {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: center;
}

.stat-item h3 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--accent);
  line-height: 1.2;
}

.stat-item p {
  color: var(--text-secondary);
  font-size: .95rem;
  margin-top: 4px;
}

/* ---------- Cards Grid ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.cards-grid.cards-grid--sm {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  box-shadow: var(--card-shadow);
}
.card:hover { transform: translateY(-4px); border-color: var(--accent); }

.card-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: .9rem;
  position: relative;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  padding: 20px;
}

.card-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.4;
}

.card-body p {
  color: var(--text-secondary);
  font-size: .9rem;
  margin-bottom: 16px;
  line-height: 1.5;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.badge-youtube { background: rgba(255, 0, 0, .1); color: #ff4444; border-color: rgba(255, 0, 0, .2); }
.badge-linkedin { background: rgba(10, 102, 194, .1); color: #0A66C2; border-color: rgba(10, 102, 194, .2); }
.badge-instagram { background: rgba(225, 48, 108, .1); color: #E1306C; border-color: rgba(225, 48, 108, .2); }

.badge-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,.8);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: .75rem;
  font-weight: 600;
  border: none;
}

/* ---------- Platform Cards ---------- */
.platform-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: all var(--transition);
  box-shadow: var(--card-shadow);
}
.platform-card:hover { transform: translateY(-3px); border-color: var(--accent); }

.platform-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 1.15rem;
}

.platform-icon svg { width: 18px; height: 18px; }

.platform-icon.linkedin { background: rgba(10, 102, 194, .15); color: #0A66C2; }
.platform-icon.youtube { background: rgba(255, 0, 0, .12); color: #FF0000; }
.platform-icon.instagram { background: rgba(225, 48, 108, .12); color: #E1306C; }
.platform-icon.threads { background: rgba(0, 0, 0, .08); color: #000000; }
.platform-icon.github { background: rgba(36, 41, 47, .1); color: #24292f; }
.platform-icon.devto { background: rgba(0, 0, 0, .08); color: #0a0a0a; }
.platform-icon.hashnode { background: rgba(38, 100, 235, .12); color: #2664EB; }
.platform-icon.medium { background: rgba(0, 0, 0, .08); color: #000000; }
.platform-icon.x { background: rgba(0, 0, 0, .08); color: #000000; }
.platform-icon.calendly { background: rgba(0, 107, 255, .12); color: #006BFF; }

.platform-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 3px; }
.platform-card .handle { color: var(--text-secondary); font-size: .8rem; margin-bottom: 14px; }
.platform-card .btn-sm { padding: 6px 18px; font-size: .8rem; }

/* ---------- About Page ---------- */
.about-hero {
  padding-top: calc(var(--nav-height) + 60px);
  padding-bottom: 40px;
}
.about-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 40px;
}
.about-hero h1 .accent { color: var(--accent); }

.about-body {
  max-width: 740px;
}
.about-body p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 24px;
}
.about-body p strong {
  color: var(--text);
  font-weight: 600;
}

/* Skills / Tags */
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.skill-tag {
  padding: 8px 20px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 24px;
  font-size: .88rem;
  font-weight: 500;
  color: var(--text);
  transition: all var(--transition);
}
.skill-tag:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Content Page — Tabs ---------- */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}
.tab-btn:hover { border-color: var(--accent); color: var(--accent); }
.tab-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---------- LinkedIn Posts (list layout) ---------- */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.post-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all var(--transition);
  box-shadow: var(--card-shadow);
}
.post-item:hover { border-color: var(--accent); transform: translateY(-2px); }

.post-item h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.post-item .post-date {
  font-size: .85rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.post-item p {
  color: var(--text-secondary);
  font-size: .95rem;
  margin-bottom: 16px;
}

/* ---------- Blog ---------- */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 800px;
}

.blog-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all var(--transition);
  box-shadow: var(--card-shadow);
}
.blog-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.blog-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.blog-card h3 a { color: var(--text); }
.blog-card h3 a:hover { color: var(--accent); }

.blog-date {
  font-size: .85rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.blog-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.blog-tags span {
  padding: 3px 12px;
  border-radius: 16px;
  font-size: .75rem;
  font-weight: 600;
  background: rgba(10, 102, 194, .1);
  color: var(--accent);
  border: 1px solid rgba(10, 102, 194, .2);
}

.blog-card p {
  color: var(--text-secondary);
  font-size: .95rem;
  margin-bottom: 16px;
  line-height: 1.6;
}

/* Blog Post (post.html) */
.post-header {
  padding-top: calc(var(--nav-height) + 60px);
  padding-bottom: 20px;
  max-width: 740px;
}

.post-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 16px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-secondary);
  font-size: .9rem;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.post-content {
  max-width: 740px;
  padding-bottom: 60px;
}

.post-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 40px 0 16px;
}

.post-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 32px 0 12px;
}

.post-content p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 20px;
}

.post-content ul,
.post-content ol {
  padding-left: 24px;
  margin-bottom: 20px;
  color: var(--text-secondary);
}

.post-content li {
  margin-bottom: 8px;
  list-style: disc;
  line-height: 1.7;
}

.post-content code {
  background: var(--bg-tertiary);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: .9em;
}

.post-content pre {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  overflow-x: auto;
  margin-bottom: 24px;
}

.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 20px;
  margin: 24px 0;
  font-style: italic;
  color: var(--text-secondary);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--accent);
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

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

.form-group label {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: .95rem;
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(10, 102, 194, .15);
}

.form-group textarea { min-height: 140px; resize: vertical; }

.contact-info { display: flex; flex-direction: column; gap: 24px; }

.contact-info h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; }

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  font-size: .95rem;
  transition: color var(--transition);
}
.contact-link:hover { color: var(--accent); }
.contact-link svg { flex-shrink: 0; }

/* ---------- Footer ---------- */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 40px 0 24px;
  background: var(--bg-secondary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 24px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.footer-brand img {
  height: 40px;
  width: auto;
  opacity: .7;
}
.footer-brand p {
  color: var(--text-secondary);
  font-size: .9rem;
}

.footer-nav {
  display: flex;
  gap: 24px;
}

.footer-nav a {
  color: var(--text-secondary);
  font-size: .9rem;
  font-weight: 500;
}
.footer-nav a:hover { color: var(--accent); }

.footer-social {
  display: flex;
  gap: 16px;
  justify-self: end;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.footer-social a:hover { border-color: var(--accent); color: var(--accent); }

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: .8rem;
}

/* ---------- Focus States ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
  .footer-social { justify-self: center; }
  .footer-nav { justify-content: center; flex-wrap: wrap; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .mobile-nav { display: flex; }

  .section { padding: 60px 0; }

  .hero { padding-top: calc(var(--nav-height) + 40px); padding-bottom: 40px; }
  .hero h1 { font-size: clamp(2rem, 8vw, 3rem); }

  .stats-grid { grid-template-columns: 1fr; gap: 32px; }

  .cards-grid { grid-template-columns: 1fr; }
  .cards-grid.cards-grid--sm { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .cards-grid.cards-grid--sm { grid-template-columns: 1fr; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .hero-buttons .btn { width: 100%; max-width: 280px; }
  .tabs { flex-direction: column; }
  .tab-btn { width: 100%; text-align: center; }
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in {
  opacity: 0;
  animation: fadeInUp .6s ease forwards;
}

.animate-in:nth-child(2) { animation-delay: .1s; }
.animate-in:nth-child(3) { animation-delay: .2s; }
.animate-in:nth-child(4) { animation-delay: .3s; }
