/* =========================================
   DISCORD PORTFOLIO — TOM
   Theme: Discord Dark + Blurple Premium
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

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

:root {
  --bg-primary:       #313338;
  --bg-secondary:     #2b2d31;
  --bg-tertiary:      #1e1f22;
  --bg-floating:      #111214;
  --bg-message:       #3c3f45;
  --bg-hover:         rgba(255,255,255,0.04);
  --blurple:          #5865f2;
  --blurple-hover:    #4752c4;
  --blurple-glow:     rgba(88,101,242,0.35);
  --blurple-faint:    rgba(88,101,242,0.12);
  --green:            #23a559;
  --green-glow:       rgba(35,165,89,0.3);
  --yellow:           #f0b232;
  --text-normal:      #dbdee1;
  --text-muted:       #80848e;
  --text-subtle:      #4e5058;
  --header-primary:   #f2f3f5;
  --header-secondary: #b5bac1;
  --divider:          rgba(255,255,255,0.06);
  --border:           rgba(255,255,255,0.08);
  --font-main:        'Lexend', sans-serif;
  --font-mono:        'JetBrains Mono', monospace;
  --sidebar-w:        240px;
  --topbar-h:         48px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--bg-tertiary);
  color: var(--text-normal);
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-tertiary); }
::-webkit-scrollbar-thumb { background: var(--bg-secondary); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-subtle); }

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

/* ============ LAYOUT ============ */
.layout { display: flex; min-height: 100vh; }

/* ============ SIDEBAR ============ */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-secondary);
  border-right: 1px solid var(--divider);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0;
  height: 100vh; z-index: 100;
  overflow-y: auto;
}

.sidebar-header {
  border-bottom: 1px solid var(--divider);
}

.server-banner {
  height: 3px;
  background: linear-gradient(90deg, var(--blurple), #9b59b6, var(--blurple));
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.server-name {
  font-size: 15px; font-weight: 700;
  color: var(--header-primary);
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; cursor: pointer;
  transition: background 0.15s;
}
.server-name:hover { background: var(--bg-hover); }
.server-name .chevron { margin-left: auto; color: var(--text-muted); font-size: 12px; }

.sidebar-section { padding: 16px 8px 4px; }

.section-label {
  font-size: 11px; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.8px; padding: 0 8px 6px;
}

.channel-item {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 8px; border-radius: 6px;
  color: var(--text-muted); font-size: 15px; font-weight: 500;
  cursor: pointer; transition: background 0.1s, color 0.1s;
  position: relative; margin-bottom: 2px;
}
.channel-item:hover { background: var(--bg-hover); color: var(--text-normal); }
.channel-item.active { background: rgba(88,101,242,0.18); color: var(--header-primary); }
.channel-item.active::before {
  content: '';
  position: absolute; left: -8px; top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 65%;
  background: var(--blurple);
  border-radius: 0 3px 3px 0;
}
.ch-icon { font-size: 16px; opacity: 0.7; width: 18px; text-align: center; }
.channel-item.active .ch-icon { opacity: 1; }

.ch-badge {
  margin-left: auto; background: var(--blurple);
  color: white; font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 10px;
  font-family: var(--font-mono);
}
.ch-badge.new { background: var(--green); }

/* User panel */
.sidebar-user {
  margin-top: auto; padding: 8px;
  background: var(--bg-floating);
  border-top: 1px solid var(--divider);
  display: flex; align-items: center; gap: 8px;
}

.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blurple), #9b59b6);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: white;
  position: relative; flex-shrink: 0;
}

.status-dot {
  position: absolute; bottom: -1px; right: -1px;
  width: 10px; height: 10px; background: var(--green);
  border-radius: 50%; border: 2px solid var(--bg-floating);
  animation: pulse-dot 2.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,100% { box-shadow: 0 0 0 0 var(--green-glow); }
  50%      { box-shadow: 0 0 0 4px transparent; }
}

