:root {
    --bg: #FBF9FF;
    --text: #0b2027;
    --secondary: rgba(207, 215, 199, 0.2);
    --accent: #40798c; 
    --subtle: rgba(207, 215, 199, 0.6);
    --light: rgba(112, 169, 161, 0.6);
}

* { box-sizing: border-box; }
body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
    line-height: 1.6; color: var(--text); background: var(--bg); margin: 0; 
}

/* Navigation */
nav {
    position: sticky; top: 0; background: var(--bg);
    backdrop-filter: blur(10px); border-bottom: 1px solid #eee;
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 10%; z-index: 100;
}
nav a { text-decoration: none; color: var(--text); font-weight: 500; margin-left: 2rem; font-size: 0.9rem; }
.logo { font-weight: 700; font-size: 1.2rem; margin-left: 0;
 }

/* Hero Section */
header { 
    /* This spans the full width of the browser */
    background: var(--subtle); 
    padding: 15vh 0; /* Remove horizontal padding here */
    width: 100%;
}

.container-inner {
    /* This keeps your text centered and readable */
    max-width: 900px;
    padding: 0 10%; /* Adds breathing room on mobile */
}
h1 { font-size: 3rem; margin-bottom: 1rem; letter-spacing: -1px; }
.hero-p { font-size: 1.4rem; color: var(--text); margin-bottom: 2rem; }

/* Ribbon */
.ribbon {
    background: var(--bg);
    min-height: 400px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ribbon .container-inner {
    display: flex;
    justify-content: center;
    align-items: center;
}


.ribbon-media { display:flex; flex-direction:column; align-items:center; }

.ribbon-quote {
    max-width: 800px;
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: center;
    margin: 0;
    color: var(--text);
}

.ribbon-author {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    font-style: italic;
    color: var(--text);
    opacity: 0.9;
    text-align: center;
}

.ribbon-controls { margin-top: 0.75rem; display:flex; gap:0.5rem; justify-content:center; }
.ribbon-controls button {
    background: transparent; border: 1px solid var(--subtle); color: var(--subtle); padding: 8px 12px; border-radius: 6px; cursor: pointer; font-size: 0.95rem;
}
.ribbon-controls button:hover { 
    background: var(--light); 
   }

/* Sections */
section { padding: 5rem 10%; border-top: 1px solid #eee; }
h2 { font-size: 1.8rem; margin-bottom: 2rem; }

#playground { background: var(--secondary); }
#playground .card{ background: var(--bg); }

/* Case Study Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.card { 
    padding: 2rem; background: var(--secondary); border-radius: 12px;
    text-decoration: none; color: inherit;
    display: block; border: 1px solid transparent; cursor: default;
}
.card h3 { margin-top: 0; }
.tag { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; color: var(--accent); letter-spacing: 1px; }

/* Force two-column layout on wider viewports and place
   the 3rd card as the first item of the second row */
@media (min-width: 900px) {
    .grid { grid-template-columns: repeat(2, 1fr); }
    #portfolio .grid > .card:nth-child(3) { grid-column: 1; grid-row: 2; }
}

/* Full-width cards for Project Playground */
#playground .grid { grid-template-columns: 1fr; }

/* Contact/Footer */
.footer { padding: 5rem 10%; background: var(--secondary); text-align: center; }
.btn { 
    display: inline-block; background: var(--text); color: var(--bg); 
    padding: 12px 24px; border-radius: 6px; text-decoration: none; font-weight: 600;
}
.btn:hover { 
    background: var(--light);
    color: var(--text);
 }
 
.button-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--text);
}

.btn-outline:hover {
    background: var(--light);
    color: var(--text);
    border-color: var(--light);
}

a {
    color: rgba(112, 169, 161, 0.8);
}
a:visited {
    color: rgba(64, 121, 140, 0.6);
}
a:active {
    color: rgba(112, 169, 161, 1);
}
a:hover {
    color: rgba(112, 169, 161, 0.5);
}

@media (max-width: 768px) {
    nav { padding: 1rem 5%; }
    header, section { padding: 4rem 5%; }
    h1 { font-size: 2.2rem; }
}
