/* 
   PORTFOLIO REDESIGN - OBSIDIAN BALANCED (V8.1 POLISHED)
   Focus: Sweet Spot Sizing (1200px), Centered 1x1 Cards, Cinematic Wide Cards
*/

:root {
    /* --- COLOR PALETTE --- */
    --bg-dark: #030305;
    --bg-deep: #080810;
    --bg-panel: rgba(22, 22, 35, 0.90);

    --accent-primary: #8a2be2;
    --accent-secondary: #00d4ff;
    --accent-glow: rgba(138, 43, 226, 0.6);

    --text-main: #ffffff;
    --text-muted: #b0b0c0;

    /* SHAPES */
    --radius-xl: 28px;
    --radius-lg: 16px;
    --radius-sm: 8px;

    /* EFFECTS */
    --glass-border: 1px solid rgba(255, 255, 255, 0.12);
    --glass-blur: blur(24px);
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* --- BASE & TEXTURE --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
    user-select: none;
    -webkit-user-select: none;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(138, 43, 226, 0.15), transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(0, 212, 255, 0.15), transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(22, 22, 35, 1), transparent 100%);
    background-attachment: fixed;
}

/* --- LAYOUTS --- */
.main-layout {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* --- V4 PROFILE HEADER (CLASSIC) --- */
.profile-header {
    display: flex;
    flex-direction: row !important;
    /* V9.3 Fix: Force horizontal layout */
    align-items: center;
    gap: 2.5rem;
    padding: 2.5rem;
    background: linear-gradient(90deg, rgba(138, 43, 226, 0.05), transparent);
    text-align: left;
    /* Ensure text stays left */
}

.avatar-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 4px solid #747f8d;
    padding: 4px;
    transition: border-color 0.5s ease, box-shadow 0.5s ease;
}

