/* ===================================================================
   NIZAM FHAMER ARAFLI — ULTRA PERFORMANCE OPTIMIZED PORTFOLIO
   Theme: Neo-Cyber Studio / Obsidian Solid / JetBrains Terminal
   Zero Lag, Hardware-Accelerated 60/120 FPS Rendering
   =================================================================== */

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

:root {
  --bg-dark: #07080c;
  --bg-card: #0d101b;
  --bg-card-hover: #131726;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(16, 185, 129, 0.35);
  
  --emerald: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.25);
  --cyan: #06b6d4;
  --cyan-glow: rgba(6, 182, 212, 0.25);
  --purple: #8b5cf6;
  --purple-glow: rgba(139, 92, 246, 0.25);
  --amber: #f59e0b;
  --rose: #f43f5e;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --transition-fast: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeSpeed;
}

/* Static, zero-repaint hardware-accelerated ambient layer */
.bg-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 10% 15%, rgba(16, 185, 129, 0.07) 0%, transparent 45%),
    radial-gradient(circle at 90% 70%, rgba(139, 92, 246, 0.07) 0%, transparent 50%),
    radial-gradient(circle at 50% 40%, rgba(6, 182, 212, 0.04) 0%, transparent 40%);
  transform: translateZ(0);
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
  transform: translateZ(0);
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
}

/* Performance boost for offscreen sections */
.section {
  padding: 5.5rem 0;
  position: relative;
  content-visibility: auto;
  contain-intrinsic-size: 1px 700px;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 1rem;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(12, 15, 24, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  border-radius: 9999px;
  padding: 0.5rem 1.25rem;
  width: 92%;
  max-width: 1100px;
  transition: var(--transition-fast);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-main);
  font-size: 1rem;
  letter-spacing: -0.5px;
}

.nav-logo span {
  color: var(--emerald);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--emerald);
  border-radius: 50%;
  display: inline-block;
}

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

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.15s ease;
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: #fff;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-terminal-nav {
  background: rgba(16, 185, 129, 0.1);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition-fast);
}

.btn-terminal-nav:hover {
  background: var(--emerald);
  color: #000;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.25rem;
  cursor: pointer;
}

/* Hero Section */
.hero-section {
  padding: 8rem 0 4.5rem;
  min-height: 88vh;
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-badge-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.85rem;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 9999px;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--emerald);
  margin-bottom: 1.25rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -1px;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, #ffffff 30%, #a5b4fc 70%, var(--emerald) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.role-typewriter-wrap {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  color: var(--cyan);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2rem;
}

.role-cursor {
  display: inline-block;
  width: 8px;
  height: 1.25rem;
  background-color: var(--cyan);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  from, to { opacity: 1; }
  50% { opacity: 0; }
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 580px;
}

.hero-desc strong {
  color: var(--text-main);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, var(--emerald), #059669);
  color: #031c12;
  font-weight: 700;
  padding: 0.8rem 1.6rem;
  border-radius: 12px;
  text-decoration: none;
  font-size: 0.95rem;
  transition: var(--transition-fast);
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  font-weight: 600;
  padding: 0.8rem 1.5rem;
  border-radius: 12px;
  text-decoration: none;
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.hero-quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border-color);
}

.stat-item .stat-num {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
}

.stat-item .stat-num span {
  color: var(--emerald);
}

.stat-item .stat-lbl {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Profile Card */
.profile-card-wrap {
  position: relative;
  display: flex;
  justify-content: center;
}

.profile-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  transition: var(--transition-fast);
}

.profile-card:hover {
  border-color: var(--border-glow);
}

.photo-box {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  margin-bottom: 1.25rem;
  background: #111420;
}

.photo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--emerald);
  border-style: solid;
  pointer-events: none;
  z-index: 2;
}

.pc-tl { top: 8px; left: 8px; border-width: 2px 0 0 2px; }
.pc-tr { top: 8px; right: 8px; border-width: 2px 2px 0 0; }
.pc-bl { bottom: 8px; left: 8px; border-width: 0 0 2px 2px; }
.pc-br { bottom: 8px; right: 8px; border-width: 0 2px 2px 0; }

.card-badge-status {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(8, 10, 15, 0.9);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--emerald);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.3rem 0.7rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.card-identity {
  margin-bottom: 1rem;
}

.card-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
}

.card-handle {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--cyan);
}

.card-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.card-pill {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
  color: var(--text-muted);
}

