/* ============================================================
   blahaj.my
   Based on NeoThemes Layout 02 (two-sidebar variant)
   https://neothemes.neocities.org/  ~ please keep the credit!
   Colours are variables, just like the original. Change them
   here and the whole site follows.
   ============================================================ */

:root {
  --pink: #f9cfe0;          /* section title bars */
  --purple: #cdb8ef;        /* navbar */
  --blue: #c4e4f7;          /* header, highlights */
  --lt-color: #fcf8ff;      /* box background (lavender white) */
  --dk-color: #7a62b0;      /* h1, h3, labels */
  --dkest-color: #4b3a6b;   /* text + borders (plum) */
  --accent: #b13b7a;        /* links, h2 (berry pink) */
  --shark: #5f8fb8;         /* blåhaj body blue */
  --mouth: #f49ab9;         /* the inside of the mouth */
  --white: #ffffff;
  --shadow: rgba(75, 58, 107, 0.25);
}

/* ---------- base ---------- */

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: Verdana, Geneva, sans-serif;
  font-size: 12px;
  line-height: 1.5;
  background-color: #f8d7e6;
  background-image: url('images/bg.svg');
  background-repeat: repeat;
  color: var(--dkest-color);
}

body {
  padding: 15px 16px 1px;
}

body a {
  color: var(--accent);
  font-weight: bold;
}

body a:hover {
  background: var(--blue);
  color: var(--dkest-color);
}

h1, h3, h5 {
  color: var(--dk-color);
}

h2, h4, h6 {
  color: var(--accent);
}

h2 {
  font-size: 16px;
  margin: 4px 0 10px;
}

h3 {
  font-size: 13px;
  margin: 16px 0 6px;
}

p {
  margin: 0 0 10px;
}

img {
  max-width: 100%;
}

* {
  box-sizing: border-box;
}

/* ---------- container + header ---------- */

#container {
  max-width: 1000px;
  margin: 0 auto;
  background-color: var(--lt-color);
  border: 1px solid var(--dkest-color);
  box-shadow: 6px 6px 0 var(--shadow);
}

#header {
  background-color: var(--blue);
  border-bottom: 1px solid var(--dkest-color);
  padding: 22px 16px 18px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* little wave strip along the bottom of the header */
#header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 8px;
  background:
    radial-gradient(circle at 8px 0, transparent 7px, var(--lt-color) 7.5px) repeat-x;
  background-size: 16px 8px;
  opacity: 0.7;
}

.title {
  margin: 0;
  font-family: "Silkscreen", Verdana, sans-serif;
  font-weight: 700;
  font-size: 46px;
  line-height: 1.1;
  letter-spacing: 2px;
  color: var(--white);
  text-shadow:
    2px 0 0 var(--dkest-color),
    -2px 0 0 var(--dkest-color),
    0 2px 0 var(--dkest-color),
    0 -2px 0 var(--dkest-color),
    5px 5px 0 var(--purple);
}

.title .sprite {
  width: 72px;
  height: 42px;
  vertical-align: -2px;
  margin-right: 10px;
}

.tagline {
  margin: 10px 0 4px;
  font-style: italic;
  font-size: 13px;
  color: var(--dkest-color);
}

/* pixel shark sprite (see the <symbol> at the top of index.html) */
.sprite {
  --shark-body: var(--shark);
  --shark-belly: var(--white);
  --shark-eye: var(--dkest-color);
  --shark-mouth: var(--mouth);
  shape-rendering: crispEdges;
}

/* ---------- navbar ---------- */

.navbar {
  background-color: var(--purple);
  border-bottom: 1px solid var(--dkest-color);
  padding: 7px 10px;
  text-align: center;
}

.navbar ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

.navbar li {
  display: inline-block;
}

.navbar a {
  display: block;
  padding: 3px 14px;
  color: var(--dkest-color);
  text-decoration: none;
  font-weight: bold;
  font-size: 12px;
  transition: 0.2s all linear;
}

.navbar a:hover,
.navbar a:focus-visible {
  background: var(--pink);
  color: var(--accent);
}

/* ---------- three columns ---------- */

.wrapper {
  display: flex;
  width: 100%;
}

#right-sidebar {
  width: 200px;
  flex: 0 0 200px;
  border-left: 1px solid var(--dkest-color);
}

.main-content {
  flex: 1 1 auto;
  min-width: 0;
}

.section-title {
  text-align: center;
  font-weight: bold;
  padding: 5px;
  background-color: var(--pink);
  color: var(--dkest-color);
  font-size: 12px;
  border-bottom: 1px solid var(--dkest-color);
}

