/* =========================================
   Sleeping Bear • Portfolio Theme (v2)
   ========================================= */

/* ---------- Design Tokens ---------- */
:root {
  --bg: #f7f7fa;
  --surface: #ffffff;
  --muted: #6b7280; /* text secondary */
  --text: #101215;
  --line: #e6e7eb;

  --accent: #2d6cdf; /* action/link */
  --accent-600: #1f4eb8;
  --accent-50: #e8f0ff;

  --radius: 12px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 6px 22px rgba(0, 0, 0, 0.08);

  --maxw: 1100px;
}

/* ---------- Base / Reset ---------- */
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
html {
  font-size: 16px;
}
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter,
    "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  color: var(--accent-600);
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- Layout ---------- */
.main-content {
  flex: 1;
}
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(1rem, 2vw, 2rem);
}

/* ---------- Navigation ---------- */
nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  padding: 1.25rem 1rem;
}

nav.scrolled {
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.75rem clamp(1rem, 2vw, 1.25rem);
  display: flex;
  align-items: center; /* vertical centering */
  justify-content: space-between;
  gap: 1rem;
}

.logo img {
  height: 200px;
  width: auto;
  max-width: 100%;
}

.hamburger {
  display: none;
  width: 28px;
  height: 22px;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.hamburger .bar {
  height: 3px;
  width: 100%;
  background: #222;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.hamburger.open .bar:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.hamburger.open .bar:nth-child(2) {
  opacity: 0;
}
.hamburger.open .bar:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.nav-links li {
  list-style: none;
}

.nav-links a {
  color: var(--text);
  font-weight: 600;
  font-size: 1.05rem; /* added */
  padding: 0.5rem 0.25rem;
  border-radius: 8px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-links a:hover {
  color: var(--accent-600);
  background: var(--accent-50);
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: clamp(2rem, 6vw, 5rem) 1rem;
}
.hero h1 {
  font-size: clamp(2rem, 4.8vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem 0;
}
.hero p {
  max-width: 720px;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.125rem);
}

/* ---------- Project Grid (optional, non-breaking) ---------- */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  margin-top: 1.75rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #d8dbe2;
}
.card__media {
  aspect-ratio: 16/9;
  background: #e9eef7;
}
.card__body {
  padding: 1rem 1.1rem 1.25rem;
}
.card__title {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 0.35rem 0;
}
.card__text {
  color: var(--muted);
  font-size: 0.98rem;
}

/* ---------- Buttons / Chips ---------- */
.button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.15s ease;
}
.button:hover {
  background: var(--accent-600);
  transform: translateY(-1px);
}
.button:active {
  transform: translateY(0);
}

.tag {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--muted);
  background: #f3f5fa;
  border: 1px solid var(--line);
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
}

/* ---------- Project Links (existing) ---------- */
.project-links {
  text-align: center;
  margin-top: 2rem;
}
.project-links a {
  display: inline-block;
  margin: 0 0.5rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  padding: 0.25rem 0.25rem;
  border-radius: 8px;
}
.project-links a:hover {
  background: var(--accent-50);
}

/* ---------- Footer ---------- */
.footer {
  background: #0f1115 !important;
  color: #e8e9ee;
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.95rem;
  border-top: 1px solid #1b1e25;
}
.footer-content {
  max-width: var(--maxw);
  margin: 0 auto;
}

.footer-nav {
  margin-top: 0.9rem;
  display: flex;
  justify-content: center;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
}
.footer-nav a {
  color: #cfd3dc;
  font-weight: 600;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease;
}
.footer-nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

/* ---------- Responsive Nav (mobile) ---------- */
@media (max-width: 860px) {
  .nav-container {
    flex-wrap: wrap;
  }
  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  .nav-links {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    padding: 0.75rem 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }
  .nav-links.show {
    display: flex;
  }
  .nav-links a {
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
  }
}

/* ---------- Hero + Type tweaks on small screens ---------- */
@media (max-width: 600px) {
  .logo img {
    height: 150px;
  }

  nav {
    padding: 1rem;
  }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
  }
}
