/* Theme variables */
:root {
    --nord0: #232631;
    --nord1: #2e3440;
    --nord2: #434c5e;
    --nord3: #4c566a;
    --nord4: #d8dee9;
    --nord8: #88c0d0;
    --nord10: #5e81ac;
    --nord11: #bf616a;
    --nord12: #a3be8c;
    --nord13: #ebcb8b;
    --nord14: #d08770;
    --nord15: #b48ead;
}

body {
    background: var(--nord0);
    color: var(--nord4);
    font-family: 'JetBrains Mono', 'Fira Mono', 'Menlo', 'Consolas', 'Monaco', monospace;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.cv-container {
    max-width: 600px;
    width: 100%;
    margin: 0;
    padding: 1.5rem 2rem 0.5rem 2rem;
    border-radius: 4px;
    box-sizing: border-box;
    border: none;
}

.profile-photo {
    width: 120px;
    height: 120px;
    border-radius: 5px;
    background: url('me-2.jpg') center center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--nord0);
    font-size: 1.7rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    margin-left: auto;
    margin-right: auto;
    font-family: inherit;
}

.name {
    font-size: 2rem;
    font-weight: 700;
    color: var(--nord4);
    text-align: center;
    margin-bottom: 0.2rem;
    letter-spacing: 0.5px;
}

.title {
    font-size: 1.1rem;
    color: var(--nord8);
    text-align: center;
    margin-bottom: 1.2rem;
    font-weight: 500;
}

section {
    margin-bottom: 1.7rem;
}

h2 {
    font-size: 1rem;
    color: var(--nord10);
    margin-bottom: 0.7rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 600;
}

ul {
    padding-left: 0;
    list-style: none;
    margin: 0;
}

ul li {
    margin-bottom: 0.7rem;
    padding-left: 0;
    color: var(--nord4);
    font-size: 1rem;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.skill {
    background: var(--nord3);
    color: var(--nord4);
    border-radius: 2px;
    padding: 0.25rem 0.7rem;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
}

.skill a {
    text-decoration: none !important;
    color: inherit;
    display: inline-block;
    width: 100%;
    height: 100%;
}

.skill:hover,
.skill:focus {
    background: var(--nord8);
    color: var(--nord0);
    box-shadow: 0 2px 8px rgba(136, 192, 208, 0.15);
}

.skill2 {
    background: var(--nord4);
    color: var(--nord0);
    border-radius: 2px;
    padding: 0.25rem 0.7rem;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.summary {
    font-size: 1.05rem;
    color: var(--nord4);
    opacity: 0.95;
    margin-bottom: 0.5rem;
}

.summary a {
    color: var(--nord8);
    text-decoration: underline;
}

.now-updated {
    display: block;
    color: var(--nord3);
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    margin-top: 1rem;
}

.now-desc {
    display: block;
    color: var(--nord3);
    font-size: 0.85rem;
    margin-bottom: 1.7rem;
}

.now-desc a {
    color: var(--nord8);
    text-decoration: underline;
}

.now-list li::before {
    content: '▸ ';
    color: var(--nord8);
}

.now-list li {
    padding-left: 0.25rem;
}

.nav-links a {
    background: none;
    color: var(--nord4) !important;
    border-radius: 0;
    padding: 0.3rem 0.9rem;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-decoration: none !important;
    transition: color 0.2s;
    margin: 0 0.1rem;
    display: inline-block;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: nowrap;
    margin-bottom: 0.5rem !important;
}

.nav-links a:hover,
.nav-links a:focus {
    color: var(--nord8) !important;
    text-decoration: none !important;
}

.projects-list a {
    background: var(--nord3);
    color: var(--nord4);
    border-radius: 2px;
    padding: 0.25rem 0.7rem;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-decoration: none !important;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
    display: inline-block;
}

.projects-list a:hover,
.projects-list a:focus {
    background: var(--nord8);
    color: var(--nord0);
    box-shadow: 0 2px 8px rgba(136, 192, 208, 0.15);
}

.projects-list .project-title {
    background: var(--nord3);
    color: var(--nord4);
    border-radius: 2px;
    padding: 0.25rem 0.7rem;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    display: inline-block;
}

.tool-label {
    display: inline-block;
    background: var(--nord3);
    color: var(--nord4);
    border-radius: 2px;
    padding: 0.18rem 0.6rem;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    margin-left: 0.4rem;
    opacity: 0.95;
    border: none;
    cursor: default;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    user-select: none;
}

.tool-label.php {
    background: var(--nord15);
    color: #232631;
}

.tool-label.mysql {
    background: var(--nord13);
    color: #232631;
}

.tool-label.html {
    background: var(--nord14);
    color: #232631;
}

.tool-label.css {
    background: var(--nord10);
    color: #232631;
}

.tool-label.docker {
    background: var(--nord8);
    color: #232631;
}

.tool-label.proxmox {
    background: var(--nord14);
    color: #232631;
}

.tool-label.ubuntu {
    background: var(--nord14);
    color: #232631;
}

.tool-label.mariadb {
    background: var(--nord12);
    color: #232631;
}

.blog-title-link {
    display: inline-block;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--nord8) !important;
    background: none;
    text-decoration: none !important;
    letter-spacing: 0.5px;
    margin-bottom: 0.1rem;
    border-radius: 2px;
    padding: 0.1rem 0.2rem;
}

.blog-post-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--nord4);
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
    line-height: 1.2;
}

