/* ===========================
   Jump Animation
   =========================== */

@keyframes jump {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.02); }
  60%  { transform: scale(0.98); }
  100% { transform: scale(1); }
}

.jump-animate {
  transition: transform 0.2s;
}
.jump-animate:hover,
.jump-animate:focus {
  animation: jump 0.25s cubic-bezier(.4,1.6,.6,1) 1;
}
/* ===========================
   Global Styles
   =========================== */

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #f8f9fa;
  margin: 0;
  color: #222;
  text-transform: lowercase;
}

/* ===========================
   Navigation
   =========================== */

.site-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  padding: 1em 2rem;
  position: relative;
  background: transparent;
  flex-wrap: wrap; /* allow items to wrap nicely on small screens */
}

.site-nav a {
  color: #222;
  margin: 0 1em;
  text-decoration: none;
  font-weight: 500;
  font-size: 1em;
  transition: color 0.2s;
}

.site-nav a:hover {
  text-decoration: underline;
}

.nav-logo {
  font-weight: 600;
}

.nav-auth {
  /* Prefer inline placement at the end of the nav; use margin-left:auto so it does not overlap nav links */
  position: static;
  margin-left: auto;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* stacked auth controls for manager/settings/logout grouping */
.auth-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}
.auth-sub {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  margin-top: 0.25rem;
}

/* ==========================
   Header (new grid-based header)
   ========================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid #eee;
}
.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
}
.brand { display: inline-flex; align-items: center; text-decoration: none; color: inherit; }
.brand-logo { height: 28px; width: auto; }

.primary-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; justify-content: center; gap: 28px;
}
.primary-nav a { text-decoration: none; color: #111; font-weight: 500; }
.primary-nav a:hover { opacity: .7; }

.account { display: flex; align-items: center; gap: 14px; }
.login-link { text-decoration: none; color: #111; font-weight: 500; }

.dropdown { position: relative; }
.account-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 1px solid #e6e6e6; border-radius: 999px;
  padding: 6px 10px; font-size: 14px; cursor: pointer;
}
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: #fff; border: 1px solid #eee; border-radius: 12px;
  padding: 8px; min-width: 160px; box-shadow: 0 6px 24px rgba(0,0,0,.08);
  display: none;
}
.dropdown-menu li { list-style: none; }
.dropdown-menu a { display: block; padding: 8px 10px; color: #111; text-decoration: none; border-radius: 8px; }
.dropdown-menu a:hover { background: #f5f5f5; }
.dropdown.open .dropdown-menu { display: block; }

.hamburger { display: none; width: 34px; height: 34px; border: 1px solid #e6e6e6; border-radius: 8px; background: #fff; }
.hamburger span { display: block; height: 2px; background: #111; margin: 6px 7px; }

.mobile-nav { border-top: 1px solid #eee; background: #fff; padding: 12px 20px; }
.mobile-nav nav ul { display: grid; gap: 10px; list-style: none; padding: 0; margin: 0; }
.mobile-nav a { text-decoration: none; color: #111; font-weight: 500; }
.mobile-account { margin-top: 12px; display: grid; gap: 8px; }

@media (max-width: 768px) {
  .primary-nav { display: none; }
  .hamburger { display: inline-block; }
}

.nav-link {
  font-family: inherit;
  font-weight: 500;
  color: #222;
  text-decoration: none;
  background: none;
  border: none;
  border-radius: 0;
  padding: 0.5em 1.2em;
  text-transform: lowercase;
  font-size: 1em;
  transition: color 0.2s;
  /* lively jump animation */
  /* add jump-animate class in HTML for nav links */
  position: relative;
}

.nav-link:hover,
.nav-link:focus {
  animation: jump 0.25s cubic-bezier(.4,1.6,.6,1) 1;
}


main {
  max-width: 700px;
  margin: 2em auto;
  background: #fff;
  padding: 2em;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

h1, h2 {
  color: #222;
  text-transform: none;
  margin-top: 0;
}

/* ===========================
   Forms
   =========================== */

form label {
  display: block;
  margin-top: 1em;
}

form input,
form textarea {
  width: 100%;
  padding: 0.5em;
  margin-top: 0.5em;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1em;
}

form button {
  margin-top: 1em;
  background: #222;
  color: #fff;
  border: none;
  padding: 0.7em 2em;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1em;
}

form button:hover {
  background: #444;
}
/* ===========================
   Login Modal (fullscreen overlay)
   =========================== */

.login-modal {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000; /* must be above .music-player (9999) */
}

.login-box {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 32px rgba(0,0,0,0.12);
  padding: 2.5em 2em;
  min-width: 320px;
  max-width: 90vw;
  text-align: center;
}

.login-title {
  font-size: 2em;
  margin: 0 0 1em;
  font-family: 'Segoe UI', Arial, sans-serif;
  text-transform: lowercase;
  color: #222;
}

.login-box label {
  display: block;
  margin: 1em 0 0.5em;
  font-size: 1em;
  text-transform: lowercase;
  color: #222;
}

.login-box input {
  width: 80%;
  padding: 0.5em;
  margin-bottom: 1em;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 1em;
  background: #fff;
  color: #222;
}

.login-submit {
  background: #222;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.7em 2em;
  font-size: 1em;
  cursor: pointer;
  text-transform: lowercase;
  /* lively jump animation */
  /* add jump-animate class in HTML for buttons */
}
.login-submit:hover { background: #444; }

.login-success {
  color: #222;
  font-size: 1.2em;
  margin-top: 1em;
}

.login-error {
  color: red;
  margin-top: 1em;
}

/* ===========================
   Portfolio Grid
   =========================== */
.portfolio-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

/* ===========================
   Small Nell Face Corner Image
   =========================== */
.nellface-corner {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  z-index: 9998;
  background: #fff;
  object-fit: cover;
  opacity: 0.95;
  pointer-events: none;
}

.project-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s;
}
.project-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.project-card h2 {
  margin-top: 0;
  font-size: 1.25rem;
  color: #222;
}
.project-card p {
  margin: 0.5rem 0 1rem;
  color: #444;
}
/* Better box model everywhere */
*,
*::before,
*::after { box-sizing: border-box; }

/* Clearer keyboard focus */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #555;
  outline-offset: 2px;
}

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

/* Nav auth placement on small screens */
@media (max-width: 480px) {
  .nav-auth { position: absolute; right: 12px; top: 12px; transform: none; }
  main { margin: 1em auto; padding: 1.25em; }
}

/* ===========================
   Resources tabs
   =========================== */
.tabs {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1rem;
}
.tab-link {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(0,0,0,0.06);
  background: linear-gradient(180deg, #fff, #fbfbfb);
  color: #111;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: none;
  box-shadow: 0 1px 0 rgba(255,255,255,0.65) inset;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s, color 0.12s;
}
.tab-link:hover { transform: translateY(-2px); color: #000; }
.tab-link.active {
  background: linear-gradient(180deg, #111, #222);
  color: #fff;
  box-shadow: 0 8px 24px rgba(34,34,34,0.14);
  transform: translateY(-2px);
}
.resources-section { max-width: 980px; margin: 0 auto; }

/* make buttons accessible focus-visible */
.tab-link:focus-visible { outline: 3px solid rgba(34,34,34,0.12); outline-offset: 3px; }
