/*
Theme Name: Andreas Krug Modern Portfolio
Theme URI: https://andreas-krug.at
Author: Andreas Krug
Author URI: https://andreas-krug.at
Description: A modern, creative portfolio theme with cyberpunk aesthetics.
Version: 1.0.0
Text Domain: andreaskrug
*/

/* Fonts (Local for GDPR compliance) */
@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('fonts/outfit-300.woff2') format('woff2');
}

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

@font-face {
    font-family: 'Space Mono';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/space-mono-italic-400.woff2') format('woff2');
}

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

:root {
    --bg-color: #050505;
    --card-bg: rgba(255, 255, 255, 0.05);
    --text-primary: #e6f1ff;
    --text-secondary: #8892b0;
    --accent: #64ffda; /* Teal/Cyan Neon */
    --accent-glow: rgba(100, 255, 218, 0.4);
    --font-heading: 'Outfit', sans-serif;
    --font-mono: 'Space Mono', monospace;
}

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

html {
    background-color: var(--bg-color);
}

html, body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
    overflow-x: hidden;
}

body {
    background-color: transparent;
    color: var(--text-primary);
    font-family: var(--font-heading);
    line-height: 1.6;
    cursor: default;
}

/* WP Admin Bar Fix */
.admin-bar header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar header {
        top: 46px;
    }
}

/* Canvas Background */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.6;
}

/* Typography & General */
h1, h2, h3, h4 {
    margin-bottom: 1rem;
    font-weight: 700;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    max-width: 60ch;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 0;
    backdrop-filter: blur(10px);
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-mono);
    letter-spacing: -1px;
}

.dot {
    color: var(--accent);
}

.contact-btn {
    padding: 0.5rem 1.5rem;
    border: 1px solid var(--accent);
    color: var(--accent);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.contact-btn:hover {
    background: var(--accent-glow);
    box-shadow: 0 0 10px var(--accent-glow);
}

/* Hero Section */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: left;
    position: relative;
}

.overline {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 1rem;
    margin-bottom: 1rem;
}

h1.glitch {
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 1.1;
    margin-bottom: 0.5rem;
    position: relative;
    color: var(--text-primary);
    animation: glitch-skew 1s infinite linear alternate-reverse;
}

h1.glitch::before, h1.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

h1.glitch::before {
    left: 2px;
    text-shadow: -2px 0 #ff00c1;
    clip-path: inset(44% 0 61% 0);
    animation: glitch-anim-1 2s infinite linear alternate-reverse;
}

h1.glitch::after {
    left: -2px;
    text-shadow: -2px 0 #00fff9;
    clip-path: inset(58% 0 43% 0);
    animation: glitch-anim-2 2s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% { clip-path: inset(20% 0 80% 0); }
    20% { clip-path: inset(60% 0 10% 0); }
    40% { clip-path: inset(40% 0 50% 0); }
    60% { clip-path: inset(80% 0 5% 0); }
    80% { clip-path: inset(10% 0 70% 0); }
    100% { clip-path: inset(30% 0 20% 0); }
}

@keyframes glitch-anim-2 {
    0% { clip-path: inset(10% 0 60% 0); }
    20% { clip-path: inset(30% 0 10% 0); }
    40% { clip-path: inset(70% 0 20% 0); }
    60% { clip-path: inset(20% 0 40% 0); }
    80% { clip-path: inset(60% 0 10% 0); }
    100% { clip-path: inset(40% 0 30% 0); }
}

@keyframes glitch-skew {
    0% { transform: skew(0deg); }
    20% { transform: skew(-2deg); }
    40% { transform: skew(2deg); }
    60% { transform: skew(0deg); }
    80% { transform: skew(-1deg); }
    100% { transform: skew(0deg); }
}

.subtitle {
    font-size: clamp(1.5rem, 4vw, 3rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* About Section Styles */
.grid-about {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 4rem;
    align-items: center;
}

.profile-image-container {
    position: relative;
}

.image-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    filter: brightness(0.9) contrast(1.1);
    transition: filter 0.5s ease;
}

.image-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--accent-glow), transparent);
    pointer-events: none;
    mix-blend-mode: overlay;
}

.profile-image-container:hover .image-wrapper,
.profile-image-container.active-trigger .image-wrapper {
    transform: scale(1.02) rotate(-1deg);
}

.profile-image-container:hover img,
.profile-image-container.active-trigger img {
    filter: brightness(1.1) contrast(1.2);
}

.intro-text {
    font-size: clamp(1rem, 3vw, 1.25rem);
    line-height: 1.6;
    margin-top: 1.5rem;
}

.intro-text p {
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
}

.intro-text p strong {
    color: var(--text-primary);
    font-weight: 500;
    border-bottom: 1px solid var(--accent-glow);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.mouse-icon, .hand-icon {
    color: var(--accent);
    opacity: 0.8;
}

/* Mouse Animation (Desktop) */
.mouse-icon .wheel {
    animation: scroll-wheel 1.5s infinite;
    transform-origin: center;
}

@keyframes scroll-wheel {
    0% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(6px); opacity: 1; }
    100% { transform: translateY(6px); opacity: 0; }
}

