/* Document
 * ========================================================================== */

/**
 * Add border box sizing in all browsers (opinionated).
 */

*,
::before,
::after {
  box-sizing: border-box;
}

/**
 * 1. Add text decoration inheritance in all browsers (opinionated).
 * 2. Add vertical alignment inheritance in all browsers (opinionated).
 */

::before,
::after {
  text-decoration: inherit; /* 1 */
  vertical-align: inherit; /* 2 */
}

/**
 * 1. Use the default cursor in all browsers (opinionated).
 * 2. Change the line height in all browsers (opinionated).
 * 3. Use a 4-space tab width in all browsers (opinionated).
 * 4. Remove the grey highlight on links in iOS (opinionated).
 * 5. Prevent adjustments of font size after orientation changes in
 *    IE on Windows Phone and in iOS.
 * 6. Breaks words to prevent overflow in all browsers (opinionated).
 */

html {
  cursor: default; /* 1 */
  line-height: 1.5; /* 2 */
  -moz-tab-size: 4; /* 3 */
  tab-size: 4; /* 3 */
  -webkit-tap-highlight-color: transparent /* 4 */;
  -ms-text-size-adjust: 100%; /* 5 */
  -webkit-text-size-adjust: 100%; /* 5 */
  word-break: break-word; /* 6 */
}

/* Sections
 * ========================================================================== */

/**
 * Remove the margin in all browsers (opinionated).
 */

body {
  margin: 0;
}

/**
 * Correct the font size and margin on `h1` elements within `section` and
 * `article` contexts in Chrome, Edge, Firefox, and Safari.
 */

h1 {
  font-size: 2em;
  margin: 0.67em 0;
}

/* Grouping content
 * ========================================================================== */

/**
 * Remove the margin on nested lists in Chrome, Edge, IE, and Safari.
 */

dl dl,
dl ol,
dl ul,
ol dl,
ul dl {
  margin: 0;
}

/**
 * Remove the margin on nested lists in Edge 18- and IE.
 */

ol ol,
ol ul,
ul ol,
ul ul {
  margin: 0;
}

/**
 * 1. Add the correct sizing in Firefox.
 * 2. Show the overflow in Edge 18- and IE.
 */

hr {
  height: 0; /* 1 */
  overflow: visible; /* 2 */
}

/**
 * Add the correct display in IE.
 */

main {
  display: block;
}

/**
 * Remove the list style on navigation lists in all browsers (opinionated).
 */

nav ol,
nav ul {
  list-style: none;
  padding: 0;
}

/**
 * 1. Correct the inheritance and scaling of font size in all browsers.
 * 2. Correct the odd `em` font sizing in all browsers.
 */

pre {
  font-family: monospace, monospace; /* 1 */
  font-size: 1em; /* 2 */
}

/* Text-level semantics
 * ========================================================================== */

/**
 * Remove the gray background on active links in IE 10.
 */

a {
  background-color: transparent;
}

/**
 * Add the correct text decoration in Edge 18-, IE, and Safari.
 */

abbr[title] {
  text-decoration: underline;
  text-decoration: underline dotted;
}

/**
 * Add the correct font weight in Chrome, Edge, and Safari.
 */

b,
strong {
  font-weight: bolder;
}

/**
 * 1. Correct the inheritance and scaling of font size in all browsers.
 * 2. Correct the odd `em` font sizing in all browsers.
 */

code,
kbd,
samp {
  font-family: monospace, monospace; /* 1 */
  font-size: 1em; /* 2 */
}

/**
 * Add the correct font size in all browsers.
 */

small {
  font-size: 80%;
}

/* Embedded content
 * ========================================================================== */

/*
 * Change the alignment on media elements in all browsers (opinionated).
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/**
 * Add the correct display in IE 9-.
 */

audio,
video {
  display: inline-block;
}

/**
 * Add the correct display in iOS 4-7.
 */

audio:not([controls]) {
  display: none;
  height: 0;
}

/**
 * Remove the border on iframes in all browsers (opinionated).
 */

iframe {
  border-style: none;
}

