/* ============================================
   Private Chef - Dark Minimal Theme
   Inspired by Joël Robuchon official website
   ============================================ */

/* CSS Variables */
:root {
  --bg-primary: #121113;
  --bg-secondary: #0e0e0f;
  --text-primary: #ccc;
  --text-heading: #fff;
  --text-muted: #888;
  --border: #333;
  --border-light: #444;
  --sidebar-width: 80px;
  --sidebar-width-md: 60px;
  --header-height-mobile: 50px;
  --transition: all 0.3s ease;
  --font-en: 'Jost', 'Lato', sans-serif;
  --font-cn: 'Lato', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

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

html {
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-cn);
  font-weight: 400;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  line-height: 1.8;
  overflow-x: hidden;
}

a {
  color: var(--text-heading);
  text-decoration: none;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

/* ============================================
   SIDEBAR
   ============================================ */

#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background-color: var(--bg-primary);
  border-right: 1px solid var(--border);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}

/* Hamburger Button */
#btn-menu {
  width: 40px;
  height: 40px;
  position: relative;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

#btn-menu span {
  display: block;
  height: 1px;
  background-color: var(--text-primary);
  transition: var(--transition);
}

#btn-menu span:nth-child(1) { width: 25px; }
#btn-menu span:nth-child(2) { width: 20px; }
#btn-menu span:nth-child(3) { width: 15px; }

#btn-menu:hover span {
  background-color: var(--text-heading);
}

#btn-menu:hover span:nth-child(2),
#btn-menu:hover span:nth-child(3) {
  width: 25px;
}

/* Active state for mobile */
#btn-menu.active span:nth-child(1) {
  transform: translateY(7px) rotate(-45deg);
}
#btn-menu.active span:nth-child(2) {
  opacity: 0;
}
#btn-menu.active span:nth-child(3) {
  width: 25px;
  transform: translateY(-7px) rotate(45deg);
}

/* Logo */
#logo {
  writing-mode: vertical-lr;
  text-orientation: mixed;
  margin: auto 0;
}

#logo a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

#logo a:hover {
  opacity: 0.6;
}

.logo-en {
  font-family: var(--font-en);
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 2px;
  color: var(--text-heading);
  text-transform: uppercase;
}

.logo-cn {
  font-family: var(--font-cn);
  font-size: 11px;
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 4px;
}

/* Sidebar Bottom Icon */
#sidebar-bottom {
  margin-top: auto;
}

#contact-icon {
  display: block;
  width: 22px;
  height: 22px;
  color: var(--text-muted);
  transition: var(--transition);
}

#contact-icon:hover {
  color: var(--text-heading);
}

#contact-icon svg {
  width: 100%;
  height: 100%;
}

/* Mobile Navigation Overlay */
#mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-primary);
  z-index: 102;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

#mobile-nav.active {
  opacity: 1;
  visibility: visible;
}

#mobile-nav ul {
  text-align: center;
}

#mobile-nav li {
  margin: 30px 0;
}

#mobile-nav a {
  font-family: var(--font-en);
  font-size: 24px;
  font-weight: 300;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-primary);
}

#mobile-nav a:hover {
  color: var(--text-heading);
}

/* Mobile Nav Close Button */
#mobile-nav-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 101;
}

#mobile-nav-close span {
  position: absolute;
  width: 24px;
  height: 1px;
  background-color: var(--text-muted);
  transition: background-color 0.3s ease;
}

#mobile-nav-close span:first-child {
  transform: rotate(45deg);
}

#mobile-nav-close span:last-child {
  transform: rotate(-45deg);
}

#mobile-nav-close:hover span {
  background-color: var(--text-heading);
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */

#content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* ============================================
   DISH SHOWCASE (Homepage)
   ============================================ */

#dish-showcase {
  position: relative;
  width: 100%;
  height: 60vh;
  max-height: 580px;
  overflow: hidden;
  background-color: var(--bg-primary);
}

.showcase-track {
  display: flex;
  height: 100%;
  width: max-content;
  animation: marqueeScroll linear infinite;
  animation-duration: var(--showcase-speed, 45s);
}

