/* global */
@import url('https://fonts.cdnfonts.com/css/ica-rubrik-black');

:root {
    --primary-color: #000000;
    --secondary-color: #787879;
    --tertiary-color: #5E5E5E;

    --border-grey: rgb(235, 235, 235);

    --link-hover-grey: #f0f0f0;

    --project-title-font-weight: 500;
    --project-title-font-size: 1rem;
}

html {
    scroll-padding-top: 100px;
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
}

html,
body {
    box-sizing: border-box;
    font-family: "system-ui", "-apple-system", "BlinkMacSystemFont", "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif, "System Default", sans-serif;
    scroll-behavior: smooth;
}

h4 {
    font-size: .8rem;
    color: var(--tertiary-color);
    text-transform: uppercase;
    font-weight: 500;
}

/* header */

header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: white;
    padding: 15px 10%;
}

.logo-and-menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    max-width: 32px;
    max-height: 32px;
}

header nav {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 12px;
    cursor: pointer;
}

header nav span {
    display: block;
    border-bottom: 1px solid var(--secondary-color);
    width: 20px;
    transition: all 0.3s;
}

.nav-options {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    z-index: 10;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.nav-options.active {
    max-height: 170px;
    opacity: 1;
}

.nav-options a {
    position: relative;
    padding: 8px 15px;
    text-decoration: none;
    color: var(--tertiary-color);
    font-size: 1rem;
}

.nav-options a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 15%;
    width: 0%;
    height: 1px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-options a:hover::after {
    width: 40%;
}

.nav-options a.active::after {
    width: 40%;
}

.nav-options a:nth-last-child() {
    padding-bottom: 10px;
}

.menu.active span:nth-child(1) {
    transform: rotate(45deg);
    position: relative;
    top: 6px;
}

.menu.active span:nth-child(2) {
    transform: rotate(-45deg);
    position: relative;
    top: -6px;
}

/* main */

section {
    border-bottom: 1px solid var(--border-grey);
}

.home-page {
    min-height: 50vh;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-image: url(../assets/images/bg.png);
    background-size: 90%;
    background-repeat: no-repeat;
    background-position: top center;
    pointer-events: none;
    position: relative;
}

.title {
    color: #cecece;
    font-size: 2rem;
    margin-bottom: 4vh;
    position: relative;
}

.title::after {
    position: absolute;
    inset: 0 0 0 0;
    content: attr(data-content);
    z-index: 2;
    -webkit-text-stroke: 1px #8f8d8d;
    color: transparent;
}

.dev-name {
    font-family: 'ICA Rubrik';
    font-size: 4rem;
    line-height: 4rem;
    color: #25283B;
    position: relative;
}

@media screen and (min-width: 768px) {
    .dev-name {
        font-size: 7rem;
    }
}

@media screen and (min-width: 877px) {
    .dev-name {
        font-size: 5.5rem;
    }
}

@media screen and (min-width: 1024px) {
    .dev-name {
        font-size: 6.5rem;
    }
}

.dev-name::after {
    position: absolute;
    inset: 0 0 0 0;
    content: attr(data-content);
    z-index: 2;
    /* -webkit-text-stroke: 2px #d2d2d2; */
    -webkit-text-stroke: 2px #d6d6d6;
    color: transparent;
}

.home-page .model {
    background-image: url(../assets/images/model.png);
    width: 100%;
    height: 40vh;
    position: absolute;
    bottom: 0;
    left: 0;
    background-size: auto 130%;
    background-repeat: no-repeat;
    background-position: top center;
    z-index: 1;
}

.section-details {
    height: 5vh;
    border-bottom: 1px solid var(--border-grey);
    text-align: center;
    display: grid;
    align-items: center;
    font-size: .9rem;
}

.section-details-bigger {
    height: 12vh;
}

.projects {
    font-size: 1rem;
}

@media screen and (min-width: 768px) {
    .projects {
        font-size: 1.3rem;
    }
}

.projects {
    display: grid;
    text-align: center;
    align-items: center;
    position: relative;
}

.projects p {
    margin: 0;
}

.projects p::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 1px;
    background-color: #000;
}

.section-details-line {
    color: var(--border-grey);
}

.section-details p {
    color: var(--tertiary-color);
}

.section-details a {
    color: var(--tertiary-color);
    text-decoration: underline;
}

.project-container {
    padding: 0 10%;
}

.project-name {
    color: var(--secondary-color);
    font-weight: var(--project-title-font-weight);
    font-size: var(--project-title-font-size);
    margin-top: 4vh;
    margin-bottom: 2vh;
}

.project-phrase {
    font-weight: 500;
    font-size: 1.3rem;
    color: #3F3F3F;
    margin-bottom: 3vh;
}

