/* =========================================
   ZMIENNE I BAZA
   ========================================= */
:root {
    --bg-main: #1d2021;
    --bg-surface: #282828;
    --text-main: #ebdbb2;
    --text-muted: #928374;
    --accent: #debc7a; /* Zgaszony, musztardowy żółty */
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    padding: 20px;
    margin: 0;
    
    /* Wyśrodkowanie całej zawartości na ekranie */
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* =========================================
   GŁÓWNY KONTENER
   ========================================= */
.links-wrapper {
    width: 100%;
    max-width: 1000px;
}

/* =========================================
   NAGŁÓWEK PROFILU
   ========================================= */
.profile-header {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-bottom: 45px;
    position: relative;
    z-index: 10;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    object-fit: cover;
    flex-shrink: 0;
    /* Charakterystyczne ścięte rogi */
    clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
}

.profile-info h1 {
    color: var(--text-main);
    font-size: 1.8rem;
    margin: 0;
    letter-spacing: 1px;
}

/* =========================================
   SIATKA KAFELKÓW (BENTO GRID)
   ========================================= */
.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.tile-link {
    background: rgba(255, 255, 255, 0.04);
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
    padding: 30px 25px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; 
    position: relative;
    aspect-ratio: 4 / 3;
    transition: transform 0.3s ease-in-out, filter 0.3s ease-in-out;
}

/* Dynamiczne tło z obrazka wpisanego w kod HTML */
.tile-link::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.6) 35%, rgba(0, 0, 0, 0.1) 100%), var(--bg-img);
    background-size: cover;
    background-position: center;
    opacity: 0;
    z-index: 0;
    transition: opacity 0.3s ease-in-out;
}

.tile-title {
    position: relative;
    z-index: 1;
    font-size: 2rem; 
    color: var(--text-main);
    margin: 0;
    font-weight: 400;
    transition: color 0.3s, text-shadow 0.3s;
    text-shadow: none; 
}

/* Wyróżniony, duży kafelek (CV) */
.tile-cv {
    grid-column: span 3; 
    padding: 45px 35px;
    background: rgba(255, 255, 255, 0.06); 
    clip-path: polygon(25px 0, 100% 0, 100% calc(100% - 25px), calc(100% - 25px) 100%, 0 100%, 0 25px);
    aspect-ratio: auto;
    min-height: 260px;
}

.tile-cv .tile-title {
    font-size: 3rem; 
}

/* =========================================
   EFEKTY HOVER (Po najechaniu myszką)
   ========================================= */
.tile-link:hover {
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
    transform: translateY(-3px); 
}

.tile-link:hover::before {
    opacity: 1; /* Płynne ukazanie ukrytego obrazka w tle */
}

.tile-link:hover .tile-title {
    color: var(--accent); 
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9), 0 4px 15px rgba(0, 0, 0, 0.8);
}

/* =========================================
   RESPONSYWNOŚĆ (TELEFONY I MNIEJSZE EKRANY)
   ========================================= */
@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
    
    .tile-cv {
        grid-column: span 1;
        padding: 35px 20px;
        aspect-ratio: 4 / 3;
        min-height: auto;
    }

    .tile-cv .tile-title {
        font-size: 2.4rem;
    }
}