/* Prof. Dr. Hasan Tanyeri — project design tokens and base styles.
   Only things Tailwind cannot express live here: tokens, base typography,
   focus rings, CSS-only state rules and motion preferences. */

:root {
  --paper: #ffffff;
  --paper-soft: #f4f7fa;
  --navy-950: #061424;
  --navy-900: #0a1e33;
  --navy-800: #0f2a46;
  --navy-700: #173b5f;
  --navy-600: #23527c;
  --ink: #0a1420;
  --ink-soft: #33455a;
  --muted: #5f7489;
  --line: #dee6ef;
  --line-strong: #c6d4e2;
  --accent: #3c7fa8;
  --accent-soft: #e7f0f7;
  --brass: #c8a06a;
  --font-display: "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 88px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.06;
}

::selection {
  background: var(--navy-800);
  color: #fff;
}

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

/* Locked scroll while the mobile menu is open */
body.is-locked {
  overflow: hidden;
}

/* Dialog backdrop (the <dialog> element itself is styled with utilities) */
#press-dialog::backdrop {
  background: rgba(6, 20, 36, 0.82);
  backdrop-filter: blur(3px);
}

/* Mobile drawer */
@keyframes menu-panel-in {
  from { opacity: 0.6; transform: translateX(100%); }
  to { opacity: 1; transform: none; }
}

@keyframes menu-panel-out {
  from { opacity: 1; transform: none; }
  to { opacity: 0.6; transform: translateX(100%); }
}

@keyframes menu-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes menu-backdrop-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  #mobile-menu[data-state="open"] [data-menu-backdrop] {
    animation: menu-backdrop-in 160ms ease-out both;
  }

  #mobile-menu[data-state="open"] [data-menu-panel] {
    animation: menu-panel-in 230ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
  }

  #mobile-menu[data-state="closing"] [data-menu-backdrop] {
    animation: menu-backdrop-out 150ms ease-in both;
  }

  #mobile-menu[data-state="closing"] [data-menu-panel] {
    animation: menu-panel-out 170ms ease-in both;
  }
}

/* Scroll reveal — only when JS is available, so content is never hidden without it */
@media (prefers-reduced-motion: no-preference) {
  html.js [data-reveal] {
    opacity: 0;
    transform: translateY(16px);
    transition:
      opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
      transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
    transition-delay: var(--reveal-delay, 0ms);
  }

  html.js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
  }
}

@media print {
  html.js [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
