/* ============================================================
   DESIGN SYSTEM — ULAD LUCH PORTFOLIO
   ============================================================ */

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

/* --- Base unit (4px grid) --- */
:root {
  --u-1:   4px;
  --u-2:   8px;
  --u-3:  12px;
  --u-4:  16px;
  --u-5:  20px;
  --u-6:  24px;
  --u-7:  28px;
  --u-8:  32px;
  --u-9:  36px;
  --u-10: 40px;
  --u-11: 44px;
  --u-12: 48px;
  --u-16: 64px;
  --u-20: 80px;
  --u-24: 96px;
}

/* --- Color Palette --- */
:root {
  --gray-900: #111827;
  --gray-800: #1F2937;
  --gray-700: #374151;
  --gray-600: #4B5563;
  --gray-500: #6B7280;
  --gray-400: #9CA3AF;
  --gray-300: #D1D5DB;
  --gray-200: #E5E7EB;
  --gray-100: #F3F4F6;
  --gray-50:  #F9FAFB;
  --white:    #FFFFFF;

  /* --- Semantic aliases --- */

  /* Backgrounds */
  --c-bg:           var(--white);
  --c-bg-subtle:    var(--gray-50);
  --c-bg-muted:     var(--gray-100);

  /* Text */
  --c-text:         var(--gray-900);  /* основной */
  --c-text-secondary: var(--gray-700); /* второстепенный */
  --c-text-muted:   var(--gray-400);  /* приглушённый (footer, captions) */
  --c-text-disabled:var(--gray-300);

  /* Borders */
  --c-border:       var(--gray-200);
  --c-border-strong:var(--gray-300);

  /* Buttons */
  --c-btn-dark-bg:     var(--gray-900);
  --c-btn-dark-text:   var(--white);
  --c-btn-light-bg:    var(--gray-100);
  --c-btn-light-border:var(--gray-200);

  /* --- Typography --- */
  --font: 'Inter', system-ui, -apple-system, sans-serif;

  /* Size scale (on 4px grid where possible) */
  --text-xs:   var(--u-3);   /* 12px */
  --text-sm:   14px;         /* off-grid */
  --text-base: var(--u-4);   /* 16px */
  --text-lg:   18px;         /* off-grid */
  --text-xl:   var(--u-5);   /* 20px */
  --text-2xl:  var(--u-6);   /* 24px */
  --text-3xl:  var(--u-7);   /* 28px */
  --text-4xl:  var(--u-8);   /* 32px */
  --text-5xl:  var(--u-10);  /* 40px */

  /* Weight scale — only two types */
  --weight-regular:   500;  /* Medium — default for all text */
  --weight-emphasize: 700;  /* Bold — for emphasis */

  /* Line-height scale */
  --lh-none:    1;
  --lh-tight:   1.2;
  --lh-snug:    1.375;
  --lh-normal:  1.5;
  --lh-relaxed: 1.625;

  /* Letter-spacing scale */
  --ls-tight:  -0.02em;
  --ls-normal:  0em;
  --ls-wide:    0.025em;
  --ls-wider:   0.05em;

  /* Semantic aliases */
  --type-h1-size:   var(--text-3xl);
  --type-h1-weight: var(--weight-regular);
  --type-h1-lh:     var(--lh-tight);
  --type-h1-ls:     var(--ls-tight);

  --type-h2-size:   var(--text-2xl);
  --type-h2-weight: var(--weight-emphasize);
  --type-h2-lh:     var(--lh-tight);
  --type-h2-ls:     var(--ls-tight);

  --type-h3-size:   var(--text-xl);
  --type-h3-weight: var(--weight-emphasize);
  --type-h3-lh:     var(--lh-snug);
  --type-h3-ls:     var(--ls-normal);

  --type-body-size:   var(--text-base);
  --type-body-weight: var(--weight-regular);
  --type-body-lh:     var(--lh-normal);
  --type-body-ls:     var(--ls-normal);

  --type-label-size:   var(--text-sm);
  --type-label-weight: var(--weight-regular);
  --type-label-lh:     var(--lh-none);
  --type-label-ls:     var(--ls-normal);

  --type-caption-size:   var(--text-xs);
  --type-caption-weight: var(--weight-regular);
  --type-caption-lh:     var(--lh-normal);

  /* --- Spacing (aliases → units) --- */
  --sp-1:  var(--u-1);   /*  4px */
  --sp-2:  var(--u-2);   /*  8px */
  --sp-3:  var(--u-3);   /* 12px */
  --sp-4:  var(--u-4);   /* 16px */
  --sp-5:  var(--u-5);   /* 20px */
  --sp-6:  var(--u-6);   /* 24px */
  --sp-8:  var(--u-8);   /* 32px */
  --sp-10: var(--u-10);  /* 40px */
  --sp-12: var(--u-12);  /* 48px */

  /* --- Radius --- */
  --r-pill: 9999px;
  --r-md:   var(--u-2);  /* 8px */

  /* --- Layout --- */
  --content-width: 320px;  /* narrow mobile-first container */
  --page-padding:  var(--sp-4);
}


/* ============================================================
   BASE
   ============================================================ */

html {
  font-family: var(--font);
  font-size: var(--type-body-size);
  line-height: var(--type-body-lh);
  font-weight: var(--type-body-weight);
  letter-spacing: var(--type-body-ls);
  color: var(--c-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100dvh;
  background: var(--c-bg-subtle);
  display: grid;
  place-items: center;
  padding: var(--sp-8) var(--page-padding);
}

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


/* ============================================================
   LAYOUT
   ============================================================ */

.page {
  width: 100%;
  max-width: var(--content-width);
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
}


/* ============================================================
   HERO
   ============================================================ */

.hero {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.hero__icon-link {
  display: block;
  width: fit-content;
  margin-bottom: var(--sp-2);
  cursor: pointer;
}

.hero__icon {
  display: block;
  color: var(--c-text);
  flex-shrink: 0;
}

.hero__title {
  font-size: var(--type-h1-size);
  font-weight: var(--type-h1-weight);
  line-height: var(--type-h1-lh);
  letter-spacing: var(--type-h1-ls);
  color: var(--c-text);
}

.hero__subtitle {
  font-size: var(--type-body-size);
  font-weight: var(--type-body-weight);
  line-height: var(--type-body-lh);
  color: var(--c-text-secondary);
  margin-top: var(--sp-1);
}


/* ============================================================
   BUTTONS
   ============================================================ */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-md);
  font-family: var(--font);
  font-size: var(--type-label-size);
  font-weight: var(--type-label-weight);
  line-height: 1;
  cursor: pointer;
  border: 1px solid transparent;
  transition: opacity 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  opacity: 0.8;
}

.btn--dark {
  background: var(--c-btn-dark-bg);
  color: var(--c-btn-dark-text);
  border-color: var(--c-btn-dark-bg);
}

.btn--light {
  background: var(--c-btn-light-bg);
  color: var(--c-text);
  border-color: var(--c-btn-light-border);
}


/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  font-size: var(--type-caption-size);
  font-weight: var(--type-caption-weight);
  line-height: var(--type-caption-lh);
  color: var(--c-text-muted);
  margin-top: var(--sp-4);
}

.footer a {
  color: var(--c-text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--c-text-muted);
}

.footer a:hover {
  color: var(--c-text);
  text-decoration-color: var(--c-text);
}
