/* ============================================================
   CAIUS RUSCELLA PORTFOLIO — SHARED STYLES
   ============================================================
   Fonts:   Berkshire Swash (headings) · Candara (body/subtitles)
   Palette: Dark mode with cherry blossom pink accents
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Berkshire+Swash&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  /* Backgrounds — near-black with warm rose undertone */
  --bg-primary:    #0d0608;
  --bg-secondary:  #150b0e;
  --bg-card:       #1d1014;
  --bg-card-hover: #261520;
  --bg-nav:        rgba(13, 6, 8, 0.93);

  /* Brand palette (from business card) */
  --rose:          #a24957;   /* font color on card — primary accent */
  --pink-light:    #fbd6db;   /* card front light pink */
  --pink-mid:      #f2afb8;   /* card front darker pink */
  --pink-warm:     #f5eeea;   /* card backside — warm cream */

  /* Text */
  --text-primary:  #f5eeea;
  --text-secondary:#c4a0aa;
  --text-muted:    #7a5565;

  /* Borders */
  --border:        rgba(162, 73, 87, 0.28);
  --border-hover:  rgba(251, 214, 219, 0.45);

  /* Typography */
  --font-display:  'Berkshire Swash', Georgia, serif;
  --font-body:     'Candara', 'Calibri', 'Trebuchet MS', sans-serif;

  /* Layout */
  --max-width: 1100px;
  --section-pad: 5rem 2rem;
  --nav-h: 70px;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  color: var(--pink-light);
}
h1 { font-size: clamp(2.6rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.7rem); }
h4 { font-size: 1.1rem; }
p  { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ── Navigation ─────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2.5rem;
  background: var(--bg-nav);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--pink-light);
  letter-spacing: 0.02em;
  transition: color 0.2s;
  flex-shrink: 0;
}
.nav__logo:hover { color: var(--pink-mid); }

.nav__links {
  display: flex; gap: 2.2rem;
}
.nav__links a {
  font-family: var(--font-body);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.2s;
  position: relative; padding-bottom: 2px;
}
.nav__links a::after {
  content: '';
  position: absolute; bottom: -3px; left: 0; right: 0;
  height: 1px; background: var(--rose);
  transform: scaleX(0); transition: transform 0.25s;
}
.nav__links a:hover,
.nav__links a.active { color: var(--pink-light); }
.nav__links a:hover::after,
.nav__links a.active::after { transform: scaleX(1); }

