/* Link Front Page — public stylesheet */

:root {
    --lfp-bg: #0f172a;
    --lfp-fg: #f1f5f9;
    --lfp-muted: #94a3b8;
    --lfp-card: #1e293b;
    --lfp-card-hover: #334155;
    --lfp-accent: #3b82f6;
    --lfp-radius: 16px;
    --lfp-page-max: 640px;
    --lfp-pad-top: 56px;
    --lfp-pad-bot: 80px;
    --lfp-pad-x: 20px;
    --lfp-card-gap: 14px;
    --lfp-card-py: 14px;
    --lfp-card-px: 18px;
    --lfp-icon: 44px;
    --lfp-photo: 120px;
    --lfp-photo-radius: 999px;
    --lfp-logo: 96px;
    --lfp-logo-radius: 999px;
    --lfp-font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --lfp-title-size: 1.75rem;
    --lfp-subtitle-size: 1rem;
    --lfp-cat-title-size: 1.15rem;
    --lfp-link-title-size: 1rem;
    --lfp-body-size: 0.95rem;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--lfp-font);
    background-color: var(--lfp-bg);
    color: var(--lfp-fg);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Background image is rendered through fixed pseudo-elements so the
   blur/brightness/saturation filters only apply to the picture, not the
   text content above it. The overlay sits on top with rgba alpha. */
body.has-lfp-bg::before,
body.has-lfp-bg::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

body.has-lfp-bg::before {
    background-image:    var(--lfp-bg-image);
    background-size:     var(--lfp-bg-size, cover);
    background-repeat:   var(--lfp-bg-repeat, no-repeat);
    background-position: var(--lfp-bg-position, center);
    filter: blur(var(--lfp-bg-blur, 0px)) var(--lfp-bg-filter, none);
    z-index: -2;
}

body.has-lfp-bg::after {
    background-color: var(--lfp-bg-overlay, transparent);
    opacity: var(--lfp-bg-overlay-alpha, 0);
}

