/* ================================================
   HEITZ SYSTEMS — Vintage IBM Terminal Aesthetic
   ================================================ */
:root {
    --orange:       #E8610A;
    --orange-light: #FF8C42;
    --orange-dim:   #9B3F05;
    --black:        #0A0A0A;
    --dark:         #111111;
    --dark2:        #1A1A1A;
    --dark3:        #242424;
    --mid:          #333333;
    --grey:         #666666;
    --light-grey:   #999999;
    --off-white:    #E8E0D5;
    --white:        #F5F0E8;
    --scan-line:    rgba(255,255,255,0.012);
    --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
    --font-sans: 'IBM Plex Sans', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    background-color: var(--black);
    color: var(--off-white);
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image: repeating-linear-gradient(0deg, transparent, transparent 2px, var(--scan-line) 2px, var(--scan-line) 4px);
}

/* HEADER */
#site-header {
    position: sticky; top: 0; z-index: 100;
    background: var(--dark);
    border-bottom: 2px solid var(--orange);
    box-shadow: 0 0 30px rgba(232,97,10,0.2);
}
.header-inner {
    max-width: 1200px; margin: 0 auto;
    padding: 0 2rem;
    display: flex; align-items: center; justify-content: space-between;
    height: 80px;
}
.header-scanline { height: 1px; background: linear-gradient(90deg, transparent, var(--orange), transparent); opacity: 0.35; }

/* LOGO */
.logo-link { text-decoration: none; display: inline-block; }
.logo { display: flex; align-items: center; }
.logo-img-wrap {
    position: relative;
    display: inline-block;
}
.logo-img {
    height: 52px;
    width: auto;
    display: block;
    transition: filter 0.2s ease;
    filter: drop-shadow(0 0 8px rgba(232,97,10,0.35));
}
.logo-link:hover .logo-img {
    filter: drop-shadow(0 0 14px rgba(232,97,10,0.65));
}
.logo-systems {
    font-family: 'Caveat', 'Segoe Script', cursive;
    font-size: 1.45rem;
    font-weight: 600;
    color: var(--off-white);
    position: absolute;
    bottom: 4px;
    left: 8px;
    line-height: 1;
    opacity: 0.95;
    letter-spacing: 0.52em;
    pointer-events: none;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.85), -1px -1px 2px rgba(0,0,0,0.6);
}

/* NAV */
#main-nav { display: flex; align-items: center; }
.nav-list { list-style: none; display: flex; gap: 0; }
.nav-item {
    display: block; padding: 0.45rem 1.1rem;
    font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500;
    letter-spacing: 0.15em; text-decoration: none; color: var(--light-grey);
    text-transform: uppercase; border: 1px solid transparent;
    transition: color 0.2s, border-color 0.2s, background 0.2s; position: relative;
}
.nav-item::before {
    content: attr(data-label); position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: var(--orange); opacity: 0; transition: opacity 0.2s;
    font-size: 0.72rem; letter-spacing: 0.15em;
}
.nav-item:hover { color: transparent; border-color: var(--orange); background: rgba(232,97,10,0.06); }
.nav-item:hover::before { opacity: 1; }
.nav-item.active { color: var(--orange); border-color: var(--orange); background: rgba(232,97,10,0.08); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--orange); transition: transform 0.3s; }

/* PAGE SECTIONS */
.page-content { flex: 1; max-width: 1200px; width: 100%; margin: 0 auto; padding: 3rem 2rem; display: none; }
.page-content.active-page { display: block; }

