/* ============================================================
   adrianmalik.pl — Global Styles
   ============================================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #ffffff;
    color: #1e293b;
    line-height: 1.6;
    margin: 0;
}

h1,h2,h3,h4 { font-weight: 700; line-height: 1.2; }
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* ---------- CSS Variables ---------- */
:root {
    --am-blue:       #2563eb;
    --am-blue-dark:  #1d4ed8;
    --am-dark:       #0f172a;
    --am-text:       #1e293b;
    --am-muted:      #64748b;
    --am-border:     #e2e8f0;
    --am-bg-alt:     #f8fafc;
    --am-radius:     10px;
    --am-shadow:     0 1px 3px rgba(0,0,0,.08);
    --am-shadow-md:  0 4px 16px rgba(0,0,0,.1);
}

/* ---------- Layout Helpers ---------- */
.am-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.am-container-narrow {
    max-width: 780px;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.am-nav {
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--am-border);
}

.am-nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.am-nav-brand {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--am-text) !important;
    text-decoration: none !important;
    flex-shrink: 0;
}

.am-nav-brand-dot {
    width: 8px;
    height: 8px;
    background: var(--am-blue);
    border-radius: 50%;
}

.am-nav-brand-accent { color: var(--am-blue); }

.am-nav-links {
    display: flex;
    gap: .25rem;
    flex: 1;
}

.am-nav-link {
    padding: .4rem .75rem;
    border-radius: 6px;
    font-size: .9rem;
    color: var(--am-muted) !important;
    transition: color .15s, background .15s;
    text-decoration: none !important;
}

.am-nav-link:hover,
.am-nav-link.active {
    color: var(--am-text) !important;
    background: var(--am-bg-alt);
}

.am-nav-actions {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.am-nav-admin-btn {
    font-size: .8rem;
    padding: .3rem .7rem;
    border: 1px solid var(--am-border);
    border-radius: 6px;
    color: var(--am-muted) !important;
    text-decoration: none !important;
    transition: border-color .15s, color .15s;
}

.am-nav-admin-btn:hover {
    border-color: var(--am-blue);
    color: var(--am-blue) !important;
}

/* Mobile hamburger */
.am-nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: .4rem;
    margin-left: auto;
}
.am-nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--am-text);
    border-radius: 2px;
    transition: .2s;
}

.am-nav-mobile {
    display: none;
    flex-direction: column;
    padding: .5rem 1.5rem 1rem;
    border-top: 1px solid var(--am-border);
}

.am-nav-mobile.open { display: flex; }

.am-nav-mobile-link {
    padding: .6rem 0;
    color: var(--am-text) !important;
    font-size: .95rem;
    border-bottom: 1px solid var(--am-border);
    text-decoration: none !important;
}

/* ── Language switcher ───────────────────────────────────── */
.am-lang-switcher {
    display: flex;
    align-items: center;
    gap: 2px;
    background: var(--am-bg-alt);
    border: 1px solid var(--am-border);
    border-radius: 6px;
    padding: 2px;
}

.am-lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 9px;
    border-radius: 4px;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--am-muted);
    text-decoration: none !important;
    transition: background .15s, color .15s;
    line-height: 1.6;
    white-space: nowrap;
}

.am-lang-btn:hover {
    color: var(--am-dark);
    background: #e2e8f0;
    text-decoration: none !important;
}

.am-lang-btn.active {
    background: var(--am-blue);
    color: #fff;
}

.am-lang-switcher-mobile {
    margin: .5rem 0;
    align-self: flex-start;
}

/* ── Admin language tab switcher (inside forms) ──────────── */
.am-lang-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--am-border);
    padding-bottom: 4px;
    margin-bottom: 12px;
}
.am-lang-tab {
    padding: 4px 14px;
    font-size: .8rem;
    font-weight: 600;
    border: 1px solid var(--am-border);
    border-radius: 6px 6px 0 0;
    background: transparent;
    color: var(--am-muted);
    cursor: pointer;
    transition: background .15s, color .15s;
}
.am-lang-tab:hover {
    background: var(--am-bg-alt);
    color: var(--am-text);
}
.am-lang-tab.active {
    background: var(--am-blue);
    color: #fff;
    border-color: var(--am-blue);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.am-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .65rem 1.4rem;
    background: var(--am-blue);
    color: #fff !important;
    border-radius: 8px;
    font-weight: 600;
    font-size: .9rem;
    text-decoration: none !important;
    transition: background .15s, transform .1s;
    border: 2px solid var(--am-blue);
}

