:root {
  --blue: #173b59;
  --medium-blue: #315f80;
  --light-grey: #f2f4f6;
  --text-grey: #414f5c;
  --orange: #ff921f;
  --orange-hover: #ffa43f;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--blue);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1160px, 90%);
  margin-inline: auto;
}

/* Header and large navigation tabs */

.site-header {
  background: var(--white);
  border-bottom: 2px solid #e0e6eb;
}

.header-inner {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding-block: 20px;
}

.brand {
  flex-shrink: 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.brand span {
  display: block;
  margin-top: 10px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2px;
}

nav {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 18px;
  font-weight: 700;
}

nav > a,
nav > span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 12px 18px;
  border: 2px solid #d5dee6;
  border-radius: 10px;
  background: var(--light-grey);
  color: var(--blue);
  text-align: center;
  line-height: 1.35;
}

nav a[aria-current="page"] {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

nav > .contact-tab {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--blue);
  font-weight: 800;
}

/* Homepage main section */

.hero {
  padding: 64px 0;
  background: var(--light-grey);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: 55px;
}

.hero-grid > *,
.welcome > * {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 20px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1.5;
}

h1,
h2 {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 800;
}

h1 {
  margin: 0 0 26px;
  font-size: clamp(36px, 4.3vw, 58px);
  line-height: 1.15;
  letter-spacing: -1px;
}

h1 span {
  display: block;
  margin-top: 10px;
  color: var(--medium-blue);
}

.intro {
  max-width: 540px;
  margin: 0 0 30px;
  color: var(--text-grey);
  font-size: 21px;
  line-height: 1.75;
}

/* Large, easy-to-tap buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 16px 32px;
  border: 2px solid var(--orange);
  border-radius: 10px;
  background: var(--orange);
  color: var(--blue);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
}

@media (hover: hover) {
  .button:hover {
    background: var(--orange-hover);
    border-color: var(--orange-hover);
  }

  nav a:hover {
    background: var(--blue);
    border-color: var(--blue);
    color: var(--white);
  }
}

a:focus-visible {
  outline: 4px solid var(--blue);
  outline-offset: 5px;
}

.hero-note {
  max-width: 480px;
  margin-top: 26px;
  color: var(--text-grey);
  font-size: 17px;
  line-height: 1.6;
}

/* Photo area */

.portrait {
  overflow: hidden;
  border-radius: 70px 12px 12px 12px;
  background: #e0e7ed;
}

.photo-placeholder {
  min-height: 390px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(145deg, #dce6ed, #bdcedb);
  text-align: center;
}

.initials {
  color: var(--medium-blue);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 100px;
  font-weight: 800;
  line-height: 1.3;
}

.photo-placeholder p {
  margin-top: 12px;
  font-size: 18px;
  font-weight: 600;
}

.portrait img {
  display: block;
  width: 100%;
  height: 430px;
  object-fit: cover;
  object-position: center top;
}

.portrait-caption {
  padding: 24px;
  border-left: 6px solid var(--orange);
  background: var(--blue);
  color: var(--white);
}

.portrait-caption strong {
  display: block;
  margin-bottom: 6px;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.3;
}

.portrait-caption span {
  display: block;
  font-size: 18px;
  line-height: 1.5;
  color: var(--white);
}

/* Welcome section */

.welcome {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 55px;
  padding-block: 65px;
  scroll-margin-top: 24px;
}

h2 {
  margin: 0;
  font-size: clamp(30px, 3vw, 40px);
  line-height: 1.25;
  letter-spacing: -0.5px;
}

.welcome-copy {
  color: var(--text-grey);
  font-size: 20px;
  line-height: 1.8;
}

.welcome-copy p:first-child {
  margin-top: 0;
}

.welcome-copy p:last-child {
  margin-bottom: 0;
}

/* Footer */

footer {
  padding: 26px 0;
  border-top: 2px solid #e0e6eb;
  color: var(--text-grey);
  font-size: 16px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
}

.footer-inner p {
  margin: 0;
}

/* Tablets and phones */

@media (max-width: 1000px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
  }

  .hero-grid {
    gap: 32px;
  }
}