/* Hamburger button */
.nav__toggle {
  display: none; flex-direction: column; justify-content: center;
  gap: 5px; background: none; border: none; cursor: pointer;
  padding: 6px; z-index: 210;
}
.nav__toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--pink-light);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav__toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.open span:nth-child(2) { opacity: 0; }
.nav__toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.nav__mobile {
  display: none;
  position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 199;
  flex-direction: column;
  background: var(--bg-nav);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav__mobile.open { display: flex; }
.nav__mobile a {
  padding: 1rem 2.5rem;
  font-family: var(--font-body);
  font-size: 0.9rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  transition: color 0.2s, background 0.2s;
}
.nav__mobile a:hover { color: var(--pink-light); background: rgba(162, 73, 87, 0.1); }

/* ── Falling Petals ─────────────────────────────────────────── */
.petals {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 5; overflow: hidden;
}

.petal {
  position: absolute; top: -20px;
  width: 10px; height: 14px;
  background: var(--pink-mid);
  border-radius: 50% 0 50% 0;
  opacity: 0;
  animation: petalFall linear infinite;
}

@keyframes petalFall {
  0%   { transform: translateY(0px) translateX(0px) rotate(0deg);        opacity: 0; }
  6%   { opacity: 0.45; }
  94%  { opacity: 0.2; }
  100% { transform: translateY(110vh) translateX(var(--drift, 60px)) rotate(540deg); opacity: 0; }
}

/* ── Scroll Reveal ──────────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
[data-reveal].revealed               { opacity: 1; transform: translateY(0); }
[data-reveal][data-delay="1"]        { transition-delay: 0.1s; }
[data-reveal][data-delay="2"]        { transition-delay: 0.2s; }
[data-reveal][data-delay="3"]        { transition-delay: 0.3s; }
[data-reveal][data-delay="4"]        { transition-delay: 0.4s; }
[data-reveal][data-delay="5"]        { transition-delay: 0.5s; }

/* ── Layout Helpers ─────────────────────────────────────────── */
.section    { padding: var(--section-pad); position: relative; z-index: 2; }
.section--alt { background: var(--bg-secondary); }
.container  { max-width: var(--max-width); margin: 0 auto; }

.section__label {
  font-family: var(--font-body);
  font-size: 0.75rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--rose); margin-bottom: 0.6rem;
}
.section__title { margin-bottom: 0.75rem; }
.section__divider {
  width: 52px; height: 2px;
  background: linear-gradient(90deg, var(--rose), transparent);
  margin-bottom: 2.5rem;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.72rem 1.9rem;
  font-family: var(--font-body);
  font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase;
  border-radius: 3px;
  border: none; cursor: pointer;
  transition: all 0.25s;
}
.btn--primary {
  background: var(--rose); color: var(--pink-warm);
}
.btn--primary:hover {
  background: #b55468;
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(162, 73, 87, 0.4);
}
.btn--outline {
  background: transparent;
  color: var(--pink-light);
  border: 1px solid var(--rose);
}
.btn--outline:hover {
  background: rgba(162, 73, 87, 0.14);
  border-color: var(--pink-light);
  transform: translateY(-2px);
}
.btn--sm { padding: 0.5rem 1.3rem; font-size: 0.78rem; }

/* ── Cherry Blossom Branch Decoration ──────────────────────── */
.branch {
  position: absolute;
  pointer-events: none; z-index: 1;
  opacity: 0.22;
}
.branch--hero-right {
  bottom: -4%; right: -1%;
  width: min(46%, 430px);
}
.branch--footer {
  bottom: 0; right: 0;
  width: min(28%, 230px);
  opacity: 0.14;
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: calc(var(--nav-h) + 4rem) 2rem 5rem;
  position: relative; overflow: hidden;
}
.hero__glow {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse at 20% 60%, rgba(162, 73, 87, 0.09) 0%, transparent 55%),
    radial-gradient(ellipse at 75% 25%, rgba(162, 73, 87, 0.06) 0%, transparent 50%);
}
.hero__content { position: relative; z-index: 2; max-width: var(--max-width); margin: 0 auto; width: 100%; }