.photo-container {
    max-width: 900px;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.photo-grid img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 3px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    display: block;
}

.photo-grid img:hover,
.photo-grid img:focus {
    border-color: var(--nord8);
    box-shadow: 0 0 12px rgba(136, 192, 208, 0.25);
    transform: scale(1.01);
    outline: none;
}

.photo-grid figure {
    margin: 0;
    display: flex;
    flex-direction: column;
}

.photo-grid figcaption {
    font-size: 0.7rem;
    line-height: 1.35;
    text-align: center;
    color: var(--nord4);
    opacity: 0.9;
    margin-top: 0.35rem;
    word-break: break-word;
}

.cap-name {
    color: var(--nord4);
}

.cap-loc {
    color: var(--nord8);
    text-decoration: none;
}

.cap-loc:hover,
.cap-loc:focus {
    text-decoration: underline;
}

.cap-time {
    color: var(--nord3);
}

.lightbox-meta {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(35, 38, 49, 0.6);
    border: 1px solid var(--nord3);
    border-radius: 3px;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    line-height: 1.5;
    text-align: center;
    max-width: 80vw;
    pointer-events: none;
}

.lightbox-meta .cap-loc {
    pointer-events: auto;
}

.lightbox-meta[hidden] {
    display: none;
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(35, 38, 49, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.lightbox[hidden] {
    display: none;
}

.lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border: 1px solid var(--nord3);
    border-radius: 3px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.15s ease;
}

.lightbox img.loaded {
    opacity: 1;
}

.lightbox-btn {
    position: absolute;
    background: var(--nord3);
    color: var(--nord4);
    border: none;
    border-radius: 2px;
    width: 3rem;
    height: 3rem;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    font-family: inherit;
}

.lightbox-btn:hover,
.lightbox-btn:focus {
    background: var(--nord8);
    color: var(--nord0);
    outline: none;
}

#lightbox-prev {
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

#lightbox-next {
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-close {
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.2rem;
}

@media (max-width: 600px) {
    .cv-container {
        padding: 1.25rem 1rem 0.5rem 1rem;
    }

    .nav-links {
        gap: 0.4rem;
        flex-wrap: nowrap;
    }

    .nav-links a {
        font-size: 0.72rem;
        letter-spacing: 0;
        padding: 0.2rem 0.25rem;
        margin: 0;
        white-space: nowrap;
    }

    .lightbox img {
        max-width: 94vw;
        max-height: 88vh;
    }

    .lightbox-btn {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.4rem;
    }

    .lightbox-close {
        width: 2rem;
        height: 2rem;
        font-size: 1rem;
    }

    #lightbox-prev {
        left: 0.5rem;
    }

    #lightbox-next {
        right: 0.5rem;
    }
}