@media (max-width: 760px) {
  .container {
    width: 90%;
  }

  .header-inner {
    padding-block: 24px;
    gap: 22px;
  }

  .brand {
    font-size: 28px;
  }

  /* Two large tabs per row */
  nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    font-size: 18px;
  }

  nav > a,
  nav > span {
    min-height: 64px;
    padding: 14px 10px;
    font-weight: 800;
  }

  .hero {
    padding: 40px 0;
  }

  .hero-grid,
  .welcome {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  h1 {
    font-size: clamp(34px, 8.5vw, 48px);
    letter-spacing: -0.5px;
  }

  .intro {
    max-width: none;
    font-size: 20px;
    line-height: 1.75;
  }

  .button {
    width: 100%;
    min-height: 66px;
    font-size: 22px;
  }

  .hero-note {
    font-size: 17px;
  }

  .portrait {
    width: 100%;
    max-width: 480px;
    margin-inline: auto;
  }

  .photo-placeholder {
    min-height: 310px;
  }

  .portrait img {
    height: auto;
  }

  .welcome {
    padding-block: 44px;
    gap: 24px;
  }

  .welcome-copy {
    font-size: 20px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 10px;
  }
}

/* Extra-small screens */

@media (max-width: 360px) {
  nav {
    grid-template-columns: minmax(0, 1fr);
  }

  h1 {
    font-size: 32px;
  }
}

/* Respect reduced-motion preferences */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Brokerage name beneath Freddy's name */

.brand span {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.5;
}

/* Display Freddy's complete photo without cropping */

.portrait {
  border-radius: 16px;
  background: var(--white);
  border: 1px solid #d5dee6;
}

.portrait .freddy-photo {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: var(--white);
}

/* Brokerage section */

.brokerage-section {
  padding: 48px 0;
  background: var(--light-grey);
  border-top: 1px solid #d5dee6;
}

.brokerage-inner {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
}

.brokerage-logo-wrap {
  padding: 18px;
  border-radius: 12px;
  background: #000000;
}

.brokerage-logo {
  display: block;
  width: 100%;
  height: auto;
}

.brokerage-copy .eyebrow {
  margin-bottom: 12px;
}

.brokerage-copy h2 {
  font-size: clamp(28px, 3vw, 38px);
}

.brokerage-copy > p:last-child {
  margin-bottom: 0;
  color: var(--text-grey);
  font-size: 20px;
  line-height: 1.75;
}

@media (max-width: 760px) {
  .brokerage-section {
    padding: 36px 0;
  }

  .brokerage-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .brokerage-logo-wrap {
    width: 100%;
    max-width: 340px;
    margin-inline: auto;
  }
}

/* Compact brokerage logo and section */
.brokerage-section {
  padding: 32px 0;
  background: var(--light-grey);
}

.brokerage-inner {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  align-items: center;
  gap: 32px;
}

.brokerage-logo-wrap {
  width: 100%;
  max-width: 220px;
  padding: 10px;
  margin: 0;
  background: #000;
  border-radius: 10px;
}

.brokerage-logo-wrap .brokerage-logo {
  display: block;
  width: 100%;
  max-width: 200px;
  height: auto;
}

@media (max-width: 760px) {
  .brokerage-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .brokerage-logo-wrap {
    margin-inline: auto;
  }
}

/* ABOUT ME PAGE */

.about-intro {
  padding: 56px 0;
  background: var(--light-grey);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  align-items: center;
  gap: 56px;
}

.about-photo {
  overflow: hidden;
  border: 1px solid #d5dee6;
  border-radius: 16px;
  background: var(--white);
}

.about-photo img {
  display: block;
  width: 100%;
  height: auto;
}

.about-copy {
  min-width: 0;
}

.about-copy h1 {
  font-size: clamp(34px, 3.8vw, 50px);
}

.about-copy > p:not(.eyebrow):not(.language-badge) {
  color: var(--text-grey);
  font-size: 20px;
  line-height: 1.8;
}

