/* ================================================
   PORTFOLIO STYLES — Divyom Chaudhary
   ================================================ */

/* ---------- Custom Properties ---------- */
:root {
  /* Colors */
  --background: #f5f3ef;       /* cool-warm white */
  --foreground: #1a1714;
  --card: #faf9f6;
  --border: #e4ddd4;
  --muted: #ede9e2;
  --muted-foreground: #7a6f65;
  --primary: #E4572E;
  --primary-foreground: #fff;
  --brand-dark: #33261b;
  --k-teal: #0E7C7B;
  --k-violet: #7C5CBF;
  --k-green: #22c55e;
  --k-sky: #3E7CB1;
  --input: #d8d1c8;
  --shadow: 0 4px 24px -8px rgba(51,38,27,0.15);

  /* Typography */
  --font-body: 'Figtree', sans-serif;
  --font-display: 'Sora', sans-serif;

  /* Radius */
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;
  --radius-pill: 999px;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--background);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea { font-family: inherit; }

/* ---------- Page Background ---------- */
.page-bg {
  background:
    radial-gradient(600px 400px at 12% 0%,   rgba(242,180,65,0.10),  transparent 60%),
    radial-gradient(700px 500px at 88% 10%,   rgba(14,124,123,0.07),  transparent 60%),
    radial-gradient(700px 600px at 50% 100%,  rgba(228,87,46,0.06),   transparent 65%),
    var(--background);
  min-height: 100vh;
}
.grain::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.3;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.04'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  background: rgba(245,243,239,0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.header-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Logo */
.logo-link { display: flex; align-items: center; gap: 0.625rem; flex-shrink: 0; }
.logo-badge {
  width: 2.25rem; height: 2.25rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 0.75rem;
  background: var(--brand-dark);
  color: #fbf6ed;
  font-family: var(--font-display);
  font-weight: 700; font-size: 0.8rem;
}
.logo-text { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em; }
.logo-dot { color: var(--primary); }

/* Nav tabs */
.main-nav { margin-left: auto; display: flex; align-items: center; gap: 0.25rem; overflow-x: auto; }
.tab {
  position: relative; padding: 0.45rem 0.9rem;
  border-radius: var(--radius-pill);
  font-size: 0.875rem; font-weight: 600;
  color: var(--muted-foreground);
  transition: color 0.22s, background 0.22s;
  white-space: nowrap;
}
.tab:hover { color: var(--foreground); background: var(--muted); }
.tab.active { color: #fbf6ed; background: var(--brand-dark); }

/* Burger */
.burger {
  display: none;
  padding: 0.5rem;
  border-radius: 0.625rem;
  color: var(--foreground);
  flex-shrink: 0;
}
@media (max-width: 768px) {
  .main-nav { display: none; }
  .burger { display: flex; align-items: center; justify-content: center; margin-left: auto; }
}

/* Mobile overlay */
.mobile-overlay {
  position: fixed; inset: 0; z-index: 999;
  display: none;
}
.mobile-overlay:not([hidden]) { display: block; }
.mobile-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.5);
}
.mobile-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 84%; max-width: 320px;
  background: var(--card);
  padding: 1.25rem 1.5rem;
  display: flex; flex-direction: column; gap: 0.25rem;
  box-shadow: -8px 0 40px rgba(0,0,0,0.2);
  overflow-y: auto;
}
.mobile-close {
  align-self: flex-end; font-size: 2rem; line-height: 1;
  color: var(--foreground); margin-bottom: 0.75rem;
}
.mobile-link {
  display: block; padding: 0.875rem 0.5rem;
  font-size: 1.125rem; font-weight: 500;
  border-bottom: 1px solid var(--border);
  color: var(--foreground);
  transition: color 0.18s;
}
.mobile-link:hover { color: var(--primary); }

/* ---------- Sections ---------- */
.scroll-mt { scroll-margin-top: 5rem; }
.section-me { max-width: 72rem; margin: 0 auto; padding: 2.5rem 1rem 1rem; }
.section-work, .section-education, .section-contact, .section-resume, .section-account {
  max-width: 72rem; margin: 0 auto; padding: 4rem 1rem;
}

/* Eyebrow label */
.eyebrow {
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted-foreground); margin-bottom: 0.4rem;
}

/* Section heading */
.section-h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700; letter-spacing: -0.02em;
  margin-top: 0.5rem;
}