.user-info { flex: 1; overflow: hidden; }
.user-name { font-size: 13px; font-weight: 700; color: var(--header-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-tag  { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); }

.icon-btns { display: flex; gap: 2px; }
.icon-btn {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px; color: var(--text-muted);
  cursor: pointer; font-size: 15px;
  transition: background 0.1s, color 0.1s;
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text-normal); }

/* ============ MAIN ============ */
.main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; }

/* ============ TOPBAR ============ */
.topbar {
  height: var(--topbar-h);
  background: var(--bg-primary);
  border-bottom: 1px solid var(--divider);
  display: flex; align-items: center;
  padding: 0 16px; gap: 10px;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 0 rgba(0,0,0,0.25);
}

.topbar-ch {
  display: flex; align-items: center; gap: 6px;
  font-size: 15px; font-weight: 700; color: var(--header-primary);
}
.topbar-ch-icon { font-size: 16px; }
.topbar-sep { width: 1px; height: 20px; background: var(--divider); margin: 0 2px; }
.topbar-desc { font-size: 13px; color: var(--text-muted); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.topbar-action {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px; color: var(--text-muted); font-size: 18px; cursor: pointer;
  transition: background 0.1s, color 0.1s;
}
.topbar-action:hover { background: var(--bg-hover); color: var(--text-normal); }

/* ============ HERO ============ */
.hero {
  min-height: calc(100vh - var(--topbar-h));
  display: flex; align-items: center;
  padding: 80px 60px;
  background: var(--bg-primary);
  position: relative; overflow: hidden;
}

/* Subtle noise texture overlay */
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 0; opacity: 0.4;
}

.hero-bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  /* Fade grid at edges */
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
}

/* Blurple main glow */
.hero-glow {
  position: absolute; top: -180px; right: -120px;
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(88,101,242,0.28) 0%, rgba(88,101,242,0.08) 45%, transparent 70%);
  pointer-events: none;
  animation: glow-pulse 8s ease-in-out infinite;
}

/* Green accent glow */
.hero-glow2 {
  position: absolute; bottom: -100px; left: 10%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(35,165,89,0.12) 0%, transparent 65%);
  pointer-events: none;
  animation: glow-pulse 10s ease-in-out 2s infinite;
}

/* Purple third glow for depth */
.hero-glow3 {
  position: absolute; top: 30%; left: -80px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(155,89,182,0.1) 0%, transparent 65%);
  pointer-events: none;
  animation: glow-pulse 12s ease-in-out 4s infinite;
}

/* Aurora horizontal band */
.hero-aurora {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(88,101,242,0.6) 25%,
    rgba(155,89,182,0.6) 50%,
    rgba(35,165,89,0.4) 75%,
    transparent 100%);
  background-size: 200% 100%;
  animation: aurora-slide 6s linear infinite;
  pointer-events: none;
}

@keyframes aurora-slide {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes glow-pulse {
  0%,100% { transform: scale(1) translate(0, 0); opacity: 0.85; }
  33%     { transform: scale(1.08) translate(-10px, 15px); opacity: 0.6; }
  66%     { transform: scale(0.95) translate(10px, -10px); opacity: 1; }
}

.hero-inner { position: relative; z-index: 1; max-width: 800px; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: 20px; padding: 6px 14px;
  font-size: 13px; color: var(--green); font-weight: 600;
  margin-bottom: 28px;
  animation: fadeUp 0.7s ease both;
}

.badge-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green-glow);
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.25; }
}

.hero-pre {
  font-family: var(--font-mono); font-size: 13px;
  color: var(--blurple); font-weight: 500; letter-spacing: 1px;
  margin-bottom: 10px;
  animation: fadeUp 0.7s ease 0.1s both;
}

