/* ==========================================================================
   tomhall.xyz – site styles
   Recreates the look of the old "Hellomouse" WordPress theme without
   jQuery, Font Awesome or any plugins.

   Quick colour/size tweaks: change the variables just below.
   ========================================================================== */

:root {
  --accent: #e56b4b;        /* links, underline under current menu item, grid overlay */
  --accent-hover: #eb9078;  /* link hover */
  --text: #707070;          /* body text */
  --heading: #575757;       /* site name, titles, headings */
  --line: #efefef;          /* thin borders */
  --overlay: rgba(229, 107, 75, 0.9);
  --font: "Lato", "Helvetica Neue", Arial, sans-serif;
}

/* ---- Fonts (self-hosted – no Google Fonts request) ---------------------- */
@font-face { font-family: "Lato"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/lato-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-style: italic; font-weight: 400; font-display: swap; src: url("/assets/fonts/lato-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/lato-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-style: italic; font-weight: 700; font-display: swap; src: url("/assets/fonts/lato-latin-700-italic.woff2") format("woff2"); }

/* ---- Base ---------------------------------------------------------------- */
html { box-sizing: border-box; overflow-y: scroll; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
*, *::before, *::after { box-sizing: inherit; }

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.571428571;
  background-color: #fff;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .page-title, .widget-title {
  line-height: 1.35;
  margin: 0 0 20px;
  overflow-wrap: break-word;
  text-rendering: optimizeLegibility;
  color: var(--heading);
  font-weight: 400;
  letter-spacing: -0.05em;
}
h1 { font-size: 24px; }
h2 { font-size: 20px; }
h3, .page-title, .widget-title { font-size: 18px; }
h4 { font-size: 16px; }
h5 { font-size: 14px; }
h6 { font-size: 12px; }

p { margin: 0 0 15px; }
ul, ol { margin: 0 0 16px; padding-left: 20px; }
ul { list-style: disc; }
ol { list-style: decimal; }
li > ul, li > ol { margin-bottom: 0; }
strong, b { font-weight: 700; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}
a:hover, a:focus { color: var(--accent-hover); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

img { display: inline-block; vertical-align: middle; max-width: 100%; height: auto; border: 0; }
picture { display: contents; }
figure { margin: 0; }
iframe, video, embed, object, audio { max-width: 100%; margin-bottom: 15px; }
p > iframe, p > video { margin-bottom: 0; }

hr { border: 0; border-top: 2px solid #808080; margin: 30px 0; }

blockquote {
  margin: 30px 0;
  padding-left: 15px;
  border-left: 3px solid #ccc;
  font-size: 17px;
}
blockquote p:last-child { margin-bottom: 0; }

code, kbd, samp, pre { font-family: Menlo, Consolas, monospace; font-size: 0.93em; }
pre { padding: 15px; border: 1px solid rgba(0, 0, 0, 0.1); overflow-x: auto; }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.skip-link:focus { position: fixed; top: 10px; left: 10px; width: auto; height: auto; clip: auto; margin: 0; padding: 8px 12px; background: #fff; z-index: 2000; }

/* ---- Layout grid (same widths as the old Bootstrap grid) ------------------ */
.container { width: 100%; margin: 0 auto; padding: 0 15px; }
@media (min-width: 544px)  { .container { max-width: 576px; } }
@media (min-width: 768px)  { .container { max-width: 720px; } }
@media (min-width: 992px)  { .container { max-width: 940px; } }
@media (min-width: 1200px) { .container { max-width: 1170px; } }

.row { display: flex; flex-wrap: wrap; margin: 0 -15px; }
.col { position: relative; width: 100%; min-height: 1px; padding: 0 15px; }
@media (min-width: 544px) { .col-sm-6 { width: 50%; } }
@media (min-width: 992px) {
  .col-lg-4 { width: 33.33333%; }
  .col-lg-8 { width: 66.66667%; }
}

.site { padding-bottom: 60px; }

/* ---- Header -------------------------------------------------------------- */
.header { display: flex; align-items: center; width: 100%; padding: 80px 0; }
.header-left { flex: 0 0 240px; width: 240px; }
.header-right { flex: 1 1 auto; text-align: right; }

.site-logo {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  line-height: 1.35;
  letter-spacing: -0.05em;
  text-rendering: optimizeLegibility;
}
.site-logo a, .site-logo a:hover { color: var(--heading); }
.site-tagline { margin: 0 0 15px; }

/* Desktop menu */
.navigation { margin: 0; padding: 0; list-style: none; text-align: right; }
.navigation li { position: relative; z-index: 100; }
.navigation > li { display: inline-block; }
.navigation a {
  display: block;
  white-space: nowrap;
  color: var(--text);
  text-align: left;
  letter-spacing: -0.05em;
  font-size: 14px;
}
.navigation > li > a {
  text-transform: uppercase;
  border-bottom: 4px solid transparent;
  margin-right: 22px;
}
.navigation > li:last-child > a { margin-right: 0; }
.navigation > li > a:hover,
.navigation > li:hover > a,
.navigation > li:focus-within > a,
.navigation > li.is-current > a { border-bottom-color: var(--accent); }

.navigation .has-children > a { position: relative; padding-right: 10px; }
.navigation .has-children > a .icon-chevron { position: absolute; top: 50%; right: 1px; width: 6px; height: 4px; margin-top: -4px; }

.navigation .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 300;
  margin: 0;
  padding: 0;
  list-style: none;
  min-width: 200px;
  background-color: #fff;
  border: 1px solid var(--line);
  border-bottom: 0;
  box-shadow: 0 0 29px rgba(0, 0, 0, 0.07);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease, visibility 0.2s;
}
.navigation > li:last-child .sub-menu { left: auto; right: 0; }
.navigation li:hover > .sub-menu,
.navigation li:focus-within > .sub-menu { visibility: visible; opacity: 1; }
.navigation .sub-menu a { color: var(--text); border-bottom: 1px solid var(--line); padding: 9px 15px; }
.navigation .sub-menu a:hover, .navigation .sub-menu .is-current > a { color: var(--accent); }

/* "MENU ≡" button (tablets + phones) */
.mobile-trigger {
  display: none;
  align-items: center;
  gap: 5px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font: inherit;
  text-transform: uppercase;
  font-size: 20px;
  line-height: 1.2;
  color: var(--heading);
  letter-spacing: -0.05em;
}
.mobile-trigger .icon-menu { width: 15px; height: 13px; }

/* ---- Mobile menu (drops down from the top, like before) ------------------ */
.mm {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  max-height: 100vh;
  overflow-y: auto;
  padding-bottom: 40px;
  background: #f3f3f3;
  color: rgba(0, 0, 0, 0.7);
  font-size: 14px;
  transform: translateY(-100%);
  visibility: hidden;
  transition: transform 0.4s ease, visibility 0.4s;
}
.mm.is-open { transform: none; visibility: visible; }
.mm-navbar { position: relative; height: 40px; line-height: 40px; text-align: center; border-bottom: 1px solid rgba(0, 0, 0, 0.1); }
.mm-title { color: rgba(0, 0, 0, 0.3); }
.mm-btn { position: absolute; top: 0; width: 40px; height: 40px; padding: 0; border: 0; background: none; cursor: pointer; color: rgba(0, 0, 0, 0.3); font: inherit; font-size: 16px; }
.mm-close { right: 0; }
.mm-back { left: 0; }
.mm-list { margin: 0; padding: 0; list-style: none; }
.mm-list li { position: relative; }
.mm-list li::after { content: ""; position: absolute; left: 20px; right: 0; bottom: 0; border-bottom: 1px solid rgba(0, 0, 0, 0.1); }
.mm-list a { display: block; padding: 10px 10px 10px 20px; line-height: 20px; color: rgba(0, 0, 0, 0.7); }
.mm-list .is-current { background: rgba(255, 255, 255, 0.5); }
.mm-next {
  position: absolute; top: 0; right: 0; bottom: 0; width: 50px;
  border: 0; border-left: 1px solid rgba(0, 0, 0, 0.1); background: none; cursor: pointer;
  color: rgba(0, 0, 0, 0.3); font: inherit; font-size: 18px;
}
.mm-blocker { position: fixed; inset: 0; z-index: 999; display: none; }
.mm-blocker.is-open { display: block; }

@media (max-width: 991px) {
  .nav { display: none; }
  .mobile-trigger { display: inline-flex; }
}

/* ---- Page content ---------------------------------------------------------- */
.page-title { font-weight: 500; }
.entry-thumb { margin: 0 0 20px; }
.entry-thumb img { display: block; }
.entry-content::after { content: ""; display: table; clear: both; }
.entry-content h2, .entry-content h3, .entry-content h4 { clear: both; }
.text-lg p { font-size: 16px; }
.small { font-size: 13px; }
.spacer { height: 20px; clear: both; }
.clear { clear: both; }
.text-lg .video { margin-bottom: 30px; }

/* Images inside text: centred by default, or float with class="alignleft/alignright" */
.entry-content img { display: block; margin: 7px auto 15px; }
.entry-content img.alignleft { float: left; margin: 7px 24px 15px 0; }
.entry-content img.alignright { float: right; margin: 7px 0 15px 24px; }
.entry-content img.alignnone { display: inline-block; margin: 5px 0 20px; }
.entry-content .contact-email img { margin-left: 0; }
.email-link { font-size: 16px; }

/* YouTube: thumbnail first, real player loads on click */
.video { margin: 0 0 15px; }
.yt { position: relative; display: block; aspect-ratio: 16 / 9; background: #000; overflow: hidden; cursor: pointer; }
.entry-content .yt img, .yt img { display: block; width: 100%; height: 100%; margin: 0; object-fit: cover; }
.yt-play {
  position: absolute; top: 50%; left: 50%; width: 68px; height: 48px; margin: -24px 0 0 -34px;
  border-radius: 12px; background: rgba(33, 33, 33, 0.8); transition: background-color 0.18s ease;
}
.yt-play::before { content: ""; position: absolute; top: 50%; left: 50%; margin: -9px 0 0 -6px; border-style: solid; border-width: 9px 0 9px 16px; border-color: transparent transparent transparent #fff; }
.yt:hover .yt-play, .yt:focus-visible .yt-play { background: #f00; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; border: 0; }

.bandcamp { display: block; width: 100%; height: 120px; border: 0; margin: 0 0 15px; }
video { display: block; width: 100%; height: auto; }

/* ---- Sidebar ------------------------------------------------------------ */
.widget { margin-top: 10px; }
.sidebar .widget:first-child, .widget p:first-child { margin-top: 40px; }
.sidebar .widget:last-child, .widget p:last-child { margin-bottom: 0; }
.widget-album { margin: 0 0 1em; }
.widget-album img { width: 164px; height: 164px; object-fit: cover; }

.social-icons { margin: 0; padding: 0; list-style: none; }
.social-icons li { display: inline-block; margin-right: 8px; }
.social-icons li:last-child { margin-right: 0; }
.social-icon { display: inline-block; font-size: 24px; line-height: 1.571428571; color: var(--heading); }
.social-icon:hover { color: var(--accent); }
.social-icon .icon { height: 0.875em; width: auto; vertical-align: -0.1em; }

/* ---- Grid of works (Sound, Patches, Related works) ------------------------ */
.row-items { margin-bottom: -30px; }
.item { position: relative; margin: 0 0 30px; }
.item a { display: block; }
.item img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
.item-content-wrap {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--overlay);
  color: #fff;
  text-align: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.item:hover .item-content-wrap, .item a:focus-visible .item-content-wrap { opacity: 1; }
.item-content { position: absolute; width: 100%; padding: 20px; top: 50%; transform: translateY(-50%); }
.item-title, .item-subtitle { position: relative; margin: 0; opacity: 0; transform: scale(1.15); transition: opacity 0.38s ease, top 0.38s ease, transform 0.38s ease; }
.item-title { font-size: 16px; font-weight: 500; top: -15px; }
.item-subtitle { font-size: 12px; top: 15px; }
.item:hover .item-title, .item:hover .item-subtitle,
.item a:focus-visible .item-title, .item a:focus-visible .item-subtitle { opacity: 1; top: 0; transform: scale(1); }

/* Phones (and touch screens that can't hover): caption bar always visible */
@media (max-width: 767px), (hover: none) {
  .item-content-wrap { opacity: 1; top: auto; bottom: 0; }
  .item-content { position: static; transform: none; }
  .item-title, .item-subtitle { opacity: 1; transform: scale(1); top: auto; }
}

/* ---- Single project page ----------------------------------------------- */
@media (min-width: 992px) {
  .project-side { order: 2; }
  .project-main { order: 1; }
}
.items-related { margin-top: 70px; }
.items-related .widget-title { font-weight: 500; }

/* ---- Lightbox (About/Bio photo) ------------------------------------------ */
.lightbox-dialog { max-width: 100vw; max-height: 100vh; padding: 0; border: 0; background: transparent; overflow: visible; }
.lightbox-dialog::backdrop { background: rgba(0, 0, 0, 0.8); }
.lightbox-dialog img { display: block; max-width: 92vw; max-height: 88vh; width: auto; height: auto; box-shadow: 0 0 8px rgba(0, 0, 0, 0.6); }
.lightbox-close { position: absolute; top: -40px; right: -6px; width: 40px; height: 40px; border: 0; background: none; color: #fff; font-size: 28px; line-height: 40px; cursor: pointer; }

/* ---- Responsive spacing (matches the old theme) ---------------------------- */
@media (max-width: 991px) {
  .sidebar { margin-top: 90px; }
}
@media (max-width: 767px) {
  .header { padding: 50px 0; }
  .sidebar { margin-top: 60px; }
}
@media (max-width: 543px) {
  .header { padding: 30px 0; }
  .header-left { flex-basis: 180px; width: 180px; }
  .sidebar, .items-related { margin-top: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
