/* ============================================================
       Julian Bachert - Maritime Medical IT Consulting
       Design system: editorial dark-tech, maritime.
       Display: Space Grotesk (self-hosted). Body/mono: system.
       One accent. Hairlines over cards. Restrained motion.
       ============================================================ */

    @font-face {
      font-family: 'Space Grotesk';
      font-style: normal;
      font-weight: 400 700;
      font-display: swap;
      src: url('fonts/space-grotesk.woff2') format('woff2');
    }

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

    :root {
      --ink:        #f6f8fb;
      --ink-1:      #eef2f7;
      --ink-2:      #ffffff;
      --panel:      #ffffff;
      --text:       #0f1b2d;
      --muted:      #51627a;
      --faint:      #7d8ca0;
      --accent:     #0c7f74;
      --accent-2:   #0a6b62;
      --line:       rgba(15,27,45,0.10);
      --line-2:     rgba(15,27,45,0.16);
      --display: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
      --font: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
      --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', 'IBM Plex Mono', Menlo, monospace;
      --radius: 10px;
      --maxw: 1180px;
      --pad: clamp(1.25rem, 5vw, 4rem);
    }

    html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
    body {
      font-family: var(--font);
      background: var(--ink);
      color: var(--text);
      line-height: 1.65;
      font-size: 17px;
      -webkit-font-smoothing: antialiased;
      text-rendering: optimizeLegibility;
      overflow-x: hidden;
    }
    body::before {
      content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
      background:
        radial-gradient(60% 50% at 82% -5%, rgba(70,196,184,0.10) 0%, transparent 60%),
        radial-gradient(50% 40% at 0% 100%, rgba(70,196,184,0.06) 0%, transparent 60%);
    }
    main, nav, section, footer { position: relative; z-index: 1; }

    h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; }
    em { font-style: normal; color: var(--accent); }
    a { color: inherit; }

    .wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }

    /* mono kicker (used sparingly: hero + atlas only) */
    .kicker {
      display: inline-flex; align-items: center; gap: 0.7rem;
      font-family: var(--mono); font-size: 12px; font-weight: 500;
      letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-2);
    }
    .kicker::before {
      content: ""; width: 26px; height: 1px; background: var(--accent); opacity: 0.7;
    }

    /* ---------- NAV ---------- */
    nav {
      position: fixed; top: 0; left: 0; right: 0; z-index: 100;
      height: 70px; display: flex; align-items: center; justify-content: space-between;
      padding-inline: var(--pad);
      background: rgba(246,248,251,0.82);
      backdrop-filter: saturate(140%) blur(12px);
      -webkit-backdrop-filter: saturate(140%) blur(12px);
      border-bottom: 1px solid var(--line);
    }
    .nav-brand img { height: 42px; display: block; }
    .nav-right { display: flex; align-items: center; gap: 1.75rem; }
    .nav-links { display: flex; gap: 1.75rem; list-style: none; }
    .nav-links a {
      position: relative; text-decoration: none; font-size: 14px; font-weight: 500;
      color: var(--muted); letter-spacing: 0.01em; transition: color 0.2s;
    }
    .nav-links a::after {
      content: ""; position: absolute; left: 0; bottom: -6px; height: 1px; width: 0;
      background: var(--accent); transition: width 0.25s ease;
    }
    .nav-links a:hover { color: var(--text); }
    .nav-links a:hover::after { width: 100%; }
    .nav-cta {
      color: var(--text) !important; border: 1px solid var(--line-2);
      padding: 7px 16px; border-radius: var(--radius); transition: border-color 0.2s, background 0.2s;
    }
    .nav-cta::after { display: none; }
    .nav-cta:hover { border-color: var(--accent); background: rgba(70,196,184,0.08); }

    .lang-toggle { display: flex; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; }
    .lang-toggle button {
      background: none; border: none; color: var(--faint); font-size: 12px; font-weight: 600;
      letter-spacing: 0.06em; padding: 6px 11px; cursor: pointer; transition: all 0.2s; font-family: var(--font);
    }
    .lang-toggle button.active { background: var(--accent); color: #ffffff; }
    .lang-toggle button:hover:not(.active) { color: var(--text); }

    .hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 4px; }
    .hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; }

    /* ---------- HERO (asymmetric split) ---------- */
    #hero {
      min-height: 100dvh; display: grid; align-items: center;
      grid-template-columns: 1.04fr 0.96fr; gap: clamp(2rem, 5vw, 5rem);
      max-width: var(--maxw); margin: 0 auto;
      padding: 124px var(--pad) 4rem;
    }
    .hero-bg, .hero-grid { display: none; }
    .hero-content { max-width: 600px; order: -1; }
    .hero-tag { margin-bottom: 1.6rem; }
    /* re-skin .hero-tag as a clean mono kicker (no pill, no dot) */
    .hero-tag {
      display: inline-flex; align-items: center; gap: 0.7rem; background: none; border: none;
      padding: 0; color: var(--accent-2); font-family: var(--mono);
      font-size: 12px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
    }
    .hero-tag::after { content: ""; width: 26px; height: 1px; background: var(--accent); opacity: 0.7; order: -1; }
    #hero h1 {
      font-size: clamp(2.6rem, 6vw, 4.4rem); color: var(--text);
      line-height: 1.02; margin-bottom: 1.5rem;
    }
    #hero p {
      font-size: 1.12rem; color: var(--muted); max-width: 30rem; line-height: 1.6; margin-bottom: 2.4rem;
    }
    .hero-actions { display: flex; gap: 0.9rem; flex-wrap: wrap; }

    .btn-primary {
      display: inline-flex; align-items: center; gap: 0.5rem;
      background: var(--accent); color: #ffffff; font-weight: 600; font-size: 15px;
      padding: 13px 26px; border-radius: var(--radius); text-decoration: none;
      transition: transform 0.18s ease, background 0.2s, box-shadow 0.2s;
      box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset;
    }
    .btn-primary:hover { background: var(--accent-2); transform: translateY(-2px); }
    .btn-primary:active { transform: translateY(0); }
    .btn-outline {
      display: inline-flex; align-items: center; gap: 0.5rem;
      border: 1px solid var(--line-2); color: var(--text); font-weight: 500; font-size: 15px;
      padding: 13px 24px; border-radius: var(--radius); text-decoration: none; transition: all 0.2s;
    }
    .btn-outline:hover { border-color: var(--accent); color: var(--accent-2); }

    /* hero asset: the system diagram, framed */
    .hero-image-placeholder {
      position: relative; padding: 1.25rem !important;
      border: 1px solid var(--line); border-radius: 14px;
      background: #0c1726; box-shadow: 0 28px 60px -34px rgba(15,27,45,0.45);
    }
    .hero-image-placeholder::before {
      content: "SHIPBOARD MEDICAL IT  /  SYSTEM MAP";
      position: absolute; top: -9px; left: 18px; padding: 0 8px;
      font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; color: var(--faint);
      background: var(--ink);
    }
    .hero-image-placeholder img { width: 100%; height: auto; display: block; opacity: 0.96; }

    /* ---------- CREDENTIALS STRIP ---------- */
    .cred-strip {
      max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad);
      display: grid; grid-template-columns: repeat(3, 1fr);
      border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
    }
    .cred-col { padding: 1.6rem 1.8rem 1.6rem 0; display: flex; flex-direction: column; gap: 0.25rem; }
    .cred-col + .cred-col { padding-left: 1.8rem; border-left: 1px solid var(--line); }
    .cred-label { font-family: var(--display); font-weight: 600; font-size: 1.02rem; color: var(--text); letter-spacing: -0.01em; }
    .cred-detail { font-size: 0.92rem; color: var(--muted); }

    /* ---------- SECTIONS GENERAL ---------- */
    section { padding-block: clamp(4.5rem, 9vw, 8rem); }
    #services, #about, #contact, #atlas-teaser { padding-inline: var(--pad); }
    .section-header { max-width: 40rem; margin: 0 auto 3.5rem; }
    #services .section-header, #contact .section-header { margin-left: 0; }
    .section-header h2, section h2 {
      font-size: clamp(1.9rem, 3.6vw, 2.8rem); color: var(--text); line-height: 1.08; margin-bottom: 1.1rem;
    }
    .section-header p { color: var(--muted); font-size: 1.08rem; line-height: 1.6; }
    /* legacy eyebrow class neutralised (kept only where intentional, restyled inline) */
    .section-tag { display: inline-flex; font-family: var(--mono); font-size: 12px; font-weight: 500;
      letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 1rem; }
    .section-tag::before { display: none; }

    /* ---------- SERVICES (editorial, hairline, numbered - no cards) ---------- */
    #services { max-width: var(--maxw); margin: 0 auto; }
    .services-grid {
      counter-reset: svc; display: grid; grid-template-columns: 1fr 1fr;
      column-gap: clamp(2rem, 5vw, 4.5rem); border-top: 1px solid var(--line);
    }
    .service-card {
      counter-increment: svc; position: relative; background: none; border: none; border-radius: 0;
      padding: 2.1rem 0 2rem; border-bottom: 1px solid var(--line);
      display: grid; grid-template-columns: auto 1fr; column-gap: 1.1rem; align-items: start;
      transition: none;
    }
    .service-card::before {
      content: counter(svc, decimal-leading-zero);
      grid-row: 1 / span 3; font-family: var(--mono); font-size: 13px; font-weight: 500;
      color: var(--faint); padding-top: 0.35rem; transition: color 0.25s;
    }
    .service-card:hover::before { color: var(--accent); }
    .service-card:hover { box-shadow: none; }
    .service-icon {
      width: 38px; height: 38px; background: rgba(70,196,184,0.08); border: 1px solid var(--line);
      border-radius: 9px; display: flex; align-items: center; justify-content: center; margin-bottom: 0.9rem;
    }
    .service-icon svg { width: 19px; height: 19px; stroke: var(--accent-2); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
    .service-card h3 { font-size: 1.18rem; font-weight: 600; color: var(--text); margin-bottom: 0.5rem; }
    .service-card p { grid-column: 2; font-size: 0.96rem; color: var(--muted); line-height: 1.6; }

    /* ---------- ATLAS TEASER (the one panel moment) ---------- */
    #atlas-teaser { max-width: var(--maxw); margin: 0 auto; }
    .atlas-teaser-inner {
      position: relative; overflow: hidden; border: 1px solid var(--line-2); border-radius: 16px;
      background:
        radial-gradient(80% 120% at 100% 0%, rgba(70,196,184,0.10), transparent 55%),
        linear-gradient(180deg, var(--panel), var(--ink-1));
      padding: clamp(2rem, 4vw, 3.4rem);
      display: flex; flex-direction: column; align-items: flex-start; gap: 1.15rem;
    }
    .atlas-teaser-inner .section-tag { color: var(--accent-2); margin-bottom: 0.2rem; }
    .atlas-teaser-inner h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); max-width: 22ch; }
    .atlas-teaser-desc { color: var(--muted); font-size: 1.04rem; max-width: 60ch; line-height: 1.6; }
    .atlas-teaser-meta {
      display: flex; flex-wrap: wrap; font-family: var(--mono); font-size: 12px;
      letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); margin-top: 0.2rem;
    }
    .atlas-teaser-meta span { display: inline-flex; align-items: center; }
    .atlas-teaser-meta span:not(:last-child) { padding-right: 1.2rem; margin-right: 1.2rem; border-right: 1px solid var(--line-2); }
    .atlas-teaser-inner .btn-primary { margin-top: 0.6rem; }

    /* ---------- ABOUT ---------- */
    #about { max-width: var(--maxw); margin: 0 auto; }
    .about-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
    .about-grid > img, .about-text + * { }
    #about img {
      width: 100%; height: auto; display: block; border-radius: 14px;
      border: 1px solid var(--line-2); filter: saturate(0.9) contrast(1.02);
      position: sticky; top: 100px;
    }
    .about-text h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); margin-bottom: 0.4rem; }
    .cv-block { margin-top: 2.4rem; }
    .cv-block h3 {
      font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
      color: var(--accent-2); margin-bottom: 1rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--line);
    }
    .cv-list { list-style: none; display: flex; flex-direction: column; }
    .cv-list li {
      font-size: 1rem; color: var(--text); line-height: 1.5; padding: 0.7rem 0;
      border-bottom: 1px solid var(--line); display: flex; gap: 0.8rem; align-items: baseline;
    }
    .cv-list li::before { content: ""; width: 5px; height: 5px; flex-shrink: 0; margin-top: 0.55rem; background: var(--accent); border-radius: 1px; }
    .cv-list li:last-child { border-bottom: none; }

    /* ---------- CONTACT ---------- */
    #contact { max-width: var(--maxw); margin: 0 auto; }
    .contact-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
    .contact-info-item { display: flex; gap: 1rem; margin-bottom: 1.8rem; align-items: flex-start; }
    .contact-info-item svg { width: 20px; height: 20px; stroke: var(--accent-2); fill: none; stroke-width: 1.6; flex-shrink: 0; margin-top: 3px; }
    .contact-info-item strong { display: block; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
    .contact-info-item span, .contact-info-item a { color: var(--text); font-size: 1rem; text-decoration: none; }
    .contact-info-item a:hover { color: var(--accent-2); }

    .contact-form {
      background: linear-gradient(180deg, var(--ink-2), var(--ink-1));
      border: 1px solid var(--line); border-radius: 16px; padding: clamp(1.6rem, 3vw, 2.4rem);
    }
    .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
    .form-group { margin-bottom: 1.15rem; }
    .form-group label { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; }
    .form-group input, .form-group select, .form-group textarea {
      width: 100%; background: #ffffff; border: 1px solid var(--line-2); border-radius: 9px;
      padding: 11px 14px; color: var(--text); font-family: var(--font); font-size: 15px; transition: border-color 0.2s, box-shadow 0.2s; outline: none;
    }
    .form-group input::placeholder, .form-group textarea::placeholder { color: var(--faint); }
    .form-group select option { background: var(--ink-2); color: var(--text); }
    .form-group input:focus, .form-group select:focus, .form-group textarea:focus {
      border-color: var(--accent); box-shadow: 0 0 0 3px rgba(70,196,184,0.16);
    }
    .form-group textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
    .form-submit {
      width: 100%; background: var(--accent); color: #ffffff; border: none; border-radius: 9px;
      padding: 14px; font-size: 15px; font-weight: 600; cursor: pointer; letter-spacing: 0.01em;
      transition: background 0.2s, transform 0.18s; font-family: var(--font);
    }
    .form-submit:hover { background: var(--accent-2); transform: translateY(-1px); }

    /* ---------- FOOTER ---------- */
    footer { border-top: 1px solid var(--line); text-align: center; padding: 2rem var(--pad); }
    footer p { color: var(--faint); font-size: 13px; }
    footer a { color: var(--faint); text-decoration: none; }
    footer a:hover { color: var(--muted); }

    /* ---------- SCROLL REVEAL ---------- */
    .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16,1,0.3,1); }
    .reveal.in { opacity: 1; transform: none; }

    /* ---------- RESPONSIVE ---------- */
    @media (max-width: 1000px) {
      #hero { grid-template-columns: 1fr; min-height: auto; padding-top: 110px; gap: 2.5rem; }
      .hero-image-placeholder { order: 2; }
      .about-grid { grid-template-columns: 1fr; }
      #about img { position: static; max-width: 360px; }
      .contact-grid { grid-template-columns: 1fr; }
    }
    @media (max-width: 780px) {
      .services-grid { grid-template-columns: 1fr; }
      .cred-strip { grid-template-columns: 1fr; }
      .cred-col { padding: 1.2rem 0; }
      .cred-col + .cred-col { padding-left: 0; border-left: none; border-top: 1px solid var(--line); }
    }
    @media (max-width: 680px) {
      .nav-links { display: none; }
      .nav-links.open {
        display: flex; flex-direction: column; gap: 0; position: fixed; top: 70px; left: 0; right: 0;
        background: rgba(246,248,251,0.98); padding: 0.5rem 0; border-bottom: 1px solid var(--line);
      }
      .nav-links.open a { padding: 13px var(--pad); display: block; }
      .nav-links.open a::after { display: none; }
      .hamburger { display: flex; }
      .form-row { grid-template-columns: 1fr; }
    }
    @media (prefers-reduced-motion: reduce) {
      html { scroll-behavior: auto; }
      .reveal { opacity: 1; transform: none; transition: none; }
      * { animation: none !important; }
    }

    /* nav active state */
    .nav-links a.active { color: var(--text); }
    .nav-links a.active::after { width: 100%; }
    .nav-cta.active { border-color: var(--accent); }

    /* landing: short capabilities overview */
    #capabilities { max-width: var(--maxw); margin: 0 auto; }
    .cap-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; margin-bottom: 2rem; }
    .cap-head h2 { font-size: clamp(1.9rem,3.6vw,2.8rem); max-width: 20ch; }
    .cap-head a { white-space: nowrap; }
    .cap-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(2rem,5vw,4.5rem); border-top: 1px solid var(--line); }
    .cap-list li { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: baseline; padding: 1.15rem 0; border-bottom: 1px solid var(--line); }
    .cap-list li .n { font-family: var(--mono); font-size: 12px; color: var(--faint); }
    .cap-list li .t { font-family: var(--display); font-weight: 600; font-size: 1.12rem; color: var(--text); letter-spacing: -0.01em; }
    @media (max-width: 780px) { .cap-list { grid-template-columns: 1fr; } }

    /* subpage hero offset (no full hero, content starts under fixed nav) */
    .page-head { max-width: var(--maxw); margin: 0 auto; padding: 140px var(--pad) 0; }
    .page-head .kicker { margin-bottom: 1.4rem; }
    .page-head h1 { font-size: clamp(2.4rem,5vw,3.6rem); line-height: 1.04; margin-bottom: 1.1rem; }
    .page-head p { color: var(--muted); font-size: 1.1rem; max-width: 60ch; }

.about-bio { color: var(--muted); font-size: 1.12rem; line-height: 1.66; max-width: 58ch; margin-top: 1.3rem; }

/* light-mode elevation polish */
.atlas-teaser-inner { box-shadow: 0 24px 60px -34px rgba(15,27,45,0.26); }
.contact-form { box-shadow: 0 24px 60px -36px rgba(15,27,45,0.18); }
