/* Arnab Maitra — Personal Portfolio (plain CSS) */
:root {
  --background: #faf9f5;
  --foreground: #2a2a3d;
  --card: #fdfcf9;
  --card-foreground: #2a2a3d;
  --primary: #3b4a9a;
  --primary-foreground: #fdfcf9;
  --secondary: #f0eee8;
  --secondary-foreground: #3a3a4f;
  --muted: #f2f0ea;
  --muted-foreground: #6b6b80;
  --accent: #e0b84a;
  --accent-foreground: #2a2a3d;
  --border: #e5e2d9;
  --gold: #d4a84b;
  --navy: #1e2a5e;
  --radius: 0.5rem;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-serif: "Playfair Display", Georgia, serif;
  --max-w: 80rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

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

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

ul,
ol {
  list-style: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Utility */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

@media (min-width: 1024px) {
  .container {
    padding-inline: 2rem;
  }
}

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

/* ========== NAVBAR ========== */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 50;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background: color-mix(in srgb, var(--background) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-block: 0.75rem;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

@media (min-width: 1024px) {
  .nav {
    padding-inline: 2rem;
  }
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-img {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  opacity: 0; /* revealed after preloader animation */
  transition: opacity 0.2s ease;
}

.logo-img.visible {
  opacity: 1;
}

.footer-logo-img {
  opacity: 1;
}

/* logo-text removed from header by design */

/* ========== Preloader ========== */
body.preloading {
  overflow: hidden;
}

.preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--background);
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.preloader.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-logo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  will-change: transform;
  transform-origin: center center;
  transition: none; /* controlled by JS */
  box-shadow: 0 8px 32px rgba(30, 42, 94, 0.25);
}

@media (min-width: 640px) {
  .preloader-logo {
    width: 180px;
    height: 180px;
  }
}

/* Desktop / tablet nav with overflow More */
.nav-links-wrapper {
  display: none;
  align-items: center;
  gap: 0.15rem;
  flex: 1;
  min-width: 0;
  justify-content: flex-end;
}

@media (min-width: 768px) {
  .nav-links-wrapper {
    display: flex;
  }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
  min-width: 0;
}

.nav-links li {
  flex-shrink: 0;
}

.nav-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.nav-links a,
.more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 9999px;
  padding: 0.35rem 0.65rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
  border: none;
  background: transparent;
  cursor: pointer;
  line-height: 1.25;
}

.nav-links a:hover,
.more-btn:hover {
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 8%, transparent);
}

.nav-links a.active {
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary);
}

/* More dropdown */
.nav-more {
  position: relative;
  flex-shrink: 0;
}

.more-btn {
  padding-right: 0.5rem;
}

.more-chevron {
  width: 0.875rem;
  height: 0.875rem;
  transition: transform 0.2s ease;
}

.more-btn[aria-expanded="true"] .more-chevron {
  transform: rotate(180deg);
}

.more-dropdown {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  min-width: 11.5rem;
  max-height: min(70vh, 24rem);
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  box-shadow: 0 10px 40px rgba(30, 42, 94, 0.12);
  list-style: none;
  margin: 0;
  padding: 0.35rem;
  z-index: 60;
}

.more-dropdown[hidden] {
  display: none;
}

.more-dropdown a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.more-dropdown a:hover {
  background: var(--secondary);
  color: var(--primary);
}

.more-dropdown a.active {
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary);
}

.more-dropdown .nav-icon {
  width: 1rem;
  height: 1rem;
}

/* Hamburger — only on small screens */
.menu-btn {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  color: var(--navy);
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .menu-btn {
    display: none;
  }
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--background) 95%, transparent);
  backdrop-filter: blur(12px);
}

.mobile-menu.open {
  display: block;
}

.mobile-menu ul {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.25rem;
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 1rem 1.25rem;
  list-style: none;
}

@media (min-width: 640px) {
  .mobile-menu ul {
    grid-template-columns: repeat(3, 1fr);
  }
}

.mobile-menu a {
  display: block;
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font-sans);
  color: var(--muted-foreground);
}

.mobile-menu a.active {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--primary);
}

