/* ===============================
   KAIZEN PORTFOLIO — style.css
   =============================== */

:root {
    --bg: #080808;
    --bg-alt: #0d0d0d;
    --bg-card: #121212;
    --accent: #ff3333; /* Pure Red */
    --accent-glow: rgba(255, 51, 51, 0.4);
    --text: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.6);
    --border: rgba(255, 255, 255, 0.08);
    --radius: 24px;
    --radius-sm: 12px;
    --font-main: 'Outfit', sans-serif;
    --font-heading: 'Space Grotesk', sans-serif;
    --transition: 0.4s cubic-bezier(0.2, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--bg);
}

body {
    font-family: var(--font-main);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
}

/* ========== UTILITIES ========== */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 32px;
}

.section {
    padding: 120px 0;
}

.red-text {
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent-glow);
    animation: text-glow-frequent 2.5s ease-in-out infinite;
}

@keyframes text-glow-frequent {
    0%, 100% { 
        text-shadow: 0 0 15px var(--accent-glow), 0 0 30px var(--accent-glow);
        filter: brightness(1.1);
    }
    50% { 
        text-shadow: 0 0 25px var(--accent-glow), 0 0 50px var(--accent-glow);
        filter: brightness(1.4);
    }
}

/* ========== REVEAL ANIMATION ========== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 0, 0.2, 1);
}

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

/* ========== NAVBAR ========== */
#navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    background: rgba(13, 13, 13, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid transparent; /* Replaced with animated border */
    border-radius: 100px;
    z-index: 1000;
    transition: all var(--transition);
    overflow: hidden; /* To clip the rotating gradient */
}

/* Animated Border Logic */
#navbar::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1px; /* Border thickness */
    border-radius: 100px;
    background: conic-gradient(from var(--nav-angle), var(--accent), transparent, var(--accent));
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    animation: rotate-nav-border 4s linear infinite;
}

@property --nav-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes rotate-nav-border {
    to { --nav-angle: 360deg; }
}

#navbar.scrolled {
    top: 10px; /* Slight adjustment from top */
    background: rgba(8, 8, 8, 0.9);
    border-color: transparent;
}

#navbar.scrolled::before {
    /* Keep the rotating pill border on scroll */
    border-radius: 100px;
    padding: 1px;
    background: conic-gradient(from var(--nav-angle), var(--accent), transparent, var(--accent));
}

.nav-inner {
    height: 72px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -1px;
}

