/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2D2E3A;
    background-color: #F8F9FA;
    overflow-x: hidden;
    max-width: 100vw;
}

/* Brand Colors */
:root {
    --primary-blue: #0055D4;
    --jet-black: #1A1A1A;
    --off-white: #F8F9FA;
    --dark-navy: #2D2E3A;
    --white: #FFFFFF;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Lede text styling for intro paragraphs */
.lede {
    font-size: 1.1rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Header and Navigation */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    text-decoration: none;
    color: #333;
    display: flex;
    align-items: center;
}

.logo-image {
    height: 50px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--jet-black);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-blue);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('/static/images/hero-construction.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--white);
    padding: 120px 0 80px;
    text-align: center;
    min-height: 500px;
    display: flex;
    align-items: center;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero .subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero .tagline {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 3rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-button {
    display: inline-block;
    padding: 15px 30px;
    background: var(--primary-blue);
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-blue);
}

.cta-button:hover {
    background: #003ba3;
    border-color: #003ba3;
    transform: translateY(-2px);
}

.cta-button.secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.cta-button.secondary:hover {
    background: var(--white);
    color: var(--primary-blue);
}

/* Main Content */
.main {
    margin-top: 80px;
}

/* Projects CTA Section */
.projects-cta-section {
    padding: 40px 0;
    background: var(--off-white);
}

.projects-cta {
    text-align: center;
}

/* About Photo */
.about-photo {
    text-align: center;
    margin-bottom: 2rem;
}

.luke-photo {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-blue);
    box-shadow: 0 8px 24px rgba(0, 85, 212, 0.15);
}

/* Sections */
.section {
    padding: 80px 0;
}

.intro-text {
    text-align: center;
    margin-bottom: 3rem;
}

.intro-description {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--dark-navy);
    max-width: 800px;
    margin: 0 auto;
    font-weight: 400;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--jet-black);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
}

.feature-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #E5E7EB;
    cursor: pointer;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-blue);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.luke-headshot-icon {
    background: none;
    padding: 0;
    overflow: hidden;
    width: 100%;
    height: 300px;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.luke-headshot-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    max-width: 100%;
    display: block;
}

.retire-wealthy-icon {
    background: none;
    padding: 0;
    overflow: hidden;
    width: 100%;
    height: 300px;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.retire-wealthy-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    max-width: 100%;
    display: block;
}

.sick-of-9-5-icon {
    background: none;
    padding: 0;
    overflow: hidden;
    width: 100%;
    height: 300px;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.sick-of-9-5-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    max-width: 100%;
    display: block;
}

.feature-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1f2937;
}

.feature-description {
    color: #6b7280;
    line-height: 1.6;
}

/* Projects Grid - Clean 3-column layout */
.projects-grid {
  list-style: none;
  margin: 2rem 0 4rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}
@media (max-width: 1024px) {
  .projects-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .projects-grid { grid-template-columns: 1fr; }
}

/* Card: one solid clickable block */
.card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  transition: transform .12s ease, box-shadow .12s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
}

/* Image: fixed aspect ratio, cover, no layout shift */
.card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

/* Body */
.card-body { padding: 14px 16px 16px; }
.card-title {
  margin: 0 0 6px;
  font-size: 1rem;
  line-height: 1.35;
  color: #111;
}
.card-meta { margin: 0 0 8px; color: #555; font-size: .9rem; }
.card-desc {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: #444;
  line-height: 1.4;
}
.card-cta { font-size: .8rem; font-weight: 700; color: #1f4ed8; }

/* --- Fixes for blank white "ghost" squares / stray shadows --- */

/* Force children to full width; prevent accidental 2-column internals */
.card > * { width: 100%; }

/* Hide any empty elements accidentally emitted by CMS/templates */
.project-item > *:empty,
.card > *:empty { display: none !important; }

/* Remove pseudo-element placeholders some themes add */
.card::before,
.card::after { content: none !important; }

/* Nix random sibling blocks that pick up shadows next to the card */
.project-item > *:not(.card) { box-shadow: none !important; background: transparent !important; }

/* Normalize images to avoid extra gaps */
img { display: block; }

/* Project Detail Page */
.project-header {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    padding: 120px 0 80px;
}

.project-header-content {
    text-align: center;
}

.project-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.project-description {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin: 3rem 0;
}

.project-gallery .project-image {
    border-radius: 8px;
    overflow: hidden;
}

.project-gallery img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.project-details {
    max-width: 800px;
    margin: 0 auto;
}

.project-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #374151;
    margin-bottom: 3rem;
}

.project-info {
    background: #f9fafb;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 3rem;
}

.project-info h3 {
    margin-bottom: 1.5rem;
    color: #1f2937;
}

.info-grid {
    display: grid;
    gap: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.info-item label {
    font-weight: 500;
    color: #6b7280;
}

.project-navigation {
    padding: 2rem 0;
    border-top: 1px solid #e5e7eb;
}

.back-to-projects {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.back-to-projects:hover {
    color: #1d4ed8;
}

/* Stats Section */
.stats {
    background: #1f2937;
    color: white;
    padding: 80px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item {
    padding: 1rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    color: #d1d5db;
}

/* Testimonials */
.testimonials {
    background: #f9fafb;
    padding: 80px 0;
}

.testimonial-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.testimonial-text {
    font-size: 1.2rem;
    font-style: italic;
    color: #4b5563;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.testimonial-author {
    font-weight: 600;
    color: #1f2937;
}

.testimonial-title {
    color: #6b7280;
    font-size: 0.9rem;
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-button {
    width: 100%;
    padding: 1rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.form-button:hover {
    background: #2563eb;
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--white);
}

.footer-section p {
    color: #d1d5db;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 2rem;
    text-align: center;
    color: #9ca3af;
}

/* Projects Page Styles */
.projects-page {
    padding: 6rem 0 4rem;
}

.projects-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--jet-black);
    margin-bottom: 1rem;
    text-align: left;
}

.projects-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 3rem;
    text-align: left;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1200px;
}

.project-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.project-card-content {
    padding: 0;
}

.project-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.project-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-card-title {
    padding: 0 1.5rem;
    margin-bottom: 0.5rem;
}

.project-card-link {
    padding: 0 1.5rem 1.5rem 1.5rem;
    display: block;
}

.project-card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--jet-black);
}

