/* Kahe Digital design system: shared tokens, nav, buttons, footer and inner-page components. */

:root {
    --ink: #0c211b;
    --ink-2: #133129;
    --ink-3: #1d4337;
    --bone: #f4f1e8;
    --bone-2: #e9e4d6;
    --lime: #cdf26a;
    --lime-2: #b5e04a;
    --text: #0c211b;
    --muted: #5b6b64;
    --on-dark: #eef2ea;
    --on-dark-muted: #8fa59b;
    --line-dark: rgba(238, 242, 234, 0.12);
    --line: rgba(12, 33, 27, 0.12);
    --radius: 20px;
    --serif: 'Fraunces', Georgia, serif;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--sans);
    line-height: 1.6;
    color: var(--text);
    background: var(--ink);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase;
    padding: 6px 12px; border-radius: 999px;
    border: 1px solid var(--line); color: var(--muted);
    text-decoration: none;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--lime-2); }
.dark .eyebrow { border-color: var(--line-dark); color: var(--on-dark-muted); }
.dark .eyebrow .dot { background: var(--lime); box-shadow: 0 0 10px var(--lime); }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.02em; line-height: 1.05; }
.section-title { font-size: clamp(2rem, 4.4vw, 3.4rem); max-width: 22ch; margin-top: 20px; }
.section-title .soft { color: var(--muted); }
.dark .section-title .soft { color: var(--on-dark-muted); }

.btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 24px; border-radius: 10px;
    font-weight: 600; font-size: 0.95rem; text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid transparent; cursor: pointer; font-family: var(--sans);
}
.btn-lime { background: var(--lime); color: var(--ink); }
.btn-lime:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(205, 242, 106, 0.25); }
.btn-ghost { border-color: var(--line-dark); color: var(--on-dark); }
.btn-ghost:hover { background: rgba(238, 242, 234, 0.06); }
.btn-ink { background: var(--ink); color: var(--on-dark); }
.btn-ink:hover { transform: translateY(-2px); }
.btn .arrow { transition: transform 0.2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* Nav */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 50;
    transition: background 0.3s ease, border-color 0.3s ease;
    border-bottom: 1px solid transparent;
}
.nav.scrolled { background: rgba(12, 33, 27, 0.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--line-dark); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; color: var(--on-dark); text-decoration: none; letter-spacing: -0.02em; }
.brand span { color: var(--lime); }
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a { color: var(--on-dark-muted); text-decoration: none; font-size: 0.92rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--on-dark); }
.nav-links a.btn { color: var(--ink); }
.nav .btn { padding: 10px 18px; }
.menu-toggle { display: none; background: none; border: 1px solid var(--line-dark); border-radius: 8px; width: 42px; height: 42px; color: var(--on-dark); font-size: 1.1rem; cursor: pointer; }

