:root {
  --bg: #06101c;
  --surface: rgba(9, 21, 37, 0.78);
  --surface-strong: #0b1a2d;
  --text: #f8fbff;
  --text-soft: #d8e5f2;
  --muted: #93a8bd;
  --line: rgba(177, 214, 235, 0.18);
  --line-strong: rgba(177, 214, 235, 0.28);
  --cyan: #6ee7f7;
  --green: #83efb6;
  --gold: #f4c96b;
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.34);
}

:root.light {
  --bg: #f4f8fb;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: #ffffff;
  --text: #07111f;
  --text-soft: #1c3148;
  --muted: #53657a;
  --line: rgba(17, 35, 56, 0.13);
  --line-strong: rgba(17, 35, 56, 0.22);
  --green: #047857;
  --shadow: 0 24px 70px rgba(15, 33, 54, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: #050b14;
  animation: loader-out 0.7s ease forwards;
  animation-delay: 1.9s;
}

.loader-box {
  width: min(88vw, 520px);
  padding: 32px;
  border: 1px solid rgba(110, 231, 247, 0.24);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.loader-bar {
  height: 4px;
  margin-bottom: 24px;
  border-radius: 999px;
  background: var(--cyan);
  transform-origin: left;
  animation: loader-bar 1.65s ease-in-out forwards;
}

.loader p {
  margin: 0;
  color: #cffafe;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  letter-spacing: 0.24em;
}

.loader strong {
  display: block;
  margin-top: 16px;
  color: white;
  font-size: 22px;
}

.background-lines {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(circle at 14% 15%, rgba(110, 231, 247, 0.16), transparent 28%),
    radial-gradient(circle at 86% 10%, rgba(244, 201, 107, 0.11), transparent 25%),
    radial-gradient(circle at 84% 88%, rgba(131, 239, 182, 0.12), transparent 28%),
    var(--bg);
}

.background-lines::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.28;
  background-image:
    linear-gradient(to right, rgba(110, 231, 247, 0.12) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(110, 231, 247, 0.1) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, transparent, black 12%, black 80%, transparent);
}

.background-lines::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.34;
  background:
    linear-gradient(112deg, transparent 0 34%, rgba(110, 231, 247, 0.16) 34.2%, transparent 35% 100%),
    linear-gradient(68deg, transparent 0 56%, rgba(244, 201, 107, 0.13) 56.2%, transparent 57% 100%),
    linear-gradient(132deg, transparent 0 70%, rgba(131, 239, 182, 0.12) 70.2%, transparent 71% 100%);
  animation: line-drift 15s linear infinite alternate;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 16, 28, 0.78);
  backdrop-filter: blur(18px);
}

:root.light .site-header {
  background: rgba(244, 248, 251, 0.86);
}

.nav {
  width: min(1220px, calc(100% - 40px));
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(110, 231, 247, 0.42);
  background: rgba(110, 231, 247, 0.11);
  color: var(--cyan);
  font-weight: 950;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  color: var(--text);
  font-size: 15px;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

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

.nav-links a {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(110, 231, 247, 0.11);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
}

.section {
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
  padding: 96px 0;
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 118px;
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  align-items: center;
  gap: 52px;
}

.availability {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 16px;
  border: 1px solid rgba(131, 239, 182, 0.32);
  border-radius: 999px;
  background: rgba(131, 239, 182, 0.1);
  color: var(--green);
  font-size: 14px;
  font-weight: 900;
}

.availability span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #86efac;
  box-shadow: 0 0 16px rgba(134, 239, 172, 0.8);
}

h1,
h2,
h3,
h4,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 28px 0 0;
  color: var(--text);
  font-size: clamp(46px, 7vw, 88px);
  line-height: 0.98;
}

.headline {
  margin: 24px 0 0;
  color: var(--text-soft);
  font-size: clamp(18px, 2.1vw, 22px);
  font-weight: 850;
  line-height: 1.6;
}

.summary {
  max-width: 710px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.78;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.counter-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.counter-strip div {
  min-width: 160px;
  padding: 14px 16px;
  border: 1px solid rgba(110, 231, 247, 0.22);
  border-radius: 8px;
  background: rgba(110, 231, 247, 0.08);
}

.counter-strip span {
  display: block;
  color: var(--cyan);
  font-size: 28px;
  font-weight: 950;
  line-height: 1;
}

.counter-strip small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.button {
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  border-radius: 8px;
  font-weight: 950;
  text-decoration: none;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.button:hover,
.card:hover,
.skill:hover,
.contact-links a:hover {
  transform: translateY(-4px);
}

.primary {
  background: var(--cyan);
  color: #07111f;
  box-shadow: 0 18px 44px rgba(110, 231, 247, 0.22);
}

.secondary {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
}

.portrait-panel {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(110, 231, 247, 0.18), rgba(244, 201, 107, 0.08));
  box-shadow: var(--shadow);
}

.portrait-panel::before,
.portrait-panel::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  width: 28%;
  pointer-events: none;
}

