:root {
    --color-navy: #171e19;
    --color-sage: #b7c6c2;
    --color-white: #ffffff;
    --color-taupe: #9f8d8b;
    --color-beige: #d7c5b2;
    --color-cyan: #d5f4f9;
    --color-soft-blue: #bbe2f5;
    --color-charcoal: #302b2f;

    --font-heading: 'Anton', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;

    --transition-fluid: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: 1000ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-navy);
    color: var(--color-white);
    overflow-x: hidden;
}

body.no-scroll {
    overflow: hidden;
}

/* Typography Utilities */
.anton-display {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: -0.02em; /* tracking-tighter */
}

.text-outline {
    color: transparent;
    -webkit-text-stroke: 1px var(--color-sage);
}

.taupe-text { color: var(--color-taupe); }
.sage-label { color: var(--color-sage); font-family: var(--font-heading); font-size: 1.5rem; display: block; margin-bottom: 1rem;}
.taupe-label { color: var(--color-taupe); font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.1em; display: block; margin-bottom: 2rem;}

/* Navigation */
.fixed-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 32px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    mix-blend-mode: difference;
    z-index: 100;
    color: var(--color-white);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem; /* 2xl */
    letter-spacing: 0.1em; /* tracking-widest */
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: var(--color-white);
    text-decoration: none;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--color-white);
    color: var(--color-white);
    padding: 12px 24px;
    font-family: var(--font-body);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: background var(--transition-fluid), color var(--transition-fluid);
}

.btn-outline:hover {
    background: var(--color-white);
    color: var(--color-navy);
}

/* Sections */
section {
    padding: 8rem 48px;
}

.dark-section {
    background-color: var(--color-navy);
    color: var(--color-white);
}

.light-section {
    background-color: var(--color-white);
    color: var(--color-navy);
}

/* Hero */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 0 48px;
}

.ambient-orb {
    position: absolute;
    width: 384px;
    height: 384px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.2;
    z-index: 0;
    animation: float 6s ease-in-out infinite;
}

.sage-orb {
    background-color: var(--color-sage);
    top: 20%;
    left: 20%;
}

.soft-blue-orb {
    background-color: var(--color-soft-blue);
    bottom: 20%;
    right: 20%;
    animation-delay: -3s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

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

.hero-content h1 {
    font-size: 18vw;
    line-height: 0.85;
    margin: 0;
}

.hero-bottom {
    position: absolute;
    bottom: 48px;
    left: 48px;
    right: 48px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    z-index: 1;
}

.hero-desc {
    max-width: 320px;
    color: var(--color-taupe);
    text-transform: uppercase;
    font-size: 0.875rem;
    line-height: 1.5;
}

.scroll-indicator {
    width: 48px;
    height: 48px;
    border: 1px solid var(--color-white);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.center-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    margin-left: -24px; /* Centers the 48px width perfectly */
    z-index: 10;
}

/* Portfolio */
.portfolio {
    background-color: var(--color-white);
    color: var(--color-navy);
}

.section-heading {
    font-size: 8rem; /* 9xl approx */
    color: var(--color-navy);
    margin-bottom: 4rem;
    line-height: 1;
}

.masonry-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.item-even {
    margin-top: 4rem; /* 64px offset */
}

.image-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3/4; /* Default */
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-fluid);
}

.hover-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(23, 30, 25, 0.6); /* Navy/60 */
    opacity: 0;
    transition: opacity var(--transition-fluid);
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.view-badge {
    width: 96px;
    height: 96px;
    background-color: var(--color-white);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 14px;
    letter-spacing: 0.1em;
    color: var(--color-navy);
}

.image-wrapper:hover img {
    transform: scale(1.1);
}

.image-wrapper:hover .hover-overlay {
    opacity: 1;
}

/* Featured Section */
.featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.featured-left {
    position: relative;
}

.cyan-offset {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 80%;
    background-color: var(--color-cyan);
    filter: blur(100px);
    opacity: 0.15;
    transform: translate(-50%, -50%);
    z-index: 0;
    border-radius: 50%;
    pointer-events: none;
}

.featured-left img {
    width: 100%;
    position: relative;
    z-index: 1;
}

.featured-heading {
    font-size: 4.5rem; /* 7xl */
    margin-bottom: 2rem;
    line-height: 1;
}

.featured-right {
    padding-left: 3rem;
    position: relative;
    z-index: 10;
}

.featured-right p {
    font-size: 1.125rem;
    line-height: 1.6;
    margin-bottom: 3rem;
}

.arrow-link {
    color: var(--color-white);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: transform var(--transition-fluid);
    position: relative;
    z-index: 20;
    padding: 0.5rem 0;
}

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

/* Capabilities */
.capabilities {
    background-color: #fafafa;
}

