/*
Theme Name: HeadCode
Theme URI: https://headcode.info
Author: HeadCode Team
Author URI: https://headcode.info
Description: Professional Software Development Agency, Developer Community Hub, and Digital Products platform for HeadCode.info — specializing in Website Development, Android App Development, Frontend & Backend Engineering, API Integration, and UI/UX Design. Features modern SaaS visual identity, responsive layouts, working project inquiry system, portfolio showcase, introductory pricing, and SEO-optimized architecture.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: headcode
Tags: blog, e-commerce, portfolio, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, accessibility-ready

--------------------------------------------------------------
>>> TABLE OF CONTENTS:
1. CSS Variables & Design Tokens (Light Mode Default & Dark Mode)
2. CSS Reset & Box Sizing
3. Typography & Global Styles
4. Accessibility & Screen Readers
5. Layout Containers & Grid Engine
6. Buttons & Interactive Elements
7. Form Controls & Inputs
8. Badges & Tags
9. Card Baseline & Transitions
--------------------------------------------------------------
*/

/* 1. CSS Variables & Design Tokens */
:root,
html[data-theme="dark"],
body[data-theme="dark"] {
  /* DARK SAAS AGENCY PALETTE (PRIMARY BRAND IDENTITY) */
  --hc-bg-canvas: #0B1120;
  --hc-bg-surface-1: #0F172A;
  --hc-bg-surface-2: #111C32;
  --hc-bg-surface-3: #1E293B;
  --hc-bg-surface-hover: #1E2A44;
  
  --hc-border-subtle: #263449;
  --hc-border-strong: rgba(255, 255, 255, 0.16);
  --hc-border-accent: rgba(59, 130, 246, 0.4);

  --hc-text-primary: #FFFFFF;
  --hc-text-secondary: #94A3B8;
  --hc-text-muted: #64748B;
  --hc-text-inverse: #0B1120;

  --hc-accent-blue: #3B82F6;
  --hc-accent-blue-hover: #2563EB;
  --hc-accent-blue-soft: rgba(59, 130, 246, 0.15);

  --hc-accent-purple: #6366F1;
  --hc-accent-purple-soft: rgba(99, 102, 241, 0.15);

  --hc-accent-pink: #A855F7;
  --hc-accent-pink-soft: rgba(168, 85, 247, 0.15);

  --hc-accent-cyan: #38BDF8;
  --hc-accent-cyan-hover: #0EA5E9;
  --hc-accent-cyan-soft: rgba(56, 189, 248, 0.12);

  --hc-accent-emerald: #10B981;
  --hc-accent-emerald-soft: rgba(16, 185, 129, 0.12);

  --hc-accent-amber: #F59E0B;
  --hc-accent-amber-soft: rgba(245, 158, 11, 0.12);

  --hc-accent-rose: #F43F5E;
  --hc-accent-rose-soft: rgba(244, 63, 94, 0.12);

  --hc-header-bg: rgba(11, 17, 32, 0.92);
  --hc-hero-radial: radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.18) 0%, rgba(99, 102, 241, 0.09) 35%, rgba(11, 17, 32, 0) 70%);
  --hc-footer-bg: #070B14;
  --hc-footer-text: #94A3B8;

  /* Typography */
  --hc-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --hc-font-mono: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Font Sizes */
  --hc-text-xs: 0.75rem;     /* 12px */
  --hc-text-sm: 0.875rem;    /* 14px */
  --hc-text-base: 1rem;      /* 16px */
  --hc-text-lg: 1.125rem;    /* 18px */
  --hc-text-xl: 1.25rem;     /* 20px */
  --hc-text-2xl: 1.5rem;     /* 24px */
  --hc-text-3xl: 1.875rem;   /* 30px */
  --hc-text-4xl: 2.25rem;    /* 36px */
  --hc-text-5xl: 3rem;       /* 48px */

  /* Spacing */
  --hc-space-1: 0.25rem;
  --hc-space-2: 0.5rem;
  --hc-space-3: 0.75rem;
  --hc-space-4: 1rem;
  --hc-space-5: 1.25rem;
  --hc-space-6: 1.5rem;
  --hc-space-8: 2rem;
  --hc-space-10: 2.5rem;
  --hc-space-12: 3rem;
  --hc-space-16: 4rem;

  /* Layout */
  --hc-container-max: 1240px;
  --hc-container-narrow: 860px;
  --hc-header-height: 72px;

  /* Radius */
  --hc-radius-sm: 6px;
  --hc-radius-md: 10px;
  --hc-radius-lg: 16px;
  --hc-radius-xl: 24px;
  --hc-radius-full: 9999px;

  /* Shadows */
  --hc-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.35);
  --hc-shadow-md: 0 4px 16px -2px rgba(0, 0, 0, 0.45);
  --hc-shadow-lg: 0 12px 28px -4px rgba(0, 0, 0, 0.6);
  --hc-shadow-glow: 0 0 25px -2px rgba(59, 130, 246, 0.3);

  --hc-transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --hc-transition-fast: all 0.15s ease-in-out;
}

