/* ===================================================================
   PORTFOLIO STYLESHEET - KARTHIK KADAM
   Aesthetic Reference: tedawf.com
   Clean, Minimalist, Mobile-First, Accessible Design System
   =================================================================== */

:root {
  /* HSL Color System - Light Theme Defaults */
  --bg-h: 0;
  --bg-s: 0%;
  --bg-l: 100%;
  --background: hsl(var(--bg-h), var(--bg-s), var(--bg-l));
  --foreground: hsl(240, 10%, 3.9%);

  --card: hsl(0, 0%, 100%);
  --card-foreground: hsl(240, 10%, 3.9%);

  --popover: hsl(0, 0%, 100%);
  --popover-foreground: hsl(240, 10%, 3.9%);

  --primary: hsl(240, 5.9%, 10%);
  --primary-foreground: hsl(0, 0%, 98%);

  --secondary: hsl(240, 4.8%, 95.9%);
  --secondary-foreground: hsl(240, 5.9%, 10%);

  --muted: hsl(240, 4.8%, 95.9%);
  --muted-foreground: hsl(240, 3.8%, 46.1%);

  --accent: hsl(240, 4.8%, 95.9%);
  --accent-foreground: hsl(240, 5.9%, 10%);

  --border: hsl(240, 5.9%, 90%);
  --input: hsl(240, 5.9%, 90%);
  --ring: hsl(240, 5.9%, 10%);

  --radius: 0.75rem;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;

  --card-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03);
  --card-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

/* Dark Theme Overrides */
html.dark {
  --bg-h: 240;
  --bg-s: 10%;
  --bg-l: 3.9%;
  --background: hsl(var(--bg-h), var(--bg-s), var(--bg-l));
  --foreground: hsl(0, 0%, 98%);

  --card: hsl(240, 10%, 6%);
  --card-foreground: hsl(0, 0%, 98%);

  --popover: hsl(240, 10%, 4.5%);
  --popover-foreground: hsl(0, 0%, 98%);

  --primary: hsl(0, 0%, 98%);
  --primary-foreground: hsl(240, 5.9%, 10%);

  --secondary: hsl(240, 3.7%, 14%);
  --secondary-foreground: hsl(0, 0%, 98%);

  --muted: hsl(240, 3.7%, 14%);
  --muted-foreground: hsl(240, 5%, 64.9%);

  --accent: hsl(240, 3.7%, 14%);
  --accent-foreground: hsl(0, 0%, 98%);

  --border: hsl(240, 3.7%, 16%);
  --input: hsl(240, 3.7%, 16%);
  --ring: hsl(240, 4.9%, 83.9%);

  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --card-shadow-hover: 0 12px 20px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

html.light {
  color-scheme: light;
}

body {
  min-height: 100vh;
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* Ambient Particles Background (Fixed Behind Content) */
#particles-js {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

html.light #particles-js {
  opacity: 0.45;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
}
::-webkit-scrollbar-track {
  background: var(--background);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--muted-foreground);
}

/* Layout Containers */
.main-wrapper {
  max-width: 48rem; /* 768px matching max-w-3xl on tedawf.com */
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
}

@media (min-width: 640px) {
  .main-wrapper {
    padding: 0 2rem;
  }
}

/* ===================================================================
   HEADER & NAVIGATION
   =================================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: hsla(var(--bg-h), var(--bg-s), var(--bg-l), 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background-color 0.3s ease;
}

.header-inner {
  max-width: 48rem;
  margin: 0 auto;
  padding: 0.85rem 1rem;
}

@media (min-width: 640px) {
  .header-inner {
    padding: 1.5rem 2rem;
  }
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 0.4rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  list-style: none;
  flex-shrink: 1;
  min-width: 0;
}

@media (min-width: 440px) {
  .nav-links {
    gap: 0.85rem;
  }
}

@media (min-width: 640px) {
  .nav-links {
    gap: 2rem;
  }
}

.nav-link {
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.15s ease;
  white-space: nowrap;
}

@media (min-width: 640px) {
  .nav-link {
    font-size: 0.95rem;
    font-weight: 400;
  }
}

.nav-link:hover,
.nav-link.active {
  color: var(--foreground);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .header-actions {
    gap: 0.5rem;
  }
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.375rem;
  background: transparent;
  border: none;
  color: var(--foreground);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .icon-btn {
    width: 2.25rem;
    height: 2.25rem;
  }
}

.icon-btn:hover,
.icon-btn.active {
  background-color: var(--accent);
  color: var(--foreground);
}

.icon-btn:active {
  transform: scale(0.92);
}

/* Theme Icon Visibility */
html.dark .sun-icon {
  display: block;
}
html.dark .moon-icon {
  display: none;
}

