/* --- Custom Properties ------------------------------------ */
:root {
  --surface-lowest:      #000000;
  --surface:             #0e0e0e;
  --surface-container-low:  #131313;
  --surface-container:      #1a1a1a;
  --surface-container-high: #1f1f1f;
  --surface-container-highest: #262626;
  --surface-bright:      #2c2c2c;

  --primary:             #ff9065;
  --primary-container:   #c45e30;
  --on-primary:          #000000;
  --primary-glow:        rgba(255, 144, 101, 0.10);

  /* Color — Text */
  --on-surface:          #e0e0e0;
  --on-surface-variant:  #ababab;
  --on-surface-dim:      #6e6e6e;
  --on-surface-retired:  #484848;

  /* Color — Semantic */
  --color-link:          #ff9065;
  --color-link-hover:    #ffb599;
  --color-danger:        #f87171;
  --color-success:       #34d399;
  --error-container:     rgba(248, 113, 113, 0.05);

  /* Color — Utility */
  --outline-variant:     #484848;
  --ghost-border:        rgba(72, 72, 72, 0.15);

  /* Spacing scale (4px base) */
  --space-2xs: 0.125rem;  /*  2px */
  --space-xs:  0.25rem;   /*  4px */
  --space-sm:  0.5rem;    /*  8px */
  --space-md:  1rem;      /* 16px */
  --space-lg:  1.5rem;    /* 24px */
  --space-xl:  2rem;      /* 32px */
  --space-2xl: 3rem;      /* 48px */
  --space-3xl: 4rem;      /* 64px */
  --space-4xl: 6rem;      /* 96px */

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI',
               Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code',
               'Fira Code', Menlo, monospace;

  --text-xs:   0.75rem;    /* 12px */
  --text-sm:   0.875rem;   /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg:   1.125rem;   /* 18px */
  --text-xl:   1.25rem;    /* 20px */
  --text-2xl:  1.5rem;     /* 24px */
  --text-3xl:  1.875rem;   /* 30px */
  --text-4xl:  2.25rem;    /* 36px */
  --text-display: 3.5rem;  /* 56px — display-lg */

  --leading-tight:  1.15;
  --leading-normal: 1.6;
  --leading-loose:  1.8;

  --weight-normal:  400;
  --weight-medium:  500;
  --weight-semibold:600;
  --weight-bold:    700;

  --tracking-tight: -0.04em;
  --tracking-wide:   0.1em;

  /* Border radius — max 0.75rem per spec */
  --radius-xs:  0.125rem;  /* 2px */
  --radius-sm:  0.25rem;   /* 4px */
  --radius-md:  0.375rem;  /* 6px — buttons */
  --radius-lg:  0.5rem;    /* 8px */
  --radius-xl:  0.75rem;   /* 12px — max allowed */
  --radius-full:9999px;

  /* Glows — no traditional shadows, only ambient glows */
  --glow-active:  0 0 24px var(--primary-glow);
  --glow-subtle:  0 0 12px rgba(255, 144, 101, 0.06);

  /* Glass effects */
  --glass-bg:     rgba(44, 44, 44, 0.30);
  --glass-blur:   blur(12px);
  --smoked-glass: rgba(38, 38, 38, 0.40);
  --smoked-blur:  blur(20px);

  /* Transitions */
  --ease-out:       cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:    cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast:  150ms;
  --duration-normal:300ms;
  --duration-slow:  500ms;

  /* Layout */
  --container-sm:  640px;
  --container-md:  768px;
  --container-lg:  1024px;
  --container-xl:  1200px;
}


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

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

body {
  min-height: 100vh;
  background-color: var(--surface-lowest);
  color: var(--on-surface-variant);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul,
ol {
  list-style: none;
}

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
  color: var(--color-link-hover);
}

::selection {
  background-color: var(--primary);
  color: var(--on-primary);
}


/* --- Typography ------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  color: var(--on-surface);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl);  }
h5 { font-size: var(--text-lg);  }
h6 { font-size: var(--text-base);}

p {
  margin-bottom: var(--space-md);
}

p:last-child {
  margin-bottom: 0;
}

small {
  font-size: var(--text-sm);
  color: var(--on-surface-dim);
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: var(--space-2xs) var(--space-xs);
  background: var(--surface-container-low);
  border-radius: var(--radius-sm);
}


/* --- Layout Utilities ------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-lg);
  margin-inline: auto;
  padding-inline: var(--space-lg);
}

.container--sm { max-width: var(--container-sm); }
.container--md { max-width: var(--container-md); }
.container--xl { max-width: var(--container-xl); }

.section {
  padding-block: var(--space-3xl);
}

.section--sm {
  padding-block: var(--space-xl);
}


/* --- Text Utilities --------------------------------------- */
.text-muted   { color: var(--on-surface-variant); }
.text-dim     { color: var(--on-surface-dim);     }
.text-accent  { color: var(--primary);            }
.text-retired  {
  color: var(--on-surface-retired);
  text-decoration: line-through;
}
.text-center  { text-align: center; }
.text-sm      { font-size: var(--text-sm); }
.text-xs      { font-size: var(--text-xs); }

.font-medium  { font-weight: var(--weight-medium);  }
.font-semibold{ font-weight: var(--weight-semibold); }
.font-bold    { font-weight: var(--weight-bold);    }

/* Section label — "data header" prefix (e.g. "01 / PROJECTS") */
.label-prefix {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}


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

/* Focus-visible — uses ghost border style per spec */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
