/* Общие переменные */

:root {
    --main-font: 'Space Mono', monospace;
    --primary-color: #000000;
    --secondary-color: #666666;
    --bg-color: #ffffff;
    --highlight-color: #00ff0033;
}


/* Сброс стилей */

body,
html {
    margin: 0;
    padding: 0;
    font-family: var(--main-font);
    background-color: var(--bg-color);
    color: var(--primary-color);
    overflow-x: hidden;
}


/* Эффект курсора */

/* #cursor-effect {
    position: fixed;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(90deg, #00ffcc, #00ccff);
    pointer-events: none;
    filter: blur(50px);
    z-index: 9999;
    will-change: transform;
} */


/* Блок 1 */

#block-1 {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    text-align: center;
    position: relative;
    z-index: 2;
    padding-bottom: 80px;
}

h2 {
    display: block;
    font-size: 4.5em;
    margin-block-start: 0.83em;
    margin-block-end: 0.83em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    font-weight: bold;
    unicode-bidi: isolate;
}

.about-me {
    margin-top: 200px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    justify-content: center;
    align-items: center;
}

.profile-photo {
    width: 450px;
    height: 450px;
    border-radius: 50%;
    object-fit: cover;
}

.bio{
  display: flex;
  justify-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

h3 {
    display: flex;
    justify-content: center;
    font-size: 1.8em;
}

.bio p {
    font-size: 1.2em;
    color: #666;
    display: flex;
    justify-items: center;
    justify-content: center;
}


/* Портфолио */

#portfolio, #dev-portfolio {
    padding: 80px 0;
    text-align: center;
    background-color: #E9E9E9;
    color: var(--primary-color);
}

.portfolio-container {
  margin-top: 50px;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 40px;
}

.portfolio-item {
    width: 300px;
    height: 200px;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: #e0e0e0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.portfolio-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.portfolio-item h4 {
    font-size: 1.5em;
    font-weight: bold;
}

.portfolio-item p {
    font-size: 1em;
    color: #666;
}

.btn-preview {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 20px;
    background-color: 
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.btn-preview:hover {
    background: linear-gradient(90deg, #00ffcc, #00ccff);
}


/* Черный футер */

#footer {
  background-color: var(--bg-color);
  color: var(--primary-color);
    padding: 30px 0;
    text-align: center;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.icon {
    width: 40px;
    height: 40px;
}

.icon svg {
    width: 100%;
    height: 100%;
    fill: white;
    transition: fill 0.3s ease;
}

.icon:hover svg {
    fill: #00ff00;
}


/* Адаптивность */

@media (max-width: 768px) {
    h2 {
        font-size: 2.5em;
    }
    .portfolio-container {
        /* flex-direction: column; */
        align-items: center;
    }
    .portfolio-item {
        width: 80%;
        margin-bottom: 20px;
    }
    .profile-photo {
        width: 150px;
        height: 150px;
    }
}

.inner-space {
    margin-top: 50px;
    margin-bottom: 50px;
    height: 300px;
}


.portfolio-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    padding: 0 40px;
  }
  
  .portfolio-card {
    flex: 0 1 calc(33.333% - 26.66px);
    position: relative;
    border-radius: 16px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
  }
  
  /* Соотношение 16:9 */
  .portfolio-card::before {
    content: "";
    display: block;
    padding-top: 56.25%; /* 9/16 */
  }
  

  @media (max-width: 768px) {
    .portfolio-card {
      flex: 0 1 100%;
    }
  }
  
  
  
  .portfolio-card:hover {
    transform: scale(1.03);
  }
  

  .certificate-overlay {
    /* position: absolute; */
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: 0.4s ease;
    backdrop-filter: blur(0px);
    background-color: rgba(0, 0, 0, 0.0);
  }

  .certificate-overlay .btn-preview {
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
  }
  
  .certificate-overlay .btn-preview:hover {
    background: linear-gradient(90deg, #00ffcc, #00ccff);
  }

  .portfolio-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: 0.4s ease;
    backdrop-filter: blur(0px);
    background-color: rgba(0, 0, 0, 0.0);
  }
  
  
  .portfolio-card:hover .portfolio-overlay {
    opacity: 1;
    backdrop-filter: blur(4px);
    background-color: rgba(0, 0, 0, 0.2);
  }
  
  .portfolio-overlay .btn-preview {
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
  }
  
  .portfolio-overlay .btn-preview:hover {
    background: linear-gradient(90deg, #00ffcc, #00ccff);
  }
  
  .portfolio-title {
    color: white;
    font-size: 1.2em;
    margin-top: 16px;
    font-weight: 600;
  }
  /* Чёрный скроллбар */
body::-webkit-scrollbar {
    width: 12px;
  }
  body::-webkit-scrollbar-track {
    background: #ffffff;
  }
  body::-webkit-scrollbar-thumb {
    background-color: #000000;
    border-radius: 6px;
    border: 3px solid #000;
  }
  
  .scroll-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 250px;
  }
  
  .scroll-text {
    font-size: 14px;
    font-family: 'Space Mono', monospace;
    color: #aaa;
    margin-top: 5px;
    animation: blink 2s infinite;
  }
  
  .scroll-arrows {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }
  
  .arrow {
    font-size: 18px;
    color: #000;
    opacity: 0.2;
    animation: pulse 1.2s infinite;
  }
  
  .a1 {
    animation-delay: 0s;
  }
  .a2 {
    animation-delay: 0.2s;
  }
  .a3 {
    animation-delay: 0.4s;
  }
  
  @keyframes pulse {
    0%   { opacity: 0.2; }
    30%  { opacity: 0.5; }
    60%  { opacity: 1; }
    100% { opacity: 0.2; }
  }
  
  @keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
  }
  