/* Mobile Scroll Animation */
.hand-icon {
    display: none;
}

/* Animate the pill moving down */
.scroll-pill {
    animation: pill-scroll 2s infinite ease-in-out;
}

@keyframes pill-scroll {
    0% { transform: translateY(0); opacity: 0; }
    20% { opacity: 1; }
    80% { transform: translateY(12px); opacity: 0; }
    100% { transform: translateY(0); opacity: 0; }
}

/* Responsive Switch */
@media (max-width: 768px), (hover: none) and (pointer: coarse) {
    .mouse-icon { display: none; }
    .hand-icon { display: block; }
}

.bio-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.bio-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    opacity: 0.4;
    transition: all 0.5s ease;
    filter: blur(0.5px) grayscale(80%);
}

.bio-item:hover,
.bio-item.active-trigger {
    opacity: 1;
    filter: blur(0) grayscale(0);
    transform: translateX(10px);
}

.bio-item .bullet {
    font-size: 1.5rem;
    line-height: 1;
}

.bio-item p {
    margin: 0;
    max-width: none;
    line-height: 1.5;
    color: var(--text-primary);
}

.bio-item strong {
    color: var(--accent);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* Sections General */
section {
    padding: 4rem 0;
    min-height: 60vh; 
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50%; 
    height: 2px;
    background: var(--accent);
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

/* Cards & Animations */
.card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.05); 
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.card .icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--accent);
    display: inline-block;
    transition: transform 0.3s ease;
}

/* Icon Specific Animations */
.card:hover .icon-lightning,
.card.active-trigger .icon-lightning {
    animation: lightning-shake 0.2s infinite;
}

.card:hover .icon-gear,
.card.active-trigger .icon-gear {
    animation: gear-rotate 2s infinite linear;
}

.card:hover .icon-brain,
.card.active-trigger .icon-brain {
    animation: brain-pulse 1.5s infinite ease-in-out;
}

@keyframes lightning-shake {
    0% { transform: translate(0,0) rotate(0); }
    25% { transform: translate(-2px, 1px) rotate(-5deg); }
    50% { transform: translate(2px, -1px) rotate(5deg); }
    75% { transform: translate(-1px, -1px) rotate(-2deg); }
    100% { transform: translate(0,0) rotate(0); }
}

@keyframes gear-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes brain-pulse {
    0% { transform: scale(1); filter: drop-shadow(0 0 0px var(--accent)); }
    50% { transform: scale(1.1); filter: drop-shadow(0 0 15px var(--accent-glow)); }
    100% { transform: scale(1); filter: drop-shadow(0 0 0px var(--accent)); }
}

.card h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.card p {
    color: var(--text-secondary);
    opacity: 0.4; /* Adjusted from 0.15 to 0.4 for better visibility */
    filter: blur(0.5px) grayscale(80%); /* Slightly less blur */
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    font-size: 0.95rem;
}

.card:hover p,
.card.active-trigger p {
    opacity: 1; /* Fully lights up */
    filter: blur(0px) grayscale(0%);
}

.card::before {
    content: "";
    position: absolute;
    top: var(--mouse-y, -100px);
    left: var(--mouse-x, -100px);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
}

.card:hover::before,
.card.active-trigger::before {
    opacity: 0.3;
}

.card:hover,
.card.active-trigger {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 20px 40px -20px rgba(2, 12, 27, 0.7);
}

.card .icon, .card h4, .card p {
    position: relative;
    z-index: 1; 
}

/* Stats */
.stats-block {
    display: flex;
    gap: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-item .number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent);
    font-family: var(--font-mono);
}

.stat-item .label {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Contact */
.contact-card {
    text-align: center;
    padding: 4rem;
    background: linear-gradient(145deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.05);
}

.contact-card p {
    margin-left: auto;
    margin-right: auto;
}

.contact-links {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-links a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    border-radius: 4px;
}

.contact-links a:hover {
    color: var(--accent);
    border-color: var(--accent-glow);
    background: rgba(100, 255, 218, 0.05);
}

/* Footer & Global Animations */
footer {
    padding: 2rem 0;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    position: relative;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-links .separator {
    color: var(--text-secondary);
    opacity: 0.5;
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
    }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* Responsive */
@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    h1.glitch {
        font-size: 3rem;
    }
    
    .grid-about {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .profile-image-container {
        max-width: 300px;
        margin: 0 auto;
    }

    .stats-block {
        margin-top: 3rem;
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    section {
        padding: 4rem 0;
    }

    .contact-card {
        padding: 2rem 1rem;
    }

    .contact-links {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .contact-links a {
        font-size: 1rem;
        width: 100%;
        justify-content: center;
        word-break: break-all;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.5rem;
    }
    
    .logo {
        font-size: 1.2rem;
    }

    .contact-btn {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
    }
}
