:root {
  --font:
    Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica,
    Arial, "Apple Color Emoji", "Segoe UI Emoji";
  --radius: 18px;
  --radius-sm: 14px;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
  --shadow-soft: 0 14px 30px rgba(0, 0, 0, 0.12);
  --blur: 18px;

  --bg: #0b0f17;
  --bg2: #0a1020;
  --text: rgba(255, 255, 255, 0.94);
  --muted: rgba(255, 255, 255, 0.75);
  --subtle: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.16);
  --primary: #7c5cff;
  --primary2: #39d2ff;
  --ok: #2de2a6;

  --card: rgba(255, 255, 255, 0.1);
  --card2: rgba(255, 255, 255, 0.14);

  --glass-on: 1;
  --focus: rgba(57, 210, 255, 0.55);
}

html[data-theme="light"] {
  --bg: #f6f7fb;
  --bg2: #ffffff;
  --text: rgba(15, 18, 24, 0.92);
  --muted: rgba(15, 18, 24, 0.68);
  --subtle: rgba(15, 18, 24, 0.08);
  --border: rgba(15, 18, 24, 0.12);
  --primary: #4f46e5;
  --primary2: #0891b2;

  --card: rgba(255, 255, 255, 0.78);
  --card2: rgba(255, 255, 255, 0.62);
  --shadow: 0 18px 45px rgba(15, 18, 24, 0.14);
  --shadow-soft: 0 14px 30px rgba(15, 18, 24, 0.12);
  --focus: rgba(79, 70, 229, 0.35);
}
html[data-theme="light"] .bg::after {
  opacity: 0.12;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.65;
  background-color: var(--bg2);
  background-image:
    radial-gradient(
      1400px 900px at 12% -12%,
      rgba(124, 92, 255, 0.26),
      rgba(124, 92, 255, 0) 72%
    ),
    radial-gradient(
      1200px 900px at 88% 6%,
      rgba(57, 210, 255, 0.2),
      rgba(57, 210, 255, 0) 72%
    ),
    linear-gradient(
      180deg,
      var(--bg) 0%,
      color-mix(in srgb, var(--bg) 85%, #0c1224) 35%,
      color-mix(in srgb, var(--bg) 60%, var(--bg2)) 70%,
      var(--bg2) 100%
    );
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text);
  letter-spacing: -0.01em;
}

a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}
p {
  max-width: 62ch;
}
strong {
  font-weight: 750;
  color: var(--text);
  background-image: linear-gradient(
    90deg,
    rgba(124, 92, 255, 0.35),
    rgba(57, 210, 255, 0.35)
  );
  background-size: 100% 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
}

/* Skip link */
.skip {
  position: absolute;
  left: -999px;
  top: 12px;
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: 12px;
}
.skip:focus {
  left: 12px;
  outline: 3px solid var(--focus);
}

/* Background blobs + grain */
.bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}
.bg::after {
  content: "";
  position: absolute;
  inset: -10%;
  background: radial-gradient(
    120% 120% at 50% 50%,
    rgba(0, 0, 0, 0) 40%,
    rgba(0, 0, 0, 0.45) 100%
  );
  opacity: 0.35;
}
.blob {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 999px;
  filter: blur(60px);
  opacity: 0.45;
  transform: translate3d(0, 0, 0);
  animation: float 14s ease-in-out infinite;
}
.b1 {
  left: -120px;
  top: 140px;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(124, 92, 255, 0.72),
    rgba(124, 92, 255, 0) 75%
  );
}
.b2 {
  right: -180px;
  top: -80px;
  background: radial-gradient(
    circle at 40% 40%,
    rgba(57, 210, 255, 0.55),
    rgba(57, 210, 255, 0) 75%
  );
  animation-duration: 18s;
  animation-direction: reverse;
}
.b3 {
  left: 6%;
  bottom: -260px;
  width: 680px;
  height: 680px;
  background: radial-gradient(
    circle at 35% 35%,
    rgba(124, 92, 255, 0.5),
    rgba(124, 92, 255, 0) 72%
  );
  animation-duration: 22s;
}
.b4 {
  right: 6%;
  bottom: -300px;
  width: 640px;
  height: 640px;
  background: radial-gradient(
    circle at 35% 35%,
    rgba(57, 210, 255, 0.32),
    rgba(57, 210, 255, 0) 72%
  );
  animation-duration: 24s;
}
.b5 {
  left: 42%;
  top: 46%;
  width: 420px;
  height: 420px;
  background: radial-gradient(
    circle at 40% 40%,
    rgba(92, 180, 255, 0.35),
    rgba(92, 180, 255, 0) 70%
  );
  opacity: 0.35;
  animation-duration: 26s;
}
.grain {
  position: absolute;
  inset: -100px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='280'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='280' height='280' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
  opacity: 0.08;
  mix-blend-mode: overlay;
}

