:root {
  --app-bg: #10151d;
  --app-bg-soft: #151d29;
  --sidebar-bg: #0f151f;
  --panel: #1b2432;
  --panel-soft: #252f3f;
  --panel-hover: #2b3648;
  --text-primary: #f5f7fb;
  --text-secondary: #9ca9bb;
  --line-soft: rgba(255, 255, 255, 0.08);
  --accent: #0a84ff;
  --accent-strong: #2da1ff;
  --success: #30d158;
  --danger: #ff453a;
  --warning: #ffd60a;
  --radius-xl: 20px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --shadow-main: 0 24px 44px rgba(5, 10, 16, 0.44);
  --mobile-nav-height: 72px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Segoe UI", sans-serif;
  text-align: left;
  color: var(--text-primary);
  background:
    radial-gradient(circle at 14% 10%, rgba(44, 79, 126, 0.22) 0%, transparent 34%),
    radial-gradient(circle at 86% 84%, rgba(20, 55, 99, 0.2) 0%, transparent 33%),
    linear-gradient(150deg, #131a24 0%, #0d1219 64%, #111925 100%);
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

p {
  color: var(--text-secondary);
  line-height: 1.8;
}

a {
  text-decoration: none;
  color: inherit;
}

.site-shell {
  width: min(1320px, 95vw);
  margin: 0 auto;
  padding: 1.2rem 0 2rem;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 1rem;
}

.sidebar {
  position: sticky;
  top: 0.8rem;
  align-self: start;
  height: calc(100vh - 1.6rem);
  background: linear-gradient(180deg, rgba(15, 21, 31, 0.97), rgba(12, 18, 27, 0.97));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xl);
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  box-shadow: var(--shadow-main);
}

.sidebar__profile {
  background: var(--panel);
  border-radius: var(--radius-lg);
  padding: 0.9rem;
}

.sidebar__profile-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.72rem;
}

.sidebar__avatar {
  width: 68px;
  height: 68px;
  border-radius: 16px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

.sidebar__profile-text {
  min-width: 0;
}

.sidebar__eyebrow {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #d9e5f7;
}

.sidebar__profile h1 {
  margin-top: 0;
  font-size: 1.6rem;
  color: #ffffff;
  line-height: 1.18;
}

.sidebar__role {
  margin-top: 0.28rem;
  font-size: 0.88rem;
}

.sidebar__nav {
  display: grid;
  gap: 0.28rem;
  margin-top: 0.15rem;
}

.sidebar__nav a {
  min-height: 42px;
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: #dbe6f7;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.sidebar__nav a:hover {
  background: var(--panel-soft);
  color: #ffffff;
  transform: translateX(1px);
}

.sidebar__nav a.active {
  background: rgba(10, 132, 255, 0.22);
  color: #ffffff;
}

.nav-item__icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #dce8fa;
  background: rgba(255, 255, 255, 0.07);
}

.nav-item__icon svg {
  width: 16px;
  height: 16px;
}

.nav-item__label {
  font-size: 0.92rem;
  font-weight: 650;
}

.sidebar__social {
  margin-top: auto;
  display: grid;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 0.55rem;
}

.social-link {
  min-height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  padding: 0 0.58rem;
  transition: background 0.18s ease, color 0.18s ease;
}

.social-link:hover {
  background: rgba(255, 255, 255, 0.14);
}

.social-link__icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  background: transparent;
  color: #ffffff;
  flex-shrink: 0;
}

.social-link__icon svg {
  width: 22px;
  height: 22px;
}

.social-link__label {
  font-size: 0.84rem;
  color: #e9f2ff;
}

.social-link--telegram .social-link__label {
  color: #229ed9;
}

.social-link--whatsapp .social-link__label {
  color: #25d366;
}

.social-link--email .social-link__label {
  color: #ea4335;
}

.social-link--linkedin .social-link__label {
  color: #0a66c2;
}

.content {
  min-width: 0;
  display: grid;
  gap: 0.95rem;
}