/* every box after the first gets a line on top, like stacked NeoThemes boxes */
.box + .box,
.panel + .panel {
  border-top: 1px solid var(--dkest-color);
}

.content {
  padding: 12px;
}

.panel .content {
  padding: 14px 18px 16px;
  font-size: 12.5px;
  line-height: 1.65;
}

/* ---------- sidebar bits ---------- */

dl.status {
  margin: 0;
  font-size: 11px;
}

dl.status dt {
  font-weight: bold;
  color: var(--dk-color);
}

dl.status dd {
  margin: 0 0 6px;
}

/* ---------- welcome: the shark gif ---------- */

.gif-frame {
  text-align: center;
  margin: 6px 0 14px;
}

.hug-button {
  position: relative;
  display: inline-block;
  padding: 6px;
  background: var(--white);
  border: 1px solid var(--dkest-color);
  box-shadow: 4px 4px 0 var(--purple);
  cursor: pointer;
  font: inherit;
}

.hug-button:hover {
  box-shadow: 4px 4px 0 var(--blue);
}

.hug-button:focus-visible {
  outline: 2px dashed var(--accent);
  outline-offset: 3px;
}

.hug-button img {
  display: block;
  width: 320px;
  height: auto;
}

.hug-button.wiggle img {
  animation: wiggle 0.5s ease-in-out;
}

@keyframes wiggle {
  0%   { transform: rotate(0) scale(1); }
  25%  { transform: rotate(-4deg) scale(1.04); }
  50%  { transform: rotate(3deg) scale(1.04); }
  75%  { transform: rotate(-2deg) scale(1.02); }
  100% { transform: rotate(0) scale(1); }
}

.heart {
  position: absolute;
  pointer-events: none;
  color: #e5728f;
  font-size: 20px;
  font-weight: bold;
  animation: float-up 1s ease-out forwards;
}

@keyframes float-up {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(-60px) scale(1.5); }
}

.gif-caption {
  margin-top: 10px;
  font-size: 11px;
  color: var(--dk-color);
}

.hug-count {
  display: inline-block;
  min-width: 2ch;
  padding: 0 5px;
  background: var(--pink);
  color: var(--dkest-color);
  font-weight: bold;
}

/* ---------- blåhaj info table ---------- */

table.info-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--dkest-color);
  font-size: 12px;
}

table.info-table th,
table.info-table td {
  text-align: left;
  vertical-align: top;
  padding: 6px 9px;
  border-bottom: 1px solid var(--purple);
}

table.info-table th {
  width: 34%;
  background: #e8dcfa;
  color: var(--dkest-color);
  border-right: 1px solid var(--dkest-color);
}

table.info-table tr:nth-child(even) td {
  background: var(--white);
}

/* the last row's cell lines would otherwise cover the table's dark bottom edge */
table.info-table tr:last-child th,
table.info-table tr:last-child td {
  border-bottom-color: var(--dkest-color);
}

/* big purple text: "Blåhaj go spinnyyyy" and "mhm~" */
.face {
  margin: 0;
  font-size: 28px;
  font-weight: bold;
  color: var(--dk-color);
}

/* ---------- footer ---------- */

#footer {
  text-align: center;
  margin: 14px 0 18px;
}

#footer p {
  display: inline-block;
  max-width: 100%;
  margin: 0;
  padding: 6px 12px;
  background-color: var(--white);
  border: 1px solid var(--dkest-color);
  font-size: 11px;
}

/* ---------- scrollbars ---------- */

.scroll::-webkit-scrollbar-track {
  background-color: var(--lt-color);
}

.scroll::-webkit-scrollbar {
  width: 10px;
  background-color: var(--pink);
}

.scroll::-webkit-scrollbar-thumb {
  background-color: var(--dk-color);
}

/* ---------- responsive ---------- */

/* tablets: main content first, sidebar underneath */
@media only screen and (max-width: 1000px) {
  .wrapper {
    flex-wrap: wrap;
  }

  .main-content {
    order: 1;
    flex: 1 1 100%;
    border-bottom: 1px solid var(--dkest-color);
  }

  #right-sidebar {
    order: 2;
    flex: 1 1 100%;
    width: 100%;
    border-left: none;
  }
}

/* phones: everything stacks */
@media only screen and (max-width: 640px) {
  body {
    padding: 10px 10px 1px;
  }

  .title {
    font-size: 30px;
    letter-spacing: 1px;
  }

  .title .sprite {
    display: block;
    margin: 0 auto 8px;
  }

  .navbar a {
    padding: 6px 10px;
  }

  .panel .content {
    padding: 12px 12px 14px;
  }

  .hug-button img {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hug-button.wiggle img,
  .heart {
    animation: none;
  }

  .heart {
    display: none;
  }
}
