/* Antonello Rotolo - sito personale
   HTML/CSS tradizionale, senza librerie esterne */

:root {
  --ink: #07111f;
  --ink-soft: #0c1b2d;
  --ink-card: #102238;
  --paper: #f4f7f9;
  --paper-deep: #e8eef2;
  --white: #ffffff;
  --text: #16283a;
  --muted: #5a6b7a;
  --line: #d5e0e7;
  --line-dark: rgba(255, 255, 255, 0.13);
  --accent: #40e0d0;
  --accent-strong: #16bfb4;
  --blue: #4ca5ff;
  --success: #58dfb5;
  --shadow: 0 28px 80px rgba(3, 15, 28, 0.16);
  --radius-sm: 12px;
  --radius-md: 22px;
  --radius-lg: 34px;
  --container: 1180px;
  --header-height: 82px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 28px);
}

body {
  margin: 0;
  color: var(--text);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.nav-open {
  overflow: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

::selection {
  color: var(--ink);
  background: var(--accent);
}

.container {
  width: min(calc(100% - 48px), var(--container));
  margin-inline: auto;
}

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

.skip-link {
  position: fixed;
  z-index: 9999;
  top: 14px;
  left: 14px;
  padding: 10px 16px;
  color: var(--ink);
  background: var(--accent);
  border-radius: 8px;
  font-weight: 800;
  transform: translateY(-150%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.section {
  position: relative;
  padding: 130px 0;
  overflow: clip;
}

.section-heading h2,
.journey-intro h2,
.events-intro h2,
.contact-layout h2,
.network-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.55rem, 5vw, 4.9rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.section-kicker {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 24px;
  color: #217d79;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-kicker::before {
  width: 32px;
  height: 2px;
  content: "";
  background: currentColor;
}

.section-heading-row {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 390px);
  gap: 80px;
  align-items: end;
  margin-bottom: 62px;
}

.section-heading-row > p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 1.06rem;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms cubic-bezier(0.22, 1, 0.36, 1), transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Header */
.site-header {
  position: fixed;
  z-index: 1000;
  top: 0;
  right: 0;
  left: 0;
  height: var(--header-height);
  color: var(--white);
  border-bottom: 1px solid transparent;
  transition: background 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.site-header.is-scrolled {
  background: rgba(7, 17, 31, 0.88);
  border-color: rgba(255, 255, 255, 0.09);
  box-shadow: 0 12px 42px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.nav-wrap {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 780;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--ink);
  background: var(--accent);
  border-radius: 11px;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  transform: rotate(-4deg);
}

.brand-name {
  font-size: 1rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-nav a {
  position: relative;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  font-weight: 700;
  transition: color 180ms ease;
}

.main-nav a:not(.nav-cta)::after {
  position: absolute;
  right: 0;
  bottom: -10px;
  left: 0;
  height: 2px;
  content: "";
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms ease;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: var(--white);
}

.main-nav a:hover::after,
.main-nav a.is-active::after {
  transform: scaleX(1);
}

.main-nav .nav-cta {
  padding: 10px 17px;
  color: var(--ink);
  background: var(--accent);
  border-radius: 999px;
}

.main-nav .nav-cta:hover {
  color: var(--ink);
  background: var(--white);
}

.nav-toggle {
  display: none;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: inherit;
  background: transparent;
  border-radius: 12px;
  cursor: pointer;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 19px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
  transition: transform 180ms ease;
}

/* Hero */
.hero {
  position: relative;
  display: flex;
  min-height: 100svh;
  padding: calc(var(--header-height) + 70px) 0 90px;
  align-items: center;
  color: var(--white);
  background: var(--ink);
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  opacity: 0.24;
  background-image: linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black 25%, transparent 95%);
}

.hero-glow {
  position: absolute;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.16;
  pointer-events: none;
}

.hero-glow-one {
  top: -230px;
  right: 8%;
  background: var(--blue);
}

.hero-glow-two {
  bottom: -320px;
  left: 16%;
  background: var(--accent);
}

.hero-layout {
  position: relative;
  z-index: 2;
  display: block;
}

.hero-copy {
  max-width: 1040px;
  padding-top: 18px;
}

.hero-identity {
  display: flex;
  margin-bottom: 32px;
  align-items: center;
  gap: 19px;
}

.hero-avatar {
  width: 112px;
  height: 112px;
  flex: 0 0 auto;
  border: 3px solid var(--accent);
  border-radius: 50%;
  object-fit: cover;
  object-position: center 28%;
  box-shadow: 0 0 0 8px rgba(64, 224, 208, 0.09), 0 18px 42px rgba(0, 0, 0, 0.28);
}

.hero-identity .eyebrow {
  margin-bottom: 7px;
}

.hero-location {
  margin: 0;
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.035em;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 30px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.eyebrow span {
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 7px rgba(64, 224, 208, 0.11);
}

.hero h1 {
  max-width: 960px;
  margin: 0;
  font-size: clamp(3.45rem, 6.4vw, 6.55rem);
  font-weight: 680;
  line-height: 0.92;
  letter-spacing: -0.066em;
}

.hero h1 em {
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.055em;
}

.hero-intro {
  max-width: 740px;
  margin: 32px 0 0;
  color: rgba(255, 255, 255, 0.67);
  font-size: clamp(1.05rem, 1.45vw, 1.26rem);
  line-height: 1.68;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin-top: 38px;
}

.button {
  display: inline-flex;
  min-height: 51px;
  padding: 13px 22px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 780;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: var(--ink);
  background: var(--accent);
}

.button-primary:hover {
  background: var(--white);
}

.button-ghost {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
}

.button-ghost:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.08);
}

.hero-facts {
  display: grid;
  max-width: 760px;
  grid-template-columns: repeat(3, 1fr);
  margin: 54px 0 0;
  padding: 25px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.hero-facts div + div {
  padding-left: 25px;
  border-left: 1px solid rgba(255, 255, 255, 0.13);
}

.hero-facts dt {
  margin-bottom: 3px;
  color: var(--white);
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.hero-facts dd {
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.76rem;
  font-weight: 650;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.scroll-cue {
  position: absolute;
  z-index: 3;
  bottom: 27px;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.scroll-cue i {
  width: 1px;
  height: 26px;
  background: linear-gradient(var(--accent), transparent);
}

/* Profile */
.profile-section {
  background: var(--paper);
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.84fr) minmax(0, 1.16fr);
  gap: 100px;
}

.profile-copy {
  max-width: 680px;
}

.profile-copy p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 1.03rem;
}

.profile-copy .lead {
  margin-bottom: 28px;
  color: var(--text);
  font-size: clamp(1.32rem, 2.2vw, 1.72rem);
  line-height: 1.48;
  letter-spacing: -0.025em;
}

.profile-copy a:not(.profile-links a) {
  color: #087b75;
  font-weight: 760;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 35px;
}

.profile-links a {
  display: inline-flex;
  min-height: 46px;
  padding: 9px 15px 9px 10px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 750;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.profile-links a:hover {
  border-color: var(--accent-strong);
  background: var(--white);
  transform: translateY(-2px);
}

.profile-links span {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  color: var(--white);
  background: var(--ink);
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 850;
}

.group-note {
  position: relative;
  margin-top: 38px;
  padding: 28px 30px 28px 34px;
  background: var(--ink);
  border-radius: 18px;
  overflow: hidden;
}

.group-note::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 5px;
  content: "";
  background: var(--accent);
}

.profile-copy .group-note > p:first-child {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.group-note h3 {
  margin: 0 0 10px;
  color: var(--white);
  font-size: 1.28rem;
  letter-spacing: -0.025em;
}

.profile-copy .group-note > p:not(:first-child) {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.9rem;
}

.group-note a {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
}

/* Skills */
.skills-section {
  color: var(--white);
  background: var(--ink-soft);
}

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

.skills-section .section-kicker {
  color: var(--accent);
}

.skills-section .section-heading-row > p {
  color: rgba(255, 255, 255, 0.56);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--line-dark);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-md);
}

.skill-card {
  position: relative;
  min-height: 355px;
  padding: 33px;
  background: var(--ink-soft);
  transition: background 220ms ease, transform 220ms ease;
}

.skill-card:hover {
  background: var(--ink-card);
}

.skill-card-featured {
  background: #123249;
}

.skill-number {
  position: absolute;
  top: 27px;
  right: 30px;
  color: rgba(255, 255, 255, 0.27);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.skill-icon {
  display: grid;
  width: 56px;
  height: 56px;
  margin-bottom: 30px;
  place-items: center;
  color: var(--accent);
  border: 1px solid rgba(64, 224, 208, 0.24);
  background: rgba(64, 224, 208, 0.055);
  border-radius: 16px;
}

.skill-icon svg {
  width: 29px;
  height: 29px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skill-card h3 {
  margin: 0 0 13px;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.skill-card p {
  min-height: 78px;
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.92rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 5px 9px;
  color: inherit;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 760;
  letter-spacing: 0.025em;
  opacity: 0.7;
}

/* Journey */
.journey-section {
  background: var(--paper-deep);
}

.journey-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.7fr) minmax(0, 1.3fr);
  gap: 110px;
}

.journey-intro {
  position: sticky;
  top: 125px;
  align-self: start;
}

.journey-intro p:last-child {
  max-width: 420px;
  margin: 30px 0 0;
  color: var(--muted);
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 32px;
  padding: 0 0 54px;
}

.timeline-item::before {
  position: absolute;
  top: 13px;
  bottom: -13px;
  left: 99px;
  width: 1px;
  content: "";
  background: #c4d0d8;
}

.timeline-item::after {
  position: absolute;
  top: 5px;
  left: 93px;
  width: 13px;
  height: 13px;
  content: "";
  background: var(--paper-deep);
  border: 3px solid #6f8292;
  border-radius: 50%;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-current::after {
  background: var(--accent);
  border-color: var(--ink);
  box-shadow: 0 0 0 6px rgba(64, 224, 208, 0.26);
}

.timeline-group::after {
  background: var(--blue);
  border-color: var(--ink);
  box-shadow: 0 0 0 6px rgba(76, 165, 255, 0.18);
}

.timeline-date {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.1;
}

.timeline-date time {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 850;
}

.timeline-date span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.timeline-content {
  padding-left: 27px;
}

.timeline-company {
  margin: 0 0 5px;
  color: #267d78;
  font-size: 0.71rem;
  font-weight: 800;
  letter-spacing: 0.085em;
  text-transform: uppercase;
}

.timeline-content h3 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 1.48rem;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.timeline-content > p:not(.timeline-company) {
  max-width: 590px;
  margin: 0;
  color: var(--muted);
}

.timeline-content .tag-list {
  margin-top: 18px;
}

/* Project */
.project-section {
  background: var(--paper);
}

.featured-project {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  min-height: 540px;
  color: var(--white);
  background: var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.project-visual {
  position: relative;
  display: grid;
  min-height: 480px;
  padding: 65px;
  place-items: center;
  background: radial-gradient(circle at 20% 15%, rgba(64, 224, 208, 0.26), transparent 36%), linear-gradient(145deg, #0b2238, #07111f 70%);
  overflow: hidden;
}

.project-visual::before,
.project-visual::after {
  position: absolute;
  width: 240px;
  height: 240px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  content: "";
}

.project-visual::before {
  top: -100px;
  right: -60px;
  box-shadow: 0 0 0 40px rgba(255,255,255,.02), 0 0 0 80px rgba(255,255,255,.015);
}

.project-visual::after {
  bottom: -170px;
  left: -60px;
}

.terminal-window {
  position: relative;
  z-index: 2;
  width: min(100%, 460px);
  background: #030b13;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 15px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
  transform: perspective(1100px) rotateY(7deg) rotateX(2deg);
}

.terminal-bar {
  display: flex;
  height: 44px;
  padding: 0 16px;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  font: 0.69rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.terminal-bar i {
  width: 9px;
  height: 9px;
  background: #ff746c;
  border-radius: 50%;
}

.terminal-bar i:nth-child(2) { background: #ffc967; }
.terminal-bar i:nth-child(3) { margin-right: 8px; background: #58dfb5; }

.terminal-window pre {
  margin: 0;
  padding: 34px;
  overflow: hidden;
  color: #d8e8ec;
  font: 0.86rem/1.9 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.code-comment { color: #6c8192; }
.code-key { color: #4ca5ff; }
.code-ok { color: var(--accent); }

.project-copy {
  display: flex;
  padding: 68px 62px;
  flex-direction: column;
  justify-content: center;
}

.project-meta {
  margin: 0 0 13px;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.project-copy h3 {
  margin: 0 0 25px;
  font-size: clamp(2.2rem, 3.5vw, 3.8rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.project-copy > p:not(.project-meta) {
  margin: 0 0 15px;
  color: rgba(255, 255, 255, 0.62);
}

.project-actions {
  display: flex;
  margin-top: 25px;
  align-items: center;
  gap: 17px;
}

.project-license {
  color: rgba(255, 255, 255, 0.43);
  font-size: 0.7rem;
  font-weight: 760;
  letter-spacing: 0.07em;
}

.legacy-project {
  display: grid;
  grid-template-columns: minmax(230px, 0.65fr) minmax(0, 1.25fr) auto;
  gap: 32px;
  margin-top: 24px;
  padding: 28px 32px;
  align-items: center;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 17px;
}

.legacy-project .project-meta {
  margin-bottom: 4px;
  color: #6a7b89;
}

.legacy-project h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.16rem;
  letter-spacing: -0.025em;
}

.legacy-project > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.legacy-project > a {
  white-space: nowrap;
  color: #087b75;
  font-size: 0.76rem;
  font-weight: 800;
}

/* Credentials */
.credentials-section {
  background: var(--paper-deep);
}

.credentials-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.credential-card {
  display: flex;
  min-height: 335px;
  padding: 36px;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(7, 17, 31, 0.09);
  border-radius: var(--radius-md);
  transition: background 200ms ease, border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}

.credential-card:hover {
  background: var(--white);
  border-color: rgba(22, 191, 180, 0.45);
  box-shadow: 0 22px 55px rgba(7, 17, 31, 0.09);
  transform: translateY(-4px);
}

.credential-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.credential-badge {
  display: inline-flex;
  padding: 6px 10px;
  color: var(--ink);
  background: var(--accent);
  border-radius: 7px;
  font-size: 0.67rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.credential-status {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 740;
}

.credential-card h3 {
  margin: 48px 0 7px;
  color: var(--ink);
  font-size: 2.1rem;
  line-height: 1;
  letter-spacing: -0.045em;
}

.credential-card > p {
  margin: 0;
  color: var(--muted);
}

.credential-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: auto 0 0;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.credential-card dl div {
  min-width: 0;
}

.credential-card dt {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 760;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.credential-card dd {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 0.79rem;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.credential-card > a {
  margin-top: auto;
  padding-top: 28px;
  color: #087b75;
  font-size: 0.82rem;
  font-weight: 800;
}

.training-strip {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 38px;
  margin-top: 42px;
  padding-top: 35px;
  border-top: 1px solid #c8d3da;
}

.training-strip > p {
  margin: 0;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 820;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.training-strip ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.training-strip li {
  display: flex;
  flex-direction: column;
  line-height: 1.4;
}

.training-strip strong {
  color: var(--ink);
  font-size: 0.83rem;
}

.training-strip span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.69rem;
}

/* Events */
.events-section {
  background: var(--paper);
}

.events-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: 110px;
  align-items: start;
}

.events-intro > p:last-child {
  margin: 30px 0 0;
  color: var(--muted);
}

.events-list {
  border-top: 1px solid var(--line);
}

.event-item {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) 32px;
  gap: 22px;
  padding: 27px 0;
  align-items: center;
  border-bottom: 1px solid var(--line);
  transition: padding 180ms ease, background 180ms ease;
}

a.event-item:hover {
  padding-right: 14px;
  padding-left: 14px;
  background: var(--white);
}

.event-item time {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--muted);
  background: var(--paper-deep);
  border-radius: 10px;
  font-size: 0.57rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  line-height: 1.1;
}

.event-item time span {
  color: var(--ink);
  font-size: 1.24rem;
  letter-spacing: -0.03em;
}

.event-item p {
  margin: 0 0 3px;
  color: #257a76;
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.event-item h3 {
  margin: 0 0 3px;
  color: var(--ink);
  font-size: 1.18rem;
  letter-spacing: -0.025em;
}

.event-item div > span {
  color: var(--muted);
  font-size: 0.74rem;
}

.event-item > i {
  color: #25847e;
  font-size: 1.25rem;
  font-style: normal;
  text-align: center;
}

.event-item-group time {
  color: var(--ink);
  background: rgba(64, 224, 208, 0.28);
}

/* Alberobello */
.territory-section {
  padding-top: 0;
  background: var(--paper);
}

.territory-card {
  position: relative;
  display: flex;
  min-height: 590px;
  overflow: hidden;
  align-items: flex-end;
  color: var(--white);
  background: var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.territory-card > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.territory-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 17, 31, 0.94) 0%, rgba(7, 17, 31, 0.78) 42%, rgba(7, 17, 31, 0.16) 78%),
    linear-gradient(0deg, rgba(7, 17, 31, 0.72) 0%, transparent 55%);
}

.territory-copy {
  position: relative;
  z-index: 1;
  max-width: 690px;
  padding: 76px;
}

.territory-copy .section-kicker {
  color: var(--accent);
}

.territory-copy h2 {
  max-width: 640px;
  margin: 0;
  color: var(--white);
  font-size: clamp(2.8rem, 5vw, 5rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.territory-copy > p:not(.section-kicker) {
  max-width: 590px;
  margin: 27px 0 0;
  color: rgba(255, 255, 255, 0.74);
}

.territory-copy > a {
  display: inline-flex;
  margin-top: 27px;
  align-items: center;
  gap: 9px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 820;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.territory-copy > a:hover {
  color: var(--white);
}

.territory-credit {
  position: absolute;
  z-index: 1;
  right: 22px;
  bottom: 17px;
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.62rem;
}

.territory-credit a:hover {
  color: var(--white);
}

/* Network */
.network-section {
  padding-top: 0;
  background: var(--paper);
}

.network-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.78fr);
  gap: 90px;
  padding: 70px;
  color: var(--white);
  background: linear-gradient(135deg, #0d2b43, var(--ink) 65%);
  border-radius: var(--radius-lg);
}

.network-card .section-kicker {
  color: var(--accent);
}

.network-card h2 {
  color: var(--white);
  font-size: clamp(2.5rem, 4.4vw, 4.2rem);
}

.network-card > div:first-child > p:last-child {
  max-width: 610px;
  margin: 25px 0 0;
  color: rgba(255, 255, 255, 0.58);
}

.network-data {
  display: grid;
  gap: 1px;
  align-content: center;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
}

.network-data a {
  display: flex;
  padding: 18px 20px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(255, 255, 255, 0.045);
  transition: background 180ms ease;
}

.network-data a:hover {
  background: rgba(64, 224, 208, 0.11);
}

.network-data strong {
  font-size: 0.85rem;
}

.network-data span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.68rem;
  text-align: right;
}

/* Contact */
.contact-section {
  color: var(--white);
  background: var(--ink);
}

.contact-glow {
  position: absolute;
  top: -250px;
  right: -180px;
  width: 650px;
  height: 650px;
  background: var(--accent);
  border-radius: 50%;
  filter: blur(150px);
  opacity: 0.1;
}

.contact-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.8fr);
  gap: 100px;
  align-items: end;
}

.contact-layout .section-kicker {
  color: var(--accent);
}

.contact-layout h2 {
  color: var(--white);
}

.contact-copy > p {
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 1.02rem;
}

.contact-email {
  display: flex;
  padding: 17px 0;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--accent);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 760;
  overflow-wrap: anywhere;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
}

.contact-links a {
  padding: 8px 13px;
  color: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 750;
  transition: color 180ms ease, border-color 180ms ease;
}

.contact-links a:hover {
  color: var(--white);
  border-color: var(--accent);
}

/* Footer */
.site-footer {
  padding: 28px 0;
  color: rgba(255, 255, 255, 0.48);
  background: #030a13;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-layout {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 25px;
  align-items: center;
}

.footer-brand {
  color: var(--white);
}

.footer-brand .brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  font-size: 0.7rem;
}

.footer-layout p {
  margin: 0;
  font-size: 0.68rem;
}

.powered-by {
  justify-self: end;
}

.powered-by a {
  color: var(--white);
  font-weight: 760;
}

/* Responsive */
@media (max-width: 1080px) {
  :root { --header-height: 74px; }

  .main-nav { gap: 18px; }
  .main-nav a { font-size: 0.75rem; }
  .skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-layout,
  .journey-layout,
  .events-layout { gap: 70px; }
  .featured-project { grid-template-columns: 0.9fr 1.1fr; }
  .project-visual { padding: 40px; }
  .project-copy { padding: 55px 45px; }
  .legacy-project { grid-template-columns: minmax(220px, .7fr) minmax(0, 1.3fr); }
  .legacy-project > a { grid-column: 2; }
  .network-card { gap: 55px; padding: 55px; }
}

@media (max-width: 900px) {
  .section { padding: 100px 0; }

  .nav-toggle {
    display: block;
  }

  .nav-toggle[aria-expanded="true"] span:not(.sr-only):first-of-type {
    transform: translateY(3.5px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] span:not(.sr-only):last-of-type {
    transform: translateY(-3.5px) rotate(-45deg);
  }

  .main-nav {
    position: fixed;
    top: var(--header-height);
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    padding: 42px 24px;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    color: var(--white);
    background: rgba(7, 17, 31, 0.98);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
  }

  .main-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .main-nav a {
    padding: 15px 0;
    color: var(--white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.1rem;
  }

  .main-nav a::after { display: none; }
  .main-nav .nav-cta { margin-top: 20px; padding: 14px 18px; border: 0; text-align: center; }

  .hero {
    min-height: auto;
    padding: calc(var(--header-height) + 55px) 0 100px;
  }

  .hero-copy { padding-top: 0; }
  .scroll-cue { display: none; }

  .profile-layout,
  .journey-layout,
  .events-layout,
  .contact-layout,
  .network-card {
    grid-template-columns: 1fr;
    gap: 55px;
  }

  .journey-intro { position: static; }

  .section-heading-row {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .featured-project {
    grid-template-columns: 1fr;
  }

  .project-visual { min-height: 420px; }
  .legacy-project { grid-template-columns: 1fr; }
  .legacy-project > a { grid-column: auto; }
  .territory-section,
  .network-section { padding-top: 0; }

  .training-strip {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .footer-layout {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-brand { justify-self: center; }
  .powered-by { justify-self: center; }
}

@media (max-width: 640px) {
  .container { width: min(calc(100% - 30px), var(--container)); }
  .section { padding: 78px 0; }

  .brand-name { font-size: 0.9rem; }
  .hero { padding-bottom: 75px; }
  .hero h1 { font-size: clamp(2.95rem, 14.4vw, 4.5rem); }
  .hero-intro { font-size: 1rem; }
  .hero-identity { align-items: flex-start; }
  .hero-avatar { width: 84px; height: 84px; border-width: 2px; }
  .hero-identity .eyebrow { line-height: 1.45; }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button { width: 100%; }

  .hero-facts {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .hero-facts div {
    padding: 0 0 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .hero-facts div + div {
    padding-left: 0;
    border-left: 0;
  }

  .section-heading h2,
  .journey-intro h2,
  .events-intro h2,
  .contact-layout h2,
  .network-card h2 {
    font-size: clamp(2.3rem, 12vw, 3.5rem);
  }

  .skills-grid,
  .credentials-grid {
    grid-template-columns: 1fr;
  }

  .skill-card { min-height: auto; }
  .skill-card p { min-height: auto; }

  .timeline-item {
    grid-template-columns: 63px minmax(0, 1fr);
    gap: 19px;
  }

  .timeline-item::before { left: 62px; }
  .timeline-item::after { left: 56px; }
  .timeline-content { padding-left: 17px; }
  .timeline-content h3 { font-size: 1.22rem; }

  .project-visual { min-height: 350px; padding: 30px 18px; }
  .terminal-window { transform: none; }
  .terminal-window pre { padding: 25px 20px; font-size: 0.7rem; }
  .project-copy { padding: 43px 24px; }
  .legacy-project { padding: 24px; gap: 16px; }

  .project-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .credential-card { min-height: 320px; padding: 28px 24px; }
  .credential-top { align-items: flex-start; flex-direction: column; }
  .credential-card h3 { margin-top: 37px; }

  .training-strip ul {
    grid-template-columns: 1fr;
  }

  .event-item {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 14px;
  }

  .event-item > i { display: none; }
  .event-item h3 { font-size: 1rem; }

  .territory-card {
    min-height: 690px;
    border-radius: 24px;
  }

  .territory-section {
    padding-top: 0;
  }

  .territory-card > img {
    object-position: 60% center;
  }

  .territory-overlay {
    background: linear-gradient(0deg, rgba(7, 17, 31, 0.97) 0%, rgba(7, 17, 31, 0.72) 58%, rgba(7, 17, 31, 0.16) 100%);
  }

  .territory-copy {
    padding: 48px 25px 82px;
  }

  .territory-copy h2 {
    font-size: clamp(2.35rem, 12vw, 3.5rem);
  }

  .territory-credit {
    right: auto;
    bottom: 22px;
    left: 25px;
  }

  .network-card {
    width: min(calc(100% - 20px), var(--container));
    padding: 48px 25px;
    border-radius: 24px;
  }

  .network-data a {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .network-data span { text-align: left; }

  .contact-email {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .site-header,
  .hero-actions,
  .scroll-cue,
  .contact-section,
  .site-footer {
    display: none !important;
  }

  .hero,
  .skills-section,
  .featured-project,
  .network-card {
    color: #000;
    background: #fff;
  }

  .section { padding: 35px 0; }
  [data-reveal] { opacity: 1; transform: none; }
}