/* Headings */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--emerald);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 0.85rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 650px;
  margin-bottom: 2.75rem;
  line-height: 1.6;
}

/* Personality Section */
.personality-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.trait-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 1.85rem;
  position: relative;
  transition: var(--transition-fast);
}

.trait-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.16);
  background: var(--bg-card-hover);
}

.trait-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 1.15rem;
}

.icon-emerald { background: rgba(16, 185, 129, 0.15); color: var(--emerald); }
.icon-cyan { background: rgba(6, 182, 212, 0.15); color: var(--cyan); }
.icon-purple { background: rgba(139, 92, 246, 0.15); color: var(--purple); }
.icon-amber { background: rgba(245, 158, 11, 0.15); color: var(--amber); }

.trait-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.trait-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.trait-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.trait-quote {
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.35);
  border-left: 2px solid var(--emerald);
  border-radius: 0 8px 8px 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #cbd5e1;
}

/* ===================================================================
   PROJECTS SECTION & CLICKABLE CARDS
   =================================================================== */
.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.25rem;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.45rem 1.1rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-btn:hover, .filter-btn.active {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--emerald);
  color: var(--emerald);
}

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

/* THE CLICKABLE PROJECT CARD */
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition-fast);
  position: relative;
  cursor: pointer;
  user-select: none;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--emerald);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45), 0 0 15px rgba(16, 185, 129, 0.12);
  background: var(--bg-card-hover);
}

.project-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.9rem;
}

.project-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.badge-featured {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.35);
  color: var(--emerald);
}

.project-open-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--emerald);
  background: rgba(16, 185, 129, 0.1);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  border: 1px solid rgba(16, 185, 129, 0.25);
  transition: var(--transition-fast);
}

.project-card:hover .project-open-pill {
  background: var(--emerald);
  color: #000;
  font-weight: 700;
}

.project-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-main);
  transition: color 0.15s ease;
}

.project-card:hover .project-name {
  color: var(--emerald);
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.35rem;
  flex-grow: 1;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1.15rem;
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: #cbd5e1;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.8rem;
  color: var(--text-dim);
}

.project-btn-detail {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  transition: var(--transition-fast);
}

.project-btn-detail:hover {
  background: rgba(6, 182, 212, 0.15);
  color: #fff;
  border-color: var(--cyan);
}

/* Terminal Section */
.terminal-section {
  background: #040508;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 4.5rem 0;
  content-visibility: auto;
  contain-intrinsic-size: 1px 550px;
}

.terminal-wrap {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  background: #0a0c12;
  border: 1px solid rgba(16, 185, 129, 0.3);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  border-radius: 16px;
  overflow: hidden;
}

.terminal-header {
  background: #111420;
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.terminal-dots {
  display: flex;
  gap: 0.45rem;
}

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

.t-red { background: #ef4444; }
.t-yellow { background: #f59e0b; }
.t-green { background: #10b981; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
}

.terminal-body {
  padding: 1.25rem;
  min-height: 360px;
  max-height: 460px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.6;
  color: #cbd5e1;
}

.terminal-output-line {
  margin-bottom: 0.4rem;
  word-break: break-word;
}

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

.t-prompt {
  color: var(--emerald);
  font-weight: 700;
  white-space: nowrap;
}

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

.terminal-hint {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.6rem;
}

/* Skills Matrix */
.skills-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.skill-cat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 1.6rem;
}

.skill-cat-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.35rem;
}

.skill-cat-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.skill-cat-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.skill-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-family: var(--font-mono);
}

.skill-name {
  color: var(--text-main);
}

.skill-pct {
  color: var(--emerald);
}

.skill-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 9999px;
  overflow: hidden;
}

.skill-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--emerald), var(--cyan));
  border-radius: 9999px;
}

/* Piano Interactive Widget */
.music-interactive-card {
  margin-top: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 1.85rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.music-info h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.music-info p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.piano-keys-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 4px;
  background: #000;
  padding: 1.1rem 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.piano-key {
  width: 44px;
  height: 135px;
  background: #f8fafc;
  color: #0f172a;
  border-radius: 0 0 5px 5px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: all 0.08s ease;
  box-shadow: inset 0 -3px 0 #cbd5e1, 0 3px 5px rgba(0, 0, 0, 0.4);
}

.piano-key:active, .piano-key.active-key {
  background: var(--emerald);
  color: #000;
  transform: translateY(3px);
  box-shadow: inset 0 -1px 0 #059669;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.gallery-card {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  background: #111420;
  cursor: pointer;
  border: 1px solid var(--border-color);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-card:hover {
  transform: scale(1.03);
  border-color: var(--emerald);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0.9rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

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

.gallery-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  color: #fff;
}

.gallery-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--emerald);
}

