/* styles.css
    Main CSS boilerplate: reset, variables, base typography, layout utilities, components, responsive helpers
*/

/* ========== Reset / Normalize (modern, minimal) ========== */
:root {
  --color-bg: #000000;
  --color-foreground: #dbdbdb;
  --color-muted: #6b7280;
  --color-accent: #667eb1;
  --color-accent-contrast: #000000;
  --radius: 8px;
  --gap: 1rem;
  --max-width: 1200px;

  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", "Courier New", monospace;

  --flow-space: 1rem;
  --transition-fast: 150ms;
  --shadow-sm: 0 1px 2px rgba(2,6,23,0.08);
  --shadow-md: 0 6px 18px rgba(2,6,23,0.12);
}

*, *::before, *::after { box-sizing: border-box; }
html, body, #root { height: 100%; }
html { -webkit-text-size-adjust: 100%; -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-foreground);
  background: var(--color-bg);
  /* background-image: url("/img/head-bg.jpg"); */
  background-image: linear-gradient(to bottom, rgba(68, 75, 80, 0), rgba(68, 75, 80, 1)), url("../img/head-bg.jpg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  -webkit-font-feature-settings: "liga" 1, "kern" 1;
  font-feature-settings: "liga" 1, "kern", 1;
}

/* Remove default spacing for common elements */
h1,h2,h3,h4,h5,h6,p,figure,blockquote,dl,ul,ol { margin: 0; padding: 0; }

/* Lists */
ul, ol { list-style: none; }

/* Images & media */
img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }

/* Links */
a { color: inherit; text-decoration: none; }
a:focus, button:focus, input:focus, textarea:focus { outline: 3px solid color-mix(in srgb, var(--color-accent) 30%, transparent); outline-offset: 2px; }

/* Buttons/inputs */
button, input, select, textarea { font: inherit; }

/* Remove built-in form styles in Safari */
button::-moz-focus-inner { border: 0; padding: 0; }

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

/* ========== Layout / Containers ========== */
.container {
  width: calc(100% - 2rem);
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Simple responsive grid */
.row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}
@media (min-width: 640px) { .row { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .row { grid-template-columns: repeat(3, 1fr); } }

/* Flex helpers */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-col { display: flex; flex-direction: column; }
.gap-xs { gap: 0.25rem; }
.gap-sm { gap: 0.5rem; }
.gap-md { gap: 1rem; }
.gap-lg { gap: 1.5rem; }

/* Utility spacing */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }

/* Clearfix */
.clearfix::after { content: ""; display: table; clear: both; }

/* ========== Typography ========== */
.montserrat-links {
  font-family: "Montserrat", sans-serif;
  font-optical-sizing: auto;
  font-weight: 200;
  font-style: normal;
  font-size: 1.5rem;
  font-variant: small-caps;
}

:root { --scale-1: 0.875rem; --scale-2: 1rem; --scale-3: 1.25rem; --scale-4: 1.5rem; --scale-5: 2rem; }

h1 { font-size: var(--scale-5); line-height: 1.1; font-weight: 700; }
h2 { font-size: var(--scale-4); line-height: 1.15; font-weight: 600; }
h3 { font-size: var(--scale-3); font-weight: 600; }
p { font-size: var(--scale-2); color: var(--color-foreground); margin-bottom: 0.75rem; }
small { font-size: var(--scale-1); color: var(--color-muted); }

/* Headings spacing utility */
.lead { font-size: var(--scale-3); color: var(--color-muted); }

/* Code styling */
pre, code, kbd, samp { font-family: var(--font-mono); font-size: 0.9375rem; background: #f5f7fa; padding: 0.125rem 0.25rem; border-radius: 4px; }

/* ========== Forms / Controls ========== */
.input, input[type="text"], input[type="email"], input[type="password"], textarea, select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #e6e9ee;
  background: #fff;
  border-radius: 6px;
  transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}
.input:focus, input:focus, textarea:focus, select:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-accent) 12%, transparent);
  outline: none;
}

.label { display: block; font-size: 0.875rem; margin-bottom: 0.375rem; color: var(--color-muted); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  background: var(--color-accent);
  color: var(--color-accent-contrast);
  box-shadow: var(--shadow-sm);
}
.btn:active { transform: translateY(1px); }
.btn.secondary {
  background: #f3f4f6;
  color: var(--color-foreground);
  box-shadow: none;
}
.btn.ghost {
  background: transparent;
  color: var(--color-accent);
  border: 1px solid color-mix(in srgb, var(--color-accent) 20%, transparent);
}

/* Small button sizes */
.btn.sm { padding: 0.375rem 0.5rem; font-size: 0.875rem; border-radius: 6px; }
.btn.lg { padding: 0.75rem 1rem; font-size: 1rem; border-radius: 10px; }

/* ========== Cards / Surface ========== */
.card {
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(15,23,42,0.03);
}

/* ========== Helpers ========== */
/* Truncate text with ellipsis */
.truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Centering helper for fullscreen placeholders */
.fill-center {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Visually subtle divider */
.hr {
  height: 1px;
  width: 100%;
  background: rgba(15,23,42,0.06);
  margin: 1rem 0;
  border-radius: 999px;
}

/* Tiny responsive utility */
.hide-mobile { display: none; }
@media (min-width: 640px) { .hide-mobile { display: initial; } }

/* ========== Print styles ========== */
@media print {
  :root { color-scheme: light; }
  a::after { content: " (" attr(href) ")"; font-size: 0.85em; }
  .no-print { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ========== Misc / Defaults for new projects ========== */
/* Smooth default transitions for interactive elements */
a, button, .btn, .input { transition: all var(--transition-fast) ease; }

/* Default focus-visible support */
:focus:not(:focus-visible) { outline: none; box-shadow: none; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--color-accent) 30%, transparent); outline-offset: 2px; }

/* End of boilerplate */

header {
    padding: 10px 0 25px 0;
    display: flex;
    justify-content: center;
}

#nav ul {
    font-family: "PixelMix", sans-serif;
    list-style: none;
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 20px;
}

.hover-underline-animation {
  display: inline-block;
  position: relative;
}

.hover-underline-animation::after {
  content: '';
  position: absolute;
  width: 110%;
  transform: scaleX(0);
  height: 2px;
  bottom: 0;
  left: -5%;
  background-color: var(--color-accent);
  transition: transform 0.25s ease-out;
}

.hover-underline-animation:hover::after {
  transform: scaleX(1);
}