/* ---------- ME SECTION ---------- */
.me-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 1024px) {
  .me-grid { grid-template-columns: 1fr 1.15fr 1fr; }
}

/* Portrait (centre) */
.me-center {
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
}
.portrait-wrap { position: relative; margin-bottom: 0; }

/* Oval Frame */
.portrait-oval-frame {
  position: relative;
  width: 220px; height: 280px;
  border-radius: 50% / 40%;
  overflow: hidden;
  border: 4px solid var(--card);
  box-shadow:
    0 0 0 2px var(--border),
    0 16px 48px -12px rgba(228,87,46,0.35),
    0 4px 20px -4px rgba(51,38,27,0.2);
  background: linear-gradient(135deg, #f2b441 0%, #e4572e 100%);
}
@media (min-width: 768px) {
  .portrait-oval-frame { width: 260px; height: 330px; }
}
.portrait-img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  display: block;
}
.portrait-glow {
  position: absolute;
  inset: -1rem; border-radius: 60% / 50%;
  background: linear-gradient(135deg, rgba(242,180,65,0.30) 0%, rgba(14,124,123,0.18) 100%);
  filter: blur(20px);
  z-index: -1;
}
.location-badge {
  position: absolute; bottom: -1rem; left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--card);
  padding: 0.375rem 1rem;
  font-size: 0.75rem; font-weight: 600;
  color: var(--foreground);
  box-shadow: 0 4px 12px -4px rgba(51,38,27,0.12);
  z-index: 10;
}
.hero-name {
  margin-top: 2rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 800; letter-spacing: -0.03em;
}
.gradient-text {
  background: linear-gradient(to right, var(--brand-dark), var(--k-teal));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-bio {
  margin-top: 0.75rem; max-width: 30rem;
  font-size: 0.9375rem; line-height: 1.7;
  color: var(--muted-foreground);
}
.hero-ctas { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }

/* Buttons */
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.625rem 1.5rem; border-radius: var(--radius-pill);
  background: var(--primary); color: #fff;
  font-size: 0.875rem; font-weight: 600;
  box-shadow: 0 6px 20px -6px rgba(228,87,46,0.45);
  transition: transform 0.22s, background 0.22s;
  cursor: pointer;
}
.btn-primary:hover { transform: translateY(-2px); background: var(--brand-dark); }
.btn-outline {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.625rem 1.5rem; border-radius: var(--radius-pill);
  border: 1px solid var(--border); background: var(--card);
  font-size: 0.875rem; font-weight: 600;
  transition: border-color 0.22s, color 0.22s;
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- Featured Builds (Left) ---------- */
.me-left { display: flex; flex-direction: column; align-items: center; }
.me-left .eyebrow { margin-bottom: 1.5rem; }
.builds-container {
  position: relative; width: 18rem; height: 18rem;
  /* JS will animate the balls anti-clockwise around the triangle vertices */
}
.builds-svg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none;
}

/* Balls */
.ball {
  position: absolute;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  border-radius: var(--radius-pill);
  color: #fff; padding: 1rem; cursor: pointer;
  user-select: none;
  box-shadow: 0 12px 30px -8px rgba(51,38,27,0.4);
  transition: transform 0.3s;
  text-decoration: none;
}
.ball:hover { transform: scale(1.08); }
.ball b { font-family: var(--font-display); font-size: 0.9rem; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,0.4); }
.ball span { font-size: 0.6rem; margin-top: 2px; font-weight: 600; opacity: 0.88; }

