/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: #161616;
  color: #e0e0e0;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 300;
}

a {
  color: #4a9eff;
  text-decoration: none;
  padding: 0.1rem 0.2rem;
  margin: -0.1rem -0.2rem;
  border-radius: 3px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

a:hover {
  background-color: rgba(74, 158, 255, 0.1);
  color: #e0e0e0;
}

/* Wrapper for sticky footer */
.wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header styles */
header {
  /* background-color: #1e1e1e; */
  padding: 2rem 1rem;
  text-align: center;
  /* box-shadow: 0 2px 4px rgba(0,0,0,0.2); */
}

header a.logo {
  display: inline-block;
  margin: 0 0 16px;
  color: #e0e0e0;
  font-size: 1.3rem;
  line-height: 1.3rem;
  font-weight: 600;
  text-decoration: none;
}

header a.logo:hover {

  color: #e0e0e0;
}

header a:hover {
  color: #4a9eff;
}

header ul li {
  display: inline-block;
}

header ul li:not(:last-child)::after {
  content: " / ";
  margin: 0 0.3rem;
}

/* Main content */
main {
  flex: 1;
  padding: 6rem 1rem;
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
  font-size: 1.1rem;
  line-height: 1.7;
}

/* Headings */
main h1 {
  font-size: 2.5rem;
  font-weight: 600;
  margin: 2rem 0 1.5rem;
  line-height: 1.3;
  text-align: center;
  padding: 0 0 6rem;
}

main h2 {
  font-size: 2rem;
  margin: 2rem 0 1rem;
  font-weight: 600;
}

main h3 {
  font-size: 1.5rem;
  margin: 1.5rem 0 1rem;
  font-weight: 600;
}

main h4 {
  font-size: 1.25rem;
  margin: 1.5rem 0 1rem;
  font-weight: 600;
}

/* Paragraphs and lists */
main p {
  margin-bottom: 1.2rem;
}

main ul,
main ol {
  margin: 1.2rem 0;
  padding-left: 1.5rem;
}

main li {
  margin-bottom: 0.5rem;
}

main li > ul,
main li > ol {
  margin: 0.5rem 0;
}

main .title {
  padding: 0 0 9rem;
}

main .center {
  text-align: center;
}

main .work-links {
  text-align: center;
  padding: 0 0 6rem;
}

main .work-links span {
  display: inline-block;
  margin: 0 0.5rem;
}

/* Links */
/* main a {
  color: #4a9eff;
  text-decoration: none;
  padding: 0.1rem 0.2rem;
  margin: -0.1rem -0.2rem;
  border-radius: 3px;
  transition: background-color 0.2s ease;
}

main a:hover {
  background-color: rgba(74, 158, 255, 0.1);
  color: #4a9eff;
} */

/* Blockquotes */
main blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  border-left: 4px solid #4a9eff;
  background: rgba(74, 158, 255, 0.1);
  border-radius: 0 4px 4px 0;
}

main blockquote p:last-child {
  margin-bottom: 0;
}

/* Code blocks */
main pre {
  background: #1e1e1e;
  padding: 1.2rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

main code {
  background: #1e1e1e;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'Fira Code', 'Consolas', monospace;
}

main pre code {
  padding: 0;
  background: none;
}

/* Horizontal rule */
main hr {
  margin: 2rem 0;
  border: none;
  border-top: 2px solid #333;
}

/* Tables */
main table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

main th,
main td {
  padding: 0.75rem;
  border: 1px solid #333;
  text-align: left;
}

main th {
  background: #1e1e1e;
}

main tr:nth-child(even) {
  background: rgba(30, 30, 30, 0.5);
}

/* btn */

.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  color: #e0e0e0;
  background: #0479ff;
  border-radius: 8px;
  /* border: 1px solid #333; */
  /* box-shadow: 
      0 2px 4px rgba(0,0,0,0.2),
      0 4px 8px rgba(74, 158, 255, 0.1),
      inset 0 1px 1px rgba(255,255,255,0.1); */
  /* transition: transform 0.2s ease, box-shadow 0.2s ease; */
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-3px);
  /* background: #4a9eff; */
  background: #0479ff;
  /* box-shadow: 0 4px 12px rgba(0,0,0,0.3); */
  color: #e0e0e0;
}