/* Contact Section */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 2rem;
}

.contact-channels {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  margin-top: 1.35rem;
}

.contact-link-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: var(--text-main);
  padding: 0.8rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  transition: var(--transition-fast);
}

.contact-link-row:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(16, 185, 129, 0.4);
  transform: translateX(4px);
}

.clr-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.clr-text {
  display: flex;
  flex-direction: column;
}

.clr-label {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

.clr-value {
  font-weight: 600;
  font-size: 0.92rem;
}

.form-group {
  margin-bottom: 1.15rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.form-input, .form-textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.75rem 0.95rem;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--emerald);
}

.form-textarea {
  resize: vertical;
  min-height: 105px;
}

/* Floating AI Chat Assistant Widget */
.nizamai-widget-btn {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 99;
  background: linear-gradient(135deg, #10b981, #0284c7);
  color: #031c12;
  border: none;
  border-radius: 9999px;
  padding: 0.7rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.35);
  transition: var(--transition-fast);
}

.nizamai-widget-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.nizamai-chat-window {
  position: fixed;
  bottom: 5.25rem;
  right: 1.75rem;
  width: 360px;
  max-width: calc(100vw - 2.5rem);
  height: 480px;
  background: #0d101a;
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 18px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.7);
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(15px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease-out;
}

.nizamai-chat-window.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.chat-header {
  padding: 0.8rem 1.1rem;
  background: #121524;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header-user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.chat-header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--emerald);
}

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

.chat-header-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.chat-header-status {
  font-size: 0.72rem;
  color: var(--emerald);
  font-family: var(--font-mono);
}

.chat-close-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.1rem;
  cursor: pointer;
}

.chat-messages {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.88rem;
}

.chat-bubble {
  max-width: 82%;
  padding: 0.65rem 0.9rem;
  border-radius: 14px;
  line-height: 1.5;
}

.bubble-ai {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  border-bottom-left-radius: 4px;
}

.bubble-user {
  align-self: flex-end;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #021a10;
  font-weight: 500;
  border-bottom-right-radius: 4px;
}

.chat-quick-replies {
  padding: 0.45rem 0.75rem;
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.chat-quick-replies::-webkit-scrollbar {
  display: none;
}

.quick-chip {
  white-space: nowrap;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--emerald);
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.quick-chip:hover {
  background: var(--emerald);
  color: #000;
}

.chat-input-bar {
  padding: 0.7rem 0.9rem;
  border-top: 1px solid var(--border-color);
  background: #0d101a;
  display: flex;
  gap: 0.5rem;
}

.chat-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.5rem 0.8rem;
  color: #fff;
  font-size: 0.85rem;
  outline: none;
}

.chat-input:focus {
  border-color: var(--emerald);
}

.chat-send-btn {
  background: var(--emerald);
  border: none;
  border-radius: 10px;
  color: #000;
  width: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

/* Modal Detail Project */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 100%;
  max-width: 650px;
  background: #0f121d;
  border: 1px solid var(--border-glow);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

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

.modal-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.2rem;
  cursor: pointer;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  line-height: 1.7;
  font-size: 0.95rem;
  color: #cbd5e1;
}

.modal-body h4 {
  font-family: var(--font-display);
  color: #fff;
  margin: 1.25rem 0 0.5rem;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-color);
  padding: 2.75rem 0;
  background: #040508;
  position: relative;
  z-index: 2;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-brand {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text-muted);
}

.footer-brand span {
  color: var(--emerald);
}

.footer-quote {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Toast Notification */
.toast-notice {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--emerald);
  color: #021a10;
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.55rem 1.35rem;
  border-radius: 9999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 300;
  transition: transform 0.25s ease-out;
  pointer-events: none;
}

.toast-notice.show {
  transform: translateX(-50%) translateY(0);
}

/* Responsive Media Queries */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }

  .role-typewriter-wrap {
    justify-content: center;
  }

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

  .hero-quick-stats {
    max-width: 450px;
    margin: 0 auto;
  }

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

  .skills-container {
    grid-template-columns: 1fr;
  }

  .music-interactive-card {
    grid-template-columns: 1fr;
  }

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

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links, .btn-terminal-nav {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

  .hero-title {
    font-size: 2.35rem;
  }

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

  .footer-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
