/* ------------------- */
/* GLOBAL STYLES       */
/* ------------------- */
:root {
    --background-color: #111827;
    --text-primary: #F9FAFB;
    --text-secondary: #9CA3AF;
    --accent-color: #38BDF8;
    --surface-color: #1F2937;

    --font-family-base: 'Inter', sans-serif;
    --font-family-heading: 'Roboto Mono', monospace;

    --container-width: 1140px;
    --container-padding: 24px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--background-color);
    color: var(--text-primary);
    font-family: var(--font-family-base);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

/* ------------------- */
/* HEADER              */
/* ------------------- */
.header {
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--surface-color);
}

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

.header__logo {
    font-family: var(--font-family-heading);
    font-size: 24px;
    font-weight: 500;
    color: var(--text-primary);
}

.nav__list {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav__link {
    font-size: 16px;
    color: var(--text-secondary);
    position: relative;
    padding: 4px 0;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.nav__link:hover::after {
    width: 100%;
}

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

.nav__link--cta {
    background-color: var(--accent-color);
    color: var(--background-color);
    padding: 8px 16px;
    border-radius: 6px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.nav__link--cta:hover {
    background-color: var(--text-primary);
    color: var(--background-color);
}

.nav__link--cta::after {
    display: none; /* No underline for CTA button */
}


/* ------------------- */
/* FOOTER              */
/* ------------------- */
.footer {
    background-color: var(--surface-color);
    padding-top: 60px;
    border-top: 1px solid #374151;
}

.footer__container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 60px;
}

.footer__logo {
    font-family: var(--font-family-heading);
    font-size: 28px;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: inline-block;
}

.footer__description {
    color: var(--text-secondary);
    max-width: 250px;
}

.footer__title {
    font-family: var(--font-family-heading);
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.footer__list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer__link {
    color: var(--text-secondary);
}

.footer__link:hover {
    color: var(--accent-color);
}

.footer__list--contacts .footer__item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.footer__icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    color: var(--accent-color);
}

.footer__bottom {
    padding: 20px 0;
    border-top: 1px solid #374151;
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}


/* ------------------- */
/* RESPONSIVE STYLES   */
/* ------------------- */

/* Tablet */
@media (max-width: 992px) {
    .nav__list {
        gap: 24px;
    }
    
    .footer__container {
        grid-template-columns: repeat(2, 1fr);
        gap: 50px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .header__nav {
        display: none; /* Burger menu will be implemented later */
    }

    .footer__container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer__column {
        text-align: center;
    }
    
    .footer__description {
        margin: 0 auto;
    }
    
    .footer__list--contacts .footer__item {
        justify-content: center;
    }
}
/* ------------------- */
/* HERO SECTION        */
/* ------------------- */
.hero {
    padding-top: 180px; /* Space for the fixed header */
    padding-bottom: 100px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;
}

.hero__title {
    font-family: var(--font-family-heading);
    font-size: 52px;
    line-height: 1.2;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.hero__description {
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 40px;
}

.hero__cta-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background-color: var(--accent-color);
    color: var(--background-color);
    font-size: 16px;
    font-weight: 500;
    padding: 14px 28px;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero__cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(56, 189, 248, 0.15);
    color: var(--background-color);
}

.hero__cta-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.hero__cta-button:hover .hero__cta-icon {
    transform: translateX(4px);
}

/* Terminal Animation Visual */
.terminal {
    background-color: var(--surface-color);
    border-radius: 12px;
    border: 1px solid #374151;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.terminal__header {
    background-color: #374151;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.terminal__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal__dot--red { background-color: #F87171; }
.terminal__dot--yellow { background-color: #FBBF24; }
.terminal__dot--green { background-color: #34D399; }

.terminal__body {
    padding: 24px;
    font-family: var(--font-family-heading);
    font-size: 18px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
}

.terminal__prompt {
    color: var(--accent-color);
    margin-right: 12px;
}

.terminal__cursor {
    display: inline-block;
    width: 10px;
    height: 20px;
    background-color: var(--accent-color);
    margin-left: 2px;
    animation: blink 1s steps(1) infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* Responsive adjustments for Hero */
@media (max-width: 992px) {
    .hero {
        padding-top: 140px;
        padding-bottom: 80px;
    }
    .hero__container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero__content {
        order: 2;
    }
    .hero__visual {
        order: 1;
        margin-bottom: 50px;
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }
    .hero__description {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 768px) {
    .hero__title {
        font-size: 36px;
    }
    .hero__description {
        font-size: 16px;
    }
}

/* ------------------- */
/* GENERIC SECTION HEADER */
/* ------------------- */
.section-header {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 60px;
}

.section-header__subtitle {
    display: inline-block;
    font-family: var(--font-family-heading);
    color: var(--accent-color);
    margin-bottom: 12px;
}

.section-header__title {
    font-family: var(--font-family-heading);
    font-size: 36px;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.section-header__description {
    font-size: 18px;
    color: var(--text-secondary);
}

/* ------------------- */
/* CASES SECTION       */
/* ------------------- */
.cases {
    padding: 100px 0;
    background-color: var(--surface-color);
}

.cases__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.case-card {
    background-color: var(--background-color);
    border: 1px solid #374151;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.case-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.case-card__image-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.case-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.case-card__content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Allows the content to fill the card height */
}

.case-card__category {
    display: inline-block;
    font-family: var(--font-family-heading);
    font-size: 14px;
    color: var(--accent-color);
    margin-bottom: 12px;
}

.case-card__title {
    font-size: 20px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.case-card__description {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 24px;
    flex-grow: 1; /* Pushes the tech-stack and link to the bottom */
}

.case-card__tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.case-card__tech-item {
    background-color: var(--surface-color);
    color: var(--text-secondary);
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid #374151;
}

.case-card__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--accent-color);
}

.case-card__link-icon {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.case-card__link:hover .case-card__link-icon {
    transform: translateX(4px);
}


/* Responsive adjustments for Cases */
@media (max-width: 992px) {
    .cases__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .cases {
        padding: 80px 0;
    }
    .section-header__title {
        font-size: 32px;
    }
    .cases__grid {
        grid-template-columns: 1fr;
    }
}

/* ------------------- */
/* TECHNOLOGIES SECTION*/
/* ------------------- */
.technologies {
    padding: 100px 0;
}

.technologies__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.tech-item {
    background-color: var(--surface-color);
    padding: 32px;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.tech-item:hover {
    border-color: var(--accent-color);
    background-color: #1f2937d1;
}

.tech-item__icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: var(--background-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    border: 1px solid #374151;
}

.tech-item__icon {
    width: 32px;
    height: 32px;
    color: var(--accent-color);
}

.tech-item__title {
    font-size: 20px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.tech-item__description {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

/* Responsive adjustments for Technologies */
@media (max-width: 992px) {
    .technologies__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .technologies {
        padding: 80px 0;
    }
    .technologies__grid {
        grid-template-columns: 1fr;
    }
    .tech-item {
        padding: 24px;
    }
}
/* ------------------- */
/* PROCESS SECTION     */
/* ------------------- */
.process {
    padding: 100px 0;
    background-color: var(--surface-color);
}

.process__steps-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px 60px;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

/* Decorative line */
.process__steps-wrapper::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: calc(100% - 50px);
    background-color: #374151;
    display: none; /* Hidden for now, will enable on desktop */
}

.process-step {
    padding: 20px;
    position: relative;
}

/* Alternating sides for the timeline effect */
.process__steps-wrapper > .process-step:nth-child(odd) {
    grid-column: 1;
    text-align: right;
}
.process__steps-wrapper > .process-step:nth-child(even) {
    grid-column: 2;
    text-align: left;
}

.process-step__number {
    font-family: var(--font-family-heading);
    font-size: 64px;
    font-weight: 700;
    color: rgba(249, 250, 251, 0.1);
    line-height: 1;
    margin-bottom: 8px;
}

.process-step__title {
    font-size: 22px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.process-step__description {
    color: var(--text-secondary);
    font-size: 15px;
}


/* Responsive adjustments for Process */
@media (max-width: 768px) {
    .process {
        padding: 80px 0;
    }
    .process__steps-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .process__steps-wrapper > .process-step:nth-child(odd),
    .process__steps-wrapper > .process-step:nth-child(even) {
        grid-column: 1;
        text-align: left;
        padding-left: 0;
        padding-right: 0;
    }
}

/* ------------------- */
/* ARTICLES SECTION    */
/* ------------------- */
.articles {
    padding: 100px 0;
}

.articles__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.article-card {
    background-color: var(--surface-color);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #374151;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.article-card__link-wrapper {
    display: block;
    color: inherit;
    text-decoration: none;
}

.article-card__link-wrapper:hover .article-card__title {
    color: var(--accent-color);
}

.article-card__image-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.article-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.article-card:hover .article-card__image {
    transform: scale(1.05);
}

.article-card__content {
    padding: 24px;
}

.article-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.article-card__category {
    color: var(--accent-color);
    font-family: var(--font-family-heading);
}

.article-card__title {
    font-size: 20px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.article-card__excerpt {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

/* Responsive adjustments for Articles */
@media (max-width: 992px) {
    .articles__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .articles {
        padding: 80px 0;
    }
    .articles__grid {
        grid-template-columns: 1fr;
    }
}
/* ------------------- */
/* CONTACT SECTION     */
/* ------------------- */
.contact {
    padding: 100px 0;
    background-color: var(--surface-color);
}

.contact__wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    max-width: 1000px;
    margin: 0 auto;
    background-color: var(--background-color);
    padding: 48px;
    border-radius: 16px;
    border: 1px solid #374151;
}

.contact__info-title {
    font-size: 24px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.contact__info-text {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.contact__info-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact__info-item {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-secondary);
}

.contact__info-item a {
    color: var(--text-secondary);
}
.contact__info-item a:hover {
    color: var(--accent-color);
}

.contact__info-icon {
    width: 20px;
    height: 20px;
    color: var(--accent-color);
    flex-shrink: 0;
}


/* Form Styles */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-size: 14px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--surface-color);
    border: 1px solid #374151;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 16px;
    font-family: var(--font-family-base);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.form-group--checkbox {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

.form-group--checkbox input[type="checkbox"] {
    width: 1.2em;
    height: 1.2em;
    accent-color: var(--accent-color);
}

.contact-form__submit {
    padding: 14px 28px;
    background-color: var(--accent-color);
    color: var(--background-color);
    font-size: 16px;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 12px;
    transition: background-color 0.3s ease;
}

.contact-form__submit:hover {
    background-color: var(--text-primary);
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 40px;
    border: 1px solid #374151;
    border-radius: 12px;
}

.success-message__icon {
    width: 48px;
    height: 48px;
    color: #34D399; /* Green color for success */
    margin-bottom: 16px;
}

.success-message__title {
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.success-message__text {
    color: var(--text-secondary);
}

/* Responsive adjustments for Contact */
@media (max-width: 992px) {
    .contact__wrapper {
        grid-template-columns: 1fr;
        padding: 32px;
    }
}
@media (max-width: 768px) {
    .contact {
        padding: 80px 0;
    }
}

/* ------------------- */
/* COOKIE POPUP        */
/* ------------------- */
.cookie-popup {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(200%); /* Initially hidden */
    max-width: 600px;
    width: calc(100% - 40px);
    background-color: var(--surface-color);
    padding: 20px 24px;
    border: 1px solid #374151;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    z-index: 2000;
    transition: transform 0.5s ease-in-out;
}

.cookie-popup--visible {
    transform: translateX(-50%) translateY(0);
}

.cookie-popup__text {
    color: var(--text-secondary);
    font-size: 15px;
}

.cookie-popup__link {
    color: var(--accent-color);
    text-decoration: underline;
}

.cookie-popup__link:hover {
    color: var(--text-primary);
}

.cookie-popup__button {
    background-color: var(--accent-color);
    color: var(--background-color);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    flex-shrink: 0;
    transition: background-color 0.3s ease;
}

.cookie-popup__button:hover {
    background-color: var(--text-primary);
}

/* Responsive adjustments for Cookie Popup */
@media (max-width: 768px) {
    .cookie-popup {
        flex-direction: column;
        text-align: center;
    }
}

/* ------------------- */
/* PAGES (PRIVACY, ETC.) */
/* ------------------- */
.pages {
    padding-top: 140px; /* Space for the fixed header */
    padding-bottom: 100px;
    color: var(--text-secondary);
}

.pages .container {
    max-width: 800px; /* Narrower width for better readability */
}

.pages h1,
.pages h2 {
    font-family: var(--font-family-heading);
    color: var(--text-primary);
    line-height: 1.3;
}

.pages h1 {
    font-size: 42px;
    margin-bottom: 32px;
    border-bottom: 1px solid #374151;
    padding-bottom: 16px;
}

.pages h2 {
    font-size: 28px;
    margin-top: 48px;
    margin-bottom: 20px;
}

.pages p {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 20px;
}

.pages ul {
    list-style: disc;
    padding-left: 24px;
    margin-bottom: 20px;
}

.pages li {
    margin-bottom: 12px;
    padding-left: 8px;
}

.pages a {
    color: var(--accent-color);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.pages a:hover {
    text-decoration: none;
    color: var(--text-primary);
}

.pages strong {
    color: var(--text-primary);
    font-weight: 500;
}