:root {
    /* Cyberpunk / Dracula Theme Palette */
    --bg-dark: #1e212b;      
    --bg-panel: #282a36;     
    --text-main: #f8f8f2;    
    --text-muted: #6272a4;   
    --accent-cyan: #8be9fd;  
    --accent-pink: #ff79c6;  
    --accent-purple: #bd93f9;
    --accent-green: #50fa7b; 
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Lora', serif;
}

body {
    margin: 0;
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    transition: background-color 0.3s ease;
    overflow-x: hidden;
}

/* --- Layout --- */

.container {
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.columns {
    display: flex;
    width: 100%;
    max-width: 1400px;
    height: 90vh;
    margin: 0 auto;
    background: var(--bg-panel);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    overflow: hidden;
}

/* --- Left Panel: Greetings --- */
.greetings {
    background-color: var(--bg-panel);
    width: 65%;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Vertical centering */
    align-items: flex-start; /* Horizontal alignment */
    padding: 0 8%;
    position: relative;
    background-image: radial-gradient(var(--text-muted) 1px, transparent 1px);
    background-size: 40px 40px;
}

.motto {
    font-size: 3.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
    z-index: 1;
    margin: 0; 
}

/* --- Animated Gradient Text Links --- */
.mottolink {
    text-decoration: none;
    font-weight: 700;
    position: relative;
    display: inline-block;
    
    /* The Gradient Text Magic */
    background: linear-gradient(
        90deg, 
        var(--accent-cyan), 
        var(--accent-purple), 
        var(--accent-pink), 
        var(--accent-cyan)
    );
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent; /* Fallback */
    
    animation: textShine 4s linear infinite;
}

/* Specific hover state to ensure visibility/pop */
.mottolink:hover {
    opacity: 0.9;
    filter: brightness(1.2);
}

@keyframes textShine {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

/* Underline Animation */
.mottolink::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--accent-pink);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

.mottolink:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* --- Right Panel: Works --- */
.works {
    display: flex;
    flex-direction: column;
    width: 35%;
    height: 100%;
}

.row {
    height: 50%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

/* --- Active Project Animation (Northern Lights) --- */
.hivecell {
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    position: relative;
    z-index: 1;
}

.hivecell::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.2);
    transition: opacity 0.3s;
    z-index: -1;
}

.hivecell:hover {
    transform: scale(1.02);
    box-shadow: -10px 0 30px rgba(35, 166, 213, 0.4);
    z-index: 10;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.watagames {
    background-color: #1a1c23;
    border-left: 1px solid #333;
}

.projectname {
    font-size: 2.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.projectlabel {
    font-size: 0.9rem;
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 8px 16px;
    border-radius: 20px;
    background-color: rgba(0,0,0,0.6);
    color: var(--accent-cyan);
    backdrop-filter: blur(5px);
    transition: all 0.3s;
}

.hivecell:hover .projectlabel {
    background-color: white;
    color: black;
    transform: translateY(-5px);
}

.comingsoon {
    background-color: #44475a;
    color: #888;
}

/* --- Article/Case Study Styles --- */

article {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    background-color: var(--bg-dark);
}

.sections {
    padding-bottom: 100px;
}

.section-1 {
    margin: 0 15%; /* NARROWER TEXT COLUMN */
    padding: 40px 0;
}

.lightbackground {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    background-color: var(--bg-panel);
    padding: 60px 0;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

/* Typography */
h1 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 3.5rem;
    padding-top: 60px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
}

h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--accent-pink);
    margin-top: 60px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--text-muted);
    padding-bottom: 10px;
}

h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--accent-cyan);
    margin-top: 40px;
}

h4 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--accent-green);
    margin-top: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

p, ul, ol, q {
    font-family: var(--font-body);
    color: var(--text-main);
    font-size: 1.2rem;
    line-height: 1.9;
    font-weight: 300;
}

.disclaimer {
    font-family: var(--font-body);
    color: var(--text-muted);
    font-size: 1rem;
    font-style: italic;
    border-left: 3px solid var(--accent-cyan);
    padding-left: 20px;
    margin: 30px 0;
}

/* --- Fancy Images & Video with Animated Borders --- */
/* Using pseudo-element method to prevent 'weird background' issues */
.media-container {
    position: relative;
    margin: 60px 0;
    background: var(--bg-dark); /* Match page bg */
    border-radius: 12px;
    z-index: 0;
    display: block;
    width: 100%;
}

/* The Animated Gradient Border */
.media-container::before {
    content: "";
    position: absolute;
    inset: -6px; /* Desktop Border Thickness */
    z-index: -1;
    border-radius: 12px;
    background: linear-gradient(60deg, #f79533, #f37055, #ef4e7b, #a166ab, #5073b8, #1098ad, #07b39b, #6fba82);
    background-size: 300% 300%;
    animation: animatedgradient 6s ease alternate infinite;
}

.media-container:hover {
    transform: scale(1.01);
    transition: transform 0.3s;
}

@keyframes animatedgradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

img, video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px; 
    object-fit: cover; 
    background-color: white; 
}

/* --- Lightbox --- */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 4px;
    box-shadow: 0 0 50px rgba(139, 233, 253, 0.2);
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: var(--accent-pink);
}

/* --- Back Button --- */
.back-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 999;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 0; 
    line-height: 0;
    color: var(--accent-cyan);
    
    /* NEW: Translucent background with gradient border/glow feel */
    background: rgba(40, 42, 54, 0.3);
    backdrop-filter: blur(5px);
    border: 2px solid transparent; /* Prepare for border gradient */
    
    /* Using background-origin to simulate gradient border on translucent bg */
    background-image: linear-gradient(rgba(40, 42, 54, 0.3), rgba(40, 42, 54, 0.3)), 
                      linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    background-size: 100% 100%, 400% 400%; /* Second size is for the animated gradient */
    animation: gradientBG 15s ease infinite; /* Re-using existing animation */
}

/* SVG Arrow Styling */
.back-button svg {
    width: 32px; 
    height: 32px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.back-button:hover {
    /* Brighten on hover */
    background-color: rgba(40, 42, 54, 0.6);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--accent-cyan);
}

/* Scroll Animation Classes */
.reveal {
    opacity: 0;
    transform: translateY(50px) scale(0.95);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Mobile View */
@media (max-width: 800px) {
    .container { display: block; height: auto; }
    .columns { flex-direction: column; height: auto; border-radius: 0; box-shadow: none; }
    .greetings { width: 100%; padding: 60px 20px; box-sizing: border-box; }
    .works { width: 100%; height: auto; }
    .row { height: 300px; }
    .motto { font-size: 2.5rem; }
    .section-1 { margin: 0 5%; }
    h1 { font-size: 2.5rem; }
    .lightbox-close { top: 10px; right: 20px; }
    
    /* Reduced Border on Mobile (~30% smaller) */
    .media-container::before {
        inset: -4px; /* Reduced from 6px to 4px */
    }

    /* Mobile Back Button - Smaller Size */
    .back-button {
        bottom: 20px;
        right: 20px;
        width: 40px; /* Reduced from 60px - adjusted to 40px for usability (30px is too small for tap target) */
        height: 40px;
        font-size: 16px; /* Reduced icon context size */
    }
    
    /* Adjust SVG icon size for smaller button */
    .back-button svg {
        width: 20px;
        height: 20px;
    }
}