* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: #1e1e2e;
  color: #cdd6f4;
  font-family: 'JetBrains Mono', monospace;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 { font-family: 'Space Grotesk', sans-serif; }

/* --- Tab bar nav --- */
.tabbar {
  display: flex;
  background: #181825;
  border-bottom: 1px solid #313244;
}
.tab {
  padding: 14px 22px;
  font-size: 13px;
  color: #6c7086;
  border-right: 1px solid #313244;
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease;
}
.tab:hover {
  color: #cdd6f4;
  background: #1e1e2e;
}
.tab.active {
  color: #f9c74f;
  background: #1e1e2e;
  border-top: 2px solid #f9c74f;
}

/* --- Hero (home page, with background video) --- */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%);
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 30, 0.72);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 24px;
}

.eyebrow {
  color: #89b4fa;
  font-size: 14px;
  margin-bottom: 12px;
}
.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 700;
}
.cursor {
  color: #f9c74f;
  animation: blink 1.4s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.subtitle {
  color: #a6adc8;
  margin: 20px auto 32px;
  max-width: 480px;
  font-size: 15px;
}

.btn {
  display: inline-block;
  background: #f9c74f;
  color: #1e1e2e;
  padding: 12px 28px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.2s ease;
}
.btn:hover { transform: translateY(-3px); }

/* --- Generic inner page (About / Contact) --- */
.page {
  flex: 1;
  padding: 80px 24px;
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}
.page-title {
  font-size: 40px;
  margin: 10px 0 28px;
  color: #cdd6f4;
}
.page-text {
  color: #a6adc8;
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 18px;
}
.contact-links {
  margin-top: 30px;
}
.phone {
  margin-top: 16px;
  color: #89b4fa;
  font-size: 14px;
}

/* --- Projects --- */
.projects {
  flex: 1;
  padding: 60px 24px 100px;
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}
.projects .eyebrow { margin-top: 20px; }
.projects .page-title { color: #cdd6f4; }

.grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 32px;
  text-align: left;
}

.card {
  background: #313244;
  border: 1px solid #45475a;
  border-radius: 10px;
  padding: 24px;
  flex: 1 1 260px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover {
  border-color: #89b4fa;
  transform: translateY(-4px);
}

.card-thumb {
  width: 100%;
  height: 120px;
  border-radius: 8px;
  margin-bottom: 16px;
  object-fit: cover;
}
}
.thumb-1 { background: linear-gradient(135deg, #89b4fa, #313244); }
.thumb-2 { background: linear-gradient(135deg, #f9c74f, #313244); }
.thumb-3 { background: linear-gradient(135deg, #a6e3a1, #313244); }

.tag {
  color: #f9c74f;
  font-size: 13px;
  margin-bottom: 10px;
}
.card h3 { margin-bottom: 8px; font-size: 18px; color: #cdd6f4; }
.card p:last-child { color: #a6adc8; font-size: 14px; line-height: 1.5; }

.card-link {
  text-decoration: none;
  color: inherit;
  flex: 1 1 260px;
  display: block;
}
.card-link:visited,
.card-link:hover,
.card-link:active {
  text-decoration: none;
  color: inherit;
}

.card-hover {
  display: none;
  color: #f9c74f;
  font-size: 13px;
  font-weight: 600;
  margin-top: 14px;
}
.card-link:hover .card-hover {
  display: inline-block;
}

/* --- Footer --- */
.footer {
  text-align: center;
  padding: 30px;
  font-size: 13px;
  color: #6c7086;
  border-top: 1px solid #313244;
}
.footer a { color: #89b4fa; text-decoration: none; }

/* --- Grade Calculator page --- */
.course-list {
  max-width: 500px;
  margin: 30px auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.course-row {
  display: flex;
  gap: 10px;
}
.course-row input,
.course-row select {
  background: #313244;
  border: 1px solid #45475a;
  border-radius: 6px;
  padding: 10px;
  color: #cdd6f4;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
}
.course-name { flex: 2; }
.course-units { flex: 1; }
.course-grade { flex: 1; }

.btn-secondary {
  background: transparent;
  border: 1px solid #f9c74f;
  color: #f9c74f;
  margin-right: 10px;
}
.btn-secondary:hover { transform: translateY(-3px); }

.gpa-result {
  margin-top: 24px;
  font-size: 20px;
  color: #a6e3a1;
  font-weight: 600;
}
.back-link {
  display: inline-block;
  margin-top: 30px;
  color: #89b4fa;
  text-decoration: none;
  font-size: 14px;
}
.demo-table {
  border-collapse: collapse;
  width: 100%;
  max-width: 700px;
  margin: 30px auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
}
.demo-table td, .demo-table th {
  border: 1px solid #45475a;
  padding: 10px 14px;
  text-align: left;
}
.demo-table tr:nth-child(even) {
  background-color: #313244;
}
.demo-table tr:hover {
  background-color: #45475a;
}
.demo-table th {
  background-color: #f9c74f;
  color: #1e1e2e;
  padding-top: 12px;
  padding-bottom: 12px;
}

.calc-page {
  position: relative;
  overflow: hidden;
}
.page-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%);
  z-index: 0;
}
.page-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 30, 0.78);
  z-index: 1;
}
.page-content {
  position: relative;
  z-index: 2;
}
.table-search {
  display: block;
  max-width: 700px;
  margin: 0 auto 20px;
  padding: 10px 14px;
  background: #313244;
  border: 1px solid #45475a;
  border-radius: 6px;
  color: #cdd6f4;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  width: 100%;
}
.table-search:focus {
  outline: none;
  border-color: #89b4fa;
}
.demo-table th {
  cursor: pointer;
  user-select: none;
}
.sort-arrow {
  font-size: 11px;
  opacity: 0.6;
}
.clickable-row {
  cursor: pointer;
}
.detail-row td {
  background: #1e1e2e;
  color: #a6e3a1;
  font-size: 13px;
  padding: 12px 14px;
  border-top: none;
}
.task-input-row {
  display: flex;
  gap: 10px;
  max-width: 500px;
  margin: 30px auto;
}
.task-input-row input {
  flex: 1;
  background: #313244;
  border: 1px solid #45475a;
  border-radius: 6px;
  padding: 10px 14px;
  color: #cdd6f4;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
}
.task-input-row input:focus {
  outline: none;
  border-color: #89b4fa;
}

.task-list {
  list-style: none;
  max-width: 500px;
  margin: 0 auto 40px;
  text-align: left;
}
.task-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #313244;
  border: 1px solid #45475a;
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 8px;
  font-size: 14px;
}
.task-item.done .task-text {
  text-decoration: line-through;
  color: #6c7086;
}
.task-actions button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  margin-left: 8px;
  color: #cdd6f4;
}
.task-actions .task-check:hover { color: #a6e3a1; }
.task-actions .task-delete:hover { color: #f38ba8; }

.chart-wrap {
  max-width: 240px;
  margin: 0 auto 30px;
}

/* --- Contact section --- */
.contact-page {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(137, 180, 250, 0.12), transparent 45%),
    radial-gradient(circle at 80% 75%, rgba(249, 199, 79, 0.10), transparent 45%);
}
.contact-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at center, black 30%, transparent 75%);
  pointer-events: none;
}
.contact-page .page-content {
  position: relative;
  z-index: 1;
}

.contact-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 36px;
}

.contact-card {
  background: #313244;
  border: 1px solid #45475a;
  border-radius: 10px;
  padding: 28px 32px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 140px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.contact-card:hover {
  border-color: #89b4fa;
  transform: translateY(-4px);
}

.contact-icon {
  font-size: 28px;
}
.contact-label {
  color: #cdd6f4;
  font-size: 14px;
  font-weight: 600;
}
/* --- Floating nav --- */
.floating-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  background: rgba(30, 30, 46, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid #45475a;
  border-radius: 999px;
  padding: 6px;
  margin: 20px auto;
  width: fit-content;
}

.theme-toggle {
  background: none;
  border: none;
  color: #cdd6f4;
  font-size: 16px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 999px;
  transition: background 0.2s ease;
}
.theme-toggle:hover {
  background: #313244;
}

.nav-pill {
  padding: 10px 18px;
  border-radius: 999px;
  color: #cdd6f4;
  text-decoration: none;
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
  transition: background 0.2s ease, color 0.2s ease;
}
.nav-pill:hover {
  background: #313244;
  color: #f9c74f;
}

/* --- Hero headline style --- */
.badge {
  display: inline-block;
  background: rgba(137, 180, 250, 0.12);
  border: 1px solid rgba(137, 180, 250, 0.3);
  color: #89b4fa;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 12px;
  margin-bottom: 24px;
}
.hero-headline {
  font-size: clamp(32px, 5.5vw, 56px);
  font-weight: 700;
  line-height: 1.2;
  max-width: 800px;
  margin: 0 auto;
}
.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #313244;
  border: 1px solid #45475a;
  color: #cdd6f4;
  padding: 12px 24px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 14px;
  margin-top: 30px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.pill-btn:hover {
  transform: translateY(-3px);
  border-color: #89b4fa;
}
.hero-content {
  padding-top: 40px;
}
/* --- Light mode --- */
body.light-mode {
  background: #eff1f5;
  color: #4c4f69;
}
body.light-mode .tabbar,
body.light-mode .floating-nav {
  background: rgba(255, 255, 255, 0.8);
  border-color: #ccd0da;
}
body.light-mode .nav-pill,
body.light-mode .theme-toggle {
  color: #4c4f69;
}
body.light-mode .nav-pill:hover {
  background: #e6e9ef;
  color: #1e66f5;
}
body.light-mode .card,
body.light-mode .contact-card {
  background: #ffffff;
  border-color: #ccd0da;
}
body.light-mode .page-title,
body.light-mode h1, body.light-mode h2, body.light-mode h3 {
  color: #4c4f69;
}
body.light-mode .subtitle,
body.light-mode .page-text {
  color: #6c6f85;
}
/* --- About page (new layout) --- */
.about-page {
  padding: 60px 24px 100px;
  max-width: 1000px;
  margin: 0 auto;
}
.about-grid {
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
}

.about-sidebar {
  flex: 0 0 200px;
  text-align: center;
}
.about-photo {
  width: 180px;
  height: 220px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #45475a;
}
.about-location {
  color: #a6adc8;
  font-size: 13px;
  margin-top: 12px;
}
.about-subnav {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 30px;
  text-align: left;
}
.about-subnav a {
  color: #6c7086;
  text-decoration: none;
  font-size: 13px;
  border-left: 2px solid transparent;
  padding-left: 10px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.about-subnav a:hover {
  color: #f9c74f;
  border-color: #f9c74f;
}

.about-content {
  flex: 1;
  min-width: 280px;
  text-align: left;
}
.about-block {
  margin-bottom: 60px;
}
.about-name {
  font-size: 32px;
  margin-bottom: 6px;
}
.about-role {
  color: #89b4fa;
  font-size: 15px;
  margin-bottom: 20px;
}
.about-socials {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.social-btn {
  background: #313244;
  border: 1px solid #45475a;
  color: #cdd6f4;
  padding: 8px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
  transition: border-color 0.2s ease;
}
.social-btn:hover { border-color: #89b4fa; }

.about-bio {
  color: #a6adc8;
  font-size: 15px;
  line-height: 1.7;
}
.about-bio strong { color: #cdd6f4; }

.about-heading {
  font-size: 24px;
  margin-bottom: 24px;
}

.experience-item, .study-item {
  border-left: 2px solid #45475a;
  padding-left: 20px;
  margin-bottom: 20px;
}
.experience-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.experience-top h3, .study-item h3 {
  font-size: 16px;
  color: #cdd6f4;
}
.experience-date {
  color: #6c7086;
  font-size: 13px;
}
.experience-role {
  color: #89b4fa;
  font-size: 13px;
  margin: 4px 0 10px;
}
.experience-desc, .study-detail {
  color: #a6adc8;
  font-size: 14px;
  line-height: 1.6;
}

.skills-group h4 {
  color: #cdd6f4;
  font-size: 14px;
  margin-bottom: 10px;
}
.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.skill-tag {
  background: #313244;
  border: 1px solid #45475a;
  color: #cdd6f4;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
}

@media (max-width: 600px) {
  .about-grid { flex-direction: column; }
  .about-sidebar { text-align: left; }
}
/* --- Sticky photo + schedule button + project previews --- */
.about-sidebar {
  position: sticky;
  top: 30px;
  align-self: flex-start;
}

.schedule-btn {
  display: inline-block;
  background: #313244;
  border: 1px solid #45475a;
  color: #cdd6f4;
  padding: 10px 20px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
  margin-bottom: 24px;
  transition: border-color 0.2s ease;
}
.schedule-btn:hover { border-color: #f9c74f; }

.project-preview-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
}
.project-preview-img {
  width: 120px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #45475a;
}
.project-preview-row h4 {
  color: #cdd6f4;
  font-size: 14px;
  margin-bottom: 6px;
}