.lfp-page {
    max-width: var(--lfp-page-max);
    margin: 0 auto;
    padding: var(--lfp-pad-top) var(--lfp-pad-x) var(--lfp-pad-bot);
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.lfp-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.lfp-logo {
    width: var(--lfp-logo);
    height: var(--lfp-logo);
    border-radius: var(--lfp-logo-radius);
    object-fit: var(--lfp-logo-fit, cover);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.lfp-title {
    margin: 0;
    font-size: var(--lfp-title-size);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.lfp-subtitle {
    margin: 0;
    color: var(--lfp-muted);
    font-size: var(--lfp-subtitle-size);
    max-width: 36ch;
}

.lfp-list {
    display: flex;
    flex-direction: column;
    gap: var(--lfp-card-gap);
}

/* ----------------------------------- About section */

.lfp-about {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
    padding: 22px;
    background: color-mix(in srgb, var(--lfp-card) 60%, transparent);
    border: 1px solid color-mix(in srgb, var(--lfp-fg) 8%, transparent);
    border-radius: calc(var(--lfp-radius) + 4px);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.lfp-about-photo {
    width: var(--lfp-photo);
    height: var(--lfp-photo);
    border-radius: var(--lfp-photo-radius);
    object-fit: var(--lfp-photo-fit, cover);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);
}

.lfp-about-text {
    margin: 0;
    color: var(--lfp-fg);
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 50ch;
    white-space: pre-line;
}

.lfp-socials {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.lfp-contact-info-wrap {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 6px;
}

.lfp-contact-info {
    flex: 1 1 240px;
    min-width: 0;
    margin: 0;
    padding: 14px 16px;
    background: color-mix(in srgb, var(--lfp-card) 60%, transparent);
    border: 1px solid color-mix(in srgb, var(--lfp-fg) 8%, transparent);
    border-radius: var(--lfp-radius);
    text-align: left;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 12px;
    font-size: 0.9rem;
}

.lfp-contact-info dt {
    color: var(--lfp-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    align-self: center;
}

.lfp-contact-info dd {
    margin: 0;
    color: var(--lfp-fg);
    overflow-wrap: anywhere;
}

.lfp-contact-info dd a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted color-mix(in srgb, var(--lfp-accent) 60%, transparent);
}

.lfp-contact-info dd a:hover {
    color: var(--lfp-accent);
}

.lfp-contact-info .lfp-contact-name {
    font-weight: 600;
    color: var(--lfp-fg);
}

.lfp-contact-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
}

.lfp-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 999px;
    background: var(--lfp-card);
    color: var(--lfp-fg);
    text-decoration: none;
    border: 1px solid color-mix(in srgb, var(--lfp-fg) 10%, transparent);
    font-size: 0.88rem;
    font-weight: 500;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.lfp-contact-btn:hover,
.lfp-contact-btn:focus-visible {
    background: var(--lfp-card-hover);
    border-color: var(--lfp-accent);
    transform: translateY(-1px);
    outline: none;
}

.lfp-contact-btn svg {
    flex: 0 0 auto;
}

.lfp-social-btn {
    --lfp-social-color: var(--lfp-fg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: var(--lfp-card);
    color: var(--lfp-fg);
    border: 1px solid color-mix(in srgb, var(--lfp-fg) 6%, transparent);
    text-decoration: none;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.lfp-social-btn svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.lfp-social-btn:hover,
.lfp-social-btn:focus-visible {
    background: var(--lfp-social-color);
    color: #fff;
    transform: translateY(-2px);
    outline: none;
}

.lfp-social-btn:focus-visible {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--lfp-social-color) 50%, transparent);
}

/* ----------------------------------- Link card */

.lfp-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: var(--lfp-card-py) var(--lfp-card-px);
    background: var(--lfp-card);
    color: inherit;
    border-radius: var(--lfp-radius);
    text-decoration: none;
    transition: background 160ms ease, transform 160ms ease;
    border: 1px solid color-mix(in srgb, var(--lfp-fg) 6%, transparent);
}

.lfp-link:hover,
.lfp-link:focus-visible {
    background: var(--lfp-card-hover);
    transform: translateY(-1px);
    outline: none;
}

.lfp-link:focus-visible {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--lfp-accent) 50%, transparent);
}

.lfp-link-image {
    flex: 0 0 auto;
    width: var(--lfp-icon);
    height: var(--lfp-icon);
    border-radius: calc(var(--lfp-radius) * 0.6);
    overflow: hidden;
    background: color-mix(in srgb, var(--lfp-fg) 8%, transparent);
}

.lfp-link-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.lfp-link-text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lfp-link-title {
    font-weight: 600;
    font-size: var(--lfp-link-title-size);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lfp-link-desc {
    margin: 0;
    color: var(--lfp-muted);
    font-size: var(--lfp-body-size);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.lfp-link-arrow {
    color: var(--lfp-muted);
    font-size: 1.1rem;
    flex: 0 0 auto;
    transition: color 160ms ease, transform 160ms ease;
}

.lfp-link:hover .lfp-link-arrow,
.lfp-link:focus-visible .lfp-link-arrow {
    color: var(--lfp-accent);
    transform: translateX(2px);
}

/* ----------------------------------- Category box */

.lfp-category {
    background: color-mix(in srgb, var(--lfp-card) 60%, transparent);
    border: 1px solid color-mix(in srgb, var(--lfp-fg) 8%, transparent);
    border-radius: calc(var(--lfp-radius) + 4px);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.lfp-category-image {
    width: 100%;
    aspect-ratio: 16 / 6;
    overflow: hidden;
    border-radius: calc(var(--lfp-radius) - 2px);
    background: color-mix(in srgb, var(--lfp-fg) 6%, transparent);
}

.lfp-category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.lfp-category-head {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lfp-category-title {
    margin: 0;
    font-size: var(--lfp-cat-title-size);
    font-weight: 700;
    letter-spacing: -0.005em;
}

.lfp-category-desc {
    margin: 0;
    color: var(--lfp-muted);
    font-size: var(--lfp-body-size);
}

.lfp-category-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ----------------------------------- Instagram grid */

.lfp-imgrid-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.lfp-imgrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
    width: 100%;
}

.lfp-imgrid-tile.is-hidden {
    display: none;
}

.lfp-imgrid-more {
    appearance: none;
    background: var(--lfp-card);
    color: var(--lfp-fg);
    border: 1px solid color-mix(in srgb, var(--lfp-fg) 12%, transparent);
    padding: 10px 18px;
    border-radius: 999px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.lfp-imgrid-more:hover,
.lfp-imgrid-more:focus-visible {
    background: var(--lfp-card-hover);
    border-color: var(--lfp-accent);
    transform: translateY(-1px);
    outline: none;
}

.lfp-imgrid-more-count {
    color: var(--lfp-muted);
    font-weight: 500;
}

.lfp-imgrid-tile {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--lfp-card);
    text-decoration: none;
    color: #fff;
    display: block;
}

.lfp-imgrid-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 240ms ease, filter 240ms ease;
}

.lfp-imgrid-tile:hover img,
.lfp-imgrid-tile:focus-visible img {
    transform: scale(1.04);
    filter: brightness(0.85);
}

.lfp-imgrid-overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 8px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0));
    pointer-events: none;
    text-align: left;
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

