/* ============================================================
   PORTFOLIO — Modern Developer Profile
   Design tokens, resets, components — Pure CSS
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── Design Tokens ────────────────────────────────────────── */
:root {
  /* Colors — Modern Silicon Valley / Linear & Raycast Dark Tech */
  --bg-primary: #09090b;
  --bg-surface: #111115;
  --bg-elevated: #181820;
  --bg-hover: #22222d;
  --border: #272733;
  --border-muted: #1c1c24;

  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;

  --accent-start: #6366f1;
  --accent-mid: #3b82f6;
  --accent-end: #06b6d4;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #3b82f6 50%, #06b6d4 100%);
  --accent-blue: #3b82f6;
  --accent-indigo: #6366f1;
  --accent-cyan: #06b6d4;
  --accent-teal: #14b8a6;
  --accent-purple: #8b5cf6;

  /* Layout */
  --max-width: 935px;
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Transitions */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 400ms;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .4), 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, .5);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, .6);
  --shadow-glow: 0 0 32px rgba(99, 102, 241, .28);
}

/* Light Mode — Crisp, clean engineering aesthetic */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-surface: #ffffff;
  --bg-elevated: #f1f5f9;
  --bg-hover: #e2e8f0;
  --border: #e2e8f0;
  --border-muted: #edf2f7;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, .06), 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, .08);
  --shadow-lg: 0 8px 32px rgba(15, 23, 42, .12);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, .15);
}

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

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

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--duration-base) var(--ease-out),
    color var(--duration-base) var(--ease-out);
  min-height: 100vh;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ── App Shell ────────────────────────────────────────────── */
#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Top Navbar ───────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-xl);
  height: 56px;
  background: color-mix(in srgb, var(--bg-primary) 82%, transparent);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-muted);
}

.navbar-brand {
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: -.02em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Language Switcher ────────────────────────────────────── */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 2px;
  gap: 2px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
}

.lang-btn {
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--text-muted);
  transition: all var(--duration-fast) var(--ease-out);
}

.lang-btn:hover {
  color: var(--text-primary);
}

.lang-btn.active {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 1px 6px rgba(131, 58, 180, 0.35);
}

/* ── Redesigned Modern Theme Switch ────────────────────────── */
.theme-switch-btn {
  position: relative;
  width: 58px;
  height: 30px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 6px;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.theme-switch-btn:hover {
  border-color: var(--text-muted);
  box-shadow: 0 0 12px rgba(131, 58, 180, 0.25);
}

.theme-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  z-index: 2;
  transition: all var(--duration-base) var(--ease-out);
}

.theme-icon svg {
  width: 14px;
  height: 14px;
}

.sun-icon {
  color: #f59e0b;
}

.moon-icon {
  color: #a855f7;
}

.theme-switch-thumb {
  position: absolute;
  top: 3px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  transition: transform var(--duration-base) var(--ease-spring),
    background var(--duration-base);
  z-index: 1;
}

[data-theme="dark"] .theme-switch-thumb {
  transform: translateX(26px);
  background: #1e1e28;
  border-color: #3b3b4f;
}

[data-theme="light"] .theme-switch-thumb {
  transform: translateX(0);
  background: #ffffff;
  border-color: #d8d8e6;
}

[data-theme="dark"] .sun-icon {
  opacity: 0.35;
  transform: scale(0.85);
}

[data-theme="dark"] .moon-icon {
  opacity: 1;
  transform: scale(1);
}

[data-theme="light"] .sun-icon {
  opacity: 1;
  transform: scale(1);
}

[data-theme="light"] .moon-icon {
  opacity: 0.35;
  transform: scale(0.85);
}

/* ── Main Content ─────────────────────────────────────────── */
.main {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md);
}

/* ── Profile Header ───────────────────────────────────────── */
.profile-header {
  display: flex;
  flex-direction: row;
  gap: var(--space-2xl);
  align-items: flex-start;
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid var(--border-muted);
  animation: fadeUp .5s var(--ease-out) both;
}

.profile-header.no-avatar {
  gap: 0;
}

/* Avatar Wrapper (clean ring without status badge) */
.avatar-wrapper {
  position: relative;
  flex-shrink: 0;
  width: 140px;
}

.avatar-ring {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  padding: 3px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--duration-base) var(--ease-spring),
    box-shadow var(--duration-base) var(--ease-out);
}

.avatar-ring:hover {
  transform: scale(1.03);
  box-shadow: 0 0 25px rgba(99, 102, 241, 0.4);
}

.avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-surface);
  border: 3px solid var(--bg-primary);
}

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

/* Profile Info */
.profile-info {
  display: flex;
  flex-direction: column;
  padding-top: var(--space-xs);
  flex: 1;
  min-width: 0;
}

.profile-name-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.profile-name {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--text-primary);
}


/* Bio */
.profile-bio {
  font-size: .9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  white-space: pre-line;
  max-width: 540px;
  margin-bottom: 8px;
}

/* ── Instagram Music Badge (Ultra-Minimalist) ───────────────── */
.profile-music-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px 0;
  max-width: 100%;
  min-width: 0;
}

.music-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 3px 11px 3px 9px;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.76rem;
  line-height: 1.3;
  color: var(--text-primary);
  max-width: min(480px, 100%);
  min-width: 0;
  flex: 0 1 auto;
  overflow: hidden;
  white-space: nowrap;
  transition: border-color var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-out),
    opacity var(--duration-fast) var(--ease-out);
  user-select: none;
  outline: none;
}

[data-theme="light"] .music-badge {
  background: transparent;
  border-color: rgba(0, 0, 0, 0.12);
}

.music-badge:hover {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.28);
}

[data-theme="light"] .music-badge:hover {
  background: transparent;
  border-color: rgba(0, 0, 0, 0.25);
}

.music-badge:active {
  transform: scale(0.97);
}

.music-badge:focus-visible {
  outline: 1.5px solid var(--accent-start);
  outline-offset: 2px;
}

/* Icon */
.music-badge-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  color: var(--text-primary);
}

.music-play-icon {
  display: block;
  width: 10px;
  height: 10px;
}

.music-equalizer {
  display: none;
  align-items: flex-end;
  justify-content: center;
  gap: 1.5px;
  width: 10px;
  height: 10px;
}

.eq-bar {
  width: 1.5px;
  border-radius: 1px;
  background: currentColor;
  height: 2px;
  transform-origin: bottom;
}

/* Playing State */
.music-badge.playing {
  border-color: rgba(255, 255, 255, 0.28);
  background: transparent;
}

[data-theme="light"] .music-badge.playing {
  border-color: rgba(0, 0, 0, 0.25);
  background: transparent;
}

.music-badge.playing .music-play-icon {
  display: none;
}

.music-badge.playing .music-equalizer {
  display: flex;
}

.music-badge.playing .eq-bar-1 {
  animation: igSoundwave 0.75s ease-in-out infinite alternate;
}

.music-badge.playing .eq-bar-2 {
  animation: igSoundwave 0.55s ease-in-out infinite alternate 0.15s;
}

.music-badge.playing .eq-bar-3 {
  animation: igSoundwave 0.85s ease-in-out infinite alternate 0.05s;
}

@keyframes igSoundwave {
  0% {
    height: 2px;
  }

  50% {
    height: 9px;
  }

  100% {
    height: 3px;
  }
}

/* Title & Artist Text Container */
.music-info {
  display: inline-block;
  vertical-align: middle;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-title {
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.music-artist-wrapper {
  display: inline;
}

.music-separator {
  margin: 0 4px;
  font-size: 0.68em;
  opacity: 0.6;
  vertical-align: middle;
}

.music-artist {
  font-weight: 400;
  color: var(--text-primary);
  opacity: 0.85;
  letter-spacing: -0.01em;
}

.music-badge.switching {
  opacity: 0.45;
  transform: scale(0.97);
}

/* Music Control Buttons Group (Mode & Next) */
.music-controls-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.music-ctrl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  transition: border-color var(--duration-fast) var(--ease-out),
    background var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-out);
  user-select: none;
  outline: none;
}

[data-theme="light"] .music-ctrl-btn {
  border-color: rgba(0, 0, 0, 0.12);
  color: var(--text-secondary);
}

.music-ctrl-btn:hover {
  border-color: rgba(255, 255, 255, 0.28);
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}

[data-theme="light"] .music-ctrl-btn:hover {
  border-color: rgba(0, 0, 0, 0.25);
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.04);
}

.music-ctrl-btn:active {
  transform: scale(0.92);
}

.music-ctrl-btn:focus-visible {
  outline: 1.5px solid var(--accent-start);
  outline-offset: 2px;
}

.music-ctrl-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
}

/* Mode Button Toggle States (icon toggles without color change) */
.music-mode-btn.mode-repeat .icon-shuffle {
  display: none;
}

