/* ========================================
   DESIGN SYSTEM CSS - Filipa Matias Portfolio
   ======================================== */

/* CSS Variables */
:root {
    /* Colors */
    --primary-color: #103585;
    --secondary-color: #FFDFE1;
    --bg-page: #FAFAFA;
    --bg-container: #EFF0EB;
    --text-primary: #030303;
    --text-secondary: #666666;
    
    /* Typography */
    --font-family: 'Inter', sans-serif;
    --font-size-base: 16px;
    
    /* Border Radius */
    --radius-container: 48px;
    --radius-card: 12px;
    --radius-pill: 50px;
    
    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 32px;
    --spacing-xl: 48px;
    --spacing-xxl: 64px;
}

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

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    color: var(--text-primary);
    background-color: var(--bg-page);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

ul {
    list-style: none;
}

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

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ========================================
   HEADER / NAVIGATION
   ======================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: transparent;
    z-index: 1000;
    padding: var(--spacing-md) 0;
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    transform: translateY(0);
}

.header.hidden {
    transform: translateY(-100%);
}

.header.menu-open {
    background-color: var(--bg-page);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 18px;
    color: var(--text-primary);
}

.logo-icon {
    width: 32px;
    height: 32px;
}

.nav-menu {
    display: flex;
    gap: 12px;
    align-items: center;
}

.nav-menu li {
    list-style: none;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-primary);
    transition: all 0.3s ease;
}

.nav-toggle.active span {
    background-color: var(--primary-color);
}

/* ========================================
   BUTTONS
   ======================================== */

.btn-pill {
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
    white-space: nowrap;
}

.btn-pill:hover {
    background-color: #0a2560;
    border-color: #0a2560;
}

.btn-pill.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--text-primary);
    border-color: var(--secondary-color);
}

.btn-pill.btn-secondary:hover {
    background-color: #ffcfd1;
    border-color: #ffcfd1;
}

/* Navigation Pill Group (Work + About me together) */
.nav-pill-group {
    display: flex;
    background-color: var(--primary-color);
    border-radius: 50px;
    padding: 0;
    gap: 0;
    list-style: none;
    overflow: hidden;
    align-items: center;
}

.nav-pill-group a {
    padding: 12px 28px;
    color: white;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    border-radius: 0;
    white-space: nowrap;
    text-decoration: none;
    border: none;
}

.nav-pill-group a:first-child {
    border-radius: 50px 0 0 50px;
}

.nav-pill-group a:last-child {
    border-radius: 0 50px 50px 0;
}

.nav-pill-group a.active {
    background-color: transparent;
}

.nav-pill-group a:hover,
.nav-pill-group a:focus-visible {
    background-color: rgba(255, 255, 255, 0.15);
}

.btn-pill.btn-small {
    padding: 12px 20px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    background-color: var(--text-primary);
    color: #FFFFFF;
    border-radius: 100px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    text-align: center;
    white-space: nowrap;
    align-self: flex-start;
}

.btn-pill.btn-small:hover {
    background-color: #333333;
}

.btn-ghost {
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-block;
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-ghost:hover {
    background-color: var(--primary-color);
    color: white;
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
    padding: var(--spacing-xxl) 0;
    padding-top: 168px;
    background: linear-gradient(180deg, var(--bg-page) 0%, var(--bg-container) 100%);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 80px;
    max-width: 100%;
}

.hero-image-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeIn 1.2s ease-out forwards;
}

.hero-profile-img {
    width: 100%;
    height: auto;
    display: block;
}

.hero-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    width: 100%;
    gap: 0;
    padding: 0;
    margin: 0;
    min-height: 200px;
}

.hero-title {
    font-size: 96px;
    font-weight: 700;
    line-height: 110px;
    color: var(--primary-color);
    margin: 0 0 var(--spacing-sm) 0;
    padding: 0;
    width: fit-content;
    display: inline-block;
    white-space: nowrap;
    min-width: 280px;
    height: 110px;
    vertical-align: top;
    position: relative;
}

.hero-title.typing {
    overflow: hidden;
}

.hero-title.typing::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background-color: var(--primary-color);
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.hero-subtitle {
    font-size: 48px;
    font-weight: 400;
    line-height: 58px;
    color: var(--primary-color);
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 600px;
    text-align: left;
    min-height: 120px;
    vertical-align: top;
    display: block;
    position: relative;
}

