/*
Theme Name: Daniele Portfolio
Theme URI: https://example.com/daniele-portfolio
Author: OpenAI
Description: Custom WordPress portfolio theme for Daniele Marotta.
Version: 1.0.0
Text Domain: daniele-portfolio
*/

:root {
  --bg: #0c1015;
  --bg-elevated: #11171f;
  --bg-soft: #151d27;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-strong: rgba(255, 255, 255, 0.06);
  --text: #e8edf2;
  --text-muted: #9aa8b8;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #7ad0ff;
  --accent-strong: #c98f52;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  --radius: 8px;
  --shell: min(1180px, calc(100vw - 40px));
  --content: min(780px, calc(100vw - 40px));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(180deg, rgba(122, 208, 255, 0.06), transparent 24%),
    linear-gradient(135deg, rgba(201, 143, 82, 0.08), transparent 34%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

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

button,
input,
textarea {
  font: inherit;
}

.site-shell {
  min-height: 100vh;
}

.shell {
  width: var(--shell);
  margin: 0 auto;
}

.shell--content {
  width: var(--content);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: rgba(12, 16, 21, 0.8);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 2rem;
  align-items: center;
  min-height: 84px;
}

.site-brand__name {
  display: inline-block;
  font-size: 1rem;
  font-weight: 700;
}

.site-nav {
  justify-self: center;
}

.site-nav__list {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__list a {
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.site-nav__list a:hover,
.site-nav__list a[aria-current="page"] {
  color: var(--text);
}

.site-header__actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.site-nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--surface);
  padding: 0;
}

.site-nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 1rem;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(122, 208, 255, 0.16), rgba(201, 143, 82, 0.14));
  border: 1px solid rgba(122, 208, 255, 0.28);
  color: var(--text);
  font-weight: 600;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
  border-color: rgba(122, 208, 255, 0.42);
}

.button--ghost {
  background: var(--surface);
  border-color: var(--line);
}

.site-main {
  padding-bottom: 5rem;
}

.hero,
.page-hero,
.project-hero {
  position: relative;
  overflow: clip;
}

.hero::before,
.page-hero::before,
.project-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), transparent);
  pointer-events: none;
}

.hero__inner,
.page-hero .shell,
.project-hero .shell {
  position: relative;
  z-index: 1;
}

.hero {
  padding: 4rem 0 1rem;
}

.hero__inner {
  max-width: 900px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin-bottom: 1rem;
  padding: 0 0.75rem;
  border: 1px solid rgba(122, 208, 255, 0.22);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(122, 208, 255, 0.06);
  font-size: 0.85rem;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2.15rem, 4vw, 3.15rem);
  max-width: 20ch;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: 1.35rem;
}

.hero p,
.page-hero p,
.project-hero__summary,
.content-copy,
.project-card p {
  color: var(--text-muted);
}

.hero p {
  max-width: 48ch;
  margin: 1.1rem 0 0;
  font-size: 1rem;
}

.hero__actions {
  display: flex;
  gap: 0.9rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.section {
  padding: 2rem 0 0;
}

.section--dense {
  padding-top: 1rem;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1.5rem;
}

.text-link {
  color: var(--text-muted);
}

.text-link:hover {
  color: var(--text);
}

.project-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-grid--featured {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.project-card,
.content-block,
.sidebar-card {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.project-card.is-revealed,
.content-block.is-revealed,
.sidebar-card.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.project-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
  box-shadow: var(--shadow);
}

.project-card__link {
  display: grid;
}

.project-card__media {
  aspect-ratio: 1.45;
  overflow: hidden;
  background: #0f141b;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.project-card:hover img {
  transform: scale(1.03);
}

.project-card__content {
  display: grid;
  gap: 0.6rem;
  padding: 1rem 1rem 1.2rem;
}

.project-grid--featured .project-card__content {
  gap: 0.75rem;
}

.project-grid--featured .project-card__meta {
  display: none;
}

.project-card__meta,
.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.project-card__meta span,
.project-meta span {
  position: relative;
}

.project-card__meta span:not(:last-child)::after,
.project-meta span:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-left: 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  vertical-align: middle;
}

.project-card p {
  margin: 0;
  font-size: 0.95rem;
}

.page-hero {
  padding: 5rem 0 2rem;
}

.page-hero--tight {
  padding-bottom: 1rem;
}

.project-hero {
  padding: 5rem 0 2rem;
}

.project-hero .shell {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
}

.project-hero__summary {
  margin: 1rem 0 1.5rem;
  max-width: 56ch;
}

.project-hero__media {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
}

.project-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-hero__video {
  aspect-ratio: 16 / 9;
  background: #000;
}

.project-hero__video iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.project-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 2rem;
}

