/* ─────────────────────────────────────────────
   TOKENS — DARK (default)
───────────────────────────────────────────── */
:root {
  --bg: #09090b;
  /* zinc-950 */
  --bg-2: #18181b;
  /* zinc-900 */
  --bg-card: #18181b;
  /* zinc-900 */
  --bg-card2: #27272a;
  /* zinc-800 */
  --bg-input: #27272a;
  /* zinc-800 */
  --bg-hover: #3f3f46;
  /* zinc-700 */

  --accent: #0ea5e9;
  /* sky blue */
  --accent-dim: rgba(14, 165, 233, .15);
  --accent-glow: rgba(14, 165, 233, .35);

  --text: #f4f4f5;
  /* zinc-50 */
  --text-muted: #a1a1aa;
  /* zinc-400 */
  --text-faint: #71717a;
  /* zinc-500 */
  --border: rgba(255, 255, 255, .05);
  --border-2: rgba(255, 255, 255, .1);

  --top-h: 52px;
  --font: 'Inter', system-ui, sans-serif;
  --font-heading: 'Outfit', system-ui, sans-serif;
  --mono: 'Fira Code', monospace;
  --radius: 12px;
  --shadow: 0 8px 32px rgba(0, 0, 0, .4);
}

h1,
h2,
h3,
h4,
h5,
h6,
.profile-name,
.sidebar-title,
.tab-btn,
.timeline-date {
  font-family: var(--font-heading) !important;
}

/* ── LIGHT THEME ── */
[data-theme="light"] {
  --bg: #f0f0f5;
  --bg-2: #e8e8ef;
  --bg-card: #ffffff;
  --bg-card2: #f5f5fa;
  --bg-input: #f0f0f5;
  --bg-hover: #eaeaf0;
  --text: #111118;
  --text-muted: rgba(17, 17, 24, .55);
  --text-faint: rgba(17, 17, 24, .3);
  --border: rgba(0, 0, 0, .08);
  --border-2: rgba(0, 0, 0, .14);
}

/* ─────────────────────────────────────────────
   RESET
───────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background-color: #050505;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
}

body::before,
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
}

body::before {
  background: radial-gradient(circle at 15% 30%, rgba(14, 165, 233, 0.09), transparent 40%);
  animation: floatGlow1 10s ease-in-out infinite alternate;
}

body::after {
  background: radial-gradient(circle at 85% 70%, rgba(14, 165, 233, 0.07), transparent 45%);
  animation: floatGlow2 14s ease-in-out infinite alternate;
}

@keyframes floatGlow1 {
  0% {
    transform: translate(0, 0) scale(1);
  }

  100% {
    transform: translate(3%, 5%) scale(1.15);
  }
}

@keyframes floatGlow2 {
  0% {
    transform: translate(0, 0) scale(1);
  }

  100% {
    transform: translate(-3%, -5%) scale(1.2);
  }
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font);
  color: var(--text);
}

input,
textarea {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  transition: border-color .2s, box-shadow .2s;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

/* ─────────────────────────────────────────────
   TOP BAR
───────────────────────────────────────────── */
.topbar {
  display: none;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.menu-btn {
  display: flex;
  flex-direction: column;
  gap: 4.5px;
  padding: 4px;
}

.menu-btn span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: background .2s;
}

.menu-btn:hover span {
  background: var(--text);
}

.brand {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--text);
  text-transform: uppercase;
}

.theme-btn {
  color: var(--text-muted);
  padding: 6px;
  border-radius: 8px;
  transition: color .2s, background .2s;
  display: flex;
}

.theme-btn:hover {
  color: var(--text);
  background: var(--bg-hover);
}

/* ─────────────────────────────────────────────
   PAGE SHELL
───────────────────────────────────────────── */
#pixel-snow-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.page-shell {
  padding-top: 24px;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-width: 1100px;
  margin: 0 auto;
}

/* ─────────────────────────────────────────────
   PROFILE HERO
───────────────────────────────────────────── */
.profile-hero {
  display: flex;
  align-items: center;
  gap: 36px;
  padding: 44px 48px 32px;
}

.avatar-wrap {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  background: var(--bg);
}

.avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-role {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.profile-name {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.1;
}

.profile-bio {
  font-size: .88rem;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 18px;
}

.profile-contacts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border: 1px solid var(--border-2);
  border-radius: 100px;
  font-size: .78rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-card);
  transition: all .2s;
}

.contact-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

/* ─────────────────────────────────────────────
   CONTENT AREA (sidebar + main)
───────────────────────────────────────────── */
.content-area {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  flex: 1;
  align-items: start;
  min-height: 0;
}

