/* William Caron-Bastarache Portfolio Styles */

:root {
  --ink: #e5e7eb;
  --muted: #94a3b8;
  --accent: #06b6d4;
  --accent2: #a78bfa;
  --panel: #0b1020;
  --ring: #1f2a44;
  --bg: #080b14;
}

* { 
  box-sizing: border-box; 
}

html, body { 
  height: 100%; 
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(60vw 60vw at -10% -10%, rgba(10, 52, 72, 0.35) 0%, transparent 55%),
    radial-gradient(50vw 50vw at 110% -10%, rgba(69, 38, 122, 0.35) 0%, transparent 55%), var(--bg);
}

/* Top Bar */
.topbar { 
  position: sticky; 
  top: 0; 
  z-index: 50; 
  backdrop-filter: saturate(140%) blur(10px); 
  background: rgba(8, 11, 20, 0.65); 
  border-bottom: 1px solid var(--ring); 
}

.topbar .inner { 
  max-width: 1180px; 
  margin: 0 auto; 
  padding: 10px 18px; 
  display: flex; 
  align-items: center; 
  gap: 16px; 
  flex-wrap: wrap; 
}

.brand { 
  display: flex; 
  align-items: center; 
  gap: 10px; 
  text-decoration: none; 
}

.logo { 
  width: 36px; 
  height: 36px; 
  border-radius: 10px; 
  display: grid; 
  place-items: center; 
  font-weight: 800; 
  color: var(--accent); 
  box-shadow: 0 6px 18px #0ea5e9;
}

.brand span { 
  font-weight: 800; 
  letter-spacing: 0.02em; 
  color: var(--ink); 
}

.nav { 
  margin-left: auto; 
  display: flex; 
  gap: 8px; 
  flex-wrap: wrap; 
}

.nav a { 
  text-decoration: none; 
  color: var(--ink); 
  padding: 8px 10px; 
  border-radius: 10px; 
  font-weight: 600; 
  display: inline-block; 
  text-align: center; 
  min-width: 120px; 
  white-space: nowrap; 
}

.nav a:hover { 
  background: rgba(255, 255, 255, 0.06); 
}

.nav .cta { 
  background: linear-gradient(90deg, var(--accent), var(--accent2)); 
  color: #0b1020; 
  font-weight: 800; 
  box-shadow: 0 8px 20px rgba(6, 182, 212, 0.25); 
}

.lang { 
  display: flex; 
  gap: 6px; 
  align-items: center; 
}

.lang button { 
  border: 1px solid var(--ring); 
  background: rgba(255, 255, 255, 0.06); 
  color: var(--ink); 
  border-radius: 8px; 
  padding: 6px 10px; 
  cursor: pointer; 
  font-weight: 700; 
}

.lang button.active { 
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.25), rgba(167, 139, 250, 0.25)); 
}

/* General Layout */
section { 
  padding: 72px 20px; 
}

.container { 
  max-width: 1180px; 
  margin: 0 auto; 
}

#home .container,
#about .container,
#contact .container {
  text-align: center;
}

h1, h2 { 
  font-family: "Source Serif 4", serif; 
  letter-spacing: 0.01em; 
  margin: 0 0 10px; 
}

h2 { 
  font-size: 38px; 
}

h3 { 
  margin: 0; 
  font-size: 18px; 
  font-weight: 800; 
}

.muted { 
  color: var(--muted); 
}

/* Hero Section */
.hero .wrap { 
  display: grid; 
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 36px; 
  align-items: center; 
}

.hero .wrap > div {
  max-width: 720px;
  margin: 0 auto;
}

.eyebrow { 
  display: inline-block; 
  font-size: 12px; 
  letter-spacing: 0.08em; 
  text-transform: uppercase; 
  padding: 6px 10px; 
  border-radius: 999px; 
  color: #dbeafe; 
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.15), rgba(167, 139, 250, 0.15)); 
  border: 1px solid rgba(148, 163, 184, 0.25); 
}

