/* ============================================================
   Ing. Martin Ždila s.r.o. — styles
   ============================================================ */

:root {
  --bg: #0f1411;
  --bg-elev: #151c18;
  --surface: #ffffff;
  --ink: #14201a;
  --ink-soft: #43554c;
  --ink-faint: #6b7d73;
  --line: #e2e8e4;
  --line-strong: #cdd8d1;

  --brand: #2f7d4f;        /* OSM-ish green */
  --brand-deep: #1f5d39;
  --brand-bright: #54b07a;
  --accent: #e8a13a;       /* warm trail-marker amber */

  --paper: #f6f9f6;

  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(20, 32, 26, .06), 0 2px 8px rgba(20, 32, 26, .05);
  --shadow-md: 0 8px 30px rgba(20, 32, 26, .10);
  --maxw: 1120px;

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--brand-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .4em; }

.container { width: min(var(--maxw), 100% - 3rem); margin-inline: auto; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--brand); color: #fff; padding: .6rem 1rem; z-index: 100;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 600; font-size: .98rem;
  padding: .8rem 1.4rem; border-radius: 999px;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(47,125,79,.35); }
.btn-primary:hover { background: var(--brand-deep); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: rgba(255,255,255,.6); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-deep); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246,249,246,.82);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 0; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px;
  background: var(--brand); color: #fff; border-radius: 11px;
  box-shadow: 0 4px 12px rgba(47,125,79,.35);
}
.brand-text { font-size: 1.02rem; letter-spacing: -.01em; }
.brand-text em { font-style: normal; color: var(--ink-faint); font-weight: 500; }