html.light .sun-icon {
  display: none;
}
html.light .moon-icon {
  display: block;
}

/* ===================================================================
   PAGE CONTENT & ARTICLE
   =================================================================== */
.page-content {
  flex-grow: 1;
}

.content-article {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 4rem;
  padding-bottom: 4rem;
}

/* ===================================================================
   HERO SECTION
   =================================================================== */
.hero-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2rem;
}

@media (min-width: 768px) {
  .hero-section {
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
  }
}

/* Photo Cards Deck (Grab & Slide Stack matching tedawf.com) */
.avatar-stack-container {
  position: relative;
  width: 175px;
  height: 255px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}

@media (min-width: 768px) {
  .avatar-stack-container {
    margin: 0 1.5rem 0 0;
  }
}

.avatar-stack {
  position: relative;
  width: 175px;
  height: 233px;
  display: grid;
  place-items: center;
}

.photo-card {
  position: absolute;
  width: 175px;
  height: 233px;
  border-radius: 0.75rem;
  overflow: hidden;
  background-color: #ffffff;
  box-shadow: 0 10px 20px -3px rgba(0, 0, 0, 0.35), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
  transform-origin: bottom center;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.35s ease, box-shadow 0.3s ease;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  cursor: grab;
  will-change: transform, opacity;
}

.photo-card.is-dragging {
  cursor: grabbing !important;
  transition: none !important;
  box-shadow: 0 20px 30px -5px rgba(0, 0, 0, 0.5);
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.deck-hint {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.675rem;
  font-weight: 500;
  color: var(--muted-foreground);
  opacity: 0.75;
  transition: opacity 0.2s ease, transform 0.2s ease;
  cursor: pointer;
  letter-spacing: 0.02em;
}

.deck-hint:hover {
  opacity: 1;
  transform: translateY(-1px);
}

/* Hero Text */
.hero-text-block {
  display: flex;
  flex-direction: column;
  max-width: 100%;
}

@media (min-width: 768px) {
  .hero-text-block {
    max-width: 28rem;
  }
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--foreground);
  line-height: 1.15;
}

@media (min-width: 640px) {
  .hero-title {
    font-size: 3rem;
  }
}

.hero-subtitle {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted-foreground);
}

@media (min-width: 640px) {
  .hero-subtitle {
    font-size: 1.05rem;
  }
}

.hero-bio {
  margin-top: 1rem;
  font-size: 0.925rem;
  color: var(--foreground);
  line-height: 1.6;
  max-width: 24rem;
}

@media (min-width: 640px) {
  .hero-bio {
    font-size: 1rem;
    max-width: 26rem;
  }
}

/* Chat Callout */
.chat-callout {
  margin-top: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  width: fit-content;
  color: var(--foreground);
  transition: opacity 0.2s ease;
}

.chat-callout:hover {
  opacity: 0.8;
}

.chat-callout-text {
  font-size: 0.925rem;
  font-weight: 600;
}

.bounce-arrow {
  animation: bounce 1.5s infinite;
  color: var(--foreground);
}

.desktop-arrow {
  display: none;
}
.mobile-arrow {
  display: block;
}

