/* styles.css – with parallax, homepage & publications styling */

:root {
    --color-bg: #ffffff;
    --color-bg-alt: #f5f5f7;
    --color-text: #222222;
    --color-muted: #666666;
    --color-accent: #3949ab;
    --color-border: #e0e0e0;
    --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    line-height: 1.5;
}

/* HOME PAGE BACKGROUND: all sections white (parallax uses images) */
.home-page .section {
    background: #ffffff;
}

/* Publication page specific tweaks */
.pub-page {
    color: #333333;
}
.pub-page .section-page-intro p {
    color: #555555;
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}
.pub-page .pub-list li {
    color: #444444;
    font-size: 0.95rem;
}
.pub-page a {
    color: #0073aa;
}
.pub-page a:hover,
.pub-page a:focus {
    color: #005177;
    text-decoration: underline;
}
.pub-page h2,
.pub-page h3 {
    font-family: "Amethysta", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 600;
    color: #DE8F6F;
    text-align: center;
}
.author-name {
    text-decoration: underline;
    font-weight: 400;
}

/* ALL PAGES SECTION HEADERS (About, Research areas, Work experience, Education) */
.home-page main .section h2,
.research-page main .section h2,
.pub-page main .section h2,
.news-page main .section h2 {
    font-family: "Amethysta", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 600;
    color: #DE8F6F;
    text-align: center;
	font-size: 2.1rem;   /* NEW: slightly larger */
}

/* Accessibility helper */
.skip-link {
    position: absolute;
    left: -999px;
    top: -999px;
    padding: 0.5rem 0.75rem;
    background: var(--color-accent);
    color: #fff;
    text-decoration: none;
    z-index: 1000;
}
.skip-link:focus {
    left: 1rem;
    top: 1rem;
}

/* Header & navigation */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #ffffff;
    border-bottom: 1px solid var(--color-border);
    padding: 0.75rem 1rem;
	
	/* NEW: make logo left, nav right on one line */
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.site-header .brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.site-header .logo img {
    height: 48px;
    width: auto;
}
.site-header .site-title h1 {
    margin: 0;
    font-size: 1.25rem;
    letter-spacing: 0.05em;
}
.site-header .site-title p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-muted);
}

/* NAV: at same vertical level, aligned right, blue color */
.site-nav {
    margin-top: 0;            /* was 0.5rem; now on same line as logo */
}
.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1rem;
	justify-content: flex-end;
}
.site-nav a {
    text-decoration: none;
    color: #0170B9;           /* requested blue */
    font-weight: 500;
}
.site-nav a[aria-current="page"] {
    color: #0170B9;           /* keep active link same color */
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.25rem;
    margin-left: auto;
    cursor: pointer;
}
.nav-toggle-bar {
    display: block;
    width: 20px;
    height: 2px;
    margin: 3px 0;
    background: var(--color-text);
}
.nav-toggle-label {
    position: absolute;
    left: -999px;
}

/* Parallax sections */
.parallax-section {
    position: relative;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
	background-repeat: no-repeat;  /* prevent top from repeating at the bottom */
    min-height: 400px
	padding: 4rem 0;
}

/* soft fade at top and bottom into white */
.parallax-section::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 20px;  /* fixed height for softened edge */
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0) 0%,
		rgba(255, 255, 255, 0) 50%,  /* still transparent through most of banner */
        #ffffff 100%
    );
}