.mobile-menu a:hover {
  background: var(--secondary);
}

/* ========== HERO ========== */
.hero {
  position: relative;
  overflow: hidden;
  padding-top: 7rem;
  padding-bottom: 4rem;
}

@media (min-width: 1024px) {
  .hero {
    padding-top: 8.5rem;
    padding-bottom: 5.5rem;
    min-height: min(100vh, 52rem);
    display: flex;
    align-items: center;
  }
}

.hero .container.hero-grid {
  padding-inline: 1.5rem;
}

@media (min-width: 1024px) {
  .hero .container.hero-grid {
    padding-inline: 3rem;
  }
}

@media (min-width: 1280px) {
  .hero .container.hero-grid {
    padding-inline: 4rem;
  }
}

.hero-wash {
  pointer-events: none;
  position: absolute;
  z-index: -1;
  border-radius: 9999px;
  filter: blur(64px);
}

.hero-wash-1 {
  right: -6rem;
  top: -3rem;
  width: 34rem;
  height: 34rem;
  background: color-mix(in srgb, var(--primary) 6%, transparent);
}

.hero-wash-2 {
  left: -6rem;
  top: 10rem;
  width: 26rem;
  height: 26rem;
  background: color-mix(in srgb, var(--gold) 12%, transparent);
}

.hero-grid {
  display: grid;
  align-items: center;
  gap: 3rem;
  width: 100%;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(16rem, 20rem);
    column-gap: 2.25rem;
    row-gap: 2.5rem;
    align-items: center;
  }
}

@media (min-width: 1280px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(17rem, 21rem);
    column-gap: 2.75rem;
  }
}

.hero-grid > div:first-child {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
  min-width: 0;
}

.hero-greeting {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--navy);
  margin: 0;
  letter-spacing: -0.01em;
}

.hero-name {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--primary);
  text-wrap: balance;
  margin: 0.4rem 0 0;
}

.hero-tagline {
  max-width: 36rem;
  margin: 1.35rem 0 0;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--muted-foreground);
  text-wrap: pretty;
}

.social-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 2rem;
}

.social-btn {
  display: grid;
  place-items: center;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 9999px;
  color: white;
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

.social-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.12);
}

.social-btn svg {
  width: 1.15rem;
  height: 1.15rem;
}

.social-text {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  color: #fff;
}

.social-divider {
  width: 1px;
  height: 1.6rem;
  background: color-mix(in srgb, var(--navy) 15%, transparent);
  margin-inline: 0.35rem;
  flex-shrink: 0;
}

.badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 9999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
}

.badge-btn:hover {
  filter: brightness(1.05);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  margin-top: 1.75rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 9999px;
  background: var(--navy);
  color: white;
  padding: 0.85rem 1.6rem;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgb(30 42 94 / 0.2);
  transition: background 0.2s, transform 0.2s;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: color-mix(in srgb, var(--navy) 90%, white);
  transform: translateY(-1px);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: #f3f1ec;
  color: var(--navy);
  padding: 0.85rem 1.6rem;
  font-size: 0.9rem;
  font-weight: 600;
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}

.btn-outline:hover {
  border-color: color-mix(in srgb, var(--primary) 35%, transparent);
  background: #ffffff;
}

.btn-primary svg,
.btn-outline svg {
  width: 1rem;
  height: 1rem;
}

.dropdown {
  position: relative;
}

.dropdown-panel {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 0.5rem);
  z-index: 20;
  min-width: 14rem;
  overflow: hidden;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: 0 10px 25px rgb(0 0 0 / 0.1);
}

.dropdown-panel.open {
  display: block;
}

.dropdown-panel a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--navy);
  border-bottom: 1px solid var(--border);
}

.dropdown-panel a:last-child {
  border-bottom: none;
}

.dropdown-panel a:hover {
  background: var(--secondary);
}

.dropdown-panel a svg {
  width: 1rem;
  height: 1rem;
  color: var(--primary);
  flex-shrink: 0;
}

.chevron {
  transition: transform 0.2s;
}

.chevron.rotated {
  transform: rotate(180deg);
}

