/* ============================================
   BUILDCALCTOOLS — MASTER STYLESHEET v4
   Premium design system with dark/light theme
   ============================================ */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap');

/* ═══════════════════════════════════════
   1. CSS VARIABLES — DARK THEME (DEFAULT)
   ═══════════════════════════════════════ */
:root {
  /* Colors */
  --color-bg:            #0B0E14;
  --color-surface:       #141822;
  --color-surface2:      #1E2433;
  --color-surface3:      #262D3F;
  --color-border:        #2A3142;
  --color-border-hover:  #3A4258;
  --color-primary:       #F4640A;
  --color-primary-hover: #FF8C3A;
  --color-primary-glow:  rgba(244,100,10,0.15);
  --color-primary-subtle:rgba(244,100,10,0.08);
  --color-yellow:        #F2B705;
  --color-yellow-glow:   rgba(242,183,5,0.12);
  --color-green:         #27C93F;
  --color-red:           #FF5F56;
  --color-text:          #F5F0E8;
  --color-text-secondary:#C8C5BE;
  --color-muted:         #777D8E;
  --color-white:         #FFFFFF;

  /* Glass effect */
  --glass-bg: rgba(20, 24, 34, 0.6);
  --glass-border: rgba(255,255,255,0.06);

  /* Shadows */
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md:   0 4px 14px rgba(0,0,0,0.35);
  --shadow-lg:   0 10px 40px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 30px rgba(244,100,10,0.08);
  --shadow-card: 0 1px 4px rgba(0,0,0,0.2);
  --shadow-card-hover: 0 8px 30px rgba(0,0,0,0.35), 0 0 40px rgba(244,100,10,0.06);

  /* Fonts */
  --font-heading: 'Bebas Neue', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Spacing & Radii */
  --radius-sm:    8px;
  --radius-card:  14px;
  --radius-lg:    18px;
  --radius-xl:    24px;
  --radius-full:  999px;
  --radius-btn:   8px;
  --radius-input: 8px;
  --max-width:    1120px;
  --transition:   0.25s ease;
  --transition-slow: 0.4s ease;
}

/* ═══════════════════════════════════════
   2. LIGHT THEME OVERRIDES
   ═══════════════════════════════════════ */
[data-theme="light"] {
  --color-bg:            #F5F4F0;
  --color-surface:       #FFFFFF;
  --color-surface2:      #EDECE8;
  --color-surface3:      #E2E1DC;
  --color-border:        #D8D7D2;
  --color-border-hover:  #C0BFB9;
  --color-primary:       #E45A00;
  --color-primary-hover: #F4640A;
  --color-primary-glow:  rgba(228,90,0,0.10);
  --color-primary-subtle:rgba(228,90,0,0.05);
  --color-yellow:        #D49E00;
  --color-yellow-glow:   rgba(212,158,0,0.10);
  --color-text:          #1A1D26;
  --color-text-secondary:#3D4050;
  --color-muted:         #6E7282;
  --color-white:         #FFFFFF;

  --glass-bg: rgba(255,255,255,0.65);
  --glass-border: rgba(0,0,0,0.06);

  --shadow-sm:   0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:   0 4px 14px rgba(0,0,0,0.08);
  --shadow-lg:   0 10px 40px rgba(0,0,0,0.10);
  --shadow-glow: 0 0 30px rgba(244,100,10,0.05);
  --shadow-card: 0 1px 4px rgba(0,0,0,0.04);
  --shadow-card-hover: 0 8px 30px rgba(0,0,0,0.08), 0 0 40px rgba(244,100,10,0.04);
}

/* ═══════════════════════════════════════
   3. GLOBAL RESET
   ═══════════════════════════════════════ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  transition: background-color var(--transition-slow), color var(--transition-slow);
}
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-slow), color var(--transition-slow);
  overflow-x: hidden;
}
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--color-primary-hover); }
img { max-width: 100%; display: block; }
ul { list-style: none; }
::selection {
  background: var(--color-primary);
  color: var(--color-white);
}

/* ═══════════════════════════════════════
   4. LAYOUT
   ═══════════════════════════════════════ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}
.section     { padding: 72px 0; }
.section-sm  { padding: 48px 0; }
.section-lg  { padding: 100px 0; }

/* Angled section dividers */
.section-angled {
  position: relative;
}
.section-angled::before {
  content: '';
  position: absolute;
  top: -40px;
  left: 0;
  right: 0;
  height: 80px;
  background: inherit;
  transform: skewY(-2deg);
  z-index: -1;
}