.name { 
  font-size: 54px; 
  line-height: 1.05; 
}


.subtitle { 
  font-size: 17px; 
}

.cta-row { 
  display: flex; 
  gap: 12px; 
  margin-top: 18px; 
  justify-content: center;
}

.btn { 
  display: inline-block; 
  padding: 12px 16px; 
  border-radius: 12px; 
  text-decoration: none; 
  font-weight: 800; 
}

.btn-primary { 
  background: #0ea5e9; 
  color: #001018; 
}

.btn-ghost { 
  border: 1px solid var(--ring); 
  color: var(--ink); 
  background: rgba(255, 255, 255, 0.02); 
}

.btn-ghost:hover { 
  background: rgba(255, 255, 255, 0.06); 
}

.portrait { 
  width: 220px; 
  height: 220px; 
  margin: auto; 
  background: #111 center/cover no-repeat; 
  border-radius: 30% 70% 60% 40% / 40% 40% 60% 60%; 
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45), inset 0 0 0 6px rgba(255, 255, 255, 0.08); 
  border: 1px solid var(--ring); 
}

/* Grid and Cards */
.grid { 
  display: grid; 
  gap: 22px; 
}

.grid-2 { 
  grid-template-columns: repeat(2, minmax(0, 1fr)); 
}

.grid-3 { 
  grid-template-columns: repeat(3, minmax(0, 1fr)); 
}

.grid-4 { 
  grid-template-columns: repeat(4, minmax(0, 1fr)); 
}

.card { 
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.55), rgba(11, 16, 32, 0.55)); 
  border: 1px solid var(--ring); 
  border-radius: 16px; 
  padding: 20px; 
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35); 
}

/* About Section */
.about-cols { 
  display: grid; 
  grid-template-columns: 1fr;
  gap: 26px; 
}

.about-cols .card {
  max-width: 820px;
  margin: 0 auto;
}

.about-photo { 
  aspect-ratio: 4/5; 
  border-radius: 16px; 
  background: #0f172a center/cover no-repeat; 
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.4), inset 0 0 0 6px rgba(255, 255, 255, 0.04); 
  border: 1px solid var(--ring); 
}

.bullets { 
  display: grid; 
  gap: 10px; 
  margin-top: 12px; 
}

.bullet { 
  display: grid; 
  grid-template-columns: 130px 1fr; 
  gap: 12px; 
  align-items: center; 
  padding: 10px; 
  border-radius: 12px; 
  background: rgba(255, 255, 255, 0.03); 
  border: 1px dashed rgba(148, 163, 184, 0.3); 
}

.bullet label { 
  font-weight: 800; 
  color: #a5b4fc; 
}

/* Timeline */
.timeline { 
  position: relative; 
  padding-left: 20px; 
}

.timeline::before { 
  content: ""; 
  position: absolute; 
  left: 6px; 
  top: 0; 
  bottom: 0; 
  width: 2px; 
  background: var(--accent);
}

.t-item { 
  position: relative; 
  margin-bottom: 16px; 
}

.t-title { 
  font-weight: 800; 
}

.t-org { 
  font-weight: 700; 
}

.t-meta { 
  color: #9ca3af; 
  font-size: 13px; 
}

/* Certificates */
.certs { 
  display: grid; 
  grid-template-columns: repeat(4, minmax(0, 1fr)); 
  gap: 14px; 
}

.certs .cert { 
  display: flex; 
  gap: 12px; 
  align-items: center; 
  padding: 14px; 
  border: 1px solid var(--ring); 
  border-radius: 12px; 
  background: rgba(255, 255, 255, 0.03); 
}

.certs .cert .icon { 
  width: 44px; 
  height: 44px; 
  border-radius: 10px; 
  background: radial-gradient(circle at 30% 30%, rgba(6, 182, 212, 0.25), rgba(167, 139, 250, 0.25)); 
  display: grid; 
  place-items: center; 
  font-weight: 800; 
  color: #e0e7ff; 
  border: 1px solid var(--ring); 
}

