/* Header styles to match index page on vertical screens */
.site-header {
  transition: transform 180ms ease;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #d0cae7;
  border-radius: 0 0 2rem 2rem;
  padding: 1.5rem 0 2rem;
}
.site-header.site-header--hidden { transform: translateY(-100%); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; }
.logo { color: #66b8e4; font-weight: bold; font-size: 2rem; text-decoration: none; letter-spacing: 2px; }
.nav-toggle { background: none; border: none; font-size: 2rem; color: #66b8e4; display: none; }
.nav-menu ul { list-style: none; display: flex; gap: 2rem; align-items: center; }
.nav-menu a { text-decoration: none; color: #1f2225; font-weight: 600; font-size: 1.25rem; border-radius: 1rem; padding: 0.5rem 1rem; transition: background 0.25s, color 0.25s; }
.nav-menu a:hover { color: #fff; background: #66b8e4; }
@media (max-width: 600px) {
  .nav-toggle { display: inline-block; }
  .nav-menu { position: relative; }
  .nav-menu ul { display: none; }
  .site-header { --header-height: 72px; }
  .nav-menu.nav-menu--open ul {
    display: flex; position: fixed; top: calc(var(--header-height) + 8px); left: 0; right: 0;
    flex-direction: column; gap: 0.5rem; background: rgba(255,255,255,0.95); backdrop-filter: blur(8px);
    border: 1px solid #d0cae7; border-radius: 1rem; padding: 0.75rem; box-shadow: 0 8px 28px rgba(0,0,0,0.12);
    z-index: 1001; width: min(560px, 94vw); margin: 0 auto;
  }
  .nav-menu.nav-menu--open ul li a { display: block; padding: 0.6rem 0.8rem; border-radius: 0.8rem; font-size: 1.05rem; }
  .nav-menu.nav-menu--open ul li a:hover { background: #f5f1ff; color: #66b8e4; }
}

/* Match index header/dropdown behavior on tablets as well */
@media (max-width: 900px) {
  .nav-toggle { display: inline-block; }
  .nav-menu { position: relative; }
  .nav-menu ul { display: none; }
  .site-header { --header-height: 72px; }
  .nav-menu.nav-menu--open ul {
    display: flex; position: fixed; top: calc(var(--header-height) + 8px); left: 0; right: 0;
    flex-direction: column; gap: 0.5rem; background: rgba(255,255,255,0.95); backdrop-filter: blur(8px);
    border: 1px solid #d0cae7; border-radius: 1rem; padding: 0.75rem; box-shadow: 0 8px 28px rgba(0,0,0,0.12);
    z-index: 1001; width: min(560px, 94vw); margin: 0 auto;
  }
}
/* Contact page specific styles */

/* Hide site header when scrolling down */
.site-header.site-header--hidden {
  transform: translateY(-100%);
  transition: transform 180ms ease;
}
.site-header {
  transition: transform 180ms ease;
  position: sticky;
  top: 0;
  z-index: 1000;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Ubuntu web font loaded via Google Fonts in HTML */

:root {
  --color-bg: #f2f0f8;
  --color-bg-alt: #e9e6f3;
  --color-surface: #ffffff;
  --color-surface-alt: #f5f1ff;
  --color-text: #1f2225;
  --color-text-muted: #5f6670;
  --color-accent: #66b8e4;      /* darker primary blue */
  --color-accent-alt: #7fcfae;  /* darker secondary green */
  --color-accent-warm: #ffd569;
  --color-accent-cool: #66b8e4;
  --color-border: #d0cae7;      /* adjusted border */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 28px rgba(0,0,0,0.12);
}

body {
  font-family: 'Ubuntu', Arial, sans-serif;
  font-weight: bold;
  color: var(--color-text);
  background: linear-gradient(to bottom, var(--color-bg) 0%, var(--color-bg-alt) 50%, var(--color-bg) 100%);
  background-attachment: fixed;
  line-height: 1.6;
  letter-spacing: 1.5px;
  position: relative;
}

/* Keep the browser's vertical scrollbar reserved so header horizontal
   centering doesn't shift between pages with/without scroll. This
   matches the gallery page behavior and avoids subtle horizontal jumps. */
html { overflow-y: scroll; overflow-x: hidden; } /* prevent horizontal scroll */

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(102, 184, 228, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 90% 80%, rgba(127, 207, 174, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(102, 184, 228, 0.03) 0%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}
.container {
  width: min(92%, 1100px);
  margin: 0 auto;
}
@media (max-width: 900px) { .container { width: 94%; } }
@media (max-width: 600px) { .container { width: 96%; } }

.section-spacing {
  margin-top: 4rem;
  margin-bottom: 4rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

.btn {
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-alt) 100%);
  color: var(--color-text);
  text-decoration: none;
  border-radius: 2rem;
  font-weight: bold;
  border: none;
  font-size: 1.25rem;
  transition: background 0.25s, color 0.25s, box-shadow 0.25s;
  box-shadow: var(--shadow-md);
}
.btn:hover { background: var(--color-accent-alt); color: #fff; }
.btn:focus { outline: 3px solid var(--color-accent-alt); outline-offset: 3px; }

/* Header/nav baseline */
.site-header.site-header--hidden {
  transform: translateY(-100%);
  transition: transform 180ms ease;
}
.site-header {
  transition: transform 180ms ease;
  position: sticky;
  top: 0;
  z-index: 1000;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-bg: #f2f0f8;
  --color-bg-alt: #e9e6f3;
  --color-surface: #ffffff;
  --color-surface-alt: #f5f1ff;
  --color-text: #1f2225;
  --color-text-muted: #5f6670;
  --color-accent: #66b8e4;
  --color-accent-alt: #7fcfae;
  --color-accent-warm: #ffd569;
  --color-accent-cool: #66b8e4;
  --color-border: #d0cae7;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 28px rgba(0,0,0,0.12);
}

.site-header {
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  border-radius: 0 0 2rem 2rem;
  padding: 1.5rem 0 2rem;
  margin-bottom: 0;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  color: var(--color-accent);
  font-weight: bold;
  font-size: 2rem;
  text-decoration: none;
  letter-spacing: 2px;
}
.nav-toggle {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--color-accent);
  display: none;
}
.nav-menu ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  align-items: center;
}
.nav-menu a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
  font-size: 1.25rem;
  transition: background 0.25s, color 0.25s;
  border-radius: 1rem;
  padding: 0.5rem 1rem;
}
.nav-menu a:hover { color: #fff; background: var(--color-accent); }

/* Layout: allow scrolling on all screens */
body.contact-page {
  height: auto;
  min-height: 100vh;
  max-width: 100vw; /* constrain to viewport width */
  overflow-x: hidden; /* prevent horizontal scroll */
  overflow-y: auto; /* allow vertical scrolling on all screens */
  display: flex;
  flex-direction: column;
}

body.contact-page main {
  flex: 1 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 16px !important;
  padding-bottom: 2rem !important;
}

/* Contact section styling to match index.css */
.contact {
  background: var(--color-surface);
  padding: 1rem 0; /* reduced vertical padding */
  border-radius: 2rem;
  margin-top: 0;
  border: 1px solid var(--color-border);
}
.contact h2 {
  margin-top: 0;
  margin-bottom: 0.3rem;
  padding: 0.2rem 0 0.4rem; /* smaller padding */
}
.contact .container.grid-2 {
  align-items: center; /* vertically center each column's content within the grid */
  align-content: center; /* center the grid tracks within available height */
  min-height: 320px; /* reduced min-height */
  gap: 1.5rem; /* tighter horizontal gap between columns */
  margin-top: 1.5rem; /* reduced offset inside section */
}
.contact .container.grid-2 > div {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly; /* evenly space each column's content vertically with equal gaps */
  height: 100%; /* ensure each column fills the grid row height */
  min-height: 0; /* allow children to shrink properly in flex layout */
  gap: 0.75rem; /* uniform internal spacing */
  padding: 0 0.5rem; /* small horizontal padding for balance */
}
/* Normalize inner element spacing: rely on flex gap instead of default margins */
.contact .container.grid-2 > div > h2,
.contact .container.grid-2 > div > h3,
.contact .container.grid-2 > div > p,
.contact .container.grid-2 > div > form { margin: 0; }
.contact .container.grid-2 > div:first-child {
  justify-content: space-evenly; /* evenly distribute left column content with equal gaps */
  padding-top: 1rem;  /* symmetric top padding */
  padding-bottom: 1rem; /* symmetric bottom padding */
}
.contact .container.grid-2 > div:nth-child(2) {
  justify-content: space-evenly; /* evenly distribute right column content with equal gaps */
  align-items: stretch;
  height: 100%;
}
.contact .container.grid-2 > div:nth-child(2) .contact-form {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly; /* evenly space form elements vertically */
  flex: 1 1 auto;
  gap: 0.75rem;
  min-height: 0; /* prevent flex overflow */
}
.contact .container.grid-2 > div:nth-child(2) .contact-form .contact-status {
  margin-top: 0.5rem;
}
.contact > .container > div:first-child h2 {
  font-size: 2rem;
  line-height: 1.05;
}
.contact > .container > div:first-child h3 {
  font-size: 1.1rem;
  margin-top: 0.6rem;
}
.contact > .container > div:first-child p {
  font-size: 1.1rem;
  color: var(--color-text);
}

/* Contact page inline-style replacements */
.contact-headshot {
  max-width: 200px;
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 0 0 1rem 0;
  display: block;
}

.contact-intro {
  margin-bottom: 1.5rem;
  color: var(--color-text);
}
.contact-subtitle {
  margin-bottom: 1rem;
  color: var(--color-accent);
}
.contact-label {
  color: var(--color-accent);
}
.contact-email {
  color: var(--color-text);
  text-decoration: none;
}

@media (max-width: 900px) {
  .contact > .container > div:first-child h2 { font-size: 2rem; }
  .contact > .container > div:first-child p { font-size: 1.1rem; }
}

@media (max-width: 600px) {
  body { font-size: 14px; letter-spacing: 0.5px; }
  .container { width: 95%; }
  .logo { font-size: 1.6rem; }
  .nav-toggle { display: inline-block; }
  /* Define a mobile header height for positioning the dropdown just below */
  .site-header { --header-height: 72px; }
  /* Mobile nav: hidden by default */
  .nav-menu { position: relative; }
  .nav-menu ul { display: none; }
  /* When open, show a styled dropdown */
  .nav-menu.nav-menu--open ul {
    display: flex;
    position: fixed; /* detach from header box and place under it */
    top: calc(var(--header-height) + 8px);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0.5rem;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(8px);
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    padding: 0.75rem;
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    width: min(560px, 94vw);
    margin: 0 auto; /* center under header */
  }
  .nav-menu.nav-menu--open ul li a {
    display: block;
    padding: 0.6rem 0.8rem;
    border-radius: 0.8rem;
    font-size: 1.05rem;
    color: var(--color-text);
    background: transparent;
  }
  .nav-menu.nav-menu--open ul li a:hover {
    background: var(--color-surface-alt);
    color: var(--color-accent);
  }
}

body.contact-page .contact.section-spacing .container {
  gap: 1rem; /* slightly tighter spacing between columns */
}

body.contact-page .container.grid-2 {
  align-items: center; /* vertically center the two columns within the section */
  gap: 1.5rem;
}

/* Column-level display is set above; individual column alignment is controlled per-column. */

@media (max-width: 900px) {
  .contact .container.grid-2 { min-height: auto; align-items: start; }
  .contact .container.grid-2 > div { justify-content: flex-start; }
}

/* Specifically make the Send Message column distribute its form elements evenly */
.contact .container.grid-2 > div:nth-child(2) {
  /* ensure the right column can stretch and let the inner form space elements */
  align-items: stretch;
}
.contact .container.grid-2 > div:nth-child(2) .contact-form {
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* push some inputs toward top and send button/status to bottom */
  height: 100%;
}
.contact .container.grid-2 > div:nth-child(2) .contact-form .contact-status {
  margin-top: 0.5rem;
}

@media (max-width: 900px) {
  .contact .container.grid-2 > div:nth-child(2) .contact-form { justify-content: flex-start; }
}

/* Use an auto margin on the textarea to push the button + status to the bottom
   of the form when the form has extra height. On small screens this is disabled. */
.contact .container.grid-2 > div:nth-child(2) .contact-form textarea {
  /* allow textarea to take flexible space but cap its height */
  flex: 1 1 auto;
  max-height: 240px;
  resize: vertical;
}

@media (max-width: 900px) {
  .contact .container.grid-2 > div:nth-child(2) .contact-form textarea { margin-bottom: 1rem; }
}

/* Reduce the big section-spacing margins specifically on the contact page */
body.contact-page .contact.section-spacing {
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

/* Footer relative positioning for scrollable content */
body.contact-page .site-footer {
  position: relative !important;
  bottom: auto !important;
}
.site-footer {
  background: var(--color-bg-alt) !important;
  color: var(--color-text-muted) !important;
  padding: 2rem 0 !important; /* match gallery footer exactly */
  border-top: 1px solid var(--color-border) !important;
  border-radius: 2rem 2rem 0 0 !important;
}
.site-footer a {
  color: var(--color-accent) !important;
  text-decoration: none !important;
  transition: color 0.2s !important;
}
.site-footer a:hover { color: var(--color-accent-alt) !important; }
.flex-between { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; }
.social a { margin-right: 1rem; font-weight: bold; letter-spacing: 1px; font-size: 1.2rem; display: inline-block; }
.social a img { width: 40px; height: 40px; object-fit: contain; vertical-align: middle; }

/* Contact form visuals */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.contact-form input,
.contact-form textarea {
  padding: 0.75rem;
  border: 2px solid var(--color-accent);
  border-radius: 1.5rem;
  background: var(--color-bg-alt);
  color: var(--color-text);
  font-size: 1.1rem;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-accent-alt);
  background: var(--color-surface-alt);
}
.styled-title { font-weight: 600; }
.contact-status { min-height: 1.1rem; }
