/* =============================================================
   Custom Theme Overrides for Flavio Reggianini Portfolio
   =============================================================
   This file loads AFTER main.css and overrides the template's
   default light theme with a dark theme + cyan titles.

   To tweak the look, edit the CSS variables below.
   ============================================================= */

/* ---- Global color variables --------------------------------- */
/* These override the template's defaults defined in main.css.   */

:root {
  --background-color: #1a1a1a;   /* Main page background (dark) */
  --default-color: #ffffff;      /* Body text color (white)     */
  --heading-color: #5AD3FF;      /* All headings (light blue)   */
  --accent-color: #5AD3FF;       /* Links, buttons, highlights  */
  --surface-color: #252525;      /* Cards / boxed elements      */
  --contrast-color: #0a090f;     /* Text on accent backgrounds  */
}

/* ---- Nav menu colors ---------------------------------------- */
:root {
  --nav-color: #ffffff;
  --nav-hover-color: #5AD3FF;
  --nav-mobile-background-color: #1a1a1a;
  --nav-dropdown-background-color: #252525;
  --nav-dropdown-color: #ffffff;
  --nav-dropdown-hover-color: #5AD3FF;
}

/* ---- Section presets ---------------------------------------- */
/* The template uses .dark-background and .accent-background as  */
/* per-section overrides; redefine them so they match the theme. */

.light-background {
  --background-color: #1a1a1a;
  --default-color: #ffffff;
  --heading-color: #5AD3FF;
  --surface-color: #252525;
}

.dark-background {
  --background-color: #0a090f;
  --default-color: #ffffff;
  --heading-color: #5AD3FF;
  --surface-color: #1a1a1a;
  --contrast-color: #ffffff;
}

.accent-background {
  --background-color: #0a090f;
  --default-color: #ffffff;
  --heading-color: #5AD3FF;
  --accent-color: #5AD3FF;
  --surface-color: #1a1a1a;
  --contrast-color: #0a090f;
}

/* ---- Force all headings to the accent color ----------------- */
/* Catches cases where the template uses a different variable.   */

h1, h2, h3, h4, h5, h6 {
  color: var(--heading-color);
}

.section-title h2 {
  color: var(--heading-color);
}

/* ---- Legacy utility class from the previous site ------------ */
/* Kept so old inline HTML still renders the same way.           */

.cyan_title {
  color: #5AD3FF;
}

/* ---- Hero readability tweaks -------------------------------- */
/* The hero is a lab photo, so the heading text needs a slight   */
/* shadow / scrim so it stays legible over any background.       */

.hero h2,
.hero .hero-top-line,
.hero p {
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

/* The template's hero <img> is positioned absolutely behind the */
/* text; add a dark overlay so the image doesn't wash the text.  */

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
              rgba(10, 9, 15, 0.35) 0%,
              rgba(10, 9, 15, 0.55) 100%);
  z-index: 1;
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 2;
}

/* ---- Hero hierarchy ---------------------------------------- */
.hero .hero-top-line {
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #ffffff;
  opacity: 0.85;
  margin-bottom: 1rem;
}

.hero h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 600;
  line-height: 1.3;
  max-width: 900px;
  margin: 0 auto 1.5rem;
}

.hero .hero-sub {
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 700px;
  margin: 0 auto 2rem;
  color: #ffffff;
}

