/* ═══════════════════════════════════════════════════════════════
   Robin Nap - Award-Worthy Personal Website
   Immersive, cinematic, Apple-inspired excellence
   ═══════════════════════════════════════════════════════════════ */

:root {
    --bg: #050505;
    --text: #ffffff;
    --text-dim: rgba(255, 255, 255, 0.5);
    --text-muted: rgba(255, 255, 255, 0.3);
    --accent: #6366f1;
    --accent-2: #8b5cf6;
    --accent-3: #ec4899;
}

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

::selection {
    background: var(--accent);
    color: white;
}

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

html, body {
    min-height: 100%;
    min-height: -webkit-fill-available;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background: transparent;
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    cursor: none;
}

/* ═══════════════════════════════════════════════════════════════
   Custom Cursor
   ═══════════════════════════════════════════════════════════════ */

.cursor {
    position: fixed;
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease, background 0.2s ease;
    mix-blend-mode: difference;
}

.cursor-follower {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: transform 0.3s ease, width 0.3s ease, height 0.3s ease, border-color 0.3s ease;
}

.cursor-hover {
    transform: translate(-50%, -50%) scale(0.5);
    background: var(--accent);
}

.follower-hover {
    width: 80px;
    height: 80px;
    border-color: var(--accent);
}

@media (pointer: coarse), (hover: none) {
    .cursor, .cursor-follower {
        display: none !important;
    }
    body {
        cursor: auto !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   Background Effects
   ═══════════════════════════════════════════════════════════════ */

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

.gradient-bg {
    position: fixed;
    top: calc(-50px - env(safe-area-inset-top, 0px));
    left: calc(-50px - env(safe-area-inset-left, 0px));
    right: calc(-50px - env(safe-area-inset-right, 0px));
    bottom: calc(-50px - env(safe-area-inset-bottom, 0px));
    overflow: hidden;
    z-index: 0;
    background: var(--bg);
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    transition: transform 0.3s ease-out;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    top: -20%;
    right: -10%;
    animation: float1 15s ease-in-out infinite;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-2) 0%, transparent 70%);
    bottom: -20%;
    left: -10%;
    animation: float2 18s ease-in-out infinite;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-3) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: float3 20s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-30px, 50px) scale(1.1); }
    66% { transform: translate(20px, -30px) scale(0.95); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, -40px) scale(1.05); }
    66% { transform: translate(-20px, 30px) scale(1.1); }
}

@keyframes float3 {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
}

/* ═══════════════════════════════════════════════════════════════
   Main Layout
   ═══════════════════════════════════════════════════════════════ */

