/* ═══════════════════════════════════════════════
   PORTFOLIO — style.css — Rakibul Hasan Efty
═══════════════════════════════════════════════ */

/* ── VARIABLES ── */
:root {
  --font-head: "Space Mono", monospace;
  --font-code: "Fira Code", monospace;
  --font-mono: "JetBrains Mono", monospace;
  --font-dm: "DM Sans", sans-serif;
  --font-inter: "Inter", sans-serif;

  /* Light Mode */
  --bg: #f7f5f0;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-card-2: rgba(247, 250, 250, 0.92);
  --bg-nav: rgba(255, 255, 255, 0.85);
  --text: #1a535c;
  --text-muted: #4a7a84;
  --text-light: #7aacb5;
  --accent: #64b2bc;
  --accent-dark: #4a96a0;
  --accent-glow: rgba(100, 178, 188, 0.15);
  --accent-glow2: rgba(100, 178, 188, 0.08);
  --border: rgba(100, 178, 188, 0.28);
  --border-solid: rgba(100, 178, 188, 0.45);
  --shadow-sm: 0 1px 6px rgba(26, 83, 92, 0.07);
  --shadow: 0 4px 24px rgba(26, 83, 92, 0.1);
  --shadow-lg: 0 12px 48px rgba(26, 83, 92, 0.14);
  --edu-bg: #0f172a;
  --edu-text: #e2e8f0;
  --edu-border: rgba(100, 178, 188, 0.18);
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --radius-pill: 999px;
}

[data-theme="dark"] {
  --bg: #0f172a;
  --bg-card: #1e293b;
  --bg-card-2: #162032;
  --bg-nav: rgba(15, 23, 42, 0.85);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --accent: #64b2bc;
  --accent-dark: #7cc8d2;
  --accent-glow: rgba(100, 178, 188, 0.14);
  --accent-glow2: rgba(100, 178, 188, 0.06);
  --border: rgba(100, 178, 188, 0.14);
  --border-solid: rgba(100, 178, 188, 0.28);
  --shadow-sm: 0 1px 6px rgba(0, 0, 0, 0.25);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.45);
  --edu-bg: #0f172a;
  --edu-text: #e2e8f0;
  --edu-border: rgba(100, 178, 188, 0.18);
}

/* ── RESET ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  font-size: 16px;
}
body {
  font-family: var(--font-mono);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  transition:
    background 0.4s ease,
    color 0.4s ease;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
  display: block;
}
button {
  font-family: inherit;
  cursor: pointer;
}
strong {
  font-weight: 600;
}

::-webkit-scrollbar {
  width: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 10px;
}

/* ══════════════════════════════════════════════
   PAGE LOADER
══════════════════════════════════════════════ */
#page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.55s ease,
    visibility 0.55s ease;
}
#page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-scene {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}
.loader-wave {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 52px;
}
.lw-bar {
  width: 5px;
  border-radius: 3px;
  background: var(--accent);
  animation: lw-wave 1.1s ease-in-out infinite;
}
.lw-bar:nth-child(1) {
  animation-delay: 0s;
  height: 14px;
}
.lw-bar:nth-child(2) {
  animation-delay: 0.1s;
  height: 22px;
}
.lw-bar:nth-child(3) {
  animation-delay: 0.2s;
  height: 36px;
}
.lw-bar:nth-child(4) {
  animation-delay: 0.3s;
  height: 48px;
}
.lw-bar:nth-child(5) {
  animation-delay: 0.4s;
  height: 52px;
}
.lw-bar:nth-child(6) {
  animation-delay: 0.5s;
  height: 48px;
}
.lw-bar:nth-child(7) {
  animation-delay: 0.6s;
  height: 36px;
}
.lw-bar:nth-child(8) {
  animation-delay: 0.7s;
  height: 22px;
}
.lw-bar:nth-child(9) {
  animation-delay: 0.8s;
  height: 14px;
}
@keyframes lw-wave {
  0%,
  100% {
    transform: scaleY(0.35);
    opacity: 0.35;
  }
  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}
.loader-tw-row {
  display: flex;
  align-items: center;
  font-family: var(--font-code);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}
.loader-tw-prefix {
  color: var(--accent);
  opacity: 0.6;
  margin-right: 4px;
}
.loader-tw-text {
  color: var(--text);
  min-width: 1px;
}
.loader-tw-cur {
  color: var(--accent);
  font-size: 0.85rem;
  animation: ltw-blink 0.7s step-end infinite;
  margin-left: 1px;
}
@keyframes ltw-blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

/* ── NPROGRESS ── */
#nprogress-bar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9998;
  height: 2.5px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #a8e6ef);
  transition: width 0.2s ease;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 8px rgba(100, 178, 188, 0.6);
}
#nprogress-bar.active {
  width: 70%;
}
#nprogress-bar.done {
  width: 100%;
  opacity: 0;
  transition:
    width 0.3s ease,
    opacity 0.4s ease 0.1s;
}

/* ── CUSTOM CURSOR ── */
* {
  cursor: default;
}
a,
button,
[data-tilt],
.proj-tab,
.pub-btn,
.mob-nav-item,
.skill-cat,
.cp-card,
.nav-link,
.social-btn,
.btn-solid,
.btn-outline,
label {
  cursor: pointer;
}
input,
textarea {
  cursor: text;
}
#cursor-dot {
  display: none;
}
#cursor-bits {
  position: fixed;
  pointer-events: none;
  z-index: 9991;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.c3-bit {
  position: fixed;
  pointer-events: none;
  font-family: var(--font-code);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  transform: translate(-50%, -50%);
  animation: bit-rise var(--dur, 1.1s) ease-out forwards;
  user-select: none;
}
@keyframes bit-rise {
  0% {
    opacity: 0.9;
    transform: translate(-50%, -50%) translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translateY(-44px) scale(0.6);
  }
}
@media (pointer: coarse) {
  #cursor-bits {
    display: none;
  }
}