.content-block + .content-block {
  margin-top: 1.5rem;
}

.content-block,
.sidebar-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 23, 31, 0.82);
  padding: 1.4rem;
}

.content-copy > :first-child {
  margin-top: 0;
}

.content-copy > :last-child {
  margin-bottom: 0;
}

.content-copy a {
  color: var(--accent);
}

.content-copy ul {
  margin: 1rem 0;
  padding-left: 1.2rem;
}

.content-copy li + li {
  margin-top: 0.7rem;
}

.content-actions {
  display: flex;
  gap: 0.9rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.detail-list {
  margin: 1rem 0 0;
  padding-left: 1rem;
}

.detail-list li + li {
  margin-top: 0.7rem;
}

.meta-list {
  display: grid;
  gap: 1rem;
  margin: 1rem 0 0;
}

.meta-list div {
  display: grid;
  gap: 0.2rem;
}

.meta-list dt {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.meta-list dd {
  margin: 0;
}

.gallery-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
}

.gallery-grid__item {
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-soft);
}

.gallery-grid__trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.gallery-grid__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 32px;
  background: rgba(5, 8, 12, 0.92);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox__dialog {
  position: relative;
  max-width: min(1400px, calc(100vw - 64px));
  max-height: calc(100vh - 64px);
}

.lightbox__image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 64px);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.lightbox__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(12, 16, 21, 0.82);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.resume-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2rem;
  align-items: start;
}

.contact-hero__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 2rem;
  align-items: start;
}

.contact-hero__content h1 {
  max-width: 14ch;
}

.contact-hero__copy {
  max-width: 60ch;
  margin-top: 1.2rem;
  font-size: 1.06rem;
}

.contact-rail {
  position: sticky;
  top: 110px;
  background:
    linear-gradient(180deg, rgba(122, 208, 255, 0.08), transparent 45%),
    rgba(17, 23, 31, 0.9);
}

.contact-rail__eyebrow {
  margin: 0 0 0.65rem;
  color: var(--accent);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.contact-rail h2 {
  font-size: 1.6rem;
  margin-bottom: 0.85rem;
}

.contact-rail p {
  margin: 0;
  color: var(--text-muted);
}

.contact-rail__actions {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.4rem;
}

.contact-offerings {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contact-offerings .offering-card {
  min-height: 220px;
}

.contact-offerings .offering-card + .offering-card {
  margin-top: 0;
}

.offering-card h3 {
  margin-bottom: 0.85rem;
}

.offering-card p {
  margin: 0;
  color: var(--text-muted);
}

.resume-hero__media {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-elevated);
}

.resume-hero__media img {
  width: 100%;
  aspect-ratio: 0.82;
  object-fit: cover;
}

.visual-fallback {
  width: 100%;
  height: 100%;
  min-height: 220px;
  background:
    linear-gradient(135deg, rgba(122, 208, 255, 0.18), transparent 55%),
    linear-gradient(225deg, rgba(201, 143, 82, 0.15), transparent 45%),
    linear-gradient(180deg, #131b24, #0f141b);
}

.visual-fallback--portrait {
  min-height: 420px;
}

.empty-state {
  padding: 2rem;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--text-muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 3rem;
}

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: end;
}

.site-footer__title {
  margin: 0 0 0.35rem;
  font-weight: 700;
}

.site-footer__copy {
  margin: 0;
  color: var(--text-muted);
  max-width: 50ch;
}

.site-footer__links {
  display: grid;
  gap: 0.35rem;
  justify-items: end;
  color: var(--text-muted);
}

@media (max-width: 1080px) {
  .project-grid--featured {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-hero .shell,
  .project-layout,
  .resume-hero,
  .contact-hero__layout {
    grid-template-columns: 1fr;
  }

  .contact-rail {
    position: static;
  }
}

@media (max-width: 820px) {
  .site-header__inner {
    grid-template-columns: auto auto 1fr;
  }

  .site-nav-toggle {
    display: inline-block;
    justify-self: end;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    display: none;
    padding: 0 20px 20px;
    background: rgba(12, 16, 21, 0.96);
    border-bottom: 1px solid var(--line);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav__list {
    display: grid;
    gap: 0.75rem;
    padding-top: 1rem;
  }

  .site-header__actions {
    display: none;
  }

  .hero {
    padding-top: 4rem;
  }

  h1 {
    font-size: clamp(2.4rem, 11vw, 4rem);
  }

  .section-heading,
  .site-footer__inner {
    display: grid;
  }
}

@media (max-width: 700px) {
  .project-grid,
  .project-grid--featured,
  .gallery-grid,
  .contact-offerings {
    grid-template-columns: 1fr;
  }
}