.hero__eyebrow {
  font-family: var(--font-body);
  font-size: 0.8rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--rose); margin-bottom: 0.9rem;
}
.hero__name   { color: var(--pink-light); margin-bottom: 0.3rem; }
.hero__title  {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  color: var(--text-secondary); letter-spacing: 0.06em;
  margin-bottom: 1.6rem;
}
.hero__bio {
  max-width: 540px; color: var(--text-secondary);
  font-size: 1.05rem; margin-bottom: 2.5rem;
}
.hero__ctas { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ── Featured Project (Mythbound spotlight) ─────────────────── */
.featured__inner {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3.5rem; align-items: center;
}
.featured__image {
  aspect-ratio: 16/9;
  background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; position: relative;
}
.featured__image img { width: 100%; height: 100%; object-fit: cover; }
.featured__image-placeholder {
  width: 100%; height: 100%; min-height: 220px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 0.78rem;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.featured__kicker {
  font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--rose); margin-bottom: 0.4rem;
}
.featured__name   { color: var(--pink-light); margin-bottom: 0.2rem; }
.featured__role   { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 1.4rem; }
.featured__desc   { color: var(--text-secondary); margin-bottom: 1.75rem; }
.featured__tags   { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.75rem; }

.tag {
  padding: 0.28rem 0.8rem;
  font-size: 0.72rem; letter-spacing: 0.09em; text-transform: uppercase;
  background: rgba(162, 73, 87, 0.14);
  border: 1px solid var(--border);
  color: var(--pink-mid); border-radius: 3px;
}

/* ── Project Cards Grid ─────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 1.75rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  text-decoration: none;
}
.card:hover {
  transform: translateY(-5px);
  border-color: var(--rose);
  box-shadow: 0 14px 38px rgba(162, 73, 87, 0.18);
}

.card__image {
  aspect-ratio: 16/9;
  background: var(--bg-secondary);
  overflow: hidden; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.card__image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s;
}
.card:hover .card__image img { transform: scale(1.05); }
.card__image-placeholder {
  font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted);
}

.card__badge {
  position: absolute; top: 0.7rem; right: 0.7rem;
  padding: 0.22rem 0.7rem;
  font-size: 0.65rem; letter-spacing: 0.1em; text-transform: uppercase;
  background: rgba(13, 6, 8, 0.75); backdrop-filter: blur(4px);
  color: var(--pink-mid); border: 1px solid var(--border);
  border-radius: 3px;
}

.card__body   { padding: 1.4rem 1.5rem; flex: 1; display: flex; flex-direction: column; }
.card__title  { font-family: var(--font-display); font-size: 1.4rem; color: var(--pink-light); margin-bottom: 0.3rem; }
.card__meta   { font-size: 0.78rem; color: var(--text-muted); letter-spacing: 0.04em; margin-bottom: 0.75rem; }
.card__desc   { font-size: 0.93rem; color: var(--text-secondary); flex: 1; margin-bottom: 1.2rem; }
.card__link   { font-size: 0.8rem; color: var(--rose); letter-spacing: 0.08em; text-transform: uppercase; transition: color 0.2s; }
.card__link:hover { color: var(--pink-light); }

/* ── Skills ─────────────────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 0.85rem;
}
.skill-item {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.85rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 6px;
  font-size: 0.88rem; color: var(--text-secondary);
  transition: border-color 0.2s, color 0.2s;
}
.skill-item:hover { border-color: var(--rose); color: var(--pink-light); }
.skill-item::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: var(--rose); flex-shrink: 0;
}

/* ── About ──────────────────────────────────────────────────── */
.about__grid {
  display: grid; grid-template-columns: 1fr 1.6fr;
  gap: 4rem; align-items: start;
}
.about__image-wrap {
  aspect-ratio: 3/4; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.about__image-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.about__image-placeholder {
  font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted);
}
.about__text p { color: var(--text-secondary); }
.about__details {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1.2rem; margin-top: 2rem;
}
.about__detail label {
  display: block; font-size: 0.7rem;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--rose); margin-bottom: 0.2rem;
}
.about__detail span { font-size: 0.93rem; color: var(--text-primary); }

/* ── Page Hero (sub-pages) ──────────────────────────────────── */
.page-hero {
  padding: calc(var(--nav-h) + 4rem) 2rem 4rem;
  text-align: center; position: relative; overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(162, 73, 87, 0.08) 0%, transparent 65%);
}
.page-hero__label {
  font-size: 0.75rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--rose); margin-bottom: 0.6rem; position: relative; z-index: 1;
}
.page-hero__title { position: relative; z-index: 1; }
.page-hero__desc  {
  max-width: 580px; margin: 1rem auto 0;
  color: var(--text-secondary); position: relative; z-index: 1;
}

/* ── Project Detail Page ────────────────────────────────────── */
.project-banner {
  width: 100%; aspect-ratio: 21/9; min-height: 260px;
  background: var(--bg-secondary); overflow: hidden;
  position: relative; margin-top: var(--nav-h);
  display: flex; align-items: center; justify-content: center;
}
.project-banner img { width: 100%; height: 100%; object-fit: cover; }
.project-banner-placeholder {
  font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted);
}

