:root {
  /* Apple White / Matte White Theme */
  --bg: #f5f5f7;
  /* Apple Light Gray */
  --text: #1d1d1f;
  /* Soft Black */
  --muted: #86868b;
  /* Apple Muted Gray */
  --accent: #4f2683;
  /* Western Purple */
  --card: #ffffff;
  /* Pure White */
  --border: #d2d2d7;
  /* Soft Border */
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

body.dark-mode {
  --bg: #1c1917;
  /* Matte Dark Charcoal */
  --text: #e7e5e4;
  /* Cream/Off-white */
  --muted: #a8a29e;
  /* Warm Gray */
  --accent: #b79cff;
  /* Soft Purple Accent */
  --card: #292524;
  /* Darker Charcoal Card */
  --border: #44403c;
  /* Dark Border */
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.theme-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: color 0.2s, transform 0.2s;
}

.theme-toggle:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.05);
  /* Slight rounded bg on hover */
  border-radius: 50%;
}

.theme-animate {
  animation: spin 0.5s ease-in-out;
}

@keyframes spin {
  0% {
    transform: rotate(0deg) scale(1);
  }

  50% {
    transform: rotate(180deg) scale(0.8);
  }

  100% {
    transform: rotate(360deg) scale(1);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  font-family: "Times New Roman", Times, serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6,
.logo,
.hero-name {
  font-family: "Times New Roman", Times, serif;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Navbar - Adapted to Light Theme */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  /* Frosted White */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--text);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  /* Subtle border */
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
  gap: 1rem;
}

.logo {
  font-size: 1.3rem;
  /* Match original size but with serif */
  font-weight: 600;
}

.nav-links {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.nav-links a {
  font-family: "Times New Roman", Times, serif;
  font-weight: 500;
  color: var(--muted);
  /* Was #d6dce2, now muted gray */
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.nav-icons {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  font-weight: 600;
  color: var(--muted);
}

.nav-icons a:hover {
  color: var(--text);
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 42px;
  height: 42px;
  background: transparent;
  /* Was dark, now transparent or white */
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  padding: 10px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  /* Was white, now dark */
  border-radius: 999px;
}

.hamburger:hover {
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

/* Hero - Adapted to Light Theme */
.hero {
  background:
    linear-gradient(180deg, rgba(79, 38, 131, 0.06), rgba(245, 245, 247, 0)),
    var(--bg);
  color: var(--text);
  text-align: center;
  padding: 4.5rem 0 3.5rem;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  align-items: center;
  gap: 4rem;
  text-align: left;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 4rem);
  background: var(--card);
  border: 1px solid rgba(79, 38, 131, 0.14);
  border-radius: 18px;
  box-shadow: 0 18px 42px rgba(30, 24, 42, 0.08);
}

.hero-inner::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 8px;
  background: #4f2683;
}

.hero-left {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.hero-right {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.7;
}

.hero-right p {
  margin-top: 0;
  margin-bottom: 1.2rem;
}

@media (max-width: 800px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .hero-left {
    align-items: center;
  }
}

.avatar-large {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid #fff;
  /* White border */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.hero-name {
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  color: #1d1d1f;
}

.hero-role {
  margin: 0;
  color: var(--muted);
  font-weight: 400;
  font-family: "Times New Roman", Times, serif;
  font-size: 1.2rem;
}

.hero-meta {
  margin: 0;
  color: var(--muted);
  margin-top: 0.5rem;
}

.hero-meta a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--border);
}

.hero-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.hero-links a {
  color: var(--accent);
  font-weight: 600;
  border-bottom: 1px solid transparent;
  /* Removed dashed, cleaner */
}

.hero-links a:hover {
  border-bottom-color: var(--accent);
}

.home-rule {
  width: min(860px, calc(100% - 40px));
  height: 2px;
  margin: 0 auto;
  background: linear-gradient(90deg, transparent, #4f2683, transparent);
}

/* Sections - Original Layout Preserved */
.section {
  padding: 4rem 0;
}

main > section {
  scroll-margin-top: 76px;
}

.section-header h2 {
  margin: 0 0 0.5rem 0;
  font-size: 2rem;
  font-weight: 500;
}

.section-header p {
  margin: 0;
  color: var(--muted);
}

.summary {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  border-top: 1px solid var(--border);
  /* Added top border for crispness */
}

.summary .container {
  max-width: 900px;
}

.summary p {
  margin: 0 0 1rem 0;
  color: #424245;
  /* Slightly darker than muted for reading */
  font-size: 1.05rem;
}

.summary a {
  color: var(--accent);
  font-weight: 500;
}

.projects {
  background: var(--bg);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  /* Restored border */
  border-radius: 16px;
  padding: 1.25rem 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
  /* Soft shadow */
  border-color: rgba(79, 38, 131, 0.24);
}

.project-card h3 {
  margin: 0;
  font-size: 1.2rem;
  color: #1d1d1f;
}

.project-card p {
  margin: 0;
  color: var(--muted);
}

.project-card .tech {
  font-size: 0.9rem;
  color: var(--muted);
  /* Cleaner look */
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.project-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.card-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}

.project-card-feature .project-thumb {
  object-fit: contain;
  padding: 28px;
  background: #ffffff;
}

.skills {
  background: var(--card);
  /* White bg */
  border-top: 1px solid var(--border);
}

.skill-grid {
  display: grid;
  gap: 1.4rem;
  margin-top: 1.4rem;
}

.skill-block {
  background: #fbfbfd;
  /* Subtle gray block */
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.3rem;
  box-shadow: none;
  /* Cleaner flat look */
}

.skill-block h3 {
  margin: 0 0 0.9rem 0;
  font-size: 1.15rem;
}

.icon-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 36px;
  /* Original gap */
  align-items: flex-start;
  justify-content: flex-start;
}

.icon-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 0.55rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
  min-width: 90px;
  max-width: 110px;
  min-height: 98px;
}

.icon-cell img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  background: transparent;
  padding: 2px;
}

