@import url('https://fonts.googleapis.com/css?family=Rubik:400,700&display=swap');

:root {
    /* Light theme (default) */
    --bg-color: #ffffff;
    --text-color: #333;
    --link-color: #44b436;
    --link-hover-color: #003366;
    --accent-color: #44b436;
    --button-bg-color: #f0f0f0;
}

:root[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #cccccc;
    --link-color: #44b436;
    --link-hover-color: #aaed71;
    --accent-color: #44b436;
    --button-bg-color: #cccccc;
}

body {
    font-family: 'Rubik', sans-serif;
    font-size: 16px;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}

.theme-toggle-container {
    position: absolute;
    right: 0;
    top: 1rem;
    z-index: 100;
    /* Ensure CSS variables are available for the web component */
    --bg-color: var(--bg-color);
    --text-color: var(--text-color);
    --accent-color: var(--accent-color);
    --link-color: var(--link-color);
    --link-hover-color: var(--link-hover-color);
    --button-bg-color: var(--button-bg-color);
}

a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: bolder;
    transition: color 0.3s;
}

a:hover {
    color: var(--link-hover-color);
    text-decoration: underline;
}

.no-break {
    white-space: nowrap;
}

main ul {
    list-style: none;
    padding: 0 0 0 20px;
}

main ul li::before {
    content: "> ";
    color: var(--accent-color);
}

span.tooltip-phone .colorized,
span.tooltip-game .colorized {
    display: inline-block;
    filter: url(#colorize);
    -webkit-filter: url(#colorize);
    filter: colorize(rgba(68, 180, 54, 1));
    -webkit-filter: colorize(rgba(68, 180, 54, 1));
    font-size: 12px;
    position: relative;
    top: -1px;
    margin-right: 4px;
}
span.tooltip-game .colorized {
    /* a circle around a single character */
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    text-align: center;
    line-height: 12px;
}

.svg-filter {
    position: absolute;
    width: 0;
    height: 0;
}

h1 {
    font-variant-caps: titling-caps;
    font-family: 'Helvetica', sans-serif;
    font-size: 42px;
    color: var(--accent-color);
    line-height: 56px;
    font-weight: lighter;
}

h2 {
    margin-top: 50px;
    font-variant-caps: titling-caps;
    font-family: 'Helvetica', sans-serif;
    font-size: 28px;
    color: var(--accent-color);
    line-height: 20px;
    font-weight: lighter;
}

#logo-schafeld-web-development {
    margin-left: 20px;
    margin-top: -3rem;
    position: relative;
    width: 160px;
    height: 160px;
}

#main-container {
    display: flex;
    justify-content: center;
}

#main-content {
    max-width: 50em;
    line-height: 1.7em;
    position: relative;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    vertical-align: top;
    flex-direction: column;
    position: relative;
}

header h1 {
    margin: 0;
    font-size: 42px;
    line-height: 56px;
}

header .sub-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin: 20px 0 0 0;
}

header h2 {
    margin: 0;
    font-size: 21px;
    line-height: 28px;
    font-weight: lighter;
}

header img {
    width: 160px;
    height: 160px;
}

header a {
    font-weight: 800;
    font-style: normal;
}

header a em {
    font-style: normal;
    font-weight: 800;
}

.avatar {
    float: right;
}

.avatar img {
    margin-right: 60px;
    width: 160px;
    height: 160px;
    border: 3px solid lightgrey;
    border-radius: 100px;
}

button {
    background-color: var(--button-bg-color);
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.tooltip-trigger {
    position: relative;
    display: inline-block;
    border-bottom: 1px dotted black;
    cursor: help;
}

ul {
    list-style: none;
}

ul li::before {
    content: "\2022";
    color: var(--accent-color);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

footer {
    border-top: 2px solid var(--accent-color);
    margin-top: 50px;
    display: flex;
    padding: 20px 0;
}

footer ul {
    display: flex;
    justify-content: space-evenly;
    padding: 0;
    margin: 0;
    list-style: none;
    flex-grow: 1;
}

footer ul li::before {
    content: none;
}

footer li {
    list-style: none;
    flex-grow: 1;
    align-items: stretch;
}

footer li a {
    text-decoration: none;
}

footer li a:hover {
    text-decoration: underline;
}

svg.color-mask {
    display: none;
}

@media only screen and (min-width: 481px) and (max-width: 1024px) {
    #main-container {
        margin: 0 2rem;
    }

    #main-content {
        max-width: none;
    }
}

@media only screen and (max-width: 480px) {
    #logo-schafeld-web-development {
        width: 80px;
        height: 80px;
        margin: 10px 0 0 20px;
    }

    header h1 {
        font-size: 21px;
        line-height: 28px;
        font-weight: bold;
        margin-top: 1rem;
    }

    header h2 {
        font-weight: normal;
        font-size: 16px;
        line-height: 21px;
    }

    h2 {
        font-size: 21px;
        line-height: 28px;
        margin-top: 10px;
    }

    h3 {
        font-weight: normal;
        font-size: 18px;
        line-height: 20px;
    }

    p {
        font-size: 16px;
        line-height: 24px;
    }

    .avatar {
        pointer-events: none;
    }

    .avatar img {
        margin: 0 20px;
    }

    #main-container {
        margin: 10px 20px;
    }

    ul {
        margin-left: -20px;
    }

    .tooltip-trigger {
        margin-right: 16px;
    }

    footer {
        display: flex;
    }

    footer ul {
        list-style-type: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-wrap: wrap;
    }

    footer ul li::before {
        content: none;
    }

    footer ul li {
        flex: 1 0 auto;
        justify-content: space-evenly;
        display: flex;
    }

    footer ul li:last-child {
        margin-top: 1em;
        flex: 1 1 100%;
        display: flex;
        justify-content: center;
    }

    main ul {
        padding: 0 20px 0 40px;
    }

    .theme-toggle-container {
        position: absolute;
        right: 0;
        top: 0;
        margin-bottom: 1rem;
    }
}

/* Moon Lander Button Styling - Matching theme toggle style */
.moon-lander-button {
    background: transparent;
    border: 2px solid var(--accent-color);
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    font-family: inherit;
    color: var(--accent-color);
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 1em 0;
}

.moon-lander-button:hover {
    background-color: var(--accent-color);
    color: white;
}

.moon-lander-button:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Modal Styles */
#moon-lander-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    flex-direction: column;
}

#moon-lander-modal.show {
    display: flex;
}

.modal-header {
    background-color: #1a1a1a;
    color: #cccccc;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-title {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
}

.modal-controls {
    display: flex;
    gap: 12px;
}

.modal-button {
    background: #333;
    border: 2px solid #44b436;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    font-family: inherit;
    color: #44b436;
    transition: all 0.3s;
}

.modal-button:hover {
    background-color: #44b436;
    color: #1a1a1a;
}

.modal-button.active {
    background-color: #44b436;
    color: #1a1a1a;
}

.modal-content {
    flex: 1;
    display: flex;
    background: #000;
}

#game-modal-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
}