/* ============================================================
   STYLE.CSS — Michel Gamache Portfolio
   Sections: base → layout → sidebar → pages → components → responsive
   ============================================================ */


/* --- BASE -------------------------------------------------- */

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

html, body {
  height: 100%;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 400;
  font-size: 15px;
  color: #000;
  background: #fff;
}

a {
  color: #000;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul {
  list-style: none;
}

p {
  line-height: 1.65;
  margin-bottom: 1em;
}

p:last-child {
  margin-bottom: 0;
}

h1, h2, h3, h4 {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: bold;
}


/* --- LAYOUT ------------------------------------------------- */

.site-wrapper {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  background: #fff;
  padding: 20px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #e0e0e0;
  z-index: 100;
  overflow-y: auto;
}

.content {
  margin-left: 260px;
  width: calc(100% - 260px);
  min-height: 100vh;
}

/* --- SIDEBAR ----------------------------------------------- */

.sidebar-name {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
}

.sidebar-tagline {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 10px;
  font-weight: 400;
  color: #555;
  line-height: 1.4;
  margin-bottom: 28px;
}

.nav-links {
  flex: 1;
}

.nav-links li {
  margin-bottom: 10px;
}

.nav-links a {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #000;
  text-decoration: none;
  display: block;
}

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

.nav-links a.active {
  text-decoration: underline;
}

.lang-toggle {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid #e0e0e0;
}

.lang-toggle span {
  cursor: pointer;
  color: #000;
}

.lang-toggle span.active {
  font-weight: bold;
  text-decoration: underline;
}

.lang-toggle span:hover {
  text-decoration: underline;
}

.linkedin-link {
  display: block;
  margin-top: 16px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #000;
  text-decoration: none;
  opacity: 0.5;
}
.linkedin-link:hover {
  opacity: 1;
}

/* Mobile-only elements — hidden on desktop */
.sidebar-mobile-bar {
  display: none;
}

.sidebar-nav-dropdown {
  display: none;
}

/* Desktop sidebar inner — flex column to distribute space */
.sidebar-inner {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* Site name as link */
.sidebar-name a,
.sidebar-mobile-name a {
  color: #000;
  text-decoration: none;
  font: inherit;
}

.sidebar-name a:hover,
.sidebar-mobile-name a:hover {
  text-decoration: none;
}


/* --- PAGES: index.html ------------------------------------- */

.page-home .content {
  overflow: hidden;
}

.hero-home {
  width: 100%;
  height: 100vh;
  background: #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-home .img-placeholder {
  width: 100%;
  height: 100%;
}


/* --- PAGES: portfolio.html --------------------------------- */

/* portfolio — single column, full width, uniform treatment */
.portfolio-grid {
  display: flex;
  flex-direction: column;
}

.grid-item {
  position: relative;
  width: 100%;
  height: 40vh;
  overflow: hidden;
  cursor: pointer;
  display: block;
  color: inherit;
  text-decoration: none;
}

.grid-item .img-placeholder {
  width: 100%;
  height: 100%;
}

.grid-item .grid-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 50%);
  transition: background 0.25s ease;
}

.grid-item:hover .grid-overlay {
  background: rgba(0,0,0,0.65);
}

.grid-item .grid-title {
  position: absolute;
  bottom: 20px;
  left: 24px;
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 12px;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fff;
  line-height: 1.4;
  transition: top 0.25s ease, bottom 0.25s ease, left 0.25s ease, transform 0.25s ease;
}

.grid-item:hover .grid-title {
  bottom: auto;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}


/* --- PAGES: project-[name].html ---------------------------- */

.project-hero {
  width: 100%;
  height: 55vh;
  overflow: hidden;
}

.project-hero .img-placeholder {
  width: 100%;
  height: 100%;
}

.project-body {
  padding: 40px 48px 60px;
}

.project-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e0e0e0;
}

.project-title {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 28px;
  font-weight: 500;
  margin-bottom: 8px;
  line-height: 1.2;
}

.project-subtitle {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #555;
}

.project-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid #e0e0e0;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #888;
}

.meta-value {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
}

.project-section {
  margin-bottom: 36px;
}

.project-section h3 {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 12px;
}

.project-section p {
  font-size: 15px;
  line-height: 1.7;
}

.project-section ul {
  list-style: none;
  padding: 0;
}

.project-section ul li {
  font-size: 15px;
  line-height: 1.65;
  padding-left: 16px;
  position: relative;
  margin-bottom: 8px;
}

.project-section ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: #aaa;
}

.project-text {
  margin-bottom: 40px;
}

.project-text p {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 300;
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 1em;
}

.project-text p:last-child {
  margin-bottom: 0;
}

