@import url("https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@300;400;500;600&display=swap");

:root {
    --bg-color: #000000;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.72);
    --accent: rgba(255, 255, 255, 0.9);
    
    /* Portfolio Aesthetic Surfaces - Brighter */
    --card-surface: rgba(255, 255, 255, 0.036);
    --card-surface-hover: rgba(255, 255, 255, 0.054);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-hover: rgba(255, 255, 255, 0.2);
    
    --shadow: 0 0 40px -10px rgba(0, 0, 0, 0.8);
    --card-glow-shadow: 0 0 80px -20px rgba(255, 255, 255, 0.12);
    --transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    
    --font-sans: "Inter", "Helvetica Neue", ui-sans-serif, system-ui, sans-serif;
    --font-serif: "Instrument Serif", ui-serif, Georgia, serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

@media (pointer: fine) {
    *, *::before, *::after {
        cursor: none !important;
    }
}

::selection { background: rgba(255, 255, 255, 0.12); color: #fff; }

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
    line-height: 1.6;
}

/* --- Portfolio Custom Cursor --- */
.custom-cursor {
    position: fixed;
    top: 0; left: 0;
    width: 16px; height: 16px;
    border-radius: 9999px;
    border: 1.2px solid rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.04);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
    will-change: transform, opacity;
    transition: opacity 180ms ease;
}
@media (pointer: coarse) { .custom-cursor { display: none; } }

/* --- Portfolio Pixel Background --- */
@keyframes pixelPulse {
    0% { opacity: 0.1; }
    50% { opacity: 0.25; }
    100% { opacity: 0.1; }
}

.pixel-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    mix-blend-mode: screen;
    background-image: radial-gradient(rgba(255, 255, 255, 0.3) 1px, transparent 1px);
    background-size: 24px 24px;
    mask-image: radial-gradient(circle at center, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 80%);
    -webkit-mask-image: radial-gradient(circle at center, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 80%);
    animation: pixelPulse 8s infinite ease-in-out;
}

/* Container */
.app-container {
    width: 100%;
    max-width: 900px;
    padding: 60px 24px;
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
}

/* Typography */
.header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.title {
    font-family: var(--font-serif);
    font-size: clamp(40px, 6vw, 56px);
    font-weight: 400;
    font-style: italic;
    letter-spacing: 0.02em;
    margin: 0;
    color: #fff;
}

.subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin-top: 8px;
    font-weight: 300;
    letter-spacing: 0.05em;
}

.header-title {
    font-family: var(--font-serif);
    font-size: 36px;
    font-weight: 400;
    font-style: italic;
    margin: 0;
    text-align: center;
    flex: 1;
}

/* Back Button */
.back-btn {
    background: var(--card-surface);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    text-decoration: none;
    font-size: 18px;
    transition: var(--transition);
    position: absolute;
    left: 24px;
}
.back-btn:hover { background: var(--card-surface-hover); border-color: var(--glass-border-hover); }

/* Components */
.glass-panel, .glass-box {
    background: var(--card-surface);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    transition: box-shadow 0.7s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s ease;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.glass-panel::before, .glass-box::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.04) 0%, transparent 60%);
    opacity: 1;
}

.glass-panel:hover, .glass-box:hover {
    box-shadow: var(--card-glow-shadow);
}

.info-box {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    text-align: center;
    font-weight: 300;
}

.section-title {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    margin-top: 10px;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.category-title {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 8px;
}

/* Grids */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    margin-bottom: 50px;
}

.tool-card {
    background: var(--card-surface);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: box-shadow 0.7s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.06) 0%, transparent 60%);
    opacity: 1;
}

.tool-card:hover {
    background: var(--card-surface-hover);
    border-color: var(--glass-border-hover);
    box-shadow: var(--card-glow-shadow);
    transform: translateY(-2px) scale(1.008);
}

/* Portfolio Card Shine Effect */
.card-shine {
    position: absolute;
    pointer-events: none;
    z-index: 5;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle at center, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 20%, transparent 60%);
    filter: blur(18px);
    opacity: 0;
    width: 300px;
    height: 300px;
    mix-blend-mode: screen;
    transition: opacity 0.35s ease;
}
.tool-card:hover .card-shine, .glass-box:hover .card-shine { opacity: 1; }

.tool-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    margin-right: 20px;
    object-fit: cover;
    opacity: 0.9;
    transition: var(--transition);
}
.icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
    flex-shrink: 0;
}
.tool-card:hover .tool-icon { opacity: 1; transform: scale(1.05); }
.tool-card:hover .icon-container { color: #fff; background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.15); }

.tool-info { display: flex; flex-direction: column; justify-content: center; z-index: 10; position: relative; }
.tool-name { font-size: 16px; font-weight: 500; margin-bottom: 4px; letter-spacing: -0.01em; }
.tool-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.4; font-weight: 300; }

/* Footer */
.footer {
    margin-top: 40px; padding-top: 30px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px;
    border-top: 1px solid var(--glass-border);
}
.created-by { font-size: 11px; color: var(--text-secondary); font-weight: 400; text-transform: uppercase; letter-spacing: 0.1em; }
.signature-text { font-family: var(--font-serif); font-size: 20px; font-style: italic; color: #fff; }

/* Scroll Dynamics */
.reveal { opacity: 0; transform: translateY(20px); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.05s; }
.reveal-delay-2 { transition-delay: 0.1s; }

/* Inputs & Buttons */
input, select {
    background: var(--card-surface);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
    width: 100%;
}
input:focus, select:focus { border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.05); }

button.primary-btn {
    background: #ffffff; color: #000000; border: none; padding: 16px 24px; border-radius: 12px; font-size: 15px; font-weight: 500;
    cursor: none; transition: var(--transition); width: 100%;
}
button.primary-btn:hover { background: #e0e0e0; transform: scale(0.99); }

button.secondary-btn {
    background: var(--card-surface); border: 1px solid var(--glass-border); color: white; padding: 14px 24px; border-radius: 12px; font-size: 14px; font-weight: 400;
    cursor: none; transition: var(--transition);
}
button.secondary-btn:hover { background: var(--card-surface-hover); border-color: var(--glass-border-hover); }

/* Keep active states for interactive tools */
.note-btn.active, .opt-btn.active, .preset-btn.active, .inst-btn.active, .scale-btn.active {
    background: #fff !important; color: #000 !important; border-color: #fff !important; font-weight: 500;
}

/* EQ specific functional colors kept very subtle */
.eq-card.boost { border-left-color: rgba(74, 222, 128, 0.6); }
.eq-card.cut { border-left-color: rgba(248, 113, 113, 0.6); }
.boost .eq-action { color: #4ade80; }
.cut .eq-action { color: #f87171; }