.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-cta {
    background: var(--text);
    color: var(--bg);
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.nav-cta:hover {
    background: var(--accent);
    color: var(--text);
    box-shadow: 0 0 30px var(--accent-glow);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger span {
    width: 28px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu a {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

/* ========== HERO ========== */
#hero {
    min-height: 100vh;
    padding-top: 160px;
    position: relative;
    display: flex;
    align-items: center;
}

.hero-glow {
    position: absolute;
    top: -10%;
    right: -10%;
    width: 60%;
    height: 80%;
    background: radial-gradient(circle, rgba(255, 51, 51, 0.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 80px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 32px;
}

.badge-pulse {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    box-shadow: 0 0 10px #4ade80;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -2px;
    margin-bottom: 24px;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 20px;
}

.secondary-desc {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 40px;
}

.hero-actions {
    display: flex;
    gap: 20px;
}

.btn-primary {
    background: var(--accent);
    color: var(--text);
    text-decoration: none;
    padding: 18px 36px;
    border-radius: 100px;
    font-weight: 700;
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(255, 51, 51, 0.2);
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(255, 51, 51, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    text-decoration: none;
    padding: 18px 36px;
    border-radius: 100px;
    font-weight: 600;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.btn-secondary:hover {
    border-color: var(--accent);
    background: rgba(255, 51, 51, 0.05);
}

/* Profile Visual */
.profile-container {
    position: relative;
    width: 100%;
    max-width: 450px;
    aspect-ratio: 1/1;
    perspective: 1000px; /* For tilt */
    transform-style: preserve-3d;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 40px;
    border: 2px solid var(--border);
    position: relative;
    z-index: 2;
    transition: transform 0.1s ease-out; /* Smooth tilt return */
    will-change: transform;
    transform: translateZ(20px);
}

/* Removed profile-glow as requested */

.experience-tag {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: var(--bg-card);
    border: 1px solid var(--accent);
    padding: 20px;
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10; /* High z-index */
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    transform: translateZ(50px); /* Keep in front of image */
    transform-style: preserve-3d;
}

.exp-num {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}

.exp-text {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

/* ========== ABOUT / PHILOSOPHY ========== */
#about-snippet {
    margin-top: 150px; /* Positioned down from hero */
    margin-bottom: 100px;
}

.about-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 80px 60px;
    border-radius: var(--radius);
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    transition: all 1s cubic-bezier(0.2, 0, 0.2, 1);
}

.about-card.reveal.active {
    background: linear-gradient(180deg, var(--bg-card) 0%, rgba(255, 51, 51, 0.03) 100%);
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
}

.about-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
    transform: translateY(20px);
    opacity: 0;
    transition: 0.8s 0.2s forwards;
}

.about-card.active .about-header {
    transform: translateY(0);
    opacity: 1;
}

.about-card p {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 500;
    line-height: 1.5;
    font-style: italic;
    color: var(--text);
    transform: translateY(30px);
    opacity: 0;
    transition: 1s 0.4s forwards;
}

.about-card.active p {
    transform: translateY(0);
    opacity: 1;
}

/* ========== WORKS ========== */
.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-subtitle {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 4px;
    font-weight: 700;
    font-size: 0.8rem;
    display: block;
    margin-bottom: 12px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
}

.grid-layout-custom {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.work-portrait .video-wrapper {
    aspect-ratio: 9/16;
}

.work-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.work-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 51, 51, 0.3);
}

.video-wrapper {
    position: relative;
    width: 100%;
    /* Respect original resolution by letting video dictate height, but provide a container */
    background: #000;
    overflow: hidden;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.video-wrapper video {
    width: 100%;
    display: block;
    /* Resolution is preserved by browser defaults, we just ensure it fits width */
}

.video-controls {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    opacity: 0;
    transition: var(--transition);
    z-index: 10;
}

.video-wrapper:hover .video-controls {
    opacity: 1;
}

.play-btn, .fullscreen-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: #fff;
}

.play-btn svg, .fullscreen-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.play-btn:hover, .fullscreen-btn:hover {
    background: var(--accent);
    transform: scale(1.1);
}

.video-overlay-msg {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.5);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.5);
}

.work-info {
    padding: 30px;
}

.work-info h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.work-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ========== CLIENTS ========== */
/* Modern & Unique Client Section */
.clients-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
    perspective: 1500px;
}

.client-card {
    position: relative;
    background: var(--bg-card);
    padding: 60px 40px;
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    transform-style: preserve-3d;
}

/* Removed staggered effect for equal size */

.client-card:hover {
    transform: translateY(-10px) rotateX(5deg) rotateY(-5deg);
    background: #161616;
}

/* Glowing Border Effect */
.client-glow-border {
    position: absolute;
    inset: 0;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
                conic-gradient(from var(--angle), var(--accent), transparent, var(--accent)) border-box;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.3;
}

@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes rotate-border {
    to { --angle: 360deg; }
}

.client-card:hover .client-glow-border {
    opacity: 1;
    animation: rotate-border 3s linear infinite;
}

.client-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.client-pfp {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 24px;
    border: 2px solid var(--border);
    padding: 5px;
    transition: var(--transition);
}

.client-card:hover .client-pfp {
    border-color: var(--accent);
    transform: scale(1.05);
}

.client-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.client-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.client-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.client-link:hover {
    gap: 12px;
}

/* Plain Description Styling */
.plain-description {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.plain-description p {
    font-size: 1.4rem;
    line-height: 1.6;
    color: var(--text-muted);
    font-weight: 500;
}

/* ========== CONTACT ========== */
.contact-wrapper {
    background: radial-gradient(circle at top left, rgba(255, 51, 51, 0.25) 0%, rgba(8, 8, 8, 1) 80%),
                linear-gradient(135deg, rgba(255, 51, 51, 0.1) 0%, #080808 100%);
    border: 1px solid rgba(255, 51, 51, 0.3);
    border-radius: 40px;
    padding: 80px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 100px;
    box-shadow: 0 40px 100px rgba(0,0,0,0.5), inset 0 0 60px rgba(255, 51, 51, 0.05);
}

.contact-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 32px;
}

.contact-sub {
    color: var(--text-muted);
    font-size: 1.2rem;
    margin-bottom: 60px;
}

/* Discord Animation */
.discord-card {
    background: #1a1b1e;
    border-radius: 20px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
    max-width: 320px;
}

.discord-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 2;
}

.discord-icon-box {
    width: 60px;
    height: 60px;
    background: #5865F2;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.5s ease;
}

.discord-icon-box svg {
    width: 35px;
}

.discord-text {
    display: flex;
    flex-direction: column;
}

.d-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.4);
}

