/* ===================================
   Global Styles
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #8B4513;
    --secondary-color: #D2691E;
    --dark-color: #2C1810;
    --light-color: #F5E6D3;
    --text-color: #333;
    --white: #fff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--dark-color);
    text-align: center;
}

/* ===================================
   Header & Navigation
   =================================== */
header {
    background-color: var(--dark-color);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    box-shadow: var(--shadow);
    display: block !important;
    visibility: visible !important;
}

nav {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem; /* slightly larger gap so subtitle isn't crowded */
    text-decoration: none;
    z-index: 1001;
    position: relative;
    flex-shrink: 0;
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem; /* small breathing room between name and subtitle */
    z-index: 1001;
}

.logo-image {
    height: 52px; /* a touch larger for readability */
    width: auto;
    transition: transform 0.3s ease;
    display: block;
    border-radius: 50%;
    object-fit: cover;
    z-index: 1001;
    flex-shrink: 0;
}

.logo-image:hover {
    transform: scale(1.05);
}

.logo h1 {
    color: var(--white);
    font-size: 1.9rem;
    margin: 0;
    padding: 0;
    line-height: 1.05; /* tighten line height but keep spacing with subtitle */
    border: none;
    text-decoration: none;
}

.subtitle {
    color: var(--secondary-color);
    font-size: 0.95rem;
    line-height: 1;
    margin: 0;
    padding: 0;
    border: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

/* Language switch buttons in header */
.lang-switch {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.lang-switch .lang-toggle {
    background: transparent;
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.12);
    padding: 0.35rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    transition: all 0.2s ease;
}
.lang-switch .lang-toggle:hover {
    border-color: var(--secondary-color);
    transform: scale(1.1);
}
.lang-switch .lang-toggle[aria-pressed="true"] {
    background: rgba(210, 105, 30, 0.2);
    border-color: var(--secondary-color);
    box-shadow: 0 0 8px rgba(210, 105, 30, 0.3);
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--white);
    transition: 0.3s;
}

/* ===================================
   Hero Section
   =================================== */
.hero {
    background: linear-gradient(rgba(44, 24, 16, 0.7), rgba(44, 24, 16, 0.7)), 
                url('ruins.png') center/cover no-repeat;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 80px;
}

.hero-content {
    color: var(--white);
    max-width: 800px;
    padding: 2rem;
}

/* Stack hero content vertically and center items (keeps CTAs beneath each other) */
.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem; /* spacing between heading, paragraph and buttons */
}

/* No extra vertical offset for the secondary hero CTA; it stacks naturally beneath the primary CTA */
.hero-content .hero-secondary {
    margin-top: 0;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--white);
    animation: fadeInUp 1s ease;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1.2s ease;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease;
    animation: fadeInUp 1.4s ease;
}

.cta-button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

/* ===================================
   About Section
   =================================== */
.about {
    padding: 5rem 0;
    background-color: var(--white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

/* ===================================
   Research Section
   =================================== */
.research {
    padding: 5rem 0;
    background-color: var(--light-color);
}

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

.research-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.research-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.research-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
    white-space: normal;
}

/* ===================================
   Projects Section
   =================================== */
.projects {
    padding: 5rem 0;
    background-color: var(--white);
}

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

.project-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: var(--shadow);
    cursor: pointer;
    height: 300px;
}

.project-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
}

.project-name {
    display: block;
    width: 100%;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 0.6rem 1rem;
    font-weight: 700;
    text-align: left;
}

.project-hover {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255,255,255,0.9);
    color: #111;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.project-item:hover .project-hover {
    opacity: 1;
    transform: translateY(-2px);
}

