/*
Theme Name: jefffabiny.com
Theme URI: https://github.com/jefffabiny/jefffabiny.com
Author: Jeff Fabiny
Author URI: https://rochester.dev
Description: Theme for jefffabiny.com
Version: 2.0.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jefffabiny.com
*/

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
}

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, pre,
ul, ol, dl, dd,
fieldset, legend {
  margin: 0;
}

ul, ol {
  padding-left: 1.5em;
}

body {
  padding: 0;
}

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Base / layout */

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.6;
}

/* When logged in, admin bar reduces viewport; don't push footer past fold */
body.admin-bar {
  min-height: calc(100vh - 32px);
}
@media screen and (max-width: 782px) {
  body.admin-bar {
    min-height: calc(100vh - 46px);
  }
}

.site-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Header */
.site-header {
  padding: 0.5rem 1.25rem;
  border-bottom: 1px solid #e5e5e5;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}

body.header-hidden .site-header {
  display: none;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 72rem;
  margin: 0 auto;
}

.site-brand {
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.025em;
  color: #171717;
}

.site-brand:hover {
  color: #404040;
  text-decoration: none;
}

.site-brand:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Hamburger toggle: visible only on small screens */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #171717;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle:hover {
  color: #404040;
}

.nav-toggle:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Nav menu — horizontal row on desktop */
.site-nav {
  display: flex;
  align-items: center;
}

.nav-menu {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu li {
  display: inline-block;
}

.nav-menu a {
  display: inline-block;
  padding: 0.4rem 0.65rem;
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #525252;
  border-radius: 6px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav-menu a:hover {
  color: #171717;
  background-color: #f5f5f5;
}

.nav-menu a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Mobile: hamburger + slide-down menu */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    flex-direction: column;
    align-items: stretch;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.25s ease, opacity 0.2s ease, visibility 0.2s ease;
  }

  .site-nav.is-open {
    max-height: 80vh;
    opacity: 1;
    visibility: visible;
  }

  .nav-menu {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 1.25rem 1rem;
  }

  .nav-menu a {
    padding: 0.6rem 0;
    font-size: 1rem;
    border-bottom: 1px solid #f5f5f5;
  }

  .nav-menu li:last-child a {
    border-bottom: 0;
  }
}

/* Front page hero */
.front-page-hero {
  background-color: #e9e7e2;
  min-height: calc(100vh - 60px);
  padding: 2rem 1.25rem 2.5rem;
  padding-left: max(1.25rem, env(safe-area-inset-left));
  padding-right: max(1.25rem, env(safe-area-inset-right));
  display: flex;
  align-items: flex-end;
  flex-direction: column;
}

.front-page-hero__inner {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  align-items: end;
  flex: 1;
  min-height: 0;
}

.front-page-hero__text {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 0;
  align-self: stretch;
}

.front-page-hero__name {
  margin: 0 0 0.25rem;
  font-size: clamp(1.5rem, 3vw + 0.5rem, 2.875rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #171717;
  font-family: "Ysabeau Office", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.front-page-hero__tagline {
  margin: 0 0 1.5rem;
  font-size: clamp(0.875rem, 1.5vw + 0.5rem, 14px);
  font-weight: 400;
  color: #404040;
  font-family: "Ysabeau Office", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.front-page-hero__greeting {
  margin: 0;
  font-size: clamp(4rem, 15vw + 5rem, 300px);
  font-weight: 300;
  line-height: 0.95;
  color: #171717;
  font-family: Literata, Georgia, "Times New Roman", Times, serif;
  letter-spacing: -0.02em;
  flex: 1;
  align-content: flex-end;
}

.front-page-hero__image-wrap {
  justify-self: end;
  max-width: 100%;
}

.front-page-hero__image {
  width: 100%;
  max-width: 420px;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

body.header-hidden .front-page-hero {
  min-height: 100vh;
}

@media (min-width: 768px) {
  .front-page-hero {
    min-height: calc(100vh - 56px);
    padding: 2.5rem 2rem 3rem;
    align-items: flex-end;
  }

  body.header-hidden .front-page-hero {
    min-height: 100vh;
  }

  .front-page-hero__inner {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
    gap: 2.5rem;
    align-items: end;
  }

  .front-page-hero__name {
    margin: 0 0 0.35rem;
  }

  .front-page-hero__tagline {
    margin: 0 0 2rem;
  }

  .front-page-hero__image {
    max-width: 480px;
  }
}

.site-main--front {
  padding: 2rem 1.25rem;
  max-width: 72rem;
  margin: 0 auto;
}

/* Footer */
.site-footer {
  padding: 1rem 2rem;
}

@media (max-width: 768px) {
  .site-footer p {
    text-align: right;
    display: flex;
    flex-direction: column;
    span {
      display: none;
    }
  }
}

.site-main {
  flex: 1;
  padding: 1rem 2rem;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}