.split-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem;
}

.capabilities-list {
    grid-column: span 4;
}

.capabilities-list ul {
    list-style: none;
}

.capabilities-list li {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    cursor: default;
}

.capabilities-list li::before {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background-color: var(--color-navy);
    margin-right: 1rem;
    transition: width var(--transition-fluid);
}

.capabilities-list li:hover::before {
    width: 64px;
}

.capabilities-heading {
    grid-column: span 8;
}

.large-heading {
    font-size: 3.75rem; /* 6xl */
    font-weight: 300;
    line-height: 1.2;
}

.large-heading i {
    color: var(--color-taupe);
    font-family: var(--font-heading);
    font-style: italic;
    letter-spacing: 0.05em;
}

/* Testimonial */
.testimonial {
    background-color: var(--color-charcoal);
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 12rem 48px;
}

.quote-mark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-heading);
    font-size: 30rem;
    color: var(--color-navy);
    opacity: 0.3;
    line-height: 1;
    z-index: 0;
    pointer-events: none;
}

.testimonial-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.quote-text {
    font-size: 3rem; /* 5xl */
    margin-bottom: 4rem;
    line-height: 1.1;
}

.bio-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

.anton-name {
    font-family: var(--font-heading);
    color: var(--color-taupe);
    letter-spacing: 0.05em;
}

/* Footer */
.footer {
    padding: 8rem 48px 2rem 48px;
    display: flex;
    flex-direction: column;
}

.footer-content {
    margin-bottom: 8rem;
}

.massive-text {
    font-size: 10vw; /* 9xl+ */
    line-height: 1;
    margin-bottom: 2rem;
}

.email-link {
    color: var(--color-sage);
    font-size: 2.25rem; /* 4xl */
    text-decoration: none;
    position: relative;
    display: inline-block;
}

.email-link::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--color-sage);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.legal-links a {
    color: var(--color-white);
    text-decoration: none;
    margin-left: 2rem;
}

/* Scroll Reveals */
.reveal {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .fixed-nav { padding: 16px 24px; }
    .nav-links a { display: none; }
    
    .hero, section { padding: 4rem 24px; }
    .footer { padding: 4rem 24px 2rem 24px; }
    
    .hero-content h1 { font-size: 24vw; }
    
    .hero-bottom {
        bottom: 24px;
        left: 24px;
        right: 24px;
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    .hero-desc { max-width: 100%; }
    
    .masonry-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .item-even { margin-top: 0; }
    
    .hover-overlay { 
        opacity: 1; 
        background: linear-gradient(to top, rgba(23, 30, 25, 0.8), transparent 50%);
        align-items: flex-end; 
        justify-content: flex-end;
        padding: 1.5rem;
    }
    .view-badge { 
        width: auto; 
        height: auto; 
        padding: 8px 16px; 
        border-radius: 24px;
        font-size: 12px;
    }
    
    .featured, .split-grid { grid-template-columns: 1fr; gap: 3rem; }
    .featured-right { padding-left: 0; }
    .featured-heading { font-size: 3.5rem; }
    
    .arrow-link {
        display: flex;
        justify-content: center;
        background-color: var(--color-white);
        color: var(--color-navy);
        padding: 16px;
        width: 100%;
        text-align: center;
        margin-top: 1rem;
        transition: none;
    }
    
    .arrow-link:hover {
        transform: none;
    }
    
    .capabilities-list, .capabilities-heading { grid-column: span 1; }
    .large-heading { font-size: 2.25rem; }
    .section-heading { font-size: 3.5rem; margin-bottom: 2rem; }
    
    .testimonial { padding: 6rem 24px; }
    .quote-text { font-size: 1.5rem; margin-bottom: 2rem; }
    .quote-mark { font-size: 15rem; }
    
    .footer-content { margin-bottom: 4rem; }
    .massive-text { font-size: 15vw; margin-bottom: 1.5rem; }
    .footer-contact-links { gap: 1.5rem !important; flex-direction: column; align-items: flex-start !important; }
    
    .footer-bottom { flex-direction: column; gap: 1rem; align-items: center; text-align: center; }
    .legal-links a { margin: 0 1rem; }
}

/* Chatbot UI */
.chatbot-container {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    pointer-events: none;
}

.chatbot-toggle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: var(--color-white);
    color: var(--color-navy);
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    transition: transform var(--transition-fluid);
    pointer-events: auto;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
}

.chatbot-window {
    width: 350px;
    height: 450px;
    background-color: var(--color-navy);
    border: 1px solid var(--color-sage);
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 20px 40px rgba(0,0,0,0.8);
}