.tag {
    background-color: #f3f5f5;
    width: fit-content;
    display: inline-block;
    padding: 6px 8px;
    border-radius: 30px;
    margin-bottom: 18px;
    color: #3F3F3F; /* make this the primary text color */
}

.view-work-btn {
    background-color: black;
    color: rgb(233, 233, 233);
    padding: 10px 30px;
    border: none;
    outline: none;
    border-radius: 6px;
    font-weight: 400;
    font-size: 1.1rem;
    margin-bottom: 10vh;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.view-work-btn:hover {
    background-color: #333;
    transform: translateY(-2px);
}

.project-image-container {
    margin-bottom: 5vh;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.1), 0 6px 20px 0 rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
}

@media screen and (min-width: 768px) {
    .project-phrase {
        font-size: 2.2rem;
    }

    .tags-button-image-container {
        display: grid;
        grid-template-columns: 1fr 2fr;
    }

    .project-image-container {
        margin-left: 40px;
    }
}

.project-image-container img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
}

@media screen and (min-width: 768px) {
    .reverse-layout {
        grid-template-columns: 2fr 1fr;
    }

    .reverse-layout .project-image-container {
        margin-left: 0;
        margin-right: 40px;
    }
}

.coming-soon {
    text-align: center;
    padding: 100px 0;
}

.coming-soon-text {
    font-size: 4rem;
    font-weight: 800;
    text-transform: uppercase;

    background-image: url('/assets/images/coming-soon-text-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
}

@media screen and (min-width: 768px) {
    .coming-soon-text {
        font-size: 6rem;
    }
}

.services-offered-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 10px;
    margin-top: 20px;
}

.service-offered-title,
.service-offered-card > p {
    text-align: center;
}

@media (min-width: 768px) {
    .services-offered-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1100px) {
    .services-offered-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

.service-offered-card {
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border-grey);
    overflow: hidden;
    height: 280px;
    position: relative;
    transition: box-shadow 0.2s ease;
}

.service-offered-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.service-offered-title-container {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    padding: 15px 0;
    transition: top 0.4s ease, transform 0.4s ease;
    z-index: 2;
}

.service-offered-card:hover .service-offered-title-container {
    top: 0;
    transform: translateY(0);
}

.service-offered-title-container::after {
    content: '+';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    font-weight: 300;
    color: #aaa;
    transition: transform 0.4s ease, color 0.2s ease;
    line-height: 1;
}

.service-offered-card:hover .service-offered-title-container::after {
    transform: translateY(-50%) rotate(45deg);
    color: #555;
}

.service-offered-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.service-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 15px 18px;
    background: white;
    transform: translateY(100%);
    transition: transform 0.4s ease;
    z-index: 1;
}

.service-offered-card:hover .service-card-content {
    transform: translateY(0);
}

.service-card-content p {
    font-size: .8rem;
    line-height: 1.5;
    color: #555;
    margin: 3px 0;
    text-align: center;
}

/* about me section */

.about-me {
    padding: 4vh 10%;
}

.about-me b {
    color: var(--tertiary-color);
}

.short-intro {
    font-size: 18px;
    color: var(--secondary-color);
    font-weight: 300;
    letter-spacing: -0.02rem;
    line-height: 1.4rem;
    margin-bottom: 6vh;
}

.collapsible {
    background-color: transparent;
    color: var(--secondary-color);
    cursor: pointer;
    padding: 18px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 15px;
    border-bottom: 1px solid var(--border-grey);
    font-weight: bold;
    margin-bottom: 10px;
}

.collapsible:after {
    content: '\002B';
    color: var(--secondary-color);
    font-weight: 300;
    float: right;
    margin-left: 5px;
    font-size: 20px;
}

.active:after {
    content: "\2212";
}

.content {
    padding: 0 18px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
    background-color: transparent;
    margin-bottom: 2vh;
    color: var(--secondary-color);
}

/* footer */

.contact h4,
.contact p {
    padding: 0 10%;
}

.contact {
    padding-bottom: 10px;
}

.contact h4 {
    margin: 20px 0 10px 0;
}

.contact p {
    margin: 0 0 5px 0;
}

.contact a {
    color: var(--secondary-color);
}

.footer section h1,
.footer section p {
    padding: 0 10%;
}

.color-mode {
    padding-top: 4vh;
}

.color-mode .active {
    background-color: var(--link-hover-grey);
    border-radius: 50%;
}

.color-mode span:nth-child(1) {
    padding-left: 10%;
}

.color-mode img {
    width: 25px;
    height: auto;
    padding: 8px;
}

.color-mode-img {
    opacity: 0.1;
}

.color-mode-img.active {
    opacity: 1;
}

