/* ============================================
   AS Online Services | Design System & Styles
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  --color-bg:        #0a0a0f;
  --color-bg-alt:    #111118;
  --color-surface:   #16161f;
  --color-surface-2: #1e1e2a;
  --color-border:    #2a2a3a;
  --color-text:      #e4e4ef;
  --color-text-dim:  #9090a8;
  --color-text-muted:#6a6a80;
  --color-white:     #ffffff;

  --color-primary:   #6c5ce7;
  --color-primary-light: #a29bfe;
  --color-accent:    #00cec9;
  --color-accent-2:  #fd79a8;

  --gradient-primary: linear-gradient(135deg, #6c5ce7, #00cec9);
  --gradient-glow:    linear-gradient(135deg, rgba(108,92,231,0.4), rgba(0,206,201,0.4));
  --gradient-text:    linear-gradient(135deg, #a29bfe, #00cec9, #fd79a8);

  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', monospace;

  --radius-sm:  0.5rem;
  --radius-md:  0.875rem;
  --radius-lg:  1.25rem;
  --radius-xl:  1.75rem;

  --shadow-sm:  0 1px 2px rgba(0,0,0,0.3);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg:  0 8px 30px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 40px rgba(108,92,231,0.15);

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --container-max: 1200px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ---------- Utility ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.925rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-lg { padding: 0.95rem 2rem; font-size: 1rem; }
.btn-primary {
  background: var(--gradient-primary);
  color: var(--color-white);
  box-shadow: 0 4px 15px rgba(108,92,231,0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(108,92,231,0.5);
}
.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
}
.btn-outline:hover {
  border-color: var(--color-primary-light);
  color: var(--color-primary-light);
  transform: translateY(-2px);
}
.btn-nav {
  background: var(--gradient-primary);
  color: var(--color-white);
  padding: 0.55rem 1.25rem;
  font-size: 0.85rem;
}
.btn-nav:hover {
  box-shadow: 0 4px 15px rgba(108,92,231,0.35);
}

/* =============================================
   NAVIGATION
   ============================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 0;
  transition: var(--transition);
  background: transparent;
}
.navbar.scrolled {
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
  padding: 0.6rem 0;
}
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.1rem;
}
.nav-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-dim);
  transition: var(--transition);
  position: relative;
}
.nav-links a.btn-nav {
  color: var(--color-white);
}
.nav-links a:not(.btn):hover {
  color: var(--color-white);
}
.nav-links a:not(.btn)::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: var(--transition);
}
.nav-links a:not(.btn):hover::after { width: 100%; }

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: var(--transition);
}
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* =============================================
   HERO
   ============================================= */
.hero {
  position: relative;
  min-height: auto;
  display: flex;
  align-items: center;
  padding: 5rem 0 3rem;
  overflow: hidden;
}
.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(108,92,231,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108,92,231,0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 30%, transparent 100%);
}
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  will-change: transform;
  contain: strict;
}
.hero-glow--1 {
  width: 600px;
  height: 600px;
  background: rgba(108,92,231,0.15);
  top: -10%;
  right: -5%;
}
.hero-glow--2 {
  width: 500px;
  height: 500px;
  background: rgba(0,206,201,0.1);
  bottom: -10%;
  left: -10%;
}
.hero-container {
  position: relative;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}
.hero-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin: 0 auto 1.5rem;
  display: block;
  animation: fadeInDown 0.6s ease-out;
  filter: drop-shadow(0 0 30px rgba(108,92,231,0.3));
  will-change: transform, opacity;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 50px;
  padding: 0.45rem 1.2rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-primary-light);
  margin-bottom: 2rem;
  animation: fadeInDown 0.8s ease-out;
  will-change: transform, opacity;
}
.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
  will-change: transform, opacity;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s ease-out 0.1s both;
  will-change: transform, opacity;
}
.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--color-text-dim);
  max-width: 680px;
  margin: 0 auto 2.5rem;
  animation: fadeInUp 0.8s ease-out 0.2s both;
  will-change: transform, opacity;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease-out 0.3s both;
  will-change: transform, opacity;
}
.hero-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--color-border);
  animation: fadeInUp 0.8s ease-out 0.4s both;
  will-change: transform, opacity;
  flex-wrap: wrap;
}
.stat-number {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-white);
}
.stat-label {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  font-weight: 500;
}
.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--color-border);
}

