﻿/* ============================================================
   FEATURES — Modal · Terminal · Shortcuts · Stats · Now · Proficiency
   ============================================================ */

/* ── GitHub Stats Bar ── */
.github-stats-bar {
  background: var(--light);
  border-bottom: 1px solid var(--border);
  padding: .85rem 0;
}
.github-stats-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 0;
  justify-content: center;
  flex-wrap: wrap;
}
.github-stat-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .8rem;
  color: var(--text-muted);
  padding: .25rem 1.5rem;
}
.github-stat-item svg {
  width: 15px; height: 15px;
  color: var(--violet);
  flex-shrink: 0;
}
.github-stat-item strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
}
.github-stat-item span {
  display: block;
  font-size: .7rem;
  color: var(--text-muted);
  letter-spacing: .05em;
}
.github-stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
  flex-shrink: 0;
}

[data-theme="dark"] .github-stats-bar {
  background: #130926;
  border-color: rgba(244,114,182,.08);
}
[data-theme="dark"] .github-stat-divider { background: rgba(244,114,182,.1); }
[data-theme="dark"] .github-stat-item strong { color: #f3e8ff; }

@media (max-width: 640px) {
  .github-stat-item { padding: .25rem .9rem; }
  .github-stat-divider { display: none; }
}
@media (max-width: 400px) {
  .github-stat-item:nth-child(4), .github-stat-item:nth-child(5) { display: none; }
}

/* ── "Now" Card ── */
.now-card {
  margin-top: 3rem;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem 2rem;
  box-shadow: 4px 4px 0 0 rgba(0,0,0,.06);
  position: relative;
  overflow: hidden;
}
.now-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--violet), var(--violet-glow), #60a5fa);
}
.now-label {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--violet);
  margin-bottom: 1.25rem;
}
.now-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 6px rgba(74,222,128,.8);
  animation: dot-pulse 2s step-end infinite;
  flex-shrink: 0;
}
@keyframes dot-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}
.now-items {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.now-item {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  flex: 1;
  min-width: 200px;
}
.now-emoji { font-size: 1.3rem; line-height: 1.2; flex-shrink: 0; }
.now-item strong {
  display: block;
  font-size: .75rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .2rem;
}
.now-item span {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

[data-theme="dark"] .now-card {
  background: #1c0840;
  border-color: rgba(244,114,182,.15);
  box-shadow: 4px 4px 0 0 rgba(0,0,0,.4);
}
[data-theme="dark"] .now-item strong { color: #f3e8ff; }
[data-theme="dark"] .now-item span { color: rgba(255,255,255,.5); }

@media (max-width: 768px) {
  .now-card { padding: 1.25rem 1.5rem; }
  .now-items { gap: 1rem; }
  .now-item { min-width: 160px; }
}

/* ── Skill Proficiency Bars ── */
.skills-proficiency {
  margin-top: 2.5rem;
}
.prof-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .9rem 2.5rem;
  margin-top: 1.25rem;
}
.prof-bar-item {}
.prof-bar-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .4rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text);
}
.prof-pct {
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem;
  color: var(--text-muted);
  font-weight: 400;
}
.prof-bar-track {
  height: 6px;
  background: var(--light-2);
  border-radius: 0;
  overflow: hidden;
  border: 1px solid var(--border);
}
.prof-bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--violet), var(--violet-glow));
  border-radius: 0;
  transition: width 1.2s cubic-bezier(.4, 0, .2, 1);
}
.prof-bar-fill.animated { width: var(--pct); }

