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

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

body {
    background-color: #F2EDE4;
    color: #2A2A28;
    font-family: 'Karla', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
}

/* Grain Overlay */
.grain-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.08;
}

.grain-overlay svg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Header Strip */
.header-strip {
    height: 15vh;
    background-color: #2A2A28;
    color: #F2EDE4;
    padding: 2rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #C4B9A8;
    position: relative;
    z-index: 100;
    border-left: 4px solid #3D4A3A;
}

.header-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-strip h1 {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #F2EDE4;
}

.header-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
}

.header-icon svg {
    width: 100%;
    height: 100%;
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 100%;
}

/* Card Styles */
.card {
    border: 1px solid #C4B9A8;
    border-radius: 4px;
    overflow: hidden;
    padding: 1.5rem;
    background-color: #F2EDE4;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 320px;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #6B8F71, #8B7EB5, #5CADA1);
    transition: width 0.4s ease;
}

.card:hover {
    border-color: #8B7EB5;
    box-shadow: 0 8px 24px rgba(139, 126, 181, 0.12);
    transform: translateY(-4px);
}

.card:hover::before {
    width: 100%;
}

/* Card shapes */
.card-shape {
    width: 100%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(244, 239, 227, 0.5) 0%, rgba(212, 196, 168, 0.3) 100%);
    border-radius: 2px;
    margin-bottom: 0.5rem;
}

.card-shape svg {
    width: 100%;
    height: 100%;
    padding: 1rem;
    filter: drop-shadow(0 2px 4px rgba(42, 42, 40, 0.05));
}

/* Typography */
h1, h2, h3 {
    font-family: 'Barlow Condensed', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #2A2A28;
}

h1 {
    font-weight: 600;
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: 0.08em;
}

h2 {
    font-weight: 500;
    font-size: clamp(1.3rem, 2.5vw, 2rem);
    margin-bottom: 0.5rem;
    color: #2A2A28;
}

h3 {
    font-weight: 400;
    font-size: clamp(1rem, 2vw, 1.4rem);
}

p {
    font-family: 'Karla', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.7;
    color: #4A4A46;
}

/* Card content specific */
.card h2 {
    font-size: 1.2rem;
    color: #2A2A28;
    margin-top: 0.5rem;
}

.card p {
    font-size: 13px;
    line-height: 1.6;
    color: #5CADA1;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

/* Gradient accents by card type */
.card[data-shape="type-1"]::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #6B8F71);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover[data-shape="type-1"]::after {
    opacity: 1;
}

.card[data-shape="type-2"]::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #8B7EB5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover[data-shape="type-2"]::after {
    opacity: 1;
}

.card[data-shape="type-3"]::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #5CADA1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover[data-shape="type-3"]::after {
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .header-strip {
        height: 12vh;
        padding: 1.5rem;
    }

    .header-strip h1 {
        font-size: clamp(1.5rem, 4vw, 2.5rem);
    }

    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .card {
        padding: 1rem;
        min-height: 280px;
    }

    .card-shape {
        height: 120px;
    }
}

@media (max-width: 480px) {
    .header-strip {
        height: 10vh;
        padding: 1rem;
    }

    .header-strip h1 {
        font-size: clamp(1.2rem, 3vw, 2rem);
        letter-spacing: 0.06em;
    }

    .header-icon {
        width: 50px;
        height: 50px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }

    .card {
        padding: 0.75rem;
        min-height: 260px;
    }

    .card-shape {
        height: 100px;
        margin-bottom: 0.25rem;
    }

    .card p {
        font-size: 12px;
    }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #F2EDE4;
}

::-webkit-scrollbar-thumb {
    background: #C4B9A8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #8B7EB5;
}

/* Color palette reference - ensuring all design colors are used */
.color-d4c4a8-ref {
    color: #D4C4A8;
}
