/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fafafa;
}

body.dark-mode {
    background: #121212;
    color: #f5f5f5;
}

iframe {
    border: none;
}

/* Typography */
h1 {
    font-size: 3.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #2c3e50, #3498db);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

h3 {
    font-size: 1.5rem;
    color: #2c3e50;
}

h4 {
    margin: 0;
}

.dark-mode h1, .dark-mode h2, .dark-mode h3, .dark-mode h4 {
    color: white;
}

.dark-mode h1 {
    background: linear-gradient(135deg, #7090b0, #48a8e8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

p {
    margin-bottom: 1.5rem;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.left {
    float: left;
}

.right {
    float: right;
}

.clear {
    clear: both;
}

/* Footer */
footer {
    padding: 2rem 2.5rem;
}

.copyright {
    font-size: 12px;
}

/* Header */
header {
    padding: 1rem 0;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: fixed;
    width: 100%;
    z-index: 6;
}

.dark-mode header {
    background: #1e1e1e;
    color: #f5f5f5;
}

header h2 {
    margin-bottom: .25rem;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

nav a, .artifact a, .artifact a:visited {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover,
.dark-mode a {
    color: #3498db;
}

span.artifact {
    border-radius: 4px;
    background: #DDD;
    padding: 1rem;
}

.title img.small {
    display: none;
}

/* Hero Section */
.hero {
    /*background: #dfeffd;*/
    background-color: #DFEFFD;
    /*background: url('') no-repeat;
    background-size: 100vw 100vh;*/
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.dark-mode .hero {
    background: #172837;
}

.hero::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #3498db20, #2c3e5020);
    border-radius: 50%;
    top: -100px;
    right: -100px;
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #3498db10, #2c3e5010);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    bottom: -50px;
    left: -50px;
    z-index: 0;
}

.hero-content {
    max-width: 800px;
    font-size: 1.25rem;
    text-align: left;
}

.hero-content h1 {
    line-height: 3.55rem;
}

.hero-content p {
    width: 80%;
}

/* Projects Grid */
.projects {
    padding: 4rem 0;
}

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

.project-grid {
    width: 1200px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(6, minmax(182px, 1fr));
    grid-template-rows: auto;
    gap: 1rem;
    margin-top: 2rem;

    grid-template-areas:
        "hero hero hero hero aside2 aside2"
        "hero hero hero hero aside2 aside2"
        "aside3 aside3 aside4 aside4 aside5 aside5"
        "aside6 aside6 aside6 aside7 aside7 aside7";
}

.project-grid .project-card:nth-child(1) {
    grid-area: hero;
}

.project-grid .project-card:nth-child(2) {
    grid-area: aside2;
}

.project-grid .project-card:nth-child(3) {
    grid-area: aside3;
}

.project-grid .project-card:nth-child(4) {
    grid-area: aside4;
}

.project-grid .project-card:nth-child(5) {
    grid-area: aside5;
}

.project-grid .project-card:nth-child(6) {
    grid-area: aside6;
}

.project-grid .project-card:nth-child(7) {
    grid-area: aside7;
}

.project-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.dark-mode .project-card {
    background: #1e1e1e;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(45deg, #3498db, #2c3e50);
    overflow: hidden;
}

.project-image img {
    height: 100%;
}

.project-content {
    padding: 1.5rem;
}

.project-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.project-category {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 1rem;
}

.button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: transform 0.3s;
}

.button:hover {
    transform: translateY(-2px);
}

.dark-mode .button {
    background: black;
    color: white;
}

/* Theme switch styling */
.theme-switch {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-switch .slider {
    position: relative;
    width: 50px;
    height: 24px;
    background-color: #ccc;
    border-radius: 34px;
    cursor: pointer;
    transition: background-color 0.4s;
}

.theme-switch .slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.4s;
}

/* Move the slider to the right when checked */
.theme-switch input:checked+.slider::before {
    transform: translateX(24px);
}

/* Dark mode background */
.theme-switch input:checked+.slider {
    background-color: #3498db;
}

/* Icon styles */
.theme-switch .icon {
    font-size: 1.2rem;
    display: none;
}

.theme-switch .sun {
    display: inline;
}

.theme-switch input:checked~.sun {
    display: none;
}

.theme-switch input:checked~.moon {
    display: inline;
}

/* Case Study Specific Styles */
.case-study-header {
    padding: 6rem 0 4rem 0;
    background: linear-gradient(135deg, #3498db10, #2c3e5010);
    margin-bottom: 4rem;
    text-align: center;
}

.case-study-intro {
    font-size: 1.25rem;
    color: #666;
    margin-bottom: 2rem;
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 2rem 0;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.dark-mode .meta-grid, .dark-mode .result-card, .dark-mode .quote {
    background: #1e1e1e;
    color: #f5f5f5;
}

.meta-item h4 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #666;
    margin-bottom: 0.5rem;
}

.section {
    margin: 4rem 0;
}

.image-placeholder {
    display: flex;
    gap: 15px;
    width: 100%;
    height: 400px;
    background: linear-gradient(45deg, #3498db, #2c3e50);
    border-radius: 12px;
    margin: 2rem 0 .5rem 0;
    padding: 1.5%;
}

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

.result-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.result-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #3498db;
    margin-bottom: 0.5rem;
}

.quote {
    font-size: 1.25rem;
    font-style: italic;
    color: #666;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin: 2rem 0;
}

ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

.socials {
    display: flex;
    gap: 12px;
}

.socials li {
    list-style-type: none;
}

/* Form Elements */
form {
    width: 35vw;
}

label {
    font-size: .75rem;
    font-weight: bold;
    text-transform: uppercase;
}

input, textarea {
    background: #f5f5f5;
    border: 1px solid #999;
    border-radius: 4px;
    color: #1e1e1e;
    font-size: 16px;
    padding: 5px 10px;
    margin: 0 0 10px 0;
    width: 100%;
}

textarea {
    min-height: 75px;
}

/* Slide Deck Styles */
.deck-one-column, .deck-two-column {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.deck-one-column {
    padding-top: 59.5%; /* 16:9 Aspect Ratio (divide 9 by 16 = 0.5625) */
}

.deck-one-column iframe {
    background: transparent;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
}

.deck-two-column {
    display: flex;
    gap: 20px;
}

.deck-two-column div.column {
    float: left;
    position: relative;
    width: 50%;
    padding-top: 31%; /* 4:3 Aspect Ratio */
}

.deck-two-column h3 {
    margin-bottom: 40px;
}

.deck-two-column iframe {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
    min-height: 350px;
}

.images-one-column, .images-two-column {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.images-two-column {
    display: flex;
    gap: 20px;
}

.images-two-column div.column {
    float: left;
    position: relative;
    width: 50%;
}

.study-grid {
    width: 1200px;
    padding-right: 2.5rem;
    display: grid;
    grid-template-columns: repeat(6, minmax(188px, 1fr));
    grid-template-rows: repeat(2, minmax(200px));
    gap: 1rem;
    margin-top: 2rem;

    grid-template-areas:
        "hero hero hero hero aside2 aside2"
        "hero hero hero hero aside2 aside2"
        "aside3 aside3 aside4 aside4 aside4 aisde4"
        "aside3 aside3 aside4 aside4 aside4 aside4";
}

.study-grid .study-image:nth-child(1) {
    grid-area: hero;
}

.study-grid .study-image:nth-child(2) {
    grid-area: aside2;
}

.study-grid .study-image:nth-child(3) {
    grid-area: aside3;
}

.study-grid .study-image:nth-child(4) {
    grid-area: aside4;
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    header {
        position: relative;
    }

    nav ul {
        gap: 1rem;
    }

    .project-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-areas:
        "hero hero aside2 aside2"
        "hero hero aside2 aside2"
        "aside3 aside3 aside4 aside4"
        "aside5 aside5 aside6 aside6"
        "aside7 aside7 aside8 aside8";
      }

    .hero {
        min-height: 60vh;
    }

    .meta-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .title {
        width: 100%;
    }

    .title img.regular, .links, #heroJosh {
        display: none;
    }
    .title img.small {
        display: block;
        margin-right: 12px;
    }

    .copy {
        float:none;
    }

    .title h2 { font-size: 4.07vw; line-height: normal; }
    .title h4 { font-size: 3vw; }

    header .links {
        float: left !important;
        clear: both;
    }

    .hero-content, .hero-content p {
        width: 100%;
    }

    .hero-content a.button {
        text-align: center;
        width: 100%;
    }

    .project-grid {
        grid-template-columns: repeat(1, 370px 1fr);
        grid-template-areas:
        "hero"
        "aside2"
        "aside3"
        "aside4"
        "aside5"
        "aside6"
        "aside7"
        "aside8";

        padding: 0 1rem;
      }

    footer {
        text-align: center;
    }

    footer .copyright {
        text-align: left;
        margin-bottom: 20px;
    }
}