/* General Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #fdfdfd;
    color: #333;
    background-image: url('/free-bg.jpg');
    /* background-size: cover;
    background-attachment: fixed;
    background-position: center; 
    background-repeat: repeat-y; 
    min-height: 100vh;*/
}

.container {
    max-width: 960px;
    margin: 2rem auto;
    padding: 0 1rem;
}

h1, h2, h3 {
    line-height: 1.2;
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* UPDATED: Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 4rem 2rem;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.hero-content {
    flex: 1;
}

.hero-image img {
    max-width: 150px;
    height: auto;
    border-radius: 50%; /* Makes the image circular */
    border: 3px solid #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.subtitle {
    font-size: 1.2rem;
    color: #555;
}

/* Sections */
section {
    margin-bottom: 2rem;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* UPDATED: Explore Section */
.explore-grid {
    display: flex; /* Changed from grid to flex */
    justify-content: space-around; /* Distributes items horizontally */
    flex-wrap: wrap; /* Allows items to wrap on smaller screens if needed */
    gap: 2rem;
    text-align: center;
}

.explore-item {
    display: block;
    padding: 2rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: all 0.3s ease;
    color: #333;
    flex-basis: 250px; /* Provides a base width for each item */
    flex-grow: 1; /* Allows items to grow and fill space */
    flex-shrink: 0;
    min-height: fit-content; /* Prevent unnecessary stretching */
}

.explore-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    text-decoration: none;
    border-color: #007bff;
}

.explore-item .icon-container {
    margin-bottom: 1rem;
    color: #007bff;
}

/* Details Grid */
.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* Books Page */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.book-item {
    text-align: center;
}

.book-item img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.button {
    display: inline-block;
    background: #007bff;
    color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    margin-top: 1rem;
}

.button:hover {
    background: #0056b3;
    text-decoration: none;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
    background: #fff;
    border-top: 1px solid #ddd;
    color: #333;
}

footer p {
    margin: 0.5rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 0;
    }

    .container {
        margin: 1rem auto;
        padding: 0 0.75rem;
    }

    /* Stacks hero image and content vertically on mobile */
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1rem;
        gap: 1.5rem;
    }

    .hero h1 {
        font-size: 1.5rem;
        line-height: 1.3;
    }

    .hero-content {
        width: 100%;
    }

    .hero-image img {
        max-width: 120px;
    }

    .subtitle {
        font-size: 1rem;
    }

    /* Better section padding on mobile */
    section {
        padding: 1.5rem 1rem;
        margin-bottom: 1rem;
    }

    section h2 {
        font-size: 1.5rem;
    }

    /* Stacks explore items vertically on mobile */
    .explore-grid {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .explore-item {
        /* width: 100%; */
        max-width: none;
        padding: 1.5rem 1rem;
        flex-grow: 0 !important; /* Prevent vertical stretching */
        flex-basis: auto !important; /* Let content determine height */
        flex-shrink: 0;
    }

    .explore-item h3 {
        margin: 0.5rem 0 0 0;
    }

    .details-grid {
        grid-template-columns: 1fr;
    }

    footer {
        padding: 1.5rem 1rem;
        font-size: 0.9rem;
    }
}

div#resume {
  min-width: 310px;
  font: 16px Helvetica, Avernir, sans-serif;
  line-height: 24px;
  color: #000;
  overflow-x: hidden;
}

div#resume h1 {
  margin: 0 0 16px 0;
  padding: 0 0 16px 0;
  font-size: 42px;
  font-weight: bold;
  letter-spacing: -2px;
  border-bottom: 1px solid #999;
  line-height: 50px;
}

div#resume h2 {
  font-size: 20px;
  margin: 0 0 6px 0;
  position: relative;
}

div#resume h2 span {
  position: absolute;
  bottom: 0;
  right: 0;
  font-style: italic;
  font-family: Georgia, serif;
  font-size: 16px;
  color: #999;
  font-weight: normal;
}

div#resume p {
  margin: 0 0 16px 0;
}

div#resume ul {
  padding-left: 1.5rem;
}

div#resume li {
  margin-bottom: 0.5rem;
}

div#resume a {
  color: #999;
  text-decoration: none;
  border-bottom: 1px dotted #999;
}

div#resume a:hover {
  border-bottom-style: solid;
  color: #000;
}

div#resume p.objective {
  font-family: Georgia, serif;
  font-style: italic;
  color: #666;
}

div#resume dt {
  font-style: italic;
  font-weight: bold;
  font-size: 18px;
  text-align: right;
  padding: 0 26px 0 0;
  width: 150px;
  border-right: 1px solid #999;
}

div#resume dl {
  display: table-row;
}

div#resume dl dt,
div#resume dl dd {
  display: table-cell;
  padding-bottom: 20px;
}

div#resume dl dd {
  width: 500px;
  padding-left: 26px;
}

div#resume img {
  float: right;
  padding: 10px;
  background: #fff;
  margin: 0 30px;
  transform: rotate(-4deg);
  box-shadow: 0 0 4px rgba(0, 0, 0, .3);
  width: 30%;
  max-width: 220px;
}

@media (max-width:1100px) {
  div#resume h2 span {
    position: static;
    display: block;
    margin-top: 2px;
  }
}

@media (max-width:768px) {
  div#resume {
    font-size: 15px;
    min-width: auto;
  }

  div#resume h1 {
    font-size: 28px;
    line-height: 1.2;
  }

  div#resume h2 {
    font-size: 18px;
  }

  div#resume h3 {
    font-size: 16px;
  }

  div#resume ul {
    padding-left: 1.25rem;
  }

  div#resume li {
    font-size: 14px;
  }
}

@media (max-width:550px) {
  body {
    margin: 0;
  }

  div#resume img {
    transform: rotate(0deg);
    float: none;
    display: block;
    margin: 1rem auto;
    max-width: 150px;
  }

  div#resume h1 {
    font-size: 24px;
  }

  div#resume h2 {
    font-size: 17px;
  }
}

@media (max-width:400px) {
  div#resume dl dt {
    border-right: none;
    border-bottom: 1px solid #999;
    padding: 0 0 8px 0;
  }

  div#resume dl,
  div#resume dl dd,
  div#resume dl dt {
    display: block;
    padding-left: 0;
    margin-left: 0;
    padding-bottom: 0;
    text-align: left;
    width: 100%;
  }

  div#resume dl dd {
    margin-top: 6px;
    padding-left: 0;
  }

  div#resume h2 {
    font-style: normal;
    font-weight: 600;
    font-size: 16px;
  }

  div#resume dt {
    font-size: 18px;
    text-align: left;
  }

  div#resume img {
    margin: 0.5rem auto 1rem;
  }
}

@media (max-width:320px) {
  body {
    margin: 0;
  }

  div#resume {
    padding: 0.5rem;
  }

  div#resume p,
  div#resume li {
    margin-right: 0;
  }
}
