/* ============================================================
   GLOBAL STYLES — AMG Petronas Green Theme
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300&family=Inter:wght@300;400;500&display=swap");

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --petronas-teal: #00d2be;
  --petronas-green: #00a19c;
  --petronas-dark: #007a76;
  --petronas-glow: rgba(0, 210, 190, 0.15);
  --petronas-glow-lg: rgba(0, 210, 190, 0.35);

  --bg-void: #050a0a;
  --bg-deep: #080f0e;
  --bg-surface: #0d1918;
  --bg-card: #111e1d;
  --bg-card-hover: #162524;
  --bg-glass: rgba(13, 25, 24, 0.7);

  --text-primary: #e8f5f4;
  --text-secondary: #8bbab8;
  --text-muted: #4a7a78;
  --text-accent: var(--petronas-teal);

  --border-subtle: rgba(0, 210, 190, 0.08);
  --border-glow: rgba(0, 210, 190, 0.35);

  --font-display: "Rajdhani", sans-serif;
  --font-mono: "DM Mono", monospace;
  --font-body: "Inter", sans-serif;

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-med: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  background-color: var(--bg-void);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: var(--bg-void);
}
::-webkit-scrollbar-thumb {
  background: var(--petronas-dark);
  border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--petronas-teal);
}

/* ── Typography ────────────────────────────────────────────── */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.15;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
}
h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
}
h3 {
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
}

a {
  color: var(--petronas-teal);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--text-primary);
}

code,
pre {
  font-family: var(--font-mono);
  font-size: 0.88em;
}

pre {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--petronas-teal);
  padding: 1.25rem 1.5rem;
  border-radius: 0 8px 8px 0;
  overflow-x: auto;
  margin: 2rem 0;
}

/* ── Layout ────────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 6rem 0;
}

/* ── Teal Accent Line ──────────────────────────────────────── */
.accent-line {
  display: inline-block;
  width: 3rem;
  height: 3px;
  background: linear-gradient(90deg, var(--petronas-teal), transparent);
  margin-bottom: 1rem;
}

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.75rem;
  transition:
    border-color var(--transition-med),
    background var(--transition-med),
    transform var(--transition-med);
}

.card:hover {
  border-color: var(--border-glow);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
}

/* ── Glow Button ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.5rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-med);
}

.btn-primary {
  background: transparent;
  color: var(--petronas-teal);
  border: 1px solid var(--petronas-teal);
}

.btn-primary:hover {
  background: var(--petronas-glow);
  box-shadow: 0 0 24px var(--petronas-glow-lg);
  color: var(--petronas-teal);
}

/* ── Tag / Badge ───────────────────────────────────────────── */
.tag {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--petronas-teal);
  background: var(--petronas-glow);
  border: 1px solid rgba(0, 210, 190, 0.2);
  border-radius: 3px;
  letter-spacing: 0.04em;
}

/* ── Glow Divider ──────────────────────────────────────────── */
.glow-divider {
  border: none;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--petronas-teal),
    transparent
  );
  margin: 4rem 0;
  opacity: 0.3;
  margin: 4rem auto;
}

/* ── Noise texture overlay ─────────────────────────────────── */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ── Utility ───────────────────────────────────────────────── */
.text-muted {
  color: var(--text-muted);
}
.text-accent {
  color: var(--petronas-teal);
}
.font-mono {
  font-family: var(--font-mono);
}
.font-display {
  font-family: var(--font-display);
}

/* ── Prose (blog posts) ────────────────────────────────────── */
.prose {
  max-width: 72ch;
  color: var(--text-secondary);
}
.prose h2,
.prose h3 {
  color: var(--text-primary);
  margin: 2.5rem 0 1rem;
}
.prose p {
  margin-bottom: 1.4rem;
}
.prose ul,
.prose ol {
  padding-left: 1.5rem;
  margin-bottom: 1.4rem;
}
.prose li {
  margin-bottom: 0.4rem;
}
.prose blockquote {
  border-left: 3px solid var(--petronas-teal);
  padding-left: 1.25rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 2rem 0;
}
.prose img {
  border-radius: 8px;
  width: 100%;
  border: 1px solid var(--border-subtle);
}
.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.prose strong {
  color: var(--text-primary);
  font-weight: 500;
}
.prose code {
  background: var(--bg-surface);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  color: var(--petronas-teal);
}
