@font-face {
    font-family: 'Space Grotesk';
    src: url('https://fonts.data.ixavence.org/Space-Grotesk.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}


/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Space Grotesk', sans-serif;
}

html,
body {
    overflow-x: hidden;
    /* Prevent horizontal scroll */
    position: relative;
    width: 100%;
}

html {
    scroll-behavior: smooth;
}

body {
    color: #1f2937;
    line-height: 1.5;
    background: linear-gradient(to bottom, #ffffff, #f9fafb);
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: 3rem;
    background: linear-gradient(to right, #111827, #374151, #111827);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

h2 {
    font-size: 2.5rem;
    background: linear-gradient(to right, #111827, #374151, #111827);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1rem;
}

p {
    color: #4b5563;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Header & Navigation */
header {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    height: 5rem;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.025em;
    z-index: 60;
    /* Keep logo above mobile menu */
}

nav {
    display: none;
}

nav a {
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    transition: color 0.2s ease;
    position: relative;
}

nav a:hover {
    color: #111827;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #111827;
    transition: width 0.2s ease;
}

nav a:hover::after {
    width: 100%;
}

/* Improved Mobile Menu Button */
.mobile-menu-button {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 60;
    /* Keep button above mobile menu */
    position: relative;
    width: 40px;
    height: 40px;
}

.hamburger {
    width: 24px;
    height: 20px;
    position: relative;
    margin: 0 auto;
    transform: rotate(0deg);
    transition: .3s ease-in-out;
}

.hamburger span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: #1f2937;
    border-radius: 9px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .2s ease-in-out;
    will-change: transform, opacity;
}

.hamburger span:nth-child(1) {
    top: 0px;
}

.hamburger span:nth-child(2),
.hamburger span:nth-child(3) {
    top: 9px;
}

.hamburger span:nth-child(4) {
    top: 18px;
}

/* Hamburger Animation */
.hamburger.open span:nth-child(1) {
    top: 9px;
    width: 0%;
    left: 50%;
}

.hamburger.open span:nth-child(2) {
    transform: rotate(45deg);
}

.hamburger.open span:nth-child(3) {
    transform: rotate(-45deg);
}

.hamburger.open span:nth-child(4) {
    top: 9px;
    width: 0%;
    left: 50%;
}

/* Improved Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu.active {
    visibility: visible;
    opacity: 1;
}

.mobile-menu nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: auto;
    gap: 2.5rem;
    text-align: center;
    width: 100%;
}

.mobile-menu a {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    position: relative;
    padding: 0.5rem 1rem;
    display: inline-block;
}

.mobile-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #111827;
    transition: width 0.3s ease, left 0.3s ease;
}

.mobile-menu a:hover::after {
    width: 100%;
    left: 0;
}

/* Social links in mobile menu */
.mobile-social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 3rem;
    justify-content: center;
}

.mobile-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #f3f4f6;
    border-radius: 50%;
    color: #4b5563;
    transition: all 0.3s ease;
}

.mobile-social-link:hover {
    background-color: #e5e7eb;
    color: #1f2937;
    transform: translateY(-3px);
}

/* Hero Section */
.hero {
    padding: 8rem 0;
}

.hero-grid {
    display: grid;
    gap: 1.5rem;
}

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #6b7280;
    font-weight: 300;
}

.hero-description {
    max-width: 600px;
    color: #4b5563;
    font-size: 1.125rem;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image-container {
    position: relative;
    height: 300px;
    width: 300px;
}

.hero-image-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, #3b82f6, #8b5cf6);
    border-radius: 9999px;
    opacity: 0.1;
    filter: blur(40px);
}

.hero-image-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

.hero-image-text {
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(to right, #111827, #374151, #111827);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* About Section */
.section-label {
    display: inline-block;
    background-color: #f3f4f6;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.section-title {
    margin-bottom: 1rem;
}

.section-description {
    max-width: 800px;
    margin: 0 auto;
    color: #4b5563;
    font-size: 1.125rem;
}

.features-grid {
    display: grid;
    gap: 2.5rem;
    margin: 3rem auto;
    max-width: 1200px;
}

.feature {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    background: linear-gradient(to bottom right, #f9fafb, #f3f4f6);
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.feature-description {
    color: #4b5563;
}

.quote {
    max-width: 700px;
    text-align: center;
    margin: 4rem auto 0;
    color: #4b5563;
    font-size: 1.125rem;
    font-style: italic;
}

/* Projects Section */
.projects-grid {
    display: grid;
    gap: 2rem;
    margin: 3rem auto;
    max-width: 1200px;
    padding: 0 1rem;
}

.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 5rem;
    height: 5rem;
    background: linear-gradient(to bottom right, #f9fafb, #f3f4f6);
    border-radius: 9999px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.card-subtitle {
    color: #6b7280;
    margin-bottom: 1rem;
}

.card-description {
    color: #4b5563;
}

/* Timeline Section */
.timeline {
    max-width: 768px;
    margin: 3rem auto;
}

.timeline-event {
    position: relative;
    padding-left: 2.5rem;
    padding-bottom: 2.5rem;
    border-left: 2px solid #e5e7eb;
}

.timeline-event:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -10px;
    top: 0;
    width: 20px;
    height: 20px;
    background: linear-gradient(to right, #1f2937, #374151);
    border-radius: 50%;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.timeline-card {
    padding: 2rem;
}

.timeline-date {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

/* Contact Section */
.contact-grid {
    display: grid;
    gap: 2.5rem;
    margin: 3rem auto;
    max-width: 1200px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    background: linear-gradient(to bottom right, #f9fafb, #f3f4f6);
    border-radius: 9999px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.contact-text {
    font-size: 1.125rem;
    font-weight: 500;
}

.contact-description {
    color: #4b5563;
    margin-top: 1.5rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-input {
    height: 3rem;
    width: 100%;
    padding: 0 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #1f2937;
}

.form-textarea {
    min-height: 150px;
    width: 100%;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.form-textarea:focus {
    outline: none;
    border-color: #1f2937;
}

/* Footer */
footer {
    width: 100%;
    border-top: 1px solid #e5e7eb;
    background-color: white;
    padding: 3rem 0;
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.footer-logo {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.025em;
}

.footer-tagline {
    font-size: 0.875rem;
    color: #6b7280;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-link {
    color: #6b7280;
    transition: color 0.2s ease;
}

.social-link:hover {
    color: #1f2937;
}

.copyright {
    font-size: 0.875rem;
    color: #6b7280;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem;
    /* przerwa między linkami */
    margin-top: 1rem;
}

.footer-link {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #1f2937;
    text-decoration: underline;
}


/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 3rem;
    padding: 0 2rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(to right, #111827, #1f2937);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn-primary:hover {
    background: linear-gradient(to right, #1f2937, #374151);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.btn-outline {
    background-color: white;
    border: 2px solid #e5e7eb;
    color: #1f2937;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-outline:hover {
    border-color: #d1d5db;
    background-color: #f9fafb;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn-icon {
    margin-left: 0.5rem;
}

/* Background Elements */
.bg-gradient {
    position: absolute;
    z-index: -10;
}

.bg-gradient-1 {
    top: 0;
    right: 0;
    width: 600px;
    height: 600px;
    background: linear-gradient(to bottom left, #dbeafe, #e0e7ff);
    border-radius: 9999px;
    opacity: 0.3;
    filter: blur(40px);
}

.bg-gradient-2 {
    bottom: 0;
    left: 0;
    width: 600px;
    height: 600px;
    background: linear-gradient(to top right, #dbeafe, #e0e7ff);
    border-radius: 9999px;
    opacity: 0.3;
    filter: blur(40px);
}

/* Responsive */
@media (min-width: 768px) {
    h1 {
        font-size: 4rem;
    }

    h2 {
        font-size: 3rem;
    }

    nav {
        display: flex;
        align-items: center;
        gap: 1.5rem;
    }

    .mobile-menu-button {
        display: none;
    }

    .hero-grid {
        grid-template-columns: 1fr 400px;
    }

    .hero-buttons {
        flex-direction: row;
    }

    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-container {
        flex-direction: row;
        justify-content: space-between;
    }
}

@media (min-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr 600px;
    }

    .hero-image-container {
        height: 500px;
        width: 500px;
    }

    .hero-image-text {
        font-size: 6rem;
    }
}

/* Fix for the projects grid on small screens */
@media (max-width: 767px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid .card[style*="grid-column: span 2"] {
        grid-column: span 1 !important;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.bg-white {
    background-color: white;
}

/* Project buttons styling */
.project-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.project-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.project-btn-main {
    background-color: #6d28d9;
    /* Purple color matching your theme */
    color: white;
    border: none;
}

.project-btn-main:hover {
    background-color: #5b21b6;
    /* Darker purple on hover */
}

.project-btn-secondary {
    background-color: transparent;
    color: #4b5563;
    /* Gray text color */
    border: 1px solid #e5e7eb;
    /* Light gray border */
}

.project-btn-secondary:hover {
    background-color: #f9fafb;
    /* Very light gray background on hover */
    color: #111827;
    /* Darker text on hover */
}

.project-btn-icon {
    margin-left: 8px;
}

/* Make the cards display as flex columns to push buttons to bottom */
.card {
    display: flex;
    flex-direction: column;
}

.card-description {
    flex-grow: 1;
    margin-bottom: 0;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .project-actions {
        flex-direction: column;
    }

    .project-btn {
        width: 100%;
    }
}