/* ══════════════════════════════════════════════
   NAVIGATION
══════════════════════════════════════════════ */
#navbar {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: fit-content;
  max-width: calc(100% - 40px);
  min-width: 600px;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-nav);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid var(--border-solid);
  border-radius: var(--radius-pill);
  padding: 5px 20px;
  box-shadow:
    var(--shadow),
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
  transition:
    background 0.4s,
    border-color 0.4s,
    box-shadow 0.3s;
  gap: 2px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-link {
  font-family: var(--font-dm);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  transition: all 0.2s;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.nav-link:hover {
  color: var(--text);
  background: var(--accent-glow);
}
.nav-link.active {
  background: rgba(100, 178, 188, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.nav-actions {
  display: none;
}

/* Theme toggle */
#theme-toggle {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 1001;
  background: var(--bg-nav);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid var(--border-solid);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  box-shadow: var(--shadow);
  transition: all 0.2s;
  cursor: pointer;
  overflow: hidden;
}
#theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}
.theme-icon-sun,
.theme-icon-moon {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.35s ease,
    opacity 0.35s ease;
}
.theme-icon-moon {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}
[data-theme="dark"] .theme-icon-sun {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}
[data-theme="dark"] .theme-icon-moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* Mobile nav */
#mob-nav {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
}
.mob-nav-pill {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-nav);
  backdrop-filter: blur(22px) saturate(1.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  border: 1px solid var(--border-solid);
  border-radius: var(--radius-pill);
  padding: 10px 14px;
  box-shadow: var(--shadow-lg);
}
.mob-nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--text-muted);
  transition: all 0.22s;
  position: relative;
}
.mob-nav-item svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}
.mob-nav-item:hover {
  color: var(--text);
  background: var(--accent-glow);
}
.mob-nav-item.active {
  background: rgba(100, 178, 188, 0.18);
  color: var(--accent);
  box-shadow: 0 0 0 1px var(--border-solid) inset;
}
.mob-nav-item.active::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--accent);
}
@media (max-width: 720px) {
  .nav-links {
    display: none;
  }
  #mob-nav {
    display: block;
  }
  body {
    padding-bottom: 90px;
  }
}

/* ══════════════════════════════════════════════
   SECTION COMMONS
══════════════════════════════════════════════ */
section {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 100px clamp(16px, 3vw, 40px) 80px;
}
section#home {
  padding-top: 140px;
  min-height: 100vh;
}
.section-header {
  margin-bottom: 48px;
}
.section-label {
  font-family: var(--font-code);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 8px;
  opacity: 0.85;
}
.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.7rem, 3.5vw, 2.5rem);
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 14px;
}
.section-divider {
  width: 44px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: var(--radius-pill);
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 {
  transition-delay: 0.12s;
}
.reveal-delay-2 {
  transition-delay: 0.22s;
}
.reveal-delay-3 {
  transition-delay: 0.32s;
}

/* ══════════════════════════════════════════════
   HERO
══════════════════════════════════════════════ */
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 80px;
  align-items: center;
  width: 100%;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-glow);
  border: 1px solid var(--border-solid);
  color: var(--accent);
  font-family: var(--font-code);
  font-size: 0.71rem;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 24px;
  letter-spacing: 0.06em;
}
.blink-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  animation: blink 1.6s ease-in-out infinite;
  box-shadow: 0 0 6px #22c55e88;
  flex-shrink: 0;
}
@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.15;
  }
}
.hero-name {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  line-height: 1.08;
  color: var(--text);
  margin-bottom: 18px;
  letter-spacing: -0.02em;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hero-mainname {
  font-size: clamp(2.6rem, 4.9vw, 4rem);
}
.hero-subname {
  color: var(--accent);
  font-style: normal;
  word-spacing: -1.5rem;
}
.hero-role-static {
  font-family: var(--font-code);
  font-size: clamp(0.9rem, 1.8vw, 1.08rem);
  color: var(--accent-dark);
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}
.hero-typewriter {
  font-family: var(--font-code);
  font-size: clamp(0.72rem, 1.3vw, 0.84rem);
  color: var(--text-muted);
  margin-bottom: 22px;
  min-height: 1.6em;
  opacity: 0.85;
}
.tw-prefix {
  opacity: 0.5;
  color: var(--accent);
}
.tw-also {
  opacity: 0.4;
  color: var(--text-light);
}
.tw-cursor {
  display: inline-block;
  animation: tw-blink 0.75s step-end infinite;
  color: var(--accent);
}
@keyframes tw-blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}
.hero-desc {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.85;
  max-width: 100%;
  margin-bottom: 32px;
  text-align: justify;
}
.hero-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.btn-solid {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-code);
  font-size: 0.78rem;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  transition: all 0.22s;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 18px rgba(100, 178, 188, 0.35);
}
.btn-solid:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(100, 178, 188, 0.45);
}
.btn-solid.btn-full {
  width: 100%;
  justify-content: center;
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-code);
  font-size: 0.78rem;
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--border-solid);
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  transition: all 0.22s;
  letter-spacing: 0.04em;
}
.btn-outline:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
  transform: translateY(-2px);
}
.hero-stack {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.stack-label {
  font-family: var(--font-code);
  font-size: 0.7rem;
  color: var(--text-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.stack-pill {
  font-family: var(--font-code);
  font-size: 0.7rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  transition: all 0.2s;
}
.stack-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.hero-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-left: 90px;
  gap: 14px;
}
.photo-frame {
  width: clamp(220px, 24vw, 300px);
  height: clamp(260px, 28vw, 360px);
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-solid);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow:
    var(--shadow-lg),
    5px 5px 0 var(--accent);
  flex-shrink: 0;
}
.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-typewriter-right {
  font-family: var(--font-code);
  font-size: 0.78rem;
  color: var(--text-muted);
  min-height: 1.6em;
  text-align: center;
  width: clamp(220px, 24vw, 300px);
}
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-light);
  font-family: var(--font-code);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: scroll-bob 2s ease-in-out infinite;
}
.scroll-line {
  width: 1.5px;
  height: 36px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  border-radius: 2px;
}
@keyframes scroll-bob {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(6px);
  }
}

/* ══════════════════════════════════════════════
   ABOUT
══════════════════════════════════════════════ */
.about-grid-new {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}
.about-bio-full {
  grid-column: 1 / -1;
}
.about-col-left {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.about-col-left .about-block {
  flex: 1;
  margin-bottom: 0;
}
.about-col-right {
  display: flex;
  flex-direction: column;
}
.about-col-right .edu-card {
  flex: 1;
  height: 100%;
  padding: 22px;
}

.about-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.about-block:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}
.about-block-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-family: var(--font-dm);
  font-size: 1.25rem;
  color: var(--text);
  font-weight: 700;
}
.about-block-icon {
  width: 32px;
  height: 32px;
  background: var(--accent-glow);
  border: none;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.about-block-icon svg {
  width: 16px;
  height: 16px;
  stroke: var(--accent);
}
.about-block p {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.8;
  text-align: justify;
}
.about-dot-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.about-dot-list li {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text-muted);
  padding-left: 16px;
  position: relative;
  line-height: 1.6;
}
.about-dot-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.cp-dots li::before {
  background: #f59e0b !important;
}
.interest-dots li::before {
  background: #ef4444 !important;
}