.hero-portrait {
  display: flex;
  justify-content: center;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-portrait {
    justify-content: center;
    align-self: center;
    /* shift portrait a little to the left */
    transform: translateX(-1.75rem);
  }
}

@media (min-width: 1280px) {
  .hero-portrait {
    transform: translateX(-2.5rem);
  }
}

.portrait-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portrait-glow {
  position: absolute;
  inset: -12%;
  z-index: -1;
  border-radius: 9999px;
  background: color-mix(in srgb, var(--gold) 28%, transparent);
  filter: blur(40px);
}

.portrait-frame {
  border-radius: 9999px;
  border: 3px solid var(--gold);
  background: #ffffff;
  padding: 0.35rem;
  box-shadow: 0 18px 48px rgb(30 42 94 / 0.14);
}

.portrait-frame img {
  width: 14.5rem;
  height: 14.5rem;
  border-radius: 9999px;
  object-fit: cover;
  object-position: center top;
  background: var(--navy);
  display: block;
}

@media (min-width: 640px) {
  .portrait-frame img {
    width: 17rem;
    height: 17rem;
  }
}

@media (min-width: 1024px) {
  .portrait-frame img {
    width: 18.75rem;
    height: 18.75rem;
  }
}

@media (min-width: 1280px) {
  .portrait-frame img {
    width: 19.5rem;
    height: 19.5rem;
  }
}

/* ========== SECTIONS ========== */
.section {
  scroll-margin-top: 6rem;
  padding-block: 5rem;
  border-top: 1px solid var(--border);
}

@media (min-width: 1024px) {
  .section {
    padding-block: 7rem;
  }
}

/*
  Alternating section backgrounds (flexible):
  - Hero (#top) is the 1st <section> under main — left unchanged
  - 2nd section (About) = white
  - 3rd section (Skills) = hero cream background
  - and so on…
  Adding/removing sections automatically keeps the pattern.
*/
main > section.section:nth-of-type(even) {
  background: #ffffff;
}

main > section.section:nth-of-type(odd) {
  background: var(--background); /* same cream as hero / page */
}

/* Cards on cream sections: pure white so they stand out */
main > section.section:nth-of-type(odd) :is(
  .fact-card,
  .tools-card,
  .interest-card,
  .highlight-card,
  .pub-card,
  .project-card,
  .experience-card,
  .cert-card,
  .info-card,
  .blog-intro,
  .featured-article,
  .empty-state
) {
  background: #ffffff;
}

.section-heading {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.section-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--primary);
}

.section-eyebrow::before {
  content: "";
  display: block;
  width: 1.5rem;
  height: 1px;
  background: var(--gold);
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  color: var(--navy);
  text-wrap: balance;
}

.section-desc {
  max-width: 42rem;
  color: var(--muted-foreground);
  line-height: 1.7;
  text-wrap: pretty;
}

/* About */
.about-grid {
  display: grid;
  gap: 2.5rem;
  margin-top: 2.5rem;
}

@media (min-width: 1024px) {
  .about-grid {
    grid-template-columns: 1.6fr 1fr;
  }
}

.about-text p {
  color: color-mix(in srgb, var(--foreground) 80%, transparent);
  line-height: 1.75;
  text-wrap: pretty;
}

.about-text p + p {
  margin-top: 1.25rem;
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  align-self: start;
}

.fact-card {
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 1rem;
  transition: border-color 0.2s;
}

.fact-card:hover {
  border-color: color-mix(in srgb, var(--primary) 30%, transparent);
}

.fact-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
}

.fact-value {
  margin-top: 0.375rem;
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--navy);
}

/* Skills — two white cards (Core Proficiencies + Tools) */
.skills-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.5rem;
  align-items: start;
}

@media (min-width: 900px) {
  .skills-grid {
    grid-template-columns: 1.35fr 1fr;
  }
}

.skills-card,
.tools-card {
  border-radius: 1.25rem;
  border: 1px solid var(--border);
  background: #ffffff;
  padding: 1.75rem 1.75rem 1.5rem;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.03);
}

