/* 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: #fdfdfd;
    color: #333;
	background-image: url('free-bg.jpg');
}

.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;
}

/* Header and Navigation */
header {
    background: #fff;
    border-bottom: 1px solid #ddd;
    padding: 1rem 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

nav ul li {
    margin-left: 1.5rem;
}

/* 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 */
}

.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;
}

/* Articles Page */
.search-container {
    margin-bottom: 2rem;
}

#searchInput {
    width: 100%;
    padding: 0.8rem;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#articleList {
    list-style: none;
    padding: 0;
}

.article-item a {
    display: block;
    padding: 1.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 1rem;
    color: #333;
}

.article-item a:hover {
    border-color: #007bff;
    text-decoration: none;
}

/* 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;
}

footer p {
    margin: 0.5rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
    }

    nav ul {
        margin-top: 1rem;
    }

    nav ul li {
        margin: 0 0.8rem;
    }

    /* Stacks hero image and content vertically on mobile */
    .hero {
        flex-direction: column;
        text-align: center;
    }

    /* Stacks explore items vertically on mobile */
    .explore-grid {
        flex-direction: column;
        align-items: center;
    }

    .explore-item {
        width: 100%;
        max-width: 350px; /* Optional: constrain width in vertical view */
    }

    .details-grid {
        grid-template-columns: 1fr;
    }
}

div#resume {
  min-width: 310px;
  font: 16px Helvetica, Avernir, sans-serif;
  line-height: 24px;
  color: #000
}

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 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:550px) {
  body {
    margin: 1rem
  }
  div#resume img {
    transform: rotate(0deg)
  }
}

@@media (max-width:400px) {
  div#resume dl dt {
    border-right: none;
    border-bottom: 1px solid #999
  }
  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
  }
  div#resume h2 {
    font-style: normal;
    font-weight: 400;
    font-size: 18px
  }
  div#resume dt {
    font-size: 20px
  }
  h1 {
    font-size: 36px;
    margin-right: 0;
    line-height: 0
  }
  div#resume img {
    margin: 0
  }
}

@@media (max-width:320px) {
  body {
    margin: 0
  }
  img {
    margin: 0;
    margin-bottom: -40px
  }
  div#resume {
    width: 320px;
    padding: 12px;
    overflow: hidden
  }
  p,
  li {
    margin-right: 20px
  }
}