:root {
  --bg: #030508;
  --bg-elevated: #0a0e14;
  --border: rgba(0, 240, 255, 0.12);
  --text: #e8fbff;
  --muted: #7a8f99;
  --cyan: #00f0ff;
  --cyan-dim: rgba(0, 240, 255, 0.15);
  --magenta: #ff2bd6;
  --magenta-dim: rgba(255, 43, 214, 0.12);
  --accent: var(--cyan);
  --accent-dim: var(--cyan-dim);
  --glow: rgba(0, 240, 255, 0.4);
  --radius: 12px;
  --font: 'DM Sans', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  line-height: 1.55;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px),
    radial-gradient(ellipse 100% 80% at 50% -30%, rgba(255, 43, 214, 0.18), transparent 50%),
    radial-gradient(ellipse 80% 50% at 100% 50%, rgba(0, 240, 255, 0.08), transparent 45%),
    radial-gradient(ellipse 80% 50% at 0% 80%, rgba(255, 43, 214, 0.06), transparent 40%);
  background-size:
    48px 48px,
    48px 48px,
    100% 100%,
    100% 100%,
    100% 100%;
  position: relative;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.12) 2px,
    rgba(0, 0, 0, 0.12) 4px
  );
  opacity: 0.35;
  mix-blend-mode: overlay;
}

a {
  color: var(--cyan);
  text-decoration: none;
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.35);
}

a:hover {
  color: var(--magenta);
  text-shadow: 0 0 14px rgba(255, 43, 214, 0.45);
  text-decoration: underline;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page {
  max-width: 52rem;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 3rem;
  position: relative;
  z-index: 1;
}

.top {
  text-align: center;
  margin-bottom: 1.5rem;
}

.lang-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.lang-row label {
  font-size: 0.875rem;
  color: var(--muted);
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

#lang-select {
  font: inherit;
  font-size: 0.9rem;
  padding: 0.45rem 2rem 0.45rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(5, 12, 18, 0.85);
  color: var(--text);
  cursor: pointer;
  appearance: none;
  box-shadow:
    0 0 0 1px rgba(255, 43, 214, 0.15),
    0 0 20px rgba(0, 240, 255, 0.08);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300f0ff' d='M3 4.5L6 7.5L9 4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
}

#lang-select:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.hero-core {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 0.5rem;
}

.hero-photo-wrap {
  position: relative;
  width: 168px;
  height: 168px;
  flex-shrink: 0;
}

.hero-photo-ring {
  position: absolute;
  inset: -5px;
  border-radius: 18px;
  background: conic-gradient(from 120deg, var(--cyan), var(--magenta), var(--cyan));
  opacity: 0.85;
  animation: ring-spin 8s linear infinite;
  z-index: 0;
  filter: blur(0.5px);
}

.hero-photo-ring::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 15px;
  background: var(--bg);
  z-index: 0;
}

@keyframes ring-spin {
  to {
    transform: rotate(360deg);
  }
}

.hero-photo {
  position: relative;
  z-index: 1;
  display: block;
  width: 168px;
  height: 168px;
  object-fit: cover;
  border-radius: 14px;
  border: 2px solid rgba(0, 240, 255, 0.45);
  box-shadow:
    0 0 24px rgba(0, 240, 255, 0.35),
    0 0 48px rgba(255, 43, 214, 0.15),
    inset 0 0 30px rgba(0, 240, 255, 0.06);
  clip-path: polygon(8% 0, 92% 0, 100% 8%, 100% 92%, 92% 100%, 8% 100%, 0 92%, 0 8%);
}

.hero-copy {
  min-width: 0;
}

.badge {
  display: inline-block;
  margin: 0 0 0.65rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: var(--mono);
  color: var(--bg);
  background: linear-gradient(90deg, var(--cyan), #7afcff);
  border-radius: 4px;
  border: 1px solid var(--cyan);
  box-shadow:
    0 0 16px rgba(0, 240, 255, 0.55),
    0 0 32px rgba(255, 43, 214, 0.2);
}

.glitch-title {
  position: relative;
  isolation: isolate;
  margin: 0 0 0.4rem;
  font-size: clamp(1.65rem, 4vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
  text-shadow:
    0 0 20px rgba(0, 240, 255, 0.5),
    0 0 40px rgba(255, 43, 214, 0.2);
  animation: title-flicker 5s ease-in-out infinite;
}

.glitch-title::before,
.glitch-title::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.glitch-title::before {
  color: var(--cyan);
  z-index: -1;
  transform: translate(1px, 0);
  opacity: 0.55;
  clip-path: inset(0 0 55% 0);
}

.glitch-title::after {
  color: var(--magenta);
  z-index: -2;
  transform: translate(-1px, 0);
  opacity: 0.45;
  clip-path: inset(45% 0 0 0);
}

@keyframes title-flicker {
  0%,
  94%,
  100% {
    opacity: 1;
  }
  96% {
    opacity: 0.92;
  }
}

.role {
  margin: 0;
  font-size: 1.02rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.92rem;
}

.contact ul {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(0, 240, 255, 0.04), rgba(255, 43, 214, 0.03));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.contact li {
  font-size: 0.88rem;
  color: var(--muted);
}

.contact a {
  font-family: var(--mono);
  font-size: 0.8rem;
}

.tabs {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.35rem 0 1rem;
  margin: 0 -0.25rem;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(to right, transparent, black 0.75rem, black calc(100% - 0.75rem), transparent);
}

.tabs::-webkit-scrollbar {
  height: 6px;
}

.tabs::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, var(--cyan-dim), var(--magenta-dim));
  border-radius: 99px;
}