.hero-subtitle.typing {
    min-height: 120px;
}

/* ========================================
   DESIGN PHILOSOPHY SECTION
   ======================================== */

.design-philosophy {
    padding: var(--spacing-xxl) 0;
    background-image: url('../documents/design_structure/assets - homepage_bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.philosophy-card {
    background-color: var(--bg-container);
    border-radius: var(--radius-container);
    padding: var(--spacing-xxl);
    display: flex;
    flex-direction: column;
}

.philosophy-items-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-xl);
}

.philosophy-title {
    font-size: 32px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xl);
}

.philosophy-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.philosophy-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-bottom: var(--spacing-sm);
}

.philosophy-heading {
    font-size: 20px;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.philosophy-heading s {
    text-decoration: line-through;
    text-decoration-color: var(--text-primary);
    text-decoration-thickness: 2px;
    opacity: 0.7;
}

.philosophy-text {
    font-size: 16px;
    color: var(--text-primary);
    line-height: 1.6;
}

/* ========================================
   CASE STUDIES SECTION
   ======================================== */
/* Case Studies Section */
.case-studies-preview {
    background-color: #FAFAFA;
    padding: var(--spacing-xxl) 0;
}

.case-studies-wrapper {
    background-color: #EFF0EB;
    border-radius: 40px;
    padding: 64px 48px;
}

.case-studies-wrapper > .section-tag,
.case-studies-wrapper > .section-title-large,
.case-studies-wrapper > .section-subtitle {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    text-align: left;
}

.section-tag {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.section-title-large {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    line-height: 1.3;
}

.section-subtitle {
    font-size: 16px;
    color: #303030;
    line-height: 1.6;
    margin-bottom: var(--spacing-xl);
}

.case-studies-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
}

.case-study-card {
    background-color: transparent;
    border-radius: var(--radius-card);
    overflow: hidden;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.case-study-card:hover {
    transform: translateY(-4px);
}

.case-thumbnail {
    width: 100%;
    height: 304px;
    background-color: #d4d4d4;
    border-radius: var(--radius-card) var(--radius-card) 0 0;
    margin-bottom: 0;
    overflow: hidden;
}

.case-thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.case-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: var(--spacing-sm);
}

/* Card text container with white background */
.case-content {
    background-color: #FFFFFF;
    padding: var(--spacing-md);
    border-radius: 0 0 var(--radius-card) var(--radius-card);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.case-tag {
    padding: 4px 12px;
    background-color: transparent;
    border-radius: 0px;
    font-size: 12px;
    font-weight: 500;
    color: #030303;
}

.case-title {
    font-family: 'Inter', sans-serif;
    font-size: 24px;
    font-weight: 400;
    color: #030303;
    line-height: 42px;
    margin-bottom: var(--spacing-xs);
}

.case-study-card .case-description {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #030303;
    line-height: 19px;
    margin-bottom: 16px;
}

.case-study-card .case-description a {
    text-decoration: underline;
    color: #030303;
}

/* ========================================
   ABOUT PAGE
   ======================================== */

.about-page {
    padding: 0;
    padding-top: 128px;
}

/* Hero Section */
.about-hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xxl);
    align-items: center;
    padding: 40px;
}

.about-image {
    width: 100%;
}

.about-profile-img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: var(--radius-card);
}

.about-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.about-hero-content {
    display: flex;
    flex-direction: column;
}

.about-heading {
    font-size: 48px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.about-greeting {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* Details Section */
.about-details-wrapper {
    width: 100%;
    background-color: #EFF0EB;
    margin-bottom: 0;
}

.about-details-section {
    display: grid;
    grid-template-columns: 30fr 70fr;
    gap: var(--spacing-xxl);
    padding: 40px 0;
}

.about-details-left {
    display: flex;
    align-items: flex-start;
}

.about-bio-title {
    font-size: 36px;
    font-weight: 400;
    line-height: 43px;
    color: #103585;
    margin-bottom: 0;
}

.about-details-right {
    display: flex;
    flex-direction: column;
}

.about-paragraph {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 30px;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    max-width: 65ch;
}

/* ========================================
   WORK PAGE
   ======================================== */

.work-page {
    padding: var(--spacing-xxl) 0;
    padding-top: 128px;
}

.work-header {
    text-align: left;
    margin-bottom: var(--spacing-xl);
}

.work-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
}

.work-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
}