.project-layout {
  max-width: var(--max-width); margin: 0 auto;
  padding: 3.5rem 2rem 5rem;
  display: grid; grid-template-columns: 1fr 310px;
  gap: 4rem; align-items: start;
}

.project-main__back {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 2rem;
  transition: color 0.2s;
}
.project-main__back:hover { color: var(--pink-light); }

.project-main__title   { color: var(--pink-light); margin-bottom: 0.35rem; }
.project-main__meta    { font-size: 0.82rem; color: var(--text-muted); letter-spacing: 0.04em; margin-bottom: 1.5rem; }
.project-main__desc    { color: var(--text-secondary); margin-bottom: 2rem; }

.project-section-label {
  font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--rose); margin: 2rem 0 0.9rem;
}

.project-gallery {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem; margin-top: 0.5rem;
}
.project-gallery__item {
  aspect-ratio: 16/9; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 6px;
  overflow: hidden; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.project-gallery__item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.3s;
}
.project-gallery__item:hover img { transform: scale(1.06); }
.project-gallery__item-placeholder {
  font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted);
}

/* Sidebar */
.project-sidebar { position: sticky; top: calc(var(--nav-h) + 1.5rem); }

.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 1.6rem; margin-bottom: 1.2rem;
}
.sidebar-card__label {
  font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--rose); margin-bottom: 1rem;
}
.sidebar-card__row {
  display: flex; justify-content: space-between;
  padding: 0.55rem 0; border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}
.sidebar-card__row:last-child { border-bottom: none; }
.sidebar-card__row dt { color: var(--text-muted); }
.sidebar-card__row dd { color: var(--text-primary); text-align: right; }

.sidebar-links { display: flex; flex-direction: column; gap: 0.75rem; }
.sidebar-links .btn { text-align: center; width: 100%; }

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 3.5rem 2rem 2rem;
  text-align: center; position: relative; overflow: hidden;
}
.footer__name  {
  font-family: var(--font-display);
  font-size: 2rem; color: var(--pink-light); margin-bottom: 0.2rem;
}
.footer__title {
  font-size: 0.88rem; color: var(--text-muted);
  letter-spacing: 0.1em; margin-bottom: 2rem;
}
.footer__nav   {
  display: flex; justify-content: center; gap: 2.2rem; flex-wrap: wrap;
  margin-bottom: 1.75rem;
}
.footer__nav a {
  font-size: 0.8rem; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--text-secondary); transition: color 0.2s;
}
.footer__nav a:hover { color: var(--pink-light); }
.footer__social {
  display: flex; justify-content: center; gap: 1.75rem;
  margin-bottom: 2rem;
}
.footer__social a {
  font-size: 0.85rem; color: var(--text-muted); transition: color 0.2s;
}
.footer__social a:hover { color: var(--rose); }
.footer__copy  { font-size: 0.75rem; color: var(--text-muted); }

/* ── Utility ────────────────────────────────────────────────── */
.text-center { text-align: center; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0; white-space: nowrap;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .nav__links   { display: none; }
  .nav__toggle  { display: flex; }

  .featured__inner       { grid-template-columns: 1fr; gap: 2rem; }
  .about__grid           { grid-template-columns: 1fr; gap: 2.5rem; }
  .about__image-wrap     { aspect-ratio: 3/2; max-width: 380px; }
  .project-layout        { grid-template-columns: 1fr; }
  .project-sidebar       { position: static; }
}
@media (max-width: 600px) {
  :root { --section-pad: 3.5rem 1.25rem; }
  .hero            { padding: calc(var(--nav-h) + 3rem) 1.25rem 4rem; }
  .hero__ctas      { flex-direction: column; }
  .hero__ctas .btn { text-align: center; }
  .cards-grid      { grid-template-columns: 1fr; }
  .about__details  { grid-template-columns: 1fr; }
  .project-gallery { grid-template-columns: 1fr; }
  .nav             { padding: 0 1.25rem; }
  .nav__mobile a   { padding: 0.9rem 1.25rem; }
}