/* Color variants per language */
.prof-bar-fill.rust  { background: linear-gradient(90deg, #f472b6, #fb923c); }
.prof-bar-fill.go    { background: linear-gradient(90deg, #34d399, #06b6d4); }
.prof-bar-fill.js    { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.prof-bar-fill.ts    { background: linear-gradient(90deg, #60a5fa, #3b82f6); }
.prof-bar-fill.py    { background: linear-gradient(90deg, #a78bfa, #8b5cf6); }
.prof-bar-fill.c     { background: linear-gradient(90deg, #94a3b8, #64748b); }

[data-theme="dark"] .prof-bar-label { color: #f3e8ff; }
[data-theme="dark"] .prof-bar-track { background: rgba(244,114,182,.08); border-color: rgba(244,114,182,.12); }
[data-theme="dark"] .prof-pct { color: rgba(255,255,255,.35); }

@media (max-width: 640px) {
  .prof-grid { grid-template-columns: 1fr; gap: .75rem; }
}

/* ── Project Detail Modal ── */
#project-modal {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s ease;
}
#project-modal.open {
  pointer-events: all;
  opacity: 1;
}
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal-panel {
  position: relative;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  max-width: 520px; width: 100%;
  box-shadow: 0 24px 64px rgba(0,0,0,.2), 8px 8px 0 0 rgba(244,114,182,.15);
  transform: translateY(20px) scale(.97);
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1);
  max-height: 90vh;
  overflow-y: auto;
}
#project-modal.open .modal-panel {
  transform: translateY(0) scale(1);
}
.modal-close {
  position: absolute; top: 1rem; right: 1rem;
  width: 32px; height: 32px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  background: var(--light); border: 1px solid var(--border);
  cursor: pointer; transition: all .15s;
  color: var(--text-muted);
}
.modal-close svg { width: 14px; height: 14px; }
.modal-close:hover { background: rgba(244,114,182,.1); border-color: rgba(244,114,182,.4); color: var(--violet); }
.modal-header { margin-bottom: 1.25rem; padding-right: 2rem; }
.modal-lang { margin-bottom: .6rem; }
.modal-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.4rem; font-weight: 800;
  color: var(--text); margin-bottom: .6rem;
  letter-spacing: -.02em;
}
.modal-desc {
  font-size: .875rem; color: var(--text-muted); line-height: 1.7;
}
.modal-body { margin-bottom: 1.5rem; }
.modal-topics {
  display: flex; flex-wrap: wrap; gap: .35rem;
  margin-bottom: 1rem;
}
.modal-meta {
  display: flex; gap: 1rem; flex-wrap: wrap;
  font-size: .75rem; color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}
.modal-meta span {
  display: inline-flex; align-items: center; gap: .3rem;
}
.modal-footer { display: flex; gap: .75rem; flex-wrap: wrap; }
.modal-footer .btn { font-size: .8rem; padding: .5rem 1.1rem; }

body.modal-open { overflow: hidden; }

[data-theme="dark"] .modal-panel {
  background: #1c0840;
  border-color: rgba(244,114,182,.2);
  box-shadow: 0 24px 64px rgba(0,0,0,.5), 8px 8px 0 0 rgba(244,114,182,.2);
}
[data-theme="dark"] .modal-title { color: #f3e8ff; }
[data-theme="dark"] .modal-desc { color: rgba(255,255,255,.6); }
[data-theme="dark"] .modal-close { background: rgba(244,114,182,.08); border-color: rgba(244,114,182,.15); }
[data-theme="dark"] .modal-meta { color: rgba(255,255,255,.35); }


kbd {
  font-family: 'JetBrains Mono', monospace;
  font-size: .68rem;
  background: var(--light-2);
  border: 1px solid var(--border);
  border-bottom: 2px solid var(--border);
  border-radius: 4px;
  padding: .15rem .45rem;
  color: var(--text);
  white-space: nowrap;
  min-width: 28px;
  text-align: center;
}
[data-theme="dark"] kbd { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); color: rgba(255,255,255,.7); }

/* ── Project card click hint ── */
.project-card::after {
  content: '';
  position: absolute;
  top: .75rem; right: .75rem;
  width: 18px; height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(180,180,180,.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='8' x2='12' y2='12'/%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
}
.project-card:hover::after { opacity: 1; }

/* ── Print / PDF Stylesheet ── */
@media print {
  /* Hide interactive elements */
  #loader, #cursor-dot, #cursor-ring, #scroll-progress,
  #back-to-top,
  #navbar, .hamburger, .mobile-menu,
  .hero-grain, .hero-orb, .hero-mesh, .hero-float-badges,
  .hero-scroll, .contact-orb, .github-stats-bar,
  #projectSearch, .search-bar, .filter-bar, .projects-toolbar,
  .form-row, .contact-form, form,
  .footer-socials, .footer-nav { display: none !important; }

  /* Reset backgrounds and shadows */
  *, *::before, *::after {
    background: white !important;
    color: #111 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    animation: none !important;
    transition: none !important;
  }

  body { font-size: 11pt; line-height: 1.5; }
  section { padding: 1.5rem 0 !important; break-inside: avoid; }
  .container { max-width: 100%; padding: 0 1cm; }

  /* Nav becomes just a header line */
  #navbar {
    display: block !important;
    position: static !important;
    border-bottom: 1px solid #ddd;
    padding: .5rem 1cm;
    background: white !important;
  }
  .nav-inner { justify-content: space-between; }
  .nav-logo { color: #111 !important; font-size: 1rem; }
  .nav-links { display: flex !important; gap: 1rem; }
  .nav-links a { color: #444 !important; font-size: 10pt; }
  .nav-actions { display: none !important; }

  /* Hero */
  .hero-inner { grid-template-columns: 1fr; padding: 1rem 0 !important; }
  .hero-name { font-size: 2rem !important; color: #111 !important; }
  .hero-right { display: none !important; }
  .hero-available, .hero-cta { display: none !important; }

  /* Section titles */
  .section-title { font-size: 1.3rem !important; border-bottom: 1px solid #ddd; padding-bottom: .3rem; }
  .section-eyebrow, .section-num { font-size: 9pt !important; }

  /* Skills */
  .skill-tag { border: 1px solid #ddd !important; }
  .marquee-wrap { display: none !important; }

  /* Projects */
  .projects-grid { display: block !important; }
  .project-card {
    border: 1px solid #ddd !important;
    margin-bottom: .5rem !important;
    padding: .75rem !important;
    break-inside: avoid;
  }

  /* Timeline */
  .timeline-item { break-inside: avoid; }

  /* Footer */
  footer { border-top: 1px solid #ddd; padding: .5rem 1cm; }
  .footer-tagline, .footer-copy { color: #666 !important; font-size: 9pt; }

  /* Links */
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #666;
  }
  a[href^="#"]::after, a[href^="mailto:"]::after { content: ""; }

  /* Page breaks */
  #about, #skills, #experience, #projects { page-break-before: auto; }
}

/* ── Hire Me Emergency Button ── */
#hire-me-btn {
  position: fixed;
  bottom: 1.5rem; left: 1.5rem;
  display: flex; align-items: center; gap: .5rem;
  padding: .6rem 1.1rem;
  background: #dc2626;
  color: #fff;
  border: none; border-radius: 6px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: .8rem; font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer; z-index: 8997;
  box-shadow: 3px 3px 0 rgba(0,0,0,.3), 0 0 20px rgba(220,38,38,.3);
  transition: transform .15s, box-shadow .15s;
}
#hire-me-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 rgba(0,0,0,.3), 0 0 30px rgba(220,38,38,.4);
}
.hire-pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: #fff;
  animation: hire-blink 1s step-end infinite;
  flex-shrink: 0;
}
@keyframes hire-blink { 0%,100%{opacity:1} 50%{opacity:.3} }
.hire-label { white-space: nowrap; }
.hire-mobile-icon { display: none; font-size: 1.1rem; line-height: 1; }

@media (max-width: 480px) {
  #hire-me-btn { bottom: 1rem; left: 1rem; padding: .5rem .85rem; font-size: .75rem; }
}

/* ── Hire Me Modal ── */
#hire-me-modal {
  position: fixed; inset: 0; z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  pointer-events: none; opacity: 0;
  transition: opacity .25s ease;
}
#hire-me-modal.open { pointer-events: all; opacity: 1; }
.hire-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.hire-panel {
  position: relative;
  background: var(--white);
  border: 2px solid rgba(220,38,38,.3);
  border-radius: 14px;
  padding: 2rem 2rem 1.75rem;
  max-width: 480px; width: 100%;
  box-shadow: 0 30px 80px rgba(0,0,0,.25), 8px 8px 0 rgba(220,38,38,.2);
  transform: translateY(24px) scale(.96);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
#hire-me-modal.open .hire-panel { transform: none; }
.hire-alarm-wrap {
  position: relative;
  width: 64px; height: 64px; margin: 0 auto 1.5rem;
  display: flex; align-items: center; justify-content: center;
}
.hire-alarm-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid rgba(220,38,38,.4);
  animation: hire-ring 1.5s ease-in-out infinite;
}
@keyframes hire-ring {
  0%,100% { transform: scale(1); opacity: .6; }
  50% { transform: scale(1.3); opacity: 0; }
}
.hire-alarm-emoji { font-size: 2.2rem; line-height: 1; }
.hire-close {
  position: absolute; top: 1rem; right: 1rem;
  width: 30px; height: 30px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  background: var(--light); border: 1px solid var(--border);
  cursor: pointer; color: var(--text-muted); transition: all .15s;
}
.hire-close svg { width: 13px; height: 13px; }
.hire-close:hover { background: rgba(220,38,38,.08); border-color: rgba(220,38,38,.3); color: #dc2626; }
.hire-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.4rem; font-weight: 800;
  color: var(--text); text-align: center;
  margin-bottom: .5rem; letter-spacing: -.02em;
}
.hire-tagline {
  text-align: center; font-size: .875rem;
  color: var(--text-muted); line-height: 1.6;
  margin-bottom: 1.5rem;
}
.hire-highlights { display: flex; flex-direction: column; gap: .9rem; margin-bottom: 1.5rem; }
.hire-hi {
  display: flex; align-items: flex-start; gap: .8rem;
  padding: .75rem; border-radius: 8px;
  background: var(--light); border: 1px solid var(--border);
}
.hire-hi-icon { font-size: 1.3rem; line-height: 1.1; flex-shrink: 0; }
.hire-hi strong { display: block; font-size: .82rem; font-weight: 700; color: var(--text); margin-bottom: .2rem; }
.hire-hi p { font-size: .78rem; color: var(--text-muted); line-height: 1.5; margin: 0; }
.hire-avail {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  font-size: .75rem; font-weight: 600;
  color: #059669; margin-bottom: 1.25rem;
  font-family: 'JetBrains Mono', monospace;
}
.hire-actions { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; }
.hire-actions .btn { font-size: .78rem; padding: .5rem 1rem; }

[data-theme="dark"] .hire-panel {
  background: #1c0840;
  border-color: rgba(220,38,38,.25);
  box-shadow: 0 30px 80px rgba(0,0,0,.5), 8px 8px 0 rgba(220,38,38,.2);
}
[data-theme="dark"] .hire-title { color: #f3e8ff; }
[data-theme="dark"] .hire-hi { background: rgba(220,38,38,.05); border-color: rgba(220,38,38,.1); }
[data-theme="dark"] .hire-hi strong { color: #f3e8ff; }
[data-theme="dark"] .hire-close { background: rgba(244,114,182,.08); border-color: rgba(244,114,182,.15); }

/* ── GitHub Contribution Graph ── */
.contribution-section {
  margin-top: 3rem;
}
.contribution-section .skill-cat-title { margin-bottom: 1rem; }
#contribution-graph {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  box-shadow: 4px 4px 0 rgba(0,0,0,.06);
}
.cg-meta {
  display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap;
  gap: .5rem; margin-bottom: .875rem;
}
.cg-total {
  font-size: .75rem; color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}
.cg-legend {
  display: flex; align-items: center; gap: .3rem;
  font-size: .68rem; color: var(--text-dim);
}
.cg-legend .cg-cell { width: 10px; height: 10px; }
.cg-scroll { overflow-x: auto; padding-bottom: .25rem; }
.cg-months-row {
  display: grid;
  margin-bottom: .3rem;
  min-width: max-content;
}
.cg-month {
  font-size: .62rem; color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}
.cg-grid {
  display: flex; gap: 2px;
  min-width: max-content;
}
.cg-week { display: flex; flex-direction: column; gap: 2px; }
.cg-cell {
  width: 11px; height: 11px;
  border-radius: 2px;
  transition: opacity .2s;
}
.cg-cell:hover { opacity: .8; }
.cg-empty { background: transparent !important; }
.cg-loading {
  font-size: .78rem; color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  padding: 1rem 0;
}
.cg-fallback img { filter: none; }

[data-theme="dark"] #contribution-graph {
  background: #1c0840;
  border-color: rgba(244,114,182,.12);
  box-shadow: 4px 4px 0 rgba(0,0,0,.35);
}
[data-theme="dark"] .cg-total { color: rgba(255,255,255,.35); }
[data-theme="dark"] .cg-month { color: rgba(255,255,255,.2); }
[data-theme="dark"] .cg-legend { color: rgba(255,255,255,.2); }

/* ── Command Palette ── */
#cmd-palette {
  position: fixed; inset: 0; z-index: 99998;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 12vh;
  pointer-events: none; opacity: 0;
  transition: opacity .18s ease;
}
#cmd-palette.open { pointer-events: all; opacity: 1; }
.cmd-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.cmd-box {
  position: relative;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  width: 580px; max-width: calc(100vw - 2rem);
  box-shadow: 0 24px 60px rgba(0,0,0,.2), 0 0 0 1px rgba(0,0,0,.05);
  transform: scale(.96) translateY(-8px);
  transition: transform .2s cubic-bezier(.34,1.56,.64,1);
  overflow: hidden;
}
#cmd-palette.open .cmd-box { transform: scale(1) translateY(0); }
.cmd-input-wrap {
  display: flex; align-items: center; gap: .75rem;
  padding: .875rem 1rem;
  border-bottom: 1px solid var(--border);
}
.cmd-icon { width: 16px; height: 16px; color: var(--text-dim); flex-shrink: 0; }
.cmd-input {
  flex: 1; border: none; background: transparent; outline: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: .9rem; color: var(--text);
}
.cmd-input::placeholder { color: var(--text-dim); }
.cmd-esc {
  font-family: 'JetBrains Mono', monospace;
  font-size: .65rem;
  background: var(--light-2); border: 1px solid var(--border);
  border-bottom: 2px solid var(--border);
  border-radius: 4px; padding: .1rem .4rem;
  color: var(--text-muted);
}
.cmd-results {
  max-height: 360px; overflow-y: auto;
  padding: .375rem 0;
  scrollbar-width: thin;
}
.cmd-group-label {
  padding: .4rem 1rem .2rem;
  font-size: .62rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--text-dim);
}
.cmd-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .5rem 1rem; cursor: pointer;
  transition: background .1s;
}
.cmd-item:hover, .cmd-item.active {
  background: var(--violet-soft);
}
.cmd-item-icon { font-size: .95rem; width: 20px; text-align: center; flex-shrink: 0; }
.cmd-item-body { flex: 1; min-width: 0; }
.cmd-item-label { display: block; font-size: .845rem; font-weight: 500; color: var(--text); }
.cmd-item-desc {
  display: block; font-size: .72rem; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: .1rem;
}
.cmd-empty {
  padding: 1.25rem 1rem;
  text-align: center; font-size: .82rem; color: var(--text-dim);
}
.cmd-footer {
  display: flex; gap: 1rem; padding: .5rem 1rem;
  border-top: 1px solid var(--border);
  font-size: .68rem; color: var(--text-dim);
}
.cmd-footer kbd {
  font-size: .65rem; padding: .08rem .3rem;
  background: var(--light-2); border: 1px solid var(--border);
  border-bottom: 2px solid var(--border); border-radius: 3px;
  color: var(--text-muted);
}

[data-theme="dark"] .cmd-box {
  background: #1c0840;
  border-color: rgba(244,114,182,.2);
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
}
[data-theme="dark"] .cmd-input { color: #f3e8ff; }
[data-theme="dark"] .cmd-input-wrap, [data-theme="dark"] .cmd-footer { border-color: rgba(244,114,182,.1); }
[data-theme="dark"] .cmd-item:hover, [data-theme="dark"] .cmd-item.active { background: rgba(244,114,182,.08); }
[data-theme="dark"] .cmd-item-label { color: #f3e8ff; }
[data-theme="dark"] .cmd-item-desc { color: rgba(255,255,255,.4); }
[data-theme="dark"] .cmd-group-label { color: rgba(255,255,255,.2); }
[data-theme="dark"] .cmd-esc { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.1); color: rgba(255,255,255,.4); }
[data-theme="dark"] .cmd-footer kbd { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.1); color: rgba(255,255,255,.35); }


/* ── Bahrain Clock ── */
.bahrain-clock-wrap {
  display: flex; align-items: center; gap: .4rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem; color: var(--text-dim);
}
.clock-flag { font-size: .9rem; }
.clock-label { color: var(--text-dim); }
.clock-sep { color: var(--border); margin: 0 .1rem; }
#bahrain-clock {
  color: var(--violet);
  font-weight: 500;
  letter-spacing: .05em;
  min-width: 5.5ch;
  display: inline-block;
}
[data-theme="dark"] .bahrain-clock-wrap { color: rgba(255,255,255,.25); }
[data-theme="dark"] #bahrain-clock { color: rgba(244,114,182,.7); }

/* ── Ctrl+K hint in nav (optional) ── */
.nav-cmd-hint {
  display: inline-flex; align-items: center; gap: .3rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: .62rem; color: rgba(255,255,255,.3);
  padding: .25rem .55rem; border-radius: 4px;
  border: 1px solid rgba(255,255,255,.1);
  cursor: pointer; transition: all .2s;
  white-space: nowrap;
}
.nav-cmd-hint:hover { color: rgba(255,255,255,.6); border-color: rgba(255,255,255,.25); }
.nav-cmd-hint kbd { font-size: .58rem; }
#navbar.light-nav .nav-cmd-hint {
  color: var(--text-muted);
  border-color: var(--border);
  background: rgba(0,0,0,.04);
}
#navbar.light-nav .nav-cmd-hint:hover {
  color: var(--violet);
  border-color: rgba(244,114,182,.4);
  background: rgba(244,114,182,.06);
}
@media (max-width: 900px) { .nav-cmd-hint { display: none; } }

/* ============================================================
   RESPONSIVE — ALL DEVICES
   ============================================================ */

/* ── Fix floating button overlap (desktop) ──
   Layout from right: back-to-top → shortcuts-hint → terminal-toggle
   back-to-top stays at right:1.5rem (from base.css)
   We shift the others left so nothing overlaps
─────────────────────────────────────────────────────────────── */
#back-to-top       { bottom: 1.5rem; right: 1.5rem; }
.shortcuts-hint    { bottom: 1.5rem; right: 4.75rem; }
#terminal-toggle   { bottom: 1.5rem; right: 8rem; }
#terminal-widget   { bottom: 4.75rem; right: 1.5rem; }
#hire-me-btn       { bottom: 1.5rem; left: 1.5rem; }

/* Safe area for notched phones (iPhone X+) */
@supports (padding: env(safe-area-inset-bottom)) {
  #back-to-top, .shortcuts-hint, #terminal-toggle, #hire-me-btn {
    bottom: calc(1.5rem + env(safe-area-inset-bottom));
  }
  #terminal-widget {
    bottom: calc(4.75rem + env(safe-area-inset-bottom));
  }
}

/* ── Tablet (≤1024px) ── */
@media (max-width: 1024px) {
  .now-items { gap: 1rem; }
  .prof-grid { gap: .75rem 1.5rem; }
}

/* ── Large phones (≤768px) ── */
@media (max-width: 768px) {
  /* Project modal — bottom sheet */
  #project-modal {
    padding: 0;
    align-items: flex-end;
  }
  .modal-panel {
    max-width: 100%;
    width: 100%;
    border-radius: 16px 16px 0 0;
    max-height: 88vh;
    padding: 1.5rem 1.25rem;
  }
  .modal-close { top: .875rem; right: .875rem; }

  /* Hire me modal — bottom sheet */
  #hire-me-modal {
    padding: 0;
    align-items: flex-end;
  }
  .hire-panel {
    max-width: 100%;
    width: 100%;
    border-radius: 16px 16px 0 0;
    padding: 1.5rem 1.25rem 2rem;
    max-height: 92vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .hire-alarm-wrap { margin-bottom: 1rem; }

  /* Command palette — bottom sheet on mobile */
  #cmd-palette {
    padding-top: 0;
    align-items: flex-end;
  }
  .cmd-box {
    width: 100%;
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
  }
  .cmd-results { flex: 1; }

  /* Terminal widget */
  #terminal-widget {
    width: calc(100vw - 2rem);
    right: 1rem; left: 1rem;
    bottom: 4.75rem;
  }

  /* Shortcuts panel */
  #shortcuts-panel { padding: 0 0 env(safe-area-inset-bottom, 0); }
  .shortcuts-box {
    width: 100%;
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    position: absolute;
    bottom: 0;
  }
  #shortcuts-panel {
    align-items: flex-end;
    padding: 0;
  }

  /* Now card — stack vertically */
  .now-items { flex-direction: column; gap: .75rem; }
  .now-item { min-width: unset; }

  /* GitHub stats bar — 2-column grid on tablet */
  .github-stats-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 0 1rem;
  }
  .github-stat-divider { display: none; }
  .github-stat-item {
    padding: .5rem 1rem;
    border-bottom: 1px solid var(--border);
  }
  .github-stat-item:nth-child(odd) { border-right: 1px solid var(--border); }
  .github-stat-item:nth-child(3), .github-stat-item:nth-child(4) { border-bottom: none; }
  [data-theme="dark"] .github-stat-item { border-color: rgba(244,114,182,.08); }

  /* Hire me button label — hide text on mobile, show icon only */
  .hire-label { display: none; }
  .hire-mobile-icon { display: inline; }
  #hire-me-btn {
    width: 44px; height: 44px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
  }
  .hire-pulse { display: none; }

  /* Proficiency section */
  .prof-grid { grid-template-columns: 1fr; }

  /* Contribution graph */
  #contribution-graph { padding: 1rem; }
  .cg-meta { flex-direction: column; align-items: flex-start; gap: .4rem; }
}