/* Footer */
footer.site-footer { background: var(--ink); color: var(--on-dark-muted); padding: 64px 0 40px; }
.foot { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; padding-bottom: 40px; border-bottom: 1px solid var(--line-dark); }
.foot .brand { font-size: 2rem; }
.foot ul { list-style: none; display: grid; gap: 10px; }
.foot a { text-decoration: none; color: var(--on-dark-muted); }
.foot a:hover { color: var(--on-dark); }
.foot-cols { display: flex; gap: 64px; flex-wrap: wrap; font-size: 0.92rem; }
.foot-cols h4 { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--on-dark); font-weight: 500; margin-bottom: 14px; }
.legal { display: flex; justify-content: space-between; padding-top: 28px; font-size: 0.82rem; flex-wrap: wrap; gap: 12px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ------------------------------------------------------------------
   Inner pages: shared dark page header (case studies, portfolio, blog)
   ------------------------------------------------------------------ */
.inner { background: var(--bone); }
.inner .header {
    position: relative; background: var(--ink); color: var(--on-dark);
    padding: 150px 0 96px; overflow: hidden;
}
.inner .header::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(55% 60% at 85% 0%, rgba(205, 242, 106, 0.12), transparent 70%),
        radial-gradient(rgba(205, 242, 106, 0.18) 1px, transparent 1px) 0 0 / 22px 22px;
    -webkit-mask-image: linear-gradient(to bottom, #000 20%, transparent 95%);
    mask-image: linear-gradient(to bottom, #000 20%, transparent 95%);
    opacity: 0.9;
}
.inner .header .container { position: relative; }
.inner .header h1 { font-size: clamp(2.5rem, 6vw, 4.8rem); max-width: 16ch; margin: 24px 0 20px; }
.inner .header-content > p, .inner .header .subtitle { font-size: 1.15rem; color: var(--on-dark-muted); max-width: 56ch; }
.back-link, .inner .header .nav-link {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase;
    padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-dark);
    color: var(--on-dark-muted); text-decoration: none; transition: color 0.2s, border-color 0.2s;
}
.back-link:hover, .inner .header .nav-link:hover { color: var(--lime); border-color: rgba(205, 242, 106, 0.4); }

.hero-stats {
    display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 56px;
    border: 1px solid var(--line-dark); border-radius: var(--radius); overflow: hidden;
}
.hero-stats .stat { padding: 24px 28px; border-right: 1px solid var(--line-dark); display: flex; flex-direction: column-reverse; gap: 8px; }
.hero-stats .stat:last-child { border-right: 0; }
.hero-stats .number { font-family: var(--serif); font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1; letter-spacing: -0.03em; color: var(--lime); }
.hero-stats .label { font-size: 0.85rem; color: var(--on-dark-muted); }

/* Case cover: framed screenshot bridging the dark header and the bone body */
.case-cover { background: linear-gradient(var(--ink) 50%, var(--bone) 50%); }
.case-cover .frame { background: var(--lime); border-radius: 24px; padding: 40px 40px 0; overflow: hidden; }
.case-cover img { border-radius: 12px 12px 0 0; box-shadow: 0 30px 70px rgba(12, 33, 27, 0.35); width: 100%; max-height: 520px; object-fit: cover; object-position: top; }

/* ------------------------------------------------------------------
   Case study body
   ------------------------------------------------------------------ */
.main-content { background: var(--bone); padding: 96px 0 120px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 72px; align-items: start; }
.main-text { min-width: 0; }
.section { margin-bottom: 72px; }
.section:last-child { margin-bottom: 0; }
.section > h2 {
    font-size: clamp(1.8rem, 3.2vw, 2.6rem); margin-bottom: 22px;
    display: flex; align-items: baseline; gap: 14px;
}
.main-text { counter-reset: sec; }
.section > h2::before {
    counter-increment: sec; content: counter(sec, decimal-leading-zero);
    font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.06em; color: var(--muted);
    border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; transform: translateY(-6px);
}
.section h3 { font-size: 1.4rem; margin: 32px 0 12px; }
.section h4 { font-family: var(--serif); font-weight: 500; font-size: 1.15rem; letter-spacing: -0.01em; margin-bottom: 6px; }
.section p { color: #34463f; font-size: 1.05rem; margin-bottom: 16px; max-width: 68ch; }
.section p strong, .section li strong { color: var(--text); font-weight: 600; }

.challenge-list, .solution-list, .handover-section, .workflow-section, .enterprise-features {
    border-radius: var(--radius); padding: 32px; margin: 24px 0;
}
.challenge-list h3, .solution-list h3, .handover-section h3, .workflow-section h3, .enterprise-features h3 { margin-top: 0; }
.challenge-list { background: #fff; border: 1px solid var(--line); }
.challenge-list ul, .solution-list ul, .handover-section ul { list-style: none; display: grid; gap: 14px; }
.challenge-list li, .solution-list li, .handover-section li { position: relative; padding-left: 30px; color: #34463f; }
.challenge-list li::before {
    content: ''; position: absolute; left: 4px; top: 0.7em; width: 12px; height: 2px; background: #d9745e;
}
.solution-list { background: var(--ink); color: var(--on-dark); }
.solution-list li { color: var(--on-dark-muted); }
.solution-list li strong { color: var(--on-dark); }
.solution-list li::before {
    content: '✓'; position: absolute; left: 0; top: 0.05em; width: 20px; height: 20px; border-radius: 6px;
    background: var(--lime); color: var(--ink); font-size: 0.75rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.handover-section { background: var(--lime); }
.handover-section p, .handover-section li { color: var(--ink-3); }
.handover-section h4 { margin-top: 20px; margin-bottom: 12px; }
.handover-section li::before { content: '→'; position: absolute; left: 0; color: var(--ink); font-weight: 600; }

/* Results */
.results-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 24px 0 32px; }
.result-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px; min-width: 0; }
.result-card .icon { display: none; }
.result-card .metric { font-family: var(--serif); font-size: 2.3rem; line-height: 1; letter-spacing: -0.03em; margin-bottom: 10px; }
.result-card:nth-child(6n+1) { background: var(--ink); border-color: var(--ink); color: var(--on-dark); }
.result-card:nth-child(6n+1) .metric { color: var(--lime); }
.result-card:nth-child(6n+1) .description { color: var(--on-dark-muted); }
.result-card .description { font-size: 0.9rem; color: var(--muted); line-height: 1.45; }

/* Gallery */
.gallery { margin-top: 48px; }
.image-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 18px; }
.gallery-item { background: var(--bone-2); border-radius: 16px; padding: 14px; }
.gallery-item img { border-radius: 10px; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; box-shadow: 0 10px 30px rgba(12, 33, 27, 0.12); }
.gallery-item .caption { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); padding: 12px 4px 2px; }

/* Timeline (nursing, task management) */
.timeline { position: relative; margin: 24px 0; display: grid; gap: 4px; }
.timeline-item:not(:last-child)::before { content: ''; position: absolute; left: 27px; top: 50px; bottom: -14px; width: 1px; background: var(--line); }
.timeline-item { position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 20px; padding: 14px 0; }
.timeline-icon {
    width: 56px; height: 32px; border-radius: 999px; background: var(--ink); color: var(--lime);
    font-family: var(--mono); font-size: 0.78rem; display: flex; align-items: center; justify-content: center; position: relative;
}
.timeline-content p { margin-bottom: 0; font-size: 0.98rem; }

/* Workflow steps (telecoms) */
.workflow-section { background: var(--ink); color: var(--on-dark); }
.workflow-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 20px; }
.workflow-step { background: var(--ink-3); border-radius: 14px; padding: 18px; }
.workflow-step .step-number { font-family: var(--mono); font-size: 0.75rem; color: var(--lime); margin-bottom: 26px; }
.workflow-step .step-number::before { content: '/0'; }
.workflow-step h4 { color: var(--on-dark); font-size: 1.05rem; }
.workflow-step p { color: var(--on-dark-muted); font-size: 0.85rem; margin: 0; line-height: 1.45; }