/* Portfolio */
.filters { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 10px; 
  margin-bottom: 12px; 
}

.pill { 
  padding: 8px 12px; 
  border-radius: 999px; 
  border: 1px solid var(--ring); 
  background: rgba(255, 255, 255, 0.04); 
  color: #e2e8f0; 
  font-weight: 800; 
  cursor: pointer; 
}

.pill.active { 
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.18), rgba(167, 139, 250, 0.18)); 
}

.tiles { 
  display: grid; 
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px; 
}

.tile {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--ring);
  border-radius: 14px;
  overflow: hidden;
  transform: translateZ(0);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  display: grid;
  grid-template-rows: 120px auto auto;
  text-decoration: none !important;
}

.tile:hover { 
  transform: translateY(-4px); 
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45); 
  border-color: #334155; 
}

.thumb {
  height: 120px;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background: radial-gradient(circle at 30% 30%, rgba(6, 182, 212, 0.18), rgba(167, 139, 250, 0.18));
  border-bottom: 1px dashed rgba(148, 163, 184, 0.25);
}

.tile .meta { 
  padding: 10px; 
}

.tile .desc {
  padding: 0 10px 12px 10px;
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.5;
}

.cat { 
  color: #94a3b8; 
  font-size: 12px; 
  font-weight: 800; 
  letter-spacing: 0.06em; 
  text-transform: uppercase; 
}

/* Progress Bars */
.bars { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 14px; 
}

.bar { 
  height: 8px; 
  background: #0f172a; 
  border: 1px solid var(--ring); 
  border-radius: 999px; 
  overflow: hidden; 
}

.bar > span { 
  display: block; 
  height: 100%; 
  background: var(--accent);
  width: var(--w, 0%); 
}

/* Contact and Footer */
.contact-grid { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 22px; 
}

#contact .contact-grid {
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
}

.footer { 
  padding: 28px; 
  text-align: center; 
  color: #94a3b8; 
}

/* Remove default blue & purple link colors */
a,
a:visited,
a:active {
  color: var(--ink);
  text-decoration: none;
}

/* Optional subtle hover effect */
a:hover {
  opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 1100px) { 
  .grid-4 { 
    grid-template-columns: repeat(3, 1fr); 
  } 
  
  .tiles { 
    grid-template-columns: repeat(3, 1fr); 
  } 
  
  .about-cols { 
    grid-template-columns: 1fr; 
  } 
}

@media (max-width: 900px) { 
  .grid-3 { 
    grid-template-columns: 1fr 1fr; 
  } 
  
  .grid-4 { 
    grid-template-columns: repeat(2, 1fr); 
  } 
  
  .tiles { 
    grid-template-columns: repeat(2, 1fr); 
  } 
  
  .certs { 
    grid-template-columns: repeat(2, 1fr); 
  } 
  
  .bars { 
    grid-template-columns: 1fr; 
  } 
  
  .contact-grid { 
    grid-template-columns: 1fr; 
  } 
    .topbar .inner {
    flex-wrap: nowrap;
    gap: 12px;
  }

  .nav {
    margin-left: 0;
    flex: 1;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    gap: 6px;
    padding-bottom: 4px;
  }

  .nav a {
    min-width: unset;
    padding: 8px 10px;
    flex: 0 0 auto;
  }

  .lang {
    flex: 0 0 auto;
  }
}

@media (max-width: 760px) { 
  .name { 
    font-size: 40px; 
  } 
  
  .hero .wrap { 
    grid-template-columns: 1fr; 
  } 
}



/* ===== iPhone / Mobile baseline fixes ===== */

/* Prevent accidental horizontal scrolling */
html, body {
  overflow-x: hidden;
}

img, svg, video, canvas {
  max-width: 100%;
  height: auto;
}