.d-username {
    font-size: 1.2rem;
    font-weight: 700;
}

.discord-status {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #4ade80;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    box-shadow: 0 0 10px #4ade80;
}

/* Hover Animation - Complete & Immersive */
.discord-card:hover {
    transform: translateY(-12px) scale(1.08) rotate(1deg);
    background: #5865F2;
    box-shadow: 0 35px 80px rgba(88, 101, 242, 0.5), 
                0 0 0 4px rgba(88, 101, 242, 0.1);
    border-color: rgba(255,255,255,0.4);
}

.discord-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg) translateY(-100%);
    transition: 0.6s;
    pointer-events: none;
}

.discord-card:hover::after {
    transform: rotate(45deg) translateY(100%);
}

.discord-card:hover .discord-icon-box {
    background: #fff;
    color: #5865F2;
    transform: scale(1.1) rotate(-10deg);
    box-shadow: 0 0 20px rgba(255,255,255,0.4);
}

.discord-card:hover .d-label {
    color: rgba(255,255,255,0.9);
    letter-spacing: 3px;
}

.discord-card:hover .d-username {
    transform: translateX(5px);
    transition: transform 0.4s ease;
}

.discord-card:hover .discord-status {
    color: #fff;
    filter: drop-shadow(0 0 5px #fff);
}

.discord-card:hover .status-dot {
    background: #fff;
    box-shadow: 0 0 10px #fff;
}

/* Contact Form */
.contact-form-container {
    width: 100%;
}

#contact-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group input, .form-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: var(--radius-sm);
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
}

.submit-btn {
    background: var(--text);
    color: var(--bg);
    border: none;
    padding: 22px;
    border-radius: var(--radius-sm);
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.submit-btn:hover {
    background: var(--accent);
    color: var(--text);
    transform: scale(1.02);
    box-shadow: 0 10px 30px var(--accent-glow);
}

/* ========== FOOTER ========== */
footer {
    padding: 80px 0;
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-inner p {
    color: var(--text-muted);
    margin: 16px 0;
}

.footer-line {
    width: 50px;
    height: 1px;
    background: var(--accent);
    margin: 32px auto;
}

.copyright {
    font-size: 0.85rem;
    opacity: 0.5;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1100px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 60px;
    }
    .hero-text {
        order: 2;
    }
    .hero-visual {
        order: 1;
        display: flex;
        justify-content: center;
    }
    .hero-actions {
        justify-content: center;
    }
    .contact-wrapper {
        grid-template-columns: 1fr;
        padding: 60px 40px;
        gap: 60px;
    }
}

@media (max-width: 768px) {
    .nav-links, .nav-cta {
        display: none;
    }
    .hamburger {
        display: flex;
    }
    .section-title {
        font-size: 2.5rem;
    }
    .hero-title {
        font-size: 3.5rem;
    }
    .about-card p {
        font-size: 1.2rem;
    }
}
