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

/*
  Define CSS custom properties (variables) for both dark and light themes.  These
  variables control base backgrounds, text colours, borders and accents.  The
  default values apply the dark theme.  When the <body> element has the
  `light` class, the variables are overridden to provide a light colour
  palette.  Using variables makes it easy to support a theme toggle via JS
  without rewriting style rules.
*/
:root {
  --bg: #0b0c10;
  --bg-header: rgba(11, 12, 16, 0.8);
  --bg-card: rgba(21, 23, 32, 0.9);
  --bg-soft: rgba(21, 23, 32, 0.8);
  --text-primary: #f5f5f7;
  --text-secondary: #c3c6d4;
  --border-color: rgba(255, 255, 255, 0.08);
  --tag-bg: rgba(79, 70, 229, 0.12);
  --tag-text: #a5b4fc;
  --btn-primary-bg: linear-gradient(120deg, #4f46e5, #a855f7);
}

body.light {
  --bg: #f7f8fa;
  --bg-header: rgba(255, 255, 255, 0.85);
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-soft: rgba(245, 246, 248, 0.9);
  --text-primary: #1a1c29;
  --text-secondary: #4b4f5f;
  --border-color: rgba(0, 0, 0, 0.08);
  --tag-bg: rgba(79, 70, 229, 0.15);
  --tag-text: #4f46e5;
  --btn-primary-bg: linear-gradient(120deg, #6366f1, #c084fc);
}

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

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  /* Use theme variables for body background and text */
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
}

/* Accessibility: Better focus styles for keyboard navigation */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--tag-text);
  outline-offset: 2px;
  border-radius: 4px;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.6em;
  line-height: 1.2;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Typography */
.hero__title {
  font-size: clamp(1.8rem, 4vw + 1rem, 2.5rem);
  font-weight: 700;
  margin-bottom: 0.6em;
}

.hero__subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1.2em;
  max-width: 640px;
}

.section__title {
  font-size: clamp(1.4rem, 3vw + 1rem, 2rem);
  font-weight: 600;
  margin-bottom: 0.4em;
}

.section__subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 2em;
  max-width: 680px;
}

.card__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.4em;
}

.card__desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.8em;
}

.card__subtitle {
  font-size: 1rem;
  font-weight: 500;
  margin: 0.8em 0 0.4em;
}

/* Layout utilities */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.2rem;
}

.section {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--border-color);
}

/* Navigation */
.header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 999;
  backdrop-filter: blur(14px);
  background: linear-gradient(
    180deg,
    rgba(5, 6, 12, 0.93) 0%,
    rgba(5, 6, 12, 0.85) 40%,
    transparent 100%
  );
  border-bottom: 1px solid rgba(71, 85, 105, 0.35);
}

body.light .header {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.93) 0%,
    rgba(255, 255, 255, 0.85) 40%,
    transparent 100%
  );
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

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

.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 600;
  font-size: 1rem;
}

.nav__brand::before {
  content: "";
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: radial-gradient(circle at 30% 20%, #a5b4fc, #4f46e5);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.35);
  flex-shrink: 0;
}

.nav__right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 8px;
  transition: all 0.3s ease;
}

.nav__toggle:hover {
  background: var(--bg-secondary);
  border-color: var(--accent-color);
}

.nav__toggle-line {
  width: 16px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin: 0;
  padding: 0;
}

.nav__link {
  color: var(--text-secondary);
  font-size: 0.9rem;
  position: relative;
  text-decoration: none;
  transition: color 0.18s ease-out;
  padding: 4px 0;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #818cf8, #a855f7);
  transition: width 0.18s ease-out;
}

.nav__link:hover {
  color: var(--text-primary);
}

.nav__link:hover::after {
  width: 18px;
}

.nav__link.active {
  color: var(--text-primary);
  font-weight: 500;
}

.nav__link.active::after {
  width: 18px;
}

/* Hero */
.hero {
  text-align: left;
  padding-top: 3rem;
  padding-bottom: 4rem;
  background: radial-gradient(
    circle at top,
    #1d2235 0%,
    #05060a 55%,
    #020308 100%
  );
}

/* Provide a softer hero background for light mode */
body.light .hero {
  background: radial-gradient(
    circle at top,
    #e6ebf5 0%,
    #f6f8fc 60%,
    #ffffff 100%
  );
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.2fr);
  gap: 2rem;
  align-items: center;
}

.hero__left {
  display: flex;
  flex-direction: column;
}

.section__label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-secondary);
  margin-bottom: 0.8rem;
  font-weight: 500;
}

.hero__title .accent {
  background: linear-gradient(120deg, #a855f7, #4f46e5, #22c55e);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero__cta {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.hero__meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.stats--hero {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.stat {
  background-color: var(--bg-soft);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
  flex: 1 1 150px;
  min-width: 120px;
  text-align: left;
}

body.light .stat {
  background-color: #ffffff;
  border: 1px solid rgba(79, 70, 229, 0.15);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.08);
}

