/* ==========================================================================
   Markus Pauschenwein - Personal Website Styles
   ========================================================================== */

/* ==========================================================================
   CSS Custom Properties (Variables)
   ========================================================================== */
:root {
    /* Color Palette from colors.md */
    --about-primary: #1E3A8A;
    --about-accent: #60A5FA;
    --experience-primary: #16A34A;
    --experience-accent: #D9F99D;
    --skills-primary: #6B21A8;
    --skills-accent: #C084FC;
    --projects-primary: #BE123C;
    --projects-accent: #F472B6;
    --contact-primary: #F59E0B;
    --contact-accent: #FDE68A;
    
    /* Light mode colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --card-bg: #ffffff;
    --nav-bg: rgba(255, 255, 255, 0.9);

    /* Utility color variables (used throughout) */
    --electric-blue: #00D4FF;
    --acid-green: #A7F432;

    /* Safe area defaults (overridden where supported) */
    --safe-top: 0px;
    --safe-bottom: 0px;
}

/* Dark mode colors */
[data-theme="dark"] {
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --border-color: #374151;
    --card-bg: #1f2937;
    --nav-bg: rgba(17, 24, 39, 0.9);
}

/* Use device safe-area insets when available (iOS notch, etc.) */
@supports (padding: max(0px)) {
    :root {
        --safe-top: env(safe-area-inset-top);
        --safe-bottom: env(safe-area-inset-bottom);
    }
}

/* ==========================================================================
   Base Styles
   ========================================================================== */
body {
    font-family: 'Geist', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}

/* Typography */
.font-geist {
    font-family: 'Geist', sans-serif;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.text-electric-blue {
    color: var(--electric-blue);
}

.text-acid-green {
    color: var(--acid-green);
}

.bg-electric-blue {
    background-color: var(--electric-blue);
}

.bg-acid-green {
    background-color: var(--acid-green);
}

.border-electric-blue {
    border-color: var(--electric-blue);
}

.border-acid-green {
    border-color: var(--acid-green);
}

/* Mobile safe-area helpers */
.nav-safe {
    padding-top: var(--safe-top);
}

.safe-area-bottom {
    padding-bottom: var(--safe-bottom);
}

/* Dark mode color classes */
.bg-primary {
    background-color: var(--bg-primary);
}

.bg-secondary {
    background-color: var(--bg-secondary);
}

.bg-card {
    background-color: var(--card-bg);
}

.bg-nav {
    background-color: var(--nav-bg);
}

.text-primary {
    color: var(--text-primary);
}

.text-secondary {
    color: var(--text-secondary);
}

.border-border-color {
    border-color: var(--border-color);
}

/* ==========================================================================
   Section Background Classes
   ========================================================================== */
.bg-about {
    background: linear-gradient(to right, var(--about-primary), var(--about-accent));
    border-radius: 10px;
}

.bg-experience {
    background: linear-gradient(to right, var(--experience-primary), var(--experience-accent));
    border-radius: 10px;
}

.bg-skills {
    background: linear-gradient(to right, var(--skills-primary), var(--skills-accent));
    border-radius: 10px;
}

.bg-projects {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    /* Battlefield-like cool, cinematic slate */
    background-color: #0b1220; /* deep navy */
    /* Default tint/glow variables (overridable per-card) */
    --proj-base-top: #0a0f1d;
    --proj-base-bottom: #0c1324;
    --proj-vignette: rgba(0, 0, 0, 0.45);
    /* highlight radials (colors/positions overridable) */
    --proj-highlight1-color: rgba(147, 197, 253, 0.18);
    --proj-highlight2-color: rgba(59, 130, 246, 0.16);
    --proj-highlight1-pos: 15% 20%;
    --proj-highlight2-pos: 85% 80%;
    --proj-tint-left-strong: rgba(20, 184, 166, 0.22);   /* teal strong */
    --proj-tint-left-soft: rgba(20, 184, 166, 0.10);
    --proj-tint-right-soft: rgba(255, 173, 72, 0.10);    /* amber soft */
    --proj-tint-right-strong: rgba(255, 173, 72, 0.22);
    --proj-glow-left: rgba(20, 184, 166, 0.18);
    --proj-glow-right: rgba(255, 173, 72, 0.18);
    background-image:
        /* cinematic tint across the card (customizable via CSS vars) */
        linear-gradient(90deg,
            var(--proj-tint-left-strong) 0%,
            var(--proj-tint-left-soft) 40%,
            var(--proj-tint-right-soft) 60%,
            var(--proj-tint-right-strong) 100%
        ),
        radial-gradient(700px 500px at var(--proj-highlight1-pos), var(--proj-highlight1-color) 0%, rgba(0, 0, 0, 0) 55%), /* highlight 1 */
        radial-gradient(800px 560px at var(--proj-highlight2-pos), var(--proj-highlight2-color) 0%, rgba(0, 0, 0, 0) 55%), /* highlight 2 */
        linear-gradient(180deg, var(--proj-base-top) 0%, var(--proj-base-bottom) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.bg-projects::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    /* subtle atmosphere + depth */
    background-image:
        radial-gradient(60% 40% at 20% 25%, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0) 70%),
        radial-gradient(70% 50% at 15% 25%, var(--proj-glow-left), rgba(0, 0, 0, 0) 70%), /* left glow */
        radial-gradient(70% 50% at 85% 70%, var(--proj-glow-right), rgba(0, 0, 0, 0) 75%), /* right glow */
        radial-gradient(70% 60% at 50% 50%, rgba(0, 0, 0, 0) 60%, var(--proj-vignette) 100%); /* vignette */
    mix-blend-mode: screen;
}

.bg-projects::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    /* very subtle star/noise speckles */
    background-image:
        radial-gradient(1.5px 1.5px at 20% 30%, rgba(255,255,255,0.25), rgba(255,255,255,0)),
        radial-gradient(1.2px 1.2px at 65% 55%, rgba(255,255,255,0.18), rgba(255,255,255,0)),
        radial-gradient(1px 1px at 40% 80%, rgba(255,255,255,0.14), rgba(255,255,255,0));
    opacity: 0.07;
}