.music-mode-btn.mode-repeat .icon-repeat {
  display: flex;
}

.music-mode-btn.mode-random .icon-shuffle {
  display: flex;
}

.music-mode-btn.mode-random .icon-repeat {
  display: none;
}

@media (max-width: 600px) {
  .profile-music-row {
    flex-wrap: nowrap;
    gap: 6px;
  }

  .music-badge {
    max-width: 100%;
    flex: 1 1 auto;
    padding: 2.5px 9px 2.5px 7px;
    font-size: 0.74rem;
  }

  .music-controls-group {
    margin-left: 0;
    gap: 5px;
    flex-shrink: 0;
  }

  .music-ctrl-btn {
    width: 25px;
    height: 25px;
  }
}

/* Meta: Location & Links Array */
.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: center;
  margin-bottom: 12px;
}

.profile-bio+.profile-meta {
  margin-top: 8px;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
  color: var(--text-muted);
}

.meta-item svg {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.meta-item a {
  color: var(--text-secondary);
  transition: color var(--duration-fast);
  border-bottom: 1px dotted var(--border);
}

.meta-item a:hover {
  color: var(--text-primary);
  border-bottom-color: var(--accent-start);
}

/* Social links row */
.social-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 100%;
  margin-top: 0;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: .78rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  transition: all var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}

.social-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.social-link:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
  border-color: var(--text-muted);
  transform: translateY(-1px);
}

/* General Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: var(--radius-full);
  font-size: .85rem;
  font-weight: 600;
  transition: all var(--duration-fast) var(--ease-out);
  letter-spacing: -.01em;
}

.btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  box-shadow: 0 2px 12px rgba(99, 102, 241, .35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(99, 102, 241, .5);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-elevated);
  border-color: var(--text-muted);
  transform: translateY(-1px);
}

/* ── Tabs ─────────────────────────────────────────────────── */
.tabs-section {
  position: sticky;
  top: 56px;
  z-index: 90;
  background: color-mix(in srgb, var(--bg-primary) 92%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-muted);
  margin-top: var(--space-lg);
  animation: fadeUp .5s .1s var(--ease-out) both;
}

.tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  max-width: 480px;
  margin: 0 auto;
  padding: 0;
}

.tab-btn {
  flex: none;
  width: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 14px 0;
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-muted);
  border-top: 2px solid transparent;
  letter-spacing: .07em;
  text-transform: uppercase;
  transition: all var(--duration-fast) var(--ease-out);
}

/* ── No-Profile Layout (Only Projects & Photos) ───────────── */
.main.no-profile {
  padding-top: var(--space-md);
}

.main.no-profile .tabs-section,
.tabs-section.no-profile {
  margin-top: 0;
}

.tabs-section.no-profile .tabs,
.tabs:has(> .tab-btn:nth-child(2):last-child) {
  max-width: 360px;
}

.tabs-section.no-profile .tab-btn,
.tabs:has(> .tab-btn:nth-child(2):last-child) .tab-btn {
  width: 180px;
}

@media (max-width: 768px) {

  .tabs-section.no-profile .tabs,
  .tabs:has(> .tab-btn:nth-child(2):last-child) {
    max-width: 100%;
  }

  .tabs-section.no-profile .tab-btn,
  .tabs:has(> .tab-btn:nth-child(2):last-child) .tab-btn {
    width: auto;
    flex: 1;
  }
}

.tab-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

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

.tab-btn.active {
  color: var(--text-primary);
  border-top-color: var(--text-primary);
}

/* ── Tab Content ──────────────────────────────────────────── */
.tab-pane {
  display: none;
  animation: fadeUp .35s var(--ease-out) both;
  padding-top: var(--space-xl);
}

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

/* ── Section Label (Fixed SVG Sizing) ─────────────────────── */
.section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .09em;
  margin-bottom: var(--space-md);
}

.section-label svg {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-muted);
}

/* ── Pinned Project ───────────────────────────────────────── */
.pinned-section {
  margin-bottom: var(--space-xl);
}

.pinned-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.pinned-card {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--duration-base) var(--ease-out),
    transform var(--duration-base) var(--ease-out),
    border-color var(--duration-base);
  cursor: pointer;
  min-height: 240px;
}

.pinned-card.no-image {
  grid-template-columns: 1fr;
}

.pinned-card:hover {
  box-shadow: var(--shadow-glow), var(--shadow-md);
  border-color: var(--border);
  transform: translateY(-2px);
}