/* Education card */
.edu-card {
  background: var(--edu-bg);
  border-radius: var(--radius-lg);
  padding: 30px;
  border: 1px solid var(--edu-border);
  box-shadow: var(--shadow-lg);
  color: var(--edu-text);
  height: 100%;
}
.edu-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}
.edu-card-icon {
  width: 36px;
  height: 36px;
  background: rgba(100, 178, 188, 0.15);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.edu-card-icon svg {
  stroke: #64b2bc;
}
.edu-card-header h3 {
  font-family: var(--font-dm);
  font-size: 1.25rem;
  color: #e2e8f0;
  letter-spacing: 0.02em;
  font-weight: 700;
}
.edu-period {
  margin-bottom: 20px;
}
.edu-date-badge {
  display: inline-block;
  font-family: var(--font-code);
  font-size: 0.64rem;
  color: var(--accent);
  border: 1px solid rgba(100, 178, 188, 0.35);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 8px;
  letter-spacing: 0.06em;
}
.edu-degree {
  font-family: var(--font-head);
  font-size: 1rem;
  color: #e2e8f0;
  margin-bottom: 4px;
  line-height: 1.3;
}
.edu-inst {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: rgba(232, 244, 245, 0.6);
  margin-bottom: 6px;
}
.edu-cgpa {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.cgpa-label {
  font-family: var(--font-code);
  font-size: 0.62rem;
  background: rgba(100, 178, 188, 0.18);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.06em;
}
.cgpa-value {
  font-family: var(--font-head);
  font-size: 0.96rem;
  color: var(--accent);
}
.edu-highlights {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 1px solid rgba(100, 178, 188, 0.18);
  padding-top: 18px;
}
.hl-tag {
  display: inline-block;
  font-family: var(--font-code);
  font-size: 0.95rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.edu-hl-item p {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: rgba(232, 244, 245, 0.68);
  line-height: 1.72;
  text-align: justify;
}

/* Light mode edu card overrides */
[data-theme="light"] .edu-card {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #1e293b;
}
[data-theme="light"] .edu-card-header h3 {
  color: #1a535c;
}
[data-theme="light"] .edu-date-badge {
  color: #334155;
  background: #e2e8f0;
  border-color: transparent;
}
[data-theme="light"] .edu-degree {
  color: #1e293b;
}
[data-theme="light"] .edu-inst {
  color: #64748b;
}
[data-theme="light"] .cgpa-label {
  background: #e2e8f0;
  color: #334155;
}
[data-theme="light"] .cgpa-value {
  color: #0e6c7c;
}
[data-theme="light"] .hl-tag {
  color: #0e6c7c;
}
[data-theme="light"] .edu-hl-item p {
  color: #64748b;
}
[data-theme="light"] .edu-card-icon svg {
  stroke: #0e6c7c;
}
[data-theme="light"] .edu-highlights {
  border-top-color: #e2e8f0;
}
[data-theme="light"] .edu-card-icon {
  background: rgba(14, 108, 124, 0.1);
}

/* ══════════════════════════════════════════════
   EXPERIENCE
══════════════════════════════════════════════ */
.timeline {
  position: relative;
  padding-left: 32px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 16px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  border-radius: 2px;
}
.tl-item {
  position: relative;
  margin-bottom: 32px;
}
.tl-marker {
  position: absolute;
  left: -32px;
  top: 0;
}
.tl-dot {
  width: 14px;
  height: 14px;
  background: var(--bg-card);
  border: 2.5px solid var(--accent);
  border-radius: 50%;
  margin-top: 14px;
  position: relative;
  z-index: 1;
  transition: background 0.2s;
}
.tl-item:hover .tl-dot {
  background: var(--accent);
}
.tl-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 26px;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.22s,
    box-shadow 0.22s,
    border-color 0.22s;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.tl-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}
.tl-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.tl-title {
  font-family: var(--font-dm);
  font-size: 1.25rem;
  color: var(--text);
  margin-bottom: 0px;
  font-weight: 700;
}
.tl-company {
  font-family: var(--font-code);
  font-size: 0.95rem;
  color: var(--accent);
  font-weight: 500;
}
.tl-date-badge {
  flex-shrink: 0;
  font-family: var(--font-code);
  font-size: 0.65rem;
  color: var(--text-light);
  background: var(--accent-glow);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.tl-bullets {
  list-style: none;
  margin-bottom: 16px;
}
.tl-bullets li {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.75;
  padding-left: 16px;
  position: relative;
  margin-bottom: 5px;
}
.tl-bullets li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.7rem;
  top: 2px;
}
.tl-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tl-tags span {
  font-family: var(--font-code);
  font-size: 0.62rem;
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

/* Subsection heading */
.tl-subhead-wrap {
  padding-left: 32px;
  margin: 0 0 24px 0;
}
.timeline + .tl-subhead-wrap {
  margin-top: 48px;
}
.tl-subheading {
  font-family: var(--font-head);
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-bottom: 10px;
}
.tl-subdivider {
  width: 76px;
  height: 2.5px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: var(--radius-pill);
}

/* Logo + title group */
.tl-title-group {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.tl-logo {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border-solid);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ══════════════════════════════════════════════
   SKILLS
══════════════════════════════════════════════ */
.marquee-wrap {
  position: relative;
  overflow: hidden;
  margin-bottom: 30px;
  padding: 35px 0;
}
.marquee-fade-left,
.marquee-fade-right {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.marquee-fade-left {
  left: 0;
  background: linear-gradient(to right, var(--bg), transparent);
}
.marquee-fade-right {
  right: 0;
  background: linear-gradient(to left, var(--bg), transparent);
}
.marquee-track {
  display: flex;
  animation: marquee 28s linear infinite;
  width: max-content;
  overflow: visible;
}
.marquee-track:hover {
  animation-play-state: paused;
}
@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}
.marquee-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 40px;
  position: relative;
  cursor: default;
}
.m-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition:
    color 0.2s,
    transform 0.2s;
  flex-shrink: 0;
}
.m-icon svg {
  width: 46px;
  height: 46px;
  fill: currentColor;
}
.marquee-item:hover .m-icon {
  color: var(--accent);
  transform: translateY(-3px);
}
.m-tooltip {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--bg-card);
  border: 1px solid var(--border-solid);
  color: var(--text);
  font-family: var(--font-code);
  font-size: 0.62rem;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  box-shadow: var(--shadow);
  z-index: 10;
  letter-spacing: 0.04em;
}
.marquee-item:hover .m-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Skill grid */
.skill-cats {
  display: grid;
  /* Change from 1fr 1fr 1fr to 12 micro-columns */
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
}
.skill-cat-row1 {
  grid-column: 1 / -1;
}
.skill-cat-row2-left {
  /* Change from span 2 to span 7 (~58.3%) */
  grid-column: span 7;
}
.skill-cat-row2-right {
  /* Change from span 1 to span 5 (~41.7%) */
  grid-column: span 5;
}
.skill-cat-row3 {
  /* Change from span 1 to span 4 (Exactly 33.3%) */
  grid-column: span 4;
}
.skill-cat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.22s,
    border-color 0.22s,
    box-shadow 0.22s;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.skill-cat:hover {
  transform: translateY(-4px);
  border-color:  var(--accent);
  box-shadow: var(--shadow);
}

/* Preferred stack */
.pref-items {
  display: flex;
  align-items: center;
}
.pref-item {
  flex: 1;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.pref-item:first-child {
  padding-left: 0;
}
.pref-item-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pref-logo {
  fill: var(--accent);
  opacity: 0.85;
  flex-shrink: 0;
  transition: opacity 0.2s;
}
.pref-item:hover .pref-logo {
  opacity: 1;
}
.pref-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.pref-name {
  font-family: var(--font-head);
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.02em;
}
.pref-role {
  font-family: var(--font-code);
  font-size: 0.68rem;
  color: var(--accent);
  letter-spacing: 0.06em;
}
.pref-div {
  width: 1px;
  height: 40px;
  background: var(--border-solid);
  flex-shrink: 0;
}

/* Card header */
.cat-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.cat-icon-wrap {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cat-icon-wrap svg {
  width: 16px;
  height: 16px;
  stroke: var(--accent);
  fill: none;
}
.cat-head-title {
  font-family: var(--font-dm);
  font-size: 1.05rem;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* Skill tags */
.cat-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.sk-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-code);
  font-size: 0.68rem;
  background: var(--accent-glow2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 6px;
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s;
}
.sk-tag:hover {
  background: var(--accent-glow);
  border-color: var(--border-solid);
  color: var(--accent);
}
.sk-tag-name {
  font-family: var(--font-code);
  font-size: 0.68rem;
  color: inherit;
}
.sk-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}
.sk-logo svg {
  width: 13px;
  height: 13px;
}

/* ══════════════════════════════════════════════
   PROJECTS — Bento layout
══════════════════════════════════════════════ */
.proj-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  justify-content: center;
}
.proj-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-code);
  font-size: 0.76rem;
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.03em;
}
.proj-tab svg {
  width: 20px;
  height: 20px;
}
.proj-tab:hover {
  border-color: var(--border-solid);
  color: var(--text);
}
.proj-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(100, 178, 188, 0.35);
}
.proj-panel {
  display: none;
}
.proj-panel.active {
  display: block;
}

