/* Hallmark · checked: 2026-10-31 · genre: atmospheric (inferred)
 * built: the project · redesign: polish · v2.0.0 */
/* Hallmark · waive 37 · Rajdhani display, Share Tech Mono labels, system body · three roles, Space Mono was merged into Share Tech Mono */
/* Hallmark · dismissed 41 · --ink is a shadow tint, never a text colour */
/* Hallmark · dismissed 10b · the fixed nav compacts on scroll, one element */
/* Hallmark · dismissed 29 · glass and glow are the site's material, kept at polish depth */
/* Hallmark · dismissed 3 · the blockquote and callout stripes are the post's reading aid */
/* Hallmark · dismissed F15 · layout stays at polish depth */
/* Hallmark · dismissed F24 · glass-container edge and shadow are one surface treatment */
/* ============================================================
   base.css — design tokens, reset, typography, utilities
   ============================================================ */

:root {
  /* Palette */
  --bg:          #080F1B;
  --bg2:         #101C2D;
  --bg3:         #101C2D;
  --blue:        #1E80F5;
  --blue-dim:    #1559A8;
  --blue-glow:   rgba(30, 128, 245, 0.15);
  --cyan:        #13CBE8;
  --cyan-dim:    rgba(19, 203, 232, 0.1);
  --purple:      #7c3aed;
  --mint:        #00ffaa;
  --ink:         #02050b;
  --bg4:         #101C2D;
  --ice:         #9BAABC;
  --green:       #059669;
  --amber:       #f59e0b;
  --border:      rgba(30, 128, 245, 0.2);
  --border-sub:  rgba(30, 128, 245, 0.08);
  --grid-line:   rgba(30, 128, 245, 0.035);
  --text:        #D5DFEA;
  --text2:       #9BAABC;
  --text3:       #9BAABC;

  /* Extra colours lifted from components */
  --x-00ff88: #00ff88;
  --x-ff5f57: #ff5f57;
  --x-ffbd2e: #ffbd2e;
  --x-28c840: #28c840;
  --x-cdd6f4: #cdd6f4;
  --x-6c7086: #6c7086;
  --x-cba6f7: #cba6f7;
  --x-a6e3a1: #a6e3a1;
  --x-fab387: #fab387;
  --x-89b4fa: #89b4fa;
  --x-e8e8e4: #e8e8e4;
  --x-a5b4fc: #a5b4fc;
  --x-0d1f14: #0d1f14;
  --x-1a4028: #1a4028;
  --x-b0b0aa: #b0b0aa;
  --x-1c1600: #1c1600;
  --x-3d2e00: #3d2e00;
  --x-d97706: #d97706;
  --x-13101e: #13101e;
  --x-2e2650: #2e2650;
  --x-252523: #252523;
  --x-052e16: #052e16;
  --x-6ee7b7: #6ee7b7;
  --x-1e1b4b: #1e1b4b;
  --x-2a1800: #2a1800;
  --x-fbbf24: #fbbf24;
  --x-e11d48: #e11d48;

  /* Typography */
  --mono:   'Share Tech Mono', monospace;
  --sans:   'Rajdhani', sans-serif;
  --space:  var(--mono);
  --body:   system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Spacing */
  --gap-sm: 0.75rem;
  --gap-md: 1.5rem;
  --gap-lg: 3rem;
  --gap-xl: 5rem;

  /* Radius */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --r: 0px; /* intentionally zero — sharp pixel aesthetic */
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  line-height: 1.75;
  letter-spacing: 0.015em;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6, .project-title, .exp-panel-role, .blog-card-title {
  font-family: var(--sans);
  letter-spacing: 0.02em;
  text-wrap: balance;
}

/* ── CUSTOM CURSOR ── */
#custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 400px;
  height: 400px;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
  will-change: transform;
}
#custom-cursor::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle closest-side, color-mix(in srgb, var(--blue) 15%, transparent), transparent);
  transition: transform 0.2s;
}
/* When hovering over clickable elements */
body.hovering #custom-cursor::before {
  transform: scale(0.375);
  background: radial-gradient(circle closest-side, color-mix(in srgb, var(--cyan) 30%, transparent), transparent);
}

/* Precise pointer dot */
#custom-cursor::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  background: var(--text);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 8px color-mix(in srgb, var(--cyan) 80%, transparent);
  transition: transform 0.2s, background-color 0.2s;
}

body.hovering #custom-cursor::after {
  transform: translate(-50%, -50%) scale(1.33);
  background: var(--cyan);
}