/* LIGHT MODE */
html[data-theme="light"],
body[data-theme="light"] {
  --hc-bg-canvas: #F8FAFC;
  --hc-bg-surface-1: #FFFFFF;
  --hc-bg-surface-2: #F1F5F9;
  --hc-bg-surface-3: #E2E8F0;
  --hc-bg-surface-hover: #F1F5F9;
  
  --hc-border-subtle: rgba(15, 23, 42, 0.09);
  --hc-border-strong: rgba(15, 23, 42, 0.16);
  --hc-border-accent: rgba(59, 130, 246, 0.4);

  --hc-text-primary: #0F172A;
  --hc-text-secondary: #334155;
  --hc-text-muted: #64748B;
  --hc-text-inverse: #FFFFFF;

  --hc-accent-blue: #2563EB;
  --hc-accent-blue-hover: #1D4ED8;
  --hc-accent-blue-soft: rgba(37, 99, 235, 0.1);

  --hc-accent-purple: #6366F1;
  --hc-accent-purple-soft: rgba(99, 102, 241, 0.1);

  --hc-accent-pink: #9333EA;
  --hc-accent-pink-soft: rgba(147, 51, 234, 0.1);

  --hc-accent-cyan: #0284C7;
  --hc-accent-cyan-hover: #0369A1;
  --hc-accent-cyan-soft: rgba(2, 132, 199, 0.1);

  --hc-accent-emerald: #059669;
  --hc-accent-emerald-soft: rgba(5, 150, 105, 0.1);

  --hc-accent-amber: #D97706;
  --hc-accent-amber-soft: rgba(217, 119, 6, 0.1);

  --hc-accent-rose: #E11D48;
  --hc-accent-rose-soft: rgba(225, 29, 72, 0.1);

  --hc-header-bg: rgba(255, 255, 255, 0.94);
  --hc-hero-radial: radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.08) 0%, rgba(248, 250, 252, 0) 70%);
  --hc-footer-bg: #0F172A;
  --hc-footer-text: #94A3B8;

  --hc-shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.06);
  --hc-shadow-md: 0 4px 16px -2px rgba(15, 23, 42, 0.08);
  --hc-shadow-lg: 0 12px 28px -4px rgba(15, 23, 42, 0.12);
  --hc-shadow-glow: 0 0 20px -2px rgba(59, 130, 246, 0.25);
}

/* 2. CSS Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--hc-font-sans);
  background-color: var(--hc-bg-canvas);
  color: var(--hc-text-primary);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* 3. Typography & Global Elements */
h1, h2, h3, h4, h5, h6 {
  color: var(--hc-text-primary);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 4vw + 1rem, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw + 0.5rem, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2vw + 0.3rem, 1.65rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.05em; }

p {
  margin-bottom: var(--hc-space-4);
  color: var(--hc-text-secondary);
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--hc-accent-cyan);
  text-decoration: none;
  transition: var(--hc-transition-fast);
}

a:hover, a:focus-visible {
  color: var(--hc-accent-cyan-hover);
  text-decoration: underline;
  text-underline-offset: 4px;
}

img, svg, video, canvas, audio, iframe, embed, object {
  display: block;
  max-width: 100%;
  height: auto;
}

ul, ol {
  padding-left: var(--hc-space-6);
  margin-bottom: var(--hc-space-4);
  color: var(--hc-text-secondary);
}

li {
  margin-bottom: var(--hc-space-2);
}

blockquote {
  border-left: 3px solid var(--hc-accent-cyan);
  padding: var(--hc-space-3) var(--hc-space-5);
  margin: var(--hc-space-6) 0;
  background-color: var(--hc-bg-surface-2);
  border-radius: 0 var(--hc-radius-md) var(--hc-radius-md) 0;
  font-style: italic;
  color: var(--hc-text-primary);
}

hr {
  border: none;
  border-top: 1px solid var(--hc-border-subtle);
  margin: var(--hc-space-8) 0;
}

/* 4. Accessibility & Screen Readers */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: var(--hc-accent-cyan);
  border-radius: var(--hc-radius-sm);
  box-shadow: var(--hc-shadow-lg);
  clip: auto !important;
  clip-path: none;
  color: #ffffff;
  display: block;
  font-size: var(--hc-text-sm);
  font-weight: 700;
  height: auto;
  left: 1rem;
  top: 1rem;
  line-height: normal;
  padding: 12px 20px;
  text-decoration: none;
  width: auto;
  z-index: 100000;
}