.hero h1 {
  font-size: clamp(44px, 6vw, 82px);
  font-weight: 800; line-height: 1.04;
  letter-spacing: -2.5px; color: var(--header-primary);
  margin-bottom: 20px;
  animation: fadeUp 0.7s ease 0.2s both;
}

.gradient-text {
  background: linear-gradient(135deg, var(--blurple) 20%, #9b59b6 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 17px; color: var(--text-muted);
  line-height: 1.65; max-width: 520px; margin-bottom: 36px;
  animation: fadeUp 0.7s ease 0.3s both;
}

.hero-cta {
  display: flex; gap: 12px; flex-wrap: wrap;
  animation: fadeUp 0.7s ease 0.4s both;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: 6px;
  font-size: 14px; font-weight: 700;
  font-family: var(--font-main); cursor: pointer;
  transition: all 0.2s; text-decoration: none;
  border: none; letter-spacing: 0.2px;
}
.btn-primary {
  background: var(--blurple); color: white;
  box-shadow: 0 4px 18px var(--blurple-glow);
}
.btn-primary:hover {
  background: var(--blurple-hover); transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--blurple-glow);
}
.btn-secondary {
  background: var(--bg-secondary); color: var(--text-normal);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--bg-message); color: var(--header-primary);
  transform: translateY(-2px); border-color: rgba(255,255,255,0.14);
}

/* Hero stats */
.hero-stats {
  display: flex; flex-wrap: wrap; gap: 40px;
  margin-top: 56px; padding-top: 40px;
  border-top: 1px solid var(--divider);
  animation: fadeUp 0.7s ease 0.5s both;
}

.stat-val {
  font-size: 30px; font-weight: 800;
  font-family: var(--font-mono); letter-spacing: -1px;
  color: var(--header-primary); line-height: 1;
}
.stat-val.blue   { color: var(--blurple); }
.stat-val.green  { color: var(--green); }
.stat-val.yellow { color: var(--yellow); }

.stat-label {
  font-size: 11px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.8px;
  font-weight: 600; margin-top: 4px; margin-bottom: 8px;
}

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

.tag {
  background: var(--blurple-faint);
  border: 1px solid rgba(88,101,242,0.25);
  color: #9ba4fa; font-size: 11px;
  font-family: var(--font-mono);
  padding: 2px 8px; border-radius: 4px; font-weight: 500;
}
.tag.db { background: rgba(240,178,50,0.1); border-color: rgba(240,178,50,0.25); color: #f0c060; }

/* ============ SECTIONS ============ */
.section {
  padding: 80px 60px;
  border-top: 1px solid var(--divider);
  background: var(--bg-primary);
  position: relative;
}
.section.alt {
  background: var(--bg-secondary);
}

/* Subtle dot pattern on sections */
.section::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
  mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
}

/* Left accent bar on sections */
.section-eyebrow::before {
  content: '';
  display: inline-block;
  width: 3px; height: 12px;
  background: var(--blurple);
  border-radius: 2px;
  margin-right: 8px;
  vertical-align: middle;
  box-shadow: 0 0 8px var(--blurple-glow);
}

.section-eyebrow {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  color: var(--blurple); text-transform: uppercase;
  letter-spacing: 1.5px; margin-bottom: 10px;
}

.section-title {
  font-size: clamp(26px, 3.5vw, 42px);
  font-weight: 800; color: var(--header-primary);
  letter-spacing: -1px; line-height: 1.1;
}

.section-desc {
  margin-top: 12px; font-size: 16px;
  color: var(--text-muted); max-width: 560px; line-height: 1.65;
}

.section-header { margin-bottom: 44px; }

/* ============ ABOUT TABS ============ */
.tabs-bar {
  display: flex; gap: 2px;
  border-bottom: 1px solid var(--divider);
  margin-bottom: 28px; overflow-x: auto;
}