.color-mode-img {
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.copyright-text {
    font-weight: 600;
    margin: 20px 0 10px 0;
}

.closing-line {
    font-size: .8rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.closing-line span {
    font-size: 1.1rem;
}

.footer .logo {
    padding: 8vh 3vh 2vh 0;
}

.footer .logo img {
    max-width: 32px;
    max-height: 32px;
}

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

    /* header */

    header {
        display: flex;
        justify-content: space-between;
    }

    .nav-options {
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        opacity: 1;
        max-height: none;
        background-color: transparent;
        position: static;
    }

    .menu {
        display: none;
    }

    /* main */

    .home-page {
        border-bottom: none;
        margin: 5vh 0;
    }

    .home-page-section-details {
        text-align: left;
        padding-left: 70%;
        padding-bottom: 4vh;
    }

    .home-page-section-details a {
        padding-left: 7px;
    }

    .home-page-section-details span {
        display: block;
        opacity: 0;
    }

    /* footer */

    .footer {
        display: flex;
        flex-direction: row-reverse;
        height: 40vh;
    }

    .footer section {
        border-right: 1px solid var(--border-grey);
    }

    .footer > * {
        flex: 0 0 auto;
    }

    .footer > .logo {
        flex: 0 0 40%;
    }

    .footer > .contact,
    .footer > .copyright {
        flex: 0 0 30%;
    }

    .contact h4 {
        padding-top: 4vh;
    }
    
    .color-mode {
        margin-top: 4vh;
    }

    .logo img {
        padding-left: 30%;
    }
}

@media screen and (min-width: 1230px) {
    header,
    main {
        margin: 0 10%;
        border-left: 1px solid var(--border-grey);
        border-right: 1px solid var(--border-grey);
    }
}

/* tech stack */
.tech-stack-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 24px 10%;
}

.tech-tag {
    background-color: #f3f5f5;
    padding: 5px 12px;
    border-radius: 30px;
    font-size: 0.82rem;
    color: #3F3F3F;
    white-space: nowrap;
}

/* dark mode */

body.dark-mode {
    background-color: #111;
    color: #e8e8e8;
}

body.dark-mode header {
    background-color: #111;
}

body.dark-mode .nav-options {
    background-color: #111;
}

body.dark-mode .nav-options a {
    color: #888;
}

body.dark-mode .nav-options a::after {
    background-color: #e8e8e8;
}

body.dark-mode h4 {
    color: #666;
}

body.dark-mode section {
    border-bottom-color: #252525;
}

body.dark-mode .section-details {
    border-bottom-color: #252525;
}

body.dark-mode .section-details p,
body.dark-mode .section-details a {
    color: #888;
}

body.dark-mode .projects p::before {
    background-color: #555;
}

body.dark-mode .title {
    color: #2a2a2a;
}

body.dark-mode .title::after {
    -webkit-text-stroke: 1px #3a3a3a;
}

body.dark-mode .dev-name {
    color: #d8d8d8;
}

body.dark-mode .dev-name::after {
    -webkit-text-stroke: 2px #3a3a3a;
}

body.dark-mode .project-name {
    color: #888;
}

body.dark-mode .project-phrase {
    color: #c8c8c8;
}

body.dark-mode .tag {
    background-color: #222;
    color: #bbb;
}

body.dark-mode .view-work-btn {
    background-color: #e8e8e8;
    color: #111;
}

body.dark-mode .view-work-btn:hover {
    background-color: #ccc;
}

body.dark-mode .project-image-container {
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.5), 0 6px 20px 0 rgba(0, 0, 0, 0.5);
}

body.dark-mode .service-offered-card {
    background: #1a1a1a;
    border-color: #2d2d2d;
}

body.dark-mode .service-offered-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

body.dark-mode .service-offered-title-container::after {
    color: #555;
}

body.dark-mode .service-offered-card:hover .service-offered-title-container::after {
    color: #999;
}

body.dark-mode .service-offered-title {
    color: #e0e0e0;
}

body.dark-mode .service-card-content {
    background: #1a1a1a;
}

body.dark-mode .service-card-content p {
    color: #888;
}

body.dark-mode .short-intro {
    color: #999;
}

body.dark-mode .about-me b {
    color: #bbb;
}

body.dark-mode .collapsible {
    color: #888;
    border-bottom-color: #252525;
}

body.dark-mode .content {
    color: #888;
}

body.dark-mode .content b {
    color: #aaa;
}

body.dark-mode .tech-tag {
    background-color: #222;
    color: #bbb;
}

body.dark-mode .footer section {
    border-right-color: #252525;
}

body.dark-mode .contact a {
    color: #888;
}

body.dark-mode .copyright-text {
    color: #e0e0e0;
}

body.dark-mode .closing-line {
    color: #666;
}

@media screen and (min-width: 1230px) {
    body.dark-mode header,
    body.dark-mode main {
        border-left-color: #252525;
        border-right-color: #252525;
    }
}