/* =============================================
   SECTIONS (General)
   ============================================= */
.section {
  padding: 6rem 0;
  position: relative;
}
.section--dark {
  background: var(--color-bg-alt);
}
.section--cta {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem;
}
.section-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-primary-light);
  margin-bottom: 0.75rem;
  background: rgba(108,92,231,0.1);
  padding: 0.3rem 0.9rem;
  border-radius: 50px;
  border: 1px solid rgba(108,92,231,0.2);
}
.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.section-desc {
  font-size: 1.05rem;
  color: var(--color-text-dim);
  line-height: 1.8;
}

/* =============================================
   ABOUT
   ============================================= */
.about-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}
.about-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  transition: var(--transition);
}
.about-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}
.about-icon {
  width: 48px;
  height: 48px;
  background: rgba(108,92,231,0.1);
  border: 1px solid rgba(108,92,231,0.2);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}
.about-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--color-primary-light);
}
.about-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--color-white);
}
.about-card p {
  font-size: 0.95rem;
  color: var(--color-text-dim);
  line-height: 1.7;
}

/* =============================================
   SERVICES
   ============================================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.75rem;
}
.service-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: var(--transition);
}
.service-card:hover::before { opacity: 1; }
.service-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}
.service-number {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-primary-light);
  margin-bottom: 1rem;
  opacity: 0.6;
}
.service-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 0.6rem;
}
.service-card p {
  font-size: 0.92rem;
  color: var(--color-text-dim);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}
.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.service-tags li {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.65rem;
  border-radius: 50px;
  background: rgba(108,92,231,0.08);
  border: 1px solid rgba(108,92,231,0.15);
  color: var(--color-primary-light);
}

/* =============================================
   PROJECTS
   ============================================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}
.projects-loading {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--color-text-muted);
  padding: 3rem 0;
  font-size: 0.95rem;
}
.project-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: var(--transition);
}
.project-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}
.project-card--featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1.3fr;
}
.project-image {
  position: relative;
  overflow: hidden;
}
.project-placeholder-img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    hsl(var(--hue, 220) 60% 12%),
    hsl(var(--hue, 220) 40% 8%)
  );
}
.project-placeholder-img svg {
  width: 64px;
  height: 64px;
  stroke: hsl(var(--hue, 220) 70% 65%);
  opacity: 0.5;
}
.project-content {
  padding: 2rem;
}
.project-tags {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.project-tags span {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  background: rgba(0,206,201,0.08);
  border: 1px solid rgba(0,206,201,0.2);
  color: var(--color-accent);
}
.project-content h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 0.6rem;
  line-height: 1.3;
}
.project-content p {
  font-size: 0.92rem;
  color: var(--color-text-dim);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

/* Status badges (online / active) */
.status-badge {
  font-size: 0.68rem !important;
  font-weight: 600 !important;
  padding: 0.2rem 0.55rem !important;
  border-radius: 50px !important;
  letter-spacing: 0.04em;
  text-transform: uppercase !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.status-dot--green {
  background: #00b894;
  box-shadow: 0 0 6px rgba(0,184,148,0.6);
  animation: pulseDot 2s ease-in-out infinite;
  will-change: opacity;
}
.status-dot--red {
  background: #e17055;
  box-shadow: 0 0 4px rgba(225,112,85,0.3);
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.status-online {
  background: rgba(0,184,148,0.12) !important;
  border: 1px solid rgba(0,184,148,0.3) !important;
  color: #00b894 !important;
}
.status-offline {
  background: rgba(225,112,85,0.1) !important;
  border: 1px solid rgba(225,112,85,0.25) !important;
  color: #e17055 !important;
}
.status-active {
  background: rgba(0,206,201,0.1) !important;
  border: 1px solid rgba(0,206,201,0.25) !important;
  color: var(--color-accent) !important;
}
.status-dev {
  background: rgba(253,203,110,0.12) !important;
  border: 1px solid rgba(253,203,110,0.3) !important;
  color: #fdcb6e !important;
}
.status-private {
  background: rgba(232,67,147,0.12) !important;
  border: 1px solid rgba(232,67,147,0.3) !important;
  color: #e84393 !important;
}
.status-pixelated {
  background: rgba(99,110,114,0.12) !important;
  border: 1px solid rgba(99,110,114,0.3) !important;
  color: #b2bec3 !important;
}

/* Contextual status line under each card */
.project-status-line {
  margin-top: 0.75rem;
  padding: 0.55rem 0.85rem;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--color-text-dim);
  background: rgba(255,255,255,0.02);
  border-left: 3px solid var(--color-border);
}
.project-status-line.online-line {
  border-left-color: #00b894;
}
.project-status-line.offline-line {
  border-left-color: rgba(225,112,85,0.5);
}
.project-status-line.dev-line {
  border-left-color: #fdcb6e;
}
.project-status-line.private-line {
  border-left-color: #e84393;
}
.project-status-line a {
  color: var(--color-primary-light);
  text-decoration: none;
  font-weight: 600;
}
.project-status-line a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

/* Prominent project visit button */
.project-visit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.6rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  background: var(--color-primary);
  text-decoration: none;
  transition: all 0.25s ease;
  border: 1px solid transparent;
}
.project-visit-btn:hover {
  background: var(--color-primary-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(108, 99, 255, 0.35);
}
.project-visit-btn:active {
  transform: translateY(0);
}
.project-visit-btn svg {
  flex-shrink: 0;
}

/* Tech pills inside project cards */
.project-tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.project-tech-pills span {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  background: rgba(0,206,201,0.06);
  border: 1px solid rgba(0,206,201,0.14);
  color: rgba(0,206,201,0.7);
}

/* Project date metrics (age, dev time, last maintained) */
.project-metrics {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}
.metric {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.4rem 0.75rem;
  border-radius: 0.45rem;
  background: rgba(108,92,231,0.04);
  border: 1px solid rgba(108,92,231,0.08);
  min-width: 0;
}
.metric-label {
  color: var(--color-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.56rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.metric-value {
  color: var(--color-text-dim);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.76rem;
  white-space: nowrap;
}

/* Age color coding: green = alive, amber = closed */
.metric--alive {
  background: rgba(0, 206, 201, 0.06);
  border-color: rgba(0, 206, 201, 0.15);
}
.metric--alive .metric-value {
  color: #00cec9;
}
.metric--closed {
  background: rgba(253, 203, 110, 0.06);
  border-color: rgba(253, 203, 110, 0.15);
}
.metric--closed .metric-value {
  color: #fdcb6e;
}

/* Project link */
.project-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-primary-light);
  transition: var(--transition);
}
.project-link:hover {
  color: var(--color-accent);
}

/* Tile template: wide (spans full grid, image left + content right) */
.project-card--wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1.3fr;
}
.project-card--wide .project-placeholder-img {
  min-height: 260px;
}
.project-card--wide .project-metrics {
  gap: 0.65rem;
}
.project-card--wide .metric {
  padding: 0.5rem 0.85rem;
}
.project-card--wide .metric-value {
  font-size: 0.82rem;
}