.lfp-imgrid-show-hover .lfp-imgrid-overlay {
    opacity: 0;
    transition: opacity 200ms ease;
}

.lfp-imgrid-show-hover:hover .lfp-imgrid-overlay,
.lfp-imgrid-show-hover:focus-visible .lfp-imgrid-overlay {
    opacity: 1;
}

@media (max-width: 480px) {
    .lfp-imgrid {
        gap: 2px;
    }
}

/* ----------------------------------- Empty / footer */

.lfp-empty {
    text-align: center;
    padding: 48px 16px;
    color: var(--lfp-muted);
    background: var(--lfp-card);
    border-radius: var(--lfp-radius);
}

.lfp-empty-hint {
    font-size: 0.85rem;
    margin-top: 8px;
}

.lfp-footer {
    margin-top: auto;
    text-align: center;
    color: var(--lfp-muted);
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.lfp-footer-line {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.lfp-footer-custom {
    color: var(--lfp-muted);
}

.lfp-footer-custom a {
    color: inherit;
}

.lfp-footer a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted color-mix(in srgb, var(--lfp-fg) 30%, transparent);
}

.lfp-footer a:hover {
    color: var(--lfp-fg);
}

/* ----------------------------------- 404 / Not found */

.lfp-404-page {
    min-height: 100vh;
    justify-content: center;
}

.lfp-404 {
    text-align: center;
    background: var(--lfp-card);
    border: 1px solid color-mix(in srgb, var(--lfp-fg) 8%, transparent);
    border-radius: calc(var(--lfp-radius) + 4px);
    padding: 36px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.lfp-404-code {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--lfp-accent);
    opacity: 0.8;
}

.lfp-404-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.lfp-404-message {
    color: var(--lfp-muted);
    line-height: 1.5;
    max-width: 36ch;
}

.lfp-404-message p:first-child { margin-top: 0; }
.lfp-404-message p:last-child  { margin-bottom: 0; }

.lfp-404-keyword {
    margin: 0;
    color: var(--lfp-muted);
    font-size: 0.85rem;
}

.lfp-404-keyword code {
    background: color-mix(in srgb, var(--lfp-fg) 8%, transparent);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    color: var(--lfp-fg);
}

.lfp-404-btn {
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    background: var(--lfp-accent);
    color: #fff;
    border-radius: var(--lfp-radius);
    text-decoration: none;
    font-weight: 600;
    transition: background 160ms ease, transform 160ms ease;
}

.lfp-404-btn:hover,
.lfp-404-btn:focus-visible {
    background: color-mix(in srgb, var(--lfp-accent) 88%, black);
    transform: translateY(-1px);
    outline: none;
}

/* ----------------------------------- Mobile */

@media (max-width: 480px) {
    .lfp-page {
        padding: 32px 16px 60px;
    }
    .lfp-title {
        font-size: 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lfp-link,
    .lfp-link-arrow {
        transition: none;
    }
}