/**
 * Remove the border on images within links in IE 10-.
 */

img {
  border-style: none;
}

/**
 * Change the fill color to match the text color in all browsers (opinionated).
 */

svg:not([fill]) {
  fill: currentColor;
}

/**
 * Hide the overflow in IE.
 */

svg:not(:root) {
  overflow: hidden;
}

/* Tabular data
 * ========================================================================== */

/**
 * Collapse border spacing in all browsers (opinionated).
 */

table {
  border-collapse: collapse;
}

/* Forms
 * ========================================================================== */

/**
 * Remove the margin on controls in Safari.
 */

button,
input,
select {
  margin: 0;
}

/**
 * 1. Show the overflow in IE.
 * 2. Remove the inheritance of text transform in Edge 18-, Firefox, and IE.
 */

button {
  overflow: visible; /* 1 */
  text-transform: none; /* 2 */
}

/**
 * Correct the inability to style buttons in iOS and Safari.
 */

button,
[type="button"],
[type="reset"],
[type="submit"] {
  -webkit-appearance: button;
}

/**
 * 1. Change the inconsistent appearance in all browsers (opinionated).
 * 2. Correct the padding in Firefox.
 */

fieldset {
  border: 1px solid #a0a0a0; /* 1 */
  padding: 0.35em 0.75em 0.625em; /* 2 */
}

/**
 * Show the overflow in Edge 18- and IE.
 */

input {
  overflow: visible;
}

/**
 * 1. Correct the text wrapping in Edge 18- and IE.
 * 2. Correct the color inheritance from `fieldset` elements in IE.
 */

legend {
  color: inherit; /* 2 */
  display: table; /* 1 */
  max-width: 100%; /* 1 */
  white-space: normal; /* 1 */
}

/**
 * 1. Add the correct display in Edge 18- and IE.
 * 2. Add the correct vertical alignment in Chrome, Edge, and Firefox.
 */

progress {
  display: inline-block; /* 1 */
  vertical-align: baseline; /* 2 */
}

/**
 * Remove the inheritance of text transform in Firefox.
 */

select {
  text-transform: none;
}

/**
 * 1. Remove the margin in Firefox and Safari.
 * 2. Remove the default vertical scrollbar in IE.
 * 3. Change the resize direction in all browsers (opinionated).
 */

textarea {
  margin: 0; /* 1 */
  overflow: auto; /* 2 */
  resize: vertical; /* 3 */
}

/**
 * Remove the padding in IE 10-.
 */

[type="checkbox"],
[type="radio"] {
  padding: 0;
}

/**
 * 1. Correct the odd appearance in Chrome, Edge, and Safari.
 * 2. Correct the outline style in Safari.
 */

[type="search"] {
  -webkit-appearance: textfield; /* 1 */
  outline-offset: -2px; /* 2 */
}

/**
 * Correct the cursor style of increment and decrement buttons in Safari.
 */

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}

/**
 * Correct the text style of placeholders in Chrome, Edge, and Safari.
 */

::-webkit-input-placeholder {
  color: inherit;
  opacity: 0.54;
}

/**
 * Remove the inner padding in Chrome, Edge, and Safari on macOS.
 */

::-webkit-search-decoration {
  -webkit-appearance: none;
}

/**
 * 1. Correct the inability to style upload buttons in iOS and Safari.
 * 2. Change font properties to `inherit` in Safari.
 */

::-webkit-file-upload-button {
  -webkit-appearance: button; /* 1 */
  font: inherit; /* 2 */
}

/**
 * Remove the inner border and padding of focus outlines in Firefox.
 */

::-moz-focus-inner {
  border-style: none;
  padding: 0;
}

/**
 * Restore the focus outline styles unset by the previous rule in Firefox.
 */

:-moz-focusring {
  outline: 1px dotted ButtonText;
}

/**
 * Remove the additional :invalid styles in Firefox.
 */

:-moz-ui-invalid {
  box-shadow: none;
}

/* Interactive
 * ========================================================================== */

/*
 * Add the correct display in Edge 18- and IE.
 */

