/* ============================================================
   home.css — Homepage dark-editorial styles
   radri.it — Marco Radrizzani
   ============================================================ */

/* ── Cursor spotlight glow ──────────────────────────────────── */
#cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(192,112,32,0.07) 0%, transparent 65%);
  pointer-events: none;
  z-index: 1;
  will-change: transform;
  transform: translate(-350px, -350px);
  opacity: 0;
  transition: opacity 0.6s ease;
}

/* ── Scroll progress bar ────────────────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: #c07020;
  z-index: 9999;
  transition: width 0.08s linear;
  pointer-events: none;
}

/* ── Section backgrounds ────────────────────────────────────── */
.hero-dark    { background-color: #181614; }
.section-surface { background-color: #1E1B18; }

/* ── Grain overlay (fixed noise texture) ───────────────────── */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 300px 300px;
}

/* ── Hero dot-grid background ───────────────────────────────── */
.hero-bg-pattern {
  background-image: radial-gradient(circle, rgba(240, 236, 228, 0.055) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* ── Ghost "MR" watermark ───────────────────────────────────── */
.hero-ghost {
  position: absolute;
  right: -2vw;
  bottom: -4vw;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 55vw;
  font-weight: 800;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(240, 236, 228, 0.04);
  text-stroke: 1px rgba(240, 236, 228, 0.04);
  pointer-events: none;
  user-select: none;
  z-index: 0;
  letter-spacing: -0.05em;
}
@media (max-width: 768px) {
  .hero-ghost { font-size: 80vw; right: -5vw; bottom: -2vw; }
}

/* ── Marquee tape ───────────────────────────────────────────── */
.marquee-wrap {
  overflow: hidden;
  padding: 0.875rem 0;
  background-color: #181614;
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  width: max-content;
  animation: marquee 30s linear infinite;
}

.marquee-wrap:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-item {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(240, 236, 228, 0.3);
  white-space: nowrap;
}

.marquee-dot {
  color: #c07020;
  opacity: 0.35;
  font-size: 0.75rem;
  flex-shrink: 0;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── Section eyebrow ────────────────────────────────────────── */
.section-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #c07020;
}

.eyebrow-line {
  display: block;
  width: 1.5rem;
  height: 1px;
  background-color: #c07020;
  opacity: 0.5;
  flex-shrink: 0;
}

/* ── Stats panel (About aside) ──────────────────────────────── */
.stats-panel {
  /* layout handled via Tailwind utilities in HTML */
}

/* ── Skill rows (Expertise) ─────────────────────────────────── */
.skill-row {
  display: grid;
  grid-template-columns: 2.75rem 1fr 2fr;
  gap: 0 2.5rem;
  align-items: baseline;
  padding: 1.625rem 0;
  transition: background 0.15s;
}

.skill-index {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.75rem;
  color: rgba(240, 236, 228, 0.2);
  letter-spacing: 0.04em;
  align-self: start;
  padding-top: 0.2rem;
}

.skill-name {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  font-weight: 700;
  color: #F0ECE4;
  letter-spacing: -0.01em;
  line-height: 1.2;
  transition: color 0.15s;
}

.skill-row:hover .skill-name,
.skill-row.group:hover .skill-name {
  color: #c07020;
}

.skill-desc {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 1rem;
  color: rgba(240, 236, 228, 0.68);
  line-height: 1.7;
}

@media (max-width: 768px) {
  .skill-row {
    grid-template-columns: 2.25rem 1fr;
  }
  .skill-desc {
    grid-column: 1 / -1;
    padding-top: 0.375rem;
  }
}

/* ── Tech grid ──────────────────────────────────────────────── */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 2.5rem 3rem;
}

.tech-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tech-group-label {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #c07020;
  opacity: 0.85;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tech-tag {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.8125rem;
  color: rgba(240, 236, 228, 0.72);
  border: 1px solid rgba(240, 236, 228, 0.1);
  transition: border-color 0.15s, color 0.15s;
  cursor: default;
}

.tech-tag:hover {
  border-color: rgba(192, 112, 32, 0.4);
  color: #c07020;
}

@media (max-width: 640px) {
  .tech-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem 1.75rem; }
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn-accent {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.375rem;
  background-color: #c07020;
  color: #fff;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s, transform 0.1s;
  white-space: nowrap;
}
.btn-accent:hover    { background-color: #9a5818; }
.btn-accent:active   { transform: scale(0.98); }

.btn-ghost-light {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.375rem;
  background-color: transparent;
  color: rgba(240, 236, 228, 0.6);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  text-decoration: none;
  border: 1px solid rgba(240, 236, 228, 0.15);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.btn-ghost-light:hover  { border-color: rgba(240, 236, 228, 0.35); color: #F0ECE4; }
.btn-ghost-light:active { transform: scale(0.98); }

/* ── Project cards (dark) — spotlight border ────────────────── */
.project-card-dark {
  position: relative;
  background: radial-gradient(
    250px circle at var(--mx, -100%) var(--my, -100%),
    rgba(192,112,32,0.07),
    transparent 70%
  ), rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 1.75rem;
  transition: border-color 0.25s;
  text-decoration: none;
}
.project-card-dark:hover {
  border-color: rgba(192, 112, 32, 0.22);
}

/* ── Contact cards ──────────────────────────────────────────── */
.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: radial-gradient(
    200px circle at var(--mx, -100%) var(--my, -100%),
    rgba(192,112,32,0.07),
    transparent 70%
  ), rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 1.25rem 1.375rem;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}
.contact-card:hover {
  border-color: rgba(192, 112, 32, 0.3);
  transform: translateX(3px);
}

.contact-card-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(192, 112, 32, 0.1);
  border: 1px solid rgba(192, 112, 32, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c07020;
  flex-shrink: 0;
}

.contact-card-label {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(240, 236, 228, 0.3);
  margin-bottom: 2px;
}

/* ── Contact form panel ─────────────────────────────────────── */
.contact-form-panel {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 2.5rem;
}

.form-input-dark {
  display: block;
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #F0ECE4;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.9375rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}
.form-input-dark:focus {
  border-color: #c07020;
  box-shadow: 0 0 0 3px rgba(192, 112, 32, 0.1);
}
.form-input-dark::placeholder {
  color: rgba(240, 236, 228, 0.2);
}

/* ── Animation keyframes ────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