.main {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
    padding-top: calc(60px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
    padding-left: calc(60px + env(safe-area-inset-left, 0px));
    padding-right: calc(60px + env(safe-area-inset-right, 0px));
    max-width: 1400px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .main {
        padding: 40px 24px;
        padding-top: calc(40px + env(safe-area-inset-top, 0px));
        padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
        padding-left: calc(24px + env(safe-area-inset-left, 0px));
        padding-right: calc(24px + env(safe-area-inset-right, 0px));
    }
}

/* ═══════════════════════════════════════════════════════════════
   Hero Section
   ═══════════════════════════════════════════════════════════════ */

.hero {
    margin-bottom: 100px;
}

.hero-intro {
    font-size: clamp(14px, 2vw, 18px);
    color: var(--text-dim);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 20px;
    animation: fadeSlideUp 1s ease-out 0.2s both;
}

.hero-name {
    font-size: clamp(60px, 15vw, 180px);
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: -0.03em;
    margin-bottom: 30px;
}

.name-line {
    display: block;
    overflow: hidden;
}

.name-line:nth-child(1) {
    animation: slideReveal 1s cubic-bezier(0.77, 0, 0.175, 1) 0.4s both;
}

.name-line:nth-child(2) {
    animation: slideReveal 1s cubic-bezier(0.77, 0, 0.175, 1) 0.6s both;
    background: linear-gradient(135deg, var(--text) 0%, var(--accent) 50%, var(--accent-3) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-tagline {
    font-size: clamp(18px, 3vw, 28px);
    color: var(--text-dim);
    font-weight: 300;
    letter-spacing: 0.02em;
    animation: fadeSlideUp 1s ease-out 0.8s both;
}

/* ═══════════════════════════════════════════════════════════════
   Navigation Items
   ═══════════════════════════════════════════════════════════════ */

.navigation {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    position: relative;
    display: grid;
    grid-template-columns: 60px 1fr auto;
    align-items: center;
    gap: 40px;
    padding: 40px;
    text-decoration: none;
    color: var(--text);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-item:last-child {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-item-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-item:hover .nav-item-bg {
    opacity: 0.1;
    transform: scaleX(1);
}

.nav-item:nth-child(1) { animation: fadeSlideUp 0.8s ease-out 1s both; }
.nav-item:nth-child(2) { animation: fadeSlideUp 0.8s ease-out 1.1s both; }
.nav-item:nth-child(3) { animation: fadeSlideUp 0.8s ease-out 1.2s both; }

.nav-index {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    font-family: monospace;
    letter-spacing: 0.1em;
    transition: color 0.4s ease;
}

.nav-item:hover .nav-index {
    color: var(--accent);
}

.nav-content {
    position: relative;
    z-index: 1;
}

.nav-title {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-item:hover .nav-title {
    transform: translateX(20px);
}

.nav-desc {
    font-size: 16px;
    color: var(--text-dim);
    font-weight: 300;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-item:hover .nav-desc {
    color: var(--text);
    transform: translateX(20px);
}

.nav-arrow {
    font-size: 32px;
    color: var(--text-muted);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    z-index: 1;
}

.nav-item:hover .nav-arrow {
    color: var(--text);
    transform: translateX(10px);
}

@media (max-width: 768px) {
    .nav-item {
        grid-template-columns: 40px 1fr auto;
        gap: 20px;
        padding: 30px 20px;
    }
    
    .nav-arrow {
        font-size: 24px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   Footer
   ═══════════════════════════════════════════════════════════════ */

.footer {
    margin-top: 100px;
    padding: 20px 0;
    color: var(--text-muted);
    font-size: 13px;
    letter-spacing: 0.05em;
    animation: fadeSlideUp 0.8s ease-out 1.4s both;
}

/* ═══════════════════════════════════════════════════════════════
   Inner Page Styles
   ═══════════════════════════════════════════════════════════════ */

.page-header {
    margin-bottom: 80px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 60px;
    transition: all 0.3s ease;
    animation: fadeSlideUp 0.8s ease-out 0.2s both;
}

.back-link:hover {
    color: var(--text);
    gap: 20px;
}

.back-link .arrow {
    transition: transform 0.3s ease;
}

.back-link:hover .arrow {
    transform: translateX(-5px);
}

.page-title {
    font-size: clamp(48px, 12vw, 140px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 0.95;
    background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: slideReveal 1s cubic-bezier(0.77, 0, 0.175, 1) 0.4s both;
}

.page-subtitle {
    font-size: clamp(18px, 3vw, 24px);
    color: var(--text-dim);
    font-weight: 300;
    margin-top: 20px;
    animation: fadeSlideUp 0.8s ease-out 0.6s both;
}

.page-content {
    max-width: 800px;
}

.content-section {
    margin-bottom: 80px;
}

.content-section:nth-child(1) { animation: fadeSlideUp 0.8s ease-out 0.7s both; }
.content-section:nth-child(2) { animation: fadeSlideUp 0.8s ease-out 0.8s both; }
.content-section:nth-child(3) { animation: fadeSlideUp 0.8s ease-out 0.9s both; }

.section-title {
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 30px;
    color: var(--text);
}

.section-text {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-dim);
    font-weight: 300;
}

/* Content Cards */
.content-card {
    position: relative;
    padding: 40px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.content-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.content-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-5px);
}

.content-card:hover::before {
    opacity: 0.05;
}

.content-card h3 {
    position: relative;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    color: var(--text);
}

.content-card p {
    position: relative;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dim);
    font-weight: 300;
}

.content-card .meta {
    position: relative;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 20px;
    font-family: monospace;
    letter-spacing: 0.05em;
}

/* ═══════════════════════════════════════════════════════════════
   Animations
   ═══════════════════════════════════════════════════════════════ */

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

@keyframes slideReveal {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ═══════════════════════════════════════════════════════════════
   Scrollbar
   ═══════════════════════════════════════════════════════════════ */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}