.am-btn-primary:hover {
    background: var(--am-blue-dark);
    border-color: var(--am-blue-dark);
    transform: translateY(-1px);
}

.am-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .65rem 1.4rem;
    background: transparent;
    color: var(--am-text) !important;
    border: 2px solid var(--am-border);
    border-radius: 8px;
    font-weight: 600;
    font-size: .9rem;
    text-decoration: none !important;
    transition: border-color .15s, color .15s;
}

.am-btn-outline:hover {
    border-color: var(--am-blue);
    color: var(--am-blue) !important;
}

/* ============================================================
   HERO
   ============================================================ */
.am-hero {
    padding: 6rem 0 5rem;
    background: linear-gradient(160deg, #f0f7ff 0%, #ffffff 60%);
    border-bottom: 1px solid var(--am-border);
}

.am-hero-inner {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.am-hero-text { flex: 1; }

.am-hero-eyebrow {
    font-size: .9rem;
    color: var(--am-blue);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin: 0 0 .5rem;
}

.am-hero-name {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 800;
    margin: 0 0 .5rem;
    color: var(--am-dark);
}

.am-hero-title {
    font-size: 1.15rem;
    color: var(--am-muted);
    margin: 0 0 1.25rem;
}

.am-hero-title-highlight {
    color: var(--am-text);
    font-weight: 600;
}

.am-hero-desc {
    font-size: 1rem;
    color: var(--am-muted);
    max-width: 520px;
    margin: 0 0 1.75rem;
    line-height: 1.7;
    text-align: justify;
    hyphens: auto;
}

.am-hero-desc p {
    margin: 0 0 0.75rem;
}

.am-hero-desc p:last-child {
    margin-bottom: 0;
}

.am-hero-ctas {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.am-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.am-badge {
    padding: .25rem .7rem;
    background: #eff6ff;
    color: var(--am-blue);
    border: 1px solid #bfdbfe;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 500;
}

/* Photo */
.am-hero-photo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.am-hero-photo-wrap {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #bfdbfe;
    box-shadow: 0 8px 32px rgba(37,99,235,.15);
    position: relative;
}

.am-hero-photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.am-hero-photo-placeholder {
    display: none;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
}

.am-hero-status {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .8rem;
    color: #16a34a;
    font-weight: 500;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    padding: .35rem .85rem;
    border-radius: 20px;
}

.am-hero-status-dot {
    width: 8px;
    height: 8px;
    background: #16a34a;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: .6; transform: scale(1.3); }
}

/* ============================================================
   SECTIONS
   ============================================================ */
.am-section { padding: 5rem 0; }
.am-section-alt { background: var(--am-bg-alt); }

.am-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 1rem;
}

.am-section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--am-dark);
    margin: 0 0 2rem;
}

.am-section-title-light { color: #fff; }

.am-section-more {
    font-size: .875rem;
    color: var(--am-blue);
    white-space: nowrap;
    text-decoration: none !important;
}

.am-section-more:hover { text-decoration: underline !important; }

/* ============================================================
   PROJECTS GRID
   ============================================================ */
.am-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 1.5rem;
}

.am-project-card {
    background: #fff;
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius);
    overflow: hidden;
    box-shadow: var(--am-shadow);
    transition: box-shadow .2s, transform .2s;
    display: flex;
    flex-direction: column;
}

.am-project-card:hover {
    box-shadow: var(--am-shadow-md);
    transform: translateY(-2px);
}

.am-project-thumb {
    height: 180px;
    overflow: hidden;
    background: var(--am-bg-alt);
}

.am-project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

.am-project-card:hover .am-project-thumb img {
    transform: scale(1.03);
}

.am-thumb-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.am-thumb-link::after {
    content: '↗';
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: .75rem;
    line-height: 1;
    padding: 4px 6px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity .2s;
}

.am-thumb-link:hover::after {
    opacity: 1;
}

.am-project-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.am-project-meta {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .6rem;
}