.stat__value {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.stat__label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Hero right card */
.hero__right {
  position: relative;
}

.hero__card {
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: radial-gradient(circle at top, #1f2937 0%, #020617 60%);
  padding: 1.2rem;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

body.light .hero__card {
  background: radial-gradient(circle at top, #ffffff 0%, #f8f9fc 60%);
  border: 1px solid rgba(79, 70, 229, 0.2);
  box-shadow: 0 18px 45px rgba(79, 70, 229, 0.1);
}

.hero__card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(
      circle at 10% 0%,
      rgba(96, 165, 250, 0.28),
      transparent 55%
    ),
    radial-gradient(
      circle at 80% 100%,
      rgba(129, 140, 248, 0.3),
      transparent 55%
    );
  opacity: 0.65;
  pointer-events: none;
  z-index: 0;
}

body.light .hero__card::before {
  background: radial-gradient(
      circle at 10% 0%,
      rgba(129, 140, 248, 0.15),
      transparent 55%
    ),
    radial-gradient(
      circle at 80% 100%,
      rgba(168, 85, 247, 0.15),
      transparent 55%
    );
  opacity: 0.8;
}

.hero__card > * {
  position: relative;
  z-index: 1;
}

.hero__profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.hero__profile-main {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.hero__avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 2px solid rgba(199, 210, 254, 0.8);
  background: radial-gradient(circle at 30% 20%, #e0e7ff, #4f46e5);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.45);
  flex-shrink: 0;
}

body.light .hero__avatar {
  border: 2px solid rgba(79, 70, 229, 0.5);
  background: radial-gradient(circle at 30% 20%, #c7d2fe, #6366f1);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.hero__profile-name {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
}

.hero__profile-role {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

.hero__location {
  font-size: 0.7rem;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.8);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

body.light .hero__location {
  background: rgba(238, 242, 255, 0.9);
  border: 1px solid rgba(79, 70, 229, 0.3);
}

.hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.hero__tags .tag {
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
}

body.light .hero__tags .tag {
  background: rgba(238, 242, 255, 0.9);
  border: 1px solid rgba(79, 70, 229, 0.3);
  color: #4f46e5;
}

.hero__stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.hero__stat-card {
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.9);
  padding: 0.6rem 0.7rem;
}

body.light .hero__stat-card {
  background: rgba(238, 242, 255, 0.8);
  border: 1px solid rgba(79, 70, 229, 0.25);
}

.hero__stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
}

.hero__stat-value {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  line-height: 1.3;
}

.hero__stat-sub {
  font-size: 0.7rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

/* Buttons */
.btn {
  display: inline-block;
  border-radius: 999px;
  padding: 0.6rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  user-select: none;
}

.btn--primary {
  background: var(--btn-primary-bg);
  color: var(--text-primary);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.3);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(79, 70, 229, 0.4);
}

.btn--secondary {
  background: var(--bg-soft);
  border-color: var(--border-color);
  color: var(--text-secondary);
}

.btn--secondary:hover {
  background-color: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-color);
}

/* Cards */
.cards {
  display: grid;
  gap: 1.5rem;
}

.cards--one {
  grid-template-columns: 1fr;
}

.cards--two {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.cards--three {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.4rem 1.2rem 1.2rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

body.light .card {
  background-color: #ffffff;
  border: 1px solid rgba(79, 70, 229, 0.15);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.08);
}

.card--project,
.card--resume,
.card--write,
.card--focus {
  color: inherit;
}

.card__list {
  color: #c3c6d4;
  font-size: 0.9rem;
  margin: 0;
  padding-left: 1.2rem;
}

body.light .card__list {
  color: #4b4f5f;
}

.card__list li {
  margin-bottom: 0.4em;
  position: relative;
}

.card__list li::before {
  content: "•";
  position: absolute;
  left: -1.2rem;
  color: #818cf8;
}

body.light .card__list li::before {
  color: #4f46e5;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background-color: var(--tag-bg);
  color: var(--tag-text);
}

body.light .tag {
  background-color: rgba(79, 70, 229, 0.12);
  color: #4f46e5;
}

/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.timeline__item {
  position: relative;
  padding-left: 2rem;
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #818cf8;
}

.timeline__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}

.timeline__title {
  font-size: 1rem;
  font-weight: 600;
}

.timeline__company,
.timeline__dates {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.timeline__details {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-left: -0.1rem;
}

.timeline__details li {
  margin-bottom: 0.5em;
}

/* Contact */
.contact__actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Footer */
.footer {
  padding: 2rem 0;
  background-color: var(--bg);
  border-top: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

.footer__links {
  display: flex;
  gap: 1rem;
}

.footer__links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.footer__links a:hover {
  color: var(--text-primary);
}

/* Theme toggle button */
.theme-toggle {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.9);
  cursor: pointer;
  transition: background 0.18s ease-out, transform 0.08s ease-out;
  font-size: 0.9rem;
  color: var(--text-primary);
  padding: 0;
  margin-left: 0.6rem;
}

.theme-toggle:hover {
  background: rgba(30, 64, 175, 0.9);
  transform: translateY(-1px);
}

body.light .theme-toggle {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.2);
}

body.light .theme-toggle:hover {
  background: rgba(225, 235, 255, 0.9);
}

/* Card images for design showcase */
.card__img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 0.8rem;
  object-fit: cover;
}

.card__img--tall {
  height: 330px;
}

/* Clickable design cards */
.card--clickable {
  cursor: pointer;
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
  position: relative;
}

.card--clickable:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.25);
}

