:root{
  --bg: #fbfbfe;
  --card: rgba(255,255,255,.78);
  --card2: rgba(255,255,255,.92);
  --text: #101114;
  --muted: #5b5f6a;
  --border: rgba(17,17,17,.10);
  --shadow: 0 18px 50px rgba(17,17,17,.10);
  --shadow2: 0 10px 30px rgba(17,17,17,.10);
  --radius: 22px;
  --radius2: 16px;
  --accent: #7c5cff;
  --accent2: #a88bff;
  --max: 1100px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background:
    radial-gradient(900px 500px at 25% 0%, rgba(124,92,255,.15), transparent 60%),
    radial-gradient(900px 500px at 80% 15%, rgba(168,139,255,.10), transparent 60%),
    var(--bg);
}

a{ color:inherit; text-decoration:none; }
img{ max-width:100%; display:block; }

.wrap{ width: min(var(--max), calc(100% - 40px)); margin:0 auto; }

/* Topbar */
.topbar{
  position: sticky;
  top:0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,.75);
  border-bottom: 1px solid var(--border);
}
.topbar__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding: 14px 0;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:800;
  letter-spacing:.2px;
}
.brand__dot{
  width:10px;height:10px;border-radius:999px;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(124,92,255,.12);
}

/* Nav */
.nav{ position:relative; }
.nav__toggle{
  display:none;
  border:1px solid var(--border);
  background: rgba(255,255,255,.85);
  border-radius: 999px;
  padding:10px 12px;
  font-weight:700;
  cursor:pointer;
}
.nav__menu{
  display:flex;
  align-items:center;
  gap:14px;
  margin:0;
  padding:0;
  list-style:none;
}
.nav__link{
  padding:10px 12px;
  border-radius: 999px;
  font-weight:700;
  color: rgba(16,17,20,.85);
}
.nav__link:hover{
  background: rgba(124,92,255,.10);
}

/* Dropdown */
.dd{ position:relative; }
.dd__btn{
  border:none;
  background: transparent;
  padding:10px 12px;
  border-radius: 999px;
  font-weight:800;
  cursor:pointer;
  color: rgba(16,17,20,.85);
}
.dd__btn:hover{ background: rgba(124,92,255,.10); }
.dd__menu{
  position:absolute;
  top:44px;
  left:0;
  min-width: 220px;
  list-style:none;
  margin:0;
  padding:10px;
  border-radius: 16px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.95);
  box-shadow: var(--shadow2);
  display:none;
}
.dd__menu a{
  display:block;
  padding:10px 12px;
  border-radius: 12px;
  font-weight:700;
  color: rgba(16,17,20,.85);
}
.dd__menu a:hover{ background: rgba(124,92,255,.10); }
.dd.open .dd__menu{ display:block; }

/* Hero */
.hero{
  padding: 46px 0 18px;
}
.profile{
  width: 260px;            /* <-- NON gigante */
  max-width: 70vw;
  margin: 0 auto 18px;
  border-radius: var(--radius);
  overflow:hidden;
  border:1px solid var(--border);
  box-shadow: var(--shadow);
  background: rgba(255,255,255,.9);
}
.hero h1{
  margin: 12px 0 10px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.06;
  text-align:center;
  letter-spacing: -.5px;
}
.subtitle{
  margin:0 auto;
  max-width: 70ch;
  text-align:center;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

/* Gradient text */
.grad{
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}

/* Buttons */
.menu{
  margin-top: 16px;
  display:flex;
  gap:12px;
  justify-content:center;
  align-items:center;
}
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border-radius: 999px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.85);
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
  font-weight:800;
  cursor:pointer;
  white-space:nowrap;
}
.btn:hover{ transform: translateY(-1px); }
.btn--primary{
  border-color: rgba(124,92,255,.35);
  background: rgba(124,92,255,.14);
}

/* Icons (same size) */
.iconbtn{
  width:42px; height:42px;
  border-radius: 14px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.90);
  display:grid;
  place-items:center;
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.iconbtn svg{ width:22px; height:22px; }
.iconbtn.brand.github svg{ fill:#181717; }
.iconbtn.brand.linkedin svg{ fill:#0A66C2; }
.iconbtn.brand.instagram svg{ fill: url(#ig-gradient); }

/* Section + cards */
.section{ padding: 18px 0 56px; }

.grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
  align-items:start;
}
.col-12{ grid-column: span 12; }
.col-6{ grid-column: span 6; }

.card{
  border:1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow2);
  padding: 22px;
}
.card h2{
  margin: 0 0 10px;
  font-size: 28px;
  letter-spacing:-.4px;
}
.card p{ margin: 0 0 10px; line-height: 1.6; color: rgba(16,17,20,.88); }
.muted{ color: var(--muted); }

.chips{ display:flex; flex-wrap:wrap; gap:10px; margin-top:10px; }
.chip{
  padding: 9px 12px;
  border-radius: 999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.82);
  font-weight:800;
  color: rgba(16,17,20,.80);
  font-size: 13px;
}

/* Simple gallery */
.gallery{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.gallery img{
  border-radius: 18px;
  border:1px solid var(--border);
}

/* Footer */
footer{
  margin-top: 18px;
  padding: 18px 0 0;
  text-align:center;
  color: rgba(16,17,20,.55);
}

/* Responsive */
@media (max-width: 920px){
  .col-6{ grid-column: span 12; }
  .menu{ flex-wrap: wrap; }
}
@media (max-width: 860px){
  .nav__toggle{ display:inline-flex; }
  .nav__menu{
    display:none;
    position:absolute;
    right:0;
    top:56px;
    flex-direction:column;
    align-items:stretch;
    gap:8px;
    width: min(320px, calc(100vw - 24px));
    padding: 12px;
    border:1px solid var(--border);
    border-radius: 18px;
    background: rgba(255,255,255,.95);
    box-shadow: var(--shadow);
  }
  .nav__menu.open{ display:flex; }
  .dd__menu{ position:relative; top:0; left:0; min-width:auto; box-shadow:none; }
}