.pinned-image {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg-elevated);
}

.pinned-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

.pinned-card:hover .pinned-image img {
  transform: scale(1.05);
}

.pinned-content {
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-sm);
}

.pinned-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent-end);
  background: color-mix(in srgb, var(--accent-end) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-end) 25%, transparent);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  width: fit-content;
}

.pinned-badge svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.pinned-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -.02em;
  line-height: 1.3;
}

.pinned-desc {
  font-size: .85rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.pinned-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.pinned-links {
  display: flex;
  gap: var(--space-sm);
  padding-top: var(--space-xs);
  flex-wrap: wrap;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: .75rem;
  font-weight: 600;
  transition: all var(--duration-fast) var(--ease-out);
}

.link-btn svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.link-btn-live {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, .3);
}

.link-btn-live:hover {
  box-shadow: 0 4px 16px rgba(99, 102, 241, .45);
  transform: translateY(-1px);
}

.link-btn-ghost {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.link-btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  transform: translateY(-1px);
}

/* ── Projects Grid ────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}


.project-card {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-surface);
  border-radius: var(--radius-xs);
}

.project-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

.project-card:hover .project-card-img {
  transform: scale(1.06);
}

.project-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease-out);
  text-align: center;
}

.project-card:hover .project-card-overlay {
  opacity: 1;
}

.project-card.no-image {
  border: 1px solid var(--border);
  background: var(--bg-surface);
}

.project-card.no-image .project-card-overlay {
  opacity: 1;
  background: transparent;
  backdrop-filter: none;
}

.project-card.no-image .overlay-title {
  color: var(--text-primary);
}

.overlay-title {
  font-size: .88rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.01em;
}

.overlay-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
}

.overlay-tag {
  font-size: .64rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Type icon badge */
.type-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 2;
}

.type-badge svg {
  width: 14px;
  height: 14px;
}

/* ── Photos Grid ──────────────────────────────────────────── */
.photos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}


.photo-card {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-surface);
  border-radius: var(--radius-xs);
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

.photo-card:hover img {
  transform: scale(1.06);
}

.photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease-out);
  display: flex;
  align-items: flex-end;
  padding: var(--space-sm);
}

.photo-card:hover .photo-overlay {
  opacity: 1;
}

.photo-caption {
  font-size: .75rem;
  color: #fff;
  font-weight: 500;
  line-height: 1.4;
}

.photo-album-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: .7rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.25);
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.photo-album-badge svg {
  width: 12px;
  height: 12px;
}

/* ── About Tab (Redesigned & Premium) ─────────────────────── */
.about-section {
  max-width: 740px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.about-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: border-color var(--duration-base);
}

.about-card:hover {
  border-color: color-mix(in srgb, var(--border) 60%, var(--accent-start));
}

.about-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent-start);
  background: color-mix(in srgb, var(--accent-start) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-start) 25%, transparent);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-md);
}

.about-badge svg {
  width: 13px;
  height: 13px;
}

.about-headline {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  line-height: 1.35;
}

.about-story {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.about-story p {
  font-size: .92rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* Highlights Grid */
.about-highlights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.about-highlight-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  transition: transform var(--duration-base) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-out);
}

.about-highlight-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: var(--text-muted);
}

.highlight-icon {
  font-size: 1.5rem;
  line-height: 1;
  margin-bottom: 2px;
}

.highlight-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -.01em;
}

.highlight-desc {
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Tech Stack & Skills inside About */
.about-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

.about-card-title svg {
  width: 15px;
  height: 15px;
  color: var(--accent-start);
}

/* Categorized Skills Grid */
.skills-categorized-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.skill-category-name {
  font-size: .75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: var(--space-sm);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.skill-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: .72rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  position: relative;
  padding-left: 20px;
  border-left: 2px solid var(--border-muted);
  margin-left: 8px;
}

.timeline-item {
  position: relative;
}

.timeline-marker {
  position: absolute;
  left: -27px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--accent-start);
}

.timeline-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timeline-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.timeline-role {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.timeline-period {
  font-size: .75rem;
  font-weight: 600;
  color: var(--accent-end);
  background: color-mix(in srgb, var(--accent-end) 10%, transparent);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.timeline-company {
  font-size: .82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.timeline-desc {
  font-size: .84rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 4px;
}

/* Connect Card */
.about-connect-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent-start) 10%, var(--bg-surface)), var(--bg-surface));
  border: 1px solid color-mix(in srgb, var(--accent-start) 25%, var(--border));
}