body.light .card--clickable:hover {
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.2);
}

.card__hint {
  font-size: 0.75rem;
  color: var(--tag-text);
  margin-top: 0.8rem;
  text-align: center;
  opacity: 0.7;
  font-weight: 500;
}

.card--clickable:hover .card__hint {
  opacity: 1;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  animation: fadeIn 0.2s ease-out;
}

.modal.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}

body.light .modal__overlay {
  background: rgba(0, 0, 0, 0.6);
}

.modal__content {
  position: relative;
  max-width: 900px;
  margin: 2rem auto;
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
  animation: slideUp 0.3s ease-out;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

body.light .modal__content {
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(79, 70, 229, 0.2);
}

@keyframes slideUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-soft);
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease-out;
  z-index: 10;
  line-height: 1;
  padding: 0;
}

.modal__close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  transform: rotate(90deg);
}

.modal__header {
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.modal__title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
  padding-right: 2rem;
}

.modal__body {
  padding: 1.5rem;
}

.modal__gallery {
  position: relative;
  margin-bottom: 1.5rem;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-soft);
}

.modal__images {
  position: relative;
  width: 100%;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.modal__image-container {
  width: 100%;
  max-height: 600px;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  position: relative;
  scroll-behavior: smooth;
  border-radius: 8px;
}

.modal__image {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
}

.modal__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease-out;
  z-index: 10;
  line-height: 1;
  padding: 0;
  opacity: 0.9;
}

.modal__nav:hover {
  background: var(--bg-soft);
  opacity: 1;
  transform: translateY(-50%) scale(1.1);
}

.modal__nav--prev {
  left: 1rem;
}

.modal__nav--next {
  right: 1rem;
}

.modal__nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.modal__dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.modal__scroll-hint {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  padding: 0.6rem;
  background: var(--bg-soft);
  border-radius: 6px;
  opacity: 0.8;
}

.modal__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-color);
  cursor: pointer;
  transition: all 0.2s ease-out;
}

.modal__dot:hover {
  background: var(--tag-text);
}

.modal__dot.active {
  background: var(--tag-text);
  width: 24px;
  border-radius: 4px;
}

.modal__description {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.modal__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Responsive Navigation */
@media (max-width: 768px) {
  .nav__toggle {
    display: flex;
  }

  .nav__links {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background-color: var(--bg-card);
    border-top: 1px solid rgba(51, 65, 85, 0.7);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    flex-direction: column;
    width: 100%;
    padding: 0.8rem 1.2rem 1.2rem;
    gap: 0.6rem;
    display: none;
  }

  .nav__links.open {
    display: flex;
  }

  .nav__link {
    padding: 0.5rem 0;
  }

  /* Hero responsive */
  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
  }

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

/* Experience Section Styles */
.experience-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.experience-card {
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  padding: 1rem 1rem 0.9rem;
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out,
    border-color 0.2s ease-out;
}

.experience-card:hover {
  transform: translateY(-2px);
  border-color: rgba(129, 140, 248, 0.5);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.15);
}

body.light .experience-card {
  background-color: #ffffff;
  border: 1px solid rgba(79, 70, 229, 0.15);
}

body.light .experience-card:hover {
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.12);
}

.experience-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.experience-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.experience-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.experience-summary {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
  line-height: 1.5;
}

.experience-card ul {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  list-style: disc;
}

.experience-card li {
  margin-bottom: 0.3rem;
  line-height: 1.5;
}

.experience-card li + li {
  margin-top: 0.3rem;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.badge {
  font-size: 0.7rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-soft);
  color: var(--text-secondary);
  transition: all 0.2s ease-out;
}

.badge:hover {
  background: var(--tag-bg);
  color: var(--tag-text);
  border-color: var(--tag-text);
}

body.light .badge {
  background: rgba(238, 242, 255, 0.8);
  border: 1px solid rgba(79, 70, 229, 0.25);
  color: #4f46e5;
}

/* Responsive cards */
@media (max-width: 576px) {
  .cards--three {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .hero__title {
    font-size: 1.6rem;
  }

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

  .hero__location {
    width: 100%;
    justify-content: center;
  }

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

/* Modal responsive */
@media (max-width: 768px) {
  .modal__content {
    margin: 1rem;
    max-height: calc(100vh - 2rem);
  }

  .modal__header {
    padding: 1.2rem 1rem 0.8rem;
  }

  .modal__title {
    font-size: 1.2rem;
  }

  .modal__body {
    padding: 1rem;
  }

  .modal__images {
    min-height: 300px;
  }

  .modal__image-container {
    max-height: 400px;
  }

  .modal__nav {
    width: 36px;
    height: 36px;
    font-size: 1.5rem;
  }

  .modal__nav--prev {
    left: 0.5rem;
  }

  .modal__nav--next {
    right: 0.5rem;
  }
}