.project-card-link {
    color: var(--primary-blue);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.project-card:hover .project-card-link {
    color: #003d9f;
}

/* Individual Project Page Styles */
.project-detail-page {
    padding: 6rem 0 4rem;
}

.project-detail-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--jet-black);
    margin-bottom: 2rem;
    text-align: left;
}

.project-main-image {
    width: 100%;
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
}

.project-main-image img {
    width: 100%;
    height: auto;
    display: block;
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.gallery-item {
    border-radius: 8px;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.project-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--dark-navy);
    margin-bottom: 3rem;
}

.project-body p {
    margin-bottom: 1.5rem;
}

.project-body p:first-child {
    font-size: 1.2rem;
    font-weight: 500;
}

.project-body ul {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.project-body li {
    margin-bottom: 0.75rem;
}

.project-highlights {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
}

.project-highlights h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--jet-black);
    margin-bottom: 1.5rem;
}

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.highlight-item {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--dark-navy);
}

.highlight-item strong {
    color: var(--jet-black);
}

.project-navigation {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.back-to-projects {
    display: inline-flex;
    align-items: center;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.back-to-projects:hover {
    color: #003d9f;
}

/* Mobile Menu Styles */
@media (max-width: 767px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 250px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: right 0.3s ease;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        z-index: 999;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-link {
        font-size: 1.2rem;
        padding: 1rem;
    }
    
    .mobile-menu-toggle {
        display: flex;
        z-index: 1001;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero .subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .project-title {
        font-size: 2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    

    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .container {
        padding: 0 15px;
    }
    
    /* Mobile Project Styles */
    .projects-title {
        font-size: 2.5rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .project-card-image {
        height: 180px;
        margin-bottom: 0.75rem;
    }
    
    .project-card-title {
        padding: 0 1.25rem;
    }
    
    .project-card-link {
        padding: 0 1.25rem 1.25rem 1.25rem;
    }
    
    .project-detail-title {
        font-size: 2.5rem;
    }
    
    .project-gallery {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .gallery-item img {
        height: 150px;
    }
    
    .project-body {
        font-size: 1rem;
    }
    
    .highlights-grid {
        grid-template-columns: 1fr;
    }
    
    .project-highlights {
        padding: 1.5rem;
    }
}

/* RESOURCES GRID - HORIZONTAL LAYOUT (FINAL FIX) */
/* Override container constraints for resources section */
#resources {
  width: 100vw !important;
  max-width: 1200px !important;
  margin-left: 50% !important;
  transform: translateX(-50%) !important;
  padding: 0 20px !important;
}

/* Resources cards layout */
#resources { width:100%; }
#resources .resources-inner { max-width:1200px; margin:0 auto; padding:0 16px; }

#resources .resources-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:24px;
  align-items:stretch;
}
@media (max-width:1023px){ #resources .resources-grid{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:639px){  #resources .resources-grid{ grid-template-columns:1fr; } }

/* Kill per-card width caps that force stacking */
#resources .resources-grid > *{
  width:auto; max-width:none; margin:0;
}

/* HOTFIX: ensure thumbnails are visible and have height in all browsers */
.card-thumb {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  position: relative !important;
}

/* Fallback if aspect-ratio is not honored by the browser */
@supports not (aspect-ratio: 1/1) {
  .card-thumb { height: 180px !important; object-fit: cover !important; }
}

/* --- Cross-browser media wrapper (works without aspect-ratio) --- */
.card-media {
  position: relative;
  width: 100%;
  overflow: hidden;             /* trims any bleed */
  background: #f3f4f6;          /* subtle gray while loading */
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* 16:9 placeholder height so image always has space */
.card-media::before {
  content: "";
  display: block;
  padding-top: 56.25%;          /* 9 / 16 * 100 */
}

/* Absolutely position the img to fill the box */
.card-media > .card-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Safety overrides in case some global CSS was hiding imgs */
.card-thumb,
.card-media img {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  max-width: 100% !important;
}

/* If aspect-ratio IS supported, let the browser optimize sizes */
@supports (aspect-ratio: 16/9) {
  .card-media::before { padding-top: 0; }
  .card-media { aspect-ratio: 16 / 9; }
  .card-media > .card-thumb { position: static; height: auto; }
}

/* --- Homepage spacing improvements --- */
section {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

p {
  line-height: 1.5;
  margin-bottom: 1rem;
}

/* Add padding below feature cards before footer */
.card-section,
.cards {
  padding-bottom: 0.5cm;
}

/* Tighten homepage section spacing */
.section, 
.hero-text, 
.cta-section {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  padding-top: 0;
  padding-bottom: 0;
}

h2, h3 {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