/* HERO */
.hero { min-height: 68vh; display: flex; flex-direction: column; justify-content: center; padding: 4rem 0; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: radial-gradient(ellipse 60% 50% at 80% 50%, rgba(232,97,10,0.07) 0%, transparent 70%); pointer-events: none; }
.hero-tag { font-size: 0.68rem; letter-spacing: 0.4em; color: var(--orange); text-transform: uppercase; margin-bottom: 1.5rem; display: flex; align-items: center; gap: 1rem; }
.hero-tag::before { content: ''; display: inline-block; width: 30px; height: 1px; background: var(--orange); }
.hero-title { font-family: var(--font-mono); font-size: clamp(2.5rem, 5.5vw, 5rem); font-weight: 700; line-height: 1.0; color: var(--white); margin-bottom: 2rem; letter-spacing: -0.02em; }
.hero-title .accent { color: var(--orange); }
.hero-subtitle { font-size: 0.9rem; color: var(--grey); max-width: 480px; line-height: 1.95; margin-bottom: 3rem; }
.hero-cta { display: inline-block; padding: 0.9rem 2.2rem; border: 2px solid var(--orange); color: var(--orange); font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.2em; text-decoration: none; text-transform: uppercase; transition: background 0.2s, color 0.2s; position: relative; overflow: hidden; cursor: pointer; background: transparent; }
.hero-cta::after { content: ''; position: absolute; inset: 0; background: var(--orange); transform: translateX(-101%); transition: transform 0.25s ease; z-index: -1; }
.hero-cta:hover { color: var(--black); }
.hero-cta:hover::after { transform: translateX(0); }

.cursor { display: inline-block; width: 0.6em; height: 0.9em; background: var(--orange); vertical-align: text-bottom; animation: blink 1s step-end infinite; margin-left: 4px; }
@keyframes blink { 0%,100%{opacity:1}50%{opacity:0} }

/* SECTION HEADERS */
.section-header { margin-bottom: 3rem; padding-bottom: 1rem; border-bottom: 1px solid var(--mid); position: relative; }
.section-header::after { content: ''; position: absolute; bottom: -1px; left: 0; width: 80px; height: 2px; background: var(--orange); }
.section-label { font-size: 0.63rem; letter-spacing: 0.4em; color: var(--orange-dim); text-transform: uppercase; margin-bottom: 0.5rem; }
.section-title { font-family: var(--font-mono); font-size: clamp(1.6rem, 3vw, 2.5rem); font-weight: 700; color: var(--white); letter-spacing: -0.01em; }

/* CARDS */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1px; background: var(--mid); border: 1px solid var(--mid); margin-top: 2rem; }
.card { background: var(--dark); padding: 2rem; transition: background 0.2s; }
.card:hover { background: var(--dark2); }
.card-number { font-size: 0.63rem; color: var(--orange-dim); letter-spacing: 0.2em; margin-bottom: 1rem; }
.card-icon { font-size: 1.8rem; margin-bottom: 1rem; display: block; }
.card-title { font-family: var(--font-mono); font-size: 0.95rem; font-weight: 600; color: var(--orange); margin-bottom: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
.card-body { font-size: 0.78rem; color: var(--light-grey); line-height: 1.9; }
.divider { border: none; border-top: 1px solid var(--dark3); margin: 3rem 0; }

/* ABOUT */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; margin-top: 2rem; }
.about-text p { font-size: 0.83rem; color: var(--light-grey); line-height: 2; margin-bottom: 1.5rem; }
.about-text p strong { color: var(--orange); font-weight: 600; }
.about-stat-list { list-style: none; border: 1px solid var(--mid); }
.about-stat-list li { padding: 1rem 1.2rem; border-bottom: 1px solid var(--mid); display: flex; justify-content: space-between; align-items: center; font-size: 0.78rem; }
.about-stat-list li:last-child { border-bottom: none; }
.stat-label { color: var(--grey); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.68rem; }
.stat-value { color: var(--orange); font-weight: 600; }
.stat-value a { color: var(--orange); text-decoration: none; }
.terminal-line { font-size: 0.7rem; color: var(--grey); padding: 0.4rem 0; border-bottom: 1px solid var(--dark3); }
.terminal-line .prompt { color: var(--orange); margin-right: 0.5rem; }
.quote-box { margin-top: 2rem; background: var(--dark2); border: 1px solid var(--mid); padding: 1.5rem; }
.quote-box p { font-size: 0.82rem; color: var(--light-grey); line-height: 1.9; }
.quote-attr { margin-top: 1rem; font-size: 0.7rem; color: var(--orange); }