.skills-card .skills-card-title,
.tools-card .skills-card-title {
  margin: 0 0 1.5rem;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.skill-bars {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.skill-item {
  width: 100%;
}

.skill-bar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
  gap: 0.75rem;
}

.skill-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: color-mix(in srgb, var(--foreground) 90%, transparent);
}

.skill-level {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted-foreground);
  flex-shrink: 0;
}

.skill-track {
  height: 0.45rem;
  overflow: hidden;
  border-radius: 9999px;
  background: #e8eaf0;
}

.skill-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #4f6ef7, #3b4a9a);
  width: 0;
  transition: width 1s ease-out;
}

.tools-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.tool-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: #fafbfc;
  padding: 0.4rem 0.85rem 0.4rem 0.55rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--foreground);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.tool-tag:hover {
  border-color: color-mix(in srgb, var(--primary) 35%, transparent);
  background: #ffffff;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.04);
}

.tool-icon {
  display: inline-grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  flex-shrink: 0;
  font-size: 0.55rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.tool-python { background: linear-gradient(135deg, #3776ab 50%, #ffd43b 50%); }
.tool-python::after { content: "Py"; font-size: 0.45rem; color: #fff; }
.tool-pytorch { background: #ee4c2c; }
.tool-pytorch::after { content: "🔥"; font-size: 0.6rem; }
.tool-tf { background: #ff6f00; }
.tool-tf::after { content: "TF"; font-size: 0.45rem; }
.tool-sklearn { background: #f89939; }
.tool-sklearn::after { content: "sk"; font-size: 0.5rem; }
.tool-pandas { background: #150458; }
.tool-pandas::after { content: "pd"; font-size: 0.5rem; }
.tool-mpl { background: #11557c; }
.tool-mpl::after { content: "mpl"; font-size: 0.4rem; }
.tool-numpy { background: #4d77cf; }
.tool-numpy::after { content: "np"; font-size: 0.5rem; }
.tool-r { background: #276dc3; }
.tool-r::after { content: "R"; font-size: 0.65rem; }
.tool-matlab { background: #e8782c; }
.tool-matlab::after { content: "M"; font-size: 0.6rem; }
.tool-git { background: #f05033; }
.tool-git::after { content: "git"; font-size: 0.4rem; }

/* Cream-section override already forces white; reinforce for skills cards */
main > section.section:nth-of-type(odd) .skills-card,
main > section.section:nth-of-type(odd) .tools-card {
  background: #ffffff;
}

/* Interests */
.interests-grid {
  display: grid;
  gap: 1rem;
  margin-top: 2.5rem;
}

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

@media (min-width: 1024px) {
  .interests-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.interest-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 1.25rem;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.interest-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--primary) 40%, transparent);
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.05);
}

.interest-icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
  border-radius: 0.5rem;
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--primary);
  transition: background 0.2s, color 0.2s;
}

.interest-card:hover .interest-icon {
  background: var(--primary);
  color: var(--primary-foreground);
}

.interest-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.interest-label {
  font-weight: 500;
  line-height: 1.4;
  color: var(--navy);
}

/* Academics */
.academics-grid {
  display: grid;
  gap: 3rem;
  margin-top: 3rem;
}

@media (min-width: 1024px) {
  .academics-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.academics-grid h3 {
  margin-bottom: 1.5rem;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--navy);
}

.timeline {
  position: relative;
  border-left: 2px solid var(--border);
  padding-left: 2rem;
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -2.7rem;
  top: 0.15rem;
  display: grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 9999px;
  border: 2px solid var(--gold);
  background: var(--background);
}

.timeline-dot span {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: var(--primary);
}

.period-badge {
  display: inline-block;
  border-radius: 9999px;
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  padding: 0.125rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
}

.timeline-degree {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--navy);
}

.timeline-degree svg {
  width: 1rem;
  height: 1rem;
  color: var(--gold);
  flex-shrink: 0;
}

.timeline-inst {
  margin-top: 0.125rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Academic Highlights panel (cream card, list rows) */
.highlights-panel {
  border-radius: 1rem;
  background: #f5efd6;
  border: 1px solid color-mix(in srgb, var(--gold) 25%, var(--border));
  padding: 1.15rem 1.15rem 0.75rem;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.04);
  max-width: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.highlights-panel-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  flex-shrink: 0;
}

.highlights-pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  flex-shrink: 0;
  height: 1.35rem;
  line-height: 0;
}

.highlights-pin svg {
  width: 1rem;
  height: 1rem;
  display: block;
  transform: translateY(0.05em);
}

.highlights-panel-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.01em;
  line-height: 1.35rem;
  display: flex;
  align-items: center;
}

.highlights-panel-divider {
  height: 1px;
  background: color-mix(in srgb, var(--navy) 12%, transparent);
  margin-bottom: 0.35rem;
  flex-shrink: 0;
}

.highlights-viewport {
  position: relative;
  height: 16rem;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, transparent 0%, #000 8%, #000 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 8%, #000 92%, transparent 100%);
}

.highlights-list {
  display: flex;
  flex-direction: column;
  will-change: transform;
}

.highlight-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 0.15rem;
  border-bottom: 1px dashed color-mix(in srgb, var(--navy) 14%, transparent);
  flex-shrink: 0;
  box-sizing: border-box;
}

.highlight-row:last-child {
  border-bottom: 1px dashed color-mix(in srgb, var(--navy) 14%, transparent);
}

.highlights-panel:hover .highlights-list.is-scrolling {
  animation-play-state: paused;
}

@keyframes highlights-scroll {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}

.highlights-list.is-scrolling {
  animation: highlights-scroll 28s linear infinite;
}

.highlight-icon-circle {
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  flex-shrink: 0;
  border-radius: 9999px;
  background: color-mix(in srgb, #e8a04a 22%, #fff);
  color: #c46a12;
  margin-top: 0.1rem;
}

.highlight-icon-circle svg {
  width: 1rem;
  height: 1rem;
}

.highlight-body {
  flex: 1;
  min-width: 0;
}

.highlight-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.highlight-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
}

.highlight-date {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--navy);
  opacity: 0.85;
  white-space: nowrap;
}

.highlight-sub {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--muted-foreground);
}

/* keep cream-section cards white rule from applying a harsh white on this panel */
main > section.section:nth-of-type(odd) .highlights-panel {
  background: #f5efd6;
}

/* View All — centered under section content so it stays visible */
.view-all-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2.25rem;
  width: 100%;
}

.btn-view-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--navy);
  padding: 0.7rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.04);
}

