/* Reset */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    color: #171717;
    background: #ffffff;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    display: block;
    width: 100%;
}

button,
input,
textarea {
    font: inherit;
}


/* Main colors */

:root {
    --navy: #11183f;
    --dark-navy: #0b1030;
    --purple: #5146c7;
    --purple-dark: #3f36a5;
    --light-purple: #f1efff;
    --text: #171717;
    --muted: #666666;
    --light-bg: #f8f7ff;
    --border: #e7e7e7;
    --white: #ffffff;
}


/* General */

main {
    width: 100%;
}

section {
    padding: 100px 8%;
}

.section-heading {
    max-width: 750px;
    margin: 0 auto 60px;
    text-align: center;
}

.section-heading p {
    color: var(--purple);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.section-heading h2 {
    color: var(--navy);
    font-size: 45px;
    line-height: 1.2;
    margin-bottom: 15px;
}

.section-heading span {
    color: var(--muted);
    font-size: 17px;
}


/* Header */

.header {
    width: 100%;
    min-height: 90px;
    padding: 0 8%;

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

    background: var(--white);

    position: sticky;
    top: 0;
    z-index: 1000;

    border-bottom: 1px solid #f0f0f5;
}


/* Logo */

.logo {
    color: var(--navy);
    font-size: 27px;
    font-weight: 800;
    letter-spacing: -1px;
}

.logo span {
    color: var(--purple);
    margin-left: 3px;
}


/* Navigation */

.header nav {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;

    list-style: none;
}

.nav-links li {
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: #20233d;
    font-size: 15px;
    font-weight: 600;

    transition: 0.3s ease;
}

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

.nav-links a.active {
    color: var(--purple);
}

.nav-links li:last-child a {
    display: inline-block;

    padding: 12px 22px;

    background: var(--navy);
    color: white;

    border-radius: 3px;
}

.nav-links li:last-child a:hover {
    background: var(--purple);
    color: white;
}


/* Home hero */

.hero {
    min-height: calc(100vh - 90px);

    padding: 70px 8%;

    display: grid;
    grid-template-columns: 1.1fr 0.9fr;

    align-items: center;
    gap: 50px;

    background: #ffffff;

    position: relative;
    overflow: hidden;
}

.hero::after {
    content: "";

    position: absolute;

    width: 120px;
    height: 100px;

    right: 6%;
    top: 65px;

    background-image: radial-gradient(
        #c8c9d7 2px,
        transparent 2px
    );

    background-size: 15px 15px;

    opacity: 0.8;

    pointer-events: none;
}

.hero-content {
    max-width: 620px;
    position: relative;
    z-index: 2;
}

.hero-small-text {
    color: var(--purple);

    font-size: 14px;
    font-weight: 700;

    letter-spacing: 2px;

    margin-bottom: 18px;
}

.hero h1 {
    color: var(--navy);

    font-size: clamp(48px, 6vw, 72px);

    line-height: 1.05;

    letter-spacing: -3px;

    margin-bottom: 20px;
}

.hero h1 span {
    color: var(--purple);
}

.hero h2 {
    color: #20233d;

    font-size: 27px;

    margin-bottom: 20px;
}

.hero-description {
    max-width: 580px;

    color: var(--muted);

    font-size: 17px;

    line-height: 1.8;

    margin-bottom: 32px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 14px 25px;

    border-radius: 3px;

    font-weight: 700;

    transition: 0.3s ease;
}

.primary-btn {
    background: var(--navy);
    color: white;
}

.primary-btn:hover {
    background: var(--purple);
    color: white;
    transform: translateY(-3px);
}

.secondary-btn {
    background: var(--purple);
    color: white;
}

.secondary-btn:hover {
    background: var(--purple-dark);
    color: white;
    transform: translateY(-3px);
}

.hero > img {
    width: 340px;
    height: 430px;

    object-fit: cover;
    object-position: center;

    justify-self: end;

    position: relative;
    z-index: 2;

    margin-right: 30px;

    box-shadow: 25px -25px 0 var(--navy);
}


/* About */

.about-preview,
.about {
    background: white;
}

.about-content {
    max-width: 1100px;

    margin: auto;

    display: grid;
    grid-template-columns: 1.2fr 0.8fr;

    gap: 80px;

    align-items: start;
}

.about-text h3 {
    color: var(--navy);

    font-size: 32px;

    line-height: 1.3;

    margin-bottom: 20px;
}

.about-text p {
    color: #666;

    line-height: 1.8;

    margin-bottom: 18px;
}

.text-link {
    display: inline-block;

    margin-top: 10px;

    color: var(--purple);

    font-weight: 700;
}

.text-link:hover {
    text-decoration: underline;
}


/* About page */

.about {
    min-height: 500px;
}

.about > h1 {
    max-width: 900px;

    margin: 0 auto 30px;

    color: var(--navy);

    font-size: 50px;

    text-align: center;
}

.about > p {
    max-width: 800px;

    margin: 0 auto 20px;

    color: var(--muted);

    font-size: 17px;

    line-height: 1.8;

    text-align: center;
}


/* Skills */

.skills-box {
    padding: 35px;

    background: var(--light-bg);

    border-radius: 15px;
}

.skills-box h3 {
    color: var(--navy);

    font-size: 25px;

    margin-bottom: 30px;
}

.skill {
    margin-bottom: 25px;
}

.skill:last-child {
    margin-bottom: 0;
}

.skill-title {
    display: flex;
    justify-content: space-between;

    margin-bottom: 8px;

    font-weight: 700;
}

.skill-title span:last-child {
    color: var(--purple);
}

.progress-bar {
    width: 100%;
    height: 8px;

    background: #ddd;

    border-radius: 20px;

    overflow: hidden;
}

.progress {
    height: 100%;

    background: var(--purple);

    border-radius: 20px;
}

.html-progress {
    width: 90%;
}

.css-progress {
    width: 65%;
}

.javascript-progress {
    width: 50%;
}


/* Services */

.services {
    background: var(--light-bg);
}

.services-grid {
    max-width: 1100px;

    margin: auto;

    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 25px;
}

.service-card {
    position: relative;

    padding: 35px;

    background: white;

    border: 1px solid #e8e8e8;

    border-radius: 15px;

    overflow: hidden;

    transition: 0.3s ease;
}

.service-card:hover {
    transform: translateY(-7px);

    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.service-number {
    position: absolute;

    top: 20px;
    right: 25px;

    color: #ddd;

    font-size: 40px;

    font-weight: 700;
}

.service-icon {
    width: 55px;
    height: 55px;

    display: flex;

    align-items: center;
    justify-content: center;

    margin-bottom: 25px;

    background: var(--purple);

    color: white;

    border-radius: 10px;

    font-weight: 700;
}

.service-card h2,
.service-card h3 {
    color: var(--navy);

    font-size: 24px;

    margin-bottom: 12px;
}

.service-card p {
    color: #666;

    line-height: 1.7;
}


/* Projects */

.projects {
    background: white;
}

.project-grid {
    max-width: 1100px;

    margin: auto;

    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 30px;
}

.project-card {
    background: white;

    border: 1px solid var(--border);

    border-radius: 15px;

    overflow: hidden;

    transition: 0.3s ease;
}

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

    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.1);
}

