/* ====== Base ====== */
:root {
  /* Dark Theme (Default) */
  --bg: #070b14;
  --panel: #0b1220;
  --card: #0f1a2e;
  --card-hover: #152238;
  --muted: #97a3b6;
  --text: #e7ecf5;
  --line: rgba(255, 255, 255, .08);
  --shadow: 0 22px 60px rgba(0, 0, 0, .45);
  --radius: 18px;
  --grad: linear-gradient(135deg, #7c3aed, #2563eb 55%, #22d3ee);
  --accent-glow: rgba(124, 58, 237, 0.35);
  --scroll-bar: #2563eb;
}

[data-theme="light"] {
  --bg: #f8fafc;
  --panel: #ffffff;
  --card: #ffffff;
  --card-hover: #f1f5f9;
  --muted: #64748b;
  --text: #0f172a;
  --line: rgba(0, 0, 0, .08);
  --shadow: 0 10px 30px rgba(0, 0, 0, .05);
  --accent-glow: rgba(37, 99, 235, 0.15);
  --scroll-bar: #2563eb;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 700px at 70% -10%, var(--accent-glow), transparent 55%),
    radial-gradient(900px 600px at 15% 0%, rgba(34, 211, 238, .15), transparent 50%);
  background-attachment: fixed;
  color: var(--text);
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease, color 0.2s ease;
}

a:hover {
  opacity: .8;
  color: #22d3ee;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: .95rem;
}

hr.sep {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 18px 0;
}

.skip {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip:focus {
  left: 20px;
  top: 14px;
  width: auto;
  height: auto;
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  z-index: 9999;
}

/* ====== Scroll Progress ====== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--grad);
  z-index: 100;
  width: 0%;
  transition: width 0.1s;
}

/* ====== Topbar ====== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(var(--bg), 0.75);
  /* Needs RGB adaptation for pure css connection but simplified here */
  border-bottom: 1px solid var(--line);
  /* Fallback for background with opacity if we don't convert hex */
  background: color-mix(in srgb, var(--bg), transparent 20%);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand__mark {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--grad);
  box-shadow: 0 0 0 6px var(--accent-glow);
}

.brand__name {
  font-weight: 700;
  letter-spacing: .2px;
}

.nav {
  display: flex;
  gap: 18px;
  align-items: center;
}

.nav a {
  color: var(--muted);
  font-weight: 600;
  font-size: .95rem;
  padding: 8px 10px;
  border-radius: 12px;
  position: relative;
}

.nav a:hover,
.nav a.active {
  color: var(--text);
  background: rgba(125, 125, 125, .08);
}

.topbar__cta {
  display: flex;
  gap: 10px;
  align-items: center;
}

.burger {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  cursor: pointer;
}

.burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  margin: 4px 0;
  border-radius: 2px;
  transition: 0.3s;
}

.mobile {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--bg);
  position: fixed;
  inset: 60px 0 0 0;
  z-index: 49;
  overflow-y: auto;
}

.mobile--open {
  display: block;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile__inner {
  padding: 14px 0 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mobile__inner a {
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(125, 125, 125, .05);
  font-weight: 600;
}

.mobile__actions {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ====== Icons ====== */
.icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
}

.icon-sm {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-right: 4px;
}

.icon-lg {
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
  color: #2563eb;
}

/* ====== Buttons ====== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 14px;
  background: var(--grad);
  color: #ffffff;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 4px 12px rgba(37, 99, 235, .25);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, .35);
  color: #fff;
}

.btn:active {
  transform: translateY(0);
}

.btn--ghost {
  background: rgba(125, 125, 125, .05);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
}

.btn--ghost:hover {
  background: rgba(125, 125, 125, .1);
  color: var(--text);
}

.btn--small {
  padding: 9px 12px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
}

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: rgba(125, 125, 125, .1);
  transform: scale(1.05);
}

.w-full {
  width: 100%;
}

.no-scroll {
  overflow: hidden;
}

/* ====== Hero ====== */
.hero {
  position: relative;
  padding: 80px 0 60px;
  overflow: hidden;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.kicker {
  color: var(--muted);
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  font-size: 0.9rem;
  margin: 0 0 14px;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.1;
  font-weight: 800;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
}

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.6;
  margin: 0 0 32px;
  max-width: 540px;
}

.hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(125, 125, 125, .05);
  color: var(--text);
  font-weight: 600;
  font-size: .9rem;
  display: inline-flex;
  align-items: center;
}

/* ====== Profile Card ====== */
.hero__card {
  display: flex;
  justify-content: center;
}

.profile-card {
  width: 100%;
  max-width: 400px;
  transform: rotate(-2deg);
  transition: transform 0.3s ease;
}

.profile-card:hover {
  transform: rotate(0) scale(1.02);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card.glass {
  background: rgba(var(--card), 0.7);
  /* Approximate */
  backdrop-filter: blur(14px);
}

.card:hover {
  border-color: rgba(37, 99, 235, 0.3);
}

.hover-reveal:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
  background: var(--card-hover);
}

.profile-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 24px;
}

