:root {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-main: #e0e0e0;
    --text-muted: #b0b0b0;
    --accent: #ff7700; 
    --status-color: #00ccff; 
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --linkedin-color: #0a66c2;
    --github-color: #ffffff;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    position: relative;
}

body.lang-en .pl { display: none !important; }
body.lang-pl .en { display: none !important; }

.lang-switch {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    background: rgba(30, 30, 30, 0.8);
    padding: 4px;
    border-radius: 30px;
    border: 1px solid #333;
    backdrop-filter: blur(5px);
    z-index: 100;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.lang-btn {
    background: transparent;
    border: none;
    color: #666;
    padding: 6px 16px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.lang-btn:hover { color: #fff; }

.lang-btn.active {
    background: var(--accent);
    color: #121212;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

header {
    padding: 4rem 1rem 3rem 1rem;
    text-align: center;
    background: linear-gradient(180deg, rgba(0,0,0,0.95) 0%, rgba(18,18,18,1) 100%);
    border-bottom: 2px solid var(--accent);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 800;
    color: #fff;
}

h1 span { color: var(--accent); }

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

.intro-text {
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1rem;
}

section { margin-bottom: 5rem; }

.section-title {
    font-size: 2.2rem;
    border-left: 5px solid var(--accent);
    padding-left: 1rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    color: var(--text-main);
    font-weight: 800;
}

.company-name {
    color: var(--accent);
    font-size: 1.1rem;
    display: block;
    margin-bottom: 2.5rem;
    padding-left: 1.4rem;
    font-weight: 600;
    opacity: 0.9;
    letter-spacing: 0.5px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid #333;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    position: relative;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(255, 119, 0, 0.15);
    border-color: var(--accent);
}

.badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.7rem;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.badge-ue { background-color: var(--accent); color: #000; }
.badge-unity { background-color: #555; color: #fff; }

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center;
    border-bottom: 1px solid #333;
    background-color: #000;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #000;
    border-bottom: 1px solid #333;
}
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
    color: #fff;
    text-wrap: balance;
    line-height: 1.3;
}

.status-info {
    font-size: 0.85rem;
    color: var(--status-color);
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #333;
    font-style: italic;
    line-height: 1.4;
}

.status-info strong {
    color: #fff;
    font-style: normal;
}

.card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.card-buttons {
    margin-top: auto;
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    background-color: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
    padding: 0.6rem 1rem;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 0.8rem;
    text-align: center;
    transition: all 0.3s ease;
    border-radius: 4px;
    flex-grow: 1;
    cursor: pointer;
}
.btn:hover { background-color: var(--accent); color: #121212; }

.card.small { max-width: 600px; margin: 0 auto; width: 100%; opacity: 0.9; }
.btn-muted { border-color: #666; color: #aaa; }
.btn-muted:hover { background-color: #666; color: #fff; }

footer {
    text-align: center;
    padding: 3rem 1rem;
    background-color: #0d0d0d;
    border-top: 1px solid #333;
    color: #555;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.social-links {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
}

.social-group {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #181818;
    padding: 10px;
    border-radius: 50%;
    border: 1px solid #333;
    transition: all 0.3s ease;
    cursor: pointer;
    width: 48px;
    height: 48px;
}

.social-group:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    transition: all 0.3s ease;
    width: 24px;
    height: 24px;
    text-decoration: none;
}

.social-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
    stroke-width: 0;
}

.social-group:hover .social-icon.email { color: var(--accent); }
.social-group:hover .social-icon.linkedin { color: var(--linkedin-color); }
.social-group:hover .social-icon.github { color: var(--github-color); }

.tooltip-text {
    visibility: hidden;
    background-color: var(--accent);
    color: #000;
    text-align: center;
    border-radius: 4px;
    padding: 5px 10px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s, bottom 0.3s;
    font-size: 0.75rem;
    font-weight: bold;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--accent) transparent transparent transparent;
}

.social-group.show-tooltip .tooltip-text {
    visibility: visible;
    opacity: 1;
    bottom: 135%;
}

#personal-projects-section .projects-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

#personal-projects-section .card {
    flex: 1 1 350px;
    max-width: 450px;
}

@media (max-width: 768px) {
    .lang-switch { top: 10px; right: 10px; }
    h1 { font-size: 2rem; }
    .section-title { font-size: 1.6rem; }
    #personal-projects-section .card {
        max-width: 100%;
    }
}