.project-image {
    width: 100%;
    height: 260px;

    overflow: hidden;

    background: #eeeeee;
}

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

    object-fit: cover;

    transition: 0.4s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-content {
    padding: 28px;
}

.project-category {
    display: inline-block;

    padding: 6px 12px;

    margin-bottom: 15px;

    background: var(--light-purple);

    color: var(--purple);

    border-radius: 30px;

    font-size: 12px;

    font-weight: 700;
}

.project-content h3 {
    color: var(--navy);

    font-size: 24px;

    margin-bottom: 12px;
}

.project-content p {
    color: #666;

    line-height: 1.7;

    margin-bottom: 20px;
}

.project-link {
    color: var(--purple);

    font-weight: 700;
}

.project-link:hover {
    text-decoration: underline;
}


/* CTA */

.cta {
    padding: 90px 8%;

    background: var(--purple);

    color: white;

    text-align: center;
}

.cta-content {
    max-width: 750px;

    margin: auto;
}

.cta-content > p:first-child {
    font-size: 13px;

    font-weight: 700;

    letter-spacing: 2px;

    margin-bottom: 15px;
}

.cta h2 {
    font-size: 45px;

    line-height: 1.2;

    margin-bottom: 20px;
}

.cta-content > p:nth-of-type(2) {
    color: #e8e6ff;

    margin-bottom: 30px;
}

.cta-btn {
    background: white;

    color: var(--purple);
}

.cta-btn:hover {
    background: #f2f2f2;

    transform: translateY(-3px);
}


/* Blog */

.blog {
    background: var(--light-bg);
}

.blog-grid {
    max-width: 1100px;

    margin: auto;

    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 25px;
}

.blog-card {
    background: white;

    border: 1px solid var(--border);

    border-radius: 15px;

    overflow: hidden;

    transition: 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-7px);

    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.blog-card > img {
    width: 100%;
    height: 210px;

    object-fit: cover;
}

.blog-content {
    padding: 25px;
}

.blog-content > span {
    color: var(--purple);

    font-size: 12px;

    font-weight: 700;

    text-transform: uppercase;
}

.blog-content h3 {
    color: var(--navy);

    font-size: 21px;

    margin: 12px 0;
}

.blog-content p {
    color: #666;

    line-height: 1.7;

    margin-bottom: 18px;
}

.blog-content a {
    color: var(--purple);

    font-weight: 700;
}

.blog-content a:hover {
    text-decoration: underline;
}


/* Contact */

.contact {
    background: white;
}

.contact-wrapper {
    max-width: 1100px;

    margin: auto;

    display: grid;

    grid-template-columns: 0.8fr 1.2fr;

    gap: 70px;
}