details {
  display: block;
}

/*
 * Add the correct styles in Edge 18-, IE, and Safari.
 */

dialog {
  background-color: white;
  border: solid;
  color: black;
  display: block;
  height: -moz-fit-content;
  height: -webkit-fit-content;
  height: fit-content;
  left: 0;
  margin: auto;
  padding: 1em;
  position: absolute;
  right: 0;
  width: -moz-fit-content;
  width: -webkit-fit-content;
  width: fit-content;
}

dialog:not([open]) {
  display: none;
}

/*
 * Add the correct display in all browsers.
 */

summary {
  display: list-item;
}

/* Scripting
 * ========================================================================== */

/**
 * Add the correct display in IE 9-.
 */

canvas {
  display: inline-block;
}

/**
 * Add the correct display in IE.
 */

template {
  display: none;
}

/* User interaction
 * ========================================================================== */

/*
 * 1. Remove the tapping delay in IE 10.
 * 2. Remove the tapping delay on clickable elements
      in all browsers (opinionated).
 */

a,
area,
button,
input,
label,
select,
summary,
textarea,
[tabindex] {
  -ms-touch-action: manipulation; /* 1 */
  touch-action: manipulation; /* 2 */
}

/**
 * Add the correct display in IE 10-.
 */

[hidden] {
  display: none;
}

/* Accessibility
 * ========================================================================== */

/**
 * Change the cursor on busy elements in all browsers (opinionated).
 */

[aria-busy="true"] {
  cursor: progress;
}

/*
 * Change the cursor on control elements in all browsers (opinionated).
 */

[aria-controls] {
  cursor: pointer;
}

/*
 * Change the cursor on disabled, not-editable, or otherwise
 * inoperable elements in all browsers (opinionated).
 */

[aria-disabled="true"],
[disabled] {
  cursor: not-allowed;
}

/*
 * Change the display on visually hidden accessible elements
 * in all browsers (opinionated).
 */

[aria-hidden="false"][hidden] {
  display: initial;
}

[aria-hidden="false"][hidden]:not(:focus) {
  clip: rect(0, 0, 0, 0);
  position: absolute;
}
:root {

    /* Colors */
    --black: oklch(0% 0 0);
    --neutral-1000: oklch(18% 0.0025 300);
    --neutral-900: oklch(24% 0.0025 300);
    --neutral-800: oklch(34% 0.0025 300);
    --neutral-700: oklch(47% 0.0025 300);
    --neutral-600: oklch(59% 0.0025 300);
    --neutral-500: oklch(71% 0.0025 300);
    --neutral-400: oklch(80% 0.0025 300);
    --neutral-300: oklch(90% 0.0025 300);
    --neutral-200: oklch(96% 0.0025 300);
    --neutral-100: oklch(98% 0.0025 300);
    --white: oklch(100% 0 0);

    --blue: #007AFF;
    --red: #FF3B30;

    --primary: var(--blue);
    --error: var(--red);

    --text: var(--black);
    --text-primary: color-mix(in srgb, var(--text), transparent 10%);
    --text-secondary: color-mix(in srgb, var(--text), transparent 20%);
    --text-tertiary: color-mix(in srgb, var(--text), transparent 50%);
    --foreground: var(--neutral-900);
    --background: var(--white);
    --background-secondary: var(--neutral-200);
    --background-tertiary: var(--neutral-100);
    
    --drop-shadow: drop-shadow(0 4px 8px color-mix(in srgb, var(--black), transparent 90%)) drop-shadow(0 2px 4px color-mix(in srgb, var(--black), transparent 85%));
    --elevation-400: 0 4px 32px color-mix(in srgb, var(--black), transparent 85%), 0 2px 8px color-mix(in srgb, var(--black), transparent 95%);
    --elevation-200: 0 2px 16px color-mix(in srgb, var(--black), transparent 85%), 0 1px 2px color-mix(in srgb, var(--black), transparent 95%);

    /* Utility */
    --space-100: 4px;
    --space-200: 8px;
    --space-300: 16px;
    --space-400: 24px;
    --space-500: 32px;
    --space-600: 48px;
    --space-700: 80px;
    --max-width: 1120px;

    --measure: 65ch;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    color: var(--text-primary);
}

