@import 'tailwindcss';

@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';
@source '../../storage/framework/views/*.php';
@source '../views/neu/**/*.blade.php';
@source '../js/neu/**/*.js';

/* ─── Neumorphic Design Tokens ─────────────────────────────────────────── */
:root {
    --neu-bg:           #f5f7fa;
    --neu-shadow-light: #ffffff;
    --neu-shadow-dark:  #d1d9e6;
    --neu-text-primary: #4a5568;
    --neu-text-muted:   #718096;
    --neu-accent:       #6c8ebf;
    --neu-radius-sm:    12px;
    --neu-radius-md:    16px;
    --neu-radius-lg:    20px;

    /* Shadow presets */
    --shadow-raised:  6px 6px 12px var(--neu-shadow-dark), -6px -6px 12px var(--neu-shadow-light);
    --shadow-pressed: inset 4px 4px 8px var(--neu-shadow-dark), inset -4px -4px 8px var(--neu-shadow-light);
    --shadow-card:    10px 10px 20px var(--neu-shadow-dark), -10px -10px 20px var(--neu-shadow-light);
    --shadow-input:   inset 3px 3px 6px var(--neu-shadow-dark), inset -3px -3px 6px var(--neu-shadow-light);
}

/* ─── Base ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--neu-bg);
    color: var(--neu-text-primary);
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    overflow-x: hidden;
}

/* ─── Neumorphic Utility Classes ────────────────────────────────────────── */
.neu-raised {
    background: var(--neu-bg);
    border-radius: var(--neu-radius-md);
    box-shadow: var(--shadow-raised);
}

.neu-pressed {
    background: var(--neu-bg);
    border-radius: var(--neu-radius-md);
    box-shadow: var(--shadow-pressed);
}

.neu-card {
    background: var(--neu-bg);
    border-radius: var(--neu-radius-lg);
    box-shadow: var(--shadow-card);
    padding: 1.5rem;
}

.neu-input {
    background: var(--neu-bg);
    border-radius: var(--neu-radius-sm);
    border: none;
    box-shadow: var(--shadow-input);
    padding: 0.75rem 1rem;
    outline: none;
    color: var(--neu-text-primary);
    width: 100%;
    font-size: 0.95rem;
    transition: box-shadow 0.2s ease;
}

.neu-input:focus {
    box-shadow: var(--shadow-input), 0 0 0 2px var(--neu-accent);
}

/* ─── Focus Indicator ───────────────────────────────────────────────────── */
:focus-visible {
    outline: 2px solid var(--neu-accent);
    outline-offset: 3px;
    border-radius: var(--neu-radius-sm);
}

.neu-raised:focus-visible,
.neu-pressed:focus-visible,
.neu-card:focus-visible,
.neu-input:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--neu-accent);
    outline-offset: 3px;
}

/* ─── Landing Screen ────────────────────────────────────────────────────── */
#landing-screen {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: var(--neu-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    padding: 2rem;
}

#greeting {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--neu-text-primary);
    margin-bottom: 0.5rem;
    opacity: 0;
}

#tagline {
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    color: var(--neu-text-muted);
    margin-bottom: 2.5rem;
    opacity: 0;
}

/* ─── Neumorphic Button ─────────────────────────────────────────────────── */
.neu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 2.5rem;
    border-radius: var(--neu-radius-md);
    border: none;
    background: var(--neu-bg);
    color: var(--neu-accent);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-raised);
    transition: box-shadow 0.15s ease, transform 0.1s ease;
    opacity: 0;
    letter-spacing: 0.02em;
    user-select: none;
}

.neu-btn:hover {
    box-shadow: 8px 8px 16px var(--neu-shadow-dark), -8px -8px 16px var(--neu-shadow-light);
    transform: translateY(-2px);
}

.neu-btn.neu-pressed,
.neu-btn:active {
    box-shadow: var(--shadow-pressed);
    transform: translateY(1px);
}

/* ─── Three.js Canvas ───────────────────────────────────────────────────── */
#three-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    display: none;
    opacity: 0;
    z-index: 10;
}

/* ─── Scroll Container (for scroll-driven camera) ───────────────────────── */
#scroll-container {
    position: relative;
    z-index: 20;
    pointer-events: none;
}

#scroll-spacer {
    height: 500vh; /* 5 sections × 100vh */
}

/* ─── Section Panels (HTML overlays over canvas) ────────────────────────── */
.section-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(90vw, 640px);
    max-height: 80vh;
    overflow-y: auto;
    z-index: 30;
    opacity: 0;
    pointer-events: none;
    display: none;
}

.section-panel.active {
    display: block;
    pointer-events: auto;
}

/* ─── Project Cards ─────────────────────────────────────────────────────── */
.project-card {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 14px 14px 28px var(--neu-shadow-dark), -14px -14px 28px var(--neu-shadow-light);
}

.project-card .tech-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: var(--neu-radius-sm);
    font-size: 0.75rem;
    color: var(--neu-accent);
    box-shadow: 2px 2px 4px var(--neu-shadow-dark), -2px -2px 4px var(--neu-shadow-light);
    margin: 0.2rem;
}

/* ─── Skill Nodes ───────────────────────────────────────────────────────── */
.skill-node {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: var(--neu-radius-md);
    box-shadow: var(--shadow-raised);
    font-size: 0.85rem;
    color: var(--neu-text-primary);
    margin: 0.4rem;
    cursor: default;
    transition: box-shadow 0.2s ease;
}

.skill-node:hover {
    box-shadow: 8px 8px 16px var(--neu-shadow-dark), -8px -8px 16px var(--neu-shadow-light);
}

.skill-level {
    display: flex;
    gap: 2px;
}

.skill-level span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--neu-shadow-dark);
}

.skill-level span.filled {
    background: var(--neu-accent);
}

/* ─── Timeline ──────────────────────────────────────────────────────────── */
.timeline-entry {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.timeline-entry::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.4rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--neu-accent);
    box-shadow: 0 0 0 3px var(--neu-bg), 0 0 0 5px var(--neu-shadow-dark);
}

/* ─── Contact Form ──────────────────────────────────────────────────────── */
#contact-form-wrapper {
    opacity: 0;
    transform: scale(0.95);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--neu-text-muted);
    margin-bottom: 0.4rem;
    font-weight: 500;
}

/* ─── Floating Guide ────────────────────────────────────────────────────── */
#floating-guide {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 200;
    display: none;
    padding: 0.75rem 1.25rem;
    border-radius: var(--neu-radius-lg);
    box-shadow: var(--shadow-raised);
    background: var(--neu-bg);
    color: var(--neu-text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    max-width: 220px;
    text-align: center;
    line-height: 1.4;
    transition: box-shadow 0.2s ease;
}

#floating-guide:hover {
    box-shadow: var(--shadow-card);
}

/* ─── Fallback Layout ───────────────────────────────────────────────────── */
#fallback-layout {
    display: none;
    padding: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

#fallback-layout section {
    margin-bottom: 3rem;
}

#fallback-layout h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--neu-text-primary);
    margin-bottom: 1.5rem;
}

/* ─── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .section-panel {
        width: 95vw;
        max-height: 85vh;
    }

    #floating-guide {
        bottom: 1rem;
        right: 1rem;
        font-size: 0.8rem;
        padding: 0.6rem 1rem;
    }
}