/* ========================================
   CASE STUDY PAGE
   ======================================== */

.case-study-page {
    padding: 0;
    padding-top: 128px;
}

/* Hero Image Section */
.hero-image-section {
    width: 100%;
    margin: var(--spacing-xxl) 0;
}

.hero-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    display: block;
}

.case-study-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    padding: 40px;
}

.case-study-intro {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
    position: static;
}

/* Desktop only: sticky positioning */
@media (min-width: 769px) {
    .case-study-intro {
        position: sticky;
        top: 100px;
        align-self: flex-start;
        transition: position 0.3s ease;
    }
    
    .case-study-intro.unsticky {
        position: static;
    }
}

.case-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.case-study-title {
    font-size: 48px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.case-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
}

.case-study-meta {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.case-description {
    font-size: 16px;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 4px;
}

.case-description a {
    text-decoration: underline;
    color: var(--text-primary);
}

.meta-grid {
    display: grid;
    gap: var(--spacing-md);
}

.meta-item {
    padding-bottom: var(--spacing-sm);
}

.meta-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.meta-value {
    font-size: 16px;
    color: var(--text-primary);
}

/* Removed gallery section - images now within sections */

.case-study-section {
    margin-bottom: 0;
    padding: 40px;
}

/* Section Images Grid */
.section-images-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.section-images-grid .image-item {
    border-radius: var(--radius-card);
    overflow: hidden;
    aspect-ratio: 3/4;
}

.section-images-grid .image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* MOIA-specific image grid overrides - single column centered layout */
.section-images-grid.moia-images {
    grid-template-columns: 1fr;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.section-images-grid.moia-images .image-item {
    aspect-ratio: auto;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-images-grid.moia-images .image-item img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 1800px;
    object-fit: contain;
}

/* Data Canvas-specific image grid - flexible single/two-column layout */
.section-images-grid.data-canvas-images {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
}

.section-images-grid.data-canvas-images .image-item {
    aspect-ratio: auto;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-images-grid.data-canvas-images .image-item img {
    width: auto;
    height: auto;
    max-width: 100%;
    object-fit: contain;
}

/* Single centered image row */
.section-images-grid.data-canvas-images .image-row-single {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Two-column row without distortion */
.section-images-grid.data-canvas-images .image-row-double {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
    width: 100%;
}

.section-images-grid.data-canvas-images .image-row-double .image-item img {
    max-height: 800px;
}

/* Normalize height for Row 3 images without distortion */
.section-images-grid.data-canvas-images .row-3-normalized .image-item {
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-images-grid.data-canvas-images .row-3-normalized .image-item img {
    height: 100%;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

/* Grey border for dashboard hover gif */
.dashboard-hover-border {
    border: 1px solid #D1D1D1;
}

.section-heading {
    font-size: 32px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.section-text {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
}

.outcomes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.outcome-card {
    background-color: var(--secondary-color);
    border-radius: var(--radius-container);
    padding: var(--spacing-xl);
    text-align: center;
    min-height: 384px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.outcome-stat {
    font-size: 28px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
}

.outcome-subtext {
    font-size: 20px;
    font-weight: 400;
    line-height: 1.2;
    display: block;
    margin-top: 8px;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
    background-color: var(--bg-container);
    padding: var(--spacing-lg) 0;
    margin-top: var(--spacing-xxl);
}

/* Remove top margin when footer follows about page */
.about-page + .footer {
    margin-top: 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.footer-links {
    display: flex;
    gap: var(--spacing-md);
}

.footer-links a {
    font-size: 14px;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* ========================================
   ACCESSIBILITY - KEYBOARD FOCUS STATES
   ======================================== */

/* Focus visible states for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Button focus states */
.btn-pill:focus-visible,
.btn-pill.btn-secondary:focus-visible,
.btn-pill.btn-small:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
}

/* Navigation focus states */
.nav-pill-group a:focus-visible {
    background-color: rgba(255, 255, 255, 0.2);
    outline: 2px solid white;
    outline-offset: -2px;
}

/* Link focus states */
a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Card focus states */
.case-study-card:focus-within {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
}

/* Ghost button focus states */
.btn-ghost:focus-visible {
    background-color: rgba(16, 53, 133, 0.05);
    border-color: var(--primary-color);
}

/* Nav toggle button focus */
.nav-toggle:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
}

/* ========================================
   NOTE: All responsive styles are in responsive.css
   ======================================== */