.tab-btn {
  padding: 10px 16px; font-size: 14px; font-weight: 600;
  color: var(--text-muted); cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap; background: none;
  border-top: none; border-left: none; border-right: none;
  font-family: var(--font-main);
  transition: color 0.15s, border-color 0.15s;
}
.tab-btn:hover { color: var(--text-normal); }
.tab-btn.active { color: var(--header-primary); border-bottom-color: var(--blurple); }

.tab-panel { display: none; animation: fadeIn 0.25s ease; }
.tab-panel.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Discord message style */
.msg-group { display: flex; flex-direction: column; gap: 2px; }

.msg {
  display: flex; gap: 16px;
  padding: 8px 12px; border-radius: 8px;
  transition: background 0.1s;
}
.msg:hover { background: var(--bg-hover); }

.msg-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blurple), #9b59b6);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800; color: white;
  flex-shrink: 0; margin-top: 2px;
}

.msg-body { flex: 1; }

.msg-header {
  display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px;
}

.msg-author {
  font-size: 14px; font-weight: 700; color: var(--header-primary);
}
.msg-author.blurple { color: #9ba4fa; }

.msg-time {
  font-size: 11px; color: var(--text-muted);
  font-family: var(--font-mono);
}

.msg-text { font-size: 15px; color: var(--text-normal); line-height: 1.6; }

.msg-embed {
  margin-top: 8px;
  background: var(--bg-secondary);
  border-left: 4px solid var(--blurple);
  border-radius: 0 4px 4px 0; padding: 10px 14px;
  font-size: 14px; color: var(--text-muted); line-height: 1.6;
}

.inline-code {
  font-family: var(--font-mono);
  background: rgba(255,255,255,0.07);
  padding: 1px 5px; border-radius: 3px;
  font-size: 13px; color: #e0c1ff;
}

/* ============ PROJECTS ============ */
.project-filters {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 32px;
}

.filter-btn {
  padding: 6px 14px; border-radius: 6px;
  font-size: 13px; font-weight: 600;
  font-family: var(--font-main);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-muted); cursor: pointer; transition: all 0.15s;
}
.filter-btn:hover { color: var(--text-normal); border-color: rgba(255,255,255,0.14); }
.filter-btn.active {
  background: var(--blurple-faint);
  border-color: rgba(88,101,242,0.4); color: #9ba4fa;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.project-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 20px;
  transition: all 0.2s; cursor: pointer;
  position: relative; overflow: hidden;
}
.project-card:hover {
  border-color: rgba(88,101,242,0.5); transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3), 0 0 0 1px rgba(88,101,242,0.2);
}
.project-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blurple), #9b59b6);
  opacity: 0; transition: opacity 0.2s;
}
.project-card:hover::before { opacity: 1; }

.card-top {
  display: flex; align-items: flex-start;
  justify-content: space-between; margin-bottom: 12px;
}

.card-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--blurple-faint);
  border: 1px solid rgba(88,101,242,0.2);
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}

.card-type {
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px;
  background: var(--bg-primary); border: 1px solid var(--border);
  padding: 3px 8px; border-radius: 4px;
}

.card-title { font-size: 16px; font-weight: 700; color: var(--header-primary); margin-bottom: 8px; }
.card-desc  { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin-bottom: 16px; }

.card-stack { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 16px; }

.stack-tag {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  color: var(--header-secondary); padding: 2px 8px; border-radius: 4px;
}

.card-footer {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--divider); padding-top: 12px;
}

.card-link {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--blurple);
  transition: color 0.15s;
}
.card-link:hover { color: #9ba4fa; }

/* ============ CONTACT ============ */
.contact-wrapper {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 40px; align-items: start;
}

.contact-info h3 { font-size: 20px; font-weight: 700; color: var(--header-primary); margin-bottom: 12px; }
.contact-info p   { font-size: 15px; color: var(--text-muted); line-height: 1.65; margin-bottom: 24px; }

.contact-links { display: flex; flex-direction: column; gap: 10px; }

.contact-link {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 8px;
  background: var(--bg-secondary); border: 1px solid var(--border);
  color: var(--text-normal); font-size: 14px; font-weight: 600;
  transition: all 0.2s;
}
.contact-link:hover {
  border-color: rgba(88,101,242,0.4);
  background: var(--blurple-faint); color: var(--header-primary);
  transform: translateX(4px);
}
.contact-link-icon {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; background: var(--bg-primary);
}
.contact-link-label { font-size: 11px; color: var(--text-muted); font-weight: 400; display: block; }

/* DM Card */
.dm-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden;
}

