/*
Theme Name: LND Tech
Theme URI: https://blog.lndtech.eu
Author: Leandro Barreto
Author URI: https://lndtech.eu
Description: Dark, focused WordPress theme matching the lndtech.eu homepage — DM Sans, indigo accent, glass cards, and the same header/footer UX.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lndtech
Tags: blog, one-column, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, block-styles
*/

:root {
    --bg: #050508;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.07);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.16);
    --text: #f4f4f5;
    --text-muted: #a1a1aa;
    --text-subtle: #71717a;
    --accent: #6366f1;
    --accent-soft: rgba(99, 102, 241, 0.15);
    --accent-glow: rgba(99, 102, 241, 0.35);
    --atlassian: #2684ff;
    --miro: #ffd02f;
    --ios: #34d399;
    --radius: 12px;
    --font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --max: 720px;
}

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

html { scroll-behavior: smooth; color-scheme: dark; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .orb, .grid-bg { animation: none !important; }
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    overflow-x: hidden;
}

.bg-layer {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 20%, transparent 70%);
    animation: grid-drift 40s linear infinite;
}

@keyframes grid-drift {
    0% { transform: translateY(0); }
    100% { transform: translateY(48px); }
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.5;
}

.orb-1 {
    width: 420px;
    height: 420px;
    background: #4338ca;
    top: -120px;
    left: -80px;
    animation: float-a 18s ease-in-out infinite;
}

.orb-2 {
    width: 360px;
    height: 360px;
    background: #0e7490;
    top: 30%;
    right: -100px;
    animation: float-b 22s ease-in-out infinite;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: #7c3aed;
    bottom: -80px;
    left: 30%;
    animation: float-c 20s ease-in-out infinite;
}

@keyframes float-a {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, 30px) scale(1.08); }
}

@keyframes float-b {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-50px, 40px); }
}

@keyframes float-c {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -40px) scale(1.05); }
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover { color: #a5b4fc; }

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -48px;
    z-index: 100;
    background: var(--accent);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
}

.skip-link:focus { top: 16px; color: #fff; }

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

.wrap {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 24px 80px;
}

header {
    padding: 28px 0 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 600;
    font-size: 15px;
}

.brand:hover { color: var(--text); }

.brand img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
}

.header-links,
.menu {
    display: flex;
    gap: 16px;
    list-style: none;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.header-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
}

.header-links a:hover,
.header-links a.current,
.header-links .current-menu-item > a,
.header-links .current_page_item > a {
    color: var(--text);
}

.profile { margin-bottom: 56px; }

.eyebrow {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-subtle);
    margin-bottom: 10px;
}

h1,
.entry-title {
    font-size: clamp(28px, 5vw, 36px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 6px;
    color: var(--text);
}

.role {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.bio {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 20px;
}

.bio strong { color: var(--text); font-weight: 600; }

.profile-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
}

.profile-links a {
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.toolbar { margin-top: 8px; }

.search-form {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.search-form label { flex: 1; }

.search-field,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
}

.search-field::placeholder,
.comment-form textarea::placeholder {
    color: var(--text-subtle);
}

.btn,
.comment-form .submit,
.wp-block-button__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: var(--radius);
    padding: 12px 16px;
    background: var(--accent);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn:hover,
.comment-form .submit:hover,
.wp-block-button__link:hover {
    background: #818cf8;
    color: #fff;
}

.apps-section { margin-bottom: 40px; }

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.section-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.section-icon.atlassian { background: rgba(38, 132, 255, 0.15); }
.section-icon.ios { background: rgba(52, 211, 153, 0.15); }
.section-icon.miro { background: rgba(255, 208, 47, 0.15); }

.section-header h2 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-subtle);
}

.app-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.app-item a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.app-item a:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    color: var(--text);
    transform: translateX(4px);
}