.ball-netraflow { background: radial-gradient(circle at 32% 28%, #cf5227, #a83712 55%, #7e2410); }
.ball-levelup   { background: radial-gradient(circle at 32% 28%, #17726f, #085a59 55%, #043d3c); }
.ball-stokd     { background: radial-gradient(circle at 32% 28%, #6f52b8, #5a3f96 55%, #3d2a6b); }

/* Static positions (overridden by JS) */
#ballNetraflow { width: 7.5rem; height: 7.5rem; top: 0; left: 50%; transform: translateX(-50%); }
#ballLevelup   { width: 6.5rem; height: 6.5rem; bottom: 1rem; left: 0; }
#ballStokd     { width: 5.75rem; height: 5.75rem; bottom: 2rem; right: 0; }

/* Mobile Balls */
.mobile-balls {
  display: none;
  justify-content: center; gap: 1rem;
  margin-top: 2.5rem;
}
.mobile-balls .ball {
  position: static;
  width: 6rem; height: 6rem;
}
@media (max-width: 1023px) {
  .me-left { display: none; }
  .mobile-balls { display: flex; }
  .me-right { display: none; }
}

/* ---------- Globe (Right) ---------- */
.me-right { display: flex; flex-direction: column; align-items: center; }
.globe-wrap { width: 21rem; height: 21rem; position: relative; }
#globeCanvas { width: 100% !important; height: 100% !important; cursor: grab; }

/* ---------- Chatbot ---------- */
.chatbot-intro { max-width: 48rem; margin: 4rem auto 0; text-align: center; padding: 0 1rem; }
.chatbot-subtitle { margin-top: 0.5rem; font-size: 0.875rem; color: var(--muted-foreground); }
.chatbot-wrap { margin: 1.5rem auto 4rem; max-width: 40rem; padding: 0 1rem; }
.chatbot {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: 0 18px 50px -24px rgba(122,86,60,0.3);
  overflow: hidden;
}
.chatbot-header {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--muted);
  border-bottom: 1px solid var(--border);
}
.chatbot-avatar {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem;
  border-radius: var(--radius-pill);
  background: var(--primary); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 0.8rem;
}
.online-dot {
  position: absolute; bottom: -1px; right: -1px;
  width: 0.75rem; height: 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--k-green);
  border: 2px solid var(--muted);
}
.chatbot-name { font-family: var(--font-display); font-size: 0.875rem; font-weight: 600; }
.chatbot-sub { font-size: 0.75rem; color: var(--muted-foreground); }
.chatbot-messages {
  height: 18rem; overflow-y: auto;
  padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: 0.75rem;
  font-size: 0.875rem;
}
.msg { display: flex; }
.msg-bot { justify-content: flex-start; }
.msg-user { justify-content: flex-end; }
.msg p {
  max-width: 88%;
  border-radius: 1rem; border-bottom-left-radius: 0.25rem;
  padding: 0.625rem 1rem;
  background: var(--muted); color: var(--foreground);
  line-height: 1.55;
}
.msg-user p {
  border-radius: 1rem; border-bottom-right-radius: 0.25rem;
  background: var(--primary); color: #fff;
}
.msg-typing p { font-style: italic; opacity: 0.7; }
.chatbot-chips {
  padding: 0.5rem 1.25rem;
  display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.chip {
  font-size: 0.75rem; padding: 0.375rem 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--foreground);
  transition: border-color 0.18s, color 0.18s;
  cursor: pointer;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chatbot-form {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid var(--border);
  background: var(--background);
}
#chatInput {
  flex: 1; border-radius: var(--radius-pill);
  border: 1px solid var(--input); background: var(--card);
  padding: 0.625rem 1rem; font-size: 0.875rem;
  outline: none; transition: border-color 0.18s;
}
#chatInput:focus { border-color: var(--primary); }
.chatbot-form button[type=submit] {
  width: 2.5rem; height: 2.5rem; flex-shrink: 0;
  border-radius: var(--radius-pill);
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.18s;
}
.chatbot-form button[type=submit]:hover { background: var(--brand-dark); }

/* ---------- Projects & Skills ---------- */
.projects-grid { margin-top: 2.5rem; display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .projects-grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  display: flex; flex-direction: column;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: 0 2px 12px -4px rgba(51,38,27,0.08);
  overflow: hidden;
  transition: transform 0.25s;
}
.card:hover { transform: translateY(-4px); }

.card-media-link { display: block; }
.card-media {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: rgba(0,0,0,0.06);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s; }
.card-media:hover img { transform: scale(1.04); }
.card-media-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.25s;
}
.card-media:hover .card-media-overlay { opacity: 1; }
.github-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.92);
  color: var(--foreground);
  font-size: 0.8rem; font-weight: 600;
}
.card-body { display: flex; flex-direction: column; padding: 1.5rem; flex: 1; }
.card-stripe { height: 0.625rem; width: 3.5rem; border-radius: var(--radius-pill); }
.card-title { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; margin-top: 1rem; }
.card-meta { margin-top: 0.25rem; font-size: 0.75rem; font-weight: 500; color: var(--muted-foreground); }
.card-list { margin-top: 1rem; flex: 1; display: flex; flex-direction: column; gap: 0.625rem; font-size: 0.875rem; line-height: 1.6; color: rgba(26,23,20,0.85); }
.card-list li { display: flex; gap: 0.5rem; }
.bullet { margin-top: 0.5rem; width: 0.375rem; height: 0.375rem; border-radius: var(--radius-pill); flex-shrink: 0; }
.tags { margin-top: 1.25rem; display: flex; flex-wrap: wrap; gap: 0.375rem; }
.tag {
  border-radius: var(--radius-pill);
  background: var(--muted);
  padding: 0.25rem 0.625rem;
  font-size: 0.6875rem; font-weight: 600;
  color: rgba(26,23,20,0.75);
}

/* Under Development indicator */
.under-dev-li { display: flex; align-items: center; gap: 0.5rem; }
.bullet-green-pulse {
  width: 0.5rem; height: 0.5rem;
  border-radius: var(--radius-pill);
  background: var(--k-green);
  flex-shrink: 0;
  animation: pulse-green 1.5s infinite;
}
@keyframes pulse-green {
  0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
  50% { box-shadow: 0 0 0 5px rgba(34,197,94,0); }
}
.under-dev-text { color: var(--k-green); font-weight: 600; font-size: 0.875rem; }

/* ---------- Toolbox ---------- */
.toolbox-title {
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 700;
  margin-top: 4rem;
}
.toolbox-grid {
  margin-top: 1.5rem;
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.toolbox-card {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--card);
  padding: 1.25rem;
}
.toolbox-header { display: flex; align-items: center; gap: 0.5rem; }
.toolbox-dot { width: 0.625rem; height: 0.625rem; border-radius: var(--radius-pill); flex-shrink: 0; }
.toolbox-name { font-family: var(--font-display); font-weight: 600; font-size: 0.9rem; }
.toolbox-tags { margin-top: 0.75rem; display: flex; flex-wrap: wrap; gap: 0.375rem; }
.ttag { border-radius: var(--radius-pill); padding: 0.25rem 0.75rem; font-size: 0.75rem; font-weight: 600; }

/* Certification toolbox card (wider) */
.toolbox-cert { grid-column: span 2; }
@media (max-width: 640px) { .toolbox-cert { grid-column: span 1; } }
.cert-content { margin-top: 0.75rem; display: flex; align-items: flex-start; gap: 0.75rem; }
.cert-icon {
  font-size: 1.75rem; flex-shrink: 0;
  width: 2.75rem; height: 2.75rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 0.75rem; background: rgba(242,144,25,0.15);
}
.cert-name { font-weight: 700; font-size: 0.9rem; }
.cert-sub { font-size: 0.75rem; color: var(--muted-foreground); margin-top: 0.2rem; }
.cert-link {
  display: inline-block; margin-top: 0.5rem;
  font-size: 0.75rem; font-weight: 600;
  color: var(--brand-dark);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.7);
  padding: 0.25rem 0.75rem; border-radius: var(--radius-pill);
  transition: border-color 0.18s, color 0.18s;
}
.cert-link:hover { border-color: var(--primary); color: var(--primary); }

