/* ==========================================================================
   Oahidur Islam Roman — Portfolio
   main.css — design tokens, reset, base typography, layout primitives
   ========================================================================== */

:root {
  /* ---- Atmosphere / background ---- */
  --bg-0: #0c1319;   /* deepest edge tone, used for vignette */
  --bg-1: #17232d;   /* primary base */
  --bg-2: #20313d;   /* secondary base */
  --bg-3: #223846;   /* lifted mid tone */

  /* ---- Ambient light colors (used for glows, accents, gradients only —
     never as solid fills) ---- */
  --light-cyan: #7fe3ef;
  --light-blue: #6ea8ff;
  --light-lavender: #b6a6ff;
  --light-peach: #ffb98f;

  /* ---- Text ---- */
  --text-primary: rgba(255, 255, 255, 0.96);
  --text-secondary: rgba(255, 255, 255, 0.68);
  --text-tertiary: rgba(255, 255, 255, 0.44);
  --text-on-glass-strong: rgba(255, 255, 255, 0.92);

  /* ---- Radius ---- */
  --radius-pill: 999px;
  --radius-card: 24px;
  --radius-card-lg: 32px;
  --radius-sm: 14px;

  /* ---- Spacing scale (fluid) ---- */
  --space-1: clamp(0.5rem, 0.46rem + 0.2vw, 0.625rem);
  --space-2: clamp(0.75rem, 0.68rem + 0.35vw, 1rem);
  --space-3: clamp(1.25rem, 1.1rem + 0.6vw, 1.75rem);
  --space-4: clamp(2rem, 1.8rem + 1vw, 2.75rem);
  --space-5: clamp(3rem, 2.6rem + 1.8vw, 4.5rem);
  --space-6: clamp(4.5rem, 3.8rem + 3vw, 7.5rem);
  --space-7: clamp(6rem, 5vw + 4rem, 10rem);

  /* ---- Container ---- */
  --container-max: 1280px;
  --container-pad: clamp(1.25rem, 4vw, 3rem);

  /* ---- Shadows ---- */
  --shadow-soft: 0 20px 60px -20px rgba(0, 0, 0, 0.45);
  --shadow-lift: 0 30px 90px -24px rgba(0, 0, 0, 0.55);
  --shadow-inner-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.16);

  /* ---- Motion ---- */
  --ease-glass: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 200ms;
  --duration-normal: 420ms;
  --duration-slow: 900ms;
  --duration-ambient: 26s;

  /* ---- Typography ---- */
  --font-display: "Plus Jakarta Sans", "Inter", system-ui, -apple-system,
    "Segoe UI", sans-serif;

  --fs-hero: clamp(2.75rem, 2rem + 4.2vw, 5.75rem);
  --fs-h1: clamp(2.25rem, 1.8rem + 2.4vw, 3.5rem);
  --fs-h2: clamp(1.75rem, 1.5rem + 1.4vw, 2.5rem);
  --fs-h3: clamp(1.25rem, 1.1rem + 0.8vw, 1.625rem);
  --fs-body-lg: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  --fs-body: 1rem;
  --fs-sm: 0.875rem;
  --fs-xs: 0.75rem;
}

/* ==========================================================================
   Reset
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  min-height: 100svh;
  background-color: var(--bg-1);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
picture,
svg {
  display: block;
  max-width: 100%;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

input,
textarea,
select {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4,
p,
figure {
  margin: 0;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1,
h2,
h3,
h4 {
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.eyebrow {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.hero-name {
  font-size: var(--fs-hero);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.02;
}

.text-lg {
  font-size: var(--fs-body-lg);
  color: var(--text-secondary);
  font-weight: 400;
}

.text-secondary {
  color: var(--text-secondary);
}

.text-tertiary {
  color: var(--text-tertiary);
}

/* ==========================================================================
   Layout primitives
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section {
  position: relative;
  padding-block: var(--space-6);
}

.stack {
  display: flex;
  flex-direction: column;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: var(--space-3);
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--bg-1);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  transition: top var(--duration-fast) var(--ease-standard);
}

.skip-link:focus {
  top: var(--space-2);
}

/* ==========================================================================
   Focus states — accessibility, never suppressed
   ========================================================================== */

:focus-visible {
  outline: 2px solid var(--light-cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.75rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--radius-pill);
  transition: transform var(--duration-fast) var(--ease-standard),
    background-color var(--duration-fast) var(--ease-standard),
    border-color var(--duration-fast) var(--ease-standard);
  white-space: nowrap;
}

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

.btn-primary:hover {
  transform: translateY(-1px);
}

.btn-secondary {
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.28);
}

@media (prefers-reduced-motion: reduce) {
  .btn-primary:hover {
    transform: none;
  }
}