.connect-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.connect-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.connect-desc {
  font-size: .85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 440px;
}

.connect-actions {
  display: flex;
  gap: var(--space-sm);
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* ── Modal / Lightbox ─────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, .85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-base) var(--ease-out);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  box-shadow: var(--shadow-lg);
  transform: scale(.95) translateY(16px);
  transition: transform var(--duration-base) var(--ease-spring), opacity 0.15s ease-out;
}

.modal.no-image {
  grid-template-columns: 1fr;
  max-width: 580px;
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal.transitioning {
  opacity: 0.35;
  transform: scale(0.985);
  transition: opacity 0.12s ease-out, transform 0.12s ease-out;
}

.modal-image-side {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-elevated);
}

.modal-image-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-content-side {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-xl);
  border-bottom: 1px solid var(--border-muted);
  position: sticky;
  top: 0;
  background: var(--bg-surface);
  z-index: 2;
  gap: var(--space-md);
}

.modal-header-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.modal-type-badge {
  font-size: .74rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.modal-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: color-mix(in srgb, var(--accent-start) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-start) 28%, var(--border));
  font-size: .74rem;
}

.modal-role-label {
  color: var(--text-muted);
  font-weight: 500;
}

.modal-role-val {
  color: var(--text-primary);
  font-weight: 600;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--duration-fast) var(--ease-out);
  flex-shrink: 0;
}

.modal-close svg {
  width: 15px;
  height: 15px;
}

.modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  transform: rotate(90deg);
}

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.modal-nav-counter {
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0 6px;
  user-select: none;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}

/* Floating Navigation Buttons (Desktop) */
.modal-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--bg-surface) 75%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all var(--duration-fast) var(--ease-out);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .25);
}

.modal-nav-btn:hover {
  background: var(--bg-elevated);
  border-color: var(--accent-start);
  color: var(--text-primary);
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
}

.modal-nav-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.modal-nav-prev {
  left: max(16px, calc((100vw - 860px) / 2 - 68px));
}

.modal-nav-next {
  right: max(16px, calc((100vw - 860px) / 2 - 68px));
}

@media (max-width: 960px) {
  .modal-nav-btn {
    display: none;
  }
}

.modal-body {
  padding: var(--space-xl);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.modal-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -.025em;
  color: var(--text-primary);
  line-height: 1.3;
}

/* Stats / Metrics Grid (optional) */
.modal-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: var(--space-sm);
}

.modal-stat-card {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.modal-stat-val {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -.02em;
}

.modal-stat-lbl {
  font-size: .7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 500;
}

.modal-desc {
  font-size: .875rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* Sections for Key Features & Highlights (optional) */
.modal-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  background: color-mix(in srgb, var(--bg-elevated) 60%, transparent);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
}

.modal-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .84rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -.01em;
}

.modal-section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-end);
}

.modal-feature-list,
.modal-highlight-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .83rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.modal-check-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: color-mix(in srgb, #10b981 18%, transparent);
  color: #10b981;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.modal-check-icon svg {
  width: 11px;
  height: 11px;
}

.modal-highlight-list li {
  position: relative;
  padding-left: 18px;
  font-size: .83rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.modal-highlight-list li::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-start);
  box-shadow: 0 0 6px var(--accent-start);
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.modal-footer {
  padding: var(--space-lg) var(--space-xl);
  border-top: 1px solid var(--border-muted);
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  position: sticky;
  bottom: 0;
  background: var(--bg-surface);
  z-index: 2;
}

/* ── Photo Lightbox (Album & Carousel) ───────────────────── */
.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, .96);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-base) var(--ease-out);
  user-select: none;
}

.photo-lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.photo-lightbox-header {
  width: 100%;
  max-width: 1100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  z-index: 10;
}

.photo-lightbox-info {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.photo-lightbox-title {
  font-size: .95rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: -.01em;
}

.photo-lightbox-counter {
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, .1);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.photo-lightbox-close {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.photo-lightbox-close svg {
  width: 18px;
  height: 18px;
}

.photo-lightbox-close:hover {
  background: rgba(255, 255, 255, .22);
  transform: rotate(90deg);
}

.photo-lightbox-stage {
  position: relative;
  flex: 1;
  width: 100%;
  max-width: 1100px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: var(--space-xs) 0;
}

.photo-lightbox-media {
  position: relative;
  max-width: 90vw;
  max-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 80px;
  min-height: 80px;
}

.photo-lightbox-media img {
  max-width: 90vw;
  max-height: 75vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.65);
  transition: opacity 180ms ease, transform 180ms ease;
}

.photo-lightbox-media img.fading {
  opacity: 0.2;
  transform: scale(0.98);
}

.lightbox-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 36px;
  height: 36px;
  margin-top: -18px;
  margin-left: -18px;
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 160ms ease, visibility 160ms ease;
  z-index: 5;
}