/* ═══════════════════════════════════════
   5. TYPOGRAPHY
   ═══════════════════════════════════════ */
h1 {
  font-family: var(--font-heading);
  font-size: clamp(42px, 6vw, 72px);
  letter-spacing: 2px;
  line-height: 1.0;
  color: var(--color-text);
}
h2 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: 1px;
  color: var(--color-text);
}
h3 {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text);
}
h4 {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
}
p { margin-bottom: 1rem; color: var(--color-text); }
.text-muted   { color: var(--color-muted); }
.text-orange  { color: var(--color-primary); }
.text-yellow  { color: var(--color-yellow); }
.text-mono    { font-family: var(--font-mono); }
.text-center  { text-align: center; }
.text-upper   { text-transform: uppercase; letter-spacing: 1px; }

/* Gradient text utility */
.grad-text {
  background: linear-gradient(135deg, var(--color-primary), var(--color-yellow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ═══════════════════════════════════════
   6. NAVBAR
   ═══════════════════════════════════════ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 64px;
  background: var(--glass-bg);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  transition: background-color var(--transition-slow), border-color var(--transition-slow);
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo-img {
  height: 30px;
  width: auto;
  display: block;
}
/* make logo visible in light mode */
[data-theme="light"] .nav-logo-img {
  filter: brightness(0.2);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-muted);
  transition: color var(--transition);
  position: relative;
  padding: 4px 0;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-yellow));
  transition: width var(--transition);
  border-radius: 1px;
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a:hover,
.nav-links a.active { color: var(--color-text); }

/* Nav right group */
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Theme Toggle */
.theme-toggle {
  width: 38px;
  height: 38px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
  padding: 0;
}
.theme-toggle:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-subtle);
  transform: rotate(15deg);
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
}
.theme-toggle .icon-sun  { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun  { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

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

/* ═══════════════════════════════════════
   7. BUTTONS
   ═══════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 13px 28px;
  border-radius: var(--radius-btn);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1;
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, #FF8C3A 100%);
  color: var(--color-white);
  box-shadow: 0 4px 15px rgba(244,100,10,0.3);
}
.btn-primary:hover {
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(244,100,10,0.4);
}
.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-secondary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-subtle);
}
.btn-sm   { padding: 9px 18px; font-size: 11px; }
.btn-lg   { padding: 16px 34px; font-size: 14px; }
.btn-full { width: 100%; justify-content: center; }

/* ═══════════════════════════════════════
   8. CARDS — Glassmorphism
   ═══════════════════════════════════════ */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 28px;
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.card:hover {
  border-color: var(--color-border-hover);
}
.card-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid var(--glass-border);
}
.card-interactive:hover {
  border-color: var(--color-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}
.card-sm { padding: 18px; }
.card-lg { padding: 40px; }

/* ═══════════════════════════════════════
   9. TOOL CARDS
   ═══════════════════════════════════════ */
.tool-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  box-shadow: var(--shadow-card);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
/* Subtle top accent line */
.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-yellow));
  opacity: 0;
  transition: opacity var(--transition);
}
.tool-card:hover::before { opacity: 1; }
.tool-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  color: var(--color-text);
}
.tool-card-icon {
  font-size: 30px;
  margin-bottom: 4px;
  width: 52px;
  height: 52px;
  background: var(--color-surface2);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tool-card-name {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
}
.tool-card-desc {
  font-size: 13px;
  color: var(--color-muted);
  line-height: 1.6;
}
.tool-card-arrow {
  margin-top: auto;
  font-size: 12px;
  color: var(--color-primary);
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: transform var(--transition);
}
.tool-card:hover .tool-card-arrow {
  transform: translateX(6px);
}

/* Tools index page grid */
.tools-index-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Tool category */
.tools-category {
  margin-bottom: 56px;
}
.tools-category-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}
.tools-category-header h2 {
  font-size: 24px;
  margin: 0;
}
.tools-category-icon { font-size: 24px; }