/* Achievements grid */
.achieve-grid { margin-top: 2.5rem; display: grid; gap: 1rem; }
@media (min-width: 768px) { .achieve-grid { grid-template-columns: 1fr 1fr; } }
.achieve-card {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--card);
  padding: 1.5rem;
  display: flex; flex-direction: column; gap: 0.75rem;
}
.achieve-cert { background: linear-gradient(135deg, var(--card), rgba(242,180,65,0.1)); }
.achieve-icon {
  width: 2.75rem; height: 2.75rem;
  border-radius: 0.75rem; font-size: 1.5rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-weight: 700; font-size: 0.9rem; color: var(--foreground);
}
.achieve-title { font-family: var(--font-display); font-weight: 700; font-size: 1rem; }
.achieve-sub { font-size: 0.75rem; color: var(--muted-foreground); }
.achieve-body { font-size: 0.875rem; color: rgba(26,23,20,0.8); line-height: 1.55; }
.achieve-list { font-size: 0.875rem; color: rgba(26,23,20,0.8); display: flex; flex-direction: column; gap: 0.375rem; }
.verify-link {
  display: inline-flex; align-items: center; gap: 0.25rem;
  font-size: 0.75rem; font-weight: 600;
  color: var(--brand-dark);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.7);
  padding: 0.375rem 1rem; border-radius: var(--radius-pill);
  width: fit-content;
  transition: border-color 0.18s, color 0.18s;
}
.verify-link:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- Education ---------- */
.section-education { background: rgba(242,180,65,0.03); }
.edu-grid { margin-top: 2.5rem; display: flex; flex-direction: column; gap: 1.5rem; }
@media (min-width: 768px) { .edu-grid { display: grid; grid-template-columns: repeat(3, 1fr); } }
.edu-card {
  position: relative;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--card);
  padding: 1.75rem 1.5rem 1.5rem;
  display: flex; flex-direction: column; gap: 1rem;
  transition: transform 0.25s, box-shadow 0.25s;
}
.edu-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px -12px rgba(51,38,27,0.12); }
.edu-achieve { background: linear-gradient(135deg, var(--card), rgba(242,180,65,0.08)); }
.edu-timeline-dot {
  position: absolute; top: -0.6rem; left: 1.5rem;
  width: 1.25rem; height: 1.25rem;
  border-radius: var(--radius-pill);
  border: 3px solid var(--card);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.edu-card-inner { display: flex; align-items: flex-start; gap: 0.875rem; }
.edu-icon {
  flex-shrink: 0; width: 3rem; height: 3rem;
  border-radius: 0.875rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 700; font-size: 0.85rem; color: var(--foreground);
}
.edu-info { flex: 1; }
.edu-degree { font-family: var(--font-display); font-size: 0.95rem; font-weight: 700; line-height: 1.4; }
.edu-inst { font-size: 0.8rem; color: var(--muted-foreground); margin-top: 0.25rem; }
.edu-year { font-size: 0.75rem; font-weight: 600; color: var(--primary); margin-top: 0.25rem; }
.edu-desc { font-size: 0.85rem; line-height: 1.6; color: rgba(26,23,20,0.8); }

/* ---------- Contact ---------- */
.contact-grid { margin-top: 2.5rem; display: grid; gap: 1rem; }
@media (min-width: 640px) { .contact-grid { grid-template-columns: repeat(3, 1fr); } }
.contact-card {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--card);
  padding: 1.25rem;
  transition: transform 0.22s;
  display: block;
}
.contact-card:hover { transform: translateY(-4px); }
.contact-icon {
  width: 2.75rem; height: 2.75rem;
  border-radius: 0.875rem;
  display: flex; align-items: center; justify-content: center;
}
.contact-label { margin-top: 0.75rem; font-family: var(--font-display); font-weight: 700; font-size: 0.875rem; }
.contact-value { margin-top: 0.25rem; font-size: 0.75rem; color: var(--muted-foreground); word-break: break-all; }

