/**
 * Digich.org: Shared Design System
 * Common variables, reset, typography, and utilities used across all pages.
 * Include this file in every HTML page before page-specific <style> blocks.
 */

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

/* ══ DESIGN TOKENS (Dark Mode, Default) ══ */
:root {
  --bg: #191a1f;
  --bg-1: #1d1f27;
  --bg-2: #22242e;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-h: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.07);
  --border-h: rgba(255, 255, 255, 0.14);
  --text: #ffffff;
  --text-2: rgba(255, 255, 255, 0.62);
  --text-3: rgba(255, 255, 255, 0.35);
  --blue: #4f9eff;
  --blue-dim: rgba(79, 158, 255, 0.10);
  --blue-mid: rgba(79, 158, 255, 0.22);
  --cyan: #00d4c8;
  --purple: #00d4c8;
  --green: #30d158;
  --orange: #4f9eff;
  --rose: #ff453a;
  --grad: linear-gradient(135deg, #4f9eff 0%, #9b6dff 55%, #00d4c8 100%);
  --grad-b: linear-gradient(135deg, #4f9eff 0%, #9b6dff 55%, #00d4c8 100%);
  --radius: 14px;
  --radius-lg: 22px;
  --radius-xl: 30px;
  --shadow: 0 8px 32px rgba(0, 0, 0, .45);
  --glow: 0 0 40px rgba(79, 158, 255, .18);
  --tr: 0.28s cubic-bezier(.4, 0, .2, 1);
}

/* ══ LIGHT MODE TOKENS ══ */
html.light {
  --bg: #f2f3f7;
  --bg-1: #ffffff;
  --bg-2: #e8eaf0;
  --surface: rgba(0, 0, 0, 0.045);
  --surface-h: rgba(0, 0, 0, 0.08);
  --border: rgba(0, 0, 0, 0.09);
  --border-h: rgba(0, 0, 0, 0.18);
  --text: #0d0f18;
  --text-2: rgba(13, 15, 24, 0.58);
  --text-3: rgba(13, 15, 24, 0.32);
  --blue: #1d68e8;
  --blue-dim: rgba(29, 104, 232, 0.09);
  --blue-mid: rgba(29, 104, 232, 0.22);
  --shadow: 0 8px 32px rgba(0, 0, 0, .10);
  --glow: 0 0 40px rgba(29, 104, 232, .15);
}

/* ══ BASE STYLES ══ */
html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
}

a {
  color: var(--blue);
  text-decoration: none;
}

input, select, textarea {
  font-family: inherit;
}

/* ══ LAYOUT ══ */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ══ UTILITIES ══ */
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--blue-dim);
  border: none;
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
  box-shadow: 0 2px 10px rgba(79, 158, 255, .08);
  margin-bottom: 20px;
}

.chip .material-icons-round {
  font-size: 15px;
  color: var(--blue);
}

/* ══ SHARED SUB-NAV (used on portfolio, blog, case-studies, careers) ══ */
.sub-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(25, 26, 31, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: none;
  padding: 14px 0;
}

html.light .sub-nav {
  background: rgba(242, 243, 247, 0.92);
}

.sub-nav-inner {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sub-nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #4f9eff 0%, #9b6dff 55%, #00d4c8 100%);
  display: grid;
  place-items: center;
}

.logo-mark .material-icons-round {
  font-size: 18px;
  color: #fff;
}

.logo-dot {
  color: var(--blue);
}

.sub-nav-back {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--text-3);
  margin-left: auto;
  transition: var(--tr);
}

.sub-nav-back:hover {
  color: var(--text);
}

.sub-nav-back .material-icons-round {
  font-size: 16px;
}

/* ══ SMOOTH THEME TRANSITION ══ */
.theme-transitioning *,
.theme-transitioning *::before,
.theme-transitioning *::after {
  transition: background-color 0.32s ease, border-color 0.32s ease,
    color 0.32s ease, box-shadow 0.32s ease !important;
}