.tabs button {
  flex: 0 0 auto;
  scroll-snap-align: start;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.55rem 0.9rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(8, 14, 22, 0.9);
  color: var(--muted);
  cursor: pointer;
  transition:
    color 0.2s,
    background 0.2s,
    border-color 0.2s,
    box-shadow 0.2s;
  white-space: nowrap;
}

.tabs button:hover {
  color: var(--text);
  border-color: rgba(0, 240, 255, 0.35);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.12);
}

.tabs button:focus-visible {
  outline: 2px solid var(--magenta);
  outline-offset: 2px;
}

.tabs button[aria-selected='true'] {
  color: var(--bg);
  background: linear-gradient(135deg, var(--cyan), #5cf0ff);
  border-color: var(--cyan);
  box-shadow:
    0 0 20px rgba(0, 240, 255, 0.45),
    0 0 2px rgba(255, 43, 214, 0.5);
}

.panel-wrap {
  background: linear-gradient(160deg, rgba(10, 18, 28, 0.95), rgba(5, 8, 14, 0.98));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 12rem;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 43, 214, 0.08),
    0 20px 50px rgba(0, 0, 0, 0.45),
    0 0 40px rgba(0, 240, 255, 0.06);
}

#panel {
  padding: 1.35rem 1.35rem 1.6rem;
}

#panel.animating .panel-inner {
  animation: panelIn 0.38s ease-out both;
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(12px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.panel-inner h2 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 800;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cyan);
  text-shadow: 0 0 14px rgba(0, 240, 255, 0.35);
}

.panel-inner .summary-text {
  margin: 0;
  font-size: 1rem;
  color: var(--muted);
}

.skill-block {
  margin-bottom: 1.1rem;
}

.skill-block:last-child {
  margin-bottom: 0;
}

.skill-block h3 {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--mono);
  color: var(--magenta);
  text-shadow: 0 0 10px rgba(255, 43, 214, 0.25);
}

.skill-block p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.exp-block,
.project-block {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(0, 240, 255, 0.1);
}

.exp-block:last-child,
.project-block:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.exp-block header h3,
.project-block header h3 {
  margin: 0 0 0.2rem;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text);
}

.exp-block header .meta-line,
.project-block header .meta-line {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.8rem;
}

.panel-inner ul.detail-list {
  margin: 0.75rem 0 0;
  padding-left: 1.15rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.panel-inner ul.detail-list li {
  margin-bottom: 0.45rem;
}

.panel-inner ul.detail-list li::marker {
  color: var(--cyan);
}

.panel-inner ul.detail-list li:last-child {
  margin-bottom: 0;
}

.edu-line {
  margin: 0;
  font-size: 1rem;
  color: var(--muted);
}

.edu-line strong {
  color: var(--text);
  font-weight: 600;
}

.cert-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cert-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(0, 240, 255, 0.08);
  font-size: 0.95rem;
  color: var(--muted);
}

.cert-list li:last-child {
  border-bottom: none;
}

.cert-list .year {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--cyan);
  flex-shrink: 0;
}

.extras p {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.extras p:last-child {
  margin-bottom: 0;
}

.empty-hint {
  margin: 0;
  padding: 2rem 0.5rem;
  text-align: center;
  font-size: 1rem;
  color: var(--muted);
  font-family: var(--mono);
}

@media (min-width: 640px) {
  .page {
    padding: 2.5rem 1.5rem 4rem;
  }

  .hero-core {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    text-align: left;
    gap: 2rem;
  }

  .hero-copy {
    text-align: left;
    align-self: center;
  }

  .hero-copy .badge {
    margin-left: 0;
  }

  .contact ul {
    justify-content: flex-start;
  }

  #panel {
    padding: 1.6rem 1.75rem 1.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-photo-ring,
  .glitch-title,
  #panel.animating .panel-inner {
    animation: none;
  }

  .hero-photo-ring {
    animation: none;
    transform: none;
  }
}