/* Contact form */
.contact-form-wrap { margin-top: 3rem; max-width: 28rem; }
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.form-title { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; }
.form-group { display: flex; flex-direction: column; gap: 0.375rem; }
.form-group label { font-size: 0.875rem; font-weight: 500; }
.req { color: var(--primary); }
.form-group input, .form-group textarea {
  border-radius: 0.5rem;
  border: 1px solid var(--input);
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  outline: none;
  background: var(--card);
  color: var(--foreground);
  transition: border-color 0.18s;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--primary); }
.form-success { font-size: 0.875rem; color: var(--k-green); }

/* ---------- Resume ---------- */
.resume-card {
  border-radius: 2.5rem;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, var(--card), rgba(124,92,191,0.07));
  padding: 3rem 2rem;
  text-align: center;
}
.resume-desc {
  max-width: 36rem; margin: 0.75rem auto 0;
  font-size: 0.875rem; line-height: 1.7; color: var(--muted-foreground);
}
.resume-ctas { margin-top: 1.75rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }

/* ---------- Account ---------- */
.account-intro { margin-top: 0.75rem; font-size: 0.9375rem; color: var(--muted-foreground); max-width: 36rem; }
.account-gate { margin-top: 2rem; }
.auth-card {
  max-width: 26rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--card);
  padding: 2.5rem;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
}
.auth-logo { font-size: 3rem; }
.auth-title { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; }
.auth-sub { font-size: 0.875rem; color: var(--muted-foreground); }
.google-btn {
  background: #fff; color: #333;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  gap: 0.625rem;
}
.google-btn:hover { background: #f8f8f8; transform: translateY(-1px); }

/* Signed-in bar */
.account-dashboard { margin-top: 1.5rem; }
.signed-in-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--card);
  padding: 1.25rem 1.5rem;
}
.signed-in-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; color: var(--muted-foreground); }
.signed-in-email { font-size: 1rem; font-weight: 600; margin-top: 0.25rem; }
.signed-in-right { display: flex; align-items: center; gap: 0.875rem; }
.user-avatar {
  width: 2.25rem; height: 2.25rem;
  border-radius: var(--radius-pill);
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 0.85rem;
}
.sign-out-btn {
  font-size: 0.8rem; font-weight: 600;
  color: var(--muted-foreground);
  padding: 0.375rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  transition: border-color 0.18s, color 0.18s;
}
.sign-out-btn:hover { border-color: var(--primary); color: var(--primary); }