#certificates{
  padding: 80px 0;
  text-align: center;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

.about-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 60px;
  flex-wrap: wrap;
  justify-content: center;
}

.theme-popup {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 2px solid #000;
  border-radius: 16px;
  padding: 10px 20px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--main-font);
}

.theme-popup button {
  padding: 6px 12px;
  border: none;
  background-color: #000;
  color: #fff;
  cursor: pointer;
  border-radius: 5px;
  font-weight: bold;
}

.theme-popup button:hover {
  background-color: #666666;
}

.theme-close {
  margin-left: auto;
  cursor: pointer;
  font-weight: bold;
  color: #000;
  font-size: 18px;
}

[data-theme="dark"] {
  --bg-color: #000000;
  --primary-color: #ffffff;
  --secondary-color: #aaaaaa;
  --highlight-color: #00ff0033;
}

[data-theme="dark"] #cursor-effect {
  display: none;
}


[data-theme="dark"] #cursor-effect {
  display: none;
}

[data-theme="dark"] #portfolio {
  color: white;
  background: linear-gradient(270deg, #00ffcc, #00ccff, #00ffcc);
  background-size: 600% 600%;
  animation: gradientFlow 10s ease infinite;
}

[data-theme="dark"] #dev-portfolio {
  color: white;
  background: linear-gradient(270deg, #00ffcc, #00ccff, #00ffcc);
  background-size: 600% 600%;
  animation: gradientFlow 10s ease infinite;
}

[data-theme="dark"] .theme-popup {
  color: #000;
}

[data-theme="dark"] body::-webkit-scrollbar-track {
  background: #000;
}

[data-theme="dark"] body::-webkit-scrollbar-thumb {
  background-color: #fff;
  border: 3px solid #fff;
}


@keyframes gradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}


.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--bg-color);
  /* border-bottom: 1px solid #ccc; */
  z-index: 1000;
  padding: 10px 0;
}

.nav {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  text-decoration: none;
  font-family: var(--main-font);
  font-weight: bold;
  font-size: 1.2em;
  color: var(--primary-color);
}

.burger {
  display: none;
  font-size: 1.8em;
  cursor: pointer;
  user-select: none;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 40px;
}

.nav-links li a {
  position: relative;
  text-decoration: none;
  color: var(--primary-color);
  font-weight: 300;
  font-family: var(--main-font);
  transition: color 0.3s ease;
}

.nav-links li a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, #00ffcc, #00ccff);;
  transition: width 0.3s ease;
}

.nav-links li a:hover::after {
  width: 100%;
}
@media (max-width: 768px) {
  .burger {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-color);
    padding: 20px 0;
    gap: 20px;
    display: none;
    align-items: center;
    border-top: 1px solid #ccc;
  }

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