/* Typography inside projects card to match image tone */
.bg-projects h3 {
    color: #ffffff;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

.bg-projects p {
    color: rgba(226, 232, 240, 0.88); /* slate-200/90 */
}

/* Per-card color tints to reflect media imagery */
.projects-tint-wine {
    /* Purple gradient inspired by neunweine.at header */
    --proj-tint-left-strong: rgba(90, 71, 102, 0.28);   /* #5A4766 */
    --proj-tint-left-soft: rgba(90, 71, 102, 0.14);
    --proj-tint-right-soft: rgba(61, 46, 80, 0.14);     /* #3D2E50 */
    --proj-tint-right-strong: rgba(61, 46, 80, 0.28);
    --proj-glow-left: rgba(90, 71, 102, 0.22);
    --proj-glow-right: rgba(61, 46, 80, 0.22);
}

.projects-tint-franzl {
    /* druck.at brand-inspired brighter yellow → deeper red */
    --proj-tint-left-strong: rgba(255, 214, 10, 0.30);   /* brighter yellow */
    --proj-tint-left-soft: rgba(255, 214, 10, 0.16);
    --proj-tint-right-soft: rgba(215, 0, 21, 0.16);      /* deeper red */
    --proj-tint-right-strong: rgba(215, 0, 21, 0.30);
    --proj-glow-left: rgba(255, 214, 10, 0.24);
    --proj-glow-right: rgba(215, 0, 21, 0.24);
    /* lighten base and reduce vignette for brighter card */
    --proj-base-top: #1a1a1a;
    --proj-base-bottom: #1f1f1f;
    --proj-vignette: rgba(0, 0, 0, 0.25);
    /* replace blue highlights with brand highlights */
    --proj-highlight1-color: rgba(255, 214, 10, 0.28);
    --proj-highlight2-color: rgba(215, 0, 21, 0.24);
    --proj-highlight1-pos: 20% 25%;
    --proj-highlight2-pos: 80% 70%;
}

.projects-tint-caisha {
    /* more saturated pinks to reflect CAISHA imagery */
    --proj-tint-left-strong: rgba(236, 72, 153, 0.34);  /* hot pink */
    --proj-tint-left-soft: rgba(236, 72, 153, 0.18);
    --proj-tint-right-soft: rgba(249, 168, 212, 0.16);  /* soft pink */
    --proj-tint-right-strong: rgba(249, 168, 212, 0.32);
    --proj-glow-left: rgba(236, 72, 153, 0.26);
    --proj-glow-right: rgba(249, 168, 212, 0.24);
}

/* Neon palette for crypto fundraising card */
.projects-tint-crypto {
    /* vivid neon cyan/magenta blend */
    --proj-tint-left-strong: rgba(0, 255, 204, 0.32);
    --proj-tint-left-soft: rgba(0, 255, 170, 0.16);
    --proj-tint-right-soft: rgba(255, 0, 170, 0.16);
    --proj-tint-right-strong: rgba(255, 0, 200, 0.30);
    --proj-glow-left: rgba(0, 255, 230, 0.26);
    --proj-glow-right: rgba(255, 0, 180, 0.24);
    --proj-highlight1-color: rgba(0, 255, 200, 0.25);
    --proj-highlight2-color: rgba(255, 0, 200, 0.20);
    --proj-base-top: #0a0f1d;
    --proj-base-bottom: #0b1024;
    --proj-vignette: rgba(0, 0, 0, 0.35);
}

/* Professional grey-white palette for Masimi agency */
.projects-tint-masimi {
    /* professional grey-white blend */
    --proj-tint-left-strong: rgba(156, 163, 175, 0.28);  /* gray-400 */
    --proj-tint-left-soft: rgba(156, 163, 175, 0.14);
    --proj-tint-right-soft: rgba(229, 231, 235, 0.14);   /* gray-200 */
    --proj-tint-right-strong: rgba(229, 231, 235, 0.28);
    --proj-glow-left: rgba(156, 163, 175, 0.22);
    --proj-glow-right: rgba(229, 231, 235, 0.22);
    --proj-highlight1-color: rgba(156, 163, 175, 0.18);
    --proj-highlight2-color: rgba(229, 231, 235, 0.16);
}

.bg-contact {
    background: linear-gradient(to right, var(--contact-primary), var(--contact-accent));
    border-radius: 10px;
}

/* ==========================================================================
   Work Section Styles
   ========================================================================== */
.work-main-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d1b69 50%, #1a1a1a 100%);
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.work-main-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 165, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(138, 43, 226, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 20px 20px;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(1deg); }
}