/* Core */

.container {
    margin: 0 var(--space-300);
}

.measure {
    max-width: var(--measure);
}

.right {
    margin-left: auto;
}

.centered {
    margin-left: auto;
    margin-right: auto;
}

.app {
    width: 100%;
    max-width: var(--max-width);
}

[class^='stack'] {
    > h4 + p {
        margin-top: var(--space-200);
    }
    
    > h3 + p {
        margin-top: 12px;
    }
}

.stack-xl > * + * {
    margin-top: var(--space-700);
}

.stack-l > * + * {
    margin-top: var(--space-600);
}

.stack-m > * + * {
    margin-top: var(--space-500);
}

.stack-s > * + * {
    margin-top: var(--space-300);
}

.stack-xs > * + * {
    margin-top: var(--space-200);
}

.stack-xxs > * + * {
    margin-top: var(--space-100);
}

/* Text Styles */

:root {
    font-size: 16px;
}

* {
    margin: 0;
    padding: 0;
}

h1 {
    font-weight: 700;
    font-size: 3rem;
    line-height: 3.5rem;
    margin: 0;
}

h2 {
    font-weight: 700;
    font-size: 2rem;
    line-height: 2.5rem;
}

h3 {
    font-weight: 600;
    font-size: 1.25rem;
    line-height: 1.5rem;
}

h4 {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.5rem;
}

h5 {
    font-weight: 600;
    font-size: 13px;
    line-height: 1rem;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
    color: var(--text-secondary);
}

p {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.5rem;
    letter-spacing: -0.007rem;
}

strong {
    color: var(--text-primary);
    font-weight: 600;
}

li {
    color: var(--text-secondary);
    line-height: 1.5rem;
    letter-spacing: -0.007rem;
    list-style: none;
    position: relative;
}

ul, ol {
    padding-left: var(--space-400);
    margin-top: var(--space-200);

    li::before {
        position: absolute;
        left: calc(-1 * var(--space-400));
    }
}

ul li::before {
    content: '•';   
}

ol {
    counter-reset: item;

    li::before {
        counter-increment: item;
        content: counter(item)".";
    }

}

a {
    color: var(--primary);
    text-decoration: none;
    
    &:hover {
        cursor: pointer;
        text-decoration: underline;
    }
}

.sidebar, .main-navigation {
    a {
        text-decoration: none;
        background: none;
        color: var(--text-tertiary);
        letter-spacing: -0.007rem;
    }

    a:hover {
        color: var(--text-primary);
        cursor: pointer;
        transition: color 200ms ease-in-out 0s;
    }
}

.sidebar {
    div.active {
        font-weight: 500;
    }
}

blockquote {
    color: var(--text-secondary);
}

.main-navigation {
    background-color: var(--background);
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 2;
}

.nav-container {
    display: flex;
    align-items: center;

    .logo {
        display: none;
    }

    div {
        display: flex;
        margin: 0 auto;

        a {
            margin: 0.5rem 2rem;
        }
    }
}

.sidebar, .nav-container {
    div a {
        position: relative;
        padding: var(--space-200) 0;
    }
}

div {
    a:after {
    content: "";
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 4px;
    left: 0;
    background-color: var(--text-primary);
    visibility: hidden;
    transform-origin: left;
    transform: scaleX(0);
    transition: all 0.3s ease-in-out 0s;
    }

    &.active a {
        color: var(--text-primary);

        &:after {
            visibility: visible;
            transform: scaleX(1);
        }
    }
}

/* Buttons */

button {
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.007rem;
    display: flex;
    flex-direction: row;
    padding: 0.75rem 1.5rem;
    align-items: center;
    text-align: center;
    border-radius: 4px;

    &:hover {
        cursor: pointer;
    }
}

.button-primary {
    color: var(--background);
    background-color: var(--foreground);
    border: none;
    transition: all 200ms ease-in-out 0s;
}

