/* ==========================================================================
   resume.guhhammer.dev — single application stylesheet
   Design tokens adapted from view/blog/static/css/app.css (HSL theme).
   ========================================================================== */

@font-face {
  font-family: "Merriweather";
  src: url("/static/fonts/merriweather-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Playfair Display";
  src: url("/static/fonts/playfair-display-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("/static/fonts/source-sans-3-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
}

:root {
  --background: 40 33% 97%;
  --foreground: 20 10% 12%;
  --card: 40 25% 95%;
  --card-foreground: 20 10% 12%;
  --primary: 32 80% 50%;
  --primary-foreground: 40 33% 97%;
  --secondary: 40 15% 90%;
  --secondary-foreground: 20 10% 25%;
  --muted: 40 15% 92%;
  --muted-foreground: 20 8% 50%;
  --border: 30 15% 88%;
  --ring: 32 80% 50%;
  --radius: 0.5rem;

  --font-heading: "Playfair Display", Georgia, serif;
  --font-body: "Source Sans 3", ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

/* ---- Content protection: no select / drag / copy across the app ---- */
html,
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

img,
svg,
a {
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
}

/* The embedded PDF box keeps full native interaction (scroll, zoom, links). */
.viewer,
.viewer * {
  -webkit-user-select: auto;
  -moz-user-select: auto;
  -ms-user-select: auto;
  user-select: auto;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: hsl(var(--primary));
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ---- Layout shell ---- */
header,
footer {
  flex: 0 0 auto;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
}

header {
  border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--card) / 0.85);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: hsl(var(--foreground));
}

.brand:hover {
  text-decoration: none;
}

.brand .wordmark {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: hsl(var(--primary));
}

.brand:hover .wordmark {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.brand img {
  width: 32px;
  height: 32px;
  display: block;
}

.brand h1 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.sep {
  margin: 0 0.5rem;
  color: hsl(var(--primary));
}

.muted {
  color: hsl(var(--muted-foreground));
  font-weight: 400;
}

.actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.icon-link {
  display: inline-flex;
  color: hsl(var(--muted-foreground));
  transition: color 0.15s ease;
}

.icon-link:hover {
  color: hsl(var(--foreground));
}

.icon-link svg {
  fill: currentColor;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: calc(var(--radius) + 0.1rem);
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid hsl(var(--border));
  background: transparent;
  color: hsl(var(--foreground));
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
  background: hsl(var(--secondary));
}

.btn-primary {
  border-color: hsl(var(--primary));
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.btn-primary:hover {
  opacity: 0.95;
  background: hsl(var(--primary));
}

.btn-outline {
  border-color: hsl(var(--primary));
  color: hsl(var(--primary));
  background: transparent;
}

.btn-outline:hover {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

/* ---- Main / PDF viewer ---- */
main {
  flex: 1 1 auto;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
}

.viewer {
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  background: hsl(var(--card));
  overflow: hidden;
  box-shadow: 0 10px 30px hsl(20 10% 12% / 0.15);
}

.viewer object,
.viewer iframe {
  display: block;
  width: 100%;
  height: 82vh;
  min-height: 540px;
  border: 0;
  background: #525659;
}

.fallback {
  padding: 2rem 1.5rem;
  text-align: center;
  color: hsl(var(--muted-foreground));
}

.fallback p {
  margin: 0.5rem 0;
}

/* ---- Footer (inspired by view/blog base.html.tera .custom-footer) ---- */
footer {
  flex: 0 0 auto;
}

.custom-footer {
  border-top: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  color: hsl(var(--muted-foreground));
  padding: 2.5rem 1.25rem;
}

.footer-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.footer-inner h3 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: hsl(var(--foreground));
}

.footer-inner .subtitle {
  margin: 0.5rem 0 1.25rem;
  font-size: 0.95rem;
  font-weight: 400;
  color: hsl(var(--muted-foreground));
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
}

.footer-links a {
  color: hsl(var(--muted-foreground));
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: hsl(var(--foreground));
}

.footer-inner .copyright {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 400;
  color: hsl(var(--muted-foreground));
}

/* ---- 404 page ---- */
.center {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.card {
  width: 100%;
  max-width: 38rem;
  text-align: center;
  border: 1px solid hsl(var(--border));
  border-radius: 1rem;
  background: hsl(var(--card));
  padding: 2.5rem 2rem;
  box-shadow: 0 10px 30px hsl(20 10% 12% / 0.15);
}

.card img.logo {
  width: 56px;
  height: 56px;
  margin: 0 auto 0.5rem;
  display: block;
}

.tag {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: hsl(var(--primary));
}

.card h1 {
  margin: 0.4rem 0 0;
  font-family: var(--font-heading);
  font-size: 3.5rem;
  line-height: 1;
  color: hsl(var(--foreground));
}

.card p {
  margin: 1rem auto 0;
  max-width: 30rem;
  color: hsl(var(--muted-foreground));
}

.card .btn {
  margin-top: 2rem;
  padding: 0.7rem 1.5rem;
}

@media (max-width: 640px) {
  .viewer object,
  .viewer iframe {
    height: 70vh;
  }
}