.work-secondary-section {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.work-secondary-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.05) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.work-secondary-section:hover::before {
    transform: translateX(100%);
}

.work-secondary-section:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

/* ==========================================================================
   Color Theme Classes
   ========================================================================== */
.text-about-primary {
    color: var(--about-primary);
}

.text-experience-primary {
    color: var(--experience-primary);
}

.text-skills-primary {
    color: var(--skills-primary);
}

.text-projects-primary {
    color: var(--projects-primary);
}

.text-contact-primary {
    color: var(--contact-primary);
}

/* ==========================================================================
   Interactive Elements
   ========================================================================== */
.hover-glow:hover {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.typing-animation {
    border-right: 2px solid var(--electric-blue);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { border-color: transparent; }
    51%, 100% { border-color: var(--electric-blue); }
}

/* ==========================================================================
   Timeline Styles
   ========================================================================== */
.timeline-item {
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--electric-blue);
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: -14px;
    top: 12px;
    width: 4px;
    height: calc(100% + 20px);
    background: var(--electric-blue);
}

.timeline-item:last-child::after {
    display: none;
}

/* ==========================================================================
   Navigation Components
   ========================================================================== */
/* Dark mode toggle */
.dark-mode-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    transition: background-color 0.3s ease;
}

.dark-mode-toggle:hover {
    background-color: var(--border-color);
}

.dark-mode-toggle svg {
    width: 20px;
    height: 20px;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

/* Language switcher */
.language-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 2px;
}

.language-toggle:hover {
    background-color: var(--border-color);
}

.lang-btn {
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    color: var(--text-secondary);
}

.lang-btn.active {
    background-color: var(--about-primary);
    color: white;
}

.lang-btn:hover:not(.active) {
    color: var(--text-primary);
}

/* ==========================================================================
   Logo and Icon Styles
   ========================================================================== */
.logo {
    height: 32px;
    width: auto;
    transition: filter 0.3s ease;
}

/* Icon base styles */
.icon {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-lg {
    width: 32px;
    height: 32px;
}

.icon-xl {
    width: 48px;
    height: 48px;
}

.icon-2xl {
    width: 64px;
    height: 64px;
}

/* ==========================================================================
   Global Transitions
   ========================================================================== */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Inform the browser about supported color schemes for form controls, etc. */
:root {
    color-scheme: light dark;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