.btn-view-all:hover {
  border-color: color-mix(in srgb, var(--primary) 40%, transparent);
  background: color-mix(in srgb, var(--primary) 6%, #fff);
  color: var(--primary);
  box-shadow: 0 2px 10px rgb(30 42 94 / 0.08);
}

.btn-view-all svg {
  width: 0.95rem;
  height: 0.95rem;
}

/* ========== Section detail page (View All) ========== */
.section-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.section-page-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--background) 92%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 0;
}

.section-page-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.section-page-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
}

.section-page-back:hover {
  color: var(--primary);
}

.section-page-back svg {
  width: 1rem;
  height: 1rem;
}

.section-page-main {
  flex: 1;
  padding-block: 3.5rem 5rem;
}

.section-page-heading {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 2.75rem;
}

.section-page-heading .section-title {
  margin: 0 0 0.65rem;
}

.section-page-heading .section-desc {
  margin: 0 auto;
  max-width: 36rem;
  text-align: center;
}

.section-page-body {
  max-width: 52rem;
  margin: 0 auto;
}

.section-page-body .pubs-list,
.section-page-body .projects-grid,
.section-page-body .certs-grid-3,
.section-page-body .cards-grid-2,
.section-page-body .experience-timeline,
.section-page-body .timeline {
  margin-top: 0;
}

.section-page-body .certs-grid-3 {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .section-page-body .certs-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .section-page-body .certs-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.section-page-body .projects-grid {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .section-page-body .projects-grid {
    grid-template-columns: 1fr;
  }
}

.section-page-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted-foreground);
}

/* Cleaner list layout on section detail pages (View all) */
.section-page-body .pubs-list {
  gap: 0;
  background: #fff;
  border-radius: 1rem;
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.03);
}

