* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #e9ece8;
  color: #111;
}

a {
  color: #1F3D2B;
}

a:hover {
  color: #C9A24D;
}

.pageShell {
  width: min(1400px, calc(100% - 48px));
  margin: 0 auto;
  background: #ffffff;
  min-height: 100vh;
  border-left: 1px solid #7a7a7a;
  border-right: 1px solid #7a7a7a;
}

/* Top header */
.topHeader {
  background: #1F3D2B;
  color: #fff;
}

.topHeaderInner {
  padding: 14px 16px 10px;
}

.brandRow {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.brand {
  font-size: 34px;
  font-weight: bold;
  letter-spacing: -0.5px;
  color: #FAF8F4;
  text-shadow:
    1px 1px 0 #C9A24D,
    2px 2px 0 #2B2B2B,
    3px 3px 0 rgba(0, 0, 0, 0.35);
}

.topRightLinks {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.topRightLinks a {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
}

.searchRow {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
  flex-wrap: wrap;
}

.searchInput {
  width: 100%;
  max-width: 520px;
  height: 28px;
  border: 1px solid #7f7f7f;
  padding: 4px 8px;
}

.searchSelect,
.searchBtn {
  height: 28px;
  border: 1px solid #7f7f7f;
  background: #fff;
}

.searchBtn {
  padding: 0 12px;
  cursor: pointer;
}

.searchMessage {
  margin: 8px 0 0;
  font-size: 13px;
  color: #ffffff;
}

.searchHighlight {
  background: #fff3a3;
  padding: 0 2px;
}

.altTheme .searchMessage {
  color: #FAF8F4;
}

.navBar {
  background: #6E8FBF;
  padding: 8px 12px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.tabLink {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
}

.tabLink.active {
  font-weight: bold;
  text-decoration: underline;
}

/* Main layout */
.profilePage {
  display: grid;
  grid-template-columns: 330px minmax(0, 860px);
  gap: 18px;
  padding: 14px;
  align-items: start;
  justify-content: start;
}

.leftColumn,
.rightColumn {
  display: grid;
  gap: 18px;
  align-content: start;
}

/* Intro area */
.profileIdentity h1 {
  font-size: 46px;
  margin: 0 0 14px;
  line-height: 1;
}

.profileTop {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 14px;
  align-items: start;
  margin-bottom: 12px;
}

.profileImagePlaceholder {
  width: 170px;
  height: 190px;
  border: 1px solid #7f7f7f;
  background: #efefef;
  display: grid;
  place-items: center;
  color: #666;
  font-size: 13px;
  text-align: center;
  padding: 10px;
}

.profileFacts p,
.profileQuickStats p {
  margin: 0 0 8px;
  font-size: 14px;
}

/* Modules */
.module {
  border: 2px solid #6699cc;
  background: #fff;
}

.moduleHeader {
  padding: 6px 10px;
  font-weight: bold;
  font-size: 15px;
}

.moduleHeader.blue {
  background: #6E8FBF;
  color: #ffffff;
}

.moduleHeader.orange {
  background: #C9A24D;
  color: #2B2B2B;
}

.moduleBody {
  padding: 12px;
  font-size: 15px;
}

.moduleBody h3 {
  margin: 0 0 8px;
  color: #cc6600;
  font-size: 16px;
}

.moduleBody p {
  margin: 0 0 12px;
  line-height: 1.4;
}

/* Contact section */
.contactGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
}

.contactGrid a {
  text-decoration: none;
  font-weight: bold;
  color: #0b3b8c;
  font-size: 14px;
}

/* URL box */
.urlBox {
  font-weight: normal;
  font-size: 15px;
  background: #f7fbff;
  border: 1px solid #cddbee;
}

/* Interest table */
.interestTable {
  display: grid;
  gap: 0;
}

.interestRow {
  display: grid;
  grid-template-columns: 120px 1fr;
}

.interestLabel {
  background: #b8d0ee;
  padding: 10px;
  font-weight: bold;
  border-top: 1px solid #fff;
}

.interestValue {
  background: #dce9f8;
  padding: 10px;
  border-top: 1px solid #fff;
}

/* Buttons */
.extrasRow {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.msButton {
  border: 1px solid #1F3D2B;
  background: #FAF8F4;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
  color: #1F3D2B;
}

.msButton:hover {
  background: #1F3D2B;
  color: #ffffff;
}

/* Right column */
.rightColumn {
  width: 100%;
  max-width: 860px;
}

.contentSection {
  display: none;
}

.contentSection.active {
  display: block;
}

.textLink {
  font-weight: bold;
  text-decoration: none;
  color: #0b3b8c;
}

.tinyNote {
  color: #555;
  font-size: 13px;
}

/* Top 8 */
.top8Grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.topFriend {
  text-decoration: none;
  color: #0b3b8c;
  text-align: center;
  display: block;
  padding: 4px;
}

.topFriendPic {
  aspect-ratio: 1 / 1;
  border: 1px solid #888;
  background: #efefef;
  display: grid;
  place-items: center;
  margin-bottom: 6px;
  font-weight: bold;
  color: #555;
  font-size: 42px;
  opacity: 0.9;
}

.topFriendName {
  font-size: 13px;
  font-weight: bold;
}

.topFriend.empty {
  opacity: 0.65;
  pointer-events: none;
}

/* Footer */
.siteFooter {
  background: #1F3D2B;
  color: #FAF8F4;
  text-align: center;
  padding: 18px 12px;
  font-size: 13px;
}

/* Sparkles */
.sparkle {
  pointer-events: none;
  z-index: 9999;
}

/* Cursor Trail */
.cursorDot {
  position: fixed;
  font-size: 10px;
  color: #C9A24D;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.8;
}

/* Theme Toggle */
.altTheme {
  background: #e3e7e2;
  color: #2B2B2B;
}

/* Page container */
.altTheme .pageShell {
  background: #f4f6f2;
}

/* Headers */
.altTheme .topHeader {
  background: #2B2B2B;
}

.altTheme .navBar {
  background: #8aa2c8;
}

/* Module headers */
.altTheme .moduleHeader.blue {
  background: #2B2B2B;
  color: #FAF8F4;
}

.altTheme .moduleHeader.orange {
  background: #d4b26a;
  color: #2B2B2B;
}

.altTheme .brand {
  color: #FAF8F4;
}

.altTheme .siteFooter {
  background: #2B2B2B;
}

.altTheme .siteFooter,
.altTheme .siteFooter * {
  color: #FAF8F4;
}

/* Links */
.altTheme a {
  color: #1F3D2B;
}

/* ThoughtText */
#thoughtText {
  display: inline-block;
  margin: 10px 0 12px 12px;
  padding: 8px 12px;
  background: #f7fbff;
  border: 1px solid #6699cc;
  border-radius: 14px;
  font-size: 13px;
  color: #2B2B2B;
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.08);
  max-width: 260px;
}

#thoughtText:empty {
  display: none;
}