/* SKILLS */
.skills-section { margin-bottom: 3rem; }
.skill-category { font-size: 0.63rem; letter-spacing: 0.4em; color: var(--orange); text-transform: uppercase; margin-bottom: 1.5rem; margin-top: 2.5rem; }
.skill-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.5rem; }
.skill-item { background: var(--dark2); border: 1px solid var(--mid); padding: 0.7rem 1rem; display: flex; align-items: center; gap: 0.8rem; font-size: 0.78rem; color: var(--off-white); transition: border-color 0.2s, background 0.2s, color 0.2s; cursor: default; }
.skill-item:hover { border-color: var(--orange); background: var(--dark3); color: var(--orange); }
.skill-item::before { content: '▸'; color: var(--orange); font-size: 0.7rem; flex-shrink: 0; }
.skill-bar-row { display: grid; grid-template-columns: 150px 1fr 45px; align-items: center; gap: 1rem; margin-bottom: 0.9rem; font-size: 0.75rem; }
.skill-bar-label { color: var(--off-white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.skill-bar-track { height: 4px; background: var(--mid); position: relative; }
.skill-bar-fill { position: absolute; top: 0; left: 0; bottom: 0; background: var(--orange); width: 0; transition: width 1.2s cubic-bezier(0.16,1,0.3,1); }
.skill-bar-pct { color: var(--orange); font-size: 0.68rem; text-align: right; }

/* IMPRESSUM */
.impressum-block { background: var(--dark2); border-left: 3px solid var(--orange); padding: 2rem 2.5rem; margin-bottom: 2rem; max-width: 700px; }
.impressum-block h3 { font-size: 0.68rem; letter-spacing: 0.3em; color: var(--orange); text-transform: uppercase; margin-bottom: 1rem; }
.impressum-block p, .impressum-block address { font-style: normal; font-size: 0.82rem; color: var(--light-grey); line-height: 2; }
.impressum-block a { color: var(--orange); text-decoration: none; }
.impressum-block a:hover { text-decoration: underline; }

/* FOOTER */
#site-footer { background: var(--dark); border-top: 1px solid var(--mid); margin-top: auto; }
.footer-bar { height: 3px; background: linear-gradient(90deg, var(--orange), var(--orange-dim), transparent); }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 2rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.footer-logo-text { font-family: var(--font-mono); font-weight: 700; font-size: 1.2rem; color: var(--orange); letter-spacing: 0.15em; }
.footer-tagline { display: block; font-size: 0.58rem; color: var(--grey); letter-spacing: 0.25em; margin-top: 2px; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: 0.7rem; color: var(--grey); text-decoration: none; letter-spacing: 0.1em; transition: color 0.2s; cursor: pointer; }
.footer-links a:hover { color: var(--orange); }
.footer-copy { font-size: 0.7rem; color: var(--grey); }
.footer-copy a { color: var(--orange); text-decoration: none; }

/* ANIMATIONS */
@keyframes fadeInUp { from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)} }
.fade-in { animation: fadeInUp 0.6s ease both; }
.fade-in-delay-1{animation-delay:.1s}.fade-in-delay-2{animation-delay:.2s}
.fade-in-delay-3{animation-delay:.3s}.fade-in-delay-4{animation-delay:.4s}

/* CTA row */
.cta-row { display: flex; flex-wrap: wrap; gap: 2rem; align-items: center; justify-content: space-between; padding: 2rem 0; }

/* RESPONSIVE */
@media (max-width: 768px) {
    .header-inner { padding: 0 1rem; }
    .nav-toggle { display: flex; }
    .nav-list { position: absolute; top: 83px; left: 0; right: 0; background: var(--dark); border-bottom: 2px solid var(--orange); flex-direction: column; display: none; gap: 0; }
    .nav-list.open { display: flex; }
    .nav-item { border: none; border-bottom: 1px solid var(--mid); padding: 1rem 1.5rem; }
    .about-grid { grid-template-columns: 1fr; gap: 2rem; }
    .hero-title { font-size: 2.2rem; }
    .page-content { padding: 2rem 1rem; }
    .footer-inner { flex-direction: column; align-items: flex-start; }
}
/* =================== MAC CONTACT WIDGET =================== */

