:root {
  --bg-canvas: #0d1117;
  --bg-default: #161b22;
  --bg-overlay: #1c2128;
  --bg-inset: #13161c;
  --border-default: #30363d;
  --border-muted: #21262d;
  --fg-default: #e6edf3;
  --fg-muted: #7d8590;
  --fg-subtle: #6e7681;
  --accent-emphasis: #1f6feb;
  --accent-muted: #388bfd;
  --green-emphasis: #238636;
  --green-muted: #2ea043;
  --green-subtle: #0d4429;
  --green-0: #0e4429;
  --green-1: #006d32;
  --green-2: #26a641;
  --green-3: #39d353;
  --green-empty: #161b22;
  --green-border: #1b4332;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(48, 54, 61, 0.5);
  --font-mono: 'JetBrains Mono', monospace;
  --font-sans: 'Geist', system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-canvas);
  color: var(--fg-default);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

body.splash-active {
  overflow: hidden !important;
  position: fixed;
  width: 100%;
  height: 100%;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgb(48 54 61 / .08) 1px, transparent 1px),
    linear-gradient(90deg, rgb(48 54 61 / .08) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

.splashscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  pointer-events: all;
  backdrop-filter: blur(0);
  transition: opacity 0.5s ease;
}

.splashscreen.hidden {
  opacity: 0;
  pointer-events: none;
}

.splash-loader {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border-default);
  border-bottom-color: var(--green-muted);
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  animation: splash-rotation 1s linear infinite;
}

@keyframes splash-rotation {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.navbar-wrap {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: calc(100% - 48px);
  max-width: 900px;
}

.navbar {
  background: rgb(22 27 34 / .85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-default);
  border-radius: 14px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 8px 32px rgb(0 0 0 / .5), 0 0 0 1px rgb(255 255 255 / .04) inset;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--fg-default);
}

.navbar-brand .nb-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-default);
  object-fit: cover;
}

.navbar-brand span {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-default);
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.navbar-links a {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
  cursor: pointer;
}

.navbar-links a:hover,
.navbar-links a.active {
  color: var(--fg-default);
  background: rgb(48 54 61 / .5);
}

.navbar-cta {
  background: var(--green-muted);
  color: #fff !important;
  border-radius: 8px;
  padding: 6px 14px !important;
  font-weight: 600 !important;
  transition: all 0.2s ease !important;
}

.navbar-cta:hover {
  background: var(--green-emphasis) !important;
  transform: translateY(-1px);
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  width: 22px;
  height: 2px;
  background: var(--fg-muted);
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

.mobile-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: rgb(22 27 34 / .95);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-default);
  border-radius: 14px;
  padding: 8px;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 8px 32px rgb(0 0 0 / .5);
}

.mobile-menu a {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 12px 16px;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
  cursor: pointer;
}

.mobile-menu a:hover,
.mobile-menu a.active {
  color: var(--fg-default);
  background: rgb(48 54 61 / .5);
}

.mobile-menu .navbar-cta {
  background: var(--green-muted);
  color: #fff !important;
  text-align: center;
  margin-top: 4px;
}

.page-wrapper {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 96px 24px 60px;
}

.card {
  background: var(--bg-default);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s ease;
}

.card:hover {
  border-color: rgb(56 139 253 / .3);
}

.profile-card-wrapper {
  padding: 28px;
}

.profile-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: flex-start;
}

.profile-avatar-wrap {
  position: relative;
  width: fit-content;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 2px solid var(--border-default);
  object-fit: cover;
  display: block;
  filter: grayscale(20%);
}

.profile-flag {
  position: absolute;
  top: -4px;
  left: -4px;
  width: 26px;
  height: 18px;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgb(0 0 0 / .4);
}

.profile-flag .flag-top {
  background: #CE1126;
  height: 50%;
}

.profile-flag .flag-bottom {
  background: #fff;
  height: 50%;
}

.profile-online {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 14px;
  height: 14px;
  background: var(--green-muted);
  border-radius: 50%;
  border: 2px solid var(--bg-default);
  box-shadow: 0 0 0 3px rgb(46 160 67 / .2);
  z-index: 2;
}

.profile-name {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
  flex-wrap: wrap;
}

.profile-name h1 {
  font-size: 26px;
  font-weight: 700;
  color: var(--fg-default);
  font-family: var(--font-sans);
  letter-spacing: -0.5px;
}

.badge-verified {
  color: var(--accent-muted);
  font-size: 16px;
}

.badge-sound {
  color: var(--fg-subtle);
  font-size: 14px;
  cursor: pointer;
  transition: color 0.2s;
}

.badge-sound:hover {
  color: var(--fg-default);
}

.profile-title {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-muted);
  margin-bottom: 16px;
}

.profile-meta {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--fg-muted);
}

.meta-item .meta-icon {
  width: 28px;
  height: 28px;
  background: var(--bg-overlay);
  border: 1px solid var(--border-muted);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--fg-subtle);
  flex-shrink: 0;
}

.meta-item a {
  color: var(--accent-muted);
  text-decoration: none;
}

.meta-item a:hover {
  text-decoration: underline;
}

.category-nav {
  display: flex;
  gap: 10px;
  padding: 8px;
  background: var(--bg-overlay);
}