.proj-bento-row {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}
.proj-row-1 {
  grid-template-columns: 2fr 1fr;
}
.proj-row-2 {
  grid-template-columns: 1fr 2fr;
}
.proj-row-3 {
  grid-template-columns: 2fr 1fr;
}

.proj-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.25s,
    box-shadow 0.25s,
    border-color 0.25s;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.proj-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}
.proj-img-wrap {
  position: relative;
  flex-shrink: 0;
}
.proj-card-large .proj-img,
.proj-card-small .proj-img {
  height: 200px;
}
.proj-img {
  width: 100%;
  display: flex;
  align-items: flex-end;
  padding: 14px;
  position: relative;
  overflow: hidden;
}
.proj-img-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.proj-card:hover .proj-img-bg,
.proj-new-card:hover .proj-img-bg {
  transform: scale(1.08);
}
.proj-img-1 .proj-img-bg {
  background: linear-gradient(135deg, #0d2d3d, #1a4a5c);
}
.proj-img-2 .proj-img-bg {
  background: linear-gradient(135deg, #1a0d2d, #2d1a40);
}
.proj-img-3 .proj-img-bg {
  background: linear-gradient(135deg, #0d2a1a, #1a4030);
}
.proj-img-4 .proj-img-bg {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
}
.proj-img-5 .proj-img-bg {
  background: linear-gradient(135deg, #2d1a0d, #40280d);
}
.proj-img-6 .proj-img-bg {
  background: linear-gradient(135deg, #0d1a2d, #1a2840);
}
.proj-img-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(100, 178, 188, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 178, 188, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
}
.proj-img-caption {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--font-code);
  font-size: 0.66rem;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.04em;
}
.proj-img-caption-whitebg {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
.proj-featured-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #f59e0b;
  color: #fff;
  font-family: var(--font-code);
  font-size: 0.62rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.04em;
  z-index: 2;
}
.proj-body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.proj-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.proj-category {
  font-family: var(--font-code);
  font-size: 0.65rem;
  color: var(--text-light);
  letter-spacing: 0.08em;
}
.proj-status {
  font-family: var(--font-code);
  font-size: 0.62rem;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.04em;
}
.proj-status-active {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
}
.proj-status-proto {
  background: rgba(167, 139, 250, 0.12);
  color: #a78bfa;
}
.proj-status-stable {
  background: rgba(100, 178, 188, 0.12);
  color: var(--accent);
}
.proj-title {
  font-family: var(--font-dm) !important;
  font-size: 1.25rem !important;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  position: relative;
  display: inline-block;
  margin-bottom: 6px;
}
.proj-title::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, #0e6c7c, #64b2bc, #e2e8f0);
  border-radius: 2px;
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.proj-card:hover .proj-title::after,
.proj-new-card:hover .proj-title::after {
  width: 100%;
}
.proj-desc {
  font-family: var(--font-mono);
  font-size: 0.75rem !important;
  color: var(--text-muted);
  line-height: 1.72;
  flex: 1;
  text-align: justify;
}
.proj-repo-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-family: var(--font-code);
  font-size: 0.68rem;
  color: var(--text-muted);
}
.proj-repo-left {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 1;
}
.proj-lang-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.proj-lang-name {
  font-family: var(--font-code);
  font-size: 0.68rem;
  color: var(--text-muted);
}
.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tech-tags span {
  font-family: var(--font-code);
  font-size: 0.62rem;
  background: var(--accent-glow2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}
.proj-btn-row {
  display: flex;
  gap: 8px;
  margin-top: auto;
}
.proj-btn-code,
.proj-btn-live {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-code);
  font-size: 0.72rem;
  padding: 9px 0;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  letter-spacing: 0.03em;
  flex: 1;
  cursor: pointer;
  text-decoration: none;
}
.proj-btn-code {
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.proj-btn-code:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.proj-btn-live {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #fff;
  box-shadow: 0 3px 12px rgba(100, 178, 188, 0.3);
}
.proj-btn-live:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}
.proj-btn-full {
  flex: 1;
}
.proj-view-all {
  display: flex;
  justify-content: center;
  margin: 24px 0 8px;
}
.proj-view-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-code);
  font-size: 0.76rem;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1.5px solid var(--border-solid);
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.22s;
  letter-spacing: 0.04em;
}
.proj-view-all-btn:hover {
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 3px var(--accent-glow);
  transform: translateY(-2px);
  background: var(--accent);
}
.proj-new-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 32px;
}
.proj-new-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.25s,
    box-shadow 0.25s,
    border-color 0.25s;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.proj-new-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}
