/* ───────────────────────────────────────────
   Chris Gusty — Personal Website Styles
   ─────────────────────────────────────────── */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #4a4a4a;
  --tag-bg: #f3f1ed;
  --border: #e8e5df;
  --accent: #2a2a2a;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', -apple-system, system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Navigation ─────────────────────────── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.95);
  border-bottom-color: var(--border);
  backdrop-filter: blur(8px);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-name.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-headshot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--tag-bg);
}

.nav-headshot-mobile {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--tag-bg);
  cursor: pointer;
}

.nav-separator {
  color: var(--border);
  font-weight: 300;
  font-size: 0.9375rem;
  user-select: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--muted);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 16px;
  padding: 16px 24px 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.nav-mobile.open {
  display: flex;
}

.nav-mobile a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}

/* ── Buttons ────────────────────────────── */

.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--accent);
  background: transparent;
  border: 1.5px solid var(--accent);
  padding: 10px 24px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn:hover {
  background: var(--accent);
  color: var(--bg);
}

.btn-sm {
  padding: 6px 16px;
  font-size: 0.8125rem;
}

.btn.btn-filled,
.nav-links a.btn-filled,
.nav-mobile a.btn-filled {
  background: var(--accent);
  color: #ffffff;
}

.btn.btn-filled:hover,
.nav-links a.btn-filled:hover,
.nav-mobile a.btn-filled:hover {
  background: transparent;
  color: var(--accent);
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
}

/* ── Hero ───────────────────────────────── */

.hero {
  padding: 120px 0 48px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 60px;
  align-items: center;
}

.hero-name {
  font-family: var(--font-sans);
  font-size: 4rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.hero-subtitle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.hero-subtitle-icon-img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.5;
}

.hero-subtitle-link {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.2s, color 0.2s;
}

.hero-subtitle-link:hover {
  color: var(--text);
  border-color: var(--text);
}

.hero-tagline {
  font-size: 1.125rem;
  line-height: 1.6;
  margin-top: 24px;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 32px;
}

.hero-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: border-color 0.2s;
}

.hero-link:hover {
  border-color: var(--accent);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
}

.tag {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--tag-bg);
  padding: 6px 14px;
  letter-spacing: 0.01em;
}

.tag-link {
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.tag-link:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.headshot {
  width: 100%;
  max-width: 360px;
  height: auto;
  object-fit: contain;
  background: var(--tag-bg);
}

/* ── Sections ───────────────────────────── */

.section {
  padding: 56px 0;
}

.section-tight-top {
  padding-top: 16px;
}

.section-tinted {
  background: #f3f1ed;
}

.section-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 36px 40px;
  background: var(--bg);
}

.section-title {
  font-family: var(--font-sans);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.section-intro {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 32px;
  max-width: 700px;
}

.services-mobile {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.services-cta {
  margin-top: 36px;
  text-align: center;
}

.services-cta p {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 24px;
}

/* ── Services Accordion ────────────────── */

.services-accordion {
  display: grid;
  grid-template-columns: 340px 1fr;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg);
}

.services-nav {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-right: 1px solid var(--border);
}

.service-tab {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 24px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  color: var(--muted);
  text-align: left;
  transition: background 0.15s, color 0.15s;
  position: relative;
}

.service-tab:last-child {
  border-bottom: none;
}

.service-tab:hover {
  color: var(--text);
  background: #fafaf8;
}

.service-tab.active {
  color: var(--text);
  background: #fafaf8;
  font-weight: 600;
}

.service-tab.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--text);
}

.tab-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s;
  color: var(--text);
}

.service-tab.active .tab-icon {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}

.service-tab.active .tab-icon svg {
  stroke: var(--bg);
}

.service-tab span {
  flex: 1;
}

.tab-arrow {
  flex-shrink: 0;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.15s, transform 0.15s;
}

.service-tab.active .tab-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--text);
}

.services-detail {
  padding: 36px 40px;
  display: flex;
  align-items: flex-start;
}

.service-panel {
  display: none;
  animation: panelFadeIn 0.2s ease;
}

.service-panel.active {
  display: block;
}

@keyframes panelFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.service-desc {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 24px;
}

.service-list {
  list-style: none;
}

.service-list li {
  font-size: 1rem;
  color: var(--text);
  padding: 7px 0;
  padding-left: 18px;
  line-height: 1.5;
  position: relative;
}

.service-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--border);
}

/* ── Why Fractional ─────────────────────── */

.value-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.value-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px 24px;
  background: var(--bg);
  transition: border-color 0.15s;
}

.value-card:hover {
  border-color: #ccc;
}

.value-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--text);
}

.value-card h3 {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
  color: var(--text);
}

.value-card p {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.6;
}