.section-page-body .pub-card {
  border: none;
  border-radius: 0;
  box-shadow: none;
  border-bottom: 1px solid var(--border);
  padding: 1.75rem 1.75rem;
  background: transparent;
}

.section-page-body .pub-card:last-child {
  border-bottom: none;
}

.section-page-body .projects-grid .project-card {
  max-width: 40rem;
  margin-inline: auto;
  width: 100%;
}

.section-page-body .cards-grid-2 {
  max-width: 44rem;
  margin-inline: auto;
}

.section-page-body .experience-timeline {
  max-width: 40rem;
  margin-inline: auto;
}

.section-page-body .timeline {
  max-width: 36rem;
  margin-inline: auto;
  text-align: left;
}

/* Publications */
.pubs-list {
  display: grid;
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.pub-card {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.pub-card:hover {
  border-color: color-mix(in srgb, var(--primary) 40%, transparent);
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.05);
}

@media (min-width: 1024px) {
  .pub-card {
    padding: 1.75rem;
  }
}

.pub-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.badge {
  border-radius: 9999px;
  padding: 0.125rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-primary {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--primary);
}

.badge-published {
  background: color-mix(in srgb, var(--gold) 20%, transparent);
  color: var(--navy);
}

.badge-submitted {
  border: 1px solid var(--border);
  background: var(--secondary);
  color: var(--muted-foreground);
}

.pub-title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--navy);
  text-wrap: balance;
}

@media (min-width: 1024px) {
  .pub-title {
    font-size: 1.25rem;
  }
}

.pub-abstract {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--muted-foreground);
  text-wrap: pretty;
}

.pub-authors {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: color-mix(in srgb, var(--foreground) 80%, transparent);
}

.pub-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.pub-meta span {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.pub-meta svg {
  width: 0.875rem;
  height: 0.875rem;
  color: var(--gold);
}

.pub-pdf {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 600;
  color: var(--primary);
}

.pub-pdf:hover {
  text-decoration: underline;
}

/* Projects */
.projects-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

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

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

.project-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--primary) 40%, transparent);
  box-shadow: 0 8px 20px rgb(0 0 0 / 0.08);
}

@media (min-width: 1024px) {
  .project-card {
    padding: 1.75rem;
  }
}

.project-period {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
}

.project-period svg {
  width: 0.875rem;
  height: 0.875rem;
  color: var(--gold);
}

.project-title {
  margin-top: 0.75rem;
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--navy);
  text-wrap: balance;
}

@media (min-width: 1024px) {
  .project-title {
    font-size: 1.25rem;
  }
}

.project-desc {
  margin-top: 0.5rem;
  flex: 1;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--muted-foreground);
  text-wrap: pretty;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.project-tag {
  border-radius: 0.375rem;
  border: 1px solid var(--border);
  background: var(--secondary);
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--secondary-foreground);
}

/* Work Experience Timeline */

.experience-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 2rem;
}

.experience-item {
  position: relative;
  display: grid;
  grid-template-columns: 8rem 2rem 1fr;
  align-items: stretch;
  min-height: 8rem;
}

/* Year */

.experience-year {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding-top: 1.5rem;
  padding-right: 1rem;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary);
  text-align: right;
}

/* Timeline */

.experience-marker {
  position: relative;
  display: flex;
  justify-content: center;
}

.experience-marker::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: -0.5rem;
  width: 2px;
  background: var(--border);
}

.experience-marker::after {
  content: "";
  position: absolute;
  top: 1.45rem;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--card);
  box-shadow: 0 0 0 1px var(--primary);
}

/* Card */

.experience-card {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-left: 1rem;
  margin-bottom: 0.5rem;
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 0;
  transition:
    transform 0.2s,
    box-shadow 0.2s,
    border-color 0.2s;
}

.experience-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.05);
  border-color: color-mix(
    in srgb,
    var(--primary) 35%,
    transparent
  );
}

/* Icon */

.experience-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--primary);
}

.experience-icon svg {
  width: 1.75rem;
  height: 1.75rem;
}

/* Content */

.experience-content {
  flex: 1;
  min-width: 0;
}

.experience-content h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--navy);
}

.experience-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.45rem;
  font-size: 0.8rem;
  color: var(--muted-foreground);
}