/* Project status badge */
.project-badge {
    position: absolute;
    top: 12px;
    left: 12px; /* default - will be overridden for project items */
    background: rgba(255,165,0,0.95); /* orange */
    color: #111;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

/* project badge and logo overlays removed — project cards use background image and name only */

.project-status {
    display: inline-block;
    background: linear-gradient(90deg, #fff3cd, #ffeeba);
    color: #856404;
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    font-weight: 700;
    margin-bottom: 1rem;
    border: 1px solid rgba(0,0,0,0.05);
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(44, 24, 16, 0.9), transparent);
    color: var(--white);
    padding: 2rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.project-item:hover img {
    transform: scale(1.1);
}

.project-item:hover .project-overlay {
    transform: translateY(0);
}

.project-overlay h3 {
    margin-bottom: 0.5rem;
}

/* ===================================
   Contact Section
   =================================== */
.contact {
    padding: 5rem 0;
    background-color: var(--light-color);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.contact-info h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.contact-details {
    margin-top: 2rem;
}

.contact-details p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* LinkedIn contact card in contact section */
.contact-social {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.linkedin-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: #f5f7fb;
    border: 1px solid rgba(10,102,194,0.08);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    width: 100%;
    max-width: 380px;
}
.linkedin-card:hover {
    background: #eef6ff;
}
.social-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 50%;
    background: #fff;
    padding: 2px;
    box-shadow: 0 2px 6px rgba(10,102,194,0.08);
    object-fit: cover;
}
.social-meta strong {
    display: block;
    font-size: 0.95rem;
}
.social-handle {
    font-size: 0.85rem;
    color: #666;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0;
}

.contact-form input,
.contact-form textarea {
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    resize: vertical;
}

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

.submit-button {
    padding: 1rem 2rem;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-button:hover {
    background-color: var(--secondary-color);
}

/* ===================================
   Footer
   =================================== */
footer {
    background-color: var(--dark-color);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
}

/* ===================================
   Animations
   =================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        right: -100%;
        top: 80px;
        flex-direction: column;
        background-color: var(--dark-color);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem 0;
    }

    .nav-links.active {
        right: 0;
    }

    .hamburger {
        display: flex;
    }

    nav {
        padding: 1rem 1rem;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .logo-image {
        height: 45px;
    }

    .subtitle {
        font-size: 0.85rem;
    }

    .hero {
        margin-top: 70px;
        min-height: 70vh;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .hero-content {
        padding: 1.5rem;
    }

    .cta-button {
        padding: 0.9rem 2rem;
        font-size: 0.95rem;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about,
    .research,
    .projects,
    .contact {
        padding: 3rem 0;
    }

    .container {
        padding: 0 15px;
    }

    h2 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    .research-card,
    .project-item {
        padding: 1.5rem;
    }

    .contact-form input,
    .contact-form textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .linkedin-card {
        max-width: 100%;
    }

    .project-gallery {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-item {
        height: 250px;
    }

    footer {
        padding: 1.5rem 0;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .hero {
        margin-top: 65px;
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .logo h1 {
        font-size: 1.3rem;
    }

    .logo-image {
        height: 40px;
    }

    .subtitle {
        font-size: 0.8rem;
    }

    .research-grid {
        grid-template-columns: 1fr;
    }

    h2 {
        font-size: 1.75rem;
    }

    .research-card h3 {
        font-size: 1.3rem;
    }

    .about-text p,
    .contact-info p {
        font-size: 1rem;
    }

    .cta-button {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    .project-item {
        height: 220px;
    }

    nav {
        padding: 0.8rem 0.8rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .cta-button:active,
    .submit-button:active,
    .nav-links a:active {
        transform: scale(0.98);
    }

    .project-item:active {
        transform: scale(0.99);
    }

    /* Always show project hover text on touch devices */
    .project-hover {
        opacity: 0.9;
    }

    /* Make touch targets larger */
    .nav-links a {
        padding: 0.8rem 0;
        display: block;
    }

    .hamburger {
        padding: 0.5rem;
    }
}

/* Excavation gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

/* Games overview specific styles */
.games-list .project-gallery {
    display: block; /* single-column layout for games list */
}
.games-list .project-item {
    max-width: 880px;
    margin: 0.75rem auto; /* center the card */
    height: 120px; /* compact height for list preview */
    border-radius: 12px;
    overflow: hidden;
}
.games-list .project-image {
    height: 100%;
    display: flex;
    align-items: center;
    padding-left: 1.25rem;
}
.games-list .project-name {
    background: transparent; /* keep name visible but not in a heavy band */
    color: var(--white);
    font-size: 1.25rem;
    padding: 0;
}
.games-list .project-description {
    color: rgba(255,255,255,0.9);
    font-size: 0.95rem;
    margin-left: 1.25rem;
}
.gallery-item {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.gallery-item.placeholder {
    color: #666;
    font-weight: 600;
    font-size: 0.95rem;
    background: linear-gradient(180deg, #fafafa, #f5f5f5);
}

/* ===================================
   Excavation / Report page styles
   =================================== */
.excavation-article {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    color: var(--text-color);
}
.excavation-article .lead {
    font-size: 1.08rem;
    line-height: 1.9;
    color: #222;
    margin-bottom: 1rem;
}
.summary-box {
    background: linear-gradient(180deg, #fbf9f6, #fffaf5);
    border-left: 4px solid var(--primary-color);
    padding: 1rem 1.1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}
.meta-list {
    list-style: none;
    padding-left: 0;
}
.meta-list li { margin-bottom: 0.45rem; }
.excavation-article h3 { color: var(--dark-color); margin-top: 1.25rem; margin-bottom: 0.6rem; }
.excavation-article h4 { color: var(--primary-color); margin-top: 0.6rem; margin-bottom: 0.4rem; }
.excavation-article ul { margin-left: 1.25rem; margin-bottom: 1rem; }
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    align-items: start;
}
.callout {
    background: #fff7e6;
    border: 1px solid rgba(0,0,0,0.04);
    padding: 0.8rem 1rem;
    border-radius: 6px;
    margin: 1rem 0;
}

@media (max-width: 768px) {
    .two-col { grid-template-columns: 1fr; }
}

/* ===================================
   Project & Excavation Detail Layouts
   =================================== */
.project-detail-grid {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 768px) {
    .project-detail-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .project-detail-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Excavation detail wrapper */
.excavation-detail-wrapper {
    width: 100%;
    margin: 0 auto;
}

/* Excavation article/section responsive spacing */
article section {
    margin-bottom: 1.5rem;
}

article section:first-of-type {
    margin-top: 0;
}

article h3 {
    font-size: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--dark-color);
}

article h4 {
    font-size: 1.2rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

article ul,
article ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.8;
}

article li {
    margin-bottom: 0.5rem;
}

article p {
    line-height: 1.8;
    margin-bottom: 1rem;
    font-size: 1rem;
}

article .lead {
    font-size: 1.08rem;
    font-weight: 500;
    color: #222;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    article h3 {
        font-size: 1.3rem;
        margin-top: 1.25rem;
    }

    article h4 {
        font-size: 1.1rem;
        margin-top: 0.8rem;
    }

    article p,
    article li {
        font-size: 1rem;
        line-height: 1.7;
    }

    article ul,
    article ol {
        margin-left: 1.25rem;
    }

    article section {
        margin-bottom: 1.25rem;
    }
}

@media (max-width: 480px) {
    article h3 {
        font-size: 1.15rem;
        margin-top: 1rem;
        margin-bottom: 0.5rem;
    }

    article h4 {
        font-size: 1rem;
        margin-top: 0.7rem;
        margin-bottom: 0.4rem;
    }

    article p,
    article li {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    article ul,
    article ol {
        margin-left: 1rem;
        padding-right: 0.5rem;
    }

    article section {
        margin-bottom: 1rem;
    }

    article .lead {
        font-size: 1rem;
    }
}

/* Excavation hero/cover image */
.excavation-hero {
    position: relative;
    height: 320px;
    border-radius: 10px 10px 6px 6px;
    overflow: hidden;
    margin-bottom: 1rem;
    background-repeat: no-repeat;
    /* slightly zoom in and position lower to focus tents */
    background-size: 150%;
    background-position: center 86%;
}
.excavation-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.25), rgba(0,0,0,0.55));
}
.excavation-hero-inner {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.25rem 1.5rem;
    color: #fff;
}
.excavation-hero .hero-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 6px rgba(0,0,0,0.5);
}
.excavation-hero .byline {
    margin: 0.25rem 0 0.45rem 0;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.92);
    opacity: 0.95;
}