.btn:active {
  transform: translateY(0);
  /* background: #4a9eff; */
  /* box-shadow: 
      0 1px 2px rgba(0,0,0,0.2),
      0 2px 4px rgba(74, 158, 255, 0.1),
      inset 0 1px 1px rgba(255,255,255,0.1); */
}

/* Images */
main img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
}

/* Strong and emphasis */
main strong {
  color: #fff;
  font-weight: 600;
}

main em {
  font-style: italic;
}

/* Definition lists */
main dl {
  margin: 1.5rem 0;
}

main dt {
  font-weight: 600;
  color: #fff;
  margin-top: 1rem;
}

main dd {
  margin-left: 1.5rem;
  margin-top: 0.5rem;
}

/* Keyboard, Subscript, Superscript */
main kbd,
main sub,
main sup {
  background: #1e1e1e;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
}

main sup {
  vertical-align: super;
}

main sub {
  vertical-align: sub;
}

/* Task lists */
main input[type="checkbox"] {
  margin-right: 0.5rem;
}

/* Footer styles */
footer {
  color: #999;
  font-size: 0.9rem;
  background-color: #1e1e1e;
  padding: 1rem;
  text-align: center;
  margin-top: auto;
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.2);
}

footer a {
  color: #e0e0e0;
  text-decoration: none;
}

footer a:hover {
  /* color: #4a9eff; */
}

footer a.active {
  color: #999;
}

/* Social tiles */
.links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 8rem 0;
}

.social-tile {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: #1e1e1e;
  border-radius: 8px;
  text-decoration: none;
  color: #e0e0e0;
  /* transition: transform 0.2s ease, box-shadow 0.2s ease; */
  /* transition: transform 0.2s ease; */
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.social-tile:hover {
  color: #e0e0e0;
  background: #252525;
  transform: translateY(-3px);
  /* box-shadow: 0 4px 12px rgba(0,0,0,0.3); */
}

.social-tile:active {
  transform: translateY(0px);
}

.social-tile .platform {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.social-tile .platform small {
  font-size: 0.6rem;
  font-weight: normal;
  color: #999;
  vertical-align: top;
}

.social-tile .username {
  color: #4a9eff;
  margin-bottom: 0.5rem;
}

.social-tile .description {
  font-size: 0.9rem;
  color: #999;
}

/* list sections */
.best-list,
.shit-list {
  margin: 3rem 0;
}

.best-list h2,
.shit-list h2 {
  font-size: 2rem;
  /* margin-bottom: 1.5rem; */
  /* padding-bottom: 0.5rem; */
  /* border-bottom: 2px solid #333; */
}

.list-grid {
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  counter-reset: list;
}

.list-item {
  display: flex;
  gap: 1.5rem;
  background: #1e1e1e;
  border-radius: 8px;
  padding: 1.2rem;
  text-decoration: none;
  color: inherit;
  /* transition: transform 0.2s ease, background-color 0.2s ease; */
  /* transition: transform 0.2s ease, box-shadow 0.2s ease; */
  /* transition: transform 0.2s ease; */
  transition: transform 0.2s ease, background-color 0.2s ease;
  position: relative;
}

.list-item::before {
  counter-increment: list;
  content: counter(list);
  font-size: 2.5rem;
  font-weight: bold;
  color: #333;
  min-width: 2ch;
  text-align: center;
  align-self: center;
}

.list-item:hover {
  background: #252525;
  /* transform: translateX(10px); */
  transform: translateY(-3px);
}

.list-item:active {
  transform: translateY(0px);
}

.list-content {
  flex: 1;
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.list-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #fff;
}

.score {
  font-weight: bold;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.9rem;
}

.success .score {
  background: rgba(46, 213, 115, 0.15);
  color: #2ed573;
}

.failure .score {
  background: rgba(255, 71, 87, 0.15);
  color: #ff4757;
}

.list-item p {
  color: #999;
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  background: #2a2a2a;
  color: #4a9eff;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.8rem;
}

/* Responsive design */
@media (max-width: 425px) {
  nav ul {
      flex-direction: column;
      gap: 1rem;
  }

  header {
      padding: 1.5rem 1rem;
  }

  main h1 {
      font-size: 2rem;
  }
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .list-grid {
      grid-template-columns: 1fr;
  }

  .list-item {
      padding: 1rem;
  }
}