/* Joseph Murphy - Personal Site */

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: #999;
  background-color: #000;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
  color: #fff;
  font-weight: 400;
  line-height: 1.3;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: #db4f3d;
  text-decoration: none;
}

a:hover, a:focus {
  color: #999;
}

/* Layout */
.wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  padding: 1.5rem 0;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 1.5rem;
  margin: 0;
}

.site-title a {
  color: #fff;
}

.site-title a:hover {
  color: #db4f3d;
}

/* Navigation */
.main-nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.main-nav a {
  color: #fff;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.main-nav a:hover {
  color: #db4f3d;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #db4f3d;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle .fa-times {
  display: none;
}

.menu-toggle.is-open .fa-bars {
  display: none;
}

.menu-toggle.is-open .fa-times {
  display: inline-block;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #222;
    padding: 1rem;
  }

  .main-nav.is-open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 1rem;
  }
}

/* Main Content */
.site-content {
  padding-top: 80px;
}

/* Sections */
section {
  padding: 2rem 0;
}

/* Two Column Layout */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 768px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

/* Book Sections */
.book-title {
  text-align: center;
  font-style: italic;
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.book-cover img {
  max-width: 100%;
  width: 438px;
  height: auto;
}

.book-info {
  font-size: 15px;
}

.book-meta {
  font-size: 12px;
  color: #777;
}

.sold-out {
  color: #008ec2;
  font-size: 16px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.667em 1.333em;
  background-color: #32373c;
  color: #fff;
  border-radius: 9999px;
  font-size: 1.125em;
  text-transform: uppercase;
}

.btn:hover {
  color: #fff;
  opacity: 0.9;
}

/* Spacer */
.spacer {
  height: 100px;
}

/* Divider */
hr {
  border: none;
  border-bottom: 2px solid #2f2f2f;
  margin: 2rem auto;
  width: 100px;
  opacity: 0.4;
}

/* Bio Section */
.bio-images img {
  width: 250px;
  height: auto;
  display: block;
  margin: 0 auto 1rem;
}

.bio-images figcaption {
  text-align: center;
  font-size: 13px;
  color: #555;
}

.bio-text {
  font-size: 15px;
}

/* Works Section */
.works-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem 2rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .works-grid {
    grid-template-columns: 1fr;
  }
}

.works-category {
  font-weight: bold;
  text-decoration: underline;
  font-size: 16px;
  color: #fff;
}

.works-list {
  font-size: 15px;
}

.works-list p {
  margin-bottom: 0.5rem;
}

/* Contact Section */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* Form */
.contact-form label {
  display: block;
  margin-bottom: 0.25rem;
  color: #fff;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 1rem;
  background-color: #000;
  border: 1px solid #2f2f2f;
  color: #999;
  font-family: inherit;
  font-size: 1rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #db4f3d;
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.contact-form button[type="submit"] {
  padding: 0.5rem 1.5rem;
  background-color: #32373c;
  color: #fff;
  border: none;
  border-radius: 9999px;
  font-size: 1rem;
  cursor: pointer;
}

.contact-form button[type="submit"]:hover {
  opacity: 0.9;
}

/* Footer */
.site-footer {
  padding: 2rem 0;
  text-align: center;
  font-size: 14px;
}

.site-footer a {
  color: #999;
}

.site-footer a:hover {
  color: #db4f3d;
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background-color: #db4f3d;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: #fff;
  color: #000;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