.experience-company {
  font-weight: 600;
  color: var(--primary);
}

.experience-separator {
  color: var(--muted-foreground);
}

.experience-content p {
  max-width: 52rem;
  margin: 0.85rem 0 0;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--muted-foreground);
}


/* Mobile */

@media (max-width: 767px) {
  .experience-item {
    grid-template-columns: 2.25rem 1fr;
  }

  .experience-year {
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding: 0 0 0.5rem 2.75rem;
    text-align: left;
  }

  .experience-marker {
    grid-column: 1;
    grid-row: 2;
  }

  .experience-card {
    grid-column: 2;
    grid-row: 2;
    margin-left: 0;
    padding: 1.25rem;
    gap: 1rem;
  }

  .experience-marker::before {
    bottom: -1rem;
  }

  .experience-marker::after {
    top: 1.25rem;
  }
}

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.5rem;
  border-radius: 1rem;
  border: 1px dashed var(--border);
  background: var(--card);
  padding: 4rem 1.5rem;
  text-align: center;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--primary);
}

.empty-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.empty-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--navy);
}

.empty-text {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.empty-text svg {
  width: 1rem;
  height: 1rem;
  color: var(--gold);
}

/* Certificates */
.cert-subtitle {
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--navy);
}

.certs-grid-2 {
  display: grid;
  gap: 1.25rem;
}

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

.certs-grid-3 {
  display: grid;
  gap: 1.25rem;
}

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

@media (min-width: 1024px) {
  .certs-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.cert-card {
  display: flex;
  flex-direction: column;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.cert-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.05);
  border-color: color-mix(in srgb, var(--primary) 40%, transparent);
}

.cert-card.featured {
  border-color: color-mix(in srgb, var(--gold) 50%, transparent);
}

.cert-card.featured:hover {
  border-color: color-mix(in srgb, var(--gold) 50%, transparent);
}

.cert-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.cert-icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--primary);
}

.cert-card.featured .cert-icon {
  background: color-mix(in srgb, var(--gold) 20%, transparent);
  color: var(--navy);
}

.cert-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.cert-date {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted-foreground);
}

.cert-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--navy);
  text-wrap: balance;
}

.cert-issuer {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary);
}

.cert-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.75rem;
}

.cert-skill {
  border-radius: 0.25rem;
  border: 1px solid var(--border);
  background: var(--secondary);
  padding: 0.125rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--secondary-foreground);
}

.cert-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.75rem;
}

.cert-footer:not(:has(.cert-no)) {
  justify-content: flex-end;
}

.cert-no {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6875rem;
  color: var(--muted-foreground);
}

.cert-no svg {
  width: 0.75rem;
  height: 0.75rem;
}

.cert-link {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
}

.cert-link:hover {
  text-decoration: underline;
}

.cert-link svg {
  width: 0.75rem;
  height: 0.75rem;
}

/* Talks / Memberships / Responsibility cards */
.cards-grid-2 {
  display: grid;
  gap: 1.25rem;
  margin-top: 2.5rem;
}

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

.cards-grid-3 {
  display: grid;
  gap: 1.25rem;
  margin-top: 2.5rem;
}

@media (min-width: 768px) {
  .cards-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.info-card {
  display: flex;
  flex-direction: column;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 1.5rem;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.info-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--primary) 40%, transparent);
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.05);
}

.info-card.horizontal {
  flex-direction: row;
  align-items: flex-start;
  gap: 1rem;
}

.info-icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
  border-radius: 0.75rem;
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--primary);
}

.info-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.info-card > .info-icon {
  margin-bottom: 0;
}

.info-card:not(.horizontal) > .info-icon {
  margin-bottom: 0;
}

.info-card:not(.horizontal) .info-icon + * {
  margin-top: 1rem;
}

.info-title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--navy);
}

.info-meta {
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.info-meta .role {
  font-weight: 500;
  color: var(--primary);
}

.info-meta .sep {
  color: var(--muted-foreground);
}

.info-meta .period {
  color: var(--muted-foreground);
}

.info-detail {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--muted-foreground);
  text-wrap: pretty;
}