.proj-new-card .proj-img {
  height: 200px;
}
.proj-new-card .proj-body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.proj-section-label {
  font-family: var(--font-code);
  font-size: 0.68rem;
  color: var(--text-light);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 36px 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.proj-section-label::before,
.proj-section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.proj-stats-row {
  display: flex;
  gap: 14px;
  margin-top: -2px;
}
.proj-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-code);
  font-size: 0.7rem;
  color: var(--text-light);
}
.proj-stat svg {
  color: var(--accent);
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════
   CP SECTION
══════════════════════════════════════════════ */
.cp-section {
  margin-top: 56px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Row 1 — Title */
.cp-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.cp-title-icon {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cp-title-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--accent);
}
.cp-title {
  font-family: var(--font-dm);
  font-size: 1.25rem;
  color: var(--text);
  font-weight: 700;
  margin-bottom: 2px;
}
.cp-sub {
  font-family: var(--font-code);
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Row 2 & 3 Combined — Layout Wrapper */
.cp-body-row {
  display: grid;
  /* 4.5 fraction for ICPC column, 7.5 fraction for Platform cards (2.5 col * 3 cards = 7.5) */
  grid-template-columns: 4.5fr 7.5fr;
  gap: 18px;
  align-items: stretch;
}

/* ICPC stacked column */
.cp-icpc-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
}

/* ICPC Cards — Horizontal Alignment with Box Button on Right */
.cp-icpc-card {
  display: grid;
  grid-template-columns: auto 1fr auto; /* Logo | Info (flexible) | Button */
  align-items: center;
  gap: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  transition:
    transform 0.2s,
    border-color 0.2s;
  height: 100%;
}
.cp-icpc-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}
.cp-icpc-logo {
  width: 100px;
  height: 64px;
  border-radius: 8px;
  object-fit: contain;
}
.cp-icpc-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cp-icpc-year {
  font-family: var(--font-head);
  font-size: 1.15rem;
  color: var(--text);
  font-weight: 700;
}
.cp-icpc-region {
  font-family: var(--font-code);
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
}

/* Platform cards section */
.cp-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  width: 100%;
}
.cp-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.2s,
    border-color 0.2s;
  height: 100%;
}
.cp-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}
.cp-platform-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
  color: var(--accent);
}
.cp-platform-logo svg {
  fill: var(--accent);
}
.cp-platform-name {
  font-family: var(--font-head);
  font-size: 0.82rem;
  color: var(--text);
  margin-bottom: 10px;
}
.cp-stat-wrap {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 1px;
}
.cp-stat {
  font-family: var(--font-head);
  font-size: 2rem;
  color: var(--accent);
  line-height: 1;
}
.cp-plus {
  font-family: var(--font-head);
  color: var(--accent);
  font-size: 1.2rem;
}
.cp-label {
  font-family: var(--font-code);
  font-size: 0.65rem;
  color: var(--text-muted);
  margin: 6px 0 16px 0;
}
.cp-card .cp-profile-btn {
  margin-top: auto;
}

/* Shared — View Profile button */
.cp-profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-code);
  font-size: 0.65rem;
  color: var(--accent);
  border: 1px solid var(--border-solid);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.2s;
  flex-shrink: 0;
}
.cp-profile-btn svg:first-of-type {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}
.cp-profile-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Make the button a square box */
.cp-icpc-card .cp-profile-btn {
  width: 54px;
  height: 28px;
  padding: 0;
  justify-content: center;
  border-radius: 8px;
}

/* Make ONLY the 1st SVG larger */
.cp-icpc-card .cp-profile-btn svg:first-of-type {
  width: 20px;
  height: 20px;
  stroke-width: 2.5;
}

/* ══════════════════════════════════════════════
   PUBLICATION
══════════════════════════════════════════════ */
/* ── Publication tabs ── */
.pub-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  justify-content: center;
}
.pub-tab-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex-shrink: 0;
}
.pub-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-code);
  font-size: 0.86rem;
  font-weight: 500;
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.03em;
}
.pub-tab:hover {
  border-color: var(--border-solid);
  color: var(--text);
}
.pub-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(100, 178, 188, 0.35);
}
.pub-tab-count {
  opacity: 0.75;
  font-size: 0.72rem;
}

/* ── Publication list ── */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pub-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.22s,
    box-shadow 0.22s,
    border-color 0.22s;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.pub-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}
.pub-item.pub-hidden {
  display: none;
}

.pub-item-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.pub-item-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.pub-item-icon svg {
  width: 16px;
  height: 16px;
  stroke: var(--accent);
}

.pub-item-main {
  flex: 1;
  min-width: 0;
}
.pub-item-title {
  font-family: var(--font-dm);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 6px;
}
.pub-item-authors {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.pub-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pub-badge {
  font-family: var(--font-code);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}
.pub-badge-status.status-published {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.3);
}
.pub-badge-status.status-accepted {
  background: var(--accent-glow);
  color: var(--accent);
  border-color: var(--border-solid);
}
.pub-badge-status.status-review {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.3);
}
.pub-badge-venue {
  background: rgba(96, 165, 250, 0.1);
  color: #60a5fa;
  border-color: rgba(96, 165, 250, 0.28);
  font-weight: 500;
}
.pub-badge-rank {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.35);
  font-weight: 700;
}

.pub-doi-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-code);
  font-size: 0.68rem;
  font-weight: 600;
  color: #c084fc;
  background: rgba(192, 132, 252, 0.12);
  border: 1px solid rgba(192, 132, 252, 0.3);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  flex-shrink: 0;
  transition: all 0.2s;
  white-space: nowrap;
}
.pub-doi-badge:hover {
  background: #c084fc;
  color: #fff;
}

/* ══════════════════════════════════════════════
   CONTACT
══════════════════════════════════════════════ */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: start;
}
.contact-form-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.contact-form-header {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card-2);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
}
.cf-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.cf-dot-red {
  background: #ff5f57;
}
.cf-dot-yellow {
  background: #febc2e;
}
.cf-dot-green {
  background: #28c840;
}
.cf-title {
  font-family: var(--font-code);
  font-size: 0.68rem;
  color: var(--text-light);
  margin-left: 8px;
  letter-spacing: 0.06em;
}
.contact-form {
  padding: 24px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-family: var(--font-code);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.84rem;
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  resize: none;
}
.form-group textarea {
  height: 100px;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-light);
  opacity: 0.65;
}
.contact-info h3 {
  font-family: var(--font-dm);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}
.contact-info > p {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 22px;
  text-align: justify;
}
.contact-detail {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-code);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.contact-detail a {
  color: var(--accent);
}
.contact-detail a:hover {
  text-decoration: underline;
}
.cd-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.social-section {
  margin-top: 32px;
}
.social-label {
  font-family: var(--font-code);
  font-size: 0.65rem;
  color: var(--text-light);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.social-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.social-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-code);
  font-size: 0.7rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.22s;
}
.social-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  flex-shrink: 0;
}
.social-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* ══════════════════════════════════════════════
   CONSTELLATION