/* Stats */
.stats-grid { margin-top: 1.5rem; display: grid; gap: 1rem; }
@media (min-width: 640px) { .stats-grid { grid-template-columns: repeat(3, 1fr); } }
.stat-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--card);
  padding: 1.5rem;
  display: flex; flex-direction: column; gap: 0.25rem;
}
.stat-num { font-family: var(--font-display); font-size: 2.5rem; font-weight: 800; color: var(--foreground); line-height: 1; }
.stat-label { font-size: 0.875rem; font-weight: 600; margin-top: 0.25rem; }
.stat-sub { font-size: 0.75rem; color: var(--muted-foreground); }

/* Two-col */
.account-two-col { margin-top: 1.5rem; display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .account-two-col { grid-template-columns: 1fr 1fr; } }
.teach-card, .questions-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--card);
  padding: 1.5rem;
  display: flex; flex-direction: column; gap: 0.75rem;
}
.teach-title, .questions-title { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.teach-sub, .questions-sub { font-size: 0.8rem; color: var(--muted-foreground); }
.teach-input, .teach-textarea {
  width: 100%;
  border: 1px solid var(--input);
  border-radius: 0.5rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  background: var(--background); color: var(--foreground);
  outline: none; font-family: inherit;
  transition: border-color 0.18s;
}
.teach-input:focus, .teach-textarea:focus { border-color: var(--primary); }
.teach-textarea { resize: vertical; }
.no-answers { font-size: 0.8rem; color: var(--muted-foreground); font-style: italic; }
.custom-answers { margin-top: 0.5rem; display: flex; flex-direction: column; gap: 0.5rem; }
.custom-answer-item {
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.75rem; font-size: 0.8rem;
  background: var(--muted);
}
.questions-list { display: flex; flex-direction: column; gap: 0.5rem; max-height: 20rem; overflow-y: auto; }
.question-item {
  display: flex; justify-content: space-between; align-items: flex-start;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.75rem;
  background: var(--background);
}
.question-text { font-size: 0.8rem; font-weight: 500; }
.question-meta { font-size: 0.7rem; color: var(--muted-foreground); margin-top: 0.2rem; }
.question-status {
  font-size: 0.65rem; font-weight: 600; padding: 0.2rem 0.5rem;
  border-radius: var(--radius-pill);
  background: rgba(14,124,123,0.12); color: var(--k-teal);
  flex-shrink: 0; margin-left: 0.5rem;
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); }
.footer-inner {
  max-width: 72rem; margin: 0 auto;
  padding: 2rem 1rem;
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 1rem;
  font-size: 0.875rem; color: var(--muted-foreground);
}
.footer-links { display: flex; gap: 1rem; }
.footer-links a:hover { color: var(--primary); }

/* ---------- Animations ---------- */
.rise { animation: rise 0.8s cubic-bezier(0.22,1,0.36,1) both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .rise, .ball { animation: none !important; }
}

/* ---------- "Ask me anything" Bubble ---------- */
.ask-bubble {
  position: absolute;
  bottom: -3.5rem; left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--primary), var(--brand-dark));
  color: #fff;
  font-size: 0.8rem; font-weight: 700;
  box-shadow: 0 6px 24px -6px rgba(228,87,46,0.55);
  animation: bubble-float 2.8s ease-in-out infinite;
  text-decoration: none;
  z-index: 10;
  transition: transform 0.22s, box-shadow 0.22s;
}
.ask-bubble:hover {
  transform: translateX(-50%) scale(1.06);
  box-shadow: 0 10px 30px -8px rgba(228,87,46,0.65);
}
.ask-bubble-dot {
  width: 0.5rem; height: 0.5rem;
  border-radius: var(--radius-pill);
  background: #fff;
  animation: pulse-green 1.4s infinite;
}
.ask-bubble-arrow { flex-shrink: 0; }
@keyframes bubble-float {
  0%,100% { bottom: -3.5rem; }
  50% { bottom: -3.1rem; }
}