@media (min-width: 640px) {
  .desktop-arrow {
    display: block;
  }
  .mobile-arrow {
    display: none;
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

/* Hero Actions (Resume & Socials) */
.hero-actions-row {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-outline {
  border: 1px solid var(--border);
  background-color: var(--background);
  color: var(--foreground);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-outline:hover {
  background-color: var(--accent);
  color: var(--foreground);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
  border: 1px solid transparent;
  font-weight: 600;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-icon {
  margin-left: 0.25rem;
}

.social-icons-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.social-link {
  color: var(--muted-foreground);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, transform 0.15s ease;
}

.social-link:hover {
  color: var(--foreground);
  transform: translateY(-1px);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ===================================================================
   SECTION CONTAINERS & HEADERS
   =================================================================== */
.section-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.section-header {
  display: flex;
  align-items: center;
}

.section-header.justify-between {
  justify-content: space-between;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--foreground);
}

@media (min-width: 640px) {
  .section-title {
    font-size: 1.875rem;
  }
}

.view-more-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.15s ease;
}

.view-more-link:hover {
  color: var(--foreground);
}

/* ===================================================================
   WORK & EDUCATION TABS (Segmented Control + Timeline)
   =================================================================== */
.tabs-segmented-control {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  width: 100%;
  height: 2.25rem;
  background-color: var(--muted);
  border-radius: 0.5rem;
  padding: 0.25rem;
  margin-bottom: 0.5rem;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  background: transparent;
  color: var(--muted-foreground);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn.active {
  background-color: var(--background);
  color: var(--foreground);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tab-panel {
  display: none;
  animation: fadeIn 0.25s ease-in-out;
}

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

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Timeline Card */
.timeline-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: var(--card);
  color: var(--card-foreground);
  box-shadow: var(--card-shadow);
  padding: 1.25rem 1.25rem 1.25rem 0.5rem;
}

@media (min-width: 640px) {
  .timeline-card {
    padding: 1.5rem 2rem 1.5rem 1rem;
  }
}

.timeline-list {
  list-style: none;
  border-left: 1px solid var(--border);
  margin-left: 2.5rem;
  padding-left: 0;
}

@media (min-width: 640px) {
  .timeline-list {
    margin-left: 3rem;
  }
}

.timeline-item {
  position: relative;
  margin-left: 2.5rem;
  padding: 1rem 0 1.5rem 0;
}

@media (min-width: 640px) {
  .timeline-item {
    margin-left: 3rem;
  }
}

/* Avatar Badges on Timeline - Pixel-Perfect Centering on the Vertical Line */
.timeline-logo-badge {
  position: absolute;
  left: -4rem; /* -2.5rem margin - 1.5rem half-badge = -4rem */
  top: 1rem;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 2;
}

@media (min-width: 640px) {
  .timeline-logo-badge {
    left: -4.5rem; /* -3rem margin - 1.5rem half-badge = -4.5rem */
  }
}

.timeline-logo-badge:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.logo-fallback {
  display: none;
  font-weight: 700;
  font-size: 1rem;
  color: #111;
}

.timeline-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.org-title-link {
  text-decoration: none;
  width: fit-content;
}

.org-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--foreground);
  line-height: 1.2;
}

.org-title-link:hover .org-title {
  text-decoration: underline;
}

.role-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.role-group.mt-3 {
  margin-top: 0.75rem;
}

.role-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.role-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
}

.grade-badge {
  display: inline-block;
  background-color: var(--secondary);
  color: var(--foreground);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.1rem 0.5rem;
  border-radius: 0.25rem;
  margin-left: 0.35rem;
}

.role-dates {
  font-size: 0.775rem;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.location-text {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-top: -0.15rem;
}

.role-bullets {
  margin-top: 0.5rem;
  margin-left: 1.25rem;
  list-style-type: disc;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.role-bullets li {
  font-size: 0.875rem;
  color: var(--foreground);
  line-height: 1.55;
}

/* ===================================================================
   SKILLS SECTION (Categorized Tags, No Bars)
   =================================================================== */
.skills-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: var(--card);
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.skill-category {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .skill-category {
    display: grid;
    grid-template-columns: 140px 1fr;
    align-items: center;
  }
}

.skill-category-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted-foreground);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.2rem 0.55rem;
  border-radius: 0.375rem;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.tag:hover {
  transform: translateY(-1px);
  background-color: var(--accent);
}

.tag-accent {
  border-color: hsla(240, 5.9%, 40%, 0.4);
  font-weight: 600;
}

/* ===================================================================
   PROJECTS SECTION (Card Grid)
   =================================================================== */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.project-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: var(--card);
  color: var(--card-foreground);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
}

.project-image-box {
  width: 100%;
  height: 11rem;
  overflow: hidden;
  background-color: var(--muted);
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.4s ease;
}

.project-card:hover .project-img {
  transform: scale(1.04);
}

.project-body {
  padding: 1.25rem 1.25rem 0.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.project-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--foreground);
}

.project-desc {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  line-height: 1.5;
}

.project-footer {
  margin-top: auto;
  padding: 0.75rem 1.25rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.pill-tag {
  display: inline-flex;
  align-items: center;
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  font-size: 0.675rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 0.25rem;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.btn-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background-color: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 0.375rem;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.btn-badge:hover {
  opacity: 0.85;
}

/* ===================================================================
   CERTIFICATIONS & ACHIEVEMENTS
   =================================================================== */
.certifications-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: var(--card);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.cert-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.cert-item {
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.15s ease;
}

.cert-item-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.cert-item:last-child {
  border-bottom: none;
}

.cert-item:hover {
  background-color: var(--muted);
}

.cert-item-link:hover .cert-name {
  color: #3b82f6;
}

.cert-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.cert-title-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.cert-external-icon {
  color: var(--muted-foreground);
  opacity: 0.4;
  transition: all 0.2s ease;
}

.cert-item-link:hover .cert-external-icon {
  opacity: 1;
  color: #3b82f6;
  transform: translate(2px, -2px);
}

.cert-name {
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--foreground);
  transition: color 0.15s ease;
}

.cert-issuer {
  font-size: 0.775rem;
  color: var(--muted-foreground);
}

.cert-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted-foreground);
  background-color: var(--secondary);
  padding: 0.25rem 0.6rem;
  border-radius: 0.35rem;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.cert-badge-link {
  color: #3b82f6;
  background-color: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.25);
}

