:root {
  --bg-dark: #0e0e1a;
  --editor: #111122;
  --code: #e8e8f0;
  --comment: #6a7a89;
  --keyword: #ffb86c;
  --string: #50fa7b;
  --class: #8be9fd;
  --method: #bd93f9;
  --number: #f1fa7c;
  --pill: #1f2437;
  --pill-bd: rgba(255, 255, 255, .08);

  --font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-weight: 400;
}

html,
body {
  font-family: var(--font-family);
  font-weight: var(--font-weight);
}

/* ===== cursor-following background ===== */
#cursor-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(600px circle at var(--cx, 50%) var(--cy, 50%), rgba(255, 155, 60, .38), rgba(255, 155, 60, 0) 45%),
    radial-gradient(900px circle at calc(var(--cx, 50%) + 12%) calc(var(--cy, 50%) + 8%), rgba(120, 0, 255, .22), rgba(120, 0, 255, 0) 50%),
    linear-gradient(180deg, #0d0f1a 0%, #0b0f17 100%);
  filter: saturate(1.1) contrast(1.05);
}

#cursor-bg::after {
  content: "";
  position: absolute;
  inset: -10%;
  background: radial-gradient(900px circle at calc(var(--cx, 50%) + 20%) calc(var(--cy, 50%) + 25%), rgba(0, 255, 180, .15), transparent 55%);
  mix-blend-mode: screen;
  pointer-events: none;
}

/* ===== page frame ===== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, #28183a, #0e0e1a 80%);
  font-family: "JetBrains Mono", monospace;
  color: var(--code);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px;
}

.window {
  width: 90%;
  max-width: 1100px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 28px 60px rgba(0, 0, 0, .55);
  background: var(--editor);
}

/* ===== title bar ===== */
.title-bar {
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(12, 12, 16, 0.85);
  -webkit-backdrop-filter: blur(10px);
  /* for Safari/older WebKit */
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #e9f0ff;
}

.dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.red {
  background: #ff5f56;
}

.yellow {
  background: #ffbd2e;
}

.green {
  background: #27c93f;
}

.filename {
  font-weight: 600;
  color: #ddd;
  margin-left: 8px;
  flex: 1;
  padding-left: 8px;
}

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

.buttons button,
.btn {
  background: #1b1b2f;
  color: #ccc;
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  transition: .25s ease;
  font-family: "JetBrains Mono", monospace;
}

.buttons button:hover,
.btn:hover {
  background: #ff4b2b;
  color: #fff;
  box-shadow: 0 0 10px rgba(255, 75, 43, .6);
}

.buttons button.active {
  background: #ff79c6;
  color: #111;
  font-weight: 700;
}

/* ===== chips (optional CTA style) ===== */
.chip {
  background: var(--pill);
  color: #dbe2ea;
  border: 1px solid var(--pill-bd);
  border-radius: 10px;
  padding: 7px 12px;
  cursor: pointer;
  transition: background .25s, color .25s, box-shadow .25s, transform .15s;
}

.chip:hover {
  background: #ff5b3d;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 91, 61, .35), 0 0 10px rgba(255, 91, 61, .25) inset;
}

.chip:active {
  background: #ff3e1c;
  transform: scale(.98);
  box-shadow: 0 3px 10px rgba(255, 91, 61, .45) inset;
}

.chip-primary {
  background: #2a2f45;
  color: #fff;
}

.chip-primary:hover {
  background: #ff5b3d;
}

/* ===== layout ===== */
.content {
  display: grid;
  grid-template-columns: 240px 1fr;
  grid-template-areas: "profile about" "code code";
  gap: 30px;
  padding: 30px 25px 40px;
}