/* Keep long strings (emails/links) from overflowing */
a, p, h1, h2, h3 {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Make tap targets nicer */
button, .btn, .nav a {
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 768px) {
  .topbar {
    position: static !important;      /* NOT sticky */
    top: auto !important;
    z-index: auto !important;
    backdrop-filter: none !important; /* iOS quirk helper */
  }


  .topbar .inner {
    padding: 10px 12px;
    gap: 10px;

    /* NEW: stable 2-row header layout */
    flex-wrap: wrap;                 /* allow nav to be on its own row */
    justify-content: space-between;  /* brand left, lang right */
    align-items: center;
  }

  /* Let brand shrink instead of forcing overflow */
  .brand span {
    display: none; /* optional, but looks much cleaner on iPhone */
  }

  /* NEW: pin language buttons on the right (row 1) */
  .lang {
    margin-left: auto;
  }

  /* NEW: nav becomes row 2, centered */
  .nav {
    width: 100%;
    margin-left: 0;                  /* remove desktop auto-push */
    justify-content: center;         /* center the items */
    gap: 10px;
    flex-wrap: wrap;                 /* wraps cleanly in centered rows */
  }

  .nav a {
    padding: 10px 10px; /* bigger tap area */
    font-size: 14px;
    min-width: unset;   /* IMPORTANT: remove the 120px constraint */
  }

  .lang button {
    padding: 8px 10px;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr !important;
  }

  .tiles {
    grid-template-columns: 1fr !important;
  }

  section { padding: 56px 16px; }

  .name { font-size: 34px; line-height: 1.1; }
  .subtitle { font-size: 15px; }

  .cta-row { flex-wrap: wrap; }
  .btn { width: 100%; max-width: 360px; text-align: center; }
}
/* Compact data tables used on project pages */
.tbl-wrap {
  overflow-x: auto;
  margin-top: 14px;
}

table.tbl {
  width: 100%;
  min-width: 460px;
  border-collapse: collapse;
  font-size: 0.92em;
}

table.tbl th {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
}

table.tbl td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--muted);
  vertical-align: top;
}

table.tbl tr:last-child td {
  border-bottom: 0;
}

table.tbl td.key {
  color: var(--ink);
  white-space: nowrap;
}

/* Compact lists inside project cards */
ul.tight {
  margin: 10px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.95em;
}

ul.tight li {
  line-height: 1.5;
}

ul.tight li::marker {
  color: rgba(148, 163, 184, 0.55);
}

ul.tight strong {
  color: var(--ink);
  font-weight: 600;
}

/* Numbered system entries: graphic beside description */
.sys {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  align-items: center;
}

.sys + .sys {
  margin-top: 16px;
}

.sys-fig {
  background: rgba(8, 11, 20, 0.6);
  border: 1px solid var(--ring);
  border-radius: 12px;
  padding: 10px;
}

.sys-fig img {
  display: block;
  width: 100%;
  height: auto;
}

.sys-num {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #a5b4fc;
  margin-bottom: 6px;
}

.sys h3 {
  margin-top: 0;
}

@media (max-width: 820px) {
  .sys {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .sys-fig {
    max-width: 280px;
  }
}

/* Charts */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 12px 0 6px;
  font-size: 12.5px;
  color: var(--muted);
}

.legend .lg {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend .lg i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}

.chartwrap {
  position: relative;
}

.chartwrap .hit {
  cursor: crosshair;
}

.tip {
  position: absolute;
  pointer-events: none;
  z-index: 5;
  min-width: 140px;
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(8, 11, 20, 0.96);
  border: 1px solid var(--ring);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5);
  font-size: 12px;
  color: var(--ink);
  transform: translate(-50%, -100%);
}

.tip b {
  display: block;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 5px;
}

.tip .row {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  margin-top: 3px;
}

.tip .row i {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  flex: none;
}

.tip .row span {
  margin-left: auto;
  padding-left: 14px;
  color: var(--muted);
}

.datatable {
  margin-top: 14px;
}

.datatable summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
}

.datatable summary:hover {
  color: var(--ink);
}
