/*
Theme Name: RJ Author Theme
Theme URI: https://ryanmjohnson.com/
Author: Ryan Johnson
Description: Custom author website theme with textured background and sidebar layout.
Version: 1.0
*/

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Century Gothic", "Helvetica Neue", Arial, sans-serif;
  background: #4d4a45; /* dark outer frame */
  display: flex;
  justify-content: center;
  padding: 20px;
}

.site-frame {
  width: 100%;
  max-width: 1400px;
  min-height: 90vh;

  /* textured canvas background from /images/RMJ-Background.png */
  background: #c7975f url("images/RMJ-Background.png") repeat;

  border: 2px solid #333;
  padding: 24px 32px 32px;
}

/* TOP NAV (desktop) */
.top-nav {
  text-align: left;          /* left-align the menu */
  margin: 24px 0 24px;       /* vertical spacing above/below menu */
}

.top-nav ul {
  list-style: none;
  display: flex;
  gap: 40px;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-left: 352px;        /* aligns HOME with left edge of content panel */
}

.top-nav a {
  text-decoration: none;
  color: #111;
  font-weight: 700;          /* bold menu items */
}

.top-nav a:hover {
  text-decoration: underline;
}

/* MAIN LAYOUT */
.layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
  align-items: stretch;
}

/* LEFT PANEL */
.sidebar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-top: -36px;         /* pull entire sidebar (yellow block) up toward menu */
}

.logo-block {
  text-align: center;
  margin: 0 0 24px;          /* no extra offset on logo itself */
}

.logo-block img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* FEATURED IMAGE BLOCK */
.image-block {
  background: transparent;
  border: none;
  padding: 0;
  text-align: center;
}

/* The photo/frame */
.sidebar-photo {
  width: 100%;
  height: auto;
  display: block;
  border: 8px solid #f4f4f4;     /* white mat around the image */
  box-shadow: 0 0 0 2px #b0b0b0; /* thin gray outline outside the white */
}

/* CONTACT RYAN – base styling */
.contact-link {
  margin-top: 24px;
  text-align: center;
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.contact-link a {
  text-decoration: none;
  color: #111;
  display: block;
}

.contact-link a:hover {
  text-decoration: underline;
}

/* Desktop vs mobile variants */
.contact-link-desktop {
  display: block;
}

.contact-link-mobile {
  display: none; /* hidden on desktop, shown on mobile */
}

/* COPYRIGHT – half size, under Contact Ryan */
.copyright-line {
  font-size: 0.70rem;    
  letter-spacing: 0.12em;
  margin-top: 6px;
  opacity: 0.7;
  text-transform: uppercase;
}

/* CONTENT PANEL */
.content-panel {
  background: #ffffff;
  border: 2px solid #b0b0b0;
  padding: 40px 48px;
}

.content-panel h1 {
  font-size: 1.6rem;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.content-panel p {
  text-align: justify;
  margin-bottom: 1.2rem;
  font-size: 0.98rem;
  line-height: 1.8;
}

/* RESPONSIVE – TABLET */
@media (max-width: 980px) {
  body {
    padding: 10px;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .content-panel {
    padding: 28px 24px;
  }

  /* On small screens, let the menu center again for sanity */
  .top-nav {
    text-align: center;
    margin: 20px 0;
  }

  .top-nav ul {
    margin-left: 0;
    justify-content: center;
    flex-wrap: wrap;
  }

  .sidebar {
    margin-top: 0;           /* avoid weird overlap on narrow screens */
  }
}

/* RESPONSIVE – MOBILE */
@media (max-width: 640px) {

  /* 1) Hide the original sidebar logo on mobile */
  .logo-block {
    display: none !important;
  }

  /* 2) Make room for a NEW mobile-only logo at the very top */
  .site-frame {
    position: relative;
    padding-top: 280px;   /* space above content for the mobile logo */
  }

  .site-frame::before {
    content: "";
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;              /* width of mobile logo */
    height: 260px;             /* height of mobile logo */
    background: url("images/RMJ-Logo-Mobile.png") no-repeat center center;
    background-size: contain;
    pointer-events: none;
  }

  /* 3) Menu appears below the logo & stacks vertically */
  .top-nav {
    margin-top: 0;
    text-align: center;
  }

  .top-nav ul {
    flex-direction: column;
    gap: 12px;
    margin-left: 0;
    justify-content: center;
    align-items: center;
  }

  /* 4) Contacts:
        - HIDE the one in the sidebar under the photo
        - SHOW the bottom-of-page version
  */
  .sidebar .contact-link-desktop {
    display: none;
  }

  .contact-link-mobile {
    display: block;
    margin: 24px auto 0;
    text-align: center;
  }
}