.skill-grid img {
  width: 40px !important;
  height: 40px !important;
}

.icon-cell span {
  font-weight: 600;
  color: var(--text);
  text-align: center;
  font-size: 0.9rem;
}

.contact,
.contact-lite {
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.exp-section {
  font-family: "Times New Roman", Times, serif;
  padding: 80px 20px;
  background: #f4f4f8;
  border-top: 1px solid var(--border);
}

.exp-section h2.section-heading {
  text-align: center;
  font-family: "Times New Roman", Times, serif;
  font-size: 2rem;
  color: #1a1a2e;
  margin-bottom: 50px;
  font-weight: 700;
  font-style: normal;
}

.exp-cards-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
}

.exp-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 40px 44px 44px;
  border: 1px solid #ede9ff;
}

.exp-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.exp-logo-left,
.exp-logo-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.exp-logo-right {
  justify-content: flex-end;
}

.exp-logo-img {
  display: block;
  object-fit: contain;
}

.exp-logo-img-square {
  width: 36px;
  height: 36px;
}

.exp-logo-img-western {
  width: min(160px, 34vw);
  max-height: 48px;
}

.exp-logo-img-wide {
  width: min(160px, 34vw);
  max-height: 38px;
}

.exp-logo-img-sherbrooke {
  width: min(170px, 36vw);
  height: 44px;
}

.exp-logo-word {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a1a2e;
  letter-spacing: 0.06em;
}

.exp-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5a4fcf;
  background: #ede9ff;
  padding: 6px 16px;
  border-radius: 999px;
}

.exp-card-label {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5a4fcf;
  margin-bottom: 18px;
}

.exp-title-block {
  text-align: center;
  margin-bottom: 28px;
}