.am-project-category {
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--am-blue);
    background: #eff6ff;
    padding: .15rem .55rem;
    border-radius: 4px;
}

.am-project-year {
    font-size: .78rem;
    color: var(--am-muted);
}

.am-project-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 .5rem;
    color: var(--am-dark);
}

.am-project-desc {
    font-size: .875rem;
    color: var(--am-muted);
    flex: 1;
    margin: 0 0 1rem;
}

.am-project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: .75rem;
}

.am-tech-tag {
    font-size: .72rem;
    padding: .2rem .55rem;
    background: var(--am-bg-alt);
    border: 1px solid var(--am-border);
    border-radius: 4px;
    color: var(--am-text);
}

.am-project-links {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}

.am-link-icon {
    font-size: .8rem;
    color: var(--am-blue) !important;
    text-decoration: none !important;
    font-weight: 500;
}

.am-link-icon:hover { text-decoration: underline !important; }

.am-link-private {
    font-size: .78rem;
    color: var(--am-muted);
}

.am-badge-featured {
    font-size: .72rem;
    background: #fef9c3;
    color: #854d0e;
    border: 1px solid #fde68a;
    padding: .15rem .55rem;
    border-radius: 4px;
}

/* ============================================================
   FILTER BAR
   ============================================================ */
.am-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 2rem;
}

.am-filter-btn {
    padding: .4rem .9rem;
    border: 1px solid var(--am-border);
    background: #fff;
    border-radius: 20px;
    font-size: .85rem;
    cursor: pointer;
    transition: all .15s;
    color: var(--am-muted);
}

.am-filter-btn:hover,
.am-filter-btn.active {
    background: var(--am-blue);
    border-color: var(--am-blue);
    color: #fff;
}

/* ============================================================
   HACKATHONS
   ============================================================ */
.am-hack-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius);
    overflow: hidden;
    background: #fff;
}

.am-hack-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: .9rem 1.25rem;
    border-bottom: 1px solid var(--am-border);
    transition: background .1s;
}

.am-hack-item:last-child { border-bottom: none; }
.am-hack-item:hover { background: var(--am-bg-alt); }
.am-hack-winner { background: #fffbeb !important; }
.am-hack-winner:hover { background: #fef9c3 !important; }

.am-hack-year {
    font-size: .85rem;
    font-weight: 700;
    color: var(--am-blue);
    width: 48px;
    flex-shrink: 0;
}

.am-hack-info { flex: 1; }

.am-hack-name { font-weight: 600; color: var(--am-dark); font-size: .95rem; }
.am-hack-challenge { font-size: .82rem; color: var(--am-muted); }
.am-hack-location  { font-size: .74rem; color: var(--am-muted); opacity: .6; margin-top: 2px; }
.am-hack-trophy {
    margin-right: .3rem;
    color: #f59e0b;
    font-size: 1rem;
    line-height: 1;
}
.am-hack-result { font-size: .82rem; color: var(--am-muted); flex-shrink: 0; }

/* ── Certyfikaty ──────────────────────────────────────────── */
.am-cert-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: .5rem;
}

.am-cert-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .75rem 1rem;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--am-border);
    transition: box-shadow .15s;
}

.am-cert-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.am-cert-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    opacity: .7;
}

.am-cert-info {
    flex: 1;
    min-width: 0;
}

.am-cert-name {
    font-weight: 600;
    font-size: .88rem;
    color: var(--am-dark);
    line-height: 1.3;
}

.am-cert-issuer {
    font-size: .78rem;
    color: var(--am-muted);
    margin-top: 2px;
}

