/* ======================
   Portfolio Theme Main CSS - Responsive
   ====================== */

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

html, body {
    width: 100%;
    overflow-x: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html { height: 100%; }

body {
    min-height: 100vh;
    min-height: 100dvh;
}

/* Startseite */
body.portfolio-home {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: #fff;
}

@media (max-width: 1024px) {
    body.portfolio-home {
        background-attachment: scroll;
    }
}

body.portfolio-inner {
    background: #111;
    color: #fff;
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    z-index: 100;
    pointer-events: none;
}

.site-header > * { pointer-events: auto; }

/* Hamburger */
.hamburger-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
    position: relative;
    z-index: 200;
    flex-shrink: 0;
}

.hamburger-btn span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--hamburger-color, #fff);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-btn.active span:nth-child(1) { transform: translateY(13px) rotate(45deg); }
.hamburger-btn.active span:nth-child(2) { opacity: 0; }
.hamburger-btn.active span:nth-child(3) { transform: translateY(-13px) rotate(-45deg); }

/* Titel */
.site-title-wrapper {
    text-align: right;
    flex: 1;
    min-width: 0;
}

.site-title {
    color: var(--title-color, #fff);
    font-size: clamp(1rem, 3.5vw, 1.8rem);
    font-weight: 300;
    letter-spacing: 2px;
    margin: 0;
    line-height: 1.2;
    word-break: break-word;
}

/* Gelber Pfeil */
.menu-arrow {
    position: fixed;
    top: 28px;
    left: 80px;
    width: 60px;
    height: 30px;
    opacity: 0;
    pointer-events: none;
    z-index: 99;
    transition: opacity 0.3s;
}

.menu-arrow.visible {
    opacity: 1;
    animation: pulse-arrow 1.2s ease-in-out infinite;
}

.menu-arrow svg {
    width: 100%;
    height: 100%;
    display: block;
}

@keyframes pulse-arrow {
    0%, 100% { transform: translateX(0) scale(1); opacity: 1; }
    50%      { transform: translateX(-8px) scale(1.1); opacity: 0.6; }
}

/* Menü */
.main-nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    background-color: var(--menu-bg-color, #000);
    padding: 80px 30px 30px;
    transition: left 0.4s ease;
    z-index: 150;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.main-nav.open { left: 0; }

.main-nav .nav-menu { list-style: none; }
.main-nav .nav-menu li { margin-bottom: 18px; }

.main-nav .nav-menu a {
    color: var(--menu-text-color, #fff);
    text-decoration: none;
    font-size: 1.2rem;
    letter-spacing: 1px;
    transition: opacity 0.2s;
    display: block;
    padding: 8px 0;
}

.main-nav .nav-menu a:hover,
.main-nav .nav-menu a:focus { opacity: 0.6; }

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--menu-text-color, #fff);
    font-size: 2.2rem;
    cursor: pointer;
    line-height: 1;
    padding: 8px 12px;
}

.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 140;
}

.nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Inhaltsseiten */
.site-main { width: 100%; }

.content-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 120px 30px 50px;
}

.content-wrapper h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 20px;
    font-weight: 300;
}

.entry-content {
    line-height: 1.7;
    font-size: 1.05rem;
}

.entry-content p { margin-bottom: 1em; }
.entry-content img { max-width: 100%; height: auto; }

.post-meta { opacity: 0.6; margin-bottom: 20px; }
.post-thumb { margin-bottom: 25px; }
.post-thumb img { width: 100%; height: auto; border-radius: 4px; }
.back-link { color: inherit; opacity: 0.7; }
.back-link:hover { opacity: 1; }

/* Responsive */
@media (max-width: 1024px) {
    .site-header { padding: 22px 25px; }
}

@media (max-width: 768px) {
    .site-header { padding: 18px 20px; }
    .hamburger-btn { width: 34px; height: 26px; }
    .hamburger-btn span { height: 2.5px; }
    .hamburger-btn.active span:nth-child(1) { transform: translateY(11.5px) rotate(45deg); }
    .hamburger-btn.active span:nth-child(3) { transform: translateY(-11.5px) rotate(-45deg); }
    .site-title { letter-spacing: 1px; }
    .menu-arrow { top: 22px; left: 65px; width: 50px; height: 25px; }
    .content-wrapper { padding: 90px 20px 40px; }
}

@media (max-width: 480px) {
    .site-header { padding: 15px 16px; }
    .hamburger-btn { width: 30px; height: 22px; }
    .hamburger-btn.active span:nth-child(1) { transform: translateY(9.5px) rotate(45deg); }
    .hamburger-btn.active span:nth-child(3) { transform: translateY(-9.5px) rotate(-45deg); }
    .menu-arrow { top: 18px; left: 55px; width: 42px; height: 22px; }
    .main-nav { padding: 70px 25px 25px; }
    .main-nav .nav-menu a { font-size: 1.1rem; }
    .content-wrapper { padding: 80px 16px 30px; }
    .entry-content { font-size: 1rem; }
}

@media (max-height: 480px) and (orientation: landscape) {
    .main-nav { padding-top: 60px; }
    .main-nav .nav-menu li { margin-bottom: 10px; }
    .main-nav .nav-menu a { font-size: 1rem; padding: 4px 0; }
}
