/* topbar */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--topbar-border);
}

.topbar-inner {
  height: 56px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; }
.brand-mark {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 6px;
  background: var(--brand-mark-bg);
  border: 1px solid var(--brand-mark-border);
  color: var(--brand-mark-text);
  font-size: 12px;
}
.brand-name { font-size: 14px; font-weight: 700; color: var(--brand-name-color); }

.toplinks { display: flex; align-items: center; gap: 8px; }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0; background: transparent;
  color: var(--nav-link-color);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
}
.nav-link i {
  font-size: 14px;
  opacity: 0.95;
}
.nav-link:hover { background: var(--nav-link-hover-bg); color: var(--nav-link-hover-text); }
.nav-link.active { color: var(--nav-link-active-text); font-weight: 600; position: relative; }
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 10px; right: 10px;
  bottom: -10px;
  height: 2px;
  background: var(--nav-link-active-line);
  border-radius: 999px;
}

.nav-link.nav-link-danger {
  position: relative;
  border: 0.75px solid #f85149;
  border-radius: 999px;
  background: rgba(248, 81, 73, 0.16);
  color: #ffb3ad;
  animation: danger-blink 1s steps(2, end) infinite;
}

.nav-link.nav-link-danger::after {
  content: "....?";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  color: #ffd5d1;
  transition: opacity 160ms ease;
  pointer-events: none;
}

.nav-link.nav-link-danger:hover {
  background: rgba(248, 81, 73, 0.26);
  border-color: #ff7b72;
  color: transparent;
}

.nav-link.nav-link-danger:hover::after {
  opacity: 1;
}

.nav-link.nav-link-danger.active {
  color: #ffffff;
  background: rgba(248, 81, 73, 0.34);
  border-color: #ff7b72;
}

.nav-link.nav-link-danger.active::after {
  display: none;
}

@keyframes danger-blink {
  0%, 48% {
    opacity: 1;
  }
  50%, 100% {
    opacity: 0.45;
  }
}

.theme-btn {
  width: 34px; height: 34px;
  border-radius: 6px;
  border: 1px solid var(--theme-btn-border);
  background: var(--theme-btn-bg);
  color: var(--theme-btn-text);
  cursor: pointer;
}

.theme-btn i {
  display: inline-block;
  transform-origin: 50% 55%;
}

.theme-btn.icon-anim i {
  animation: theme-icon-toggle 220ms ease;
}

@keyframes theme-icon-toggle {
  0% { transform: rotate(-18deg) scale(0.86); opacity: 0.4; }
  60% { transform: rotate(6deg) scale(1.08); opacity: 1; }
  100% { transform: rotate(0deg) scale(1); opacity: 1; }
}

/* banner & layout */
.header-banner {
  width: 100%;
  height: 220px;
  background-image: url("../img/header.jpg");
  background-color: #0d1117;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.main-layout {
  padding: 0 5% 20px;
  max-width: 1600px;
  margin: 0 auto;
}

/* avatar */
.profile-pic-row {
  display: flex;
  margin-top: -145px;
  margin-bottom: 14px;
  position: relative;
  z-index: 10;
  gap: 12px;
}
.profile-pic-area { flex: 1; display: flex; justify-content: center; min-width: 0; }
.profile-pic-spacer { flex: 5; }

.profile-pic-stack {
  position: relative;
  display: inline-block;
}

.profile-pic-wrapper {
  width: clamp(150px, 16vw, 200px);
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border);
  background: var(--card-bg);
}
.profile-pic-wrapper img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.1) translateX(-4.5%);
  transform-origin: center;
  transition: opacity 180ms ease-in-out;
}

.profile-img-default {
  opacity: 1;
  z-index: 1;
}

.profile-img-hover {
  opacity: 0;
  z-index: 2;
}

.profile-pic-wrapper:hover .profile-img-default {
  opacity: 0;
}

.profile-pic-wrapper:hover .profile-img-hover {
  opacity: 1;
}

.profile-status {
  position: absolute;
  right: -72px;
  bottom: 16px;
  z-index: 10;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card-bg);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(27, 31, 36, 0.16);
}

.profile-status:hover {
  color: var(--text-primary);
  background: var(--card-bg-2);
}

.profile-status i {
  font-size: 16px;
}

.profile-pic-placeholder { width: 100%; height: 100%; display: grid; place-items: center; font-size: 42px; background: var(--card-bg-2); }

/* columns */
.panels-container { display: flex; gap: 14px; min-height: 600px; height: auto; }

.panel-col { display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.panel-col-left  { flex: 1.5; }
.panel-col-mid   { flex: 3; }
.panel-col-right { flex: 2; }

/* right column proportions */
.panel-col-right .panel-news { flex: 3.5; }
.panel-col-right .panel-skills { flex: 1.5; }