/* Profile Pic */
.profilePic {
  width: 150px;
  height: 150px;
  border: 2px solid #6699cc;
  overflow: hidden;
  background: #eee;
}

.profilePic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 3D hover accents */
@media (hover: hover) and (pointer: fine) {
  .module,
  .profilePic,
  .topFriendPic {
    transition:
      transform 120ms ease,
      box-shadow 120ms ease,
      border-color 120ms ease,
      background 120ms ease;
    transform-style: preserve-3d;
  }

  .module:hover {
    transform: perspective(900px) rotateX(1deg) rotateY(-1deg) translateY(-2px);
    box-shadow: 8px 8px 0 rgba(31, 61, 43, 0.18);
  }

  .profilePic:hover {
    transform: perspective(800px) rotateY(5deg) rotateX(2deg) translateY(-2px);
    box-shadow: 6px 6px 0 rgba(31, 61, 43, 0.22);
  }

  .topFriend:hover .topFriendPic {
    background: #e6e6e6;
    transform: perspective(700px) translateZ(18px) scale(1.04);
    box-shadow: 5px 5px 0 rgba(31, 61, 43, 0.18);
    cursor: default;
  }
}

/* Bookshelf */

.bookshelf {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 24px 0 16px;
}

.book {
  width: 110px;
  text-align: center;
}

.bookCover {
  font-size: 52px;
  margin-bottom: 8px;
  transition: transform 150ms ease;
}

.book:hover .bookCover {
  transform: translateY(-4px) rotate(-3deg);
}

.bookTitle {
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 4px;
  line-height: 1.3;
}

.bookStatus {
  font-size: 12px;
  color: #666;
}

/* Dev Diary */

.devDiaryFeed {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

.diaryEntry {
  border: 1px solid #cddbee;
  background: #f7fbff;
  padding: 10px;
}

.diaryEntryTitle {
  font-weight: bold;
  margin-bottom: 4px;
}

.diaryEntryMeta {
  font-size: 12px;
  color: #666;
}

.diaryEntry a {
  text-decoration: none;
  font-weight: bold;
}

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

  .top8Grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .profileIdentity h1 {
    font-size: 34px;
  }

  .heroStatusInner {
    font-size: 24px;
    padding: 24px 16px;
  }
}

@media (max-width: 560px) {
  .brand {
    font-size: 28px;
  }

  .profileTop {
    grid-template-columns: 1fr;
  }

  .contactGrid {
    grid-template-columns: 1fr;
  }

  .interestRow {
    grid-template-columns: 1fr;
  }

  .top8Grid {
    grid-template-columns: 1fr 1fr;
  }

  .moduleBody {
    font-size: 14px;
  }
}

@media (min-width: 1280px) {
  body {
    background: #d6d6d6;
  }

  .pageShell {
    width: min(1240px, calc(100% - 40px));
  }

  .profilePage {
    grid-template-columns: 330px minmax(0, 860px);
    gap: 18px;
    justify-content: start;
  }

  .moduleBody {
    padding: 12px;
  }
}