.exp-role {
  font-family: "Times New Roman", Times, serif;
  font-size: clamp(2rem, 5vw, 2.8rem);
  color: #1a1a2e;
  font-weight: 700;
  font-style: normal;
  margin: 0 0 8px;
  line-height: 1.1;
}

.exp-role-sub {
  font-size: 0.9rem;
  color: #999;
  margin: 0 0 14px;
}

.exp-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.exp-divider::before,
.exp-divider::after {
  content: "";
  width: 55px;
  height: 1px;
  background: #d4cff0;
}

.exp-divider-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5a4fcf;
}

.exp-org-subtitle {
  text-align: center;
  font-size: 0.95rem;
  font-weight: 500;
  color: #1a1a2e;
  margin-bottom: 24px;
}

.exp-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.exp-bullet {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.exp-bullet-icon {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  background: #f0eeff;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.exp-bullet-icon svg {
  width: 22px;
  height: 22px;
  stroke: #5a4fcf;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.exp-bullet-text {
  font-size: 0.93rem;
  color: #3a3a5a;
  line-height: 1.65;
  padding-top: 6px;
  margin: 0;
}

.exp-bullet-text strong {
  color: #1a1a2e;
}

.exp-btn-wrap {
  display: flex;
  justify-content: center;
}

.exp-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #2e2070;
  color: #fff;
  font-family: "Times New Roman", Times, serif;
  font-size: 0.93rem;
  font-weight: 500;
  padding: 16px 40px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.exp-btn:hover {
  background: #3d2b9e;
  transform: translateY(-2px);
}

.exp-btn svg {
  width: 17px;
  height: 17px;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.achievements-section {
  background:
    linear-gradient(180deg, rgba(79, 38, 131, 0.05), transparent 42%),
    var(--bg);
}

.scholarship-stack {
  display: grid;
  gap: 28px;
  margin-top: 1.8rem;
}

.scholar-card {
  position: relative;
  display: grid;
  grid-template-columns: 154px minmax(0, 1fr);
  overflow: hidden;
  min-height: 330px;
  background: #fff;
  border: 1px solid rgba(79, 38, 131, 0.14);
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(22, 18, 29, 0.08);
}

.scholar-ribbon {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 54px;
  background: #4f2683;
}

.scholar-ribbon::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  margin: auto;
  width: 0;
  height: 0;
  border-left: 77px solid transparent;
  border-right: 77px solid transparent;
  border-bottom: 54px solid #fff;
}

.scholar-ribbon img {
  position: relative;
  z-index: 1;
  width: 76px;
  height: 76px;
  object-fit: contain;
  padding: 10px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 999px;
}

.scholar-card-mitacs .scholar-ribbon {
  background: #0067b1;
}

.scholar-card-mitacs .scholar-ribbon img {
  width: 104px;
  height: 76px;
  border-radius: 12px;
}

.scholar-body {
  padding: clamp(28px, 4vw, 52px) clamp(26px, 5vw, 62px);
}

.scholar-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #4f2683;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.scholar-kicker svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.scholar-body h3 {
  margin: 12px 0 8px;
  color: #171421;
  font-size: clamp(2.1rem, 5vw, 3.35rem);
  line-height: 1.02;
  font-weight: 700;
}

.scholar-underline {
  width: 112px;
  height: 4px;
  margin: 0 0 36px;
  background: #4f2683;
}

.scholar-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.95fr);
  gap: clamp(28px, 5vw, 54px);
  align-items: center;
}

.scholar-meta {
  display: grid;
  gap: 24px;
}

.scholar-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.scholar-row svg {
  width: 30px;
  height: 30px;
  color: #6f7280;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.scholar-row span,
.scholar-amount span {
  display: block;
  color: #6f7280;
  font-size: 1rem;
}

.scholar-row strong {
  display: block;
  color: #1d1d1f;
  font-size: 1.12rem;
  line-height: 1.25;
}

.scholar-amount {
  min-height: 186px;
  padding-left: clamp(26px, 5vw, 48px);
  border-left: 1px solid rgba(79, 38, 131, 0.2);
}

.scholar-amount strong {
  display: block;
  margin: 8px 0 10px;
  color: #4f2683;
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1;
}

.scholar-amount p {
  margin: 0;
  color: #34313f;
  font-size: 1.12rem;
  line-height: 1.5;
}

/* Accordion - Restored Original Logic */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 1rem;
}