@media (prefers-reduced-motion: reduce) {
  .blob {
    animation: none;
  }
}

@keyframes float {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  33% {
    transform: translate3d(54px, -48px, 0) scale(1.04);
  }
  66% {
    transform: translate3d(-46px, 38px, 0) scale(0.98);
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border);
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 260px;
}
.brand__monogram {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: linear-gradient(
    135deg,
    rgba(124, 92, 255, 0.9),
    rgba(57, 210, 255, 0.75)
  );
  color: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
}
.brand__name {
  font-weight: 700;
  line-height: 1.1;
}
.brand__role {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.seg {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}
.seg__btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 10px;
  font-weight: 650;
  cursor: pointer;
}
.seg__btn[aria-pressed="true"] {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

.iconbtn {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 14px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.iconbtn--sm {
  width: 38px;
  height: 38px;
  border-radius: 12px;
}
.iconbtn:focus-visible,
.seg__btn:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-weight: 650;
  box-shadow: none;
  text-decoration: none;
}
.btn:hover {
  text-decoration: none;
  background: rgba(255, 255, 255, 0.08);
}
.btn--primary {
  border: 1px solid rgba(124, 92, 255, 0.45);
  background: linear-gradient(
    135deg,
    rgba(124, 92, 255, 0.95),
    rgba(57, 210, 255, 0.85)
  );
  color: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
}
.btn--primary:hover {
  filter: brightness(1.04);
}
.btn--ghost {
  background: rgba(255, 255, 255, 0.03);
}
.btn--full {
  width: 100%;
}
.btn--sm {
  padding: 8px 10px;
  font-size: 13px;
  border-radius: 12px;
}

/* Glass card */
.glass {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  background: transparent;
  position: relative;
  isolation: isolate;
}
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--card);
  background: color-mix(in srgb, var(--card) 85%, transparent);
  backdrop-filter: blur(calc(var(--blur) * var(--glass-on))) saturate(170%);
  -webkit-backdrop-filter: blur(calc(var(--blur) * var(--glass-on)))
    saturate(170%);
  z-index: 0;
}
.glass > * {
  position: relative;
  z-index: 1;
}

main {
  padding: 26px 0 42px;
}
main > section + section {
  margin-top: 18px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}
.hero__left {
  max-width: 760px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-weight: 650;
  width: fit-content;
}
.title {
  margin: 14px 0 10px;
  font-size: clamp(26px, 2.8vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.subtitle {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
  max-width: 62ch;
}
.hero .subtitle {
  max-width: 56ch;
}
.summary__line {
  display: block;
}
.summary__line + .summary__line {
  margin-top: 4px;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 16px;
}
.badge {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 13px;
  white-space: nowrap;
}
.hero__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.hero__bullets {
  margin: 10px 0 14px;
}
.hero__bullets li {
  margin: 6px 0;
}
.link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-weight: 650;
}
.link--muted:hover {
  color: var(--text);
}

.mini {
  padding: 14px;
}
.mini__row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.mini__label {
  color: var(--muted);
  font-size: 12px;
}
.mini__value {
  font-weight: 650;
  margin-top: 4px;
}
.mini__note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12.5px;
}

