/* =====================
   CSS Variables
   ===================== */
:root {
  --sidebar-bg: #35393c;
  --main-bg: #282b30;
  --about-bg: #dde6ee;
  --works-bg: #282b30;
  --accent: #56d364;
  --text: #fff;
  --subtle: rgba(255,255,255,0.62);
  --nav-hover: #56d364;
  --border: rgba(255,255,255,0.25);
  --font-main: 'Jost', 'Segoe UI', Arial, sans-serif;
  --transition: 0.18s cubic-bezier(.61,.17,.39,.86);
  --section-bg-accent: #9d9d9d;
  --text-main: #23272a;
  --text-muted: #697484;
  --card-bg: #fff;
  --border-radius: 18px;
  --card-shadow: 0 10px 34px 0 rgba(50, 50, 93, 0.08);

  --sidebar-width-desktop: 230px;
  --sidebar-width-tablet: 62px;
}

/* =====================
   Reset & Base Elements
   ===================== */
*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: var(--font-main);
  color: var(--text);
  background: var(--main-bg);
  font-weight: 300;
  letter-spacing: 0.03em;
  line-height: 1.62;
  transition: background 0.3s;
  max-width: 100vw;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, p {
  margin: 0;
  font-weight: inherit;
}
ul, li { list-style: none; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; transition: color 0.18s; }
img { max-width: 100%; display: block; height: auto; }
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}
button:focus, input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hide { display: none !important; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mt-2 { margin-top: 8px !important; }
.mb-2 { margin-bottom: 8px !important; }

/* Scrollbar styles (optional) */
::-webkit-scrollbar { width: 8px; background: #2c2f35; }
::-webkit-scrollbar-thumb { background: #40444b; border-radius: 6px; }

/* =====================
   Layout/Grid Structure
   ===================== */
body {
  display: flex;
  min-height: 100vh;
  background: var(--main-bg);
  max-width: 100vw;
  overflow-x: hidden;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width-desktop);
  height: 100vh;
  z-index: 10;
  background: var(--sidebar-bg);
}

/* Main Content */
main {
  flex: 1 1 0;
  margin-left: var(--sidebar-width-desktop);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--main-bg);

  width: calc(100vw - var(--sidebar-width-desktop));
  max-width: calc(100vw - var(--sidebar-width-desktop));
  overflow-x: hidden;
}

section,
.section-container,
.section-content,
.content-grid {
  width: 100%;
  max-width: 100vw;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Utility for centered content in each section (used in HTML as a wrapper) */
.section-container {
  width: 100%;
  max-width: 100vw;
  margin: 0 auto;
  padding-left: 2vw;
  padding-right: 2vw;
}

.section-content {
  max-width: 1100px;
  margin: 0 auto;
  padding-left: 2vw;
  padding-right: 2vw;
}

/* If you want a global content grid */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 2rem;
}

/* For sticky header/footer, if used */
header, footer {
  width: 100%;
}

/* Prevent all horizontal scroll everywhere */
html, body, main, .section-container, .section-content, .content-grid, section {
  max-width: 100vw !important;
  min-width: 0 !important;
  box-sizing: border-box;
  overflow-x: hidden !important;
}

/* Desktop / large tablet */
@media (max-width: 1100px) {
   .sidebar {
    width: 18vw;
    min-width: 120px;
    max-width: 200px;
  }
   .nav-link {
    font-size: 1.06rem;
    padding: 12px 0;
  }
  main {
     margin-left: 18vw;
    width: calc(100vw - 18vw);
    max-width: calc(100vw - 18vw);
  }
  .section-container, .section-content {
  max-width: 98vw;
    padding-left: 2vw !important;
    padding-right: 2vw !important;
  }
  .content-grid {
    gap: 1.2rem;
  }
}

/* Medium tablet */
@media (max-width: 900px) {
  .section-container, .section-content {
    padding-left: 2vw !important;
    padding-right: 2vw !important;
    max-width: 100vw;
  }
}

@media (min-width: 810px) and (max-width: 830px) {
  .sidebar {
    width: 230px !important;
    min-width: 230px !important;
    max-width: 230px !important;
  }
  main {
    margin-left: 230px !important;
    width: calc(100vw - 230px) !important;
    max-width: calc(100vw - 230px) !important;
  }
  .section-container,
  .section-content {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
}

/* Small tablet & phone */
@media (max-width: 700px) {
  .sidebar {
    display: none;
  }
  main {
    margin-left: 0;
    width: 100vw;
    max-width: 100vw;
  }
  .section-container, .section-content {
    padding-left: 3vw !important;
    padding-right: 3vw !important;
    max-width: 100vw !important;
  }
  .content-grid {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }
}

/* Extra mobile tweaks */
@media (max-width: 500px) {
  .section-container,
  .section-content {
    padding-left: 5vw !important;
    padding-right: 5vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    box-sizing: border-box;
  }
}

@media (max-width: 600px) {
  .logo-sphere {
    display: none !important;
  }
}

/* Scroll snapping (optional, for one-page scroll) */
html {
  scroll-behavior: smooth;
}
section {
  /* scroll-snap-align: start; */
}
