/* ===================================================
   Dave Hatz — Personal Website Styles
   Modern · Minimal · Mobile-First
   =================================================== */

/* ---------- Custom properties ---------- */
:root {
  --clr-bg: #f8f7ff;
  --clr-bg-alt: #f5f7fa;
  --clr-text: #1a1a2e;
  --clr-text-muted: #5a5f77;
  --clr-accent: #4f46e5;
  --clr-accent-dark: #3730a3;
  --clr-border: #e2e5ef;

  --ff-base: "Segoe UI", system-ui, -apple-system, sans-serif;

  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 2rem;
  --fs-3xl: 3rem;
  --fs-4xl: 4rem;

  --fw-normal: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1.25rem;
  --space-lg: 2rem;
  --space-xl: 3.5rem;
  --space-2xl: 6rem;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);

  --transition: 0.2s ease;

  --nav-height: 64px;
  --max-width: 960px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--ff-base);
  font-size: var(--fs-base);
  color: var(--clr-text);
  background-color: var(--clr-bg);
  background-image: linear-gradient(135deg, #f8f7ff 0%, #eef2ff 50%, #f0fdf4 100%);
  background-attachment: fixed;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

ul {
  list-style: none;
}

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

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-lg);
}

/* ---------- Navigation ---------- */
.site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--clr-border);
  z-index: 100;
  transition: box-shadow var(--transition);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  color: var(--clr-accent);
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: var(--space-lg);
}

.nav-links a {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--clr-text-muted);
  transition: color var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--clr-accent);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-full);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  transition: background var(--transition), color var(--transition),
    box-shadow var(--transition), transform var(--transition);
  cursor: pointer;
}

.btn:focus-visible {
  outline: 3px solid var(--clr-accent);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--clr-accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--clr-accent-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--clr-accent);
  border: 2px solid var(--clr-accent);
}

.btn-outline:hover {
  background: var(--clr-accent);
  color: #fff;
  transform: translateY(-1px);
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: var(--nav-height);
  text-align: center;
  background: linear-gradient(
    160deg,
    var(--clr-bg) 0%,
    var(--clr-bg-alt) 100%
  );
  position: relative;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.hero-eyebrow {
  font-size: var(--fs-lg);
  color: var(--clr-text-muted);
  font-weight: var(--fw-medium);
  letter-spacing: 0.04em;
}

.hero-name {
  font-size: clamp(var(--fs-3xl), 8vw, var(--fs-4xl));
  font-weight: var(--fw-bold);
  letter-spacing: -0.03em;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--clr-text), var(--clr-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-size: clamp(var(--fs-base), 2.5vw, var(--fs-xl));
  color: var(--clr-text-muted);
  font-weight: var(--fw-medium);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
  margin-top: var(--space-sm);
}

/* Animated scroll hint */
.scroll-hint {
  position: absolute;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
}

.scroll-hint span {
  display: block;
  width: 22px;
  height: 36px;
  border: 2px solid var(--clr-border);
  border-radius: var(--radius-full);
  position: relative;
}

.scroll-hint span::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: var(--clr-accent);
  border-radius: var(--radius-full);
  animation: scrollBounce 1.8s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%,
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  60% {
    opacity: 0;
    transform: translateX(-50%) translateY(12px);
  }
}

/* ---------- Generic section ---------- */
.section {
  padding-block: var(--space-2xl);
}

.section-alt {
  background: var(--clr-bg-alt);
}

.section-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.section-center {
  align-items: center;
  text-align: center;
}

.section-title {
  font-size: clamp(var(--fs-xl), 3vw, var(--fs-2xl));
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
  position: relative;
  padding-bottom: var(--space-sm);
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--clr-accent);
  border-radius: var(--radius-full);
}

.section-center .section-title::after {
  left: 50%;
  transform: translateX(-50%);
}

/* ---------- Bio ---------- */
.bio {
  font-size: var(--fs-lg);
  color: var(--clr-text-muted);
  max-width: 65ch;
  line-height: 1.8;
}

/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
}

.skill-category {
  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}

.skill-category:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.skill-category-title {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--clr-accent);
  margin-bottom: var(--space-md);
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.skill-list li {
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.skill-list li::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  min-width: 6px;
  background: var(--clr-accent);
  border-radius: 50%;
  opacity: 0.6;
}

/* ---------- Contact ---------- */
.contact-text {
  font-size: var(--fs-lg);
  color: var(--clr-text-muted);
  max-width: 50ch;
  margin-bottom: var(--space-md);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--clr-text);
  color: rgba(255, 255, 255, 0.6);
  padding-block: var(--space-lg);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-copy {
  font-size: var(--fs-sm);
}

.footer-links {
  display: flex;
  gap: var(--space-md);
}

.footer-links a {
  color: rgba(255, 255, 255, 0.5);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: #fff;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  :root {
    --space-2xl: 4rem;
  }

  .nav-links {
    gap: var(--space-md);
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .footer-inner {
    justify-content: center;
    text-align: center;
  }
}