.am-cert-date {
    font-size: .78rem;
    color: var(--am-muted);
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

/* Hackathon cards (full page) */
.am-hack-cards {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.am-hack-card {
    background: #fff;
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius);
    overflow: hidden;
    box-shadow: var(--am-shadow);
    display: flex;
    gap: 0;
}

.am-hack-card-winner {
    border-color: #fde68a;
    background: #fffbeb;
}

.am-hack-card-thumb {
    width: 220px;
    flex-shrink: 0;
    overflow: hidden;
}

.am-hack-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.am-hack-card-body { padding: 1.5rem; flex: 1; }

.am-hack-card-meta {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    margin-bottom: .75rem;
}

.am-hack-card-year {
    font-weight: 700;
    color: var(--am-blue);
}

.am-hack-card-location,
.am-hack-card-result {
    font-size: .82rem;
    color: var(--am-muted);
}

.am-hack-card-result { font-weight: 600; color: #92400e; }

.am-hack-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 .4rem;
}

.am-hack-card-challenge {
    font-size: .9rem;
    color: var(--am-muted);
    margin: 0 0 .75rem;
}

.am-hack-card-team,
.am-hack-card-desc {
    font-size: .9rem;
    color: var(--am-muted);
    margin: 0 0 .75rem;
}

/* ============================================================
   TIMELINE (Doświadczenie)
   ============================================================ */
.am-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

.am-timeline::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 16px;
    bottom: 16px;
    width: 2px;
    background: var(--am-border);
}

.am-timeline-item {
    display: flex;
    gap: 1.5rem;
    padding-bottom: 2rem;
    position: relative;
}

.am-timeline-item:last-child { padding-bottom: 0; }

.am-timeline-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--am-border);
    flex-shrink: 0;
    margin-top: .1rem;
    position: relative;
    z-index: 1;
    transition: border-color .2s;
}

.am-timeline-dot-active {
    border-color: var(--am-blue) !important;
    background: var(--am-blue) !important;
}

.am-timeline-body { flex: 1; }

.am-timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: .5rem;
}

.am-timeline-role {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    color: var(--am-dark);
}

.am-timeline-company {
    font-size: .875rem;
    color: var(--am-muted);
    margin: .15rem 0 0;
}

.am-timeline-location { color: var(--am-muted); }

.am-timeline-period {
    font-size: .8rem;
    color: var(--am-muted);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: .4rem;
}

.am-badge-current {
    font-size: .7rem;
    font-weight: 600;
    padding: .15rem .5rem;
    background: #dcfce7;
    color: #15803d;
    border-radius: 10px;
}

.am-timeline-desc {
    font-size: .9rem;
    color: var(--am-muted);
    margin: 0 0 .6rem;
}

.am-timeline-achievements {
    margin: 0;
    padding-left: 1.25rem;
    font-size: .875rem;
    color: var(--am-muted);
}

.am-timeline-achievements li { margin-bottom: .25rem; }

/* ============================================================
   SKILLS
   ============================================================ */
.am-skills-groups {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.am-skills-group-title {
    font-size: .85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--am-muted);
    margin: 0 0 1rem;
}

.am-skills-list {
    display: flex;
    flex-direction: column;
    gap: .65rem;
}

.am-skill-item {
    display: flex;
    align-items: center;
    gap: .65rem;
}

.am-skill-icon {
    font-size: 1.35rem;
    width: 1.5rem;
    text-align: center;
    flex-shrink: 0;
}

.am-skill-name {
    font-size: .875rem;
    font-weight: 500;
    width: 130px;
    flex-shrink: 0;
}

.am-skill-bar {
    flex: 1;
    height: 6px;
    background: var(--am-border);
    border-radius: 3px;
    overflow: hidden;
}

.am-skill-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--am-blue), #60a5fa);
    border-radius: 3px;
    transition: width .6s ease;
}

/* ============================================================
   ARTICLES
   ============================================================ */
.am-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 1.5rem;
}

.am-article-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius);
    overflow: hidden;
    text-decoration: none !important;
    color: var(--am-text) !important;
    box-shadow: var(--am-shadow);
    transition: box-shadow .2s, transform .2s;
}

.am-article-card:hover {
    box-shadow: var(--am-shadow-md);
    transform: translateY(-2px);
    text-decoration: none !important;
}

.am-article-thumb {
    height: 160px;
    overflow: hidden;
    background: var(--am-bg-alt);
}

.am-article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.am-article-body { padding: 1.25rem; flex: 1; }

.am-article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: .6rem;
}

.am-tag {
    font-size: .72rem;
    padding: .2rem .55rem;
    background: #eff6ff;
    color: var(--am-blue);
    border-radius: 4px;
}

.am-article-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 .4rem;
    color: var(--am-dark);
}