/* Hero parallax with light grey overlay */
.hero {
    position: relative;              /* NEW: base for absolute overlay */
	min-height: 75vh;  /* 100vh makes it fill the viewport height */
    display: flex;
    align-items: center;
    justify-content: flex-start;  /* text anchored to left */
}
/* Semi-transparent light grey overlay over the image */
.hero-overlay {
    position: absolute;              /* cover entire hero */
	inset: 0;                        /* top/right/bottom/left = 0 */
    background: rgba(111, 111, 111, 0.2); /* semi-transparent light grey */
	display: flex;                   /* center content inside overlay */
    align-items: center;
    justify-content: flex-start;
}
.hero.parallax-section {
    position: relative;
    height: 70vh;              /* ~60% of viewport height; this value needs to be smaller than .hero min-height otherwise a weird bottom margin is created */
    padding-top: 0;
    padding-bottom: 0;
    background-image: url("Virtual_interior_Chiara2.png");
    background-size: contain; /* show more of the image*/
	background-position: center center;
	background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Mobiles: shorter banner, no fixed attachment */
@media (max-width: 768px) {
    .hero.parallax-section {
        min-height: 28vh;          /* shorter on mobile */
        background-attachment: scroll;
    }
}	

/* Text block on the left */
.hero-inner {
    max-width: 960px;
    margin: 0 15rem; /* was: margin: 0 auto;  → this anchors it left */
    padding: 4rem 0;
    text-align: left;
    color: #ffffff;
}
/* VISUAL PASTS – uppercase, Amethysta, white */
.hero-inner h2 {
    margin: 0 0 1.25rem;   /* was 0 0 0.75rem */
    font-size: 2.5rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
	font-family: "Amethysta", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #ffffff;
}
/* Short line under VISUAL PASTS */
.hero-divider {
    width: 160px;            /* slightly shorter than the text */
    max-width: 40%;
    height: 1.5px;
    background-color: #ffffff;
    margin: 0 0 1.25rem;   /* was 0.75rem 0 0.75rem; now only bottom spacing */
}
/* Chiara Piccoli's portfolio – Amethysta, white, aligned with title */
.hero-inner p {
    margin: 0.5rem 0 0;    /* was 0; increase top margin for separation */
    font-size: 1.7rem;
	font-family: "Amethysta", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #ffffff;
}

/* Light parallax overlay for content sections (About, Research areas) */
.parallax-light .section-inner,
.parallax-light .section-grid {
    background-color: rgba(245, 245, 245, 0.85); /* semi-transparent light grey */
    border-radius: 8px;
    padding: 1.5rem;
}

/* Mid-page parallax banners */
.parallax-banner {
    min-height: 60vh; /* was 40vh – increase as desired */
    position: relative;
}
.parallax-banner-overlay {
    position: absolute;
    inset: 0;
    background: rgba(245, 245, 245, 0.4); /* subtle light grey overlay */
}

/* Layout */
.section {
    padding: 2.5rem 1rem;
}
.section-inner {
    max-width: 960px;
    margin: 0 auto;
}
.section h2,
.section h3 {
    margin-top: 0;
}
.section-heading-divider {
    width: 80px;
    height: 2px;
    background-color: #000000;
    margin: 0.75rem auto 1.5rem;  /* centered under the header */
}

/* ABOUT section: centered header, round portrait, social icons row, centered bio */
.about-inner {
    text-align: center;
}

.about-profile {
    display: block;
    margin: 1.5rem auto 1rem;
    width: 20vw;            /* ~20% of viewport width */
    max-width: 220px;       /* cap size on large screens */
    min-width: 140px;       /* avoid too small on small screens */
    height: auto;
    border-radius: 50%;     /* round shape */
    object-fit: cover;
}

/* social icons directly under the photo */
.about-social {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.social-icon img {
    display: block;
    width: 40px;
    height: 40px;
    /*border-radius: 50%;  /* keep them round; remove if you want square icons */
}

/* centered bio, wider than the portrait */
.about-bio {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}
.about-bio p {
    margin-bottom: 0.75rem;
}

/* Grid helpers */
.section-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.8fr);
    gap: 1.5rem;
    align-items: start;
}
.section-media img {
    max-width: 100%;
    border-radius: 4px;
}

/* Cards */
.cards,
.research-cards {
    display: grid;
    gap: 1rem;
}
.card {
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 1rem;
    background: #fff;
}

