/* style.css */

/* ========== RESET & BASE ========== */
*, *::before, *::after {
  margin: 0; padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', Arial, sans-serif;
  background: #f0f2f5;
  padding: 80px 20px 80px;
  color: #1a1a2e;
}

/* ========== TOPNAV ========== */
.topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 58px;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(232, 232, 232, 0.8);
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  transition:
    background   0.4s ease,
    backdrop-filter 0.4s ease,
    box-shadow   0.4s ease,
    border-color 0.4s ease;
}
/* Glass effect when scrolled */
.topnav.scrolled {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}

/* Left nav links */
.topnav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.topnav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  padding: 7px 13px;
  border-radius: 7px;
  font-size: 0.83rem;
  font-weight: 600;
  color: #444;
  border: 1px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s cubic-bezier(0.34,1.56,0.64,1);
}
.topnav-link:hover {
  background: #f5f5f5;
  color: #8B0000;
  border-color: #eee;
  transform: translateY(-1px);
}
/* Instagram link — gradient on hover */
.topnav-link.instagram:hover {
  background: linear-gradient(135deg, #fdf0f8, #fff0e8);
  color: #c13584;
  border-color: #f0c0e0;
}
.topnav-link.instagram svg { transition: color 0.2s; }
.topnav-link.instagram:hover svg { color: #c13584; }

/* Contact button */
.topnav-contact-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #8B0000, #b30000);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(139,0,0,0.25);
  transition: background 0.2s, transform 0.2s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.2s;
}
.topnav-contact-btn:hover {
  background: linear-gradient(135deg, #6e0000, #8B0000);
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 4px 16px rgba(139,0,0,0.35);
}
.topnav-contact-btn.active {
  background: linear-gradient(135deg, #5a0000, #7a0000);
  transform: scale(0.97);
}

/* ========== CONTAINER ========== */
.container {
  max-width: 760px;
  margin: 0 auto;
}

/* ========== HEADER ========== */
header {
  text-align: center;
  padding: 40px 0 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.logo {
  width: 160px;
  height: 160px;
  object-fit: contain;
  filter: drop-shadow(0 6px 18px rgba(139,0,0,0.2));
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
.logo:hover { transform: scale(1.07) rotate(-2deg); }

header h1 {
  color: #8B0000;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

/* ========== NOTICE BAR (collapsible) ========== */
.notice-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8f8f8;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #444;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s, border-color 0.2s;
}
.notice-bar:hover { background: #f0f0f0; border-color: #ccc; }
.notice-bar svg:first-child { color: #8B0000; flex-shrink: 0; }
.notice-title { flex: 1; }
.notice-chevron {
  flex-shrink: 0;
  color: #888;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.notice-bar[aria-expanded="true"] .notice-chevron { transform: rotate(180deg); }

.notice-content {
  max-height: 0;
  opacity: 0;
  transform: scale(0.95) translateY(-10px);
  transform-origin: top center;
  overflow: hidden;
  font-size: 0.85rem;
  color: #555;
  line-height: 1.65;
  background: #fafafa;
  border-radius: 0 0 8px 8px;
  padding: 0 14px;
  margin-bottom: 22px;
  transition:
    max-height 0.35s cubic-bezier(0.4,0,0.2,1),
    opacity 0.3s ease,
    transform 0.35s cubic-bezier(0.34,1.56,0.64,1),
    padding 0.3s ease;
}
.notice-content.open {
  max-height: 350px;
  opacity: 1;
  transform: scale(1) translateY(0);
  padding: 14px 16px;
}
.notice-content strong { color: #8B0000; font-weight: 700; }

/* Notice list */
.notice-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.notice-list li {
  padding-left: 14px;
  border-left: 3px solid #8B0000;
  font-size: 0.84rem;
  color: #444;
  line-height: 1.6;
}
.notice-list li strong { color: #8B0000; }

/* ========== CARD ========== */
.card {
  background: #ffffff;
  padding: 32px 36px;
  border-radius: 18px;
  margin-bottom: 28px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06), 0 8px 28px rgba(0,0,0,0.07);
  transition: box-shadow 0.3s ease;
}
.card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.09), 0 12px 36px rgba(0,0,0,0.1);
}

/* ========== SECTION HEADINGS ========== */
h2 {
  margin-bottom: 24px;
  color: #8B0000;
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}
h2::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 24px;
  background: linear-gradient(180deg, #8B0000, #cc3333);
  border-radius: 3px;
  flex-shrink: 0;
}

.section-sub {
  font-size: 1rem;
  font-weight: 700;
  color: #333;
  margin: 24px 0 14px;
}

label {
  font-weight: 600;
  font-size: 0.82rem;
  display: block;
  margin-bottom: 8px;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ========== DRUM PICKER ========== */
.drum-picker-wrap {
  position: relative;
  width: 100%;
  height: 52px;
  background: #fdfdfd;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  margin: 8px 0 24px;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.03);
}
.drum-picker-center {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 50%;
  width: 80px;
  transform: translateX(-50%);
  background: rgba(139,0,0,0.06);
  border: 1.5px solid rgba(139,0,0,0.25);
  border-radius: 8px;
  pointer-events: none;
  z-index: 2;
}
.drum-picker-scroll {
  display: flex;
  align-items: center;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE */
  scroll-behavior: smooth;
}
.drum-picker-scroll::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}
.drum-pad {
  flex-shrink: 0;
  width: calc(50% - 40px);
}
.drum-item {
  flex-shrink: 0;
  width: 80px;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  color: #888;
  scroll-snap-align: center;
  transition: color 0.2s, transform 0.2s, font-size 0.2s;
  cursor: pointer;
  user-select: none;
}
.drum-item.active {
  color: #8B0000;
  font-size: 1.05rem;
  font-weight: 800;
}

/* ========== INPUTS ========== */
select, input[type="number"], input[type="text"] {
  width: 100%;
  padding: 11px 14px;
  margin-bottom: 18px;
  border: 1.5px solid #e0e0e0;
  border-radius: 9px;
  font-family: inherit;
  font-size: 0.95rem;
  color: #222;
  background: #fafafa;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
}
select:hover, input:hover { border-color: #bbb; background: #fff; }
select:focus, input:focus {
  border-color: #8B0000;
  box-shadow: 0 0 0 3px rgba(139,0,0,0.1);
  background: #fff;
}

/* ========== SUBJECT ROW ========== */
.subject-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  background: #fafafa;
  border-radius: 10px;
  border: 1.5px solid #f0f0f0;
  margin-bottom: 10px;
  transition: background 0.2s, border-color 0.2s;
}
.subject-row:hover { background: #fff5f5; border-color: #f0c0c0; }

.subject-name-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.subject-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: #222;
}

/* High-credit badge — plain */
.badge-important {
  display: inline-block;
  background: #f5f5f5;
  color: #555;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.credit-tag {
  background: #f3f3f3;
  color: #666;
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.subject-row input[type="number"] {
  margin-bottom: 0;
  width: 100px;
  text-align: center;
  padding: 8px 10px;
}

/* Grade color badges on input */
.grade-display {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 34px;
  border-radius: 7px;
  font-size: 0.82rem;
  font-weight: 800;
  border: 1.5px solid transparent;
  transition: background 0.25s, color 0.25s;
  flex-shrink: 0;
}
.grade-O  { background: #d4f8e8; color: #0a7a3a; border-color: #6adba0; }
.grade-Ap { background: #d0eaff; color: #0055aa; border-color: #80bbff; }
.grade-A  { background: #ddf0ff; color: #006699; border-color: #90ccee; }
.grade-Bp { background: #edf8d0; color: #3a6600; border-color: #aadd66; }
.grade-B  { background: #fff8cc; color: #776600; border-color: #ddcc44; }
.grade-C  { background: #ffe8cc; color: #884400; border-color: #ffaa66; }
.grade-F  { background: #ffd6d6; color: #880000; border-color: #ff8080; }
.grade-na { background: #f0f0f0; color: #aaa; border-color: #ddd; }

/* ========== BUTTON ========== */
.btn-row {
  display: flex;
  justify-content: center;
  margin-top: 6px;
}
button {
  background: linear-gradient(135deg, #8B0000, #b30000);
  color: white;
  border: none;
  padding: 13px 36px;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.97rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  transition: background 0.25s, transform 0.18s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.25s;
  box-shadow: 0 4px 16px rgba(139,0,0,0.28);
}
button:hover {
  background: linear-gradient(135deg, #6e0000, #8B0000);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 22px rgba(139,0,0,0.36);
}
button:active { transform: translateY(0) scale(0.99); box-shadow: 0 3px 10px rgba(139,0,0,0.22); }

/* ========== RESULT BOX ========== */
.result-box {
  text-align: center;
  margin-top: 22px;
  padding: 22px 24px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f9fff5, #e8fef0);
  border: 1.5px solid #b2e6c0;
  transition: all 0.35s ease;
}
.result-score {
  font-size: 3rem;
  font-weight: 800;
  color: #1a7a3a;
  line-height: 1;
}
.result-label {
  font-size: 0.9rem;
  color: #555;
  margin-top: 6px;
  font-weight: 500;
}
.hidden { display: none !important; }

/* ========== IMPACT ANALYSIS ========== */
.impact-section { margin-top: 6px; }

.impact-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 9px;
}
.impact-label {
  flex: 0 0 200px;
  font-size: 0.83rem;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.impact-track {
  flex: 1;
  height: 10px;
  background: #f0f0f0;
  border-radius: 10px;
  overflow: hidden;
}
.impact-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.7s cubic-bezier(0.34,1.56,0.64,1);
}
.impact-pct {
  font-size: 0.8rem;
  font-weight: 700;
  color: #555;
  min-width: 42px;
  text-align: right;
}
.impact-top-note {
  font-size: 0.82rem;
  margin-bottom: 12px;
  padding: 8px 14px;
  border-radius: 8px;
  background: #fff3cd;
  border: 1px solid #f0c040;
  color: #7a5200;
  font-weight: 500;
}

/* ========== CHART ========== */
.chart-box { margin-top: 6px; }
.chart-wrap {
  position: relative;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}

/* ========== WHAT-IF ========== */
.whatif-box { margin-top: 6px; }
.whatif-hint {
  font-size: 0.83rem;
  color: #777;
  margin-bottom: 14px;
  font-style: italic;
}
.whatif-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.whatif-name {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
}
.whatif-select {
  width: 100px;
  padding: 7px 10px;
  margin-bottom: 0;
  font-size: 0.83rem;
  border-radius: 7px;
}
.whatif-result {
  margin-top: 16px;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  color: #1a7a3a;
  padding: 12px 18px;
  background: #e8fef0;
  border-radius: 10px;
  border: 1.5px solid #b2e6c0;
  min-height: 46px;
  transition: all 0.3s ease;
}

/* ========== CGPA INPUTS ========== */
.cgpa-sem-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  padding: 10px 14px;
  background: #fafafa;
  border-radius: 9px;
  border: 1.5px solid #efefef;
}
.cgpa-sem-label {
  flex: 0 0 130px;
  font-size: 0.87rem;
  font-weight: 600;
  color: #444;
}
.cgpa-sem-row input {
  flex: 1;
  margin-bottom: 0;
  padding: 8px 12px;
}

/* ========== PERFORMANCE SUMMARY ========== */
.perf-summary { margin-top: 6px; }
.perf-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.perf-card {
  background: #fafafa;
  border-radius: 12px;
  border: 1.5px solid #eee;
  padding: 14px 16px;
  text-align: center;
  transition: background 0.2s;
}
.perf-card:hover { background: #fff5f5; border-color: #f0c0c0; }
.perf-card .perf-val  { font-size: 1.4rem; font-weight: 800; color: #8B0000; }
.perf-card .perf-desc { font-size: 0.77rem; color: #888; margin-top: 3px; font-weight: 500; }
.trend-up   { color: #1a7a3a !important; }
.trend-down { color: #c0392b !important; }

/* ========== TARGET PLANNER ========== */
.planner-desc {
  font-size: 0.87rem;
  color: #666;
  margin-bottom: 20px;
  line-height: 1.6;
}
.planner-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.planner-result {
  margin-top: 20px;
  padding: 20px 24px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f0f7ff, #e0edff);
  border: 1.5px solid #b0ccff;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #1a3a7a;
}
.planner-result .big-num {
  font-size: 2.6rem;
  font-weight: 800;
  color: #8B0000;
  display: block;
  text-align: center;
  margin: 8px 0 4px;
}
.planner-result .plan-note {
  font-size: 0.83rem;
  color: #555;
  text-align: center;
}
.planner-impossible {
  background: linear-gradient(135deg, #fff0f0, #ffe0e0);
  border-color: #ffaaaa;
  color: #880000;
}



/* ========== OVERLAY ========== */
.overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0);
  backdrop-filter: blur(0px);
  z-index: 998;
  pointer-events: none;
  transition: background 0.4s ease, backdrop-filter 0.4s ease;
}
.overlay.active {
  background: rgba(0,0,0,0.22);
  backdrop-filter: blur(2px);
  pointer-events: all;
}

/* ========== CONTACT PANEL ========== */
.contact-panel {
  position: fixed;
  top: 66px;
  right: 24px;
  z-index: 999;
  width: 300px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.14), 0 2px 10px rgba(0,0,0,0.07), 0 0 0 1px rgba(0,0,0,0.05);
  overflow: hidden;
  opacity: 0;
  transform: translateY(-14px) scale(0.93);
  transform-origin: top right;
  pointer-events: none;
  transition:
    opacity   0.38s cubic-bezier(0.34,1.56,0.64,1),
    transform 0.38s cubic-bezier(0.34,1.56,0.64,1);
}
.contact-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}
.contact-panel-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 20px 18px;
  background: linear-gradient(135deg, #8B0000 0%, #c0392b 100%);
  color: #fff;
  position: relative;
}
.dev-avatar-img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid rgba(255,255,255,0.55);
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.dev-info { flex: 1; min-width: 0; }
.dev-name  { font-weight: 700; font-size: 1rem; }
.dev-title { font-size: 0.75rem; opacity: 0.82; margin-top: 2px; }
.close-btn {
  position: absolute; top: 12px; right: 12px;
  background: rgba(255,255,255,0.18);
  border: none; border-radius: 50%;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #fff;
  padding: 0; margin: 0; box-shadow: none;
  transition: background 0.2s, transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
.close-btn:hover {
  background: rgba(255,255,255,0.32);
  transform: rotate(90deg) scale(1.1);
  box-shadow: none;
}
.contact-links {
  padding: 16px 16px 18px;
  display: flex; flex-direction: column; gap: 10px;
}
.contact-link {
  display: flex; align-items: center; gap: 13px;
  text-decoration: none;
  padding: 13px 16px;
  border-radius: 12px;
  font-size: 0.9rem; font-weight: 500;
  transition: background 0.22s, transform 0.22s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.22s;
}
.contact-link svg:first-child { width: 20px; height: 20px; flex-shrink: 0; transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1); }
.contact-link .arrow { width: 16px; height: 16px; margin-left: auto; opacity: 0; transform: translateX(-6px); transition: opacity 0.22s, transform 0.22s; }
.contact-link:hover .arrow { opacity: 1; transform: translateX(0); }
.contact-link:hover svg:first-child { transform: scale(1.18) rotate(-5deg); }
.contact-link:hover { transform: translateX(3px); box-shadow: 0 4px 14px rgba(0,0,0,0.1); }
.contact-link.linkedin { background: #e8f3fb; color: #0a66c2; border: 1px solid #c8e0f5; }
.contact-link.linkedin:hover { background: #d4eaf7; border-color: #a0c8ee; }
.contact-link.github  { background: #f0f0f0; color: #24292e; border: 1px solid #ddd; }
.contact-link.github:hover  { background: #e4e4e4; border-color: #ccc; }

/* ========== RESPONSIVE ========== */
@media (max-width: 700px) {
  body { padding: 12px 12px 90px; }
  header h1 { font-size: 1.55rem; }
  .logo { width: 130px; height: 130px; }
  .card { padding: 22px 18px; }

  .topnav { padding: 0 14px; }
  .topnav-title { font-size: 0.82rem; }
  .topnav-contact-btn span { display: none; }
  .topnav-contact-btn { padding: 8px 12px; }

  .subject-row {
    grid-template-columns: 1fr auto;
    row-gap: 8px;
  }
  .subject-row input { width: 90px; }

  .contact-panel {
    top: 66px; right: 12px; left: 12px;
    width: auto;
    transform-origin: top right;
    transform: translateY(-14px) scale(0.93);
  }
  .contact-panel.open { transform: translateY(0) scale(1); }

  .planner-grid { grid-template-columns: 1fr; }
  .perf-grid { grid-template-columns: 1fr 1fr; }
}