@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

:root {
  --font-body: 'Roboto', sans-serif;
  --font-heading: 'Inter', sans-serif;
  --border-color: #eee;
  --text-color: #333;
  --nav-color: #777;
      
  color-scheme: light dark;
  --light-main-bg: #fff;
  --light-all-bg: #f4f4f5;
  --light-color: #333;
  --dark-main-bg: #211F26;
  --dark-all-bg: #141218;
  --dark-color: #E6E0E9;
}

html {
  font-size: 16px;
  color: var(--text-color);
}

body {
  flex-direction: column;
  min-height: 100dvh;
  display: flex;
  background-color: light-dark(var(--light-all-bg), var(--dark-all-bg));
  color: light-dark(var(--light-color), var(--dark-color));
  margin: 0;
}

header {
  position: sticky;
  top: 0;
  font-family: var(--font-heading);
  z-index: 10;
  background-color: #333;
}

main {
  flex-grow: 1;
  font-family: var(--font-body);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin: 0 auto;
  padding: 0 1rem;
  max-width: 1160px;
  & ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
  }
}

.nav-clickable {
  display: inline-block;
  font-size: 1.2rem;
  color: #ccc;
  padding: 0.8rem 1rem;
  margin: 0 0.25rem;
  border-radius: .5rem;
  text-decoration: none;
  transition: transform 0.2s;
}

.nav-clickable:hover {
  cursor: pointer;
  transform: translateY(-2px) scale(1.05);
}

.nav-brand {
  font-size: 1.3rem;
  font-weight: 600;
  color: #ccc;
  text-decoration: none;
  padding: 0.8rem 2rem;
}

main > picture {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 250px;
}

.hero-section > picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-section {
  display: block;
  width: 100%;
  height: 60dvh;
  min-height: 250px;
  background-color: #555;
  position: relative;
  overflow: hidden;
}

.blog-intro {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  background-color: rgba(0, 0, 0, 0.3);
  padding: 1rem;
  box-sizing: border-box;
}

.blog-intro h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 6vw, 2.5rem);
  font-weight: 600;
  margin: 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  white-space: nowrap;
  animation: typing 3s steps(30, end) forwards;
  width: 0;
  max-width: 90%;
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

.blog-posts {
  display: block;
  max-width: 900px;
  margin: -80px auto 40px auto;
  padding: 1.5rem 3rem;
  background-color: light-dark(var(--light-main-bg), var(--dark-main-bg));
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  position: relative;
  z-index: 2;
}

blog-card {
  display: block;
  width: auto;
  padding: 1rem;
  font-family: var(--font-body);
}

blog-card h2 a {
  color: light-dark(var(--light-color), var(--dark-color));
  text-decoration: none;
  transition: color 0.3s;
}

blog-card h2 a:hover {
  color: #007bff;
}

.card-footer {
  font-size: 0.9rem;
  color: #888;
}

.card-footer span {
  margin-right: 1.5rem;
}

.blog-post {
  display: block;
  max-width: 900px;
  margin: 40px auto;
  padding: 1.5rem 3rem;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  background-color: light-dark(var(--light-main-bg), var(--dark-main-bg));
  position: relative;
  z-index: 2;
}

.blog-post pre {
  background-color: light-dark(var(--light-main-bg), var(--dark-main-bg));
  border: 1px solid #e0e6e8;
  border-radius: 4px;
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.95rem;
  line-height: 1.1;
}

.comments fieldset {
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1.5rem 2rem;
}

.comments legend {
  font-weight: 600;
  font-size: 1.2rem;
  padding: 0 0.5rem;
}

.comments label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.comments input[type="text"], .comments textarea {
  width: 100%;
  padding: 0.75rem;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  margin-bottom: 1rem;
}

.comments button[type="submit"] {
  background-color: #007bff;
  color: white;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  border: none;
  border-radius: 4px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.comments button[type="submit"]:hover {
  background-color: #0056b3;
}

footer {
  border-top: 1px solid #eee;
  text-align: center;
  padding: .6rem 0;
  font-size: 0.8rem;
  color: #777;
}