.accordion-item {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

.accordion-item:hover {
  border-color: var(--accent);
}

.acc-left {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-align: left;
}

.acc-logo {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.acc-role {
  font-weight: 600;
  color: var(--text);
  font-family: "Times New Roman", Times, serif;
}

.acc-org {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.95rem;
}

.acc-icon {
  font-weight: 700;
  color: var(--muted);
}

.acc-panel {
  display: none;
  border: 1px solid var(--border);
  border-radius: 0 0 12px 12px;
  padding: 1rem 1.5rem;
  background: var(--card);
  margin-top: -0.5rem;
  /* Join visual trick */
  border-top: none;
}

.acc-panel ul {
  margin: 0;
  padding-left: 1.2rem;
  color: #424245;
  line-height: 1.6;
}

.acc-panel.show {
  display: block;
}

/* Education */
.edu-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
  display: grid;
  gap: 1rem;
}

.edu-left {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.edu-list {
  margin: 0;
  padding-left: 1.2rem;
  color: #424245;
  line-height: 1.6;
}

.text-link {
  display: inline-block;
  margin-top: 0.2rem;
  color: var(--accent);
  font-weight: 500;
}

/* Contact Form */
.contact-form {
  margin-top: 1.8rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
  max-width: 700px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

label {
  font-weight: 500;
  color: var(--text);
  font-family: "Times New Roman", Times, serif;
}

input,
textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 1rem;
  background: #fbfbfd;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
  background: #fff;
}

textarea {
  resize: vertical;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  font-family: "Times New Roman", Times, serif;
}

.btn.primary {
  background: var(--text);
  /* Minimalist Black Button */
  color: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn.primary:hover {
  transform: translateY(-2px);
  background: #000;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.btn.outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
}

.btn.outline:hover {
  border-color: var(--text);
  color: var(--text);
  background: rgba(0, 0, 0, 0.02);
}

.btn.small {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  /* Original padding */
  background: var(--card);
  /* Clean white footer */
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 500;
  color: var(--muted);
}

.social-links {
  display: flex;
  gap: 0.9rem;
}

.social-links a {
  color: var(--muted);
  font-weight: 600;
  transition: color 0.2s ease;
}

.social-links a:hover {
  color: var(--accent);
}

/* Mobile Resets from Original */
@media (max-width: 980px) {
  .nav-links {
    position: absolute;
    top: 64px;
    right: 1.25rem;
    flex-direction: column;
    background: #fff;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    display: none;
    width: 200px;
    align-items: flex-start;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-icons {
    display: none;
  }

  .hamburger {
    display: inline-flex;
  }

  .scholar-card {
    grid-template-columns: 1fr;
  }

  .scholar-ribbon {
    min-height: 112px;
    align-items: center;
    padding-top: 0;
  }

  .scholar-ribbon::after {
    display: none;
  }

  .scholar-details {
    grid-template-columns: 1fr;
  }

  .scholar-amount {
    min-height: auto;
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid rgba(79, 38, 131, 0.2);
    padding-top: 24px;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 3.5rem 0;
  }

  .nav-content {
    padding: 0.75rem 0;
  }

  .hero {
    padding: 3.5rem 0 4rem;
  }

  .hero-inner {
    padding: 2rem 1.25rem;
  }

  .scholar-body {
    padding: 26px 22px 30px;
  }

  .scholar-body h3 {
    font-size: 2rem;
  }

  .scholar-kicker {
    letter-spacing: 0.14em;
  }

  .scholar-row {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 14px;
  }

  .exp-card {
    padding: 28px 20px 32px;
  }

  .exp-card-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .exp-logo-right {
    justify-content: flex-start;
  }

  .exp-logo-img-wide,
  .exp-logo-img-sherbrooke {
    width: min(168px, 78vw);
  }

  .exp-role {
    font-size: 1.8rem;
  }

  .exp-bullet {
    gap: 14px;
  }

  .exp-bullet-icon {
    width: 44px;
    height: 44px;
  }

  .footer-content {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Apple-like Smooth Scroll Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
  /* Apple's signature easing */
  will-change: transform, opacity;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered Delays for Grid Items */
.project-card,
.skill-block,
.accordion-item {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  /* Smooth spring-like feel */
}

/* Ensure hover transforms still work by using a separate specific transition property or handling it carefully. 
   Actually, applying transition: all here might override hover effects. 
   Let's be specific for hover. */
.project-card,
.skill-block,
.accordion-item {
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Wait, if I set transform transition to 0.8s for entrance, the hover will be sluggish. 
   Solution: Add a class 'loaded' after animation completes to reset transition to fast hover. 
   Or simpler: Just rely on the Entrance Animation class logic in JS to only apply the slow transition during entrance. */

.animate-entrance {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-entrance.active {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays */
.project-card:nth-child(1) {
  transition-delay: 0.1s;
}

.project-card:nth-child(2) {
  transition-delay: 0.2s;
}

.project-card:nth-child(3) {
  transition-delay: 0.3s;
}

.project-card:nth-child(4) {
  transition-delay: 0.4s;
}

.skill-block:nth-child(1) {
  transition-delay: 0.1s;
}

.skill-block:nth-child(2) {
  transition-delay: 0.2s;
}

.skill-block:nth-child(3) {
  transition-delay: 0.3s;
}

.skill-block:nth-child(4) {
  transition-delay: 0.4s;
}

.accordion-item {
  transition-delay: 0.1s;
}

/* Landing page mockup */
body {
  background: #ffffff;
}

main {
  display: flex;
  flex-direction: column;
}

#home {
  order: 1;
}

.home-rule {
  order: 2;
}

#experience {
  order: 3;
}

#achievements {
  order: 4;
}

#projects {
  order: 5;
}

#education {
  order: 6;
}

#skills {
  order: 7;
}

#contact {
  order: 8;
}

.container {
  max-width: 1380px;
}

.navbar {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid #e4e4e7;
  box-shadow: none;
}

.nav-content {
  min-height: 78px;
  padding: 0 1.25rem;
}

.logo {
  color: #08080a;
  font-size: clamp(1.45rem, 2vw, 1.95rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-dot {
  margin-left: 6px;
  font-size: 1.1rem;
}

.nav-links {
  gap: clamp(24px, 3.2vw, 48px);
}

.nav-links a {
  position: relative;
  color: #08080a;
  font-size: 1.02rem;
  font-weight: 500;
  padding: 29px 0;
}

.nav-links a:first-child::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 38px;
  height: 2px;
  transform: translateX(-50%);
  background: #08080a;
}

.nav-icons {
  gap: 14px;
  color: #08080a;
}

.nav-icon-link,
.theme-toggle {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #08080a;
  background: transparent;
  border: 0;
  border-radius: 999px;
}

.nav-icon-link svg {
  width: 23px;
  height: 23px;
  fill: currentColor;
}

.theme-toggle {
  background: #f7f7f8;
  border: 1px solid #ececef;
}

.theme-toggle:hover,
.nav-icon-link:hover {
  color: #08080a;
  background: #f1f1f3;
}

.hero {
  min-height: calc(100svh - 78px);
  padding: 54px 0 34px;
  background: #ffffff;
  text-align: left;
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  grid-template-areas:
    "copy visual"
    "metrics metrics"
    "award award";
  gap: clamp(28px, 3.2vw, 44px) clamp(42px, 6vw, 82px);
  align-items: center;
  padding: 0 2rem;
}

.hero-copy-panel {
  grid-area: copy;
  text-align: left;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  margin-bottom: 28px;
  padding: 0 18px;
  color: #08080a;
  background: #ffffff;
  border: 1px solid #dfe1e6;
  border-radius: 999px;
  font-family: "Times New Roman", Times, serif;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-pill svg,
.hero-button svg,
.metric-icon svg,
.degree-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-pill svg {
  width: 18px;
  height: 18px;
}

.pill-dot {
  font-size: 1rem;
}

.hero-pill span {
  white-space: nowrap;
}

.hero-title {
  max-width: 760px;
  margin: 0 0 22px;
  color: #09090b;
  font-size: clamp(4rem, 5.35vw, 5.45rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.hero-title em {
  font-style: italic;
}

.hero-subtitle {
  max-width: 620px;
  margin: 0 0 28px;
  color: #4b5563;
  font-family: "Times New Roman", Times, serif;
  font-size: clamp(1.08rem, 1.5vw, 1.28rem);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.hero-button {
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 0 28px;
  border-radius: 8px;
  font-family: "Times New Roman", Times, serif;
  font-size: 1rem;
  font-weight: 800;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.hero-button svg {
  width: 24px;
  height: 24px;
}

.hero-button:hover {
  transform: translateY(-2px);
}

.hero-button-primary {
  color: #ffffff;
  background: #08080a;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.16);
}

.hero-button-secondary {
  color: #101114;
  background: #ffffff;
  border: 1px solid #cbd0d8;
}

.hero-visual-panel {
  position: relative;
  grid-area: visual;
  display: grid;
  justify-items: center;
  padding-top: 8px;
}

.hero-photo-frame {
  width: clamp(310px, 29vw, 390px);
  aspect-ratio: 1;
  overflow: hidden;
  background: #fff;
  border: 10px solid #ffffff;
  border-radius: 50%;
  box-shadow:
    0 0 0 1px #e4e4e7,
    0 24px 58px rgba(17, 24, 39, 0.14);
}

.hero-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.degree-card {
  position: absolute;
  left: 50%;
  bottom: -38px;
  min-width: 300px;
  display: flex;
  align-items: center;
  gap: 16px;
  transform: translateX(-32%);
  padding: 18px 22px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #eceef2;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.12);
}

.degree-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #ffffff;
  background: #09090b;
  border-radius: 999px;
}

.degree-icon svg {
  width: 30px;
  height: 30px;
}

.degree-card strong,
.degree-card span {
  display: block;
}

.degree-card strong {
  color: #08080a;
  font-family: "Times New Roman", Times, serif;
  font-size: 1rem;
}

.degree-card span {
  color: #4b5563;
  font-family: "Times New Roman", Times, serif;
  margin-top: 4px;
}

.hero-metrics {
  grid-area: metrics;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 0;
  padding: 26px 28px;
  background: #ffffff;
  border: 1px solid #e3e5ea;
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.07);
}

.metric-tile {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  min-height: 88px;
  padding: 0 26px;
  border-right: 1px solid #d7dbe2;
}

.metric-tile:first-child {
  padding-left: 0;
}

.metric-tile:last-child {
  padding-right: 0;
  border-right: 0;
}

.metric-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  color: #08080a;
  border-radius: 50%;
}

.metric-icon svg {
  width: 34px;
  height: 34px;
}

.metric-icon-gray {
  background: #f0f0f1;
}

.metric-icon-green {
  background: #eaf7ec;
}

.metric-icon-purple {
  color: #4f35c7;
  background: #f0eaff;
}

.metric-icon-gold {
  background: #fff3c8;
}

.metric-tile span,
.metric-tile p {
  color: #4b5563;
  font-family: "Times New Roman", Times, serif;
}

.metric-tile span {
  display: block;
  margin-bottom: 3px;
}

.metric-tile strong {
  display: block;
  color: #09090b;
  font-size: 1.32rem;
  line-height: 1.12;
}

.metric-tile p {
  margin: 8px 0 0;
}

.hero-scholarship-card {
  grid-area: award;
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: 30px 42px;
  background: #ffffff;
  border: 1px solid #e3e5ea;
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.05);
}

.award-mark {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 94px;
  border-right: 1px solid #d7dbe2;
  font-size: 3.1rem;
}

.award-mark::before,
.award-mark::after {
  content: "";
  position: absolute;
  width: 34px;
  height: 72px;
  border: 3px solid #08080a;
  border-top-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
}

.award-mark::before {
  left: 8px;
  transform: rotate(-22deg);
  border-right-color: transparent;
}

.award-mark::after {
  right: 30px;
  transform: rotate(22deg);
  border-left-color: transparent;
}

.award-mark span {
  position: relative;
  z-index: 1;
  color: #08080a;
}

.award-copy h2 {
  margin: 0 0 10px;
  color: #08080a;
  font-size: clamp(1.7rem, 2.3vw, 2.25rem);
  line-height: 1.1;
}

.award-copy p {
  max-width: 750px;
  margin: 0;
  color: #1f2937;
  font-size: 1.14rem;
  line-height: 1.45;
}

.award-button {
  min-width: 230px;
}

.home-rule {
  display: none;
}

body.dark-mode .navbar,
body.dark-mode .hero,
body.dark-mode .hero-shell,
body.dark-mode .hero-metrics,
body.dark-mode .hero-scholarship-card,
body.dark-mode .degree-card {
  background: var(--card);
}

body.dark-mode .hero-title,
body.dark-mode .logo,
body.dark-mode .nav-links a,
body.dark-mode .metric-tile strong,
body.dark-mode .award-copy h2,
body.dark-mode .award-mark span {
  color: var(--text);
}

@media (max-width: 1180px) {
  .hero-shell {
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "visual"
      "metrics"
      "award";
  }

  .hero-copy-panel {
    text-align: center;
  }

  .hero-title,
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .degree-card {
    left: 50%;
    transform: translateX(-50%);
  }

  .hero-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-tile:nth-child(2) {
    border-right: 0;
  }

  .metric-tile:nth-child(3),
  .metric-tile:nth-child(4) {
    padding-top: 24px;
    border-top: 1px solid #d7dbe2;
  }

  .metric-tile:nth-child(3) {
    padding-left: 0;
  }
}

@media (max-width: 760px) {
  .nav-content {
    min-height: 66px;
  }

  .nav-icons {
    display: none;
  }

  .hero {
    padding: 38px 0 32px;
  }

  .hero-shell {
    padding: 0 1.25rem;
    gap: 30px;
  }

  .hero-pill {
    justify-content: center;
    width: auto;
    max-width: 100%;
    min-height: 40px;
    gap: 8px;
    padding: 0 14px;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
  }

  .hero-title {
    font-size: clamp(3.1rem, 14vw, 4.2rem);
  }

  .hero-subtitle {
    font-size: 1.02rem;
  }

  .hero-button {
    width: 100%;
  }

  .hero-photo-frame {
    width: min(305px, 82vw);
  }

  .degree-card {
    position: relative;
    left: auto;
    bottom: auto;
    min-width: 0;
    width: min(315px, 92vw);
    margin-top: -28px;
    transform: none;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .metric-tile,
  .metric-tile:first-child,
  .metric-tile:last-child,
  .metric-tile:nth-child(3) {
    padding: 18px 0;
    border-right: 0;
    border-top: 1px solid #d7dbe2;
  }

  .metric-tile:first-child {
    border-top: 0;
    padding-top: 0;
  }

  .metric-tile:last-child {
    padding-bottom: 0;
  }

  .hero-scholarship-card {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 28px 22px;
    text-align: left;
  }

  .award-mark {
    min-height: 74px;
    border-right: 0;
    border-bottom: 1px solid #d7dbe2;
  }

  .award-button {
    min-width: 0;
  }
}