/* Research area cards: 2x2 grid and styled titles */
.home-page .section-research-areas .research-cards,
.research-page .section-topic .research-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.home-page .section-research-areas .card h3,
.research-page .section-topic .card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-family: "Amethysta", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 600;
    color: #DE8F6F;
	text-align: center;   /* NEW: center header within the card/grid */
}

.home-page .section-research-areas .card p {
    text-align: center;
}
.card p:last-child {
    margin-bottom: 0;
}
/* Research cards: no border rectangle, use soft shadow instead */
.home-page .section-research-areas .card,
.research-page .section-topic .card {
    /* overrides generic .card border border: none;  */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.card-arrow {
    margin-top: 1rem;
	}

.card-arrow img {
    display: block;
    margin: 0 auto;   /* center horizontally */
    width: 24px;      /* adjust size as desired */
    height: auto;
}

/* Extra spacing below each research card on the research page */
.research-page .section-topic .card {
    margin-bottom: 1.5rem;   /* adjust to taste (1.5–2rem) */
}

/* Mosaic-style research items (used on research.html) */
.research-page .research-grid {
    column-count: 3;           /* number of “columns” on wide screens */
    column-gap: 1.75rem;
}

@media (max-width: 900px) {
    .research-page .research-grid {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .research-page .research-grid {
        column-count: 1;
    }
}
	
	/*for mosaic-style research items on research.html was:
	display: flex;
    flex-wrap: wrap;
    gap: 1.75rem;
	align-items: flex-start;   /* no equal-height stretching */
	/* for fixed grid, it was: display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.75rem;*/

.research-page .research-item {
	display: inline-block;     /* needed inside multi-column container */
    width: 100%;
    margin: 0 0 1.75rem;
    border: 2px solid #DE8F6F;
    border-radius: 10px;
    background-color: #ffffff;
    overflow: hidden;
    vertical-align: top;
    break-inside: avoid;       /* avoid items splitting across columns */
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
	
	
	/*for mosaic-style it was:
	flex: 1 1 260px;   /* min width ≈ 260px, grows if there’s room 
    display: flex;
    flex-direction: column;
    border: 2px solid #DE8F6F;
    border-radius: 10px;
    background-color: #ffffff;
    overflow: hidden;*/
   /* for fixed grid: it was border: 2px solid #DE8F6F;
    border-radius: 10px;
    background-color: #ffffff;
    overflow: hidden;
    display: flex;
    flex-direction: column;*/
}

.research-page .research-item img {
    width: 100%;
	/*max-height: 260px;   /* optional: limit very tall images but cuts the elonged ones */
	object-fit: cover;
}

.research-page .research-item-body {
    padding: 1rem 1.25rem 1.25rem;
}

.research-page .research-item-body h4 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #0170B9;
}

.research-page .research-item-body p {
    margin: 0.4rem 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Sketchfab embeds inside research items */
.research-page .sketchfab-embed-wrapper {
    margin: 1rem 1.25rem 1.25rem;  /* same horizontal padding as .research-item-body */
    text-align: center;
}

.research-page .sketchfab-embed-wrapper iframe {
    display: block;
    width: 100%;        /* span full width of the research item */
    max-width: 100%;
    height: 380px;      /* adjust to taste / aspect ratio */
    border: none;
}

/* Timeline (used by Work experience & Education) -- This is the outdated one; the layout is overwritten by the .timeline below*/
.timeline {
    border-left: 2px solid var(--color-border);
    margin-left: 0.5rem;
    padding-left: 1.5rem;
}
.timeline-item {
    margin-bottom: 1.5rem;
    position: relative;
}
.timeline-item::before {
    content: "";
    position: absolute;
    left: -1.85rem;
    top: 0.3rem;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--color-accent);
}

.timeline-video {
    grid-column: 1 / -1;   /* span both timeline columns */
    margin-top: 1rem;
	margin-left: 100px;
}

/* Video as research card – scoped to research page only */
.research-page .research-video-card figure {
    margin: 0;
}

.research-page .research-video-card video {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.research-page .research-video-card figcaption {
    margin-top: 0.6rem;
    font-size: 0.95rem;
    line-height: 1.4;
    text-align: center;
}

/* Work & Education: timeline dots colored #DE8F6F */
.home-page .section-work .timeline-item::before,
.home-page .section-education .timeline-item::before {
    background: #DE8F6F;
}

.timeline-item h3 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 600;
}
.timeline-location {
    margin: 0 0 0.25rem;
    font-size: 0.9rem;
    color: var(--color-muted);
}
.timeline-item h4 {
    margin: 0 0 0.5rem;
}
/* CV button*/
.cv-button-wrap {
    text-align: center;
    margin: 0 0 1.5rem;
}

.cv-button {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    background-color: #0170B9;
    color: #ffffff;
    border-radius: 999px;       /* rounded rectangle */
    text-decoration: none;
    font-weight: 600;
}

.cv-button:hover,
.cv-button:focus {
    background-color: #015a90;
}

/* Publications lists */
.pub-list {
    list-style: none;
    padding-left: 0;
}
.pub-list li {
    margin-bottom: 0.75rem;
}

/* Extra spacing between subsections on the publications page */
.pub-page main .section h3 {
    margin-top: 2.5rem;   /* more space above each subsection */
    margin-bottom: 0.75rem; /* keep a modest space below */
}

/* Images & figures (used on other pages) */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
figure {
    margin: 0;
    background: #fff;
    border-radius: 4px;
    border: 1px solid var(--color-border);
    padding: 0.5rem;
}
figure img {
    width: 100%;
    height: auto;
    border-radius: 3px;
}
figcaption {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--color-muted);
}