.am-article-excerpt {
    font-size: .85rem;
    color: var(--am-muted);
    margin: 0 0 .75rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.am-article-date {
    font-size: .78rem;
    color: var(--am-muted);
}

/* Article list (full page) */
.am-articles-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.am-article-row {
    display: flex;
    gap: 1.5rem;
    background: #fff;
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius);
    overflow: hidden;
    text-decoration: none !important;
    color: var(--am-text) !important;
    box-shadow: var(--am-shadow);
    transition: box-shadow .15s;
}

.am-article-row:hover { box-shadow: var(--am-shadow-md); }

.am-article-row-thumb {
    width: 200px;
    flex-shrink: 0;
    overflow: hidden;
}

.am-article-row-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.am-article-row-body { padding: 1.25rem; flex: 1; }

.am-article-row-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 .5rem;
}

.am-article-row-excerpt {
    font-size: .9rem;
    color: var(--am-muted);
    margin: 0 0 .75rem;
}

/* Article Detail */
.am-article-detail { padding: 3rem 0 5rem; }

.am-breadcrumb {
    font-size: .82rem;
    color: var(--am-muted);
    margin-bottom: 2rem;
}

.am-breadcrumb a { color: var(--am-blue) !important; }

.am-article-detail-header { margin-bottom: 2rem; }

.am-article-detail-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    margin: .5rem 0;
    color: var(--am-dark);
}

.am-article-detail-excerpt {
    font-size: 1.1rem;
    color: var(--am-muted);
    margin: .5rem 0;
    line-height: 1.7;
}

.am-article-detail-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: .75rem;
}

.am-article-detail-thumb {
    width: 100%;
    border-radius: var(--am-radius);
    margin-bottom: 2rem;
    max-height: 420px;
    object-fit: cover;
}

.am-article-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--am-radius);
    margin-bottom: 2rem;
}

.am-article-embed iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

.am-article-content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--am-text);
}

.am-article-content h2,
.am-article-content h3 { margin-top: 2rem; }

.am-article-content code {
    background: var(--am-bg-alt);
    padding: .15rem .4rem;
    border-radius: 4px;
    font-size: .88em;
}

.am-article-content pre {
    background: var(--am-dark);
    color: #e2e8f0;
    padding: 1.25rem;
    border-radius: var(--am-radius);
    overflow-x: auto;
    font-size: .88rem;
}

.am-article-footer { margin-top: 3rem; }

/* ============================================================
   CV PAGE
   ============================================================ */
.am-cv-hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.am-cv-download-btns {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}

.am-cv-page { padding: 3rem 0 5rem; }

.am-cv-section { margin-bottom: 3.5rem; }

.am-cv-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 1.5rem;
    color: var(--am-dark);
    display: flex;
    align-items: center;
    gap: .5rem;
    padding-bottom: .75rem;
    border-bottom: 2px solid var(--am-border);
}

.am-cv-section-icon { font-size: 1.1rem; }

/* Certificates grid */
.am-cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.am-cert-card {
    background: #fff;
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius);
    overflow: hidden;
    box-shadow: var(--am-shadow);
    transition: box-shadow .2s, transform .2s;
}

.am-cert-card:hover {
    box-shadow: var(--am-shadow-md);
    transform: translateY(-2px);
}

.am-cert-thumb {
    position: relative;
    height: 130px;
    overflow: hidden;
}

.am-cert-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

.am-cert-card:hover .am-cert-thumb img { transform: scale(1.05); }

.am-cert-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.45);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    opacity: 0;
    transition: opacity .2s;
}

.am-cert-card:hover .am-cert-overlay { opacity: 1; }

.am-cert-icon-wrap {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    background: var(--am-bg-alt);
}

.am-cert-info {
    padding: .75rem;
    display: flex;
    flex-direction: column;
    gap: .2rem;
    font-size: .82rem;
}

.am-cert-issuer,
.am-cert-date { color: var(--am-muted); }

/* Lightbox */
.am-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.85);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.am-lightbox-inner {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: #fff;
    border-radius: var(--am-radius);
    overflow: hidden;
}

.am-lightbox-inner img {
    display: block;
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
}

.am-lightbox-close {
    position: absolute;
    top: .5rem;
    right: .75rem;
    font-size: 1.5rem;
    background: rgba(0,0,0,.6);
    color: #fff;
    border: none;
    cursor: pointer;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 1;
}