/* ---------- Rate badge in chatbot header ---------- */
.rate-badge {
  flex-shrink: 0;
  font-size: 0.7rem; font-weight: 700;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-pill);
  background: rgba(14,124,123,0.12); color: var(--k-teal);
  border: 1px solid rgba(14,124,123,0.2);
  transition: background 0.25s, color 0.25s;
}
.rate-badge--low  { background: rgba(242,180,65,0.18); color: #9A6E00; border-color: rgba(242,180,65,0.3); }
.rate-badge--empty { background: rgba(228,87,46,0.12); color: var(--primary); border-color: rgba(228,87,46,0.2); }

/* ---------- Achieve grid single-item layout ---------- */
.achieve-grid-single {
  grid-template-columns: 1fr;
  max-width: 32rem;
}

/* ---------- Education Timeline Road ---------- */
.edu-timeline-wrap {
  position: relative;
  margin-top: 2.5rem;
  padding-left: 2.5rem;
  display: flex; flex-direction: column; gap: 2rem;
}
/* The road line */
.edu-road {
  position: absolute;
  left: 1rem; top: 0; bottom: 0;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(to bottom,
    #3776AB 0%, #3776AB 33%,
    #E4572E 33%, #E4572E 66%,
    #F2B441 66%, #F2B441 100%
  );
  opacity: 0.35;
}
/* Dashed centre of road */
.edu-road::after {
  content: "";
  position: absolute;
  left: 50%; top: 4px; bottom: 4px;
  width: 2px; transform: translateX(-50%);
  background: repeating-linear-gradient(
    to bottom, rgba(255,255,255,0.6) 0px, rgba(255,255,255,0.6) 8px, transparent 8px, transparent 16px
  );
}
/* Each step */
.edu-step {
  position: relative;
  display: flex; gap: 1.25rem; align-items: flex-start;
}
.edu-step-dot {
  position: absolute;
  left: -2.15rem; top: 1.5rem;
  width: 1.25rem; height: 1.25rem;
  border-radius: var(--radius-pill);
  border: 3px solid var(--card);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 2;
  flex-shrink: 0;
}
.edu-step-dot--gold {
  animation: pulse-gold 2s infinite;
}
@keyframes pulse-gold {
  0%,100% { box-shadow: 0 0 0 0 rgba(242,180,65,0.4), 0 2px 8px rgba(0,0,0,0.12); }
  50% { box-shadow: 0 0 0 6px rgba(242,180,65,0), 0 2px 8px rgba(0,0,0,0.12); }
}
.edu-step-card {
  flex: 1;
}

/* Keep old edu-card styles but scoped inside edu-step */
.edu-step .edu-card { margin: 0; }


/* ====================================================
   SESSION 3 NEW STYLES
   ==================================================== */

/* ---------- Speech Bubble Button (top-right of portrait) ---------- */
/* Now positioned relative to .portrait-wrap (not the clipped oval frame) */
.portrait-oval-frame { position: relative; overflow: hidden; } /* restored: clips photo to oval */

.speech-bubble-btn {
  position: absolute;
  top: -1.5rem;
  right: -3.2rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 30;
  /* Hidden by default — only appears on portrait hover */
  opacity: 0;
  transform: scale(0.4) rotate(-8deg);
  transform-origin: bottom left;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,0.14));
  transition: filter 0.18s ease;
  /* No auto-pop animation here — triggered by hover below */
  pointer-events: none;
}
.speech-bubble-btn:hover {
  filter: drop-shadow(0 10px 28px rgba(0,0,0,0.22));
}
.speech-bubble-btn:active { opacity: 0.9; }

/* Pop in when portrait is hovered */
.portrait-wrap:hover .speech-bubble-btn {
  pointer-events: auto;
  animation: bubblePop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
             bubbleWiggle 5s ease-in-out 0.6s infinite both;
}