.avatar-large {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid transparent;
  background: linear-gradient(white, white), var(--grad);
  background-origin: border-box;
  background-clip: content-box, border-box;
  margin-bottom: 16px;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.2);
}

.avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-info .h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.social-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 12px;
}

.profile-info .social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(125, 125, 125, 0.1);
  color: var(--muted);
  transition: all 0.2s;
}

.social-links a:hover {
  background: var(--grad);
  color: white;
  transform: translateY(-2px);
}

.card__foot {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  justify-content: center;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.facts {
  display: grid;
  gap: 12px;
}

.fact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(125, 125, 125, .03);
  border: 1px solid var(--line);
}

.fact__k {
  color: var(--muted);
  font-weight: 600;
  font-size: .92rem;
}

.fact__v {
  font-weight: 700;
  color: var(--text);
}

.hero__bg {
  position: absolute;
  inset: auto -180px -240px -180px;
  height: 420px;
  background: radial-gradient(500px 220px at 50% 40%, rgba(34, 211, 238, .1), transparent 60%),
    radial-gradient(520px 240px at 40% 55%, rgba(124, 58, 237, .15), transparent 65%);
  filter: blur(40px);
  pointer-events: none;
  z-index: -1;
}

/* ====== Sections ====== */
.section {
  padding: 60px 0;
}

.section__head {
  margin-bottom: 30px;
}

.section__head h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  margin: 0 0 10px;
  font-weight: 800;
}

.grid2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
}

.grid3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

h3 {
  margin: 0 0 12px;
  font-size: 1.25rem;
  font-weight: 700;
}

.bullets {
  margin: 0;
  padding-left: 20px;
  color: var(--text);
}

.bullets li {
  margin: 8px 0;
  line-height: 1.6;
}

.pillrow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.pill,
.mini .pill {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(125, 125, 125, .05);
  color: var(--text);
  font-weight: 600;
  font-size: .85rem;
}

.tags {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags li {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(125, 125, 125, .05);
  font-weight: 600;
  font-size: 0.9rem;
}

.inline {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.callout {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(135deg, rgba(124, 58, 237, .1), rgba(34, 211, 238, .05));
  border: 1px solid rgba(124, 58, 237, .2);
  flex-wrap: wrap;
}

.callout__items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ====== Timeline ====== */
.timeline {
  display: grid;
  gap: 20px;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 20px;
  bottom: 20px;
  width: 2px;
  background: var(--line);
  z-index: 0;
}

.titem {
  position: relative;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 20px;
  align-items: flex-start;
  z-index: 1;
}

.titem__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-top: 24px;
  background: var(--grad);
  box-shadow: 0 0 0 4px var(--bg);
  z-index: 2;
  margin-left: -1px;
  /* Align with line */
}

.titem__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.titem__content {
  padding: 24px;
}

.mini {
  margin-top: 14px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag-cdd,
.tag-erasmus {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--grad);
  color: white;
}

.tag-erasmus {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
}

/* ====== Footer ====== */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--line);
  background: rgba(125, 125, 125, .02);
  margin-top: 40px;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ====== Scroll Top ====== */
.btn-scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s;
  z-index: 90;
  pointer-events: none;
}

.btn-scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.btn-scroll-top:hover {
  background: var(--grad);
  color: white;
  border-color: transparent;
}

/* ====== Reveal ====== */
.hover-reveal,
.chip,
.pill {
  animation: fadeIn 0.8s ease backwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ====== Responsive ====== */
@media (max-width: 980px) {
  .hero__grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__copy {
    margin-bottom: 40px;
  }

  .hero h1 {
    font-size: 2.8rem;
  }

  .lead {
    margin: 0 auto 32px;
  }

  .hero__actions,
  .chips {
    justify-content: center;
  }

  .topbar__cta {
    display: none;
  }

  .nav {
    display: none;
  }

  .burger {
    display: inline-block;
  }

  .profile-card {
    transform: rotate(0);
  }
}

@media (max-width: 600px) {
  .titem__top {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}