:root {
  color-scheme: light;
  --bg-start: #f8f7f2;
  --bg-mid: #edf2f0;
  --bg-end: #f5f1e7;
  --bg-orb-one: rgba(126, 231, 198, 0.18);
  --grid-line: rgba(25, 30, 28, 0.055);
  --grid-mask: rgba(0, 0, 0, 0.58);
  --card-glow: rgba(255, 255, 255, 0.7);
  --card-bg: rgba(255, 255, 255, 0.72);
  --card-bg-soft: rgba(255, 255, 255, 0.42);
  --text: #171a1c;
  --muted: #626a67;
  --line: rgba(24, 29, 31, 0.13);
  --accent: #087c65;
  --accent-soft: rgba(8, 124, 101, 0.1);
  --accent-border: rgba(8, 124, 101, 0.28);
  --accent-text: #075b4c;
  --accent-two: #c58c12;
  --accent-three: #376ed1;
  --chip-bg: rgba(255, 255, 255, 0.64);
  --chip-text: #202626;
  --tooltip-bg: #171a1c;
  --tooltip-text: #ffffff;
  --shadow: rgba(36, 42, 40, 0.16);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg-start: #101113;
  --bg-mid: #18191b;
  --bg-end: #11161a;
  --bg-orb-one: rgba(91, 222, 222, 0.16);
  --grid-line: rgba(255, 255, 255, 0.035);
  --grid-mask: rgba(0, 0, 0, 0.78);
  --card-glow: rgba(255, 255, 255, 0.11);
  --card-bg: rgba(18, 20, 22, 0.88);
  --card-bg-soft: rgba(255, 255, 255, 0.035);
  --text: #f8f8f4;
  --muted: #b5b7ad;
  --line: rgba(248, 248, 244, 0.18);
  --accent: #5bdede;
  --accent-soft: rgba(91, 222, 222, 0.09);
  --accent-border: rgba(91, 222, 222, 0.34);
  --accent-text: #dbfff3;
  --accent-two: #f4c96b;
  --accent-three: #8cb7ff;
  --chip-bg: rgba(255, 255, 255, 0.07);
  --chip-text: #f4f5ee;
  --tooltip-bg: #f8f8f4;
  --tooltip-text: #171a1c;
  --shadow: rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 22%, var(--bg-orb-one), transparent 30%),
    radial-gradient(circle at 78% 72%, rgba(244, 201, 107, 0.14), transparent 28%),
    linear-gradient(135deg, var(--bg-start) 0%, var(--bg-mid) 48%, var(--bg-end) 100%);
  overflow-x: hidden;
  transition: background 220ms ease, color 220ms ease;
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, var(--grid-mask), transparent);
}

a {
  color: inherit;
}

.top-controls {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
}

.language-switcher {
  display: inline-flex;
  gap: 4px;
  min-height: 46px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card-bg);
  box-shadow: 0 14px 38px var(--shadow);
  backdrop-filter: blur(18px);
}

.language-button {
  min-width: 40px;
  height: 36px;
  padding: 0 11px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.language-button:hover,
.language-button:focus-visible {
  color: var(--text);
  outline: none;
  transform: translateY(-1px);
}

.language-button.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}

.theme-toggle {
  display: inline-grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card-bg);
  color: var(--text);
  box-shadow: 0 14px 38px var(--shadow);
  cursor: pointer;
  backdrop-filter: blur(18px);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: var(--accent-border);
  transform: translateY(-2px);
  outline: none;
}

.theme-toggle svg {
  grid-area: 1 / 1;
  width: 20px;
  height: 20px;
  fill: currentColor;
  transition: opacity 180ms ease, transform 180ms ease;
}

.moon-icon {
  opacity: 1;
}

.sun-icon {
  opacity: 0;
  transform: rotate(-35deg) scale(0.65);
}

[data-theme="dark"] .moon-icon {
  opacity: 0;
  transform: rotate(35deg) scale(0.65);
}

[data-theme="dark"] .sun-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.page-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px;
}

.profile-card {
  position: relative;
  display: grid;
  width: min(100%, 620px);
  min-height: auto;
  align-items: center;
  overflow: hidden;
  padding: clamp(30px, 7vw, 52px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(140deg, var(--card-glow), var(--card-bg-soft)),
    var(--card-bg);
  box-shadow: 0 34px 90px var(--shadow);
  isolation: isolate;
  backdrop-filter: blur(24px);
  transition: transform 180ms ease, background 220ms ease, border-color 220ms ease;
}

.profile-card::before {
  position: absolute;
  inset: 1px;
  z-index: -1;
  border-radius: 7px;
  content: "";
  background:
    linear-gradient(90deg, transparent, var(--card-glow), transparent),
    linear-gradient(180deg, rgba(255, 255, 255, 0.32), transparent 42%);
  opacity: 0.7;
}

.ambient {
  position: absolute;
  z-index: -1;
  width: 260px;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(26px);
  opacity: 0.5;
  animation: drift 9s ease-in-out infinite alternate;
}

.ambient-one {
  top: -130px;
  left: -118px;
  background: var(--accent-border);
}

.ambient-two {
  right: -126px;
  bottom: -132px;
  background: rgba(140, 183, 255, 0.26);
  animation-delay: -3s;
}

.profile-content {
  max-width: 100%;
  text-align: center;
}

.profile-photo {
  display: block;
  width: clamp(96px, 20vw, 132px);
  aspect-ratio: 1;
  object-fit: cover;
  margin: 0 auto 24px;
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: 0 18px 42px var(--shadow);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2.6rem, 8vw, 4.9rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.intro {
  max-width: 46ch;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: clamp(0.98rem, 2vw, 1.08rem);
  line-height: 1.7;
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 0;
  margin: 28px 0 0;
  list-style: none;
}

.tech-list li {
  min-height: 36px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--chip-text);
  background: var(--chip-bg);
  font-size: 0.92rem;
  font-weight: 700;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 34px;
}

.social-link {
  position: relative;
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--chip-bg);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.social-link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex: 0 0 auto;
}

.social-link::before,
.social-link::after {
  position: absolute;
  left: 50%;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.social-link::before {
  bottom: calc(100% + 10px);
  padding: 7px 9px;
  border-radius: 7px;
  content: attr(data-tooltip);
  background: var(--tooltip-bg);
  color: var(--tooltip-text);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 12px 24px var(--shadow);
}

.social-link::after {
  bottom: calc(100% + 5px);
  width: 10px;
  height: 10px;
  content: "";
  background: var(--tooltip-bg);
  rotate: 45deg;
}

.social-link:hover,
.social-link:focus-visible {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  transform: translateY(-3px);
  outline: none;
}

.social-link:hover::before,
.social-link:hover::after,
.social-link:focus-visible::before,
.social-link:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }

  to {
    transform: translate3d(22px, 18px, 0) scale(1.08);
  }
}

@media (max-width: 760px) {
  .top-controls {
    top: 16px;
    right: 16px;
    left: 16px;
    justify-content: flex-end;
  }

  .page-shell {
    align-items: start;
    padding: 76px 18px 18px;
  }

  .profile-card {
    padding: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