.am-lightbox-caption {
    padding: .75rem 1rem;
    font-size: .85rem;
    color: var(--am-text);
    border-top: 1px solid var(--am-border);
}

/* Languages */
.am-lang-list { display: flex; flex-direction: column; gap: .75rem; }

.am-lang-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .75rem 1rem;
    background: #fff;
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius);
}

.am-lang-name { font-weight: 600; }
.am-lang-level { color: var(--am-muted); font-size: .875rem; }

/* ============================================================
   PAGE HERO (subpages)
   ============================================================ */
.am-page-hero {
    background: linear-gradient(160deg, #f0f7ff 0%, #ffffff 100%);
    border-bottom: 1px solid var(--am-border);
    padding: 3.5rem 0 2.5rem;
}

.am-page-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    margin: 0 0 .5rem;
    color: var(--am-dark);
}

.am-page-subtitle {
    font-size: 1.05rem;
    color: var(--am-muted);
    margin: 0;
    max-width: 600px;
}

/* ============================================================
   CONTACT SECTION
   ============================================================ */
.am-section-contact {
    background: linear-gradient(135deg, #0f172a, #1e3a5f);
}

.am-contact-inner {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.am-contact-desc {
    font-size: 1.05rem;
    color: #94a3b8;
    margin: 0 0 2rem;
}

.am-contact-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.am-contact-link {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1.5rem;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 8px;
    color: #e2e8f0 !important;
    font-size: .9rem;
    text-decoration: none !important;
    transition: background .15s, border-color .15s;
}

.am-contact-link:hover {
    background: rgba(255,255,255,.15);
    border-color: rgba(255,255,255,.3);
}

.am-contact-icon {
    font-style: normal;
    font-weight: 700;
    font-size: .85rem;
    width: 1.4rem;
    height: 1.4rem;
    background: rgba(255,255,255,.15);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================
   FOOTER
   ============================================================ */
.am-footer {
    background: var(--am-dark);
    color: #64748b;
    padding: 2rem 0;
    font-size: .875rem;
}

.am-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.am-footer-brand {
    font-weight: 700;
    color: #94a3b8;
}

.am-footer-links {
    display: flex;
    gap: 1rem;
}

.am-footer-links a {
    color: #64748b !important;
    text-decoration: none !important;
    transition: color .15s;
}

.am-footer-links a:hover { color: #94a3b8 !important; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.am-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--am-muted);
    border: 2px dashed var(--am-border);
    border-radius: var(--am-radius);
}

/* ============================================================
   BLAZOR ERRORS
   ============================================================ */
.valid.modified:not([type=checkbox]) { outline: 1px solid #16a34a; }
.invalid { outline: 1px solid #dc2626; }
.validation-message { color: #dc2626; font-size: .8rem; margin-top: .25rem; }

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
    border-radius: var(--am-radius);
}

.blazor-error-boundary::after { content: "Wystąpił błąd aplikacji." }

#blazor-error-ui {
    display: none;
    background: #fef2f2;
    border-top: 1px solid #fecaca;
    padding: .75rem 1rem;
    text-align: center;
    font-size: .875rem;
    color: #991b1b;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 1000;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .am-nav-links,
    .am-nav-actions { display: none; }

    .am-nav-hamburger { display: flex; }

    .am-hero { padding: 3.5rem 0 3rem; }
    .am-hero-inner { flex-direction: column-reverse; gap: 2rem; }
    .am-hero-photo-wrap { width: 160px; height: 160px; }
    .am-hero-photo { align-items: flex-start; }

    .am-hack-card { flex-direction: column; }
    .am-hack-card-thumb { width: 100%; height: 180px; }

    .am-article-row { flex-direction: column; }
    .am-article-row-thumb { width: 100%; height: 160px; }

    .am-section { padding: 3rem 0; }

    .am-footer-inner { flex-direction: column; text-align: center; }

    .am-cv-hero-inner { flex-direction: column; }
}

@media (max-width: 480px) {
    .am-hero-name { font-size: 2rem; }
    .am-projects-grid { grid-template-columns: 1fr; }
    .am-articles-grid { grid-template-columns: 1fr; }
    .am-cert-grid { grid-template-columns: repeat(2, 1fr); }
}