/* Tile template: compact (smaller card, truncated description, no tech pills) */
.project-card--compact .project-content {
  padding: 1.25rem;
}
.project-card--compact .project-content h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}
.project-card--compact .project-content p {
  font-size: 0.82rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.75rem;
}
.project-card--compact .project-placeholder-img {
  min-height: 160px;
}
.project-card--compact .project-tech-pills {
  display: none;
}
.project-card--compact .project-status-line {
  display: none;
}
.project-card--compact .project-visit-btn {
  display: none;
}
.project-card--compact .project-metrics {
  margin-top: 0.5rem;
}
.project-card--compact .metric {
  padding: 0.25rem 0.55rem;
}
.project-card--compact .metric-label {
  font-size: 0.5rem;
}
.project-card--compact .metric-value {
  font-size: 0.68rem;
}

/* Tile template: minimal (no image, accent left border, text-focused) */
.project-card--minimal {
  border-left: 3px solid var(--color-primary);
  display: block;
}
.project-card--minimal .project-image {
  display: none;
}
.project-card--minimal .project-content {
  padding: 1.5rem 2rem;
}
.project-card--minimal .project-content p {
  font-size: 0.88rem;
}
.project-card--minimal .project-tech-pills span {
  background: rgba(108,92,231,0.1);
  border-color: rgba(108,92,231,0.2);
}
.project-card--minimal .metric {
  background: rgba(108,92,231,0.06);
  border-color: rgba(108,92,231,0.12);
}

