/* ==========================================================================
   KIGO STUDIO DESIGN SYSTEM & THEME TOKENS
   Adapted for Luan Chicale Portfolio — Japanese Cyber-Shokunin Aesthetic
   ========================================================================== */

/* @font-face declarations using local fonts */
@font-face {
  font-family: 'Kigo Display';
  font-style: normal;
  font-weight: 700;
  src: url('/fonts/Poppins-700.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Kigo Display Italic';
  font-style: italic;
  font-weight: 700;
  src: url('/fonts/PlayfairDisplay-700italic.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Kanit';
  font-style: normal;
  font-weight: 400;
  src: url('/fonts/Kanit-400.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Kanit';
  font-style: normal;
  font-weight: 600;
  src: url('/fonts/Kanit-600.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 300;
  src: url('/fonts/Poppins-300.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  src: url('/fonts/Poppins-400.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  src: url('/fonts/Poppins-600.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Kigo Haiku';
  font-style: normal;
  font-weight: 200 900;
  src: url('/fonts/NotoSerifJP-haiku.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Kigo Brush';
  font-style: normal;
  font-weight: 400;
  src: url('/fonts/YujiBoku-kigo.ttf') format('truetype');
  font-display: swap;
}

:root {
  font-size: 16px;
  font-size: clamp(16px, 1vw + 1vh + 0.2vmin, 20px);

  /* Color Palette matching kigo.studio */
  --color-text: #ffffff;
  --color-text-muted: #a0a0a0;
  --color-background: #0a0a0a;
  --color-surface: #191919;
  --color-surface-hover: #222222;
  --color-border: #282828;
  --color-border-subtle: #1f1f1f;

  /* Traditional Japanese Accent Colors */
  --red: #d62828;         /* Akane / Vermilion Inkan Red */
  --orange: #f77f00;      /* Daidai / Amber */
  --green: #94e669;       /* Moegi / Jade Leaf */
  --yellow: #fcbf49;      /* Yamabuki / Golden Yellow */
  --gold: #eae2b7;        /* Shiro-tsurubami / Parchment Gold */
  --blue: #003049;        /* Aizome / Deep Indigo */
  
  --dark-grey: #272727;
  --light-gray: #4a4949;
  --darkest-grey: #141414;

  /* Typography */
  --title: "Kanit", "Poppins", "Kigo Haiku", "Noto Serif JP", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --body: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --haiku: "Kigo Haiku", "Noto Serif JP", serif;
  --brush: "Kigo Brush", "Yuji Boku", cursive, serif;
  --italic-accent: "Kigo Display Italic", "Playfair Display", Georgia, serif;

  /* Spacing & Sizes */
  --section-spacing: clamp(4rem, 8vw, 8rem);
  --header-height: 80px;
  --edge-padding: clamp(1rem, 4vw, 4rem);
  --container-max-width: 1400px;
  --ease-soft: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-snap: cubic-bezier(0.25, 1, 0.5, 1);
}

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

html {
  background-color: var(--color-background);
  color: var(--color-text);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}

body {
  background-color: var(--color-background);
  color: var(--color-text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
}

/* Static Washi Paper & Film Grain Overlay (Subtle, 100% still, no motion) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: url('/images/static_grain.png');
  background-repeat: repeat;
  background-size: 200px 200px;
  opacity: 0.038;
  pointer-events: none;
  z-index: 999;
  mix-blend-mode: screen;
}

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

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

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

ul, ol {
  list-style: none;
}

/* Global Japanese Typography & Accents */
.jp-vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--haiku);
  letter-spacing: 0.3em;
}

.kanji-brush {
  font-family: var(--brush);
}

.hanko-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--red);
  color: var(--red);
  font-family: var(--brush);
  border-radius: 4px;
  padding: 2px 6px;
  line-height: 1;
  font-weight: 700;
  user-select: none;
}

/* Text Selection — Akane red (water shimmer drawn by /js/selection-water.js) */
::selection {
  background-color: rgba(214, 40, 40, 0.62);
  color: #ffffff;
  text-shadow: none;
}

.selection-water {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9998;
  mix-blend-mode: screen;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0d0d0d;
}
::-webkit-scrollbar-thumb {
  background: #2a2a2a;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--red);
}