.language-badge {
  display: inline-block;
  margin: 8px 0 0;
  padding: 10px 20px;
  border-left: 5px solid var(--orange);
  border-radius: 6px;
  background: var(--white);
  color: var(--blue);
  font-size: 20px;
  font-weight: 800;
}

/* Experience highlights */

.experience-section {
  padding: 32px 0;
  background: var(--blue);
  color: var(--white);
}

.experience-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.experience-item {
  padding: 12px 0;
  text-align: center;
}

.experience-item strong {
  display: block;
  margin-bottom: 8px;
  color: var(--orange);
  font-size: clamp(24px, 2.5vw, 32px);
  font-weight: 800;
  line-height: 1.3;
}

.experience-item span {
  display: block;
  font-size: 18px;
  line-height: 1.5;
}

/* Personal approach */

.approach-section {
  padding-block: 60px;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 28px;
}

.section-heading .eyebrow {
  margin-bottom: 12px;
}

.approach-copy {
  max-width: 850px;
  color: var(--text-grey);
  font-size: 20px;
  line-height: 1.8;
}

.client-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 36px;
}

.client-card {
  padding: 28px;
  border: 1px solid #d5dee6;
  border-top: 5px solid var(--orange);
  border-radius: 12px;
  background: var(--light-grey);
}

.client-card h3 {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 25px;
  line-height: 1.3;
}

.client-card p {
  margin: 0;
  color: var(--text-grey);
  font-size: 19px;
  line-height: 1.75;
}

/* Closing photo gallery */

.closing-section {
  padding: 56px 0;
  background: var(--light-grey);
}

.section-description {
  color: var(--text-grey);
  font-size: 20px;
  line-height: 1.75;
}

.closing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.closing-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  padding: 24px;
  border: 2px dashed #889baa;
  border-radius: 12px;
  background: var(--white);
  text-align: center;
}

.closing-placeholder > span {
  color: var(--blue);
  font-size: 22px;
  font-weight: 700;
}

.closing-placeholder p {
  margin: 8px 0 0;
  color: var(--text-grey);
  font-size: 18px;
}

/* Ready for actual closing photos */

.closing-card {
  align-self: start;
  overflow: hidden;
  margin: 0;
  border: 1px solid #d5dee6;
  border-radius: 12px;
  background: var(--white);
}

.closing-card img {
  display: block;
  width: 100%;
  height: auto;
}

.closing-card figcaption {
  padding: 18px 20px;
  color: var(--blue);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.5;
}

/* Mobile layout */

@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
    gap: 32px;
  }

  .client-grid,
  .closing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .about-intro {
    padding: 36px 0;
  }

  .about-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .about-photo {
    width: 100%;
    max-width: 320px;
    margin-inline: auto;
  }

  .experience-grid,
  .client-grid,
  .closing-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .experience-grid {
    gap: 0;
  }

  .experience-item {
    padding: 24px 0;
  }

  .experience-item + .experience-item {
    border-top: 1px solid #587084;
  }

  .approach-section {
    padding-block: 40px;
  }

  .client-card {
    padding: 24px;
  }

  .closing-section {
    padding: 40px 0;
  }
}

/* CONTACT PAGE */

.contact-intro {
  padding: 56px 0 44px;
  background: var(--light-grey);
}

.contact-intro h1 {
  max-width: 900px;
}

.contact-lead {
  max-width: 740px;
  color: var(--text-grey);
  font-size: 21px;
  line-height: 1.8;
}

.contact-languages {
  margin-bottom: 0;
  color: var(--blue);
  font-size: 20px;
  font-weight: 800;
}

/* Main content and sidebar */

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: start;
  gap: 32px;
  padding-block: 48px;
}

.contact-main,
.contact-sidebar {
  display: grid;
  gap: 24px;
  min-width: 0;
}

.contact-panel {
  min-width: 0;
  padding: 30px;
  border: 1px solid #d5dee6;
  border-radius: 14px;
  background: var(--white);
}

.contact-panel h2 {
  font-size: clamp(26px, 2.6vw, 32px);
  line-height: 1.3;
}