.showcase-track:hover {
  animation-play-state: paused;
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.showcase-col {
  display: flex;
  flex-direction: column;
  height: 100%;
  flex-shrink: 0;
}

.col-narrow {
  width: 28vw;
}

.col-wide {
  width: 42vw;
}

.dish-card {
  position: relative;
  background-size: cover;
  background-position: center;
  background-color: #1a191b;
  background-image: linear-gradient(135deg, #1a191b 0%, #0e0e0f 100%);
  overflow: hidden;
  flex-shrink: 0;
  transition: filter 0.6s ease, transform 0.6s ease;
  filter: brightness(0.85);
  cursor: pointer;
}

.dish-card-tall {
  flex: 1.25;
}

.dish-card-short {
  flex: 1;
}

.dish-card-full {
  flex: 1;
}

.dish-overlay {
  position: absolute;
  inset: 0;
  background: rgba(18, 17, 19, 0.4);
  transition: background 0.5s ease;
  z-index: 1;
}

.dish-card:hover .dish-overlay {
  background: rgba(18, 17, 19, 0.18);
}

.dish-card:hover {
  filter: brightness(1.08);
  transform: scale(1.02);
}

.dish-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 30px;
  z-index: 2;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease;
  pointer-events: none;
}

.dish-card:hover .dish-info {
  opacity: 1;
  transform: translateY(0);
}

.dish-category {
  font-family: var(--font-en);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-primary);
  display: block;
  margin-bottom: 8px;
}

.dish-name {
  font-family: var(--font-en);
  font-size: 22px;
  font-weight: 300;
  letter-spacing: 2px;
  color: var(--text-heading);
}

/* Home Logo Overlay */
#home-logo {
  text-align: center;
  padding: 100px 20px 80px;
  background-color: var(--bg-primary);
}

#home-logo h1 {
  font-family: var(--font-en);
  font-size: 42px;
  font-weight: 300;
  letter-spacing: 10px;
  color: var(--text-heading);
  text-transform: uppercase;
  margin-bottom: 16px;
}

#home-logo p {
  font-family: var(--font-cn);
  font-size: 15px;
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 2px;
  line-height: 2;
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   HOME NAVIGATION GRID
   ============================================ */

#home-nav {
  padding: 0;
}

.nav-list {
  width: 100%;
}

.nav-item {
  position: relative;
  border-bottom: 1px solid var(--border);
}

.nav-item::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--text-primary);
  transition: width 0.5s ease;
}

.nav-item:hover::before {
  width: 100%;
}

.nav-item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 40px 60px;
  color: var(--text-primary);
}

.nav-item a:hover {
  color: var(--text-heading);
}

.nav-name {
  font-family: var(--font-en);
  font-size: 22px;
  font-weight: 300;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.nav-arrow {
  font-family: var(--font-en);
  font-size: 18px;
  color: var(--text-muted);
  transition: var(--transition);
}

.nav-item a:hover .nav-arrow {
  color: var(--text-heading);
  transform: translateX(6px);
}

/* ============================================
   PAGE CONTENT (Single pages)
   ============================================ */

.page-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 100px 40px 120px;
}

.page-header {
  margin-bottom: 60px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-family: var(--font-en);
  font-size: 32px;
  font-weight: 300;
  letter-spacing: 4px;
  color: var(--text-heading);
  text-transform: uppercase;
}

.page-body {
  font-size: 15px;
  line-height: 2;
  color: var(--text-primary);
}

.page-body h2 {
  font-family: var(--font-en);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 2px;
  color: var(--text-heading);
  margin: 48px 0 20px;
  text-transform: uppercase;
}

.page-body h3 {
  font-family: var(--font-en);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 1px;
  color: var(--text-heading);
  margin: 32px 0 12px;
}

.page-body p {
  margin-bottom: 20px;
}

.page-body ul {
  margin-bottom: 20px;
  padding-left: 0;
}

.page-body ul li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
}

.page-body ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

