@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700;900&display=swap');

:root {
    /* Futurecraft Light Palette - Matched to new Minimalist Logo */
    --bg-color: #ffffff;
    --card-bg: #f5f7fa;
    --text-primary: #111111;
    --text-secondary: #555555;
    --accent-purple: #333333;
    --accent-cyan: #0070f3;
    --accent-gradient: linear-gradient(135deg, #000000, #444444);

    /* Typography */
    --font-primary: 'Outfit', 'Roboto', sans-serif;

    /* Spacing */
    --container-width: 1200px;

    /* Animations */
    --hover-speed: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

a {
    text-decoration: none;
    color: inherit;
}

/* Container */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    padding: 20px 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: background 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}


/* Grid Layout */
.grid-section {
    padding-bottom: 80px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

/* Project Cards */
.project-card {
    background: var(--card-bg);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    aspect-ratio: 16/10;
    position: relative;
    cursor: pointer;
    transition: all var(--hover-speed);
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 30px rgba(0, 180, 255, 0.2);
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #eee;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 40px;
    background: var(--accent-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

.skill-tag {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin: 5px;
    transition: all 0.3s;
}

.skill-tag:hover {
    border-color: #111;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: scale(1.05);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 18px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-family: inherit;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 10px rgba(107, 70, 254, 0.2);
}

/* Footer */
footer {
    text-align: center;
    padding: 40px;
    border-top: 1px solid #eee;
    color: var(--text-secondary);
}

.footer-links {
    margin-top: 10px;
}

.footer-links a {
    margin: 0 10px;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Transition Utilities */
.hidden-initially {
    opacity: 0;
    transition: opacity 1s ease;
}

/* Responsive */
@media (max-width: 900px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .site-title {
        font-size: 2.5rem;
    }
}

/* Intro Sequence */
.intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #ffffff;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: var(--bg-color);
}

.hero-content {
    position: absolute;
    top: 40px;
    /* Moved higher to be 'top center' */
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    max-width: 900px;
    z-index: 2;
}

.hero-logo {
    max-width: 450px;
    /* Reduced max-width for better top placement */
    width: 80%;
    margin-bottom: 0;
    filter: none;
}

.crm-notes-pro-logo {
    width: 140px;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.app-icons-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 24px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.app-icon-link {
    display: inline-block;
    flex-shrink: 0;
}

.app-icon {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 28px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
}

.app-icon-link:hover .app-icon,
.app-icon-link:hover .crm-notes-pro-logo {
    transform: scale(1.07);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

.hero-tagline {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
    opacity: 0;
    animation: fadeIn 1s ease forwards 0.5s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.intro-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Estimated center of the monitor screen in the provided image */
    /* Estimated center of the monitor screen in the provided image */
    /* Remove transform here as it's now on the container */
    /* transform-origin: 67% 38%; */
    /* transition moved to container */
}

/* New Container */
.intro-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    transform-origin: 70.5% 39.3%;
    transition: transform 1.5s cubic-bezier(0.7, 0, 0.3, 1), opacity 0.5s ease 1s;
    will-change: transform, opacity;
    perspective: 1000px;
    /* Add depth for 3D transforms */
    transform-style: preserve-3d;
}

/* Apply zoom to container instead of image */
.intro-overlay.zoomed .intro-container {
    transform: scale(2.2);
    /* Reduced scale to stop at man's perspective */
    /* opacity: 0;  <-- Removed to keep the monitor content visible until the cut */
}

/* Monitor Screen Overlay */
.monitor-screen {
    position: absolute;
    top: 39.3%;
    left: 70.5%;
    /* Final aligned values provided by user */
    transform: translate(-50%, -50%) rotateY(-12.5deg) rotateX(-1.3deg) rotateZ(5.3deg);
    width: 36.7vw;
    height: 28.49vw;
    /* Rounded for cleanliness */
    background-color: #fff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    /* Inset shadow and slight glow to blend with the physical hardware */
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.monitor-scaler {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.mini-site {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #ffffff;
    padding: 2vw;
}

.mini-logo-img {
    width: 80%;
    height: auto;
    filter: none;
}

/* Buttons and Interactions */
.btn {
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    border: none;
}

.shadow-glow:hover {
    box-shadow: 0 0 25px rgba(107, 70, 254, 0.6);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

/* Removed old zoom rules targeting image directly */

.intro-overlay.hidden {
    display: none;
}

/* Port Window Modal */
.port-window {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.port-window.active {
    opacity: 1;
    pointer-events: auto;
}

.port-window-content {
    background: #fff;
    width: 90%;
    max-width: 1000px;
    height: 80vh;
    border-radius: 40px;
    position: relative;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.port-window.active .port-window-content {
    transform: scale(1) translateY(0);
}

.close-port {
    position: absolute;
    top: 25px;
    right: 25px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f0f0f0;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    color: #333;
    transition: all 0.3s;
    z-index: 10;
}

.close-port:hover {
    background: #e0e0e0;
    transform: rotate(90deg);
}

.port-body {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    height: 100%;
}

.port-visual {
    background: #f9f9f9;
    background-size: cover;
    background-position: center;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
}

.port-info {
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.port-info h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.port-info p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.port-tags {
    margin-bottom: 40px;
}

#port-link {
    align-self: flex-start;
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-secondary);
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

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

@media (max-width: 850px) {
    .port-body {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }

    .port-visual {
        height: 300px;
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .port-info {
        padding: 30px;
    }
}