.dm-card-header {
  padding: 16px; background: var(--bg-primary);
  border-bottom: 1px solid var(--divider);
  display: flex; align-items: center; gap: 12px;
}

.dm-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blurple), #9b59b6);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; color: white;
  position: relative;
}

.dm-info h4   { font-size: 15px; font-weight: 700; color: var(--header-primary); }
.dm-info span { font-size: 12px; color: var(--green); font-weight: 500; }

.dm-messages { padding: 16px; display: flex; flex-direction: column; gap: 12px; }

.dm-msg { display: flex; gap: 10px; }

.dm-msg-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: white; flex-shrink: 0;
}
.dm-msg-avatar.them { background: linear-gradient(135deg, var(--blurple), #9b59b6); }
.dm-msg-avatar.you  { background: var(--bg-message); }

.dm-msg-content { flex: 1; }
.dm-msg-name {
  font-size: 12px; font-weight: 700;
  color: var(--header-secondary); margin-bottom: 3px;
}
.dm-msg-bubble {
  display: inline-block;
  background: var(--bg-primary); border-radius: 8px;
  padding: 8px 12px; font-size: 14px;
  color: var(--text-normal); line-height: 1.5;
}
.dm-msg.you .dm-msg-bubble {
  background: var(--blurple-faint);
  border: 1px solid rgba(88,101,242,0.2);
}

.dm-input-bar {
  padding: 12px 16px; border-top: 1px solid var(--divider);
  display: flex; align-items: center; gap: 10px;
}

.dm-input {
  flex: 1; background: var(--bg-primary);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 14px; font-size: 14px;
  color: var(--text-normal); font-family: var(--font-main);
  outline: none; transition: border-color 0.15s;
}
.dm-input::placeholder { color: var(--text-subtle); }
.dm-input:focus { border-color: rgba(88,101,242,0.5); }

.dm-send {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--blurple); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; cursor: pointer; border: none;
  transition: all 0.2s; flex-shrink: 0;
}
.dm-send:hover { background: var(--blurple-hover); transform: scale(1.05); }

/* ============ JAVA CODE HERO ============ */

.code-file-bar {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-floating);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.code-file-dot {
  width: 12px; height: 12px; border-radius: 50%;
}
.code-file-dot.red    { background: #ff5f56; }
.code-file-dot.yellow { background: #ffbd2e; }
.code-file-dot.green  { background: #27c93f; }

.code-file-name {
  color: var(--header-primary); font-weight: 600; margin-left: 8px;
}

.code-file-lang {
  margin-left: auto;
  background: var(--blurple-faint);
  border: 1px solid rgba(88,101,242,0.25);
  color: #9ba4fa; font-size: 11px;
  padding: 2px 8px; border-radius: 4px;
}

.code-block {
  background: var(--bg-floating);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  padding: 16px 0;
  overflow-x: auto;
  margin-bottom: 12px;
  animation: fadeUp 0.7s ease 0.2s both;
}

.code-lines { display: flex; flex-direction: column; }

.code-line {
  display: flex; align-items: baseline; gap: 0;
  padding: 1px 20px 1px 0;
  font-family: var(--font-mono); font-size: 14px;
  line-height: 1.7; white-space: pre;
  transition: background 0.1s;
}
.code-line:hover { background: rgba(255,255,255,0.03); }

.ln {
  display: inline-block; width: 44px;
  text-align: right; padding-right: 20px;
  color: var(--text-subtle); font-size: 13px;
  user-select: none; flex-shrink: 0;
}

/* Java syntax colors */
.j-comment { color: #6a9955; font-style: italic; }
.j-kw      { color: #569cd6; }
.j-class   { color: #4ec9b0; }
.j-iface   { color: #4ec9b0; font-style: italic; }
.j-type    { color: #4ec9b0; }
.j-pkg     { color: #9cdcfe; }
.j-str     { color: #ce9178; }
.j-num     { color: #b5cea8; }
.j-var     { color: #9cdcfe; }
.j-fn      { color: #dcdcaa; }
.j-punct   { color: #d4d4d4; }
.j-ann     { color: #c586c0; }
.j-const   { color: #b5cea8; }

.cursor-blink {
  color: var(--blurple);
  animation: cursor 1.1s step-end infinite;
}
@keyframes cursor {
  0%,100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* Console block */
.console-block {
  border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden;
  margin-bottom: 8px;
  animation: fadeUp 0.7s ease 0.4s both;
}

.console-bar {
  background: var(--bg-floating);
  border-bottom: 1px solid var(--divider);
  padding: 8px 16px;
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--text-muted);
}

.console-icon { color: var(--green); font-size: 10px; }
.console-title { color: var(--header-secondary); }

.console-body {
  background: #0d0d0d;
  padding: 14px 20px;
  display: flex; flex-direction: column; gap: 4px;
}

.console-line {
  font-family: var(--font-mono); font-size: 13px;
  line-height: 1.6; color: var(--text-muted);
}

.console-prompt { color: var(--green); margin-right: 8px; }
.console-cmd    { color: #9cdcfe; }
.console-out    { color: #d4d4d4; padding-left: 4px; }
.console-highlight { color: #4ec9b0; font-weight: 700; }
.console-success { color: var(--green); padding-left: 4px; margin-top: 2px; }

/* ============ FOOTER ============ */
.footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--divider);
  padding: 24px 60px;
  display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 12px;
}

.footer-brand {
  font-size: 14px; font-weight: 700;
  color: var(--text-muted);
  display: flex; align-items: center; gap: 8px;
}

.footer-copy { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }

.footer-status {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--green); font-family: var(--font-mono);
}
.footer-status::before {
  content: '';
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 6px var(--green-glow);
}

/* ============ ANIMATIONS ============ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .sidebar { display: none; }
  .main    { margin-left: 0; }
  .hero    { padding: 60px 24px; }
  .section { padding: 60px 24px; }
  .footer  { padding: 20px 24px; }
  .contact-wrapper { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; }
}

@media (max-width: 600px) {
  .hero h1           { letter-spacing: -1.5px; }
  .hero-cta          { flex-direction: column; }
  .projects-grid     { grid-template-columns: 1fr; }
}
/* ============ LANG SWITCHER DROPDOWN ============ */
.lang-dropdown {
  position: relative;
  margin-left: 8px;
}

.lang-switcher {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-normal);
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
  letter-spacing: 0.5px;
}
.lang-switcher:hover {
  background: var(--blurple-faint);
  border-color: rgba(88,101,242,0.4);
  color: var(--header-primary);
}

.lang-chevron {
  font-size: 10px;
  color: var(--text-muted);
  transition: transform 0.2s;
  line-height: 1;
}

.lang-label { color: #9ba4fa; }

.lang-menu {
  display: none;
  position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--bg-floating);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  min-width: 140px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 200;
  animation: fadeIn 0.15s ease;
}
.lang-menu.open { display: block; }

.lang-option {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  font-size: 14px; font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}
.lang-option:hover { background: var(--bg-hover); color: var(--header-primary); }
.lang-option.active { color: var(--header-primary); }
.lang-option + .lang-option { border-top: 1px solid var(--divider); }

.lang-check {
  margin-left: auto;
  color: var(--blurple);
  font-size: 12px; font-weight: 700;
}

.lang-flag-img {
  width: 20px; height: 14px;
  border-radius: 3px;
  object-fit: cover;
  display: block; flex-shrink: 0;
}


/* ============ SERVICES ============ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.service-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 20px;
  display: flex; gap: 16px; align-items: flex-start;
  transition: all 0.2s; position: relative; overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blurple), #9b59b6);
  opacity: 0; transition: opacity 0.2s;
}
.service-card:hover {
  border-color: rgba(88,101,242,0.45);
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.3);
}
.service-card:hover::before { opacity: 1; }

.service-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 10px;
  background: var(--blurple-faint);
  border: 1px solid rgba(88,101,242,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin-top: 2px;
}

.service-body { flex: 1; }

.service-title {
  font-size: 15px; font-weight: 700;
  color: var(--header-primary); margin-bottom: 8px;
}

.service-desc {
  font-size: 13px; color: var(--text-muted);
  line-height: 1.65; margin-bottom: 14px;
}

.service-tags { display: flex; flex-wrap: wrap; gap: 5px; }
/* ============ MOBILE NAV (hamburger) ============ */
.mobile-nav-toggle {
  display: none;
  position: fixed; top: 10px; left: 10px; z-index: 300;
  width: 38px; height: 38px; border-radius: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  align-items: center; justify-content: center;
  font-size: 18px; cursor: pointer; color: var(--text-normal);
  transition: all 0.2s;
}
.mobile-nav-toggle:hover { background: var(--blurple-faint); color: var(--header-primary); }

.sidebar-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 99;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(2px);
}
.sidebar-overlay.visible { display: block; }

/* Service card — new project-card style */
.service-card {
  flex-direction: column;
  gap: 0;
}
.service-card .card-top {
  display: flex; align-items: flex-start;
  justify-content: space-between; margin-bottom: 12px;
}
.service-card .card-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--blurple-faint);
  border: 1px solid rgba(88,101,242,0.2);
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.service-card .service-title { font-size: 16px; font-weight: 700; color: var(--header-primary); margin-bottom: 8px; }
.service-card .service-desc  { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin-bottom: 16px; }
.service-card .service-tags  { display: flex; flex-wrap: wrap; gap: 5px; }

/* ============ IMPROVED RESPONSIVE ============ */
@media (max-width: 900px) {
  .mobile-nav-toggle { display: flex; }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 200;
    display: flex;
  }
  .sidebar.open { transform: translateX(0); }

  .topbar { padding-left: 56px; }

  .hero { padding: 50px 20px; min-height: auto; }
  .section { padding: 50px 20px; }
  .footer  { padding: 20px; }

  .contact-wrapper { grid-template-columns: 1fr; }
  .hero-stats { gap: 20px; }
  .services-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

  .topbar-sep,
  .topbar-desc { display: none; }

  .topbar-actions { gap: 2px; }
  .topbar-action  { width: 28px; height: 28px; font-size: 15px; }
}

@media (max-width: 600px) {
  .hero h1           { letter-spacing: -1.5px; }
  .hero-cta          { flex-direction: column; }
  .projects-grid     { grid-template-columns: 1fr; }
  .services-grid     { grid-template-columns: 1fr; }
  .project-filters   { gap: 5px; }
  .filter-btn        { padding: 5px 10px; font-size: 12px; }
  .code-block        { overflow-x: auto; }
  .code-line         { font-size: 12px; }
  .hero-stats        { flex-direction: column; gap: 16px; }
  .section-title     { letter-spacing: -0.5px; }
  .tabs-bar          { gap: 0; }
  .tab-btn           { padding: 8px 12px; font-size: 13px; }
}

@media (max-width: 400px) {
  .hero  { padding: 40px 16px; }
  .section { padding: 40px 16px; }
  .hero h1 { font-size: 36px; }
}