/* ── SIDEBAR ── */
.sidebar {
  padding: 64px 20px 24px 20px;
  height: 100%;
  overflow-y: auto;
}

/* Sidebar Custom Scrollbar */
.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 3px;
}

.sidebar:hover::-webkit-scrollbar-thumb {
  background: var(--bg-hover);
}

.sidebar-card {
  background: rgba(255, 255, 255, 0.015);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  border-radius: var(--radius);
  padding: 24px 20px;
}

.sidebar-title {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 12px;
}

.sidebar-bio {
  font-size: .83rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.sidebar-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-meta li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: .8rem;
  color: var(--text-muted);
}

.sidebar-meta li svg {
  margin-right: 12px;
  color: var(--accent);
}

.hover-link {
  transition: color .2s;
}

.hover-link:hover {
  color: var(--accent);
}

/* ── MAIN PANEL ── */
.main-panel {
  padding: 24px 28px;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Main Panel Custom Scrollbar (moved to tab panels) */
.tab-panel::-webkit-scrollbar {
  width: 8px;
}

.tab-panel::-webkit-scrollbar-track {
  background: transparent;
}

.tab-panel::-webkit-scrollbar-thumb {
  background: var(--bg-hover);
  border-radius: 4px;
  border: 2px solid var(--bg);
}

.tab-panel::-webkit-scrollbar-thumb:hover {
  background: var(--text-faint);
}

/* ─────────────────────────────────────────────
   TAB NAV
───────────────────────────────────────────── */
.tab-nav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
  flex-shrink: 0;
}

.tab-btn {
  padding: 10px 22px;
  font-size: .84rem;
  font-weight: 500;
  color: var(--text-faint);
  position: relative;
  transition: color .2s;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tab-btn:hover {
  color: var(--text-muted);
}

.tab-btn.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* ─────────────────────────────────────────────
   TAB PANELS
───────────────────────────────────────────── */
.tab-panel {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px 8px 4px;
  margin-top: -8px;
  /* Offset the padding */
  animation: panelFade .28s ease;
}

.tab-panel.active {
  display: block;
}

@keyframes panelFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─────────────────────────────────────────────
   PROJECTS GRID
───────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.proj-card {
  background: rgba(255, 255, 255, 0.015);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform .25s ease, border-color .25s, box-shadow .25s;
}

.proj-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-glow);
  box-shadow: 0 8px 32px rgba(0, 0, 0, .4), 0 0 20px var(--accent-dim);
}

.proj-thumb {
  height: 160px;
  position: relative;
  overflow: hidden;
}

.proj-thumb-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

/* Thumb backgrounds */


.api-thumb {
  background: linear-gradient(135deg, #0c1a2e, #1a3a5c, #0e4272);
}

.pipeline-thumb {
  background: linear-gradient(135deg, #0a1f0e, #14532d, #166534);
}

.contest-thumb {
  background: linear-gradient(135deg, #1a1a1a, #2d2d2d, #3a3a3a);
}

.grid-thumb {
  background: linear-gradient(135deg, #1c1207, #78350f, #92400e);
}

.port-thumb {
  background: linear-gradient(135deg, #1a0530, #4a044e, #7e22ce);
}

.thumb-logo {
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: white;
  font-weight: 800;
  font-size: .75rem;
  text-align: center;
  line-height: 1.3;
  border-radius: 9px;
  padding: 10px 14px;
}

.thumb-badges {
  display: flex;
  gap: 6px;
}

.thumb-badge {
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}

.thumb-badge.orange {
  background: rgba(249, 115, 22, .2);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, .3);
}

.thumb-badge.blue {
  background: rgba(59, 130, 246, .2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, .3);
}

.thumb-badge.yellow {
  background: rgba(234, 179, 8, .2);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, .3);
}

.thumb-badge.gray {
  background: rgba(255, 255, 255, .1);
  color: #d1d5db;
  border: 1px solid rgba(255, 255, 255, .15);
}

.thumb-badge.purple {
  background: rgba(192, 132, 252, .2);
  color: #c084fc;
  border: 1px solid rgba(192, 132, 252, .3);
}

.proj-meta {
  padding: 12px 16px 16px;
}

.proj-type {
  font-size: .67rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-faint);
  display: block;
  margin-bottom: 4px;
}

.proj-title {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text);
}

/* ─────────────────────────────────────────────
   RESUME
───────────────────────────────────────────── */
.resume-section {
  margin-bottom: 32px;
}

.resume-section-title {
  font-size: .72rem;
  font-weight: 700;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text-faint);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.timeline {
  position: relative;
  padding-left: 42px;
  margin-top: 16px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 6px;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.08);
}