.card {
  background: linear-gradient(170deg, rgba(27, 36, 50, 0.97), rgba(22, 31, 44, 0.95));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xl);
  padding: 1.2rem;
}

#about.card {
  position: relative;
  overflow: hidden;
}

#about.card::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -80px;
  top: -70px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(42, 142, 255, 0.38), transparent 70%);
  pointer-events: none;
}

.section-tag {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #c9d9f1;
  margin-bottom: 0.45rem;
}

.card h2 {
  color: #ffffff;
  font-size: 1.32rem;
  margin-bottom: 0.72rem;
}

.info-list {
  margin: 0.72rem 0 0.9rem;
  padding-left: 1rem;
  display: grid;
  gap: 0.28rem;
}

.info-list strong {
  color: #ffffff;
}

.about-personal {
  margin: 0.75rem 0 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.about-personal__item {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.62rem;
}

.about-personal__label {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #9fb9d8;
}

.about-personal__value {
  display: block;
  margin-top: 0.16rem;
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.about-personal__value a {
  color: #d9ebff;
}

.section-highlight {
  margin: 0.05rem 0 0.75rem;
  color: #d7e7fb;
  font-weight: 700;
}

.seo-intro {
  margin-top: 0.58rem;
  color: #d7e7fb;
  font-weight: 700;
}

.experience-timeline {
  margin-top: 0.82rem;
  display: grid;
  gap: 0.62rem;
}

.experience-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 0.72rem;
}

.experience-item__period {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #9ec4ff;
}

.experience-item h3 {
  margin-top: 0.24rem;
  color: #ffffff;
  font-size: 1rem;
}

.experience-item__company {
  margin-top: 0.12rem;
  color: #c5d9f3;
  font-size: 0.86rem;
  font-weight: 700;
}

.experience-item p:last-child {
  margin-top: 0.3rem;
}

.skills-progress {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.8rem;
}

.skill-row {
  display: grid;
  gap: 0.28rem;
}

.skill-row__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #e5eefb;
  font-size: 0.9rem;
}

.skill-row__head span:last-child {
  color: #ffffff;
  font-weight: 700;
}

.skill-row__track {
  width: 100%;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.skill-row__fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-strong) 100%);
}

.skills-tags__title {
  margin-top: 0.9rem;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
}

.skills-tags {
  margin-top: 0.45rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.skill-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0.24rem 0.62rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #dfeafb;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
}

.projects-grid {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.project-card {
  width: 100%;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  background: var(--panel-soft);
  color: inherit;
  transition: transform 0.2s ease, background 0.2s ease;
}

.project-card:hover {
  transform: translateY(-3px);
  background: var(--panel-hover);
}

.project-card__media {
  position: relative;
  width: 100%;
  border-radius: inherit;
  overflow: hidden;
}

.project-card__media::before {
  content: "";
  display: block;
  padding-top: 66.6667%;
}

.project-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
      rgba(5, 10, 16, 0.06) 18%,
      rgba(5, 10, 16, 0.48) 64%,
      rgba(4, 9, 15, 0.88) 100%);
  pointer-events: none;
}

.project-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-card__body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 0.72rem;
  display: grid;
  gap: 0.22rem;
  background: linear-gradient(0deg,
      rgba(4, 9, 15, 0.92) 0%,
      rgba(4, 9, 15, 0.68) 58%,
      rgba(4, 9, 15, 0) 100%);
}

.project-card__category {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #d6e7ff;
}

.project-card__body h3 {
  font-size: 0.98rem;
  line-height: 1.32;
  color: #ffffff;
}

.projects-actions {
  margin-top: 0.95rem;
  display: flex;
  justify-content: center;
}