.cert-item-link:hover .cert-badge-link {
  background-color: #3b82f6;
  color: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
}

.cert-badge-award {
  color: #f59e0b;
  background-color: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.25);
}

/* ===================================================================
   CONTACT SECTION
   =================================================================== */
.contact-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: var(--card);
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .contact-card {
    padding: 2rem;
  }
}

.contact-subtitle {
  font-size: 0.9rem;
  color: var(--muted-foreground);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--foreground);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border-radius: 0.375rem;
  border: 1px solid var(--input);
  background-color: var(--background);
  color: var(--foreground);
  font-family: inherit;
  font-size: 0.875rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--foreground);
  box-shadow: 0 0 0 1px var(--foreground);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.form-status {
  font-size: 0.85rem;
  font-weight: 500;
}

.form-status.success {
  color: #10b981;
}

.form-status.error {
  color: #ef4444;
}

/* ===================================================================
   FOOTER
   =================================================================== */
.footer {
  width: 100%;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 48rem;
  margin: 0 auto;
  padding: 0 1.5rem 6rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row-reverse;
    padding: 0 2rem 6rem 2rem;
  }
}

.footer-socials {
  display: flex;
  gap: 1.25rem;
}

.footer-copyright p {
  font-size: 0.8rem;
  color: var(--muted-foreground);
}

/* ===================================================================
   FLOATING AI SUPPORT CHAT DRAWER & MOBILE BALL
   =================================================================== */
.chat-drawer-container {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 60;
}

@media (min-width: 640px) {
  .chat-drawer-container {
    bottom: 2rem;
    right: 2rem;
  }
}

/* Chat Ball Icon - hidden by default on desktop */
.chat-ball-icon {
  display: none;
}

.chat-drawer {
  width: 320px;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background-color: var(--background);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 640px) {
  .chat-drawer {
    width: 380px;
  }
}

.chat-drawer-header {
  width: 100%;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: none;
  cursor: pointer;
  border-bottom: 1px solid transparent;
  transition: background-color 0.15s ease;
}

.chat-drawer[data-state="open"] .chat-drawer-header {
  border-bottom-color: var(--border);
}

.chat-drawer-header:hover {
  background-color: var(--accent);
}

.chat-header-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
}

.chat-header-sub {
  font-size: 0.7rem;
  color: var(--muted-foreground);
}

.chat-header-title-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.pulse-indicator {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background-color: #10b981;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.9); }
}