:focus-visible {
  outline: 2px solid var(--hc-accent-cyan);
  outline-offset: 3px;
}

/* 5. Layout Containers */
.hc-container {
  width: 100%;
  max-width: var(--hc-container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--hc-space-4);
  padding-right: var(--hc-space-4);
}

@media (min-width: 768px) {
  .hc-container {
    padding-left: var(--hc-space-6);
    padding-right: var(--hc-space-6);
  }
}

.hc-container--narrow {
  max-width: var(--hc-container-narrow);
}

.hc-site-main {
  flex: 1 0 auto;
  padding: var(--hc-space-8) 0 var(--hc-space-16);
}

/* 6. Buttons & Interactive Elements */
.hc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--hc-space-2);
  padding: 0.65rem 1.25rem;
  min-height: 44px;
  min-width: 44px;
  font-size: var(--hc-text-sm);
  font-weight: 600;
  border-radius: var(--hc-radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--hc-transition);
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.hc-btn:hover, .hc-btn:focus-visible {
  text-decoration: none;
  transform: translateY(-1px);
}

.hc-btn:active {
  transform: translateY(0);
}

.hc-btn--primary {
  background-color: var(--hc-accent-blue);
  color: #ffffff;
  border-color: var(--hc-accent-blue);
}

.hc-btn--primary:hover {
  background-color: var(--hc-accent-blue-hover);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.hc-btn--cyan {
  background: linear-gradient(135deg, var(--hc-accent-cyan) 0%, var(--hc-accent-blue) 100%);
  color: #ffffff;
  font-weight: 700;
  border: none;
}

.hc-btn--cyan:hover {
  background: linear-gradient(135deg, #0284c7 0%, #1d4ed8 100%);
  color: #ffffff;
  box-shadow: var(--hc-shadow-cyan);
}

.hc-btn--outline {
  background-color: transparent;
  border-color: var(--hc-border-strong);
  color: var(--hc-text-primary);
}

.hc-btn--outline:hover {
  background-color: var(--hc-bg-surface-2);
  border-color: var(--hc-accent-cyan);
  color: var(--hc-accent-cyan);
}

.hc-btn--emerald {
  background-color: var(--hc-accent-emerald);
  color: #ffffff;
}

.hc-btn--emerald:hover {
  background-color: #047857;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
}

.hc-btn--sm {
  padding: 0.5rem 1rem;
  font-size: var(--hc-text-sm);
  min-height: 44px;
}

.hc-btn--lg {
  padding: 0.85rem 1.65rem;
  font-size: var(--hc-text-base);
  min-height: 50px;
}

/* 7. Form Controls */
input[type="text"],
input[type="search"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="tel"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: var(--hc-bg-surface-1);
  border: 1px solid var(--hc-border-strong);
  border-radius: var(--hc-radius-md);
  color: var(--hc-text-primary);
  font-size: var(--hc-text-base);
  font-family: inherit;
  transition: var(--hc-transition-fast);
  min-height: 44px;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--hc-accent-cyan);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

/* 8. Badges and Tags */
.hc-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  font-size: var(--hc-text-xs);
  font-weight: 600;
  border-radius: var(--hc-radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

.hc-badge--cyan {
  background-color: var(--hc-accent-cyan-soft);
  color: var(--hc-accent-cyan);
  border: 1px solid rgba(2, 132, 199, 0.25);
}

.hc-badge--emerald {
  background-color: var(--hc-accent-emerald-soft);
  color: var(--hc-accent-emerald);
  border: 1px solid rgba(5, 150, 105, 0.25);
}

.hc-badge--amber {
  background-color: var(--hc-accent-amber-soft);
  color: var(--hc-accent-amber);
  border: 1px solid rgba(217, 119, 6, 0.25);
}

.hc-badge--purple {
  background-color: var(--hc-accent-purple-soft);
  color: var(--hc-accent-purple);
  border: 1px solid rgba(124, 58, 237, 0.25);
}

/* 9. Card Baseline */
.hc-card {
  background-color: var(--hc-bg-surface-1);
  border: 1px solid var(--hc-border-subtle);
  border-radius: var(--hc-radius-lg);
  overflow: hidden;
  transition: var(--hc-transition);
  display: flex;
  flex-direction: column;
  box-shadow: var(--hc-shadow-sm);
}

.hc-card:hover {
  border-color: var(--hc-border-accent);
  transform: translateY(-3px);
  box-shadow: var(--hc-shadow-md);
}