.load-more-btn {
  border: 0;
  border-radius: 999px;
  min-height: 40px;
  padding: 0.58rem 1.05rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(145deg, #0a84ff, #258fff);
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.load-more-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.contact-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.58rem 0.95rem;
  margin-top: 0.85rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(145deg, #0a84ff, #258fff);
  color: #fff;
  font-weight: 700;
}

.contact-socials {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
}

.contact-socials .social-link {
  flex: 0 0 auto;
  min-width: max-content;
  padding-inline: 0.7rem;
  white-space: nowrap;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(8, 12, 18, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.project-modal {
  width: min(960px, 96vw);
  background: linear-gradient(170deg, #1b2432, #161f2b);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xl);
  padding: 0;
  box-shadow: var(--shadow-main);
  position: relative;
  overflow: visible;
}

.project-modal__scroll {
  max-height: 86vh;
  overflow-y: auto;
  padding: 0.95rem;
}

.project-modal__close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  min-height: 0;
  padding: 0;
  background: #ff3b30;
  color: #ffffff;
  font-size: 26px;
  line-height: 1;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(8, 12, 18, 0.45);
  z-index: 3;
}

.project-modal__layout {
  margin-top: 0.7rem;
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
}

.project-modal__media {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  max-height: 220px;
  border-radius: var(--radius-md);
  overflow: hidden;
  justify-self: start;
  flex-shrink: 0;
}

.project-modal__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-modal__content {
  min-width: 0;
  display: grid;
  gap: 0.48rem;
}

.project-modal__category {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  font-weight: 800;
  color: #c7daf5;
}

.project-modal h3 {
  color: #ffffff;
  font-size: 1.3rem;
}

.project-modal h4 {
  margin-top: 0.45rem;
  color: #ffffff;
  font-size: 0.98rem;
}

.project-modal__visit {
  margin-top: 0.12rem;
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: linear-gradient(145deg, #0a84ff, #258fff);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
}

.project-modal__availability-note {
  margin-top: 0.1rem;
  color: #b9c9df;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.55;
}

.project-modal__private-note {
  margin-top: 0.1rem;
  color: #c8d9f1;
  font-size: 0.9rem;
  font-weight: 600;
}

.project-modal__meta {
  margin-top: 0.4rem;
  display: grid;
  gap: 0.2rem;
}

.project-modal__meta p {
  font-size: 0.86rem;
  line-height: 1.6;
}

.project-modal__meta strong {
  color: #ffffff;
  font-weight: 800;
}

.project-modal__external-links {
  margin-top: 0.5rem;
}

.project-modal__external-list {
  margin: 0.35rem 0 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.24rem;
}

.project-modal__external-list a {
  color: #b7d6ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.project-modal__highlights {
  margin: 0;
  padding-left: 1rem;
  color: var(--text-secondary);
  display: grid;
  gap: 0.3rem;
}

.project-modal__stack {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.stack-pill {
  border: 0;
  border-radius: 999px;
  padding: 0.35rem 0.62rem;
  font-size: 0.78rem;
  color: #e8f0fc;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 700;
}

.section-reveal {
  opacity: 0;
  transform: translateY(10px);
  animation: revealUp 0.7s ease forwards;
}

.content>.section-reveal:nth-child(1) {
  animation-delay: 0.05s;
}

.content>.section-reveal:nth-child(2) {
  animation-delay: 0.12s;
}

.content>.section-reveal:nth-child(3) {
  animation-delay: 0.2s;
}

.content>.section-reveal:nth-child(4) {
  animation-delay: 0.28s;
}

.content>.section-reveal:nth-child(5) {
  animation-delay: 0.34s;
}

.content>.section-reveal:nth-child(6) {
  animation-delay: 0.4s;
}

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

@media (max-width: 1080px) {
  .site-shell {
    grid-template-columns: 1fr;
    width: min(95vw, 860px);
    padding-bottom: calc(var(--mobile-nav-height) + 2.2rem + env(safe-area-inset-bottom, 0px));
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .sidebar__social {
    display: none;
  }

  .sidebar__nav {
    position: fixed !important;
    left: 50%;
    right: auto;
    width: min(560px, calc(100vw - 1rem));
    transform: translateX(-50%);
    bottom: calc(env(safe-area-inset-bottom, 0px) + 0.4rem);
    z-index: 10000;
    margin: 0;
    padding: 0.34rem;
    border-radius: 999px;
    background: rgba(21, 24, 31, 0.95);
    border: 1px solid var(--line-soft);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.22rem;
    box-shadow: 0 16px 28px rgba(4, 8, 14, 0.5);
  }

  .sidebar__nav a {
    min-height: 68px;
    border-radius: 999px;
    padding: 0.3rem 0.2rem;
    gap: 0.22rem;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    color: rgba(243, 248, 255, 0.86);
  }

  .sidebar__nav a:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.04);
  }

  .sidebar__nav a.active {
    background: linear-gradient(180deg, rgba(42, 78, 175, 0.45), rgba(36, 56, 112, 0.44));
    color: #8eb0ff;
    box-shadow: inset 0 0 0 1px rgba(132, 162, 255, 0.22);
  }

  .nav-item__icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    color: #eef4ff;
  }

  .sidebar__nav a.active .nav-item__icon {
    color: #7fa6ff;
  }

  .nav-item__icon svg {
    width: 20px;
    height: 20px;
  }

  .nav-item__label {
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.05;
  }

  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-modal {
    width: min(95vw, 780px);
  }

  .project-modal__layout {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .project-modal__media {
    width: min(320px, 100%);
    height: auto;
    max-height: none;
    aspect-ratio: 3 / 2;
  }

  .about-personal {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  body {
    font-size: 15px;
  }

  .site-shell {
    width: calc(100vw - 40px);
    margin-inline: auto;
    padding-top: 0.85rem;
  }

  .sidebar {
    border-radius: var(--radius-lg);
    padding: 0.75rem;
  }

  .sidebar__profile h1 {
    font-size: 1.4rem;
  }

  .sidebar__profile-main {
    flex-direction: row;
    align-items: center;
    gap: 0.62rem;
  }

  .sidebar__avatar {
    width: 58px;
    height: 58px;
    border-radius: 14px;
  }

  .card {
    border-radius: var(--radius-lg);
    padding: 1rem;
  }

  .card h2 {
    font-size: 1.14rem;
  }

  .about-personal {
    grid-template-columns: 1fr;
  }

  .skills-tags {
    gap: 0.38rem;
  }

  .skill-tag {
    font-size: 0.72rem;
    min-height: 28px;
    padding-inline: 0.54rem;
  }

  .contact-socials {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    overflow: visible;
    padding-bottom: 0;
  }

  .contact-socials .social-link {
    min-width: 0;
    width: 100%;
    justify-content: center;
    padding-inline: 0.45rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    padding: 0.58rem;
    border-radius: var(--radius-md);
  }

  .project-card__media {
    width: 100%;
    flex: none;
    border-radius: var(--radius-sm);
    overflow: hidden;
  }

  .project-card__media::before {
    padding-top: 66.6667%;
  }

  .project-card__image {
    border-radius: var(--radius-sm);
  }

  .project-card__body {
    padding: 0.6rem;
    gap: 0.18rem;
  }

  .project-card__category {
    font-size: 0.66rem;
  }

  .project-card__body h3 {
    font-size: 0.86rem;
    line-height: 1.24;
  }

  .sidebar__nav {
    width: calc(100vw - 40px);
    bottom: calc(env(safe-area-inset-bottom, 0px) + 0.4rem);
  }

  .sidebar__nav a {
    min-height: 50px;
  }

  .nav-item__icon {
    width: 24px;
    height: 24px;
  }

  .nav-item__icon svg {
    width: 24px;
    height: 24px;
  }

  .nav-item__label {
    font-size: 0.66rem;
  }

  .project-modal {
    border-radius: var(--radius-lg);
  }

  .project-modal__scroll {
    padding: 0.8rem;
  }

  .project-modal__media {
    width: 100%;
    max-width: none;
    height: auto;
    aspect-ratio: 3 / 2;
    border-radius: var(--radius-sm);
  }

  .project-modal h3 {
    font-size: 1.12rem;
  }
}