/* ═══════════════════════════════════════
   10. GRID LAYOUTS
   ═══════════════════════════════════════ */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ═══════════════════════════════════════
   11. PAGE HERO (Sub-pages) — Dramatic
   ═══════════════════════════════════════ */
.page-hero {
  padding: 72px 0 56px;
  position: relative;
  overflow: hidden;
  background: var(--color-surface);
  border-bottom: none;
}
/* Diagonal bottom edge */
.page-hero::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--color-bg);
  clip-path: polygon(0 60%, 100% 0, 100% 100%, 0 100%);
}
/* Decorative gradient orbs */
.page-hero .hero-orb-1 {
  position: absolute;
  top: -80px;
  right: -40px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, var(--color-primary-glow) 0%, transparent 65%);
  pointer-events: none;
  border-radius: 50%;
}
.page-hero .hero-orb-2 {
  position: absolute;
  bottom: 20px;
  left: 10%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--color-yellow-glow) 0%, transparent 65%);
  pointer-events: none;
  border-radius: 50%;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.breadcrumb a {
  color: var(--color-muted);
  transition: color var(--transition);
}
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb span { color: var(--color-muted); }
.breadcrumb .breadcrumb-current { color: var(--color-text); }

/* Page hero badge */
.page-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: var(--color-primary-glow);
  border: 1px solid rgba(244,100,10,0.25);
  color: var(--color-primary);
  margin-bottom: 20px;
}

/* Page hero typography */
.page-hero h1 {
  margin-bottom: 18px;
  position: relative;
}
.page-hero p {
  font-size: 16px;
  color: var(--color-muted);
  max-width: 520px;
  line-height: 1.8;
  margin: 0;
}

/* ═══════════════════════════════════════
   12. HERO SECTION (Homepage)
   ═══════════════════════════════════════ */
.hero {
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-primary-glow);
  border: 1px solid rgba(244,100,10,0.25);
  color: var(--color-primary);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 24px;
}
.hero h1 span { color: var(--color-primary); }
.hero-sub {
  font-size: 16px;
  color: var(--color-muted);
  max-width: 540px;
  margin: 16px 0 32px;
  line-height: 1.8;
}
.hero-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════
   13. CALCULATOR FORM
   ═══════════════════════════════════════ */
.calculator-wrap {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 36px;
  margin: 40px 0;
  box-shadow: var(--shadow-card);
  position: relative;
}
/* Gradient accent bar at top */
.calculator-wrap::before {
  content: '';
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-yellow));
  border-radius: 0 0 4px 4px;
}
.calc-title {
  font-family: var(--font-heading);
  font-size: 30px;
  letter-spacing: 1px;
  margin-bottom: 28px;
  color: var(--color-text);
}
.form-group { margin-bottom: 22px; }
.form-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-muted);
  margin-bottom: 8px;
  font-family: var(--font-body);
}
.form-input,
.form-select,
textarea.form-input {
  width: 100%;
  background: var(--color-surface2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-input);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 13px 18px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
}
textarea.form-input {
  min-height: 140px;
  resize: vertical;
  line-height: 1.6;
}
.form-input:focus,
.form-select:focus,
textarea.form-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-glow), 0 0 20px var(--color-primary-glow);
}
.form-input::placeholder,
textarea.form-input::placeholder {
  color: var(--color-muted);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-hint { font-size: 11px; color: var(--color-muted); margin-top: 5px; }

/* ═══════════════════════════════════════
   14. RESULT BOX
   ═══════════════════════════════════════ */
.result-box {
  background: var(--color-surface2);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-yellow);
  border-radius: var(--radius-card);
  padding: 24px 28px;
  margin-top: 24px;
  display: none;
}
.result-box.visible { display: block; }
.result-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-muted);
  margin-bottom: 6px;
  font-family: var(--font-mono);
}
.result-value {
  font-family: var(--font-mono);
  font-size: 38px;
  font-weight: 600;
  color: var(--color-yellow);
  line-height: 1;
  margin-bottom: 6px;
}
.result-unit { font-size: 13px; color: var(--color-muted); }
.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 12px;
}
.result-item {
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  border: 1px solid var(--color-border);
}