.chatbot-window.active {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.chatbot-header {
    background-color: var(--color-white);
    color: var(--color-navy);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header h3 {
    font-family: var(--font-heading);
    letter-spacing: 0.1em;
    font-size: 1.2rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-navy);
    cursor: pointer;
    line-height: 1;
    transition: transform var(--transition-fluid);
}

.close-btn:hover {
    transform: scale(1.2);
}

.chatbot-body {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background-color: var(--color-navy);
    overflow-y: auto;
    gap: 12px;
}

.chat-message {
    background-color: var(--color-charcoal);
    color: var(--color-white);
    padding: 12px 16px;
    border-radius: 8px;
    max-width: 80%;
    font-size: 0.9rem;
    border-bottom-left-radius: 0;
    line-height: 1.5;
    align-self: flex-start;
}

.chat-message.user-message {
    background-color: var(--color-cyan);
    color: var(--color-navy);
    align-self: flex-end;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 0;
}

.chatbot-footer {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    gap: 10px;
}

.chatbot-footer input {
    flex: 1;
    background: transparent;
    border: 1px solid var(--color-taupe);
    padding: 10px 12px;
    color: var(--color-white);
    font-family: var(--font-body);
    border-radius: 4px;
    outline: none;
}

.chatbot-footer input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chatbot-footer button {
    background-color: var(--color-white);
    color: var(--color-navy);
    border: none;
    padding: 0 16px;
    font-family: var(--font-heading);
    letter-spacing: 0.05em;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.chatbot-footer button:hover {
    background-color: var(--color-cyan);
}

.chatbot-footer button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-heading);
    letter-spacing: 0.1em;
    font-size: 0.8rem;
    color: var(--color-taupe);
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #25D366;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(37, 211, 102, 0.6);
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(37, 211, 102, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

@media (max-width: 768px) {
    .chatbot-container { bottom: 20px; right: 20px; }
    .chatbot-toggle { width: 56px; height: 56px; }
    
    .chatbot-window { 
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh; /* fallback */
        height: 100dvh; /* dynamic viewport height for mobile keyboards */
        margin: 0;
        border-radius: 0;
        border: none;
        z-index: 10000;
        transform: translateY(50px);
    }
    
    .chatbot-window.active {
        transform: translateY(0);
    }
}

/* Terminal Preloader */
.terminal-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--color-navy);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px;
    font-family: 'Courier New', Courier, monospace;
    color: var(--color-sage);
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}

.terminal-loader.hidden {
    transform: translateY(-100vh);
}

.terminal-lines {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.875rem;
    line-height: 1.2;
    height: 60vh;
    overflow: hidden;
}

.terminal-line {
    opacity: 0;
    animation: fadeIn 0.1s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.terminal-line .success { color: var(--color-cyan); text-shadow: 0 0 5px var(--color-cyan); }
.terminal-line .warning { color: var(--color-beige); }
.terminal-line .error { color: #EA4335; }
.terminal-line .label { color: var(--color-taupe); }

.loader-bottom {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
}

.loading-bar-container {
    width: 100%;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.loading-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background-color: var(--color-cyan);
    box-shadow: 0 0 10px var(--color-cyan);
    transition: width 0.1s linear;
}

.massive-percentage {
    font-size: 15vw;
    line-height: 0.8;
    color: var(--color-white);
    margin: 0;
}

@media (max-width: 768px) {
    .terminal-loader { padding: 24px; }
    .terminal-lines { height: 70vh; font-size: 0.75rem; }
    .massive-percentage { font-size: 24vw; }
}

/* Targeting Bracket Cursor */
.target-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 32px;
    height: 32px;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1), height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, width, height;
}

.bracket {
    position: absolute;
    width: 8px;
    height: 8px;
    border: 2px solid var(--color-cyan);
    transition: border-color 0.3s;
}

.top-left { top: 0; left: 0; border-right: none; border-bottom: none; }
.top-right { top: 0; right: 0; border-left: none; border-bottom: none; }
.bottom-left { bottom: 0; left: 0; border-right: none; border-top: none; }
.bottom-right { bottom: 0; right: 0; border-left: none; border-top: none; }

.target-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    background-color: var(--color-cyan);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
}

/* Hover States */
.target-cursor.hovering {
    width: 80px;
    height: 80px;
}

.target-cursor.hovering .bracket {
    border-color: var(--color-white);
}

.target-cursor.hovering .target-dot {
    opacity: 0;
}

/* Device Specific Cursor Handling */
@media (pointer: fine) {
    body, a, button, input, .chatbot-toggle, .btn-outline {
        cursor: none !important;
    }
}

@media (pointer: coarse), (max-width: 768px) {
    .target-cursor {
        display: none !important;
    }
    body {
        cursor: auto;
    }
    a, button, .chatbot-toggle, .btn-outline {
        cursor: pointer;
    }
}