.value-cta {
  margin-top: 32px;
}

/* ── Hero About ─────────────────────────── */

.hero-about {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.hero-about-text {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 8px;
}

/* ── About / Experience ────────────────── */

.subsection-title {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.exp-accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
}

.exp-dropdown {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg);
}

.exp-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  cursor: pointer;
  list-style: none;
  transition: background 0.15s;
}

.exp-summary::-webkit-details-marker {
  display: none;
}

.exp-summary:hover {
  background: #fafaf8;
}

.exp-summary-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.company-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}

.experience-company {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1px;
}

.experience-role {
  font-size: 0.8125rem;
  color: var(--muted);
  font-weight: 500;
}

.exp-summary-text {
  flex: 1;
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.5;
}

details[open] .exp-summary-text {
  display: none;
}

.exp-chevron {
  flex-shrink: 0;
  color: var(--muted);
  transition: transform 0.2s;
}

details[open] .exp-chevron {
  transform: rotate(180deg);
}

.exp-detail {
  border-top: 1px solid var(--border);
  padding: 20px 24px 24px;
}

.exp-detail ul {
  list-style: none;
}

.exp-detail li {
  font-size: 1rem;
  line-height: 1.6;
  padding: 5px 0;
  color: var(--text);
}

.exp-static {
  padding: 0;
}

.exp-static-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.exp-static-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text);
}

.exp-static-content {
  padding: 20px 24px;
}

.exp-static-content ul {
  list-style: none;
}

.exp-static-content li {
  font-size: 1rem;
  color: var(--text);
  padding: 5px 0;
  line-height: 1.6;
}

/* ── Contact ────────────────────────────── */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr auto 1.4fr;
  gap: 40px;
  align-items: start;
}

.contact-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.contact-left p {
  font-size: 1.0625rem;
  line-height: 1.6;
}

.contact-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 200px;
  position: relative;
}

.contact-divider::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--border);
}

.contact-divider span {
  position: relative;
  z-index: 1;
  background: var(--bg);
  padding: 12px 0;
  font-size: 0.9375rem;
  color: var(--muted);
  font-weight: 500;
}

.contact-form-label {
  font-size: 1.0625rem;
  font-weight: 500;
  margin-bottom: 20px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-row {
  display: flex;
  gap: 12px;
}

.contact-form input,
.contact-form textarea {
  flex: 1;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  padding: 10px 14px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #b5b0a7;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form .btn {
  align-self: flex-start;
}

/* ── Photo Modal ────────────────────────── */

.photo-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.photo-modal.open {
  display: flex;
}

.photo-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.photo-modal-content {
  position: relative;
  max-width: 320px;
  width: 85%;
}

.photo-modal-content img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.photo-modal-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg);
  color: var(--text);
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ── Footer ─────────────────────────────── */

.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.footer-inner {
  text-align: center;
}

.footer-inner p {
  font-size: 0.8125rem;
  color: var(--muted);
}

/* ── Responsive ─────────────────────────── */

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-name {
    font-size: 3rem;
  }

  .services-accordion {
    display: none;
  }

  .services-mobile {
    display: flex;
  }

  .services-mobile .service-list li::before {
    display: none;
  }

  .services-mobile .service-list li {
    padding-left: 0;
  }

  .value-cards {
    grid-template-columns: 1fr;
  }

  .section-card {
    padding: 24px 20px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .contact-divider {
    min-height: auto;
    flex-direction: row;
  }

  .contact-divider::before {
    top: 50%;
    bottom: auto;
    left: 0;
    right: 0;
    width: auto;
    height: 1px;
  }

  .contact-divider span {
    padding: 0 16px;
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav {
    background: rgba(255, 255, 255, 0.95);
    border-bottom-color: var(--border);
  }

  .nav-headshot-mobile {
    display: block;
  }

  .nav.scrolled .nav-headshot-mobile {
    display: none;
  }

  .hero-image {
    display: none;
  }

  .hero {
    padding: 100px 0 60px;
  }

  .hero-name {
    font-size: 2.5rem;
  }

  .section {
    padding: 40px 0;
  }

  .section-title {
    font-size: 1.625rem;
    margin-bottom: 32px;
  }

  .form-row {
    flex-direction: column;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .exp-summary {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .exp-chevron {
    align-self: flex-end;
    margin-top: -28px;
  }

  .service-list li::before {
    display: none;
  }

  .service-list li {
    padding-left: 0;
  }
}

@media (max-width: 900px) and (orientation: landscape) {
  .hero-grid {
    grid-template-columns: 1fr 200px;
    gap: 32px;
  }

  .hero-image {
    display: flex;
  }

  .headshot {
    max-width: 200px;
  }
}