/* ═══════════════════════════════════════
   15. BADGE / TAG
   ═══════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: var(--radius-full);
}
.badge-orange {
  background: var(--color-primary-glow);
  border: 1px solid rgba(244,100,10,0.25);
  color: var(--color-primary);
}
.badge-yellow {
  background: var(--color-yellow-glow);
  border: 1px solid rgba(242,183,5,0.25);
  color: var(--color-yellow);
}
.badge-muted {
  background: var(--color-surface2);
  border: 1px solid var(--color-border);
  color: var(--color-muted);
}

/* ═══════════════════════════════════════
   16. SECTION HEADER
   ═══════════════════════════════════════ */
.section-header { margin-bottom: 48px; }
.section-header h2 { margin-bottom: 8px; }
.section-header p {
  color: var(--color-muted);
  font-size: 15px;
  max-width: 480px;
}
.section-header.centered { text-align: center; }
.section-header.centered p { margin: 0 auto; }

/* ═══════════════════════════════════════
   17. PROSE / LONG-FORM CONTENT
   ═══════════════════════════════════════ */
.prose {
  max-width: 740px;
}
.prose h2 {
  font-family: var(--font-heading);
  font-size: 30px;
  margin: 48px 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
  position: relative;
}
/* Gradient underline on prose h2 */
.prose h2::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-yellow));
  border-radius: 2px;
}
.prose h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 32px 0 14px;
  color: var(--color-text);
}
.prose p {
  font-size: 15px;
  line-height: 1.85;
  color: var(--color-text-secondary);
  margin-bottom: 20px;
}
.prose ul, .prose ol {
  margin: 0 0 20px 0;
  padding-left: 20px;
  list-style: disc;
}
.prose li {
  font-size: 15px;
  line-height: 1.85;
  color: var(--color-text-secondary);
  margin-bottom: 8px;
}
.prose strong { color: var(--color-text); font-weight: 600; }
.prose a { color: var(--color-primary); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--color-primary-hover); }

/* Last updated badge (legal pages) */
.last-updated {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-muted);
  letter-spacing: 1px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 7px 16px;
  margin-bottom: 32px;
}

/* ═══════════════════════════════════════
   18. PROFILE CARD (About Page)
   ═══════════════════════════════════════ */
.profile-card {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 36px;
  margin-bottom: 48px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
/* Top gradient accent */
.profile-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-yellow));
}
/* Decorative corner glow */
.profile-card::after {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--color-primary-glow) 0%, transparent 70%);
  pointer-events: none;
  border-radius: 50%;
}
.profile-photo {
  width: 130px;
  height: 130px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  object-position: center 15%;
  border: 3px solid var(--color-border);
  box-shadow: 0 0 30px var(--color-primary-glow), var(--shadow-md);
  flex-shrink: 0;
  transition: all var(--transition);
}
.profile-card:hover .profile-photo {
  border-color: var(--color-primary);
  transform: scale(1.02);
}
.profile-photo-placeholder {
  width: 130px;
  height: 130px;
  border-radius: var(--radius-lg);
  background: var(--color-surface2);
  border: 3px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  flex-shrink: 0;
}
.profile-info { flex: 1; position: relative; z-index: 1; }
.profile-name {
  font-family: var(--font-heading);
  font-size: 28px;
  letter-spacing: 1px;
  color: var(--color-text);
  margin-bottom: 4px;
}
.profile-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 16px;
}
.profile-bio {
  font-size: 14px;
  line-height: 1.75;
  color: var(--color-muted);
  margin-bottom: 18px;
}
.profile-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.profile-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-muted);
  padding: 7px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  transition: all var(--transition);
  text-decoration: none;
}
.profile-link:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-subtle);
  transform: translateY(-1px);
}
.profile-link svg { flex-shrink: 0; }