/* ── Small phones (≤480px) ── */
@media (max-width: 480px) {
  /* Buttons cluster */
  #back-to-top     { bottom: 1rem; right: 1rem; width: 40px; height: 40px; }
  .shortcuts-hint  { bottom: 1rem; right: 4rem; width: 36px; height: 36px; font-size: .75rem; }
  #terminal-toggle { bottom: 1rem; right: 6.75rem; width: 36px; height: 36px; }
  #terminal-widget { bottom: 4.25rem; right: .75rem; left: .75rem; width: auto; }
  #hire-me-btn     { bottom: 1rem; left: 1rem; }

  /* Modal close button bigger touch target */
  .modal-close, .hire-close { width: 36px; height: 36px; }

  /* Hire me actions stack */
  .hire-actions { flex-direction: column; }
  .hire-actions .btn { width: 100%; justify-content: center; }

  /* Modal footer stack */
  .modal-footer { flex-direction: column; }
  .modal-footer .btn { width: 100%; justify-content: center; }

  /* Command palette */
  .cmd-input-wrap { padding: .75rem; }
  .cmd-item { padding: .5rem .75rem; }
  .cmd-footer { display: none; }

  /* Stats bar single column */
  .github-stats-inner {
    grid-template-columns: 1fr 1fr;
  }

  /* Shortcuts panel */
  .shortcut-item { font-size: .75rem; }
  kbd { font-size: .62rem; }
}

/* ── Touch device tweaks ── */
@media (hover: none) and (pointer: coarse) {
  /* Larger tap targets */
  .filter-btn { padding: .45rem .85rem; min-height: 40px; }
  .project-link { padding: .45rem .85rem; min-height: 40px; display: inline-flex; align-items: center; }
  .contact-card { padding: 1rem; }
  .about-link { padding: .6rem 1rem; }

  /* Remove hover-only effects that look broken on touch */
  .project-card::after { display: none; }
  .service-card:hover { transform: none; }

  /* Cursor ring hidden on touch (already done in premium.css but double-check) */
  #cursor-ring, #cursor-dot { display: none !important; }

  /* Terminal toggle and shortcuts hint — keep always visible */
  .shortcuts-hint, #terminal-toggle { opacity: 1; }
}

/* ── Landscape phone ── */
@media (max-width: 768px) and (orientation: landscape) {
  .hire-panel { max-height: 95vh; padding: 1rem 1.5rem; }
  .hire-alarm-wrap { display: none; }
  .modal-panel { max-height: 95vh; }
  #terminal-widget { max-height: 55vh; }
  .term-output { max-height: 140px; }
}