.lightbox-spinner.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, .2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all var(--duration-fast) var(--ease-out);
}

.lightbox-nav-btn:hover {
  background: rgba(255, 255, 255, .28);
  transform: translateY(-50%) scale(1.08);
}

.lightbox-nav-btn:active {
  transform: translateY(-50%) scale(0.96);
}

.lightbox-nav-prev {
  left: var(--space-md);
}

.lightbox-nav-next {
  right: var(--space-md);
}

.photo-lightbox-footer {
  width: 100%;
  max-width: 1100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  z-index: 10;
}

.photo-lightbox-caption {
  font-size: .85rem;
  color: rgba(255, 255, 255, .85);
  text-align: center;
  margin: 0;
}

.photo-lightbox-caption:empty {
  display: none;
}

.lightbox-dots {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.lightbox-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .3);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all var(--duration-fast) var(--ease-out);
}

.lightbox-dot.active {
  background: #fff;
  transform: scale(1.3);
}

@media (max-width: 640px) {
  .lightbox-nav-btn {
    width: 36px;
    height: 36px;
  }

  .lightbox-nav-prev {
    left: 4px;
  }

  .lightbox-nav-next {
    right: 4px;
  }

  .photo-lightbox-stage {
    padding: 0;
  }
}

/* ── Keyframes ────────────────────────────────────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

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

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Loading & Error States ───────────────────────────────── */
.loading-spinner {
  width: 38px;
  height: 38px;
  border: 3px solid var(--border);
  border-top-color: var(--accent-start);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: var(--space-2xl) auto;
}

.error-state {
  text-align: center;
  padding: var(--space-2xl);
  color: var(--text-muted);
  font-size: .875rem;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .navbar {
    padding: 0 var(--space-md);
  }

  .main {
    padding: var(--space-lg) var(--space-sm);
  }

  .profile-header {
    flex-direction: column;
    align-items: center;
    gap: var(--space-xl);
    text-align: center;
    padding-bottom: var(--space-xl);
  }

  .avatar-wrapper {
    width: 120px;
  }

  .avatar-ring {
    width: 120px;
    height: 120px;
  }

  .profile-info {
    padding-top: var(--space-sm);
    align-items: center;
    width: 100%;
  }

  .profile-name-row {
    justify-content: center;
  }

  .profile-bio {
    max-width: 100%;
    text-align: center;
  }

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

  .social-links {
    justify-content: center;
  }

  .tabs-section {
    margin-top: var(--space-md);
  }

  .tabs {
    max-width: 100%;
  }

  .tab-btn {
    flex: 1;
    width: auto;
    font-size: .7rem;
    letter-spacing: .04em;
  }

  .pinned-card {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .pinned-image {
    aspect-ratio: 1 / 1;
    position: relative;
  }

  .pinned-image img {
    position: absolute;
  }

  .pinned-content {
    padding: var(--space-lg);
  }

  .projects-grid,
  .photos-grid {
    gap: 2px;
  }

  .about-highlights-grid {
    grid-template-columns: 1fr;
  }

  .skills-categorized-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .about-connect-card {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .connect-actions {
    justify-content: center;
  }

  .modal {
    grid-template-columns: 1fr;
    max-height: 92vh;
    border-radius: var(--radius-lg);
    overflow-y: auto;
  }

  .modal-image-side {
    aspect-ratio: 16/9;
    position: relative;
  }

  .modal-image-side img {
    position: absolute;
  }

  .modal-content-side {
    overflow-y: visible;
  }
}

@media (max-width: 480px) {

  .modal-header {
    padding: var(--space-md) var(--space-md);
    gap: var(--space-xs);
  }

  .projects-grid,
  .photos-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .tab-btn {
    padding: 12px 0;
  }

  .about-card {
    padding: var(--space-lg);
  }

  .timeline-header {
    flex-direction: column;
    gap: 2px;
  }
}

/* ============================================================
   FEEDBACK & KO-FI DONATE PAGE
   ============================================================ */

/* Hide profile header and tabs when in feedback view */
.main.view-feedback .profile-header,
.main.view-feedback .tabs-section {
  display: none !important;
}

/* Page wrapper */
.feedback-page-wrapper {
  max-width: 760px;
  margin: 0 auto;
  padding-top: var(--space-xl);
  padding-bottom: var(--space-2xl);
  animation: fadeUp .35s var(--ease-out) both;
}

/* Header with Title on Left and Ko-fi Mini Card on Right */
.feedback-header {
  margin-bottom: var(--space-xl);
}

.feedback-header-content {
  max-width: 680px;
}

.feedback-heading {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.2;
}

.feedback-subheading {
  font-size: .92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Navigation Support & Popover ───────────────────────────── */
.support-popover-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-support-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .02em;
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  cursor: pointer;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12);
  transition: all var(--duration-fast) var(--ease-out);
  user-select: none;
}

.nav-support-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
  background: var(--bg-elevated);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.nav-support-btn:active {
  transform: translateY(0);
}

.nav-support-btn.active {
  color: var(--text-primary);
  border-color: var(--accent);
  background: var(--bg-elevated);
  box-shadow: 0 0 0 2px rgba(131, 58, 180, 0.22);
}

.support-btn-icon {
  display: flex;
  align-items: center;
  color: #f59e0b;
  transition: transform var(--duration-fast) var(--ease-spring);
}

.nav-support-btn:hover .support-btn-icon,
.nav-support-btn.active .support-btn-icon {
  transform: rotate(-10deg) scale(1.12);
}

.support-btn-icon svg {
  width: 14px;
  height: 14px;
}

.support-btn-label {
  font-weight: 600;
}

/* ── Floating Support Popover ───────────────────────────────── */
.support-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: -50px;
  width: 300px;
  max-width: calc(100vw - 32px);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 16px;
  box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.45), 0 4px 14px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  z-index: 250;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.97);
  transform-origin: top center;
  transition: opacity var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-spring),
    visibility var(--duration-fast);
  pointer-events: none;
}