/* Hide the large glowing blob when reading blog posts */
body.reading-mode #custom-cursor::before {
  background: transparent;
}
body.reading-mode #custom-cursor::after {
  background: var(--blue);
  box-shadow: 0 0 8px color-mix(in srgb, var(--blue) 80%, transparent);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; background: none; border: none; }

button, a, [role="button"] {
  touch-action: manipulation;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Controls only: body text must stay selectable */
button, [role="button"], .btn, .tag, .carousel-btn, .contact-action {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* iOS zooms the page on focus when an input is under 16px */
input, textarea, select {
  font-size: 16px;
}

/* ── GRID BACKGROUND ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ── SCANLINES ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent, transparent 2px,
    color-mix(in srgb, var(--blue) 1%, transparent) 2px, color-mix(in srgb, var(--blue) 1%, transparent) 4px
  );
  pointer-events: none;
  z-index: 1;
}

/* ── AMBIENT ORBS & 3D BG ── */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100dvh;
  z-index: -2;
  pointer-events: none;
}

#mouse-glow {
  position: fixed;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, color-mix(in srgb, var(--cyan) 15%, transparent) 0%, transparent 60%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  filter: blur(40px);
  transition: opacity 0.5s ease;
  will-change: transform;
}

.js #mouse-glow { opacity: 0; }

.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.07;
}
.orb-1 { width: 600px; height: 600px; background: var(--blue);  top: -150px; left: -150px; }
.orb-2 { width: 400px; height: 400px; background: var(--cyan);  bottom: 5%;  right: -80px; }
.orb-3 { width: 300px; height: 300px; background: var(--purple); top: 50%;   left: 40%;    opacity: 0.025; }

/* ── LAYOUT ── */
section {
  position: relative;
  z-index: 2;
  padding: var(--gap-xl) 0;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 2rem;
}

.alt-bg { 
  background: color-mix(in srgb, var(--bg2) 35%, transparent); 
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-sub);
  border-bottom: 1px solid var(--border-sub);
  position: relative;
  overflow: hidden;
}

.alt-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 10% 50%, color-mix(in srgb, var(--blue) 4%, transparent), transparent 40%),
    radial-gradient(circle at 90% 80%, color-mix(in srgb, var(--cyan) 4%, transparent), transparent 40%);
  z-index: 0;
  pointer-events: none;
}

.alt-bg .container {
  position: relative;
  z-index: 1;
}

/* ── SECTION LABELS ── */
.section-label {
  font-family: var(--body);
  font-size: 12px;
  letter-spacing: 0;
  color: var(--blue);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.section-label::after {
  content: '';
  flex: 1;
  max-width: 60px;
  height: 1px;
  background: var(--blue-dim);
}

.section-title {
  font-family: var(--sans);
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--gap-lg);
  letter-spacing: -0.01em;
}

/* ── PIXEL CORNERS ── */
.px-corner {
  position: absolute;
  width: 8px;
  height: 8px;
  border-color: var(--blue);
  border-style: solid;
  opacity: 0.5;
  transition: opacity 0.3s, border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.px-corner.tl { top: 0; left: 0;  border-width: 2px 0 0 2px; }
.px-corner.tr { top: 0; right: 0; border-width: 2px 2px 0 0; }
.px-corner.bl { bottom: 0; left: 0;  border-width: 0 0 2px 2px; }
.px-corner.br { bottom: 0; right: 0; border-width: 0 2px 2px 0; }

/* Explicit Hover Brackets Expansion (works 100% reliably on all elements and pages) */
@media (hover: hover) and (pointer: fine) {
.project-card:hover > .px-corner.tl,
.skill-card:hover > .px-corner.tl,
.terminal-card:hover > .px-corner.tl,
.blog-card:hover > .px-corner.tl,
.contact-action:hover > .px-corner.tl {
  transform: translate(-4px, -4px);
}
}
@media (hover: hover) and (pointer: fine) {
.project-card:hover > .px-corner.tr,
.skill-card:hover > .px-corner.tr,
.terminal-card:hover > .px-corner.tr,
.blog-card:hover > .px-corner.tr,
.contact-action:hover > .px-corner.tr {
  transform: translate(4px, -4px);
}
}
@media (hover: hover) and (pointer: fine) {
.project-card:hover > .px-corner.bl,
.skill-card:hover > .px-corner.bl,
.terminal-card:hover > .px-corner.bl,
.blog-card:hover > .px-corner.bl,
.contact-action:hover > .px-corner.bl {
  transform: translate(-4px, 4px);
}
}
@media (hover: hover) and (pointer: fine) {
.project-card:hover > .px-corner.br,
.skill-card:hover > .px-corner.br,
.terminal-card:hover > .px-corner.br,
.blog-card:hover > .px-corner.br,
.contact-action:hover > .px-corner.br {
  transform: translate(4px, 4px);
}
}
@media (hover: hover) and (pointer: fine) {
.project-card:hover > .px-corner,
.skill-card:hover > .px-corner,
.terminal-card:hover > .px-corner,
.blog-card:hover > .px-corner,
.contact-action:hover > .px-corner {
  opacity: 1;
  border-color: var(--cyan);
  box-shadow: 0 0 6px var(--cyan-dim);
}
}

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  font-family: var(--space);
  font-size: 12px;
  letter-spacing: 0;
  padding: 0.7rem 1.75rem;
  color: var(--blue);
  background: transparent;
  border: none; /* remove default border that gets clipped */
  transition: color 0.2s, transform 160ms var(--ease-out);
  position: relative;
  z-index: 1;
}