.contact-section {
  padding: 100px 20px;
  font-family: 'Space Mono', monospace;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.contact-link{
  margin-top: 35px;
}

/* Светлая тема по умолчанию */
[data-theme="light"] .contact-section {
  background-color: #ffffff;
  color: #000000;
}

[data-theme="light"] .contact-link {
  border: 2px solid #000;
  background: rgba(0, 0, 0, 0.05);
  color: #000;
}

[data-theme="light"] .contact-link:hover {
  background-color: #000;
  color: #fff;
}

/* Тёмная тема */
[data-theme="dark"] .contact-section {
  background: radial-gradient(circle at center, #000 0%, #111 100%);
  color: #00ffcc;
}

[data-theme="dark"] .contact-link {
  border: 2px solid #00ffcc;
  background: rgba(0, 255, 204, 0.05);
  color: #00ffcc;
}

[data-theme="dark"] .contact-link:hover {
  background-color: #00ffcc;
  color: #000;
}

[data-theme="light"] .highlight {
  background: none;
  color: #000;
  -webkit-text-fill-color: initial;
}

[data-theme="light"] .feedback-form input,
[data-theme="light"] .feedback-form textarea {
  background-color: #fff;
  color: #000;
  border: 2px solid #000;
}

[data-theme="light"] .feedback-form input::placeholder,
[data-theme="light"] .feedback-form textarea::placeholder {
  color: #555;
}

[data-theme="light"] .feedback-form button {
  background-color: #000;
  color: #fff;
}

[data-theme="light"] .feedback-form button:hover {
  background-color: #333;
}

[data-theme="light"] .form-status,
[data-theme="light"] .contact-title,
[data-theme="light"] .footer-note,
[data-theme="light"] .highlight {
  color: #000;
  background: none;
  -webkit-text-fill-color: initial;
}


.contact-container {
  max-width: 800px;
  margin: 0 auto;
  z-index: 2;
  position: relative;
}

.contact-title {
  font-size: 2.2em;
  margin-bottom: 60px;
  letter-spacing: 1px;
  color: #fff;
}

.highlight {
  color: #00ffcc;
  background: linear-gradient(90deg, #00ffcc, #00ccff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.contact-grid {
  margin-top: 140px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.contact-link {
  color: #00ffcc;
  text-decoration: none;
  border: 2px solid #00ffcc;
  padding: 15px;
  border-radius: 8px;
  display: block;
  transition: all 0.3s ease;
  background: rgba(0, 255, 204, 0.05);
  font-weight: bold;
  font-size: 1em;
}

.contact-link:hover {
  background-color: #00ffcc;
  color: #000;
  transform: scale(1.05);
  box-shadow: 0 0 20px #00ffcc;
}

.footer-note {
  font-size: 0.9em;
  color: #666;
  margin-top: 60px;
}

.contact-section::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -20%;
  width: 150%;
  height: 150%;
  background: repeating-linear-gradient(45deg, #00ffcc11, #00ffcc11 1px, transparent 1px, transparent 20px);
  opacity: 0.03;
  animation: scan 20s linear infinite;
  z-index: 1;
}

@keyframes scan {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-20%, -20%); }
}

[data-theme="dark"] .arrow {
  color: #00ffcc;
}

@media (min-width: 768px) {
  .theme-popup {
    left: 40px;
    transform: none;
  }
}
html, body, 
[data-theme] {
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

* {
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

/* Увеличим всю форму */
.feedback-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 40px 20px;
}

.feedback-form input,
.feedback-form textarea {
  padding: 16px 20px;
  font-size: 1.1em;
  border: 2px solid var(--primary-color, #000);
  border-radius: 8px;
  font-family: var(--main-font);
  background: var(--bg-color);
  color: var(--primary-color);
}

.feedback-form textarea {
  height: 160px;
  resize: vertical;
}

.feedback-form button {
  padding: 14px;
  font-size: 1em;
  border-radius: 8px;
  background: var(--primary-color);
  color: var(--bg-color);
  text-transform: lowercase;
  font-weight: bold;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.feedback-form button:hover {
  opacity: 0.85;
}

/* Заголовок: contact me */
.contact-title {
  font-size: 2.4em;
  font-weight: 700;
  text-align: center;
  margin: 40px 0 20px;
}

/* Заголовок: let's build something legendary */
.contact-section .contact-title:last-of-type {
  font-size: 2.5em;
  margin-top: 60px;
  font-weight: 600;
}

/* Подсветка слова legendary */
.highlight {
  color: var(--primary-color);
  font-weight: bold;
}


.form-status {
  text-align: center;
  margin-top: 10px;
  font-size: 0.95em;
}
.form-loader {
  font-size: 14px;
  color: #00ccff;
  margin-top: 10px;
  animation: pulseFade 1.5s infinite;
  text-align: center;
}

@keyframes pulseFade {
  0% { opacity: 0.3; }
  50% { opacity: 1; }
  100% { opacity: 0.3; }
}


/* Стили фильтров */
.portfolio-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.filter-btn {
  font-family: var(--main-font);
  font-size: 0.9em;
  padding: 10px 18px;
  border: 2px solid;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

[data-theme="dark"] .filter-btn {
  border-color: #00ffcc;
  color: #00ffcc;
}

[data-theme="dark"] .filter-btn.active,
[data-theme="dark"] .filter-btn:hover {
  background: #00ffcc;
  color: #000;
}

[data-theme="light"] .filter-btn {
  border-color: #000;
  color: #000;
}

[data-theme="light"] .filter-btn.active,
[data-theme="light"] .filter-btn:hover {
  background: #000;
  color: #fff;
}

.social-icons p span{
  text-decoration: underline;
}

.portfolio-card {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.6s ease;
}
.portfolio-card.visible {
  opacity: 1;
  transform: translateY(0);
}
.resume-popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-y: auto;
  padding: 40px 20px;
}

.resume-popup-content {
  overflow: auto;
  max-height: 80%;
  background: var(--bg-color);
  color: var(--primary-color);
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 0 40px #00ffcc44;
  position: relative;
  font-family: var(--main-font);
}

.resume-popup-content h3 {
  margin-top: 0;
  text-align: center;
}

.resume-close {
  position: absolute;
  top: 16px;
  right: 24px;
  font-size: 26px;
  cursor: pointer;
  font-weight: bold;
  color: var(--primary-color);
}

.resume-popup-content ul {
  padding-left: 20px;
  margin-bottom: 24px;
}

.resume-popup-content li {
  margin-bottom: 6px;
  font-size: 0.95em;
}

.resume-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
  margin-top: 40px;
}

.copy-confirm {
  font-size: 0.9em;
  color: #00ffcc;
  display: none;
}

.hidden {
  display: none;
}

[data-theme="dark"] .resume-popup-content {
  background: #000;
  color: #00ffcc;
}

.resume-popup-content {
  max-width: 700px;
  padding: 30px;
}

.resume-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

.resume-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #00ffcc;
  box-shadow: 0 0 10px #00ffcc88;
}

.resume-location {
  font-size: 0.9em;
  color: #888;
  margin-top: 5px;
}
#preloader {
  position: fixed;
  inset: 0;
  background: var(--bg-color);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  transition: opacity 0.6s ease, visibility 0.6s;
  text-align: center;
}

.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 120px; /* ⬅️ добавляем высоту */
  transform: translateY(10px); /* ⬅️ чуть сдвигаем вниз для баланса */
}

#preloader-logo {
  font-weight: bold;
  font-family: var(--main-font);
  font-size: 1.8em;
  color: var(--primary-color);
  white-space: nowrap;
  overflow: hidden;
  width: 0ch;
  animation: typing 1.2s steps(14) forwards;
}