[data-theme="light"] .support-popover {
  box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.12), 0 4px 14px rgba(0, 0, 0, 0.05);
  background: rgba(255, 255, 255, 0.98);
}

.support-popover.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

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

.support-popover-title {
  font-size: .88rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: -.01em;
}

.popover-title-icon {
  display: flex;
  align-items: center;
  color: #f59e0b;
}

.popover-title-icon svg {
  width: 14px;
  height: 14px;
}

.support-popover-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  padding: 0;
}

.support-popover-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.support-popover-close svg {
  width: 13px;
  height: 13px;
}

.support-popover-desc {
  font-size: .8rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 14px;
}

.support-popover-action {
  margin-bottom: 10px;
}

.support-kofi-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 9px 14px;
  background: #f59e0b;
  color: #0a0a0c !important;
  font-weight: 700;
  font-size: .84rem;
  border-radius: var(--radius-md);
  border: none;
  text-decoration: none !important;
  transition: all var(--duration-fast) var(--ease-out);
  box-shadow: 0 3px 12px rgba(245, 158, 11, .28);
}

.support-kofi-btn:hover {
  background: #fbbf24;
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(245, 158, 11, .4);
}

[data-theme="light"] .support-kofi-btn {
  background: #d97706;
  color: #ffffff !important;
  box-shadow: 0 3px 12px rgba(217, 119, 6, .25);
}

[data-theme="light"] .support-kofi-btn:hover {
  background: #b45309;
  box-shadow: 0 5px 16px rgba(180, 83, 9, .35);
}

.support-kofi-icon {
  display: flex;
  align-items: center;
}

.support-kofi-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.support-kofi-arrow {
  display: flex;
  align-items: center;
  opacity: .8;
}

.support-kofi-arrow svg {
  width: 11px;
  height: 11px;
}

.support-popover-footer {
  text-align: center;
  padding-top: 2px;
}

.support-feedback-link {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: .74rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  border-radius: var(--radius-sm);
  transition: color var(--duration-fast) var(--ease-out);
}

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

.support-feedback-link:hover span:last-child {
  transform: translateX(3px);
}

.support-feedback-link span:last-child {
  transition: transform var(--duration-fast) var(--ease-out);
}

/* Feedback Cards */
.feedback-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: border-color var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out);
}