#mac-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 200;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: transform 0.2s ease;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
}

#mac-widget:hover {
    transform: scale(1.08) translateY(-3px);
    filter: drop-shadow(0 8px 20px rgba(232,97,10,0.4));
}

#mac-widget img {
    width: 64px;
    height: auto;
    display: block;
}

.mac-label {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    letter-spacing: 0.12em;
    color: var(--grey);
    text-transform: uppercase;
    text-align: center;
    line-height: 1;
}

/* =================== CONTACT MODAL =================== */

#contact-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 300;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

#contact-overlay.open {
    display: flex;
}

#contact-modal {
    background: var(--dark);
    border: 2px solid var(--orange);
    box-shadow: 0 0 40px rgba(232,97,10,0.25), 0 20px 60px rgba(0,0,0,0.8);
    width: 100%;
    max-width: 520px;
    margin: 1rem;
    position: relative;
    animation: modalIn 0.3s cubic-bezier(0.16,1,0.3,1) both;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.92) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-titlebar {
    background: var(--orange);
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--black);
    text-transform: uppercase;
}

.modal-close {
    background: var(--black);
    border: none;
    color: var(--orange);
    width: 18px;
    height: 18px;
    cursor: pointer;
    font-size: 0.8rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    transition: background 0.15s;
    flex-shrink: 0;
}

.modal-close:hover {
    background: var(--dark2);
}

.modal-body {
    padding: 2rem;
}

.modal-mac-header {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 1.8rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid var(--mid);
}

.modal-mac-header img {
    width: 48px;
    height: auto;
    flex-shrink: 0;
}

.modal-mac-text h3 {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--orange);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.2rem;
}

.modal-mac-text p {
    font-size: 0.72rem;
    color: var(--grey);
    line-height: 1.6;
}

.form-row {
    margin-bottom: 1.2rem;
}

.form-row label {
    display: block;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    color: var(--orange-dim);
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}

.form-row input,
.form-row textarea,
.form-row select {
    width: 100%;
    background: var(--dark2);
    border: 1px solid var(--mid);
    color: var(--off-white);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    padding: 0.7rem 0.9rem;
    outline: none;
    transition: border-color 0.2s;
    appearance: none;
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 2px rgba(232,97,10,0.12);
}

.form-row textarea {
    height: 110px;
    resize: vertical;
    line-height: 1.6;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-submit {
    width: 100%;
    padding: 0.9rem;
    background: transparent;
    border: 2px solid var(--orange);
    color: var(--orange);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    margin-top: 0.5rem;
    position: relative;
    overflow: hidden;
}

.form-submit::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--orange);
    transform: translateX(-101%);
    transition: transform 0.25s ease;
    z-index: -1;
}

.form-submit:hover {
    color: var(--black);
}

.form-submit:hover::after {
    transform: translateX(0);
}

.form-success {
    display: none;
    text-align: center;
    padding: 2rem 0;
}

.form-success .success-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.form-success h3 {
    font-family: var(--font-mono);
    color: var(--orange);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.form-success p {
    font-size: 0.8rem;
    color: var(--grey);
}

/* Nav contact link */
.nav-item.contact-nav {
    color: var(--orange);
    border-color: var(--orange);
}

@keyframes macWobble {
    0%   { transform: rotate(0deg) scale(1); }
    20%  { transform: rotate(-8deg) scale(1.05); }
    40%  { transform: rotate(6deg) scale(1.05); }
    60%  { transform: rotate(-4deg) scale(1.02); }
    80%  { transform: rotate(2deg) scale(1.01); }
    100% { transform: rotate(0deg) scale(1); }
}