@keyframes typing {
  from { width: 0ch; }
  to { width: 14ch; }
}

.loader-bar {
  width: 200px;
  height: 2px;
  background-color: #ccc;
  overflow: hidden;
}

.loader-bar-fill {
  height: 100%;
  width: 0%;
  background-color: #000;
  animation: fill 1.5s ease-out forwards;
}

@keyframes fill {
  0% { width: 0%; }
  100% { width: 100%; }
}

[data-theme="dark"] .loader-bar-fill {
  background-color: #00ffcc;
}

#preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.6s ease, visibility 0.6s;
}
.certificates-section {
  padding: 80px 20px;
  text-align: center;
}

.certificates-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  margin-top: 50px;
}

.cert-card {
  position: relative;
  width: 100%;
  max-width: 500px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.cert-card:hover {
  transform: scale(1.02);
}

.cert-image {
  width: 100%;
  height: auto;
  display: block;
}

.cert-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  background-color: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(6px);
  transition: 0.4s ease;
}

.cert-card:hover .cert-overlay {
  opacity: 1;
}

.cert-button {
  padding: 12px 28px;
  background-color: #000;
  color: #fff;
  border-radius: 6px;
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.cert-button:hover {
  background: linear-gradient(90deg, #00ffcc, #00ccff);
  color: #000;
}

.cert-title {
  color: white;
  font-size: 1.1em;
  margin-top: 14px;
  font-weight: 600;
}

@media (max-width: 768px) {
  .cert-card {
    max-width: 90%;
  }
}

[data-theme="dark"] .feedback-form button {
  background: linear-gradient(90deg, #00ffcc, #00ccff);
  color: #000;
  border: none;
}

[data-theme="dark"] .feedback-form button:hover {
  opacity: 0.9;
  box-shadow: 0 0 20px #00ccff;
}

[data-theme="dark"] .feedback-form input,
[data-theme="dark"] .feedback-form textarea {
  background-color: #000;
  color: #00ffcc;
  border: 2px solid transparent;
  background-image: linear-gradient(#000, #000), linear-gradient(90deg, #00ffcc, #00ccff);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

#chat-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: black;
  color: #00ffcc;
  font-size: 26px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  animation: pulse-shadow 2s infinite;
  z-index: 9999;
}

@keyframes pulse-shadow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(0, 255, 204, 0.4);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(0, 255, 204, 0);
  }
}

#chat-popup {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 320px;
  background: var(--bg-color);
  border: 2px solid var(--primary-color);
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0, 255, 204, 0.2);
  font-family: var(--main-font);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#chat-popup.hidden {
  display: none;
}

