:root {
    /* --- Professional Palette --- */
    --bg-color: #ffffff;
    --text-color: #111827;
    /* Cool Grey 900 */
    --text-muted: #6b7280;
    /* Cool Grey 500 */

    /* Brand Colors */
    --brand-rive: #FF5E5E;
    --brand-spline: #5B8DF8;
    --brand-lottie: #00DDB3;
    --brand-ae: #9999FF;

    /* Typography */
    --font-primary: 'Plus Jakarta Sans', sans-serif;
}

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

html.lenis {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto;
}

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

/* --- Layout --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* --- Navigation --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    padding-left: max(2rem, 5vw);
    padding-right: max(2rem, 5vw);
}

.logo {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.03em;
    text-decoration: none;
    color: var(--text-color);
}

.nav-cta {
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    color: var(--text-color);
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.nav-cta:hover {
    border-bottom-color: var(--text-color);
}

/* --- Hero Section --- */
header {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding-top: 10vh;
}

h1 {
    font-weight: 800;
    font-size: clamp(3rem, 7vw, 6rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
    max-width: 900px;
}

.typewriter-cursor {
    display: inline-block;
    width: 0.1em;
    height: 1em;
    background-color: currentColor;
    vertical-align: middle;
    margin-left: 5px;
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.dynamic-word {
    display: inline-block;
    position: relative;
    transition: color 0.3s ease;
}

/* Logo container next to text */
.tool-logo {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    width: 1em;
    height: 1em;
    margin-left: 0.2em;
    margin-right: 0.2em;
    opacity: 0;
    transform: translateY(5px);
    transition: all 0.3s ease;
}

.tool-logo.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Hero Footer --- */
.hero-footer {
    position: absolute;
    bottom: 5vh;
    left: 0;
    width: 100%;
    padding: 0 max(2rem, 5vw);
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

/* --- Process Section --- */
section {
    padding: 8rem 0;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

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

.card {
    padding: 2.5rem;
    border-radius: 12px;
    background: #f9fafb;
    /* Gray 50 */
    border: 1px solid transparent;
    /* Prepare for hover border */
    transition: all 0.3s ease;
}

.card:hover {
    background: #ffffff;
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.05);
    transform: translateY(-5px);
}

.card-icon {
    width: 48px;
    height: 48px;
    background: #e5e7eb;
    border-radius: 8px;
    margin-bottom: 2rem;
    display: grid;
    place-items: center;
    font-weight: 700;
    color: var(--text-color);
}

.card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.card p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* --- Project List --- */
.project-row {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    padding: 4rem 2rem;
    /* Added side padding for hover bg */
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    align-items: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border-radius: 8px;
    /* Smooth corners for hover bg */
}

.project-row:hover {
    background: linear-gradient(to right, rgba(91, 141, 248, 0.03), rgba(255, 255, 255, 0));
    transform: translateX(10px);
    border-bottom-color: transparent;
}

/* Gradient Border Line */
.project-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--brand-spline), var(--brand-ae));
    opacity: 0;
    transition: opacity 0.3s;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.project-row:hover::before {
    opacity: 1;
}

.p-meta {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.05em;
    transition: color 0.3s;
}

.project-row:hover .p-meta {
    color: var(--brand-spline);
}

.p-title {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    transition: background-size 0.3s;
    background: linear-gradient(90deg, var(--text-color), var(--text-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: var(--text-color);
}

.project-row:hover .p-title {
    background: linear-gradient(45deg, var(--brand-spline), var(--brand-ae));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- Footer --- */
footer {
    padding: 8rem 0;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.footer-link {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-link:hover {
    color: #6366f1;
    /* Indigo hover */
}