/*
==================================================
 INTERNET TRAFFIC OBSERVATORY
 Main stylesheet for the three-panel academic layout
==================================================
*/

/*
==================================================
 ET BOOK WEBFONTS (self-hosted, WOFF only)
==================================================
*/
@font-face {
  font-family: "ETBook";
  src: url("../assets/fonts/et-book/et-book-roman-line-figures.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: fallback;
}
@font-face {
  font-family: "ETBook";
  src: url("../assets/fonts/et-book/et-book-roman-old-style-figures.woff") format("woff");
  font-weight: 400;
  font-style: italic;
  font-display: fallback;
}
@font-face {
  font-family: "ETBook";
  src: url("../assets/fonts/et-book/et-book-bold-line-figures.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: fallback;
}

/*
==================================================
 RESET & TYPOGRAPHY BASELINE
==================================================
*/
* { margin: 0; }
html {
  box-sizing: border-box;
  font-family: ETBook, Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background: #fffff8; /* warm off-white */
  color: #112;         /* very dark navy */
  font-size: 15px;
}
*, *::before, *::after {
  box-sizing: inherit;
  font-family: inherit;
}

/*
==================================================
 LAYOUT CONTAINERS
==================================================
*/
body {
  line-height: 1.4;
  margin: 0;
  padding: 0;
  position: relative;
  overflow-x: auto;
  min-width: 152em; /* 3 panels + 2 gaps */
  display: flex;
  justify-content: center;
}
.three-panel-container {
  display: flex;
  width: 152em;
  min-height: 100vh;
  margin: 1em 0 0 0;
  padding: 0;
  gap: 2em; /* space between panels */
  position: relative;
  contain: layout style;
}
/* Gray rail between left and center panels */
.three-panel-container::before {
  content: "";
  position: absolute;
  top: 3em;
  bottom: 3em;
  left: 48em;
  width: 1px;
  background: #d0d0d0;
  z-index: 1;
}
header, main, footer {
  position: relative;
  z-index: 2;
}

/*
==================================================
 TYPOGRAPHY
==================================================
*/
h1, h2 {
  font-weight: 400;
  line-height: 1.2;
  margin: 1em 0 0;
}
h1 {
  font-size: 3.2em;
  margin-bottom: 0.5em;
}
h2 {
  font-style: italic;
  font-size: 2.3em;
  margin-top: 1.7em;
}
p, ul, ol, dl {
  font-size: 1.4em;
  margin: 1.3em 0;
}
footer {
  font-size: 1.2em;
  margin-top: 2em;
}

/*
==================================================
 LINKS (Tufte-style understated underline)
==================================================
*/
a:not([class]) {
  color: inherit;
  text-decoration: none;
  background: linear-gradient(#fffff8,#fffff8),
              linear-gradient(#fffff8,#fffff8),
              linear-gradient(#989892,#989892);
  background-repeat: no-repeat, no-repeat, repeat-x;
  background-size: 0.05em 1px, 0.05em 1px, 1px 1px;
  background-position: 0 93%, 100% 93%, 0 93%;
  text-shadow: 0.03em 0 #fffff8, -0.03em 0 #fffff8,
               0 0.03em #fffff8, 0 -0.03em #fffff8,
               0.06em 0 #fffff8, -0.06em 0 #fffff8,
               0.09em 0 #fffff8, -0.09em 0 #fffff8,
               0.12em 0 #fffff8, -0.12em 0 #fffff8,
               0.15em 0 #fffff8, -0.15em 0 #fffff8;
}
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  a:not([class]) { background-position-y: 87%, 87%, 87%; }
}
a:not([class])::selection,
a:not([class])::-moz-selection {
  background: #b4d5fe;
  text-shadow: 0.03em 0 #b4d5fe, -0.03em 0 #b4d5fe,
               0 0.03em #b4d5fe, 0 -0.03em #b4d5fe;
}
a:focus, button:focus {
  outline: 2px solid #ffbe0b;
  outline-offset: 2px;
}

/*
==================================================
 PANEL STYLES
==================================================
*/
.left-panel {
  width: 48em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5em;
  padding: 2em 1em;
  background: #fffff8;
}
.center-panel {
  width: 48em;
  max-width: 100%;
  margin: 4em auto;
  padding: 0 1em;
  position: relative;
  background: #fffff8;
}
.right-panel {
  width: 48em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5em;
  padding: 2em 1em;
  margin-top: 4em;
  background: #fffff8;
}

/*
==================================================
 LEFT PANEL COMPONENTS
==================================================
*/
.logo-group {
  display: flex;
  align-items: flex-end;
  gap: 1em;
}
.ethz-logo {
  width: 112px;
  height: auto;
}
.swiss-flag {
  width: 90px;
  height: auto;
}
.separator {
  width: 80%;
  height: 1px;
  background: #d0d0d0;
}
.group-info {
  font-size: 1.6em;
  line-height: 1.2;
}
.group-info .institution {
  font-style: italic;
}

/*
==================================================
 NAVIGATION
==================================================
*/
.sidebar-nav {
  width: 80%;
  margin-top: 1em;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5em;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  left: 20%;
}
.nav-item {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.sidebar-link {
  font-size: 1.4em;
  color: #112;
  text-decoration: none;
  font-weight: 400;
  padding: 0.2em 0.5em;
  border-radius: 4px;
  transition: background 0.2s;
  display: inline-block;
  width: fit-content;
}
.sidebar-link.active {
  font-weight: 700;
}
.sidebar-link:hover,
.sidebar-link:focus {
  background: #f0f0e8;
}
.sidebar-h2-list {
  margin-left: 1.4em;
  margin-top: 0.2em;
  display: flex;
  flex-direction: column;
  gap: 0.2em;
}
.sidebar-h2-link {
  font-size: 1.4em;
  color: #444;
  text-decoration: none;
  padding: 0.1em 0.3em;
  border-radius: 3px;
  transition: background 0.2s;
  font-weight: 400;
  display: inline-block;
  width: fit-content;
}
.sidebar-h2-link:hover,
.sidebar-h2-link:focus {
  background: #e8e8e0;
  color: #112;
}

/*
==================================================
 RIGHT PANEL COMPONENTS
==================================================
*/
.viz-placeholder {
  text-align: center;
}
.viz-placeholder h2 {
  margin-top: 0;
  font-size: 2em;
  color: #666;
}
.viz-placeholder p {
  color: #888;
  margin-bottom: 2em;
}
.placeholder-content {
  display: flex;
  flex-direction: column;
  gap: 2em;
}
.placeholder-chart {
  height: 200px;
  background: linear-gradient(45deg, #f0f0e8 25%, transparent 25%),
              linear-gradient(-45deg, #f0f0e8 25%, transparent 25%),
              linear-gradient(45deg, transparent 75%, #f0f0e8 75%),
              linear-gradient(-45deg, transparent 75%, #f0f0e8 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  border: 2px dashed #d0d0d0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-style: italic;
}

/*
==================================================
 ACCESSIBILITY: Skip Link
==================================================
*/
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: #112;
  color: #f0f0e8;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 10000;
}
.skip-link:focus {
  top: 6px;
}
  