.news-page .news-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.news-page .news-item {
	border: 1px solid var(--color-border);
    border-radius: 8px;
    background-color: #ffffff;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
	
	/* KEY: do not stretch items to full height */
    align-items: flex-start;
}

.news-page .news-item-body {
    flex: 1 1 260px;
}

.news-page .news-item-meta {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #666666;
    margin: 0 0 0.25rem;
}


.news-page .news-item-title {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    font-weight: 600;
}

.news-page .news-item-media {
    flex: 0 0 180px;  /* small, fixed-ish width for the image column */
    margin: 0;
    align-self: flex-start;  /* make sure it stays at the top */
    padding: 4px;               /* small inner padding so image doesn’t touch border */
}

.news-page .news-item-media img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
    border: 1px solid var(--color-border);  /* border hugging the image *//* or #DE8F6F if you prefer */
}

/* Special case: long image at the bottom of the post */
.news-page .news-item--image-bottom {
    /*display: flex;*/
    flex-direction: column;   /* stack text and image vertically */
    /*align-items: stretch;     /* full width content */
	
	/* override the general .news-item gap */
    gap: 0.25rem;   /* or 0 if you want them almost touching */
}

.news-page .news-item--image-bottom .news-item-body {
    order: 0;
}

.news-page .news-item--image-bottom .news-item-media {
    order: 1;
    margin-top: 0.25rem;   /* was 0.5rem or 1rem */
    margin-bottom: 0;      /* avoid extra space after the image */
	flex: 0 0 auto;
    width: 100%;
    
}

.news-page .news-item--image-bottom .news-item-media img {
    display: block;
    width: 100%;   /* image fills card width */
    height: auto;
    border-radius: 6px;
    border: 1px solid var(--color-border);
}

.news-page .news-item--image-bottom .news-item-body > *:last-child {
    margin-bottom: 0;
}


/* Social links */
.social-links ul,
.footer-social {
    list-style: none;
    padding-left: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}
.social-links a,
.footer-social a {
    text-decoration: none;
    font-size: 0.9rem;
    color: #ffffff; /* footer links white on gradient */
}

/* Contact block */
.contact-block img {
    max-width: 260px;
    height: auto;
    display: block;
    margin-top: 0.5rem;
}