.feedback-card:hover {
  border-color: var(--text-muted);
}

/* Form Styles */
.feedback-form {
  display: flex;
  flex-direction: column;
}

.feedback-category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.category-pill {
  cursor: pointer;
  display: inline-flex;
}

.category-pill input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.category-pill .pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: .82rem;
  font-weight: 500;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all var(--duration-fast) var(--ease-out);
  user-select: none;
}

.category-pill:hover .pill-badge {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.category-pill input[type="radio"]:checked+.pill-badge {
  background: rgba(99, 102, 241, .16);
  border-color: rgba(99, 102, 241, .55);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: 0 0 14px rgba(99, 102, 241, .25);
}

[data-theme="light"] .category-pill input[type="radio"]:checked+.pill-badge {
  background: rgba(99, 102, 241, .1);
  border-color: #6366f1;
  color: #4338ca;
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.required-indicator {
  color: #ef4444;
  margin-left: 2px;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.char-count {
  font-size: .75rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.form-input,
.form-textarea {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: .88rem;
  color: var(--text-primary);
  transition: all var(--duration-fast) var(--ease-out);
  outline: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .15);
  background: var(--bg-surface);
}

.form-textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.55;
}

.form-row {
  display: flex;
  gap: var(--space-md);
}

.form-col {
  flex: 1;
}

.input-invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, .2) !important;
}

.field-error-msg {
  font-size: .78rem;
  color: #ef4444;
  margin-top: 5px;
  min-height: 16px;
  line-height: 1.3;
}

/* Form Actions */
.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-top: var(--space-sm);
  padding-top: var(--space-sm);
}

.feedback-submit-btn {
  cursor: pointer;
  min-width: 155px;
  justify-content: center;
}

.feedback-submit-btn .submit-btn-icon svg {
  width: 15px;
  height: 15px;
}

.submit-btn-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, .3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
}

.feedback-submit-btn.loading .submit-btn-spinner {
  display: inline-block;
}

.feedback-submit-btn.loading .submit-btn-icon {
  display: none;
}

.feedback-submit-btn.loading {
  pointer-events: none;
  opacity: .85;
}

.anti-spam-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .75rem;
  color: var(--text-muted);
  user-select: none;
}

.anti-spam-badge svg {
  color: #10b981;
  width: 14px;
  height: 14px;
}

.feedback-status-msg {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: .84rem;
  line-height: 1.45;
  display: none;
}

.feedback-status-msg.status-error {
  display: block;
  background: rgba(239, 68, 68, .1);
  border: 1px solid rgba(239, 68, 68, .3);
  color: #f87171;
}

[data-theme="light"] .feedback-status-msg.status-error {
  color: #dc2626;
  background: #fef2f2;
}

.feedback-status-msg.status-warning {
  display: block;
  background: rgba(245, 158, 11, .1);
  border: 1px solid rgba(245, 158, 11, .3);
  color: #fbbf24;
}

/* Success Card */
.feedback-success-card {
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  animation: fadeUp .35s var(--ease-out) both;
}

.success-icon-wrapper {
  margin-bottom: var(--space-md);
  display: flex;
  justify-content: center;
}

.success-icon-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(16, 185, 129, .35);
  animation: popSuccess .4s var(--ease-spring);
}

.success-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.success-desc {
  font-size: .92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 440px;
  margin: 0 auto var(--space-xl);
}

.success-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Direct email contact inside feedback form */
.feedback-direct-contact {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px dashed var(--border);
  font-size: .84rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.direct-contact-label {
  font-weight: 500;
}

.direct-email-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  word-break: break-all;
  transition: color var(--duration-fast);
}

.direct-email-link:hover {
  color: var(--accent-blue);
  text-decoration: underline;
}

@keyframes popSuccess {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }

  70% {
    transform: scale(1.12);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive adjustments for feedback & support */
@media (max-width: 720px) {
  .feedback-header {
    margin-bottom: var(--space-lg);
  }

  .feedback-heading {
    font-size: 1.55rem;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .feedback-submit-btn {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .support-btn-label {
    display: none;
  }

  .nav-support-btn {
    padding: 0 8px;
    height: 30px;
  }

  .support-popover {
    position: fixed;
    top: 60px;
    left: 16px;
    right: 16px;
    width: auto;
    max-width: none;
    transform: translateY(-8px) scale(0.98);
    transform-origin: top center;
  }

  .support-popover.active {
    transform: translateY(0) scale(1);
  }
}