.card {
  padding: 16px;
}
.card__title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 10px;
}
.card__cta {
  margin-top: 12px;
}
.hint {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.contact {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.contact__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  padding: 11px 13px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  transition:
    background-color 0.22s ease,
    border-color 0.22s ease,
    transform 0.22s ease;
}
.contact__row:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(124, 92, 255, 0.38);
  text-decoration: none;
  transform: translateY(-1px);
}
.contact__row--muted {
  opacity: 0.92;
}
.contact__k {
  color: var(--muted);
  font-weight: 650;
}
.contact__v {
  font-weight: 550;
  word-break: break-word;
}
.contact__row--primary .contact__v {
  font-weight: 750;
}
.contact__row--email {
  align-items: center;
  border-color: rgba(124, 92, 255, 0.34);
  background: linear-gradient(
    135deg,
    rgba(124, 92, 255, 0.13),
    rgba(57, 210, 255, 0.09)
  );
}
.contact__row--email:hover {
  background: linear-gradient(
    135deg,
    rgba(124, 92, 255, 0.18),
    rgba(57, 210, 255, 0.14)
  );
}
.contact__info {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
  flex: 1;
}
.contact__email-link {
  color: var(--text);
  text-decoration: none;
}
.contact__email-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.contact__row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.contact__icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.contact__icon svg {
  width: 17px;
  height: 17px;
}
.contact__icon:hover {
  text-decoration: none;
  background: rgba(255, 255, 255, 0.12);
}
.contact__icon:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.contact__icon--mail {
  border-color: rgba(57, 210, 255, 0.52);
  background: linear-gradient(
    135deg,
    rgba(124, 92, 255, 0.82),
    rgba(57, 210, 255, 0.76)
  );
  color: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(57, 210, 255, 0.24);
}
.contact__icon--mail:hover {
  filter: brightness(1.05);
}
.contact__icon--copy {
  opacity: 0;
  pointer-events: none;
  transform: translateX(6px) scale(0.92);
}
.contact__row--email:hover .contact__icon--copy,
.contact__row--email:focus-within .contact__icon--copy,
.contact__icon--copy.is-copied {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) scale(1);
}
.contact__icon--copy.is-copied {
  border-color: rgba(45, 226, 166, 0.52);
  background: rgba(45, 226, 166, 0.16);
  box-shadow: 0 0 0 1px rgba(45, 226, 166, 0.22);
}
@media (hover: none) {
  .contact__icon--copy {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
}

.techgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}
.tech {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 14px;
  padding: 10px 12px;
}
.tech__icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
}
.tech__icon svg {
  width: 24px;
  height: 24px;
  display: block;
}
.tech__icon img {
  width: 24px;
  height: 24px;
  display: block;
}
.tech__label {
  font-weight: 700;
  line-height: 1.2;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.section__title {
  margin: 2px 0 12px;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.section__subtitle {
  margin: 6px 0 8px;
  font-size: 14px;
  letter-spacing: -0.01em;
  color: var(--text);
}
.divider {
  height: 1px;
  background: var(--subtle);
  margin: 14px 0;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}
.item__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.item__title {
  font-weight: 800;
  letter-spacing: -0.01em;
  min-width: 0;
}
.item__meta {
  color: var(--muted);
  font-size: 13px;
  white-space: normal;
}
.item__desc {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}
.item__list {
  margin: 6px 0 0;
  padding-left: 18px;
  color: var(--text);
}
.item__list li {
  margin: 6px 0;
  color: var(--text);
}
.item__impact {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
}
.item__tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.tag {
  font-size: 12px;
  color: var(--muted);
  padding: 6px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.pillgroups {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pillgroup__title {
  color: var(--muted);
  font-weight: 750;
  font-size: 12.5px;
}
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.pill {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  font-size: 13px;
  font-weight: 650;
}

.list {
  margin: 8px 0 0;
  padding-left: 18px;
}
.list li {
  margin: 8px 0;
  color: var(--text);
  line-height: 1.6;
}
.list a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contactbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.contact__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.contact__actions .btn {
  min-height: 44px;
}

.footer {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 2px;
  color: var(--muted);
  font-size: 12.5px;
}
.dot {
  margin: 0 6px;
  opacity: 0.6;
}
.kbd {
  border: 1px solid var(--border);
  padding: 3px 7px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-weight: 700;
}

/* Responsive */
@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .mini__row {
    grid-template-columns: 1fr;
  }
  .grid2 {
    grid-template-columns: 1fr;
  }
  .brand {
    min-width: auto;
  }
  .item__top {
    flex-direction: column;
    align-items: flex-start;
  }
  body {
    background-attachment: scroll;
  }
}

@media (max-width: 760px) {
  .topbar__inner {
    flex-direction: column;
    align-items: stretch;
  }
  .brand {
    width: 100%;
  }
  .controls {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: nowrap;
  }
  .topbar__cta {
    display: none;
  }
  .seg {
    flex: 1;
  }
  .seg__btn {
    flex: 1;
    text-align: center;
    padding: 6px 8px;
    font-size: 12px;
  }
  .iconbtn--sm {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }
}

@media (max-width: 520px) {
  .techgrid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
  .tech {
    padding: 9px 10px;
  }
  .contact__actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Print: clean CV */
@media print {
  .bg,
  .topbar,
  .hero__actions,
  .iconbtn,
  .seg,
  .footer__right,
  .hint,
  #glassBtn {
    display: none !important;
  }
  body {
    background: #fff !important;
    color: #111 !important;
  }
  .glass {
    background: #fff !important;
    border: 1px solid #ddd !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
  }
  .glass::before {
    display: none !important;
  }
  a {
    text-decoration: none !important;
    color: #111 !important;
  }
  main {
    padding: 0 !important;
  }
  .container {
    width: 100% !important;
    margin: 0 !important;
  }
  .card,
  .item,
  .contact__row,
  .badge,
  .pill {
    background: #fff !important;
  }
}