══════════════════════════════════════════════ */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='600'%3E%3Cline x1='60' y1='50' x2='180' y2='110' stroke='%2364B2BC' stroke-width='0.6' opacity='0.28'/%3E%3Cline x1='180' y1='110' x2='300' y2='60' stroke='%2364B2BC' stroke-width='0.6' opacity='0.22'/%3E%3Cline x1='300' y1='60' x2='420' y2='140' stroke='%2364B2BC' stroke-width='0.6' opacity='0.26'/%3E%3Cline x1='420' y1='140' x2='560' y2='90' stroke='%2364B2BC' stroke-width='0.6' opacity='0.2'/%3E%3Cline x1='560' y1='90' x2='700' y2='150' stroke='%2364B2BC' stroke-width='0.6' opacity='0.24'/%3E%3Cline x1='700' y1='150' x2='840' y2='80' stroke='%2364B2BC' stroke-width='0.6' opacity='0.2'/%3E%3Cline x1='180' y1='110' x2='240' y2='230' stroke='%2364B2BC' stroke-width='0.6' opacity='0.18'/%3E%3Cline x1='240' y1='230' x2='380' y2='260' stroke='%2364B2BC' stroke-width='0.6' opacity='0.22'/%3E%3Cline x1='380' y1='260' x2='500' y2='200' stroke='%2364B2BC' stroke-width='0.6' opacity='0.2'/%3E%3Cline x1='500' y1='200' x2='640' y2='280' stroke='%2364B2BC' stroke-width='0.6' opacity='0.18'/%3E%3Cline x1='640' y1='280' x2='780' y2='220' stroke='%2364B2BC' stroke-width='0.6' opacity='0.2'/%3E%3Cline x1='100' y1='350' x2='220' y2='300' stroke='%2364B2BC' stroke-width='0.6' opacity='0.18'/%3E%3Cline x1='220' y1='300' x2='380' y2='260' stroke='%2364B2BC' stroke-width='0.6' opacity='0.18'/%3E%3Cline x1='640' y1='280' x2='660' y2='400' stroke='%2364B2BC' stroke-width='0.6' opacity='0.16'/%3E%3Cline x1='100' y1='470' x2='220' y2='420' stroke='%2364B2BC' stroke-width='0.6' opacity='0.16'/%3E%3Cline x1='220' y1='420' x2='360' y2='460' stroke='%2364B2BC' stroke-width='0.6' opacity='0.18'/%3E%3Cline x1='360' y1='460' x2='500' y2='400' stroke='%2364B2BC' stroke-width='0.6' opacity='0.16'/%3E%3Cline x1='500' y1='400' x2='660' y2='400' stroke='%2364B2BC' stroke-width='0.6' opacity='0.18'/%3E%3Cline x1='660' y1='400' x2='800' y2='460' stroke='%2364B2BC' stroke-width='0.6' opacity='0.16'/%3E%3Ccircle cx='60' cy='50' r='2.5' fill='%2364B2BC' opacity='0.45'/%3E%3Ccircle cx='180' cy='110' r='3.2' fill='%2364B2BC' opacity='0.55'/%3E%3Ccircle cx='300' cy='60' r='2.5' fill='%2364B2BC' opacity='0.42'/%3E%3Ccircle cx='420' cy='140' r='3' fill='%2364B2BC' opacity='0.5'/%3E%3Ccircle cx='560' cy='90' r='2' fill='%2364B2BC' opacity='0.38'/%3E%3Ccircle cx='700' cy='150' r='2.8' fill='%2364B2BC' opacity='0.45'/%3E%3Ccircle cx='840' cy='80' r='2' fill='%2364B2BC' opacity='0.35'/%3E%3Ccircle cx='240' cy='230' r='3' fill='%2364B2BC' opacity='0.48'/%3E%3Ccircle cx='380' cy='260' r='2.5' fill='%2364B2BC' opacity='0.42'/%3E%3Ccircle cx='500' cy='200' r='2' fill='%2364B2BC' opacity='0.38'/%3E%3Ccircle cx='640' cy='280' r='3' fill='%2364B2BC' opacity='0.5'/%3E%3Ccircle cx='780' cy='220' r='2' fill='%2364B2BC' opacity='0.35'/%3E%3Ccircle cx='100' cy='350' r='2' fill='%2364B2BC' opacity='0.32'/%3E%3Ccircle cx='220' cy='300' r='2.5' fill='%2364B2BC' opacity='0.4'/%3E%3Ccircle cx='100' cy='470' r='2' fill='%2364B2BC' opacity='0.32'/%3E%3Ccircle cx='220' cy='420' r='2.5' fill='%2364B2BC' opacity='0.38'/%3E%3Ccircle cx='360' cy='460' r='3' fill='%2364B2BC' opacity='0.45'/%3E%3Ccircle cx='500' cy='400' r='2.5' fill='%2364B2BC' opacity='0.4'/%3E%3Ccircle cx='660' cy='400' r='3' fill='%2364B2BC' opacity='0.48'/%3E%3Ccircle cx='800' cy='460' r='2' fill='%2364B2BC' opacity='0.35'/%3E%3C/svg%3E");
  background-size: 900px 600px;
  opacity: 0.95;
}
[data-theme="dark"] body::after {
  opacity: 0.55;
}

/* ══════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════ */
footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
}
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px clamp(20px, 5vw, 60px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-logo {
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.footer-copy {
  font-family: var(--font-code);
  font-size: 0.68rem;
  color: var(--text-light);
  letter-spacing: 0.04em;
}
.footer-copy strong {
  color: var(--text-muted);
}
.back-to-top {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.2s;
  position: relative;
}
.back-to-top:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 4px 14px rgba(100, 178, 188, 0.4);
}
.back-to-top svg {
  transition: transform 0.2s;
}
.back-to-top:hover svg {
  transform: translateY(-2px);
}
.back-to-top.pulse::before {
  content: '';
  position: absolute;
  inset: -4px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  opacity: 0;
  animation: btt-pulse 2.4s ease-out infinite;
}
@keyframes btt-pulse {
  0%   { transform: scale(0.9); opacity: 0.6; }
  70%  { transform: scale(1.35); opacity: 0; }
  100% { opacity: 0; }
}
/* ══════════════════════════════════════════════
   TOAST
══════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 9995;
  background: var(--bg-card);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-code);
  font-size: 0.78rem;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.3s,
    transform 0.3s;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ══════════════════════════════════════════════
   CONTACT FAB
══════════════════════════════════════════════ */
#contact-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 1000;
  width: 50px;
  height: 50px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 20px rgba(100, 178, 188, 0.45);
  transition: all 0.25s;
  border: none;
}
#contact-fab:hover {
  background: var(--accent-dark);
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 8px 32px rgba(100, 178, 188, 0.55);
}
#contact-fab svg {
  stroke: #fff;
}