/* Footer: centered, semi-transparent gradient #DE8F6F */
.site-footer {
    border-top: 0;
    padding: 3rem 1rem;  /* was 1rem → makes footer taller */
    background: linear-gradient(
        to top,
        rgb(227, 165, 141) 0%,   /* bottom */
        #ffffff 100%             /* top, blends into page background */
    );
    color: #ffffff;
}
.footer-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;      /* stack text and links */
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
   
}
.footer-inner p {
    margin: 0;
    font-size: 0.9rem;
	text-align: center;
}
.footer-social {
    justify-content: center;
}

.site-footer .footer-copy {
    margin: 0 2;
    font-size: 1rem;
    color: #DE8F6F;
	text-align: center;
}
/* Links (global default; publication/home overrides where needed) */
a {
    color: var(--color-accent);
}
a:hover,
a:focus {
    text-decoration: underline;
}

/* Page intro (generic) */
.section-page-intro h2 {
    margin-bottom: 0.5rem;
}
.section-page-intro p {
    max-width: 720px;
}

/* Responsive */
@media (max-width: 768px) {
    .section-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .site-header {
        padding-bottom: 0.5rem;
		 padding: 0.75rem 2.5rem;  /* was 0.75rem 1rem; → pushes nav further right */
    }

    .nav-toggle {
        display: inline-block;
    }

    .site-nav {
        display: none;
        margin-top: 0.5rem;
		margin-right: 2rem;     /* NEW: extra space to the right */
    }

    .site-nav.is-open {
        display: block;
    }

    .site-nav ul {
        list-style: none;
		margin: 0;
		padding: 0;
		display: flex;
		gap: 3rem;                /* was 1rem; → more space between items */
		justify-content: flex-end;
    }

    /* Avoid fixed backgrounds on mobile for performance */
    .parallax-section {
        background-attachment: scroll;
    }

    .hero {
        min-height: 40vh;
    }

    .home-page .section-research-areas .research-cards {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
/* Homepage: move Home / Research / Publications a bit away from the right edge,
   and keep more space between them */
.home-page .site-nav,
.research-page .site-nav,
.pub-page .site-nav,
.news-page .site-nav {
    margin-right: 2rem;      /* increases space from the right margin → menu shifts left */
}

.home-page .site-nav ul,
.research-page .site-nav ul,
.pub-page .site-nav ul,
.news-page .site-nav ul {
    gap: 2.5rem;             /* more space between the three headers */
}

/* Timeline layout for Work experience & Education – two columns */
.timeline {
    margin: 2rem 0;
    border-left: none;          /* override old vertical line */
    padding-left: 0;
}

.timeline-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 2rem;
    align-items: flex-start;
    padding: 1.5rem 0;
}

/* LEFT COLUMN: date, line + arrow, location */
.timeline-left {
    text-align: left;
	margin-left: 100px; 
    font-size: 0.95rem;
	/*justify-self: end;      /* move the whole left column block toward the right */
}

.timeline-date {
    margin: 0 0 0.5rem;
    color: #DE8F6F;             /* requested color for dates */
    font-weight: 600;
}

.timeline-line {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.timeline-line-inner {
    display: block;
    width: 100px;
    height: 1px;                 /* consistent thickness */
    background-color: #969393;   /* grey line */
    border: 0;                   /* ensure no extra border thickness */
}

.timeline-arrow {
    width: 15px;                /* small arrow icon at the end of the line */
    height: auto;
}

.timeline-location {
    margin: 0;
    color: #666666;
    font-size: 0.9rem;
}

/* RIGHT COLUMN: title and description */
.timeline-right {
    text-align: left;
}

.timeline-title {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #0170B9;             /* job/degree title color */
    text-transform: uppercase;  /* make title uppercase */
}

.timeline-description {
    margin: 0;
    font-size: 0.95rem;
    color: #222222;
}

/* Remove old dot markers for Work & Education timelines */
.home-page .section-work .timeline-item::before,
.home-page .section-education .timeline-item::before {
    content: none;
}