.portrait-panel::before {
  left: 0;
  background: linear-gradient(to right, var(--bg), transparent);
}

.portrait-panel::after {
  right: 0;
  background: linear-gradient(to left, var(--bg), transparent);
}

.portrait-panel img {
  width: 100%;
  height: 100%;
  min-height: 560px;
  display: block;
  object-fit: cover;
  object-position: center;
}

.portrait-label {
  position: absolute;
  left: 24px;
  bottom: 24px;
  z-index: 2;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
  color: white;
  font-size: 14px;
  font-weight: 850;
  backdrop-filter: blur(12px);
}

.section-title {
  max-width: 760px;
  margin: 0 auto 44px;
  text-align: center;
}

.section-title p {
  margin: 0;
  color: var(--cyan);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  font-weight: 950;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.section-title h2,
.contact-panel h2 {
  margin: 12px 0 0;
  color: var(--text);
  font-size: clamp(32px, 4.2vw, 46px);
  line-height: 1.08;
}

.card,
.skill,
.contact-panel,
.timeline-item,
.tabs {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.13);
  backdrop-filter: blur(16px);
}

.card {
  padding: 28px;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.card h3,
.skill strong,
.timeline-item h3 {
  margin: 0;
  color: var(--text);
  font-size: 22px;
}

.card p,
.skill p,
.timeline-item p,
.contact-panel p {
  color: var(--muted);
  line-height: 1.72;
}

.wide {
  min-height: 100%;
}

.tabs {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px;
}

.tab-buttons {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.tab-button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 950;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.tab-button:hover,
.tab-button.active {
  border-color: rgba(110, 231, 247, 0.42);
  background: rgba(110, 231, 247, 0.12);
  color: var(--text);
}

.tab-panel {
  display: none;
  min-height: 245px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(110, 231, 247, 0.09), transparent 42%),
    rgba(255, 255, 255, 0.035);
}

.tab-panel.active {
  display: block;
}

.tab-panel h3 {
  margin: 0;
  color: var(--text);
  font-size: 28px;
}

.tab-panel p {
  max-width: 860px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.78;
}

.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding-left: 28px;
  border-left: 1px solid rgba(110, 231, 247, 0.26);
}

.timeline-item {
  position: relative;
  margin-bottom: 24px;
  padding: 28px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  top: 32px;
  left: -39px;
  width: 19px;
  height: 19px;
  border: 4px solid var(--bg);
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 24px rgba(110, 231, 247, 0.62);
}

.timeline-date {
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.timeline-item h4 {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 16px;
}

.education-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.education-card span {
  display: inline-grid;
  width: 42px;
  height: 42px;
  margin-bottom: 22px;
  place-items: center;
  border: 1px solid rgba(244, 201, 107, 0.38);
  color: var(--gold);
  font-weight: 950;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.skill {
  padding: 24px;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.contact-section {
  padding-bottom: 112px;
}

.contact-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  padding: 34px;
}

.contact-links {
  display: grid;
  gap: 12px;
}

.contact-links a {
  min-height: 58px;
  display: flex;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font-weight: 850;
  text-decoration: none;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.contact-links a:hover {
  border-color: rgba(110, 231, 247, 0.42);
  background: rgba(110, 231, 247, 0.1);
}

.whatsapp {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #34d399;
  color: #07111f;
  text-decoration: none;
  box-shadow: 0 18px 40px rgba(52, 211, 153, 0.34);
  transition: transform 0.22s ease, background 0.22s ease;
}

.whatsapp:hover {
  transform: translateY(-4px);
  background: #6ee7b7;
}

.whatsapp svg {
  width: 31px;
  height: 31px;
  display: block;
  fill: currentColor;
}

@keyframes loader-bar {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes loader-out {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes line-drift {
  from {
    transform: translate3d(-4%, -2%, 0);
  }
  to {
    transform: translate3d(4%, 2%, 0);
  }
}

@media (max-width: 980px) {
  .menu-button {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 74px;
    left: 20px;
    right: 20px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-strong);
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 14px;
  }

  .tab-buttons {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-content,
  .education-grid,
  .skills-grid,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 104px;
  }

  .portrait-panel,
  .portrait-panel img {
    min-height: 460px;
  }
}

@media (max-width: 620px) {
  .nav,
  .section {
    width: min(100% - 28px, 1220px);
  }

  .section {
    padding: 78px 0;
  }

  h1 {
    font-size: 46px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .portrait-panel,
  .portrait-panel img {
    min-height: 390px;
  }

  .contact-panel {
    padding: 22px;
  }

  .tab-buttons {
    grid-template-columns: 1fr;
  }
}

@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;
  }
}