/* ══════════════════════════════════════════════
   GITHUB HEATMAP
══════════════════════════════════════════════ */
:root {
  --gh-0: #161b22;
  --gh-1: #0e4429;
  --gh-2: #006d32;
  --gh-3: #26a641;
  --gh-4: #39d353;
}
[data-theme="light"] {
  --gh-0: #ebedf0;
  --gh-1: #9be9a8;
  --gh-2: #40c463;
  --gh-3: #30a14e;
  --gh-4: #216e39;
}

/* GitHub section wrapper — profile + heatmap side by side */
.gh-section {
  display: flex;
  gap: 20px;
  align-items: stretch;
  margin-top: 12px;
}

/* Profile card — left side */
.gh-profile-card {
  flex-shrink: 0;
  width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.gh-profile-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}
/* [data-theme="light"] .gh-profile-card {
  background: rgba(228, 238, 238, 0.9);
  border: 1px solid rgba(100, 178, 188, 0.25);
} */
.gh-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-solid);
  margin-top: 6px;
  margin-bottom: 5px;
}
.gh-profile-name {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica,
    Arial, sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
  /* margin-bottom: 2px; */
  align-self: flex-start;
  text-align: left;
  width: 100%;
}
.gh-profile-username {
  font-family: var(--font-code);
  font-size: 0.88rem;
  color: var(--accent);
  margin-bottom: 2px;
  align-self: flex-start;
  text-align: left;
  width: 100%;
}
.gh-profile-bio {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 8px;
  align-self: flex-start;
  text-align: left;
  width: 100%;
}
.gh-profile-card .gh-profile-btn {
  width: 100%;
  justify-content: center;
}

/* Heatmap card — right side */
.gh-heatmap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 24px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}
.gh-heatmap:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}
/* [data-theme="light"] .gh-heatmap {
  background: rgba(228, 238, 238, 0.9);
  border: 1px solid rgba(100, 178, 188, 0.25);
  box-shadow: var(--shadow-sm);
} */

.gh-heatmap-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.gh-learn-link {
  font-family: var(--font-code);
  font-size: 0.65rem;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color 0.2s;
}
.gh-learn-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.gh-inner-border {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px 12px;
  overflow: hidden;
}
[data-theme="light"] .gh-inner-border {
  background: rgba(228, 238, 238, 0.6);
  border-color: rgba(100, 178, 188, 0.3);
}

.gh-heatmap-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  padding-bottom: 0;
}
.gh-footer-right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}
.gh-total-label {
  font-family: var(--font-code);
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}
.gh-profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-code);
  font-size: 0.7rem;
  color: var(--accent);
  border: 1px solid var(--border-solid);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  text-decoration: none;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.gh-profile-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-1px);
}
.gh-profile-btn svg {
  fill: currentColor;
}

.gh-legend {
  display: flex;
  align-items: center;
  gap: 4px;
}
.gh-legend-label {
  font-family: var(--font-code);
  font-size: 0.62rem;
  color: var(--text-light);
}
.gh-legend-box {
  width: 13px;
  height: 13px;
  border-radius: 2px;
  display: inline-block;
}

/* Scroll container */
.gh-heatmap-grid {
  overflow-x: auto;
  overflow-y: visible;
  padding-bottom: 4px;
  width: 100%;
}
.gh-heatmap-grid::-webkit-scrollbar {
  height: 3px;
}
.gh-heatmap-grid::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 2px;
}

/* Wrapper */
.gh-wrapper {
  display: flex;
  gap: 8px;
  width: max-content;
  min-width: 100%;
  margin: 0 auto;
}

/* Day labels */
.gh-day-labels {
  display: flex;
  flex-direction: column;
  padding-top: 22px;
  flex-shrink: 0;
}
.gh-day-labels span {
  font-family: var(--font-code);
  font-size: 0.62rem;
  color: var(--text-light);
  height: 13px;
  line-height: 13px;
  text-align: right;
  min-width: 28px;
  padding-right: 6px;
}
[data-theme="light"] .gh-day-labels span {
  color: #57606a;
}

/* Right side */
.gh-right {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

/* Month labels */
.gh-month-row {
  display: flex;
  height: 18px;
  align-items: center;
  position: relative;
}
.gh-month-label {
  font-family: var(--font-code);
  font-size: 0.62rem;
  color: var(--text-light);
  white-space: nowrap;
  display: inline-block;
  position: absolute;
}
[data-theme="light"] .gh-month-label {
  color: #57606a;
}

/* Grid */
.gh-grid-inner {
  display: flex;
  gap: 3px;
}
.gh-week {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.gh-day {
  width: 13px;
  height: 13px;
  border-radius: 2px;
  cursor: pointer;
  transition: outline 0.1s;
  flex-shrink: 0;
}
.gh-day:hover {
  outline: 1.5px solid var(--accent);
  outline-offset: 1px;
  position: relative;
  z-index: 5;
}

.gh-loading {
  font-family: var(--font-code);
  font-size: 0.92rem;
  color: var(--text-light);
  padding: 20px 0;
}

/* Tooltip */
.gh-tooltip {
  position: absolute;
  background: #1b1f23;
  color: #e2e8f0;
  font-family: var(--font-code);
  font-size: 0.68rem;
  padding: 6px 12px;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.1s;
  z-index: 99999;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  letter-spacing: 0.03em;
}
.gh-tooltip.show {
  opacity: 1;
}
[data-theme="light"] .gh-tooltip {
  background: #24292f;
  color: #fff;
}

/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width: 960px) {
  section#home {
    padding-top: 70px;
  }
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-right {
    display: flex;
    margin: 0 auto 24px;
    padding-left: 0;
  }
  .hero-subname {
    word-spacing: -0.6rem;
  }
  .about-grid-new {
    grid-template-columns: 1fr;
  }
  .about-bio-full {
    grid-column: 1;
  }
  .skill-cats {
    grid-template-columns: 1fr;
  }
  .skill-cat-row1,
  .skill-cat-row2-left,
  .skill-cat-row2-right,
  .skill-cat-row3 {
    grid-column: 1;
  }
  .pub-grid {
    grid-template-columns: 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }

  /* Preferred Stack — stack vertically on mobile */
  .pref-items {
    flex-direction: column;
    gap: 12px;
  }
  .pref-item {
    padding: 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
  }
  .pref-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }
  .pref-div {
    display: none;
  }
  .pref-name {
    font-size: 1.2rem;
  }
  /* ── gh ── */
  .gh-section {
    flex-direction: column;
  }
  .gh-profile-card {
    width: 100%;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0;
    padding: 22px 18px;
  }
  .gh-avatar {
    margin-bottom: 12px;
    width: 84px;
    height: 84px;
  }
  .gh-profile-name,
  .gh-profile-username,
  .gh-profile-bio {
    align-self: center;
    text-align: center;
  }
  .gh-profile-card .gh-profile-btn {
    width: 100%;
    justify-content: center;
    margin-top: 4px;
  }
  .gh-heatmap {
    padding: 18px 16px;
  }
  .gh-day {
    width: 10px;
    height: 10px;
  }
  .gh-grid-inner {
    gap: 2px;
  }
  .gh-week {
    gap: 2px;
  }
  .gh-day-labels span {
    height: 13px;
    line-height: 13px;
    font-size: 0.58rem;
    min-width: 24px;
  }
  .gh-month-label {
    font-size: 0.58rem;
  }
  .gh-legend-box {
    width: 10px;
    height: 10px;
  }
  /* CP */
  .cp-section {
    padding: 24px;
  }
  .cp-body-row {
    grid-template-columns: 1fr;
  }
  .cp-icpc-col {
    flex-direction: row;
    width: 100%;
  }
  .cp-icpc-card {
    flex: 1;
  }
  .cp-cards {
    grid-template-columns: repeat(3, 1fr);
  }
  .cp-card {
    padding: 18px;
  }
  .cp-icpc-card {
    padding: 14px;
  }
  .cp-icpc-logo {
    width: 70px;
  }
}