.app-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.app-name {
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-excerpt {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 400;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.badge-new {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 7px;
    border-radius: 4px;
    background: var(--accent-soft);
    color: #a5b4fc;
}

.app-dest {
    font-size: 13px;
    color: var(--text-subtle);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.app-item a:hover .app-dest { color: var(--text-muted); }

.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.post-meta .badge-new { color: #a5b4fc; }

.post-meta time,
.entry-date {
    font-size: 12px;
    color: var(--text-subtle);
}

.subsection-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-subtle);
    margin: 16px 0 8px 4px;
}

footer {
    margin-top: 56px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

footer p {
    font-size: 13px;
    color: var(--text-subtle);
}

footer p a { color: var(--text-muted); }

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    list-style: none;
}

.footer-links a {
    font-size: 13px;
    color: var(--text-muted);
}

.entry { margin-bottom: 48px; }

.entry-header { margin-bottom: 28px; }

.entry-hero {
    margin: 0 0 28px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.entry-hero img {
    display: block;
    width: 100%;
    height: auto;
}

.entry-content {
    font-size: 16px;
    color: var(--text-muted);
}

.entry-content > * + * { margin-top: 1.15em; }

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin-top: 1.6em;
}

.entry-content h2 { font-size: 1.45rem; }
.entry-content h3 { font-size: 1.2rem; }

.entry-content p,
.entry-content li { color: var(--text-muted); }

.entry-content ul,
.entry-content ol { padding-left: 1.25em; }

.entry-content blockquote {
    margin: 1.4em 0;
    padding: 4px 0 4px 16px;
    border-left: 3px solid var(--accent);
    color: var(--text);
}

.entry-content code,
.wp-block-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9em;
}

.entry-content :not(pre) > code {
    background: var(--accent-soft);
    color: #c7d2fe;
    padding: 0.1em 0.4em;
    border-radius: 6px;
}

.entry-content pre,
.wp-block-code,
.wp-block-preformatted {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    overflow-x: auto;
    color: var(--text);
}

.entry-content img,
.entry-content figure {
    max-width: 100%;
    height: auto;
}

.entry-content figure { margin: 1.4em 0; }

.entry-content figcaption {
    font-size: 13px;
    color: var(--text-subtle);
    margin-top: 8px;
}

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.entry-content th,
.entry-content td {
    border: 1px solid var(--border);
    padding: 8px 10px;
    text-align: left;
}

.entry-content hr,
.wp-block-separator {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 2em 0;
}

.wp-block-button { margin: 1.2em 0; }

.entry-footer { margin-top: 32px; }

.tag-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.post-nav {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 8px 0 40px;
}

.post-nav-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.post-nav-link:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    color: var(--text);
    transform: translateX(4px);
}

.navigation.pagination {
    margin-top: 20px;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
}

.page-numbers.current,
.page-numbers:hover {
    color: var(--text);
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

.comments-area { margin-top: 8px; }

.comment-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 28px;
}

.comment-list .children {
    list-style: none;
    margin: 12px 0 0 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment-body {
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.comment-meta {
    font-size: 13px;
    color: var(--text-subtle);
    margin-bottom: 8px;
}

.comment-author { color: var(--text); font-weight: 600; }

.comment-content { font-size: 15px; color: var(--text-muted); }

.comment-form.card {
    padding: 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.comment-reply-title,
.comment-form h2 {
    font-size: 16px;
    margin-bottom: 14px;
    color: var(--text);
}

.comment-form p { margin-bottom: 12px; }

.comment-form label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.wp-block-image img { border-radius: var(--radius); }

.alignwide,
.alignfull { max-width: 100%; }

.wp-caption { max-width: 100%; }

.sticky .app-name::after {
    content: 'Pinned';
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 7px;
    border-radius: 4px;
    background: var(--accent-soft);
    color: #a5b4fc;
}

@media (max-width: 540px) {
    .app-item a {
        flex-direction: column;
        align-items: flex-start;
    }

    .app-dest { white-space: normal; }

    .search-form { flex-direction: column; }
}