/* left: profile image */
.profile {
  grid-area: profile;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.avatar-glow {
  padding: 3px;
  border-radius: 14px;
  background: linear-gradient(45deg, #00ff99, #00ffff, #f01f04, #054628, #ffd24a, #00ff99);
  background-size: 400% 400%;
  animation: borderMove 6s linear infinite;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}

.avatar-glow img {
  display: block;
  width: 100%;
  max-width: 220px;
  border-radius: 12px;
  background: #0b0f17;
}

/* small social stack on avatar */
.avatar-social {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  gap: 10px;
  justify-content: center;
}

.avatar-social a {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #1b1b2f;
  color: #cfe3ff;
  text-decoration: none;
  transition: .2s;
}

.avatar-social a:hover {
  filter: brightness(1.2);
  transform: translateY(-2px);
}

/* right: about block */
.about-me {
  grid-area: about;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-right: 20px;
  gap: 8px;
  text-align: left;
}



.about-me .name {
  margin: 0 0 4px;
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.15;
}

.about-me .role {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
  color: #7ef6a1;
}

.about-me .summary {
  font-size: 15px;
  line-height: 1.55;
  color: #bfc6d1;
  margin: 0 0 12px;
  justify-content: center;
}

/* details grid */
.details-grid {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 28px;
  width: 100%;
  max-width: 600px;
}

.details-grid li {
  display: flex;
  align-items: baseline;
  gap: 6px;
  position: relative;
  padding-left: 14px;
}

.details-grid li::before {
  content: "›";
  position: absolute;
  left: 0;
  top: 0;
  color: #39ff95;
  font-weight: 700;
  line-height: 1;
}

.details-grid .k {
  font-weight: 500;
  color: #cfd6e1;
  white-space: nowrap;
}

.details-grid .v {
  color: #bfc6d1;
}

.details-grid a {
  color: #7ef6a1;
  text-decoration: none;
}

.details-grid a:hover {
  text-decoration: underline;
}

/* code panel */
.code-box {
  grid-area: code;
  background: rgba(0, 0, 0, .25);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

/* .code {
  font-size: 14px;
  white-space: pre-wrap;
  line-height: 1.5;
} */

.cm {
  color: var(--comment);
}

.kw {
  color: var(--keyword);
}

.str {
  color: var(--string);
}

.type {
  color: var(--class);
}

.fn {
  color: var(--method);
}

.num {
  color: var(--number);
}

/* footer */
.site-footer {
  width: 90%;
  max-width: 1100px;
  margin: 20px auto 0;
  text-align: center;
  color: #cfd6e1;
}

.site-footer .links a {
  color: #7ef6a1;
  text-decoration: none;
}

.site-footer .links a:hover {
  text-decoration: underline;
}

/* gradient motion */
@keyframes borderMove {
  0% {
    background-position: 0% 50%
  }

  50% {
    background-position: 100% 50%
  }

  100% {
    background-position: 0% 50%
  }
}


/* =============rating component =============*/
/* Base style */
.proj-card .meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #7EF6A1;
}

.proj-card .meta span i {
  color: #7EF6A1;
  cursor: pointer;
  transition: transform 0.3s ease, text-shadow 0.3s ease;
}

/* Animate individual star only when hovered */
.proj-card .meta span i:hover {
  transform: scale(1.3) rotate(10deg);
  text-shadow: 0 0 8px #7EF6A1, 0 0 16px #7EF6A1, 0 0 24px #7EF6A1;
}

/* Optional: smooth “pop back” when hover ends */
.proj-card .meta span i:not(:hover) {
  transform: scale(1);
}

/* Responsive font size */
@media (max-width: 768px) {
  .proj-card .meta span {
    font-size: 13px;
    gap: 5px;
  }
}

@media (max-width: 480px) {
  .proj-card .meta span {
    font-size: 12px;
  }
}



/* ===== about pro ===== */
/* --- Responsive Fix for About Layout --- */
@media (max-width: 1024px) {
  .content {
    grid-template-columns: 1fr;
    grid-template-areas:
      "profile"
      "about"
      "pro";
    padding: 20px;
  }

  .profile,
  .about-me,
  .about-pro {
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0;
  }

  .about-me .name {
    font-size: 24px;
  }

  .about-me .role {
    font-size: 14px;
  }

  .details-grid {
    grid-template-columns: 1fr;
    gap: 4px 0;
    justify-items: center;
  }

  .avatar-glow img {
    max-width: 160px;
  }
}

@media (max-width: 640px) {
  body {
    padding: 20px;
  }

  .window {
    width: 100%;
  }

  .title-bar {
    flex-wrap: wrap;
  }

  .ap-card__num {
    font-size: 22px;
  }
}