@keyframes bubblePop {
  0%   { opacity: 0; transform: scale(0.4) rotate(-8deg); }
  60%  { opacity: 1; transform: scale(1.08) rotate(2deg); }
  80%  { transform: scale(0.96) rotate(-1deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

.speech-bubble-shape {
  position: relative;
  display: block;
  width: 140px;
}
.speech-bubble-svg {
  width: 140px;
  height: auto;
  display: block;
}
.speech-bubble-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  font-family: 'Sora', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: #1a1714;
  white-space: nowrap;
  pointer-events: none;
  letter-spacing: 0.01em;
}

/* Wiggle every 5s — only while hovering portrait (handled by hover rule above) */
@keyframes bubbleWiggle {
  0%, 85%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  88% { transform: scale(1.06) rotate(-3deg); opacity: 1; }
  92% { transform: scale(1.04) rotate(3deg); opacity: 1; }
  96% { transform: scale(1) rotate(-1deg); opacity: 1; }
}
/* .visible class kept for backwards compat but no longer needed */
.speech-bubble-btn.visible {
  opacity: 1;
}

/* ---------- Nav highlight animation (triggered by chatbot) ---------- */
@keyframes navHighlight {
  0%   { box-shadow: 0 0 0 0 rgba(228,87,46,0); background: var(--brand-dark); color: #fbf6ed; }
  25%  { box-shadow: 0 0 14px 4px rgba(228,87,46,0.55); }
  50%  { box-shadow: 0 0 22px 6px rgba(228,87,46,0.35); }
  75%  { box-shadow: 0 0 14px 4px rgba(228,87,46,0.18); }
  100% { box-shadow: 0 0 0 0 rgba(228,87,46,0); background: var(--brand-dark); color: #fbf6ed; }
}
.tab.nav-flash {
  animation: navHighlight 2s ease-in-out forwards;
}

/* ---------- Status pill ---------- */
.status-pill {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-pill);
  background: rgba(34,197,94,0.12);
  border: 1px solid rgba(34,197,94,0.35);
  font-size: 0.78rem; font-weight: 600;
  color: #15803d;
  white-space: nowrap;
  cursor: default;
  user-select: none;
}
.status-pill .status-dot {
  width: 0.5rem; height: 0.5rem;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse-green 1.8s infinite;
}

/* ---------- Portrait sizing update ---------- */
.portrait-img { width: 100%; height: auto; display: block; }

/* ---------- Hero bio - slightly reduced to give portrait more room ---------- */
.hero-bio {
  font-size: 0.88rem !important;
  max-width: 26ch !important;
  line-height: 1.5 !important;
}

/* ---------- Education section background fix ---------- */
.section-education,
.edu-timeline-wrap { background: var(--background) !important; }

/* ---------- Achievement star dot ---------- */
.edu-step-dot--star {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  color: #1a1714;
  font-weight: 900;
  box-shadow: 0 0 0 3px rgba(242,180,65,0.3), 0 2px 8px rgba(0,0,0,0.12);
}

/* ---------- Auth form (email+password login) ---------- */
.auth-form {
  display: flex; flex-direction: column; gap: 1rem;
  margin-top: 1.25rem;
  width: 100%;
}
.auth-field {
  display: flex; flex-direction: column; gap: 0.35rem;
}
.auth-label {
  font-size: 0.75rem; font-weight: 600;
  color: var(--muted-foreground); letter-spacing: 0.05em; text-transform: uppercase;
}
.auth-input {
  width: 100%; padding: .65rem .9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--card); color: var(--foreground);
  font-family: 'Figtree', sans-serif; font-size: 0.92rem;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  box-sizing: border-box;
}
.auth-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(228,87,46,0.12);
}
.auth-pw-wrap { position: relative; }
.auth-pw-wrap .auth-input { padding-right: 2.8rem; }
.auth-pw-toggle {
  position: absolute; right: .75rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--muted-foreground);
  padding: 0; line-height: 1;
  transition: color .2s;
}
.auth-pw-toggle:hover { color: var(--foreground); }
.auth-error {
  font-size: 0.8rem; color: #c0392b;
  background: rgba(192,57,43,0.08);
  border: 1px solid rgba(192,57,43,0.2);
  border-radius: var(--radius-card);
  padding: .5rem .75rem;
  margin: 0;
}
.auth-submit {
  width: 100%; justify-content: center; margin-top: .25rem;
}
.auth-submit:disabled {
  opacity: 0.6; cursor: not-allowed;
}