.chat-header {
  padding: 12px 16px;
  background: var(--primary-color);
  color: var(--bg-color);
  display: flex;
  justify-content: space-between;
  font-weight: bold;
}

.chat-close {
  cursor: pointer;
}

.chat-messages {
  padding: 12px;
  height: 200px;
  overflow-y: auto;
  background: var(--bg-color);
  font-size: 0.95em;
}

.chat-message {
  margin-bottom: 10px;
  line-height: 1.4;
}

.chat-message.user {
  text-align: right;
  color: #00ccff;
}

.chat-message.admin {
  text-align: left;
  color: #333;
}

.chat-input-group {
  display: flex;
  padding: 10px;
  gap: 10px;
  border-top: 1px solid #ccc;
}

#chat-input {
  flex: 1;
  padding: 8px 10px;
  font-family: var(--main-font);
  border: 1px solid #aaa;
  border-radius: 6px;
}

#chat-send {
  background: black;
  color: #00ffcc;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
}

.chat-actions {
  display: flex;
  justify-content: space-around;
  padding: 10px;
  background: #f9f9f9;
}

.chat-action {
  font-family: var(--main-font);
  font-size: 0.85em;
  background: none;
  border: 1px solid #000;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
}

.chat-message {
  display: flex;
  align-items: flex-end;
  margin-bottom: 10px;
  max-width: 85%;
  word-break: break-word;
}

.chat-message.user {
  justify-content: flex-end;
  align-self: flex-end;
}

.chat-message.admin {
  justify-content: flex-start;
  align-self: flex-start;
}

.chat-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.95em;
  line-height: 1.4;
  max-width: 220px;
  display: inline-block;
}

.chat-bubble.user {
  background-color: #000;
  color: #fff;
  border-top-right-radius: 0;
}

.chat-bubble.admin {
  background: linear-gradient(90deg, #00ffcc, #00ccff);
  color: #000;
  border-top-left-radius: 0;
}

.chat-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 8px;
}


/* — Светлая тема (дефолт) — */
.score-gauge .bg {
  stroke: rgb(255, 255, 255);   /* фон круга (пустой слой) */
}
.score-gauge .fg {
  fill: none;
  stroke-width: 10;
  stroke: rgb(0, 0, 0);         /* чёрный для заполнения */
  transition: stroke-dashoffset 1s ease;
}
.score-gauge.highlight .fg {
  stroke: rgb(50, 113, 59);      /* зелёный остаётся */
}

/* — Тёмная тема — чёрный→белый, белый→чёрный, зелёный без изменений — */
[data-theme="dark"] .score-gauge .fg {
  stroke: rgb(255, 255, 255);    /* вместо чёрного — белый */
}
[data-theme="dark"] .score-gauge .bg {
  stroke: rgb(0, 0, 0);          /* вместо белого — чёрный */
}
/* .score-gauge.highlight .fg остаётся rgb(50,113,59) */
[data-theme="dark"] .score-gauge svg text {
  fill: var(--primary-color);
}
[data-theme="dark"] .score__name {
  color: var(--primary-color);
}


.scores__list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    justify-items: center;
  }

@media screen and (max-width: 1024px) {
  .scores__list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    justify-items: center;
}
}


@media screen and (max-width: 767px) {
  .scores__list {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
    justify-items: center;
}
}

.experience-timeline {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-top: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.exp-item {
  border-left: 3px solid #000000;
  padding-left: 20px;
  position: relative;
}

.exp-item::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #000000;
  box-shadow: 0 0 10px #00000099;
}

.exp-header {
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
}

.exp-company {
  font-weight: 700;
  font-size: 1.2em;
}

.exp-period {
  font-size: 0.9em;
  color: var(--secondary-color);
}

.exp-item ul {
  list-style-type: disc;
  padding-left: 20px;
}

.exp-item li {
  margin-bottom: 12px;
  font-size: 0.95em;
}

.exp-item small {
  color: var(--secondary-color);
}

.self-learned .self-note {
  font-style: italic;
  font-size: 0.95em;
  color: var(--secondary-color);
  margin-top: 5px;
}


[data-theme="light"] ::selection {
  background: #000;
  color: #fff;
}

[data-theme="dark"] ::selection {
  background: #fff;
  color: #000;
}