.category-btn {
  flex: 1;
  padding: 10px 16px;
  background: #fff0;
  border: 1px solid var(--border-muted);
  border-radius: 8px;
  color: var(--fg-muted);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.category-btn:hover {
  border-color: var(--green-muted);
  color: var(--green-muted);
  background: rgb(46 160 67 / .08);
}

.category-btn.active {
  background: var(--green-muted);
  border-color: var(--green-muted);
  color: #fff;
}

.category-content {
  display: none;
}

.category-content.active {
  display: block;
  animation: fadeSlideUp 0.3s ease;
}

.socials-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.social-item {
  background: var(--bg-overlay);
  border: 1px solid var(--border-muted);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--fg-default);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.social-item::after {
  content: '↗';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--fg-subtle);
  transition: all 0.2s;
}

.social-item:hover {
  border-color: var(--accent-muted);
  background: rgb(31 111 235 / .08);
  transform: translateY(-1px);
}

.social-item:hover::after {
  color: var(--accent-muted);
  right: 10px;
}

.social-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.si-linkedin {
  background: #0A66C2;
}

.si-github {
  background: #24292f;
  border: 1px solid #30363d;
}

.si-threads {
  background: linear-gradient(145deg, #1a1a1a, #3a3a3a);
}

.si-daily {
  background: #CC3911;
}

.si-twitter {
  background: #000;
}

.si-instagram {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.social-info {
  flex: 1;
  min-width: 0;
}

.social-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--fg-default);
}

.social-handle {
  font-size: 11px;
  color: var(--fg-subtle);
  font-family: var(--font-mono);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--fg-default);
  letter-spacing: -0.3px;
}

.section-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-muted);
}

.about-text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--fg-muted);
  font-family: var(--font-mono);
}

.about-text p {
  margin-bottom: 12px;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-text a {
  color: var(--accent-muted);
  text-decoration: underline;
  text-decoration-color: rgb(56 139 253 / .4);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.project-item {
  background: var(--bg-overlay);
  border: 1px solid var(--border-muted);
  border-radius: 12px;
  padding: 18px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.project-item:hover {
  border-color: var(--accent-muted);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgb(31 111 235 / .15);
}

.project-icon {
  width: 40px;
  height: 40px;
  background: var(--bg-default);
  border: 1px solid var(--border-default);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--fg-muted);
  margin-bottom: 12px;
}

.project-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--fg-default);
  margin-bottom: 4px;
}

.project-desc {
  font-size: 12px;
  color: var(--fg-subtle);
  font-family: var(--font-mono);
  line-height: 1.6;
  margin-bottom: 12px;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-tech span {
  font-size: 10px;
  padding: 3px 8px;
  background: var(--bg-inset);
  border: 1px solid var(--border-muted);
  border-radius: 12px;
  color: var(--fg-muted);
  font-family: var(--font-mono);
}

.project-links {
  display: flex;
  gap: 15px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.project-link {
  color: var(--fg-muted);
  font-size: 12px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.2s;
  padding: 4px 0;
}

.project-link:hover {
  color: var(--accent-muted);
}

.project-link i {
  font-size: 14px;
}

.footer {
  text-align: center;
  padding: 24px 0 12px;
  font-size: 12px;
  color: var(--fg-subtle);
  font-family: var(--font-mono);
}

.footer a {
  color: var(--fg-muted);
  text-decoration: none;
}

.footer a:hover {
  color: var(--accent-muted);
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-canvas);
}

::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--fg-subtle);
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-green {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgb(46 160 67 / .4);
  }
  50% {
    box-shadow: 0 0 0 6px #fff0;
  }
}

.card {
  animation: fadeSlideUp 0.4s ease both;
}

.card:nth-child(1) {
  animation-delay: 0.05s;
}

.card:nth-child(2) {
  animation-delay: 0.1s;
}

.card:nth-child(3) {
  animation-delay: 0.15s;
}

.card:nth-child(4) {
  animation-delay: 0.2s;
}

.card:nth-child(5) {
  animation-delay: 0.25s;
}

.profile-online {
  animation: pulse-green 2.5s infinite;
}

* {
  user-select: none;
  -webkit-user-select: none;
}

input,
textarea {
  user-select: text;
  -webkit-user-select: text;
}

@media (max-width: 640px) {
  .navbar-wrap {
    width: calc(100% - 24px);
  }
  .navbar-links {
    display: none;
  }
  .hamburger {
    display: flex;
  }
  .profile-card {
    grid-template-columns: 1fr;
  }
  .profile-avatar-wrap {
    margin: 0 auto;
  }
  .profile-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto;
  }
  .profile-online {
    bottom: 10px;
    right: 10px;
    width: 16px;
    height: 16px;
  }
  .profile-name {
    justify-content: center;
  }
  .profile-title {
    text-align: center;
  }
  .profile-meta {
    align-items: center;
  }
  .meta-item {
    width: 100%;
    max-width: 300px;
  }
  .socials-grid {
    grid-template-columns: 1fr;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .category-nav {
    flex-direction: row;
    gap: 6px;
  }
  .category-btn {
    font-size: 13px;
    padding: 8px 12px;
  }
}