:root {
  color-scheme: light;
  --bg: #070c0e;
  --panel: rgba(17, 23, 27, 0.6);
  --text: #f7f9fb;
  --muted: #9cb2c2;
  --accent: #2563eb;
  --accent-strong: #fb923c;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 10px 40px rgba(3, 6, 9, 0.55);
}

body[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f8fb;
  --panel: rgba(255, 255, 255, 0.85);
  --text: #0f172a;
  --muted: #475569;
  --accent: #0ea5e9;
  --accent-strong: #6366f1;
  --border: rgba(15, 23, 42, 0.08);
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    "Space Grotesk",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
}

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

.grid-background {
  position: fixed;
  inset: 0;
  background-image: radial-gradient(
      circle at center,
      rgba(73, 198, 229, 0.25),
      transparent 45%
    ),
    linear-gradient(transparent 96%, rgba(255, 255, 255, 0.2) 100%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size:
    100% 100%,
    100% 40px,
    40px 100%;
  opacity: 0.4;
  pointer-events: none;
  z-index: -2;
}

.site-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.25rem clamp(1.25rem, 5vw, 5rem);
  backdrop-filter: blur(24px);
  background-color: rgba(7, 12, 14, 0.65);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

body[data-theme="light"] .site-header {
  background-color: rgba(246, 248, 251, 0.9);
}

.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 999px;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
}

.site-nav a {
  color: var(--muted);
  transition: color 0.2s ease;
}

.site-nav a.active,
.site-nav a:hover {
  color: var(--accent);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle,
.language-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: inherit;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.theme-toggle {
  padding: 0.35rem 0.8rem;
  cursor: pointer;
}

.language-toggle {
  padding: 0.2rem;
}

.language-toggle__option {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.language-toggle__option.is-active {
  background: linear-gradient(120deg, var(--accent), var(--accent-strong));
  color: #fff;
}

main {
  padding: clamp(1rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  align-items: center;
  padding: clamp(1.5rem, 6vw, 4.5rem);
  border-radius: 32px;
  border: 1px solid var(--border);
  background: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.25),
    rgba(251, 146, 60, 0.25)
  );
  box-shadow: var(--shadow);
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  margin-bottom: 0.5rem;
}

.hero__card {
  display: grid;
  gap: 1.25rem;
  padding: 1.5rem;
  border-radius: 24px;
  border: 1px solid var(--border);
  background-color: rgba(7, 12, 14, 0.6);
  animation: float 6s ease-in-out infinite;
}

body[data-theme="light"] .hero__card {
  background-color: rgba(255, 255, 255, 0.9);
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.hero__stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 600;
}

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

.btn {
  border-radius: 999px;
  padding: 0.7rem 1.5rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
  background-color: transparent;
}

.btn--primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-strong));
  color: #fff;
  box-shadow: 0 15px 30px rgba(37, 99, 235, 0.4);
}

.btn--ghost {
  border-color: var(--border);
  color: inherit;
  transition:
    border-color 0.2s ease,
    color 0.2s ease;
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.panel {
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: clamp(1.5rem, 5vw, 3.5rem);
  background-color: var(--panel);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.panel--split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  align-items: start;
}

.panel__card {
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.5rem;
  background-color: rgba(7, 12, 14, 0.6);
}

body[data-theme="light"] .panel__card {
  background-color: rgba(246, 248, 251, 0.95);
}

.panel__header h2 {
  margin: 0.2rem 0;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.timeline__item {
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.5rem;
  background-color: rgba(7, 12, 14, 0.5);
  transition: transform 0.3s ease;
}

.timeline__item:hover {
  transform: translateY(-6px);
}

body[data-theme="light"] .timeline__item {
  background-color: rgba(255, 255, 255, 0.92);
}

.timeline__period {
  font-size: 0.9rem;
  color: var(--muted);
}

.tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tag-grid span {
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--border);
}

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.project-card {
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.25rem;
  background-color: rgba(7, 12, 14, 0.5);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  color: inherit;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease;
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

body[data-theme="light"] .project-card {
  background-color: rgba(255, 255, 255, 0.95);
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.1);
}

.project-card__meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted);
}

.skills-ratings {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.skills-ratings li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.skills-ratings__label {
  font-weight: 600;
}

.star-rating {
  display: inline-flex;
}

.star-rating span {
  position: relative;
  font-size: 1.4rem;
  letter-spacing: 0.2rem;
  color: var(--border);
}

.star-rating span::before,
.star-rating span::after {
  content: "★★★★★";
}

.star-rating span::after {
  position: absolute;
  inset: 0;
  color: var(--accent);
  width: 0;
  overflow: hidden;
  animation: starFill 1.1s ease forwards;
  animation-delay: 0.1s;
  --target-width: calc(var(--fill, 0) * 100%);
}

.star-rating span[data-score="5"] {
  --fill: 1;
}
.star-rating span[data-score="4"] {
  --fill: 0.8;
}
.star-rating span[data-score="3"] {
  --fill: 0.6;
}
.star-rating span[data-score="2"] {
  --fill: 0.4;
}
.star-rating span[data-score="1"] {
  --fill: 0.2;
}

@keyframes starFill {
  from {
    width: 0;
  }
  to {
    width: var(--target-width);
  }
}

.badge {
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background-color: rgba(37, 99, 235, 0.15);
  color: var(--accent-strong);
  border: 1px solid rgba(251, 146, 60, 0.4);
}

.panel--contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.certifications {
  align-items: center;
}

.cert-card {
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.5rem;
  background-color: rgba(7, 12, 14, 0.5);
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

body[data-theme="light"] .cert-card {
  background-color: rgba(255, 255, 255, 0.95);
}

.cert-card__logo {
  width: 5rem;
  height: 5rem;
  object-fit: contain;
}

.cert-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cert-card__body h3 {
  margin: 0;
}

.cert-card__body p {
  margin: 0;
  color: var(--muted);
}

.contact-links {
  display: grid;
  gap: 1rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 24px;
  border: 1px solid var(--border);
  background-color: rgba(7, 12, 14, 0.45);
  color: inherit;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease;
}

body[data-theme="light"] .contact-card {
  background-color: rgba(255, 255, 255, 0.95);
}

.contact-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.contact-card__icon {
  width: 3.5rem;
  height: 3.5rem;
  object-fit: contain;
  display: block;
}

.contact-card__icon--badge {
  padding: 0.25rem;
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.05);
}

.contact-card__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.contact-card__label {
  font-size: 0.9rem;
  color: var(--muted);
}

.contact-card__value {
  font-size: 1.1rem;
  font-weight: 600;
}

.contact-card__cta {
  font-size: 0.9rem;
  color: var(--accent-strong);
  font-weight: 600;
}

.site-footer {
  padding: 2rem clamp(1rem, 5vw, 4rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.site-footer p {
  margin: 0;
  flex: 1 1 100%;
  display: flex;
  justify-content: center;
  gap: 0.35rem;
}

.footer-note a {
  color: var(--accent);
}

.footer-version {
  display: inline-flex;
  gap: 0.35rem;
  font-weight: 500;
}

.footer-links {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  width: 100%;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.8rem;
  color: var(--muted);
}

section,
.timeline__item,
.project-card {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

section.is-visible,
.timeline__item.is-visible,
.project-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .site-nav {
    display: none;
  }

  .site-header {
    justify-content: space-between;
  }
}