.show-more {
    color: var(--primary);
    border: none;
    background-color: transparent;
    padding: 0;
    display: inline-block;
}

.hidden {
    display: none;
}

.progressive {
    padding-left: var(--space-300);
    border-left: 2px solid var(--text-primary);
}

blockquote {
    hanging-punctuation: first;
    padding-left: var(--space-300);
    border-left: 2px solid var(--text-secondary);
}

/* Footer */

footer {
    color: var(--text-tertiary);
    text-align: center;
    margin: 20vh 0 24px;
}

@media screen and (min-width: 800px) {

    /* Core */

    .container {
        margin: 0 10vw;
    }

    /* Navigation */

    .main-navigation {
        padding: 0 10vw;
    }

    .nav-container {
        max-width: var(--max-width);
        padding: 1rem 0 0.5rem 0;

        div {
            display: flex;
            margin: 0 0 0 auto;

            a {
                margin: 0 0 0 40px;
            }
        }

        .logo {
            display: initial;
        }

        svg {
            color: var(--text-secondary);
            height: 64px;
            width: 64px;
            transition: color 200ms ease-in-out 0s;

            &:hover {
                color: var(--text-primary);
            }
        }

        a:hover {
            color: var(--text-primary);
            cursor: pointer;
            transition: color 200ms ease-in-out 0s;
        }
    }
}

// @media (prefers-color-scheme: dark) {
//     :root {
//         --text: var(--white);
//         --foreground: var(--white);
//         --background: var(--black);
//         --background-secondary: var(--neutral-900);
//     }

//     html {
//         background-color: var(--background);
//     }
    
//     h2 {
//         font-weight: 600;
//     }
// }
/* Hero */

.hero {
    margin: 10vh 0;
    width: 100%;

    p {
        font-size: 1.25rem;
        line-height: 2rem;
    }
}

/* Work */

.work {
    margin-top: 1rem;
    display: grid;
    width: 100%;
    grid-template-columns: 1fr;
    grid-gap: 80px 5%;
}

/* Card */

.card {
    position: relative;
    cursor: pointer;
}

.card-description {
    color: var(--text-tertiary);
}

.card-thumbnail {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    background: var(--background-secondary);

    img {
        width: 100%;
    }
}

.protected {
    position: absolute;
    bottom: 1rem;
    right: 1rem;

    color: var(--white);
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.06rem;
    text-transform: uppercase;

    background-color: var(--neutral-900);
    opacity: 0.9;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: opacity 0.3s ease-in-out 0s;
}

@media screen and (min-width: 800px) {
    .card {
        display: grid;
        grid-template-columns: 3fr 2fr;
        grid-gap: 80px 5%;

        &::after {
            content: "";
            position: absolute;
            opacity: 0;
            top: -16px;
            right: -16px;
            bottom: -32px;
            left: -16px;
            z-index: -1;
            box-shadow: var(--elevation-400);
            border-radius: 4px;
            background-color: var(--white);
        }

        &:hover {
            &::after {
                opacity: 1;
                transition: opacity 0.3s ease-in-out 0.1s;
            }
        }
    }

    .work {
        display: grid;
        width: 100%;
        grid-template-columns: repeat(1, 1fr);
        grid-gap: 120px 5%;
    }

    .hero {
        width: 66%;
    }
}

/* @media (prefers-color-scheme: dark) {
    .card::after {
        background-color: var(--neutral-900);
    }
} */.content {
    display: grid;
    width: 100%;
    margin: 10vh 0;
}

.section:last-of-type {
    margin-bottom: 5vh;
}

.next-button {
    justify-self: end;
    position: fixed;
    bottom: 5vh;
    right: 4vw;
    z-index: 2;
    box-shadow: var(--elevation-200);
}

/* Navigation */

.sidebar {
    display: none;
}

/* Intro */

.intro {
    width: 100%;
}

.overview {
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    @supports(text-wrap: balance) {
        text-wrap: balance;
    }
}

.box-shadow {
    box-shadow: var(--elevation-200);
}