/* Blog */
.blog-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

@media (min-width: 1024px) {
  .blog-grid {
    grid-template-columns: 1fr 1.6fr;
  }
}

.blog-intro {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  border-radius: 1rem;
  background: var(--navy);
  padding: 1.75rem;
  color: var(--background);
}

.blog-intro svg {
  width: 2rem;
  height: 2rem;
  color: var(--gold);
}

.blog-intro-title {
  margin-top: 1rem;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--background);
}

.blog-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.blog-lang {
  border-radius: 9999px;
  border: 1px solid color-mix(in srgb, var(--background) 25%, transparent);
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: color-mix(in srgb, var(--background) 80%, transparent);
}

.blog-cta {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 0.5rem;
  border-radius: 9999px;
  background: var(--gold);
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy);
  transition: transform 0.2s;
}

.blog-cta:hover {
  transform: translateY(-2px);
}

.blog-cta svg {
  width: 1rem;
  height: 1rem;
  color: var(--navy);
}

.featured-article {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 1.75rem;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.featured-article:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--primary) 40%, transparent);
  box-shadow: 0 8px 20px rgb(0 0 0 / 0.08);
}

.featured-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
}

.featured-tag {
  border-radius: 9999px;
  background: color-mix(in srgb, var(--gold) 20%, transparent);
  padding: 0.125rem 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--navy);
}

.featured-date,
.featured-time {
  color: var(--muted-foreground);
}

.featured-time {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.featured-time svg {
  width: 0.875rem;
  height: 0.875rem;
}

.featured-title {
  margin-top: 1rem;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--navy);
  text-wrap: balance;
}

.featured-excerpt {
  margin-top: 0.75rem;
  line-height: 1.7;
  color: var(--muted-foreground);
  text-wrap: pretty;
}

.featured-link {
  margin-top: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
}

.featured-link svg {
  width: 1rem;
  height: 1rem;
  transition: transform 0.2s;
}

.featured-article:hover .featured-link svg {
  transform: translate(2px, -2px);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--navy);
  color: color-mix(in srgb, var(--background) 80%, transparent);
}

.footer-grid {
  display: grid;
  gap: 2.5rem;
  padding-block: 3.5rem;
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1.6fr 1fr 1fr;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-brand .logo-img {
  width: 2.75rem;
  height: 2.75rem;
}

.footer-name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--background);
}

.footer-role {
  font-size: 0.875rem;
  color: var(--gold);
}

.footer-desc {
  margin-top: 1rem;
  max-width: 28rem;
  font-size: 0.875rem;
  line-height: 1.7;
  color: color-mix(in srgb, var(--background) 70%, transparent);
}

.footer-address {
  margin-top: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: color-mix(in srgb, var(--background) 70%, transparent);
}

.footer-address svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  margin-top: 0.125rem;
  color: var(--gold);
}

.footer-emails {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.footer-emails a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: color-mix(in srgb, var(--background) 70%, transparent);
  transition: color 0.2s;
}

.footer-emails a:hover {
  color: var(--gold);
}

.footer-emails svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: var(--gold);
}

.footer-col-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gold);
}

.footer-sections {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-flow: row;
  gap: 0.5rem 1.25rem;
  list-style: none;
  padding: 0;
  margin-left: 0;
}

.footer-sections a {
  font-size: 0.875rem;
  color: color-mix(in srgb, var(--background) 70%, transparent);
  transition: color 0.2s;
}

.footer-sections a:hover {
  color: var(--background);
}

.footer-links {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: color-mix(in srgb, var(--background) 70%, transparent);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--background);
}

.footer-links svg {
  width: 0.875rem;
  height: 0.875rem;
}

.footer-bottom {
  border-top: 1px solid color-mix(in srgb, var(--background) 10%, transparent);
  padding-block: 1.25rem;
  text-align: center;
  font-size: 0.875rem;
  color: color-mix(in srgb, var(--background) 60%, transparent);
}

/* Icon sizes helper */
.icon-sm {
  width: 1rem;
  height: 1rem;
}

.icon-md {
  width: 1.25rem;
  height: 1.25rem;
}