/* About page — feature grid */
.about-features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin: 28px 0 48px;
}
.about-feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 22px;
  box-shadow: var(--shadow-card);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.about-feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--color-primary), var(--color-yellow));
  border-radius: 3px 0 0 3px;
}
.about-feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}
.about-feature-icon {
  font-size: 24px;
  margin-bottom: 10px;
}
.about-feature-card h3 {
  font-size: 16px;
  margin-bottom: 6px;
}
.about-feature-card p {
  font-size: 13px;
  color: var(--color-muted);
  margin: 0;
  line-height: 1.65;
}

/* About page — CTA buttons */
.about-cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* ═══════════════════════════════════════
   19. CONTACT PAGE — Split Layout
   ═══════════════════════════════════════ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
  align-items: flex-start;
}
.contact-info-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 24px;
}
.contact-info-icon {
  font-size: 20px;
  width: 48px;
  height: 48px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.contact-info-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 4px;
}
.contact-info-val {
  font-size: 14px;
  color: var(--color-text);
}
.contact-info-val a { color: var(--color-primary); }

/* ═══════════════════════════════════════
   20. BLOG CARDS — Layered
   ═══════════════════════════════════════ */
.blog-index-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.blog-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: all var(--transition);
  position: relative;
}
.blog-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-yellow));
  opacity: 0;
  transition: opacity var(--transition);
}
.blog-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}
.blog-card:hover::before { opacity: 1; }
.blog-card-thumb {
  height: 170px;
  background: linear-gradient(135deg, var(--color-surface2), var(--color-surface3));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}
.blog-card-img {
  width: 100%;
  height: 180px;
  background: var(--color-surface2);
  overflow: hidden;
  position: relative;
}
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  background: linear-gradient(135deg, var(--color-surface2), var(--color-surface3));
}
.blog-card-body {
  padding: 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.blog-card-cat {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 10px;
}
.blog-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 10px;
  line-height: 1.4;
}
.blog-card-excerpt {
  font-size: 13px;
  color: var(--color-muted);
  line-height: 1.65;
  flex: 1;
}
.blog-card-meta {
  font-size: 11px;
  color: var(--color-muted);
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.blog-card-meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--color-border);
}

/* ═══════════════════════════════════════
   21. 404 / ERROR PAGE
   ═══════════════════════════════════════ */
.error-page {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 0;
  position: relative;
  overflow: hidden;
}
/* Background decorative gradient */
.error-page::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--color-primary-glow) 0%, transparent 60%);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.error-code {
  font-family: var(--font-heading);
  font-size: clamp(110px, 22vw, 200px);
  letter-spacing: 8px;
  line-height: 1;
  margin-bottom: 12px;
  position: relative;
  background: linear-gradient(135deg, var(--color-primary), var(--color-yellow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.7;
}
.error-page h1 { margin-bottom: 16px; }
.error-page p {
  color: var(--color-muted);
  max-width: 420px;
  margin: 0 auto 36px;
  font-size: 16px;
}
.error-page-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════
   22. WARNING CARD (Disclaimer)
   ═══════════════════════════════════════ */
.warning-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 28px;
  margin-bottom: 36px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.warning-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--color-yellow), var(--color-primary));
}
.warning-card-inner {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.warning-card-icon {
  font-size: 28px;
  flex-shrink: 0;
}
.warning-card h3 {
  margin-bottom: 8px;
  color: var(--color-yellow);
}
.warning-card p {
  margin: 0;
  font-size: 14px;
  color: var(--color-muted);
  line-height: 1.7;
}

/* ═══════════════════════════════════════
   23. LEGAL CTA ROW
   ═══════════════════════════════════════ */
.legal-cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 48px;
}

.contact-card-inline {
  display: inline-block;
  margin-top: 16px;
}

/* ═══════════════════════════════════════
   24. DIVIDER
   ═══════════════════════════════════════ */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border), transparent);
  margin: 48px 0;
}

/* ═══════════════════════════════════════
   25. CTA SECTION
   ═══════════════════════════════════════ */
.cta-card-centered {
  text-align: center;
  padding: 56px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.cta-card-centered::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, var(--color-primary-glow) 0%, transparent 65%);
  pointer-events: none;
  border-radius: 50%;
}
.cta-card-centered h2 { margin-bottom: 10px; }
.cta-card-centered p {
  color: var(--color-muted);
  max-width: 400px;
  margin: 0 auto 28px;
}
.cta-icon { font-size: 36px; margin-bottom: 14px; }