.avatar-wrapper img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.profile-info h1 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, white, var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.role-text {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.obsidian-credit {
    font-weight: 600;
    color: var(--accent-primary);
    background: rgba(138, 43, 226, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 8px;
    border: 1px solid rgba(138, 43, 226, 0.2);
    display: inline-block;
}

.status-badge-container {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.4);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    margin-top: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.status-dot-text {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #747f8d;
}

/* --- V5 BENTO GRID SYSTEM --- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(160px, auto);
    gap: 1.5rem;
}

.span-2 {
    grid-column: span 2;
}

.span-full {
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .span-2,
    .span-full {
        grid-column: auto;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }
}

/* --- BENTO CARD (HYBRID ALIGNMENT) --- */
.bento-card {
    position: relative;
    background: var(--bg-panel);
    border: var(--glass-border);
    border-radius: var(--radius-xl);
    backdrop-filter: var(--glass-blur);
    box-shadow: var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    overflow: hidden;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.bento-card.span-2,
.bento-card.span-full {
    align-items: flex-start;
    justify-content: flex-end;
    text-align: left;
}

.bento-card:hover {
    transform: translateY(-5px) scale(1.01);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.card-content {
    z-index: 2;
}

.card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.3rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.card-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.card-icon {
    position: absolute;
    font-size: 6rem;
    color: white;
    opacity: 0.03;
    transition: all 0.5s ease;
    z-index: 0;
}

.bento-card:hover .card-icon {
    transform: scale(1.1);
    opacity: 0.1;
}

.bento-card.span-2 .card-icon,
.bento-card.span-full .card-icon {
    top: -20px;
    right: -20px;
    font-size: 8rem;
    opacity: 0.05;
}

.bento-card.span-2:hover .card-icon,
.bento-card.span-full:hover .card-icon {
    transform: rotate(15deg) scale(1.2);
}

/* --- CARD GRADIENTS --- */
.card-project {
    background: linear-gradient(145deg, rgba(22, 22, 35, 0.95), rgba(138, 43, 226, 0.1));
}

.card-service {
    background: linear-gradient(145deg, rgba(22, 22, 35, 0.95), rgba(255, 209, 102, 0.05));
}

.card-contact {
    background: linear-gradient(145deg, rgba(22, 22, 35, 0.95), rgba(6, 214, 160, 0.1));
}

.card-about {
    background: linear-gradient(145deg, rgba(22, 22, 35, 0.95), rgba(0, 212, 255, 0.05));
}

/* --- GLOBAL COMPONENT STYLES --- */
.obsidian-card,
.review-card,
.server-card,
.info-card {
    position: relative;
    background: var(--bg-panel);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    backdrop-filter: var(--glass-blur);
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    overflow: hidden;

    /* V9.2 Fix: Added Breathing Room */
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}


/* --- PROJECT HORIZONTAL CARDS (V11 - TECH STYLE) --- */
.project-card {
    position: relative;
    background: var(--bg-panel);
    /* Clean background for text */
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: row;
    /* Horizontal Layout */
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 220px;
    /* Fixed height for consistency */
}

/* V13: Premium Accents & Kickers */
.project-card.accent-purple {
    border-left: 4px solid var(--accent-primary);
}

.project-card.accent-cyan {
    border-left: 4px solid var(--accent-secondary);
}

.project-card.accent-blue {
    border-left: 4px solid #3b82f6;
}

.project-card.accent-white {
    border-left: 4px solid #e5e7eb;
}

/* V15: Server Status Accents */
.project-card.accent-green {
    border-left: 4px solid #06d6a0;
}

/* Online */
.project-card.accent-red {
    border-left: 4px solid #ef476f;
}

/* Offline */
.project-card.accent-yellow {
    border-left: 4px solid #ffd166;
}

/* Maintenance */

.project-kicker {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: rgba(255, 255, 255, 0.75);
    /* V14: Clean Silver Text */
}

/* Removed colored kicker overrides for V14 Clean Look */

/* Left Side: Image */
.project-card-image {
    width: 40%;
    /* 40% Image */
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.5s ease;
}

/* Right Side: Content */
.project-info {
    width: 60%;
    /* 60% Text */
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Center text vertically */
    gap: 0.8rem;
    z-index: 2;
}

.project-info h3 {
    color: #ffffff !important;
    /* Force White Title */
    font-size: 1.5rem;
    margin: 0;
}

.server-tags {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.server-tags .tag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    /* Neutral Tag Style */
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.action-btn {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: var(--accent-primary);
    transform: translateX(5px);
}

/* Interactions */
.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

.project-card:hover .project-card-image {
    transform: scale(1.05);
    /* Subtle zoom on image only */
}

/* Mobile Responsiveness for Cards */
@media (max-width: 768px) {
    .project-card {
        flex-direction: column;
        /* Stack on mobile */
        height: auto;
    }

    .project-card-image {
        width: 100%;
        height: 180px;
        /* Video-like aspect on mobile */
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .project-info {
        width: 100%;
        padding: 1.5rem;
    }
}

/* --- UTILS --- */
.text-gradient {
    background: linear-gradient(135deg, white, var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.top-nav {
    margin-bottom: 2rem;
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 10;
}

.back-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.back-link:hover {
    color: white;
    background: rgba(138, 43, 226, 0.2);
    border-color: var(--accent-primary);
    transform: translateX(-5px);
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
    border-left: 4px solid var(--accent-secondary);
    padding-left: 1rem;
}

.grid-container {
    display: grid;
    gap: 1.5rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    /* Dense Grid */
}

/* --- FEATURE CARDS (ECOSYSTEM) --- */
.feature-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    transition: all 0.3s ease;
}

.feature-card i {
    font-size: 1.5rem;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.feature-card h4 {
    color: white;
    font-size: 1.1rem;
    margin: 0;
}

.feature-card p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    line-height: 1.4;
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-5px);
    border-color: var(--accent-primary);
}

/* --- DISCORD CTA BUTTON --- */
.discord-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    background: #5865F2;
    /* Discord Blurple */
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(88, 101, 242, 0.4);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.discord-cta-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 40px rgba(88, 101, 242, 0.6);
    background: #4752C4;
}

.masonry-grid {
    column-count: 2;
    column-gap: 1.5rem;
}

@media (max-width: 768px) {
    .masonry-grid {
        column-count: 1;
    }
}

/* --- ANIMATIONS & VISUAL FX --- */

/* 1. Fade In Up (Scroll Entry) */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for grid items (up to 20 items) */
.grid-container .feature-card:nth-child(1) {
    transition-delay: 0.05s;
}

.grid-container .feature-card:nth-child(2) {
    transition-delay: 0.1s;
}

.grid-container .feature-card:nth-child(3) {
    transition-delay: 0.15s;
}

.grid-container .feature-card:nth-child(4) {
    transition-delay: 0.2s;
}

.grid-container .feature-card:nth-child(5) {
    transition-delay: 0.25s;
}

.grid-container .feature-card:nth-child(6) {
    transition-delay: 0.05s;
}

/* Loop delays for large grids */
.grid-container .feature-card:nth-child(7) {
    transition-delay: 0.1s;
}

.grid-container .feature-card:nth-child(8) {
    transition-delay: 0.15s;
}

.grid-container .feature-card:nth-child(9) {
    transition-delay: 0.2s;
}

.grid-container .feature-card:nth-child(10) {
    transition-delay: 0.25s;
}

/* ...and so on, the loop logic handles the rest naturally or we add more specific ones if needed */

/* 2. Floating Animation (for icons) */
@keyframes floating {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-5px);
    }

    100% {
        transform: translateY(0px);
    }
}

.float-anim {
    animation: floating 3s ease-in-out infinite;
}

/* 3. Shine Effect for CTA */
@keyframes shine-glow {
    0% {
        box-shadow: 0 0 5px rgba(88, 101, 242, 0.4);
    }

    50% {
        box-shadow: 0 0 20px rgba(88, 101, 242, 0.7);
    }

    100% {
        box-shadow: 0 0 5px rgba(88, 101, 242, 0.4);
    }
}

.discord-cta-btn {
    animation: shine-glow 3s infinite;
}

/* 4. Text Shine Gradient */
@keyframes textShine {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 100% 50%;
    }
}

.text-gradient-animated {
    background: linear-gradient(90deg, #ffffff, #8a2be2, #00ffff, #ffffff);
    background-size: 300% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textShine 5s linear infinite;
}

/* 5. Feature Pills (Header) */
.feature-pill {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    cursor: default;
}

.feature-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.feature-pill i {
    color: var(--accent-secondary);
}

/* --- 6. V17 HYPER-POLISH REVIEW CARD --- */

/* Pop-In Animation (Bouncy scale) */
@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(30px);
    }

    70% {
        transform: scale(1.02) translateY(-5px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.pop-in {
    opacity: 0;
    /* Initial state controlled by JS toggling 'visible' */
}

.pop-in.visible {
    animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Review Card Enhancements */
.review-card {
    /* Existing base styles from .obsidian-card match nicely, we just add the decor */
    overflow: hidden;
    /* Ensure watermark stays inside */
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    /* Brighter top edge */
}

.review-card::before {
    content: '\f10d';
    /* FontAwesome Quote Left Icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: -10px;
    right: 20px;
    font-size: 8rem;
    color: rgba(255, 255, 255, 0.03);
    /* Very faint watermark */
    z-index: 0;
    transform: rotate(10deg);
    pointer-events: none;
    transition: all 0.5s ease;
}

.review-card:hover::before {
    top: -20px;
    transform: rotate(0deg) scale(1.1);
    color: rgba(138, 43, 226, 0.08);
    /* Glows slightly on hover */
}

/* Stronger Hover Effect */
.review-card:hover {
    /* transform handled by JS for smoothness */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    border-color: var(--accent-primary);
}

/* Stagger Adjustment for Reviews (Faster) */
.masonry-grid .pop-in:nth-child(1) {
    animation-delay: 0.0s;
}

.masonry-grid .pop-in:nth-child(2) {
    animation-delay: 0.1s;
}

.masonry-grid .pop-in:nth-child(3) {
    animation-delay: 0.2s;
}

.masonry-grid .pop-in:nth-child(4) {
    animation-delay: 0.3s;
}

.masonry-grid .pop-in:nth-child(5) {
    animation-delay: 0.4s;
}

.masonry-grid .pop-in:nth-child(6) {
    animation-delay: 0.5s;
}

.masonry-grid .pop-in:nth-child(7) {
    animation-delay: 0.6s;
}

.masonry-grid .pop-in:nth-child(8) {
    animation-delay: 0.7s;
}

/* --- 7. V18 CONTACT FORM STYLES --- */

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

.form-control {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    color: white;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    outline: none;
}

.form-control:focus {
    background: rgba(0, 0, 0, 0.4);
    border-color: var(--accent-secondary);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
    transform: translateY(-2px);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Custom Select Arrow */
select.form-control {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2300d4ff%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem top 50%;
    background-size: 0.8rem auto;
}

select.form-control option {
    background: var(--bg-deep);
    color: white;
}

/* Submit Button */
.contact-submit {
    width: 100%;
    padding: 1rem;
    border-radius: 50px;
    border: none;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(138, 43, 226, 0.3);
    position: relative;
    overflow: hidden;
}

.contact-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 212, 255, 0.5);
}

.contact-submit:active {
    transform: translateY(-1px);
}

/* --- 8. V19 CONTACT SPLIT LAYOUT --- */

.contact-split-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

@media (min-width: 900px) {
    .contact-split-wrapper {
        grid-template-columns: 1fr 1.5fr;
        /* Info (Narrow) | Form (Wide) */
        align-items: start;
    }
}

.contact-info-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-form-column {
    /* Form styles inherit from .obsidian-card but positioned here */
}

/* Compact Info Card for Split Layout */
.compact-info-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.compact-info-card:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(5px);
    border-color: var(--accent-primary);
}

.compact-info-card i {
    font-size: 1.8rem;
    min-width: 40px;
    text-align: center;
}