.contact-panel p:not(.eyebrow) {
  color: var(--text-grey);
  font-size: 20px;
  line-height: 1.75;
}

.contact-panel .eyebrow {
  margin-bottom: 12px;
}

.direct-panel {
  border-top: 6px solid var(--orange);
  background: var(--light-grey);
}

/* Readable phone and email links */

.contact-number {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 20px 0 26px;
  padding-block: 8px;
  color: var(--blue);
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 800;
  line-height: 1.4;
  text-decoration: underline;
  text-underline-offset: 6px;
}

.contact-email {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 16px 0 24px;
  padding-block: 10px;
  overflow-wrap: anywhere;
  color: var(--blue);
  font-size: 20px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.office-number {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 18px 0;
  padding-block: 10px;
  color: var(--blue);
  font-size: 25px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 5px;
}

/* Large action buttons */

.contact-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.contact-panel .button {
  width: 100%;
}

.contact-actions .button {
  padding-inline: 14px;
}

.button.contact-secondary {
  border: 2px solid var(--blue);
  background: var(--blue);
  color: var(--white);
}

@media (hover: hover) {
  .button.contact-secondary:hover {
    border-color: var(--medium-blue);
    background: var(--medium-blue);
  }
}

/* Social buttons awaiting profile links */

.social-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 82px;
  padding: 14px;
  border: 2px dashed #889baa;
  border-radius: 10px;
  background: var(--light-grey);
  color: var(--text-grey);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.4;
  opacity: 1;
}

.social-placeholder small {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 400;
}

/* Sidebar portrait */

.contact-agent {
  overflow: hidden;
  border: 1px solid #d5dee6;
  border-radius: 14px;
  background: var(--white);
}

.contact-agent img {
  display: block;
  width: 100%;
  height: auto;
}

.contact-agent-details {
  padding: 24px;
  border-top: 5px solid var(--orange);
  background: var(--blue);
  color: var(--white);
}

.contact-agent-details h2 {
  margin: 0;
  font-size: 28px;
}

.contact-agent-details p {
  margin: 8px 0 0;
  font-size: 18px;
}

.service-panel {
  background: var(--light-grey);
}

.service-panel p {
  margin-bottom: 0;
}

/* Preserve the active Contact Me tab */

nav > a.contact-tab[aria-current="page"] {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--white);
}

/* Mobile: contact options come before the portrait */

@media (max-width: 760px) {
  .contact-intro {
    padding: 36px 0;
  }

  .contact-layout {
    grid-template-columns: minmax(0, 1fr);
    padding-block: 32px;
    gap: 24px;
  }

  .contact-panel {
    padding: 24px;
  }

  .contact-lead {
    font-size: 20px;
  }

  .contact-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .contact-agent {
    width: 100%;
    max-width: 360px;
    margin-inline: auto;
  }
}

/* About introduction without a repeated portrait */

.about-intro .about-grid {
  grid-template-columns: minmax(0, 1fr);
  max-width: 900px;
}

.about-copy .intro {
  max-width: none;
}

/* Award feature */

.recognition-section {
  padding: 48px 0;
  border-top: 1px solid #d5dee6;
  background: var(--white);
}

.recognition-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
  align-items: center;
  gap: 48px;
}

.recognition-copy p:not(.eyebrow) {
  color: var(--text-grey);
  font-size: 20px;
  line-height: 1.8;
}

.recognition-photo {
  width: 100%;
  max-width: 360px;
  margin: 0;
  overflow: hidden;
  border: 1px solid #d5dee6;
  border-radius: 12px;
}

.recognition-photo img {
  display: block;
  width: 100%;
  height: auto;
}

.recognition-photo figcaption {
  padding: 16px;
  background: var(--light-grey);
  color: var(--blue);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
}

/* Keep the contact photo close to its original size */

.contact-agent {
  width: 100%;
  max-width: 400px;
  margin-inline: auto;
}

@media (max-width: 760px) {
  .recognition-section {
    padding: 36px 0;
  }

  .recognition-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .recognition-photo {
    margin-inline: auto;
  }

  .contact-agent {
    max-width: 360px;
  }
}