/* Outer outline border layer */
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--blue);
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
  z-index: -2;
  transition: background 0.2s, box-shadow 0.2s;
}

/* Inner card body fill inset by 1px to create outline border */
.btn::after {
  content: '';
  position: absolute;
  inset: 1px;
  background: var(--bg);
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
  z-index: -1;
  transition: background 0.2s;
}

@media (hover: hover) and (pointer: fine) {
.btn:hover {
  color: var(--bg);
}
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.4;
  color: var(--text3);
  cursor: not-allowed;
}

.btn:disabled::before,
.btn[aria-disabled="true"]::before {
  background: var(--border-sub);
}

@media (hover: hover) and (pointer: fine) {
.btn:hover::before {
  background: var(--blue);
  box-shadow: 0 0 24px color-mix(in srgb, var(--blue) 35%, transparent);
}
}

@media (hover: hover) and (pointer: fine) {
.btn:hover::after {
  background: var(--blue);
}
}

/* Ghost Button Variations */
.btn-ghost {
  color: var(--text2);
}

.btn-ghost::before {
  background: color-mix(in srgb, var(--blue) 25%, transparent); /* increased default visibility outline */
}

.btn-ghost::after {
  background: color-mix(in srgb, var(--bg2) 60%, transparent); /* subtle glass plate backdrop */
}

@media (hover: hover) and (pointer: fine) {
.btn-ghost:hover {
  color: var(--text);
}
}

@media (hover: hover) and (pointer: fine) {
.btn-ghost:hover::before {
  background: var(--border);
  box-shadow: none;
}
}

@media (hover: hover) and (pointer: fine) {
.btn-ghost:hover::after {
  background: transparent;
}
}

/* ── TAG / CHIP ── */
.tag {
  font-family: var(--body);
  font-size: 12px;
  letter-spacing: 0;
  padding: 2px 8px;
  background: color-mix(in srgb, var(--blue) 3%, transparent); /* subtle database chip background */
  border: 1px solid var(--border-sub);
  color: var(--text3);
  transition: color 0.15s, background-color 0.15s, border-color 0.15s, box-shadow 0.15s, opacity 0.15s, transform 0.15s;
}
@media (hover: hover) and (pointer: fine) {
.tag:hover {
  border-color: var(--blue);
  color: var(--cyan);
  background: color-mix(in srgb, var(--cyan) 5%, transparent);
}
}

/* ── SCROLL REVEAL ── */
.js .reveal {
  opacity: 0;
}
.js .reveal.visible {
  opacity: 1;
  animation: reveal-in 260ms var(--ease-out) backwards;
}
@keyframes reveal-in {
  from { opacity: 0; transform: translateY(14px); }
}
@keyframes reveal-fade {
  from { opacity: 0; }
}

/* ── TYPOGRAPHY UTILS ── */
.mono  { font-family: var(--mono); }
.cyan  { color: var(--cyan); }
.blue  { color: var(--blue); }
.muted { color: var(--text2); }
.dim   { color: var(--text3); }

/* ── 3D TILT UTILS ── */
.project-card, .skill-card, .terminal-card, .blog-card, .contact-action, .nav, .nav-links-group, .nav-logo {
  transform-style: preserve-3d;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-iteration-count: 1 !important;
    transition-property: color, background-color, border-color, box-shadow, opacity !important;
    scroll-behavior: auto !important;
  }
  .nav-scanner-line { animation: none !important; }
  .js .reveal.visible { animation-name: reveal-fade; }
}