.page-body blockquote {
  margin: 30px 0;
  padding: 20px 30px;
  border-left: 1px solid var(--border-light);
  color: var(--text-muted);
  font-style: italic;
}

.page-body img {
  max-width: min(100%, 380px);
  margin: 20px auto;
  display: block;
  border-radius: 2px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.page-back {
  margin-top: 60px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}

.page-back a {
  font-family: var(--font-en);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.page-back a:hover {
  color: var(--text-heading);
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  background-color: var(--bg-primary);
  border-top: 1px solid var(--border);
  padding: 80px 40px 40px;
}

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

.f-logo {
  margin-bottom: 30px;
}

.f-logo a {
  font-family: var(--font-en);
  font-size: 18px;
  font-weight: 300;
  letter-spacing: 4px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.f-logo a:hover {
  color: var(--text-heading);
}

.f-nav ul {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.f-nav a {
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.f-nav a:hover {
  color: var(--text-heading);
}

.f-copy {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 1px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet */
@media screen and (max-width: 1080px) {
  :root {
    --sidebar-width: var(--sidebar-width-md);
  }

  #home-logo h1 {
    font-size: 36px;
    letter-spacing: 6px;
  }

  .nav-item a {
    padding: 35px 40px;
  }

  .nav-name {
    font-size: 20px;
  }
}

/* Mobile */
@media screen and (max-width: 767px) {
  #sidebar {
    width: 100%;
    height: var(--header-height-mobile);
    flex-direction: row;
    padding: 0 20px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  #btn-menu {
    width: 50px;
    height: 50px;
  }

  #btn-menu span:nth-child(1) { width: 20px; }
  #btn-menu span:nth-child(2) { width: 15px; }
  #btn-menu span:nth-child(3) { width: 10px; }

  #btn-menu.active span:nth-child(1) {
    transform: translateY(5px) rotate(-45deg);
  }
  #btn-menu.active span:nth-child(3) {
    width: 20px;
    transform: translateY(-5px) rotate(45deg);
  }

  #logo {
    writing-mode: horizontal-tb;
    transform: none;
    margin: 0 auto;
  }

  #logo a {
    flex-direction: row;
    gap: 12px;
  }

  .logo-en {
    font-size: 14px;
    letter-spacing: 3px;
  }

  .logo-cn {
    font-size: 12px;
    letter-spacing: 2px;
  }

  #sidebar-bottom {
    display: none;
  }

  #content {
    margin-left: 0;
    margin-top: var(--header-height-mobile);
  }

  #dish-showcase {
    height: 45vh;
  }

  .col-narrow {
    width: 45vw;
  }

  .col-wide {
    width: 65vw;
  }

  .dish-card {
    filter: brightness(0.92);
  }

  .dish-info {
    padding: 25px 15px;
  }

  .dish-card:active .dish-info {
    opacity: 1;
    transform: translateY(0);
  }

  .dish-card:active .dish-overlay {
    background: rgba(18, 17, 19, 0.18);
  }

  .dish-card:active {
    filter: brightness(1.08);
    transform: scale(1.02);
  }

  .dish-name {
    font-size: 16px;
    letter-spacing: 1px;
  }

  .dish-category {
    font-size: 12px;
    margin-bottom: 4px;
  }

  #home-logo {
    padding: 60px 20px 50px;
  }

  #home-logo h1 {
    font-size: 28px;
    letter-spacing: 5px;
  }

  #home-logo p {
    font-size: 13px;
    letter-spacing: 1px;
    max-width: 90%;
  }

  .nav-item a {
    padding: 25px 25px;
  }

  .nav-name {
    font-size: 16px;
    letter-spacing: 2px;
  }

  .page-content {
    padding: 60px 25px 80px;
  }

  .page-header h1 {
    font-size: 24px;
  }

  footer {
    padding: 50px 25px 30px;
  }

  .f-nav ul {
    gap: 12px;
  }

  .f-nav a {
    font-size: 10px;
    letter-spacing: 1px;
    white-space: nowrap;
  }
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