.chat-header-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
}

.chevron-icon {
  color: var(--muted-foreground);
  transition: transform 0.2s ease;
}

.chat-drawer[data-state="open"] .chevron-icon {
  transform: rotate(180deg);
}

/* Expandable Drawer Body */
.chat-drawer-body {
  display: none;
  flex-direction: column;
  height: 380px;
  background-color: var(--background);
}

.chat-drawer[data-state="open"] .chat-drawer-body {
  display: flex;
}

.chat-messages {
  flex-grow: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat-msg {
  max-width: 88%;
  padding: 0.6rem 0.85rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  word-break: break-word;
}

.bot-msg {
  align-self: flex-start;
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  border: 1px solid var(--border);
}

.user-msg {
  align-self: flex-end;
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.quick-prompts {
  padding: 0.5rem 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  border-top: 1px solid var(--border);
  background-color: var(--muted);
}

.quick-btn {
  background-color: var(--background);
  color: var(--foreground);
  border: 1px solid var(--border);
  font-size: 0.6875rem;
  font-weight: 500;
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-btn:hover {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.chat-input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid var(--border);
}

.chat-input-row input {
  flex-grow: 1;
  padding: 0.45rem 0.75rem;
  border-radius: 0.375rem;
  border: 1px solid var(--input);
  background-color: var(--background);
  color: var(--foreground);
  font-size: 0.8125rem;
}

.chat-input-row input:focus {
  outline: none;
  border-color: var(--foreground);
}

.chat-send-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.375rem;
  background-color: var(--primary);
  color: var(--primary-foreground);
  border: none;
  cursor: pointer;
}

.chat-send-btn:hover {
  opacity: 0.9;
}

/* ===================================================================
   PHONE VIEW: CIRCULAR CHATBOT BALL & COMPACT MODAL DRAWER
   =================================================================== */
@media (max-width: 640px) {
  /* Closed State on Phone: Sleek Circular Floating Chatbot Ball matching Laptop Theme */
  .chat-drawer[data-state="closed"] {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 9999px;
    background-color: var(--card);
    border: 1px solid var(--border);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    animation: chatBallFloat 3s ease-in-out infinite alternate;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .chat-drawer[data-state="closed"]:hover,
  .chat-drawer[data-state="closed"]:active {
    background-color: var(--accent);
    transform: scale(1.05);
  }

  @keyframes chatBallFloat {
    0% { transform: translateY(0); }
    100% { transform: translateY(-4px); }
  }

  .chat-drawer[data-state="closed"] .chat-drawer-header {
    width: 100%;
    height: 100%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
  }

  .chat-drawer[data-state="closed"] .chat-ball-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    height: 100%;
    color: var(--foreground);
  }

  .chat-drawer[data-state="closed"] .chat-ball-icon svg {
    width: 22px;
    height: 22px;
  }

  .chat-drawer[data-state="closed"] .chat-ball-dot {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 9999px;
    background-color: #10b981;
    border: 2px solid var(--card);
    box-shadow: 0 0 6px #10b981;
  }

  .chat-drawer[data-state="closed"] .chat-header-info,
  .chat-drawer[data-state="closed"] .chevron-icon {
    display: none;
  }

  /* Open State on Phone: Clean Modal Sheet */
  .chat-drawer[data-state="open"] {
    width: calc(100vw - 2rem);
    max-width: 380px;
    border-radius: 1rem;
    background-color: var(--background);
    border: 1px solid var(--border);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08);
  }

  .chat-drawer[data-state="open"] .chat-drawer-header {
    padding: 0.85rem 1rem;
    background-color: var(--card);
    border-bottom: 1px solid var(--border);
  }

  .chat-drawer[data-state="open"] .chat-ball-icon {
    display: none;
  }

  .chat-drawer[data-state="open"] .chat-header-info {
    display: flex;
  }

  .chat-drawer[data-state="open"] .chevron-icon {
    display: block;
    width: 1.25rem;
    height: 1.25rem;
    color: var(--muted-foreground);
  }

  .chat-drawer[data-state="open"] .chat-drawer-body {
    height: 380px;
    max-height: calc(85vh - 70px);
  }
}