@media (max-width: 767px) {
  .gh-learn-link {
    font-size: 0.55rem;
  }
}

@media (max-width: 760px) {
  .proj-row-1,
  .proj-row-2,
  .proj-row-3 {
    grid-template-columns: 1fr;
  }
  .proj-new-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  #contact-fab {
    bottom: 90px;
    right: 18px;
    width: 44px;
    height: 44px;
  }
  .nav-inner {
    border: none;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    padding: 0;
  }
  #theme-toggle {
    top: auto;
    bottom: 148px;
    right: 18px;
  }
}
@media (max-width: 600px) {
  .all-grid {
    grid-template-columns: 1fr;
  }
  /* CP */
  .cp-section {
    padding: 18px;
  }
  .cp-header-row {
    margin-bottom: 18px;
  }
  .cp-title {
    font-size: 1.05rem;
  }
  .cp-sub {
    font-size: 0.65rem;
  }
  .cp-icpc-col {
    flex-direction: column;
  }
  .cp-icpc-card {
    padding: 14px;
    gap: 10px;
  }
  .cp-icpc-logo {
    width: 60px;
  }
  .cp-icpc-year {
    font-size: 1rem;
  }
  .cp-icpc-region {
    font-size: 0.75rem;
  }
  /* Slightly scale down the box button on mobile */
  .cp-icpc-card .cp-profile-btn {
    width: 38px;
    height: 38px;
  }
  .cp-icpc-card .cp-profile-btn svg {
    width: 16px;
    height: 16px;
  }

  .cp-profile-btn {
    font-size: 0.6rem;
    padding: 4px 10px;
  }
  .cp-cards {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .cp-card {
    padding: 16px;
  }

  /* exp */
  .tl-card {
    padding: 18px 18px;
  }

  .tl-card-top {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "logo date"
      "info info";
    align-items: center;
    gap: 6px 10px;
  }

  .tl-title-group {
    display: contents;
  }

  .tl-logo {
    grid-area: logo;
    width: 44px;
    height: 44px;
  }

  .tl-date-badge {
    grid-area: date;
    justify-self: end;
    align-self: center;
  }

  .tl-title-group > div {
    grid-area: info;
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 6px;
  }

  .tl-title {
    font-size: 1.05rem;
  }
  .tl-company {
    font-size: 0.82rem;
  }
  .tl-bullets li {
    font-size: 0.85rem;
  }
  .timeline {
    padding-left: 24px;
  }
  .tl-marker {
    left: -24px;
  }

  /* marquee */
  .m-icon {
    width: 34px;
    height: 34px;
  }
  .m-icon svg {
    width: 28px;
    height: 28px;
  }
  .marquee-item {
    padding: 0 18px;
  }
  .marquee-track {
    animation-duration: 20s;
  }
  /* github */

  .gh-heatmap {
    padding: 14px 10px;
  }
  .gh-heatmap-header {
    flex-wrap: wrap;
    gap: 8px;
  }
  .gh-day {
    width: 7px;
    height: 7px;
    border-radius: 1px;
  }
  .gh-grid-inner {
    gap: 2px;
  }
  .gh-week {
    gap: 2px;
  }
  .gh-day-labels span {
    height: 9px;
    line-height: 9px;
    font-size: 0.5rem;
    min-width: 18px;
    padding-right: 3px;
  }
  .gh-month-label {
    font-size: 0.5rem;
  }
  .gh-legend-box {
    width: 7px;
    height: 7px;
  }
  .gh-legend-label {
    font-size: 0.5rem;
  }
  .gh-total-label {
    font-size: 0.58rem;
  }
  .gh-wrapper {
    gap: 3px;
  }

  /* publication */
  /* Tabs: Featured full width on top, Journal+Conference share row below */
  .pub-tabs {
    flex-wrap: wrap;
    gap: 8px;
  }
  .pub-tab {
    height: 42px;
    box-sizing: border-box;
  }
  .pub-tab[data-tab="all"] {
    flex: 1 1 100%;
    justify-content: center;
  }
  .pub-tab[data-tab="journal"],
  .pub-tab[data-tab="conference"] {
    flex: 1 1 calc(50% - 4px);
    justify-content: center;
    font-size: 0.7rem;
    padding: 8px 12px;
  }

  /* Card: icon+DOI row on top, then title/authors/badges stacked full width below */
  .pub-item {
    padding: 16px 18px;
  }
  .pub-item-top {
    flex-wrap: wrap;
  }
  .pub-item-icon {
    order: 1;
    width: 28px;
    height: 28px;
  }
  .pub-item-icon svg {
    width: 14px;
    height: 14px;
  }
  .pub-doi-badge {
    order: 2;
    margin-left: auto;
    font-size: 0.62rem;
    padding: 4px 10px;
  }
  .pub-item-main {
    order: 3;
    flex: 1 1 100%;
    margin-top: 12px;
  }
  .pub-item-title {
    font-size: 0.92rem;
  }
  .pub-item-authors {
    font-size: 0.75rem;
  }
  .pub-badge {
    font-size: 0.62rem;
    padding: 3px 10px;
  }
}
@media (max-width: 500px) {
  .proj-new-grid {
    grid-template-columns: 1fr;
  }
}