.hero .hero-cta .btn {
  margin: 0 0.5rem;
  padding: 0.7rem 1.6rem;
  border: 2px solid #5AD3FF;
  border-radius: 30px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.hero .hero-cta .btn-primary-c {
  background-color: #5AD3FF;
  color: #0a090f;
}

.hero .hero-cta .btn-primary-c:hover {
  background-color: transparent;
  color: #5AD3FF;
}

.hero .hero-cta .btn-outline-c {
  background-color: transparent;
  color: #5AD3FF;
}

.hero .hero-cta .btn-outline-c:hover {
  background-color: #5AD3FF;
  color: #0a090f;
}

/* ---- Patent block style ------------------------------------ */
/* Distinct visual block per doc §4.                            */

.patent-block {
  border-left: 3px solid #5AD3FF;
  background-color: #252525;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  font-family: "Courier New", Courier, monospace;
}

.patent-block p {
  margin-bottom: 0.4rem;
  color: #ffffff;
}

.patent-block .label {
  color: #5AD3FF;
  font-weight: 600;
}

/* ---- Disclosure boundary block (project pages) ------------- */
/* Distinct visual block per doc §6 / §7.                      */

.disclosure-block {
  border: 1px solid #5AD3FF;
  border-radius: 4px;
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
  background-color: rgba(90, 211, 255, 0.05);
}

.disclosure-block h3 {
  font-size: 1.15rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.disclosure-block p {
  margin-bottom: 0.75rem;
  color: #ffffff;
}

.disclosure-block .label {
  color: #5AD3FF;
  font-weight: 600;
}

/* ---- Project header meta-block (project pages) ------------- */

.project-meta {
  background-color: #252525;
  padding: 1.5rem 1.75rem;
  border-radius: 4px;
  margin-bottom: 2rem;
}

.project-meta p {
  margin-bottom: 0.5rem;
  color: #ffffff;
}

.project-meta .label {
  color: #5AD3FF;
  font-weight: 600;
  display: inline-block;
  min-width: 90px;
}

/* ---- Domain Map tier styling ------------------------------- */

.domain-tier {
  margin-bottom: 1.5rem;
  padding-left: 1rem;
  border-left: 2px solid #5AD3FF;
}

.domain-tier h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  letter-spacing: 0.03em;
}

/* ---- CV download cards ------------------------------------- */

.cv-card {
  background-color: #252525;
  border-radius: 6px;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  height: 100%;
}

.cv-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(90, 211, 255, 0.2);
}

.cv-card img {
  max-width: 100%;
  height: auto;
  margin-bottom: 1rem;
  border: 1px solid #444;
}

.cv-card h4 {
  margin-bottom: 0.75rem;
}

.cv-card .btn-download {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background-color: #5AD3FF;
  color: #0a090f;
  border-radius: 30px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.25s ease;
}

.cv-card .btn-download:hover {
  background-color: transparent;
  color: #5AD3FF;
  outline: 2px solid #5AD3FF;
}

/* ---- Important Note block ---------------------------------- */
/* Used at bottom of Services and Contact per doc §9 / §12.     */

.important-note {
  border-left: 3px solid #5AD3FF;
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background-color: rgba(90, 211, 255, 0.05);
}

.important-note .label {
  color: #5AD3FF;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 0.5rem;
}

/* ---- Generic link color override --------------------------- */

a {
  color: #5AD3FF;
}

a:hover {
  color: #ffffff;
}

/* ---- Footer ------------------------------------------------ */

.footer {
  background-color: #0a090f;
  color: #ffffff;
}

.footer a {
  color: #5AD3FF;
}

/* ---- Approach / Methodology / About prose ------------------ */

.approach-subsection {
  margin-bottom: 3rem;
}

.approach-subsection h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(90, 211, 255, 0.3);
}

/* ---- Work section: industrial practice block --------------- */

.industrial-block {
  margin-bottom: 4rem;
}

.industrial-block h4 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  font-weight: 400;
  color: #ffffff;
}

.btn-company {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  background-color: transparent;
  border: 2px solid #5AD3FF;
  color: #5AD3FF;
  border-radius: 30px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.25s ease;
  margin-top: 1rem;
}

.btn-company:hover {
  background-color: #5AD3FF;
  color: #0a090f;
}

/* ---- Portfolio (Personal R&D) grid tweaks ------------------ */
/* Make project tiles match the dark theme.                     */

.portfolio .portfolio-item .portfolio-info {
  background-color: rgba(10, 9, 15, 0.85);
}

.portfolio .portfolio-item .portfolio-info h4 {
  color: #5AD3FF;
}

.portfolio .portfolio-item .portfolio-info p {
  color: #ffffff;
}