/* ═══════════════════════════════════════
   26. FOOTER — Premium
   ═══════════════════════════════════════ */
.footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 48px 0 28px;
  margin-top: 100px;
  transition: background-color var(--transition-slow), border-color var(--transition-slow);
  position: relative;
}
/* Top gradient line */
.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-primary), var(--color-yellow), transparent);
}
.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.footer-brand { max-width: 280px; }
.footer-brand .nav-logo {
  margin-bottom: 14px;
  display: inline-flex;
}
.footer-brand p {
  font-size: 13px;
  color: var(--color-muted);
  margin-top: 10px;
  line-height: 1.65;
}
.footer-col {}
.footer-links-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-muted);
  font-family: var(--font-mono);
  margin-bottom: 6px;
}
.footer-links-group a {
  font-size: 13px;
  color: var(--color-muted);
  transition: all var(--transition);
}
.footer-links-group a:hover {
  color: var(--color-primary);
  transform: translateX(3px);
}
.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p {
  font-size: 12px;
  color: var(--color-muted);
  margin: 0;
}
.footer-free-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-primary);
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ═══════════════════════════════════════
   27. ANIMATIONS
   ═══════════════════════════════════════ */
/* Lazy image fade-in */
img { opacity: 0; transition: opacity 0.5s ease; }
img.img-loaded { opacity: 1; }
img:not([data-src]) { opacity: 1; }

/* Don't hide logo and profile photos */
.nav-logo-img,
.profile-photo,
.tool-card-icon img { opacity: 1; }

/* Scroll animations — visible by default, enhanced with JS */
.anim-up {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
/* JS adds this class to enable animation ONLY after observer is ready */
.anim-ready .anim-up {
  opacity: 0;
  transform: translateY(32px);
}
.anim-ready .anim-up.anim-visible {
  opacity: 1;
  transform: translateY(0);
}
.anim-ready .anim-up:nth-child(2)  { transition-delay: 0.08s; }
.anim-ready .anim-up:nth-child(3)  { transition-delay: 0.16s; }
.anim-ready .anim-up:nth-child(4)  { transition-delay: 0.24s; }
.anim-ready .anim-up:nth-child(5)  { transition-delay: 0.32s; }
.anim-ready .anim-up:nth-child(6)  { transition-delay: 0.40s; }

/* ═══════════════════════════════════════
   28. UTILITIES
   ═══════════════════════════════════════ */
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-40 { margin-top: 40px; }
.mt-60 { margin-top: 60px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-40 { margin-bottom: 40px; }
.flex  { display: flex; }
.flex-center  { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.w-full { width: 100%; }
.hidden  { display: none; }
.visible { display: block; }

/* ═══════════════════════════════════════
   29. RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 900px) {
  .blog-index-grid { grid-template-columns: repeat(2, 1fr); }
  .tools-index-grid { grid-template-columns: repeat(2, 1fr); }
  .about-features-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 40px; }
  .hero-btns { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }

  /* Mobile nav — glass overlay */
  .nav-links {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 40px 28px;
    gap: 0;
    border-top: 1px solid var(--color-border);
    z-index: 99;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    font-size: 16px;
    padding: 18px 0;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid var(--color-border);
  }
  .nav-links a::after { display: none; }
  .nav-hamburger { display: flex; }

  /* Footer */
  .footer-top { flex-direction: column; gap: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; }

  /* Calculator */
  .calculator-wrap { padding: 24px; }

  /* Profile card */
  .profile-card { flex-direction: column; align-items: center; text-align: center; }
  .profile-links { justify-content: center; }

  /* Contact grid */
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }

  /* Page hero */
  .page-hero { padding: 48px 0 40px; }
  .page-hero::after { height: 30px; }
}

@media (max-width: 560px) {
  .blog-index-grid { grid-template-columns: 1fr; }
  .tools-index-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }
  h1 { font-size: 38px; }
  .result-value { font-size: 28px; }
  .page-hero h1 { font-size: clamp(34px, 9vw, 52px); }
  .error-code { font-size: clamp(80px, 20vw, 130px); }
  .about-features-grid { grid-template-columns: 1fr; }
}