/* Utility: visually hidden but accessible to screen readers */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
.excavation-hero .project-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    /* Use a stronger, opaque overlay for readability */
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border-radius: 6px;
    padding: 0.35rem 0.8rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    backdrop-filter: none; /* remove blur which reduces legibility */
    border: none;
    font-size: 0.95rem;
    max-width: max-content; /* avoid stretching full-width */
}

/* Completed badge styles (green) */
.project-badge.completed {
    background: linear-gradient(90deg, #28a745, #218838); /* green */
    color: #fff;
}
.project-status.completed {
    /* Make the "Completed" pill high-contrast while keeping a green cue */
    background: linear-gradient(90deg, #218838, #19692c);
    color: #fff;
    border: none;
    box-shadow: 0 4px 12px rgba(25, 100, 40, 0.35);
}

.project-readme {
    background:#f9f9f9;
    padding:1rem;
    border-radius:6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.project-readme pre {
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    line-height: 1.4;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.project-readme code {
    font-family: 'Courier New', monospace;
    word-break: break-word;
}

@media (max-width: 768px) {
    .excavation-hero { height: 220px; }
    .excavation-hero .hero-title { font-size: 1.25rem; }

    /* Prevent horizontal overflow on mobile */
    table {
        width: 100%;
        font-size: 0.85rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table td, table th {
        padding: 0.5rem 0.25rem;
    }

    /* Long links should wrap */
    a {
        word-break: break-word;
    }

    /* Improve spacing for touch on mobile list items */
    ul li, ol li {
        margin-bottom: 0.75rem;
        padding-right: 0.5rem;
    }

    .linkedin-card {
        flex-wrap: wrap;
    }

    .social-icon {
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    /* Prevent text from becoming too cramped */
    main {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Extra padding to prevent edge-flush on tiny screens */
    .container {
        padding: 0 12px;
    }

    /* Improve readability of links on very small screens */
    a {
        word-break: break-word;
    }

    /* Ensure code blocks scroll if needed */
    pre, code {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }

    /* Tighter margins for excavation sections on phones */
    article section {
        margin-bottom: 0.75rem;
    }

    /* Badge and status styling for tiny screens */
    .project-badge {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
    }

    .project-status {
        font-size: 0.85rem;
        padding: 0.3rem 0.5rem;
    }

    /* Make contact form inputs easier to tap */
    .contact-form input,
    .contact-form textarea {
        min-height: 44px;
        font-size: 16px;
        padding: 0.75rem;
    }

    .submit-button {
        min-height: 44px;
        padding: 0.75rem 1.5rem;
    }

    .cta-button {
        min-height: 44px;
        padding: 0.75rem 1.5rem;
    }

    /* Ensure images don't overflow tiny screens */
    img {
        max-width: 100%;
        height: auto;
    }
}