/* Feature grid (telecoms) */
.enterprise-features { background: var(--bone-2); }
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 18px; }
.feature-grid .feature-item { background: #fff; border-radius: 14px; padding: 20px; display: block; }
.feature-grid .feature-icon { display: none; }
.feature-grid .feature-item p { font-size: 0.92rem; margin: 0; color: var(--muted); }

/* Actors (task management) */
.actors-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 24px 0; }
.actor-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.actor-card:nth-child(2) { background: var(--lime); border-color: var(--lime); }
.actor-card h4 { font-size: 1.25rem; margin-bottom: 10px; }
.actor-card p { font-size: 0.92rem; margin: 0; color: #34463f; }

/* Project details sidebar */
.project-info {
    position: sticky; top: 96px; background: #fff; border: 1px solid var(--line);
    border-radius: var(--radius); padding: 28px;
}
.project-info h3 { font-size: 1.4rem; margin-bottom: 8px; }
.info-item { padding: 16px 0; border-bottom: 1px solid var(--line); }
.info-item:last-child { border-bottom: 0; padding-bottom: 0; }
.info-label { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.info-value { font-size: 0.95rem; line-height: 1.55; }
.tech-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tech-tag { font-family: var(--mono); font-size: 0.72rem; padding: 5px 10px; border-radius: 6px; background: var(--bone); border: 1px solid var(--line); color: var(--text); }

/* Closing CTA (case studies, portfolio) */
.cta-section { background: var(--bone); padding: 0 0 120px; }
.cta-card { background: var(--lime); border-radius: 28px; padding: 64px; }
.cta-section h2 { font-size: clamp(2rem, 4.6vw, 3.6rem); max-width: 18ch; margin-bottom: 16px; }
.cta-section p { font-size: 1.1rem; color: var(--ink-3); max-width: 52ch; margin-bottom: 32px; }
.cta-button {
    display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px; border-radius: 10px;
    background: var(--ink); color: var(--on-dark); font-weight: 600; text-decoration: none;
    transition: transform 0.2s ease;
}
.cta-button:hover { transform: translateY(-2px); }

/* ------------------------------------------------------------------
   Portfolio (projectlist.html)
   ------------------------------------------------------------------ */
.nav-tabs, .nav-filters {
    position: sticky; top: 72px; z-index: 20; background: rgba(244, 241, 232, 0.9);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.nav-tabs ul, .filter-buttons { list-style: none; display: flex; gap: 6px; padding: 14px 0; overflow-x: auto; scrollbar-width: none; }
.nav-tabs ul::-webkit-scrollbar, .filter-buttons::-webkit-scrollbar { display: none; }
.tab-button, .filter-btn {
    font-family: var(--sans); font-size: 0.9rem; font-weight: 500; white-space: nowrap;
    padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: transparent;
    color: var(--muted); cursor: pointer; transition: all 0.2s ease;
}
.tab-button:hover, .filter-btn:hover { color: var(--text); border-color: rgba(12, 33, 27, 0.3); }
.tab-button.active, .filter-btn.active { background: var(--ink); border-color: var(--ink); color: var(--on-dark); }

.portfolio-content { background: var(--bone); padding: 0 0 120px; }
.nav-tabs, .nav-filters { margin-bottom: 48px; }
.tab-content { display: none; scroll-margin-top: 150px; }
.tab-content.active { display: block; animation: fadeUp 0.5s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } }

.featured-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.featured-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
    display: flex; flex-direction: column; transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.featured-card:hover { transform: translateY(-6px); box-shadow: 0 24px 60px rgba(12, 33, 27, 0.12); }
.featured-image { position: relative; height: 260px; background: var(--ink); padding: 48px 28px 0; overflow: hidden; }
.featured-card:nth-child(4n+2) .featured-image { background: var(--lime); }
.featured-card:nth-child(4n+3) .featured-image { background: var(--bone-2); }
.featured-card:nth-child(4n+4) .featured-image { background: var(--ink-3); }
.featured-image img { width: 100%; border-radius: 10px 10px 0 0; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3); transition: transform 0.5s ease; }
.featured-card:hover .featured-image img { transform: translateY(-8px); }
.featured-badge {
    position: absolute; top: 14px; left: 14px; z-index: 1;
    font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase;
    padding: 5px 10px; border-radius: 999px; background: var(--bone); color: var(--ink);
}
.featured-content { padding: 28px; display: flex; flex-direction: column; flex: 1; }
.featured-title { font-size: 1.6rem; }
.featured-subtitle { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 8px 0 0; order: -1; }
.featured-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 22px 0; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.featured-metrics .metric-number { display: block; font-family: var(--serif); font-size: 1.6rem; letter-spacing: -0.02em; }
.featured-metrics .metric-label { font-size: 0.78rem; color: var(--muted); }
.featured-description { color: var(--muted); font-size: 0.95rem; margin-bottom: 20px; }
.featured-link, .project-link { margin-top: auto; font-weight: 600; font-size: 0.92rem; text-decoration: none; border-bottom: 2px solid var(--lime-2); align-self: flex-start; padding-bottom: 2px; }

.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.project-card {
    background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 26px;
    display: flex; flex-direction: column; transition: transform 0.3s ease, border-color 0.3s ease;
}
.project-card:hover { transform: translateY(-4px); border-color: rgba(12, 33, 27, 0.3); }
.project-name { font-size: 1.35rem; margin-bottom: 12px; }
.project-status { display: flex; gap: 6px; flex-wrap: wrap; }
.status-badge {
    display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 0.68rem;
    letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted);
}
.status-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-active { background: var(--ink); border-color: var(--ink); color: var(--lime); }
.status-progress { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.status-completed { color: var(--ink-3); }
.status-inactive { color: #9aa49f; }
.project-description { color: var(--muted); font-size: 0.93rem; margin: 18px 0; }
.project-features { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.project-features .feature-item { font-size: 0.78rem; padding: 5px 10px; border-radius: 999px; background: var(--bone); }
.project-features .feature-no { opacity: 0.55; }
.tech-stack { margin-bottom: 20px; }
.tech-stack h4 { font-family: var(--mono); font-size: 0.68rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 8px; }
.project-card .project-link { margin-top: auto; }

.stats-section { background: var(--ink); color: var(--on-dark); padding: 120px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line-dark); border-radius: var(--radius); overflow: hidden; margin-top: 48px; }
.stat-item { padding: 32px; border-right: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark); display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 28px; min-height: 200px; }
.stat-item:nth-child(3n) { border-right: 0; }
.stat-item:nth-last-child(-n+3) { border-bottom: 0; }
.stat-number { font-family: var(--serif); font-size: clamp(2.6rem, 5vw, 4.2rem); line-height: 1; letter-spacing: -0.03em; color: var(--lime); }
.stat-label { color: var(--on-dark-muted); }

/* ------------------------------------------------------------------
   Blog (kahe-blog.html)
   ------------------------------------------------------------------ */
.inner .main-content.blog-main { padding: 0 0 120px; }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.blog-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer;
    display: flex; flex-direction: column; transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.blog-card:hover { transform: translateY(-6px); box-shadow: 0 24px 60px rgba(12, 33, 27, 0.12); }
.blog-card:focus-visible { outline: 3px solid var(--lime-2); outline-offset: 3px; }
.blog-image { position: relative; height: 210px; background-size: cover; background-position: center; filter: saturate(0.85); }
.blog-image::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(12, 33, 27, 0.35), transparent 60%); }
.blog-category, .modal-category {
    position: absolute; top: 14px; left: 14px; z-index: 1; font-family: var(--mono); font-size: 0.68rem;
    letter-spacing: 0.08em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; background: var(--lime); color: var(--ink);
}
.blog-content { padding: 26px; display: flex; flex-direction: column; flex: 1; }
.blog-meta, .modal-meta { display: flex; gap: 14px; font-family: var(--mono); font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.blog-meta span + span::before, .modal-meta span + span::before { content: '·'; margin-right: 14px; }
.blog-title { font-size: 1.45rem; line-height: 1.15; margin: 14px 0 12px; }
.blog-excerpt { color: var(--muted); font-size: 0.94rem; margin-bottom: 20px; }
.read-more { margin-top: auto; font-weight: 600; font-size: 0.9rem; text-decoration: none; border-bottom: 2px solid var(--lime-2); align-self: flex-start; padding-bottom: 2px; }

/* First article is featured */
.blog-grid .blog-card:first-child { grid-column: span 3; flex-direction: row; }
.blog-grid .blog-card:first-child .blog-image { width: 55%; height: auto; min-height: 380px; flex-shrink: 0; }
.blog-grid .blog-card:first-child .blog-content { padding: 40px; justify-content: center; }
.blog-grid .blog-card:first-child .blog-title { font-size: clamp(1.8rem, 3vw, 2.6rem); }

.loading, .error-message { text-align: center; padding: 80px 20px; color: var(--muted); }
.loading-spinner { width: 36px; height: 36px; margin: 0 auto 16px; border: 3px solid var(--line); border-top-color: var(--ink); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-message h3 { font-size: 1.6rem; color: var(--text); margin-bottom: 8px; }

/* Article reader */
.blog-modal { display: none; position: fixed; inset: 0; z-index: 100; background: rgba(12, 33, 27, 0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); overflow-y: auto; padding: 40px 16px; }
.modal-content { position: relative; max-width: 820px; margin: 0 auto; background: var(--bone); border-radius: 24px; overflow: hidden; animation: fadeUp 0.35s ease both; }
.modal-close {
    position: absolute; top: 16px; right: 16px; z-index: 2; width: 42px; height: 42px; border-radius: 50%;
    border: 0; background: var(--ink); color: var(--on-dark); font-size: 1.4rem; line-height: 1; cursor: pointer;
}
.modal-image { position: relative; height: 320px; background-size: cover; background-position: center; }
.modal-body { padding: 48px 56px 64px; }
.modal-title { font-size: clamp(2rem, 4vw, 3rem); margin: 16px 0 28px; }
.modal-text { font-size: 1.08rem; color: #34463f; }
.modal-text h2 { font-size: 1.8rem; color: var(--text); margin: 40px 0 14px; }
.modal-text h3 { font-size: 1.35rem; color: var(--text); margin: 28px 0 10px; }
.modal-text p { margin-bottom: 18px; }
.modal-text ul, .modal-text ol { margin: 0 0 18px 22px; }
.modal-text li { margin-bottom: 8px; }
.modal-text strong { color: var(--text); }
.modal-text a { color: var(--text); font-weight: 500; text-decoration: underline; text-decoration-color: var(--lime-2); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.modal-text a:hover { background: rgba(205, 242, 106, 0.35); }
.modal-text blockquote { border-left: 3px solid var(--lime-2); padding: 4px 0 4px 20px; margin: 24px 0; font-family: var(--serif); font-size: 1.3rem; color: var(--text); }

/* ------------------------------------------------------------------ */
@media (max-width: 1000px) {
    .content-grid { grid-template-columns: 1fr; gap: 56px; }
    .project-info { position: static; }
    .projects-grid, .blog-grid { grid-template-columns: repeat(2, 1fr); }
    .blog-grid .blog-card:first-child { grid-column: span 2; }
    .hero-stats { grid-template-columns: repeat(2, 1fr); }
    .hero-stats .stat:nth-child(2) { border-right: 0; }
    .hero-stats .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line-dark); }
}
@media (max-width: 760px) {
    .container { padding: 0 16px; }
    .nav-links { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--ink); border-bottom: 1px solid var(--line-dark); padding: 8px 16px 20px; }
    .nav-links.open { display: flex; }
    .nav-links li a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line-dark); }
    .nav-links li:last-child a { border: 0; margin-top: 14px; justify-content: center; }
    .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }

    .inner .header { padding: 116px 0 64px; }
    .hero-stats .stat { padding: 18px; }
    .case-cover .frame { padding: 18px 18px 0; border-radius: 18px; }
    .main-content { padding: 64px 0 84px; }
    .section { margin-bottom: 56px; }
    .challenge-list, .solution-list, .handover-section, .workflow-section, .enterprise-features { padding: 22px; }
    .results-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .result-card { padding: 18px; }
    .result-card .metric { font-size: clamp(1.4rem, 7vw, 1.9rem); }
    .image-grid, .feature-grid { grid-template-columns: 1fr; }
    .cta-section { padding-bottom: 84px; }
    .cta-card { padding: 32px 22px; border-radius: 22px; }

    .featured-grid, .projects-grid, .blog-grid { grid-template-columns: 1fr; }
    .featured-image { height: 200px; }
    .stats-section { padding: 84px 0; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-item { padding: 22px; min-height: 150px; }
    .stat-item:nth-child(3n) { border-right: 1px solid var(--line-dark); }
    .stat-item:nth-child(2n) { border-right: 0; }
    .stat-item:nth-last-child(-n+3) { border-bottom: 1px solid var(--line-dark); }
    .stat-item:nth-last-child(-n+2) { border-bottom: 0; }

    .blog-grid .blog-card:first-child { grid-column: span 1; flex-direction: column; }
    .blog-grid .blog-card:first-child .blog-image { width: 100%; min-height: 220px; }
    .blog-grid .blog-card:first-child .blog-content { padding: 26px; }
    .blog-modal { padding: 0; }
    .modal-content { border-radius: 0; min-height: 100%; }
    .modal-image { height: 220px; }
    .modal-body { padding: 32px 20px 48px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .reveal { opacity: 1; transform: none; }
    html { scroll-behavior: auto; }
}