.drop-shadow {
    filter: var(--drop-shadow);
}

.rounded {
    border-radius: 4px;
}

.app-store-badge {
    display: block;
    overflow: hidden;
    border-radius: 13px;
    width: 250px;
    height: 83px;

    img {
        border-radius: 13px;
        width: 250px;
        height: 83px;
    }
}

[class^='stack'] > figure {
    margin: var(--space-500) 0;
}

.inset {
    max-width: 50%;
}

.tall {
    max-height: 640px;
    width: auto;
    max-width: 100%;
}

.phone {
    position: relative;
    top: 0;
    left: 0;
    aspect-ratio: auto;
}

.phone-frame {
    position: relative;
    top: 0;
    left: 0;
}

.phone-image {
    position: absolute;
    top: 2.5%;
    left: 5.5%;
    height: 95%;

    @supports(mask-image: url(/images/phone-mask.png)) {
        mask-image: url(/images/phone-mask.png);
        mask-repeat: no-repeat; 
        mask-size: 100%;
    }

    @supports(-webkit-mask-image: url(/images/phone-mask.png)) {
        -webkit-mask-image: url(/images/phone-mask.png);
        -webkit-mask-repeat: no-repeat;
        -webkit-mask-size: 100%;
    }
}

figure {
    img, video {
        display: flex;
        max-width: 100%;
        margin: 0 auto;
    }
}

figcaption {
    font-size: 15px;
    line-height: 1.25rem;
    margin-top: var(--space-300);
    color: var(--text-tertiary);
    text-align: center;

    @supports(text-wrap: balance) {
        text-wrap: balance;
    }
}

.row {
    display: flex;
    justify-content: space-around;
    max-width: 100%;
    margin: var(--space-400) 0;

    > * {
        flex-basis: 40%;
    }
}

.carousel {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    align-items: center;
    margin: var(--space-400) 0;
    scrollbar-width: thin;

    > * {
        flex: 0 0 90%;

        + * {
            margin-left: var(--space-400);
        }
    }
}

.background {
    padding: var(--space-500);
    border-radius: 8px;
    background: var(--background-tertiary);
}

.carousel-tall > * {
    flex: 0 0 40%;
}

.carousel-long > * {
    flex: 0 0 66%;

    + * {
        margin-left: var(--space-500);
    }
}

.results {
    flex-direction: row;
    text-align: left;
    justify-content: space-between;

    p {
        color: var(--text-secondary);
    }

    > * {
        flex-basis: auto;

        + * {
            margin-left: var(--space-500);
        }
    }
}

.single-column {
    max-width: 600px;
    margin: 10vh auto;
}

/* Interact Project  */

.review-card {
    background-color: var(--background-tertiary);
    border-radius: 8px;
    padding: 12px;
}

.review-card-caption {
    color: var(--text-secondary);
}

.review-card-rating {
    color: #EE9A35;
}

// .content-main {
//     margin-right: auto;
//     margin-left: auto;
// }

.overview > div + div {
    margin-top: var(--space-300);
}

@media screen and (min-width: 800px) {
    .main-navigation .logo  {
        display: flex;
    }

    .overview {
        flex-direction: row;

        > div + div {
            margin-left: var(--space-300);
            margin-top: 0;
        }
    }

    .content-main {
        grid-column: 2;
    }

    .content {
        grid-gap: 0 10%;
    }

    .carousel-tall > * {
        flex: 0 0 40%;
    }

    .carousel-long > * {
        flex: 0 0 33%;
    }

    .results > * {
        flex-basis: auto;
    }

    .sidebar {
        display: flex;
        flex-direction: column;
        justify-content: right;
        position: sticky;
        top: calc(10vh + 112px);
        width: max-content;
        height: max-content;
    }

    .next-button {
        grid-column: 2;
        position: static;
        z-index: 0;
        box-shadow: none;
    }

    .review-card {
        padding: 16px;
    }
}.contact {
    padding-top: 0.5rem;
    display: flex;
    flex-direction: row;

    button {
        margin-right: 1rem;
    }
}