/* Pixelated card overlay */
.project-card--pixelated .project-content h3,
.project-card--pixelated .project-content p,
.project-card--pixelated .project-tech-pills,
.project-card--pixelated .project-metrics,
.project-card--pixelated .project-status-line,
.project-card--pixelated .project-visit-btn {
  filter: blur(6px);
  user-select: none;
  pointer-events: none;
}
.project-card--pixelated .project-image img,
.project-card--pixelated .project-placeholder-img {
  filter: blur(10px) saturate(0.3);
}
.project-card--pixelated .project-tags {
  filter: none;
}
.project-card--pixelated::after {
  content: 'REDACTED';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(178,190,195,0.18);
  pointer-events: none;
  z-index: 2;
}
.project-card--pixelated {
  position: relative;
}

/* Responsive: wide template collapses on mobile */
@media (max-width: 768px) {
  .project-card--wide {
    grid-template-columns: 1fr;
  }
}

/* =============================================
   TECH STACK
   ============================================= */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.tech-category {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}
.tech-category h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 1rem;
}
.tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tech-pills span {
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.4rem 0.9rem;
  border-radius: 50px;
  background: rgba(108,92,231,0.06);
  border: 1px solid rgba(108,92,231,0.12);
  color: var(--color-text-dim);
  transition: var(--transition);
}
.tech-pills span:hover {
  background: rgba(108,92,231,0.15);
  color: var(--color-primary-light);
  border-color: rgba(108,92,231,0.3);
}

/* =============================================
   CTA / CONTACT
   ============================================= */
.cta-content {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}
.cta-actions {
  margin-top: 2rem;
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
}
.footer-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
}
.footer-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.admin-link {
  color: var(--color-text-muted) !important;
  opacity: 0.35;
  font-size: 0.75rem;
  transition: opacity 0.3s, color 0.3s;
}
.admin-link:hover {
  opacity: 1;
  color: var(--color-primary-light) !important;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}
.footer-links {
  display: flex;
  gap: 1.5rem;
}
.footer-links a {
  font-size: 0.85rem;
  color: var(--color-text-dim);
  transition: var(--transition);
}
.footer-links a:hover {
  color: var(--color-primary-light);
}