.contact-details h3 {
    color: var(--navy);

    font-size: 30px;

    margin-bottom: 15px;
}

.contact-details > p {
    color: #666;

    line-height: 1.7;

    margin-bottom: 30px;
}

.contact-item {
    padding: 18px 0;

    border-bottom: 1px solid #eee;
}

.contact-item strong {
    display: block;

    margin-bottom: 5px;
}

.contact-item span {
    color: #666;
}


/* Contact form */

.contact-form {
    padding: 35px;

    background: var(--light-bg);

    border-radius: 15px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;

    margin-bottom: 8px;

    font-weight: 700;
}

.form-group input,
.form-group textarea {
    width: 100%;

    padding: 14px;

    border: 1px solid #ddd;

    border-radius: 7px;

    background: white;

    outline: none;

    transition: 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--purple);
}

.form-group textarea {
    height: 150px;

    resize: vertical;
}

.form-group small {
    display: block;

    color: #d93025;

    margin-top: 5px;
}

.contact-form button {
    padding: 14px 25px;

    border: none;

    border-radius: 7px;

    background: var(--purple);

    color: white;

    font-weight: 700;

    cursor: pointer;

    transition: 0.3s ease;
}

.contact-form button:hover {
    background: var(--purple-dark);

    transform: translateY(-2px);
}

#form-message {
    margin-top: 15px;

    font-weight: 700;
}


/* Footer */

.footer {
    padding: 70px 8% 25px;

    background: #111;

    color: white;
}

.footer-content {
    max-width: 1100px;

    margin: auto;

    padding-bottom: 50px;

    display: grid;

    grid-template-columns: 2fr 1fr 1fr;

    gap: 60px;
}

.footer-brand p {
    max-width: 350px;

    color: #aaa;

    line-height: 1.7;

    margin-top: 15px;
}

.footer-links {
    display: flex;

    flex-direction: column;

    gap: 10px;
}

.footer-links h3 {
    margin-bottom: 10px;
}

.footer-links a {
    color: #aaa;

    transition: 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    max-width: 1100px;

    margin: auto;

    padding-top: 25px;

    border-top: 1px solid #333;

    display: flex;

    justify-content: space-between;

    gap: 20px;

    color: #888;

    font-size: 14px;
}


/* Small animation */

.reveal {
    opacity: 0;

    transform: translateY(30px);

    transition:
        opacity 0.7s ease,
        transform 0.7s ease;
}

.reveal.show {
    opacity: 1;

    transform: translateY(0);
}


/* Tablet */

@media (max-width: 900px) {

    section {
        padding: 80px 6%;
    }

    .header {
        min-height: 80px;

        padding: 20px 6%;

        gap: 20px;
    }

    .nav-links {
        gap: 18px;

        flex-wrap: wrap;

        justify-content: center;
    }

    .hero {
        min-height: auto;

        grid-template-columns: 1fr;

        padding: 80px 6%;

        gap: 55px;

        text-align: center;
    }

    .hero-content {
        max-width: 700px;

        margin: auto;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero > img {
        width: 300px;
        height: 380px;

        justify-self: center;

        margin-right: 0;

        box-shadow: 20px -20px 0 var(--navy);
    }

    .about-content {
        grid-template-columns: 1fr;

        gap: 40px;
    }

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

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

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

    .contact-wrapper {
        grid-template-columns: 1fr;

        gap: 40px;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}


/* Phone */

@media (max-width: 600px) {

    section {
        padding: 70px 5%;
    }

    .header {
        padding: 18px 5%;

        flex-direction: column;

        gap: 18px;
    }

    .header nav {
        width: 100%;

        justify-content: center;
    }

    .nav-links {
        gap: 10px;

        justify-content: center;
    }

    .nav-links a {
        font-size: 13px;
    }

    .nav-links li:last-child a {
        padding: 9px 14px;
    }

    .hero {
        padding: 70px 5%;

        gap: 45px;
    }

    .hero h1 {
        font-size: 45px;

        letter-spacing: -2px;
    }

    .hero h2 {
        font-size: 23px;
    }

    .hero-description {
        font-size: 16px;
    }

    .hero-buttons {
        flex-direction: column;

        align-items: center;
    }

    .hero-buttons .btn {
        width: 200px;
    }

    .hero > img {
        width: 250px;
        height: 320px;

        margin-right: 0;

        box-shadow: 16px -16px 0 var(--navy);
    }

    .section-heading h2 {
        font-size: 35px;
    }

    .about > h1 {
        font-size: 38px;
    }

    .about-text h3 {
        font-size: 27px;
    }

    .services-content h1 {
        font-size: 38px;
    }

    .projects > h2,
    .blog > h2,
    .contact > h2 {
        font-size: 38px;
    }

    .project-image {
        height: 220px;
    }

    .cta h2 {
        font-size: 35px;
    }

    .contact-form {
        padding: 25px;
    }

    .footer-content {
        grid-template-columns: 1fr;

        gap: 35px;
    }

    .footer-bottom {
        flex-direction: column;
    }
}