.nav-menu { display: flex; align-items: center; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.nav-menu a { color: var(--ink-soft); font-weight: 500; padding: .5rem .85rem; border-radius: 999px; }
.nav-menu a:hover { color: var(--ink); background: rgba(47,125,79,.08); text-decoration: none; }
.nav-cta { background: var(--brand); color: #fff !important; }
.nav-cta:hover { background: var(--brand-deep) !important; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; width: 42px; height: 42px;
  background: none; border: 1px solid var(--line-strong); border-radius: 10px; cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle span { width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1200px 500px at 75% -10%, rgba(84,176,122,.18), transparent 60%),
    linear-gradient(180deg, #0f1d15 0%, #12281c 55%, #163420 100%);
  color: #e9f3ed;
}
.hero-grid {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,.04) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.04) 0 1px, transparent 1px 64px);
  -webkit-mask-image: radial-gradient(900px 520px at 70% 10%, #000 30%, transparent 75%);
          mask-image: radial-gradient(900px 520px at 70% 10%, #000 30%, transparent 75%);
}
.hero-inner { position: relative; padding: clamp(4rem, 9vw, 7.5rem) 0 clamp(3.5rem, 7vw, 6rem); }
.eyebrow {
  text-transform: uppercase; letter-spacing: .16em; font-size: .76rem; font-weight: 600;
  color: var(--brand-bright); margin: 0 0 1rem; font-family: var(--mono);
}
.hero h1 {
  font-size: clamp(2.3rem, 5.6vw, 4.1rem); font-weight: 800; color: #fff;
  margin: 0 0 1.2rem; letter-spacing: -.03em;
}
.hero h1 .accent { color: var(--brand-bright); }
.lead { font-size: clamp(1.05rem, 2vw, 1.28rem); color: #c9dcd0; max-width: 60ch; margin: 0 0 2rem; }
.lead strong { color: #fff; font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: 3rem; }
.hero-actions .btn-ghost { color: #eaf3ed; border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.04); }
.hero-actions .btn-ghost:hover { border-color: var(--brand-bright); color: #fff; }

.hero-stats {
  display: flex; flex-wrap: wrap; gap: 2.4rem; list-style: none; margin: 0; padding: 1.6rem 0 0;
  border-top: 1px solid rgba(255,255,255,.12);
}
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.7rem; color: #fff; font-weight: 800; letter-spacing: -.02em; }
.hero-stats span { font-size: .85rem; color: #9fb6a8; }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { max-width: 60ch; margin-bottom: 2.6rem; }
.section-head h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 800; }
.section-sub { color: var(--ink-soft); font-size: 1.08rem; margin: 0; }
.section .eyebrow { color: var(--brand); }

/* ---------- Service cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.8rem; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.section-alt .card { background: var(--paper); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--brand-bright); }
.card-icon {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(47,125,79,.12), rgba(84,176,122,.18));
  color: var(--brand-deep); margin-bottom: 1.1rem;
}
.card-icon svg { width: 26px; height: 26px; }
.card h3 { font-size: 1.25rem; }
.card p { color: var(--ink-soft); margin: 0; font-size: .98rem; }

/* ---------- Banner ---------- */
.banner {
  margin-top: 1.3rem; display: grid; grid-template-columns: 1.1fr 1fr; gap: 2rem; align-items: center;
  background: linear-gradient(135deg, var(--brand-deep), #14492c);
  color: #eaf3ed; border-radius: var(--radius-lg); padding: 2.2rem; overflow: hidden; position: relative;
}
.banner::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background:
    radial-gradient(60% 120% at 100% 0%, rgba(232,161,58,.25), transparent 60%),
    repeating-radial-gradient(circle at 90% 110%, rgba(255,255,255,.06) 0 2px, transparent 2px 28px);
}
.banner-text { position: relative; }
.banner-text h3 { color: #fff; font-size: 1.4rem; }
.banner-text p { margin: 0; color: #c9dcd0; }
.chips { position: relative; display: flex; flex-wrap: wrap; gap: .55rem; list-style: none; margin: 0; padding: 0; }
.chips li {
  font-family: var(--mono); font-size: .8rem; padding: .42rem .8rem;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px; color: #eaf3ed;
}

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 3rem; align-items: start; }
.about-text h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
.about-text p { color: var(--ink-soft); margin: 0 0 1.1rem; }
.about-text .btn { margin-top: .6rem; }
.about-aside {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.6rem 1.7rem; box-shadow: var(--shadow-sm); position: sticky; top: 90px;
}
.section-alt .about-aside { background: var(--surface); }
.founder { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.4rem; padding-bottom: 1.3rem; border-bottom: 1px solid var(--line); }
.founder img { border-radius: 50%; border: 3px solid var(--brand); box-shadow: 0 4px 14px rgba(47,125,79,.25); }
.founder-id { display: flex; flex-direction: column; }
.founder-id strong { font-size: 1.08rem; letter-spacing: -.01em; }
.founder-id span { font-size: .85rem; color: var(--ink-faint); }
.about-aside h3 { font-size: 1.05rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .1em; font-family: var(--mono); font-weight: 600; }
.facts { list-style: none; margin: .8rem 0 0; padding: 0; }
.facts li { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-top: 1px dashed var(--line-strong); }
.facts li:first-child { border-top: none; }
.facts span { color: var(--ink-faint); font-size: .9rem; }
.facts strong { text-align: right; font-size: .95rem; }

/* ---------- Projects ---------- */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.project {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm); position: relative;
  transition: transform .2s ease, box-shadow .2s ease;
}
.project::before {
  content: ""; display: block; height: 6px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}
.project:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.project-body { padding: 1.7rem 1.8rem 1.9rem; }
.project-body h3 { font-size: 1.3rem; }
.project-role { font-family: var(--mono); font-size: .8rem; color: var(--brand); margin: 0 0 .9rem; text-transform: uppercase; letter-spacing: .08em; }
.project-body p { color: var(--ink-soft); }
.project-links { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1rem; margin-top: .6rem; }
.project-links .project-link { margin-top: 0; }
.project-social { font-size: .85rem; color: var(--ink-faint); }
.project-social a { color: var(--ink-faint); }
.project-social a:hover { color: var(--brand-deep); }
.project-link { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; margin-top: .6rem; }
.project-link span { transition: transform .2s ease; }
.project-link:hover { text-decoration: none; }
.project-link:hover span { transform: translateX(4px); }

/* ---------- Experience / engagements ---------- */
.engagements { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
.engagement {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
}
.engagement header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .3rem 1rem; }
.engagement h3 { font-size: 1.08rem; margin: 0; }
.eng-period { font-family: var(--mono); font-size: .76rem; color: var(--ink-faint); letter-spacing: .04em; }
.engagement p { margin: .55rem 0 0; color: var(--ink-soft); font-size: .93rem; }
.eng-earlier {
  margin: 1.6rem 0 0; padding-top: 1.2rem; border-top: 1px dashed var(--line-strong);
  color: var(--ink-faint); font-size: .9rem; max-width: 75ch;
}

.speaking { margin-top: 2rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.6rem; }
.speaking h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; color: var(--brand); font-family: var(--mono); margin-bottom: .6rem; }
.speaking ul { list-style: none; margin: 0; padding: 0; }
.speaking li { padding: .4rem 0; color: var(--ink-soft); font-size: .93rem; border-top: 1px solid var(--line); }
.speaking li:first-child { border-top: none; }

/* ---------- Stack ---------- */
.stack-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.3rem; }
.stack-col {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
}
.section-alt .stack-col { background: var(--paper); }
.stack-col h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; color: var(--brand); font-family: var(--mono); }
.stack-col ul { list-style: none; margin: .6rem 0 0; padding: 0; }
.stack-col li { padding: .42rem 0; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: .95rem; }
.stack-col li:first-child { border-top: none; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; }
.contact-text h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
.contact-cards { display: grid; gap: 1rem; }
.section-alt .contact-card { background: var(--paper); }
.contact-card {
  display: flex; flex-direction: column; gap: .2rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.4rem; box-shadow: var(--shadow-sm);
  transition: transform .15s ease, border-color .2s ease, box-shadow .2s ease;
}
.contact-card:hover { transform: translateY(-3px); border-color: var(--brand); box-shadow: var(--shadow-md); text-decoration: none; }
.contact-label { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-faint); }
.contact-value { font-size: 1.15rem; font-weight: 600; color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer { background: #0f1d15; color: #b6cabe; padding: 3rem 0 1.8rem; }
.footer-inner {
  display: grid; grid-template-columns: 1.6fr 1fr 1.4fr; gap: 2rem 3rem;
  align-items: start; padding-bottom: 2rem; border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-col h4 {
  font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .14em;
  color: var(--brand-bright); margin: 0 0 .7rem;
}
.footer-col p { margin: .2rem 0; font-size: .9rem; line-height: 1.55; }
.footer-col a { color: #d7e6dd; }
.footer-brand strong { color: #fff; font-size: 1.1rem; }
.footer-brand p { margin: .4rem 0 0; font-size: .9rem; color: #8ba596; }
.footer-legal-col p { color: #8ba596; }
.footer-bottom { padding-top: 1.4rem; }
.footer-bottom p { margin: 0; font-size: .82rem; color: #6f8a7b; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .cards, .stack-grid { grid-template-columns: repeat(2, 1fr); }
  .projects { grid-template-columns: 1fr 1fr; }
  .engagements { grid-template-columns: 1fr; }
  .banner, .about-grid, .contact { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .projects { grid-template-columns: 1fr; }
  .about-aside { position: static; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: .2rem;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: .8rem 1.5rem 1.2rem; box-shadow: var(--shadow-md);
    display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { padding: .7rem .6rem; }
  .nav-cta { text-align: center; margin-top: .3rem; }
  .cards, .stack-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-stats { gap: 1.4rem 2rem; }
  .hero-stats strong { font-size: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
