/* --- Variables & Reset --- */
:root {
    --bg-color: #ffffff;
    --bg-alt: #f8f9fa;
    --text-main: #1a1a1a;
    --text-muted: #555555;
    --accent: #2563eb;       /* Primary brand color */
    --accent-hover: #1d4ed8;
    --border-color: #e5e7eb;
    --max-width: 1100px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-color);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: var(--max-width);
    margin: 0 auto;
}

/* --- Navigation --- */
.navbar {
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-main);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-main);
}


.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 4px;
  text-decoration: none;
  position: relative;
  top: 2px; /* Nudges the flag slightly lower—adjust to 1px–4px as needed */
  transition: transform 0.15s ease;
}

.lang-switch:hover {
  transform: scale(1.05);
}

.lang-switch svg {
  display: block;
  border-radius: 2px;
}

.lang-switch svg.flag-pl {
  border: 1px solid #000000;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}




/* --- Hero Section --- */
.hero {
    padding: 6rem 0;
}

.subtitle {
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    line-height: 1.15;
    max-width: 750px;
    margin-bottom: 1.5rem;
}

.hero-desc {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.6rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-secondary:hover {
    border-color: var(--text-main);
}

/* --- Featured Projects --- */
.featured-projects {
    background-color: var(--bg-alt);
    padding: 5rem 0;
}

.featured-projects h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
}

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

.placeholder-img {
    height: 200px;
    background-color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-weight: 500;
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    margin-bottom: 0.5rem;
}

.card-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}

.card-link {
    text-decoration: none;
    color: var(--accent);
    font-weight: 600;
}

/* --- Footer --- */
footer {
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--bg-color);
        border-bottom: 1px solid var(--border-color);
        padding: 1.5rem 5%;
        gap: 1rem;
    }

    .nav-links.active {
        display: flex;
    }
}


.card-image {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem 1.5rem 0;
}

.card-image img {
    max-width: 100%;
    width: auto;
    height: 310px;
    object-fit: contain;
}



/* --- Project Showcase Page --- */
.project-showcase {
    padding: 4rem 0 5rem;
}

.back-link {
    display: inline-block;
    margin-bottom: 1.5rem;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.2s;
}

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

.project-showcase h1 {
    font-size: clamp(2rem, 4.5vw, 3rem);
    line-height: 1.2;
    margin-bottom: 1rem;
    max-width: 800px;
}

.project-lead {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 720px;
    margin-bottom: 2rem;
}

.project-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    max-width: 760px;
}

.project-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.feature-list li {
    position: relative;
    padding-left: 1.25rem;
    color: var(--text-muted);
}

.feature-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--accent);
}

.feature-list strong {
    color: var(--text-main);
}




/* --- Projects Overview List --- */
.projects-page {
    padding: 4rem 0 5rem;
}

.page-header {
    margin-bottom: 2.5rem;
}

.page-header p {
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.projects-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.project-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-color);
}

.project-info h2 {
    font-size: 1.25rem;
    margin-bottom: 0.35rem;
}

.project-info h2 a {
    text-decoration: none;
    color: var(--text-main);
}

.project-info h2 a:hover {
    color: var(--accent);
}

.project-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

@media (max-width: 640px) {
    .project-list-item {
        flex-direction: column;
        align-items: flex-start;
    }
}



.project-title-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin-bottom: 0.35rem;
}

.project-title-row h2 {
    margin-bottom: 0; /* Handled by .project-title-row */
}

.lang-tag {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent);
    background-color: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.25);
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    line-height: 1.3;
}



/* --- About Page --- */
.about {
    padding: 4rem 0 5rem;
}

.about-me h1 {
    font-size: clamp(2.1rem, 4.5vw, 3rem);
    line-height: 1.15;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.about-me p {
    font-size: 1.08rem;
    color: var(--text-muted);
    max-width: 68ch;
    line-height: 1.7;
}

/* Experience Section (Software & Languages) */
.about-software,
.about-section {
    margin-top: 2.75rem;
    padding-top: 2.25rem;
    border-top: 1px solid var(--border-color);
    max-width: 720px;
}

.about-software h2,
.about-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}

.about-software h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-top: 1.25rem;
    margin-bottom: 0.65rem;
}

.about-software h3:first-of-type {
    margin-top: 0;
}

.skill-tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.skill-tags li {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
    background-color: var(--bg-alt);
    border: 1px solid var(--border-color);
    padding: 0.38rem 0.85rem;
    border-radius: 999px;
    transition: border-color 0.2s, transform 0.2s, color 0.2s;
}

.skill-tags li:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
}

/* Contact & Social Links */
.contact-email {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.contact-email strong {
    color: var(--text-main);
    margin-right: 0.25rem;
}

.contact-email a {
    color: var(--accent);
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.contact-email a:hover {
    border-bottom-color: var(--accent);
}

.lang-switch {
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.lang-switch:hover {
    border-color: var(--accent);
}