.project-gallery {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* --- COMPONENTS: figure / photo credit --------------------- */

.img-wrap {
  position: relative;
  margin: 0;
  padding: 0;
  line-height: 0;
  display: block;
}

.photo-credit {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 10px;
  letter-spacing: 0.05em;
  opacity: 0.75;
  pointer-events: none;
}

.photo-credit.light { color: #ffffff; }
.photo-credit.dark  { color: #000000; }

/* External link icon on meta client/employer */
.ext-link {
  display: inline-flex;
  align-items: center;
  margin-left: 5px;
  color: #000;
  opacity: 0.4;
  transition: opacity 0.2s;
  vertical-align: middle;
}

.ext-link:hover {
  opacity: 1;
}


/* --- PAGES: bio.html --------------------------------------- */

.bio-body {
  padding: 48px 48px 60px;
}

.bio-top {
  display: grid;
  grid-template-columns: 58% 38%;
  gap: 4%;
  margin-bottom: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid #e0e0e0;
}

.bio-name {
  font-size: 36px;
  font-weight: bold;
  line-height: 1.1;
  margin-bottom: 20px;
}

.bio-text p {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 300;
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 1em;
}

.bio-text p:last-child {
  margin-bottom: 0;
}

.bio-aside p {
  font-size: 13px;
  line-height: 1.65;
  color: #333;
  margin-bottom: 1em;
}

.bio-aside p:last-child {
  margin-bottom: 0;
}

.credentials {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 56px;
  padding-bottom: 48px;
  border-bottom: 1px solid #e0e0e0;
}

.credentials h3 {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 16px;
}

.cred-list {
  list-style: none;
  padding: 0;
}

.cred-list li {
  font-size: 13px;
  line-height: 1.5;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}

.cred-list li:last-child {
  border-bottom: none;
}

.skills-block {
  margin-bottom: 10px;
}

.skills-block .skill-label {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 4px;
}

.skills-block p {
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 0;
}

.contact-section {
  max-width: 540px;
}

.contact-section h2 {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 24px;
}


/* --- COMPONENTS -------------------------------------------- */

/* Image placeholder */
.img-placeholder {
  background: #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #888;
  text-align: center;
  padding: 8px;
}

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
}

.form-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

.form-field label {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 6px;
}

.form-field input,
.form-field textarea {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 14px;
  color: #000;
  background: transparent;
  border: none;
  border-bottom: 1px solid #000;
  padding: 6px 0;
  outline: none;
  width: 100%;
  resize: none;
}

.form-field input:focus,
.form-field textarea:focus {
  border-bottom: 2px solid #000;
}

.form-field textarea {
  min-height: 80px;
}

.btn-submit {
  background: #000;
  color: #fff;
  border: none;
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 14px 20px;
  cursor: pointer;
  width: 100%;
  margin-top: 8px;
}

.btn-submit:hover {
  background: #333;
}

/* Gallery placeholder sizing */
.project-gallery .img-placeholder {
  height: 300px;
}

/* Section padding helper */
.section-pad {
  padding: 40px 48px;
}


/* --- PAGES: 404.html / merci.html -------------------------- */

.page-404 .content {
  display: flex;
  align-items: center;
  padding: 80px 48px;
}

.not-found-body {
  max-width: 480px;
}

.not-found-numeral {
  font-family: 'Inter', sans-serif;
  font-size: 80px;
  font-weight: 300;
  line-height: 1;
  margin-bottom: 20px;
}

.not-found-message {
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 20px;
}

.not-found-link {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #000;
  text-decoration: none;
}

.not-found-link:hover {
  text-decoration: underline;
}


/* --- RESPONSIVE -------------------------------------------- */

@media (max-width: 768px) {

  .site-wrapper {
    flex-direction: column;
  }

  /* Hide desktop sidebar */
  .sidebar {
    position: sticky;
    top: 0;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: none;
    padding: 0;
    display: block;
    overflow: visible;
    z-index: 200;
  }

  /* Mobile top bar */
  .sidebar-mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 200;
    border-bottom: 1px solid #e0e0e0;
  }

  .sidebar-mobile-name {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.03em;
  }

  .hamburger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  .hamburger span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: #000;
    transition: transform 0.2s, opacity 0.2s;
  }

  .hamburger.open span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
  }

  .hamburger.open span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.open span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
  }

  /* Dropdown nav */
  .sidebar-nav-dropdown {
    display: none;
    background: #fff;
    padding: 16px 16px 20px;
    border-bottom: 1px solid #e0e0e0;
  }

  .sidebar-nav-dropdown.open {
    display: block;
  }

  .sidebar-nav-dropdown .nav-links {
    margin-bottom: 16px;
  }

  .sidebar-nav-dropdown .nav-links li {
    margin-bottom: 12px;
  }

  .sidebar-nav-dropdown .lang-toggle {
    margin-top: 0;
    padding-top: 12px;
  }

  /* Hide desktop sidebar inner content on mobile */
  .sidebar-inner {
    display: none;
  }

  /* Content area */
  .content {
    margin-left: 0;
    width: 100%;
  }

  /* index.html hero */
  .hero-home {
    height: 50vh;
    min-height: 50vh;
  }

  /* portfolio */
  .grid-item {
    height: 35vh;
  }

  /* project pages */
  .project-body {
    padding: 24px 16px 40px;
  }

  .project-meta {
    grid-template-columns: 1fr 1fr;
    row-gap: 20px;
  }

  .project-hero {
    height: 40vh;
  }

  .project-gallery {
    margin-top: 32px;
  }

  .project-gallery .img-placeholder {
    height: 220px;
  }

  /* bio */
  .bio-body {
    padding: 24px 16px 40px;
  }

  .bio-top {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .bio-name {
    font-size: 28px;
  }

  .credentials {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .contact-section {
    max-width: 100%;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
