@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap');

:root{
  --bg-dark: oklch(0.92 0.05 253);
  --bg: oklch(0.96 0.05 253);
  --bg-light: oklch(1 0.05 253);
  --text: oklch(0.15 0.1 253);
  --text-muted: oklch(0.4 0.1 253);
  --highlight: oklch(1 0.1 253);
  --border: oklch(0.6 0.1 253);
  --border-muted: oklch(0.7 0.1 253);
  --primary: oklch(0.4 0.1 253);
  --secondary: oklch(0.4 0.1 73);
  --danger: oklch(0.5 0.1 30);
  --warning: oklch(0.5 0.1 100);
  --success: oklch(0.5 0.1 160);
  --info: oklch(0.5 0.1 260);
  --shadow-color: oklch(0 0 0 / 0.12);
  --shadow-color-strong: oklch(0 0 0 / 0.24);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-dark: oklch(0.1 0.05 253);
    --bg: oklch(0.15 0.05 253);
    --bg-light: oklch(0.2 0.05 253);
    --text: oklch(0.96 0.1 253);
    --text-muted: oklch(0.76 0.1 253);
    --highlight: oklch(0.5 0.1 253);
    --border: oklch(0.4 0.1 253);
    --border-muted: oklch(0.3 0.1 253);
    --primary: oklch(0.76 0.1 253);
    --secondary: oklch(0.76 0.1 73);
    --danger: oklch(0.7 0.1 30);
    --warning: oklch(0.7 0.1 100);
    --success: oklch(0.7 0.1 160);
    --info: oklch(0.7 0.1 260);
    --shadow-color: oklch(0 0 0 / 0.45);
    --shadow-color-strong: oklch(0 0 0 / 0.65);
  }
}

body{
  background-color:var(--bg-dark);
  font-family: "Plus Jakarta Sans", sans-serif;
  color:var(--text);
}

header{
  background-color: var(--bg);
  border: 2px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  position: relative;
  box-shadow: 0px 4px 4px var(--shadow-color-strong), 0px 12px 12px var(--shadow-color);
}

h1{
  margin: 20px 15px;
  color: var(--text);
}

.h1-link {
  text-decoration:none;
}

#header-links{
  display: flex;
  gap: 10px;

  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.link{
  text-decoration:none;
  color:var(--text);
  font-size:16px;
  padding-bottom: 6px;
  position: relative;
}

.link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: var(--border);
  border-radius: 3px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

@media (min-width: 1000px){
  .link-active::after, .link:hover::after {
    transform: scaleX(1);
  }

  .link-active::after {
    background: var(--primary);
  }
}


#header-menu {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

@media (max-width: 1000px) {

  #header-menu {
    display: block;
  }

  #header-links {
    display: flex;
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    left: 0;

    flex-direction: column;
    gap: 0;

    background: var(--bg);

    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-10px);

    transition:
      max-height 0.3s ease,
      opacity 0.3s ease,
      transform 0.3s ease;
    
    border:2px solid var(--border);
    border-radius:10px;
    z-index:1000;
  }

  #header-links.open {
    max-height: 400px;
    opacity: 1;
    transform: translateY(0);
    box-shadow: 0px 4px 4px var(--shadow-color-strong), 0px 12px 12px var(--shadow-color);
  }

  .link {
    padding: 15px;
    border-top: 1px solid var(--border);
  }
  #header-links .link:nth-child(1){
    border:none;
  }
}

#header-menu span {
  position: absolute;
  left: 8px;
  width: 24px;
  height: 3px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#header-menu span:nth-child(1) {
  top: 11px;
}

#header-menu span:nth-child(2) {
  top: 18px;
}

#header-menu span:nth-child(3) {
  top: 25px;
}

#header-menu.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

#header-menu.open span:nth-child(2) {
  opacity: 0;
}

#header-menu.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.article{
  max-width:960px;
  margin:auto;
}

h2{
  font-size:32px;
  margin-bottom:10px;
}

.image {
  margin:0;
  max-width:100%;
}

.image img {
  max-width:100%;
  border-radius:10px;
  box-shadow: 0px 4px 4px var(--shadow-color-strong), 0px 12px 12px var(--shadow-color);
  display: block;
  position:relative;
}

.source {
  height: 30px;
  margin-top: -30px;
  background: var(--bg);
  display: flex;
  align-items: center;
  padding: 0 12px;
  box-sizing: border-box;
  position:absolute;
  border-radius:0 10px 0 10px;
}

.source a {
  color: var(--text-muted);
  text-decoration:none;
}

.key-info {
  font-weight:bold;
}

.date-written {
  font-size:14px;
  color: var(--text-muted);
}

footer {
  padding: 75px 0;
  text-align:center;
}

#share-container a{
  text-decoration:none;
  color: var(--text);
}

#share-container {
  margin:10px 0;
}

@media (min-width: 1000px) {
  #share-container {
    margin:-40px 10px 30px auto;
    width:fit-content;
  }
}

#share-end{
  background-color: var(--bg);
  border: 2px solid var(--border);
  border-radius: 10px;
  display: flex;
  flex-direction:column;
  align-items: center;
  position: relative;
  max-width:960px;
  margin:auto;
  text-align:center;
  box-shadow: 0px 4px 4px var(--shadow-color-strong), 0px 12px 12px var(--shadow-color);
}

#share-end p {
  color: var(--text-muted);
}

.share-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
}

.prim-btn, .sec-btn {
  padding: 12px 18px;
  border-radius: 10px;
  text-decoration: none;
  transition: 0.2s ease;
  color: var(--bg);
}

.prim-btn:hover, .sec-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0px 4px 4px var(--shadow-color-strong), 0px 12px 12px var(--shadow-color);
}

.prim-btn{
  background: var(--text);
}

.prim-btn:hover{
  background: var(--text-muted);
}

.sec-btn{
  background: var(--primary);
}

.sec-btn:hover{
  background: var(--secondary);
}

.share-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  width: calc(100% - 40px);
  max-width: 600px;

  margin: 0 auto 10px auto;
  padding: 12px;
  border-radius: 12px;
  background: var(--bg-light);
  border: 1px solid var(--border);
}

.share-link input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  outline: none;
  font-size: 14px;
}

.share-link button {
  background: var(--primary);
  color: var(--bg);
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s ease;
}

.share-link button:hover {
  background: var(--secondary);
}

.stories {
  max-width:960px;
  margin:auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.story {
  border: 2px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.2s;
  background-color: var(--bg);
  height:100%;
}

.story:hover{
  transform: translateY(-2px);
  box-shadow: 0px 4px 4px var(--shadow-color-strong), 0px 12px 12px var(--shadow-color);
}

.story a {
  text-decoration:none;
}

.story img {
  width:100%;
}

.story h3 {
  color: var(--text);
  margin: 10px 10px 15px 10px;
}

.section-h {
  max-width:960px;
  margin: 30px auto;
}

.hidden {
  display:none;
}