/* ============================================
   rothdev.ch - Elevated Dark Terminal Style
   ============================================ */

:root {
    --bg-primary: #0a0a0b;
    --bg-secondary: #111113;
    --bg-tertiary: #18181b;
    --bg-card: #141416;
    
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #52525b;
    
    --accent: #ef4444;
    --accent-glow: rgba(239, 68, 68, 0.4);
    --accent-soft: rgba(239, 68, 68, 0.1);
    
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    
    --font-display: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-display);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Grain Overlay */
.grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Grid Background */
.grid-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, black 40%, transparent 100%);
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6rem 4rem;
    position: relative;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 6rem;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.hero-content {
    animation: fadeInUp 0.8s var(--ease-out) both;
}

/* Status Bar */
.status-bar {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--accent-soft);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 100px;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s var(--ease-out) 0.1s both;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.status-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: var(--accent);
}

/* Title */
.hero-title {
    font-size: clamp(4rem, 12vw, 10rem);
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: -0.03em;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s var(--ease-out) 0.2s both;
}

.title-line {
    display: inline;
}

.title-accent {
    color: var(--accent);
    position: relative;
}

.title-accent::after {
    content: '';
    position: absolute;
    bottom: 0.1em;
    left: 0;
    right: 0;
    height: 0.08em;
    background: var(--accent);
    opacity: 0.3;
}

/* Terminal Block */
.terminal-block {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s var(--ease-out) 0.3s both;
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border);
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-muted);
}

.terminal-dot:first-child { background: #ef4444; }
.terminal-dot:nth-child(2) { background: #eab308; }
.terminal-dot:nth-child(3) { background: #22c55e; }

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: auto;
}

.terminal-body {
    padding: 1.25rem;
}

.terminal-line {
    font-family: var(--font-mono);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.prompt {
    color: var(--accent);
    font-weight: 600;
}

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

.cursor {
    color: var(--accent);
    animation: blink 1s step-end infinite;
}

/* Role & Description */
.hero-role {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
    animation: fadeInUp 0.8s var(--ease-out) 0.4s both;
}

.hero-desc {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 2.5rem;
    line-height: 1.7;
    animation: fadeInUp 0.8s var(--ease-out) 0.5s both;
}

/* Buttons */
.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s var(--ease-out) 0.6s both;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--accent);
    color: white;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    box-shadow: 0 0 0 0 var(--accent-glow);
}

.btn-primary svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s var(--ease-out);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-primary:hover svg {
    transform: translateX(4px);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    background: transparent;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
}

.btn-ghost:hover {
    background: var(--bg-secondary);
    border-color: var(--border-hover);
}

/* Hero Visual */
.hero-visual {
    position: relative;
    animation: fadeIn 1s var(--ease-out) 0.4s both;
}

.photo-frame {
    position: relative;
    aspect-ratio: 4/5;
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.frame-corner {
    position: absolute;
    width: 24px;
    height: 24px;
    border: 2px solid var(--accent);
    z-index: 2;
}

.frame-corner.tl { top: -4px; left: -4px; border-right: none; border-bottom: none; }
.frame-corner.tr { top: -4px; right: -4px; border-left: none; border-bottom: none; }
.frame-corner.bl { bottom: -4px; left: -4px; border-right: none; border-top: none; }
.frame-corner.br { bottom: -4px; right: -4px; border-left: none; border-top: none; }

.hero-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(20%);
    transition: filter 0.5s var(--ease-out);
}

.photo-frame:hover .hero-photo {
    filter: grayscale(0%);
}

.photo-glitch {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        transparent 0%,
        rgba(239, 68, 68, 0.03) 50%,
        transparent 100%
    );
    animation: scanline 8s linear infinite;
    pointer-events: none;
}

.photo-tag {
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.tag-label {
    color: var(--text-muted);
}

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

/* Scroll Hint */
.scroll-hint {
    position: absolute;
    bottom: 3rem;
    left: 4rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

.scroll-line {
    width: 60px;
    height: 1px;
    background: var(--text-muted);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent);
    animation: scrollLineMove 2s ease-in-out infinite;
}

/* ============================================
   Section Styles
   ============================================ */

section {
    padding: 8rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.section-number {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--accent);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.section-line {
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ============================================
   About Section
   ============================================ */

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

.about-text {
    max-width: 500px;
}

.about-text .lead {
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.about-text p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    line-height: 1.8;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.skill-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.3s var(--ease-out);
}

.skill-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.skill-icon {
    font-size: 1.25rem;
    color: var(--accent);
}

.skill-icon-svg {
    width: 20px;
    height: 20px;
    color: var(--accent);
}

.skill-name {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.skill-card:hover .skill-name {
    color: var(--text-primary);
}

/* Skill Tooltips */
.skill-card[data-tooltip] {
    position: relative;
}

.skill-card[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-hover);
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: normal;
    max-width: 280px;
    text-align: center;
    line-height: 1.5;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s var(--ease-out);
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

.skill-card[data-tooltip]::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    border: 6px solid transparent;
    border-top-color: var(--border-hover);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s var(--ease-out);
    z-index: 101;
}

.skill-card[data-tooltip]:hover::after,
.skill-card[data-tooltip]:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ============================================
   Testimonials Section
   ============================================ */

.testimonials {
    overflow: visible;
}

.testimonials-track {
    overflow: hidden;
    margin: 0 -4rem;
    padding: 0 4rem;
    mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}

.testimonials-slider {
    display: flex;
    gap: 1.5rem;
    animation: scroll 30s linear infinite;
    width: max-content;
}

.testimonials-slider:hover {
    animation-play-state: paused;
}

.testimonial-card {
    flex-shrink: 0;
    width: 400px;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    position: relative;
    transition: all 0.3s var(--ease-out);
}

.testimonial-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

.quote-mark {
    font-family: Georgia, serif;
    font-size: 4rem;
    color: var(--accent);
    opacity: 0.3;
    line-height: 1;
    margin-bottom: -1rem;
}

.testimonial-text {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.author-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.author-name {
    font-weight: 600;
    font-size: 0.9375rem;
}

.author-role {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============================================
   Footer
   ============================================ */

.footer {
    padding: 6rem 4rem 3rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.footer-logo .accent {
    color: var(--accent);
}

.footer-tagline {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    transition: all 0.3s var(--ease-out);
}

.footer-link svg {
    width: 18px;
    height: 18px;
}

.footer-link:hover {
    color: var(--text-primary);
    border-color: var(--accent);
    background: var(--accent-soft);
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.footer-separator {
    color: var(--text-muted);
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes scanline {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

@keyframes scrollLineMove {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1024px) {
    .hero {
        padding: 4rem 2rem;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        gap: 4rem;
    }
    
    .hero-visual {
        max-width: 400px;
        margin: 0 auto;
    }
    
    section {
        padding: 6rem 2rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .scroll-hint {
        left: 2rem;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .testimonial-card {
        width: 320px;
    }
    
    .footer {
        padding: 4rem 2rem 2rem;
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .footer-links {
        flex-direction: column;
        width: 100%;
    }
    
    .footer-link {
        justify-content: center;
    }
}