/* =============================================
   SCROLL ANIMATIONS
   ============================================= */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  will-change: transform, opacity;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .about-grid,
  .services-grid,
  .tech-grid { grid-template-columns: repeat(2, 1fr); }
  .project-card--featured { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--color-surface);
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    gap: 1.5rem;
    transition: var(--transition);
    border-left: 1px solid var(--color-border);
  }
  .nav-links.open { right: 0; }

  .hero { padding: 6rem 0 3rem; min-height: auto; }
  .hero-logo { width: 60px; height: 60px; margin-bottom: 1rem; }
  .hero-badge { font-size: 0.72rem; padding: 0.35rem 0.9rem; margin-bottom: 1.5rem; }
  .hero-subtitle { font-size: 0.95rem; margin-bottom: 2rem; }
  .hero-stats { flex-direction: column; gap: 1.25rem; margin-top: 2.5rem; padding-top: 1.5rem; }
  .stat-divider { width: 40px; height: 1px; }
  .stat-number { font-size: 1.4rem; }

  .about-grid,
  .services-grid,
  .projects-grid,
  .tech-grid {
    grid-template-columns: 1fr;
  }

  .section { padding: 3.5rem 0; }
  .section-header { margin-bottom: 2rem; }
  .section-title { font-size: 1.75rem; }
  .section-desc { font-size: 0.92rem; }

  /* Project cards mobile */
  .project-card--featured { grid-template-columns: 1fr; }
  .project-placeholder-img { min-height: 180px; }
  .project-content { padding: 1.25rem; }
  .project-content h3 { font-size: 1.1rem; }
  .project-content h3 small { display: block; margin-top: 0.2rem; }
  .project-content p { font-size: 0.85rem; line-height: 1.6; margin-bottom: 0.75rem; }
  .project-tags { gap: 0.35rem; margin-bottom: 0.5rem; }
  .project-tags span { font-size: 0.65rem; padding: 0.15rem 0.45rem; }
  .project-tech-pills { gap: 0.3rem; }
  .project-tech-pills span { font-size: 0.65rem; padding: 0.15rem 0.5rem; }
  .project-metrics { gap: 0.35rem; margin-top: 0.5rem; }
  .metric { padding: 0.3rem 0.55rem; }
  .metric-label { font-size: 0.5rem; }
  .metric-value { font-size: 0.68rem; }
  .project-status-line { font-size: 0.75rem; padding: 0.45rem 0.7rem; margin-top: 0.5rem; }
  .project-visit-btn { font-size: 0.78rem; padding: 0.5rem 1rem; margin-top: 0.5rem; }

  /* Template overrides on mobile */
  .project-card--wide .project-placeholder-img { min-height: 180px; }
  .project-card--compact .project-placeholder-img { min-height: 130px; }
  .project-card--compact .project-content { padding: 1rem; }
  .project-card--minimal .project-content { padding: 1.25rem 1.5rem; }

  /* Pixelated overlay */
  .project-card--pixelated::after { font-size: 1.2rem; letter-spacing: 0.15em; }

  /* Contact CTA */
  .cta-content { padding: 0 0.5rem; }
  .cta-actions .btn { font-size: 0.82rem; padding: 0.7rem 1.25rem; }

  /* Tech stack */
  .tech-category { padding: 1.25rem; }
  .tech-pills span { font-size: 0.75rem; padding: 0.3rem 0.7rem; }

  /* Footer */
  .footer-container {
    flex-direction: column;
    text-align: center;
  }
  .footer-links { justify-content: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .hero-title { font-size: 1.75rem; }
  .hero-logo { width: 50px; height: 50px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn-lg { width: 100%; justify-content: center; font-size: 0.9rem; }
  .hero-stats { gap: 1rem; }
  .stat-number { font-size: 1.25rem; }
  .stat-label { font-size: 0.75rem; }
  .section-title { font-size: 1.5rem; }
  .section-desc { font-size: 0.85rem; }
  .about-card, .service-card { padding: 1.5rem 1.25rem; }
  .project-content { padding: 1rem; }
  .project-content h3 { font-size: 1rem; }
  .project-content h3 small { font-size: 0.7em; }
  .project-content p { font-size: 0.82rem; }
  .cta-actions .btn { font-size: 0.78rem; padding: 0.65rem 1rem; word-break: break-all; }
}
