:root {
  --bg: #f4f4f1;
  --surface: #ffffff;
  --soft: #e9e9e4;
  --ink: #111310;
  --muted: #696b64;
  --dark: #111310;
  --dark-soft: #191b17;
  --line: rgba(17,19,16,.13);
  --accent: #c9f542;
  --accent-dark: #8da916;
  --max: 1180px;
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
  line-height: 1.65;
}
a { color: inherit; text-decoration: none; }
.section { max-width: var(--max); margin: auto; padding: 120px 28px; }
.site-header {
  position: sticky; top: 0; z-index: 20;
  height: 76px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; background: rgba(244,244,241,.84); backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.brand { font-family: "JetBrains Mono", monospace; font-weight: 600; letter-spacing: -.04em; }
.brand span { color: var(--accent-dark); }
.nav { display: flex; gap: 28px; font-size: .86rem; font-weight: 600; }
.nav a { opacity: .72; transition: .2s; }
.nav a:hover { opacity: 1; }
.menu-toggle { display:none; border:0; background:none; font-size:1.4rem; }

.hero {
  min-height: calc(100vh - 76px); display:grid; grid-template-columns: 1.1fr .9fr;
  align-items:center; gap:70px;
}
.eyebrow {
  margin: 0 0 18px; font: 600 .76rem "JetBrains Mono", monospace;
  text-transform: uppercase; letter-spacing: .12em; color: var(--muted);
}
.status-dot { display:inline-block; width:8px; height:8px; border-radius:50%; background:var(--accent-dark); margin-right:8px; }
h1,h2,h3,p { margin-top:0; }
h1 { font-size: clamp(3.8rem, 7vw, 7.3rem); line-height: .91; letter-spacing: -.075em; margin-bottom: 34px; }
h1 span { color: var(--muted); }
h2 { font-size: clamp(2.7rem, 5vw, 5rem); line-height: .96; letter-spacing: -.065em; margin-bottom: 22px; }
h3 { letter-spacing: -.035em; }
.hero-text { max-width: 650px; color: var(--muted); font-size: 1.08rem; }
.hero-actions { display:flex; gap:12px; margin-top:34px; }
.btn { padding: 13px 18px; border:1px solid var(--line); border-radius: 999px; font-weight:700; font-size:.9rem; }
.btn-primary { background:var(--ink); color:white; border-color:var(--ink); }
.btn-ghost { background:transparent; }
.btn span { margin-left:10px; color:var(--accent); }
.hero-card { background:var(--dark); color:#e8eadf; border-radius:var(--radius); padding:0; box-shadow: 0 30px 80px rgba(0,0,0,.14); overflow:hidden; transform:rotate(1deg); }
.terminal-bar { height:48px; display:flex; align-items:center; gap:7px; padding:0 18px; border-bottom:1px solid rgba(255,255,255,.08); }
.terminal-bar span { width:9px;height:9px;border-radius:50%;background:#555950; }
.terminal-bar small { margin-left:auto; font: .7rem "JetBrains Mono", monospace; color:#777c71; }
pre { margin:0; padding:32px; overflow:auto; font: 500 .85rem/2 "JetBrains Mono", monospace; }
code i { color:#9aa18e; font-style:normal; }
code b { color:var(--accent); font-weight:500; }

.tech-strip { display:grid; grid-template-columns:repeat(4,1fr); border-block:1px solid var(--line); padding:20px max(28px, calc((100% - var(--max))/2)); font:600 .75rem "JetBrains Mono",monospace; }
.tech-strip div { padding:10px 20px; border-left:1px solid var(--line); }
.tech-strip span { color:var(--muted); margin-right:14px; }

.two-col { display:grid; grid-template-columns:.75fr 1.25fr; gap:80px; align-items:center; }
.portrait-placeholder { aspect-ratio: 4/5; background:linear-gradient(135deg,#d5d8ce,#aeb4a7); border-radius:var(--radius); display:grid; place-items:center; overflow:hidden; }
.portrait-inner { width:72%; height:82%; border:1px dashed rgba(17,19,16,.35); display:grid; place-items:center; color:rgba(17,19,16,.55); font:600 .8rem "JetBrains Mono",monospace; text-align:center; }
.lead { font-size:1.45rem; line-height:1.35; }
.about-copy > p:not(.lead) { color:var(--muted); max-width:680px; }
.facts { margin-top:35px; display:grid; grid-template-columns:1fr 1fr; gap:1px; background:var(--line); border:1px solid var(--line); }
.facts div { background:var(--bg); padding:18px; }
.facts strong,.facts span { display:block; }
.facts span { color:var(--muted); font-size:.82rem; margin-top:3px; }

.section-dark { max-width:none; padding-inline:max(28px, calc((100% - var(--max))/2)); background:var(--dark); color:#f2f3eb; }
.section-dark .section-heading { max-width:var(--max); margin-inline:auto; }
.section-dark .eyebrow,.section-dark .section-heading p:last-child { color:#858a80; }
.project-grid { max-width:var(--max); margin:55px auto 0; display:grid; grid-template-columns:repeat(2,1fr); gap:18px; }
.project-card { background:var(--dark-soft); border:1px solid rgba(255,255,255,.09); border-radius:var(--radius); overflow:hidden; transition:.25s; }
.project-card:hover { transform:translateY(-5px); border-color:rgba(201,245,66,.45); }
.project-card.featured { grid-column:span 2; display:grid; grid-template-columns:1.25fr .75fr; }
.project-image { min-height:260px; display:grid; place-items:center; position:relative; overflow:hidden; background:#252920; }
.featured .project-image { min-height:360px; }
.project-image::before { content:""; position:absolute; width:190px;height:190px;border:1px solid rgba(201,245,66,.32); border-radius:50%; box-shadow:0 0 0 30px rgba(201,245,66,.04),0 0 0 60px rgba(201,245,66,.025); }
.project-image span { position:relative; font:600 .8rem "JetBrains Mono",monospace; letter-spacing:.16em; color:var(--accent); }
.project-light { background:radial-gradient(circle at 50% 50%,#9ca38e 0,#31352c 36%,#191b17 70%); }
.project-cloud { background:linear-gradient(145deg,#272b24,#121411); }
.project-candy { background:linear-gradient(145deg,#39352b,#171914); }
.project-ardu { background:linear-gradient(145deg,#2d3028,#111310); }
.project-content { padding:27px; }
.project-meta { display:flex; justify-content:space-between; color:#8c9187; font:600 .7rem "JetBrains Mono",monospace; text-transform:uppercase; letter-spacing:.08em; }
.project-content h3 { font-size:1.8rem; margin:13px 0 8px; }
.project-content p { color:#989d93; font-size:.92rem; }
.tags { display:flex; flex-wrap:wrap; gap:7px; }
.tags span { border:1px solid rgba(255,255,255,.13); border-radius:999px; padding:4px 9px; color:#b7bcb1; font: .68rem "JetBrains Mono",monospace; }

.engineering-grid { display:grid; grid-template-columns:1fr 1fr; gap:100px; }
.engineering-intro p:not(.lead) { color:var(--muted); max-width:540px; }
.tool-list { border-top:1px solid var(--line); }
.tool-list div { display:flex; justify-content:space-between; gap:20px; padding:18px 0; border-bottom:1px solid var(--line); }
.tool-list span { color:var(--muted); font: .72rem "JetBrains Mono",monospace; text-transform:uppercase; }
.tool-list b { font-size:.9rem; text-align:right; }

.section-soft { max-width:none; background:var(--soft); padding-inline:max(28px, calc((100% - var(--max))/2)); }
.section-soft .section-heading,.lab-list { max-width:var(--max); margin-inline:auto; }
.lab-list { margin-top:50px; border-top:1px solid var(--line); }
.lab-list article { display:grid; grid-template-columns:140px 1fr 30px; gap:30px; padding:25px 0; border-bottom:1px solid var(--line); }
.lab-list time { font: .72rem "JetBrains Mono",monospace; color:var(--muted); padding-top:5px; }
.lab-list h3 { margin-bottom:5px; }
.lab-list p { margin:0; color:var(--muted); font-size:.9rem; }
.lab-list article > span { font-size:1.3rem; }

.contact { display:grid; grid-template-columns:1fr 1fr; gap:80px; }
.contact > div:first-child p:last-child { color:var(--muted); max-width:500px; }
.contact-links { display:flex; flex-direction:column; justify-content:center; }
.contact-links a { display:flex; justify-content:space-between; padding:19px 0; border-bottom:1px solid var(--line); font-weight:600; }
.contact-links a span { color:var(--muted); }

footer { display:flex; justify-content:space-between; padding:25px max(28px, calc((100% - var(--max))/2)); border-top:1px solid var(--line); color:var(--muted); font: .68rem "JetBrains Mono",monospace; }

@media (max-width: 800px) {
  .nav { display:none; position:absolute; top:76px; left:0; right:0; flex-direction:column; padding:22px 28px; background:var(--bg); border-bottom:1px solid var(--line); }
  .nav.open { display:flex; }
  .menu-toggle { display:block; }
  .hero,.two-col,.engineering-grid,.contact { grid-template-columns:1fr; }
  .hero { padding-top:75px; }
  .hero-card { transform:none; }
  .tech-strip { grid-template-columns:1fr 1fr; }
  .project-grid { grid-template-columns:1fr; }
  .project-card.featured { grid-column:auto; display:block; }
  .featured .project-image { min-height:260px; }
  .lab-list article { grid-template-columns:90px 1fr 20px; gap:15px; }
  footer { flex-direction:column; gap:8px; }
}
@media (max-width: 500px) {
  .section { padding-block:80px; }
  h1 { font-size:3.45rem; }
  h2 { font-size:2.65rem; }
  .facts { grid-template-columns:1fr; }
  .tech-strip { grid-template-columns:1fr; }
}
/* CandySafe Video */

.project-video {
    margin-top: 70px;
    margin-bottom: 50px;
}

.project-video-wrapper {
    width: 100%;
    overflow: hidden;
    background: #000;
}

.project-video-wrapper video {
    display: block;
    width: auto;
    height: auto;
}

/* =========================================
   ROBOTERARM – LIVE CONTROL
   ========================================= */

.robot-live {
    margin-top: 50px;
    margin-bottom: 90px;
}

.robot-status {
    display: flex;
    gap: 25px;
    margin-bottom: 15px;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
}

.status-online {
    color: rgba(120, 255, 160, 0.9);
}


/* Kamera + Steuerung */

.robot-control-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 18px;

    padding: 18px;

    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.025);
}


/* =========================================
   LIVE CAMERA
   ========================================= */

.robot-camera {
    min-width: 0;
}

.robot-camera-screen {
    position: relative;

    width: 100%;
    aspect-ratio: 16 / 9;

    overflow: hidden;

    background: #050505;
    border: 1px solid rgba(255, 255, 255, 0.12);

    display: flex;
    align-items: center;
    justify-content: center;
}


/* später für den echten Stream */

.robot-camera-screen img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}


/* Platzhalter */

.camera-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;

    color: rgba(255, 255, 255, 0.35);

    font-size: 0.9rem;
    letter-spacing: 0.12em;
}

.camera-placeholder small {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    opacity: 0.6;
}


.camera-label {
    margin-top: 10px;

    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
}


/* =========================================
   CONTROL PANEL
   ========================================= */

.robot-controls {
    padding: 25px;

    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.02);

    display: flex;
    flex-direction: column;
}

.robot-controls h2 {
    margin: 0 0 8px;
}

.control-description {
    margin-top: 0;
    margin-bottom: 30px;

    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}


/* einzelne Achse */

.control-group {
    margin-bottom: 22px;
}

.control-group label {
    display: flex;
    justify-content: space-between;

    margin-bottom: 9px;

    font-size: 0.8rem;
}

.control-group label span {
    color: rgba(255, 255, 255, 0.4);
    font-family: monospace;
}


/* Slider */

.control-group input[type="range"] {
    width: 100%;

    cursor: pointer;
}


/* Gripper */

.gripper-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;

    margin-top: 5px;
}


/* Home */

.robot-home {
    width: 100%;
    margin-top: 12px;
}


/* Hinweis unter dem Live-Bereich */

.robot-live-hint {
    margin-top: 18px;

    text-align: center;

    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}


/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 800px) {

    .robot-control-grid {
        grid-template-columns: 1fr;
    }

    .robot-camera-screen {
        aspect-ratio: 16 / 9;
    }

    .robot-controls {
        padding: 20px;
    }

}.robot-3d {
    margin-top: 70px;
    margin-bottom: 70px;
}

.model-viewer-wrapper {
    width: 100%;
    min-height: 350px;

    overflow: hidden;

    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.025);
}

.model-viewer-wrapper model-viewer {
    display: block;

    width: 100%;
    height: 350px;

    background: transparent;
}

@media (max-width: 700px) {

    .model-viewer-wrapper {
        min-height: 350px;
    }

    .model-viewer-wrapper model-viewer {
        height: 350px;
    }

}
.robot-camera {
    width: 100%;
    margin-bottom: 2rem;
}

.robot-camera h2 {
    margin-bottom: 1rem;
}

.camera-wrapper {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.025);
}

.camera-wrapper img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}