.timeline-item {
  position: relative;
  margin-bottom: 32px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -37px;
  /* 42px padding - 37px left = 5px. Dot center is 5+6=11px, matching line center at 10+1=11px */
  top: 18px;
  /* Vertically align with the date text inside the card */
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  box-shadow: 0 0 10px var(--accent-dim);
  transition: all .3s;
}

.timeline-item:hover .timeline-dot {
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

.timeline-content {
  background: rgba(255, 255, 255, 0.015);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  border-radius: var(--radius);
  padding: 16px 18px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}

.timeline-item:hover .timeline-content {
  border-color: var(--accent-glow);
  box-shadow: 0 4px 20px rgba(0, 0, 0, .4), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

.timeline-content h3 {
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.3;
}

.timeline-date {
  font-size: .75rem;
  color: var(--accent);
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.timeline-content p {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Skills badges */
.skills-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .78rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all .2s;
  cursor: default;
}

.skill-badge img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.skill-badge svg {
  flex-shrink: 0;
}

.skill-badge:hover {
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-2px);
}

/* ─────────────────────────────────────────────
   CONTACT
───────────────────────────────────────────── */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 28px;
  align-items: start;
}

.contact-section-title {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text-faint);
  margin-bottom: 16px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.ci-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-2);
  display: grid;
  place-items: center;
  color: var(--accent);
  flex-shrink: 0;
}

.ci-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ci-label {
  font-size: .7rem;
  color: var(--text-faint);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.ci-value {
  font-size: .82rem;
  color: var(--text-muted);
  transition: color .2s;
}

a.ci-value:hover {
  color: var(--accent);
}

.social-icons {
  display: flex;
  gap: 10px;
}

.social-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-2);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  transition: all .2s;
}

.social-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* Form */
.form-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 18px;
  letter-spacing: -.01em;
}

.form-field {
  margin-bottom: 12px;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 11px 14px;
  font-size: .84rem;
}

.form-field textarea {
  resize: vertical;
}

.form-submit {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent), #a855f7);
  color: white;
  font-weight: 600;
  font-size: .88rem;
  border: none;
  cursor: pointer;
  transition: opacity .2s, transform .2s;
  margin-top: 4px;
}

.form-submit:hover {
  opacity: .88;
  transform: translateY(-1px);
}

.form-submit:active {
  transform: translateY(0);
}

.form-success {
  margin-top: 12px;
  font-size: .82rem;
  color: #4ade80;
  text-align: center;
}

/* ─────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────── */
.site-footer {
  margin-top: auto;
  padding: 18px 48px;
  border-top: 1px solid var(--border);
  font-size: .75rem;
  color: var(--text-faint);
  text-align: center;
}

.footer-accent {
  color: var(--accent);
  font-weight: 600;
}

/* ─────────────────────────────────────────────
   BELL BUTTON (fixed bottom right)
───────────────────────────────────────────── */
.bell-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-card2);
  border: 1px solid var(--border-2);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  box-shadow: var(--shadow);
  transition: all .2s;
  z-index: 50;
}

.bell-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: scale(1.06);
}

/* ─────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────── */
@media (max-width: 960px) {
  .content-area {
    grid-template-columns: 220px 1fr;
  }
}

@media (max-width: 768px) {
  .page-shell {
    height: auto;
    overflow: visible;
    padding: 24px 20px 0 20px;
  }

  .content-area {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  /* Use display contents to flatten the DOM for reordering */
  .sidebar,
  .main-panel {
    display: contents;
  }

  /* 1. Image centered */
  .avatar-wrap {
    order: 1;
    margin: 0 auto 24px auto !important;
  }

  /* 2. Profile Info text centered */
  .profile-info {
    order: 2;
    text-align: center;
    margin-bottom: 32px !important;
  }

  .profile-bio {
    margin: 0 auto 24px auto !important;
  }

  .profile-contacts {
    justify-content: center;
  }

  /* 3. Sidebar Card expanded */
  .sidebar-card {
    order: 3;
    width: 100%;
    margin: 0 0 32px 0;
  }

  /* 4. Tab Nav */
  .tab-nav {
    order: 4;
    width: 100%;
  }

  .tab-btn {
    flex: 1;
    text-align: center;
    padding: 12px 0;
  }

  /* 5. Tab Content */
  .tab-panel {
    order: 5;
    overflow: visible;
    padding: 0;
    margin-top: 24px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .resume-grid {
    grid-template-columns: 1fr;
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }

  .site-footer {
    padding: 14px 20px;
  }
}

@media (max-width: 480px) {
  .profile-info {
    text-align: center;
  }

  .profile-contacts {
    justify-content: center;
  }
}