/* Self-hosted fonts */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/Inter-Variable.woff2') format('woff2');
}

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

@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/InstrumentSerif-Italic.woff2') format('woff2');
}

@import "tailwindcss";

/* Path relative to current CSS file */
@config "../../tailwind.config.mjs";


/* Define theme font mappings */
@theme {
  --font-brand: "Instrument Serif", ui-serif, Georgia, serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, sans-serif;
  --max-screen: 1200px;
  --inner-screen: 800px;

  --color-neutral-50: #f8fafc;
  --color-neutral-100: #f1f5f9;
  --color-neutral-200: #e2e8f0;
  --color-neutral-300: #cbd5e1;
  --color-neutral-400: #94a3b8;
  --color-neutral-500: #64748b;
  --color-neutral-600: #475569;
  --color-neutral-700: #334155;
  --color-neutral-800: #1e293b;
  --color-neutral-900: #0f172a;
  --color-neutral-950: #020617;

  /* Violet theme #707BC2 */
  --color-primary: #707BC2;
  --color-primary-rgb: 112, 123, 194;
  --color-primary-strong: #5B67B3;
  --color-primary-dark: #8B94D4;
  --color-primary-light: #A5ADE0;
  --color-primary-light-dark: #9BA3D8;
  --color-primary-lighter: #B8BEE8;
  /* Article-specific variables */
  --color-primary-bg: var(--color-bg-primary-light);
  --color-primary-bg-light: var(--color-bg-secondary);


  --color-btn-primary: #707BC2;
  --color-btn-primary-hover: #5B67B3;
  --color-btn-primary-dark: #8B94D4;
  --color-btn-primary-dark-hover: #707BC2;

  /* Accent colors */
  --color-accent: #707BC2;
  --color-accent-light: #A5ADE0;

  /* Background colors */
  --color-bg-primary: #f8fafc;
  --color-bg-secondary: #fff;
  --color-bg-primary-light: #f1f5f9;
  --color-bg-primary-deep: #f8fafc;

  --color-bg-primary-dark: #0f172a;
  --color-bg-secondary-dark: #1e293b;


  /* Text colors */
  --color-text-primary: #5B67B3;
  --color-text-secondary: #475569;
  --color-text-tertiary: #64748b;

  --color-text-primary-dark: #A5ADE0;
  --color-text-secondary-dark: #cbd5e1;
  --color-text-tertiary-dark: #94a3b8;
}

/* Dark mode variable overrides */
html.dark {
  --color-primary-rgb: 139, 148, 212;
  --color-primary-light-dark: #8B94D4;
  --color-primary-lighter: #A5ADE0;
  --color-primary-bg: rgba(112, 123, 194, 0.15);
  --color-primary-bg-light: rgba(112, 123, 194, 0.05);
}

/* Add typography styles */
@layer components {
  .font-brand{
    font-weight: 400!important;
  }
  .prose {
    max-width: 65ch;
  }
  .prose img {
    border-radius: 30px;
  }
  .container{
    max-width: var(--max-screen);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .site-container {
    max-width: var(--max-screen);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .inner-container {
    max-width: var(--inner-screen);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .gradient-title {
    background: linear-gradient(to right, #707BC2, #3d4785);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
 .gradient-title-light{
    background: linear-gradient(to right, #A5ADE0, #707BC2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}
html,body{
  color: var(--color-text-secondary);
}
html.dark,html.dark body{
  color: var(--color-text-secondary-dark);
}
h1,h2,h3{
  color:var(--color-text-primary);
}
html.dark h1,html.dark h2,html.dark h3{
  color:var(--color-text-primary-dark);
}

/* Custom CSS styles */
#sun {
  transform: rotate(0);
}

#moon {
  transform: rotate(0);
}

#darkToggle:hover #sun {
  transform: rotate(360deg);
}

#darkToggle:hover #moon {
   transform: rotate(45deg);
}


html.dark #darkToggle:hover .horizon {
  border-color: #718096 !important;
}

html{
  font-family: var(--font-sans);
  scroll-behavior: smooth;
}
html.dark {
  color-scheme: dark;
}

.horizon .setting {
  animation: 1s ease 0s 1 setting;
}

.horizon .rising {
  animation: 1s ease 0s 1 rising;
}

@keyframes setting {
  0% {
    transform: translate3d(0, 10px, 0);
  }

  40% {
    transform: translate3d(0, -2px, 0);
  }

  to {
    transform: translate3d(0, 30px, 0);
  }
}

@keyframes rising {
  0% {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
  }

  40% {
    opacity: 1;
    transform: translate3d(0, -2px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 10px, 0);
  }
}




html::-webkit-scrollbar,
body::-webkit-scrollbar,
div::-webkit-scrollbar {
  width: 6px !important;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
div::-webkit-scrollbar-track {
  background: var(--color-neutral-200) !important;
  border-radius: 6px !important;
  -webkit-border-radius: 6px !important;
  -moz-border-radius: 6px !important;
  -ms-border-radius: 6px !important;
  -o-border-radius: 6px !important;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
div::-webkit-scrollbar-thumb {
  background: var(--color-primary-light) !important;
  border-radius: 6px !important;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
div::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary) !important;
}

html::-webkit-scrollbar-thumb:active,
body::-webkit-scrollbar-thumb:active,
div::-webkit-scrollbar-thumb:active {
  background: var(--color-primary-dark) !important;
}


