/* ==========================================================================
   Hardexploit Master Portfolio — Authentic Matte-Dark Cyber Design System
   ========================================================================== */

:root {
  --bg: #0a0d12;
  --bg-subtle: #0f141c;
  --surface: #141a24;
  --surface-hover: #1b2331;
  --border: #222c3d;
  --border-focus: #3b82f6;

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;

  --accent-cyan: #38bdf8;
  --accent-cyan-subtle: rgba(56, 189, 248, 0.12);
  --accent-emerald: #34d399;
  --accent-emerald-subtle: rgba(52, 211, 153, 0.12);
  --accent-amber: #fbbf24;
  --accent-amber-subtle: rgba(251, 191, 36, 0.12);
  --accent-red: #f87171;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

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

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

body {
  background-color: var(--bg);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ==========================================================================
   Typography & Utilities
   ========================================================================== */

h1, h2, h3, h4 {
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.25;
}

p {
  color: var(--text-muted);
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: #7dd3fc;
}

.text-gradient {
  background: linear-gradient(135deg, #38bdf8 0%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.mono {
  font-family: var(--font-mono);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.925rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.825rem;
}

.btn-primary {
  background: #2563eb;
  color: #ffffff;
  border-color: #3b82f6;
}

.btn-primary:hover {
  background: #1d4ed8;
  color: #ffffff;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-main);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: #475569;
  color: var(--text-main);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: var(--surface);
  color: var(--text-main);
}

/* ==========================================================================
   Tags & Badges
   ========================================================================== */

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.tag-success {
  background: var(--accent-emerald-subtle);
  color: var(--accent-emerald);
  border-color: rgba(52, 211, 153, 0.3);
}

.tag-cyan {
  background: var(--accent-cyan-subtle);
  color: var(--accent-cyan);
  border-color: rgba(56, 189, 248, 0.3);
}

.tag-amber {
  background: var(--accent-amber-subtle);
  color: var(--accent-amber);
  border-color: rgba(251, 191, 36, 0.3);
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 13, 18, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  color: var(--text-main);
}

.brand-badge {
  background: #1e293b;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.brand-text {
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a:not(.btn) {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-links a:not(.btn):hover {
  color: var(--text-main);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-main);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
  padding: 5rem 0 3.5rem;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(circle at top center, rgba(56, 189, 248, 0.05) 0%, transparent 60%);
}

.hero-container {
  max-width: 900px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.825rem;
  color: var(--accent-emerald);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.hero-title {
  font-size: 3rem;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 760px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  text-align: left;
}

.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1.25rem;
  border-radius: var(--radius-md);
}

.metric-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  margin-bottom: 0.25rem;
}

.metric-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Sections Common
   ========================================================================== */

.section {
  padding: 5rem 0;
  border-bottom: 1px solid var(--border);
}

.section-tag {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2.1rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 680px;
  margin-bottom: 2.5rem;
}

/* ==========================================================================
   Flagship Card
   ========================================================================== */

.flagship-card {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 2.5rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  align-items: start;
}

.flagship-media {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}

.flagship-img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.2s ease;
}

.flagship-media-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.flagship-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.flagship-emblem {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  object-fit: cover;
}

.flagship-features {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  margin-bottom: 1.75rem;
}

.feature-item strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

.feature-item p {
  font-size: 0.875rem;
  line-height: 1.5;
}

.flagship-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.flagship-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   Filter Tabs & Projects Grid
   ========================================================================== */

.filter-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.filter-btn {
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-btn:hover {
  color: var(--text-main);
  background: var(--surface-hover);
}

.filter-btn.active {
  background: #1e293b;
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: #475569;
}

.project-top {
  margin-bottom: 1.25rem;
}

.project-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.project-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.project-desc {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.project-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ==========================================================================
   Terminal Window
   ========================================================================== */

.terminal-section {
  background: #07090c;
}

.terminal-window {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  font-family: var(--font-mono);
}

.terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: #161b22;
  border-bottom: 1px solid #30363d;
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.dot-red { background: #f85149; }
.dot-yellow { background: #d29922; }
.dot-green { background: #3fb950; }

.terminal-title {
  font-size: 0.8rem;
  color: #8b949e;
}

.terminal-status {
  font-size: 0.7rem;
  color: #3fb950;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.terminal-body {
  padding: 1.25rem;
  min-height: 340px;
  max-height: 480px;
  overflow-y: auto;
  font-size: 0.875rem;
  color: #e6edf3;
  line-height: 1.6;
}

.terminal-output {
  white-space: pre-wrap;
  margin-bottom: 0.75rem;
}

.terminal-input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.terminal-prompt {
  color: #58a6ff;
  font-weight: 600;
}

.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #e6edf3;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  outline: none;
}

/* ==========================================================================
   Competencies Grid
   ========================================================================== */

.competencies-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.competency-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
}

.competency-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.competency-card h3 {
  font-size: 1.2rem;
  margin-bottom: 1.25rem;
}

.competency-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  font-size: 0.875rem;
}

.competency-list li strong {
  color: var(--accent-cyan);
}

/* ==========================================================================
   Contact Section & Footer
   ========================================================================== */

.contact-container {
  max-width: 800px;
  text-align: center;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-top: 2rem;
}

.contact-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: center;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-label {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-transform: uppercase;
}

.contact-val {
  font-weight: 600;
  font-size: 0.95rem;
}

.copy-feedback {
  font-size: 0.75rem;
  color: var(--accent-emerald);
  min-height: 18px;
}

.footer {
  padding: 2.5rem 0;
  background: #05070a;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
}

.footer-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

/* ==========================================================================
   Modal Drawer
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-container {
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 760px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
  animation: modalIn 0.2s ease-out;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 1.75rem;
  overflow-y: auto;
  font-size: 0.95rem;
  line-height: 1.7;
}

.modal-body h4 {
  color: var(--accent-cyan);
  margin: 1.25rem 0 0.5rem;
  font-size: 1.05rem;
}

.modal-body ul {
  padding-left: 1.25rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 960px) {
  .hero-title { font-size: 2.25rem; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .flagship-card { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .competencies-grid { grid-template-columns: 1fr; }
  .contact-methods { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .hero-title { font-size: 1.85rem; }
  .metrics-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
}
