@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: light;
  --bg: #08090d;
  --surface: #10121a;
  --surface-2: #151824;
  --text: #f4f6fb;
  --muted: #9ba2b3;
  --accent: #123b70;
  --accent-2: #174f8f;
  --border: rgba(255,255,255,.10);
  --max: 1180px;
}

body.light {
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #ffffff 40%,
    #f7fcff 80%,
    #eaf7fd 100%
  ) !important;
}

body.light {
  --text: #172033;
  --muted: #53657a;
  --surface: rgba(255,255,255,.78);
  --surface-2: rgba(255,255,255,.88);
  --border: rgba(23,32,51,.14);
}


body.light .site-header.scrolled {
  background: rgba(246,247,251,.80);
}

body.light .hero-bg {
  background: radial-gradient(circle, rgba(23,79,143,.16), transparent 65%);
}

body.light .skill-card,
body.light .project-card {
  background: rgba(255,255,255,.72);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  transition: .3s ease;
}

.site-header.scrolled {
  background: rgba(8,9,13,.78);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.nav {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.nav-links { margin-left: auto; }

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: block;
  flex: 0 0 42px;
  border-radius: 12px;
  overflow: hidden;
  background: transparent;
  box-shadow: 0 6px 20px rgba(15,42,80,.16);
}

.logo-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo-name { color: var(--text); }

h1 span, h2 span { color: var(--accent); }

.nav-links { display: flex; gap: 30px; }

.nav-links a {
  color: var(--muted);
  font-size: 14px;
  transition: .25s;
}

.nav-links a:hover, .nav-links a.active { color: var(--text); }

.theme-toggle {
  width: 40px;
  height: 40px;
  margin-left: 18px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: .25s ease;
}

.theme-toggle:hover {
  transform: rotate(12deg) scale(1.05);
  border-color: var(--accent);
}

.theme-icon { font-size: 17px; line-height: 1; }

.menu-toggle { display: none; background: none; border: 0; }

.section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 80px 0;
  position: relative;
}

.hero { min-height: 100vh; overflow: hidden; }

.hero-bg {
  position: absolute;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(18,59,112,.25), transparent 65%);
  right: -180px;
  top: 50%;
  transform: translateY(-50%);
  filter: blur(10px);
}

.hero-content { position: relative; z-index: 1; max-width: 850px; }

.eyebrow {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
  margin-bottom: 22px;
}

h1 {
  font-size: clamp(56px, 9vw, 112px);
  line-height: .95;
  letter-spacing: -6px;
  margin-bottom: 30px;
}

h2 {
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1;
  letter-spacing: -4px;
}

.hero-text {
  max-width: 720px;
  color: var(--muted);
  font-size: 19px;
  margin-bottom: 38px;
  text-align: justify;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  transition: .25s;
}

.btn.primary { background: var(--accent-2); color: #ffffff; box-shadow: 0 8px 24px rgba(11,49,95,.20); }
.btn.secondary { border: 1px solid var(--border); color: var(--text); }
.btn:hover { transform: translateY(-3px); }

.scroll-hint {
  position: absolute;
  bottom: 35px;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--muted);
}

.scroll-hint span {
  width: 1px;
  height: 45px;
  background: linear-gradient(var(--accent), transparent);
}

.scroll-hint small { font-size: 9px; letter-spacing: 2px; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}

.about-copy {
  color: var(--muted);
  font-size: 18px;
  max-width: 540px;
  text-align: justify;
}

.about-copy p + p { margin-top: 22px; }

.download-button {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  transition: 0.2s ease;
}

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

.soft { background: transparent; }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 65px;
}

.skill-card, .project-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.025);
  border-radius: 22px;
  transition: .3s ease;
}

.skill-card {
  min-height: 190px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.skill-card:hover, .project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(18,59,112,.5);
  background: rgba(18,59,112,.06);
}

.skill-card span, .project-number {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.project-number {
  margin-bottom: 16px;
}

.skill-card h3 {
  margin: 55px 0 10px;
  font-size: 20px;
}

.skill-card p, .section-heading p {
  color: var(--muted);
  font-size: 14px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 55px;
}

.language-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color 0.2s ease;
}

.language-btn.active {
  background: transparent;
  color: var(--accent);
}

.language-btn:hover {
  background: transparent;
  color: var(--accent);
}


.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.project-card {
  min-height: 180px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.project-info p {
  color: var(--accent-2);
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 700;
}

.project-info h3 {
  font-size: 34px;
  margin: 8px 0 18px;
  letter-spacing: -1px;
}

.project-info span {
  color: var(--muted);
  font-size: 13px;
}

.project-thumbnail {
  width: 300px;
  height: 200px;
  object-fit: contain;
  display: block;
  margin: 0 auto 14px;
  border-radius: 16px;
}

.language-switcher {
  margin-left: 18px;
}

.section-intro {
  max-width: 760px;
  margin: 20px 0 50px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.game-thumbnail {
  width: 300px;
  height: 200px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.game-thumbnail img {
  width: 260px;
  height: 160px;
  object-fit: contain;
}

.contact-section {
  min-height: 80vh;
  background: radial-gradient(circle at 70% 50%, rgba(18,59,112,.13), transparent 45%);
}

.contact-content { width: 100%; }

.contact-link {
  display: inline-block;
  margin-top: 45px;
  font-size: clamp(20px, 3vw, 32px);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 5px;
}

footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  color: var(--muted);
  font-size: 12px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
}

.reveal {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity .8s ease, transform .8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 850px) {
  .container { width: min(var(--max), calc(100% - 32px)); }
	
  .tournament-grid {
	  grid-template-columns: 1fr;
	}
  
  .nav-links {
    position: absolute;
    top: 78px;
    left: 16px;
    right: 16px;
    padding: 18px;
    display: grid;
    gap: 5px;
    background: rgba(16,18,26,.96);
    border: 1px solid var(--border);
    border-radius: 18px;
    transform: translateY(-20px);
    opacity: 0;
    pointer-events: none;
    transition: .25s;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a { padding: 12px; }
  .menu-toggle { display: grid; gap: 5px; cursor: pointer; order: 3; margin-left: 10px; }
  .theme-toggle { order: 2; margin-left: auto; }
  .nav-links { margin-left: 0; }
  .menu-toggle span { width: 24px; height: 2px; background: var(--text); }

  h1 { letter-spacing: -4px; }
  .split, .projects-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .section-heading { display: block; }
  .section-heading p { margin-top: 18px; }
}

@media (max-width: 520px) {
  .section { padding: 100px 0; }
  .skills-grid { grid-template-columns: 1fr; }
  .skill-card { min-height: 190px; }
  .project-card { min-height: 300px; }
}


/* Smartphone-first refinements */
.project-card {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 850px) {
  .nav {
    height: 68px;
  }
  
  body.light .nav-links {
    background: rgba(255, 255, 255, 0.97);
  }

  .site-header.scrolled {
    background: rgba(8,9,13,.88);
  }

  body.light .site-header.scrolled {
    background: rgba(246,247,251,.90);
  }

  .hero {
    min-height: 100svh;
    padding-top: 105px;
    padding-bottom: 80px;
  }

  .hero-bg {
    width: 420px;
    height: 420px;
    right: -210px;
    top: 43%;
  }

  h1 {
    font-size: clamp(48px, 15vw, 76px);
    letter-spacing: -3px;
  }

  h2 {
    font-size: clamp(38px, 11vw, 58px);
    letter-spacing: -2.5px;
  }

  .hero-text {
    font-size: 16px;
    max-width: 520px;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .btn {
    flex: 1 1 100%;
    min-height: 50px;
    display: grid;
    place-items: center;
  }

  .split {
    gap: 42px;
  }

  .skills-grid {
    gap: 12px;
    margin-top: 42px;
  }

  .skill-card {
    min-height: 175px;
    padding: 22px;
  }

  .skill-card h3 {
    margin-top: 35px;
  }

  .projects-grid {
    gap: 14px;
  }

  .project-card {
    min-height: 260px;
    padding: 22px;
  }

  .contact-section {
    min-height: 75svh;
  }

  .footer-inner {
    gap: 15px;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(var(--max), calc(100% - 28px));
  }

  .nav {
    height: 64px;
  }

  .logo-name {
    display: none;
  }

  .logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }

  .theme-toggle {
    width: 38px;
    height: 38px;
  }

  .nav-links {
    top: 72px;
    left: 10px;
    right: 10px;
    border-radius: 16px;
  }

  .hero {
    padding-top: 95px;
  }

  .eyebrow {
    font-size: 10px;
    letter-spacing: 2.3px;
    margin-bottom: 16px;
  }

  h1 {
    font-size: clamp(45px, 15vw, 64px);
    line-height: .98;
  }

  .hero-text {
    font-size: 15px;
    line-height: 1.55;
    margin-bottom: 28px;
  }

  .section {
    min-height: auto;
    padding: 88px 0;
  }

  .about-copy {
    font-size: 16px;
  }

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

  .skill-card {
    min-height: 150px;
  }

  .skill-card h3 {
    margin-top: 28px;
  }

  .section-heading {
    margin-bottom: 32px;
  }

  .project-card {
    min-height: 230px;
  }

  .project-info h3 {
    font-size: 29px;
  }

  .contact-link {
    font-size: 20px;
    overflow-wrap: anywhere;
  }

  footer {
    padding: 22px 0;
  }

  .footer-inner {
    font-size: 11px;
  }

  .scroll-hint {
    display: none;
  }
  
  .tournament-grid {
	  grid-template-columns: 1fr;
	  gap: 18px;
	}
}

/* Dedicated project pages */
.project-page {
  min-height: 100vh;
}

.project-hero {
  padding-top: 150px;
  padding-bottom: 90px;
  min-height: auto;
}

.project-meta {
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  margin-bottom: 18px;
}

.project-title {
  max-width: 900px;
  font-size: clamp(48px, 8vw, 94px);
  line-height: .96;
  letter-spacing: -5px;
  margin-bottom: 28px;
}

.project-intro {
  max-width: 700px;
  color: var(--muted);
  font-size: 18px;
}

.project-body {
  padding-top: 20px;
  padding-bottom: 110px;
}

.project-content {
  max-width: 900px;
}

.project-content h2 {
  font-size: clamp(30px, 5vw, 48px);
  margin: 65px 0 18px;
}

.project-content p {
  width: 100%;
  max-width: none;
  color: var(--muted);
  font-size: 17px;
  text-align: justify;
}

.project-content a {
  color: #8FA8FF;
  text-decoration: none;
  display: inline-block;
  transition:
    color 0.2s ease,
    transform 0.2s ease,
    text-shadow 0.2s ease;
}

.project-content a:hover {
  color: #808080;
  transform: translateY(-1px);
  text-shadow: 0 0 8px rgba(128, 128, 128, 0.35);
}

.project-content p.cards-symbols {
  text-align: center !important;
}

.project-content ul {
  padding-left: 1em;
}

.project-content ol {
  padding-left: 2em;
}

.project-content li {
  margin-left: 0;
}

.project-images {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  margin: 25px 0;
}

.project-images figure {
  flex: 0 1 200px;
  max-width: 200px;
  margin: 0;
  text-align: center;
}

.project-images img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
}

.project-images figcaption {
  margin-top: 7px;
  font-size: 0.85em;
  line-height: 1.35;
  text-align: center;
}

.tournament-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 30px;
	margin: 30px 0;
	align-items: stretch;
}

.tournament-cell {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 20px;
}

.tournament-cell h3 {
	margin-top: 0;
	margin-bottom: 12px;
}

.tournament-cell ul {
	margin-top: 0;
	padding-left: 2em;
}

.tournament-cell li {
	margin-bottom: 6px;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 30px;

  background: rgba(0, 0, 0, 0.88);

  cursor: zoom-out;
}

.image-lightbox img {
  display: block;

  max-width: 95vw;
  max-height: 90vh;

  width: auto;
  height: auto;

  object-fit: contain;

  cursor: pointer;

  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.image-lightbox-close {
  position: absolute;

  top: 20px;
  right: 30px;

  width: 42px;
  height: 42px;

  border: none;
  background: transparent;

  color: #ffffff;

  font-size: 38px;
  line-height: 42px;

  cursor: pointer;
}

.image-lightbox-close:hover {
  color: #cccccc;
}

body.light .project-content a {
  color: #1F4FA3;
}

body.light .project-content a:hover {
  color: #808080;
  transform: translateY(-1px);
  text-shadow: 0 0 8px rgba(128, 128, 128, 0.35);
}

.project-placeholder {
  margin-top: 45px;
  min-height: 360px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background:
    radial-gradient(circle at 30% 30%, rgba(23,79,143,.22), transparent 35%),
    linear-gradient(135deg, rgba(11,49,95,.10), rgba(23,79,143,.08));
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
  padding: 30px;
}

.project-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 80px;
  padding-top: 25px;
  border-top: 1px solid var(--border);
}

.project-main-image {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 35px auto 0;
}

.project-main-image img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
}

.back-link,
.project-next {
  color: var(--accent-2);
  font-size: 14px;
  font-weight: 600;
}

@media (max-width: 600px) {
  .project-hero {
    padding-top: 115px;
    padding-bottom: 55px;
  }

  .project-title {
    font-size: clamp(43px, 14vw, 62px);
    letter-spacing: -3px;
  }

  .project-intro {
    font-size: 16px;
  }

  .project-body {
    padding-bottom: 75px;
  }

  .project-content h2 {
    margin-top: 45px;
  }

  .project-content p {
    font-size: 15px;
  }

  .project-placeholder {
    min-height: 240px;
    border-radius: 18px;
  }

  .project-nav {
    margin-top: 55px;
  }
}


/* Contact form */
.contact-layout {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(280px, .85fr) minmax(320px, 1.15fr);
  gap: 35px;
  align-items: start;
}

.contact-content {
  margin-left: 20px;
  width: auto;
}

.contact-description {
  max-width: 500px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 16px;
}

.contact-form {
  width: 90%;
  margin-left: 20px;
  margin-right: 20px;
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 20px 70px rgba(0,0,0,.08);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-field {
  margin-bottom: 20px;
}

.form-field label {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 13px;
  outline: none;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  padding: 13px 14px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}

.form-field input {
  min-height: 49px;
}

.form-field textarea {
  min-height: 100px;
  resize: vertical;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--muted);
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(11,49,95,.12);
}

.form-field input.invalid,
.form-field textarea.invalid {
  border-color: #d9534f;
  box-shadow: 0 0 0 3px rgba(217,83,79,.10);
}

.form-field input.valid,
.form-field textarea.valid {
  border-color: var(--accent-2);
}

.field-error {
  display: block;
  min-height: 18px;
  margin-top: 5px;
  color: #d9534f;
  font-size: 11px;
}

.message-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.char-count {
  color: var(--muted);
  font-size: 11px;
  padding-top: 5px;
}

.form-submit {
  width: 100%;
  border: 0;
  cursor: pointer;
  min-height: 50px;
  font: inherit;
}

.form-status {
  min-height: 22px;
  margin-top: 14px;
  font-size: 13px;
}

.form-status.success {
  color: var(--accent-2);
}

.form-status.error {
  color: #d9534f;
}

@media (max-width: 850px) {
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact-form {
    max-width: 720px;
  }
}

@media (max-width: 520px) {
  .contact-form {
    padding: 20px 16px;
    border-radius: 18px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .form-field input,
  .form-field textarea {
    font-size: 16px;
  }

  .form-submit {
    min-height: 52px;
  }
}


/* =========================================================
   V6 — Animated site-wide visual background
   ========================================================= */

body {
  position: relative;
  isolation: isolate;
}

.site-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 15%, rgba(11,49,95,.008), transparent 35%),
    radial-gradient(circle at 85% 85%, rgba(23,79,143,.008), transparent 30%),
    var(--bg);
}

.background-grid {
  position: absolute;
  inset: 0;
  z-index: 10;
  width: 100%;
  height: 100%;
  opacity: .08;
  background-image: url("./assets/bg-clouds-dark.png");
  background-repeat: repeat-x;
  background-size: 1800px 1000px;
  background-position: 0 0;
  animation: cloudMove 90s linear infinite alternate;
}

.background-orb {
  position: absolute;
  width: clamp(260px, 38vw, 620px);
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(55px);
  opacity: .16;
  will-change: transform;
}

.orb-one {
  left: -12%;
  top: 10%;
  background: #0b315f;
  animation: floatOrbOne 18s ease-in-out infinite alternate;
}

.orb-two {
  right: -13%;
  top: 32%;
  background: #174f8f;
  animation: floatOrbTwo 22s ease-in-out infinite alternate;
}

.orb-three {
  left: 35%;
  bottom: -28%;
  background: #123b70;
  animation: floatOrbThree 25s ease-in-out infinite alternate;
}

.background-noise {
  position: absolute;
  inset: 0;
  opacity: .005;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
  animation: noiseShift .35s steps(2) infinite;
}

.cursor-glow {
  position: fixed;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  left: 0;
  top: 0;
  opacity: 0;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(11,49,95,.12), transparent 68%);
  transition: opacity .3s ease;
  will-change: left, top;
}

body.has-pointer .cursor-glow {
  opacity: 1;
}

body.light .site-background {
  background:
    radial-gradient(circle at 15% 15%, rgba(11,49,95,.025), transparent 28%),
    radial-gradient(circle at 85% 80%, rgba(23,79,143,.03), transparent 30%),
    var(--bg);
}

body.light {
  background:
    linear-gradient(
      180deg,
      #8fc8f2 0%,
      #b9ddf5 45%,
      #dceef9 75%,
      #dceef9 75%,
      #eef7fb 100%
    );
}

body.light .background-grid {
  background-image: url("./assets/bg-clouds-light.png") !important;
  opacity: .60;
}

body.light .background-orb {
  opacity: .10;
}



@keyframes floatOrbOne {
  0% { transform: translate3d(-30px, -15px, 0) scale(.92); }
  100% { transform: translate3d(90px, 90px, 0) scale(1.13); }
}

@keyframes floatOrbTwo {
  0% { transform: translate3d(30px, 20px, 0) scale(1.05); }
  100% { transform: translate3d(-100px, -80px, 0) scale(.88); }
}

@keyframes floatOrbThree {
  0% { transform: translate3d(-70px, 20px, 0) scale(.88); }
  100% { transform: translate3d(80px, -90px, 0) scale(1.1); }
}

@keyframes noiseShift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(1%, -1%); }
  50% { transform: translate(-1%, 1%); }
  75% { transform: translate(1%, 1%); }
  100% { transform: translate(-1%, -1%); }
}

/* Glass surfaces so the animated background remains visible */
.site-header.scrolled,
.contact-form,
.skill-card,
.project-card {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.project-card,
.skill-card {
  background: rgba(255,255,255,.035);
}

body.light .project-card,
body.light .skill-card {
  background: rgba(255,255,255,.62);
}

/* More depth for the main calls to action */
.btn.primary {
  position: relative;
  overflow: hidden;
}

.btn.primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 25%,
    rgba(255,255,255,.28) 48%,
    transparent 70%
  );
  transform: translateX(-120%);
  transition: transform .65s ease;
}

.btn.primary:hover::after {
  transform: translateX(120%);
}

.project-card::before,
.skill-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(
    circle at var(--mx, 50%) var(--my, 50%),
    rgba(11,49,95,.14),
    transparent 35%
  );
  opacity: 0;
  transition: opacity .25s ease;
}

.project-card:hover::before,
.skill-card:hover::before {
  opacity: 1;
}

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

  .background-grid,
  .background-orb,
  .background-noise {
    animation: none;
  }
}


@media (max-width: 600px) {
  .background-grid {
	display: none;
  }

  .background-orb {
    filter: blur(45px);
  }

  .orb-one {
    left: -35%;
  }

  .orb-two {
    right: -35%;
  }

  .orb-three {
    left: 10%;
    bottom: -25%;
  }
}


/* Background image layer stays below the content but above body background. */
main,
.site-header,
footer {
  position: relative;
  z-index: 2;
}


/* Keep the decorative background image behind all interactive content. */
.site-background {
  pointer-events: none;
}





@keyframes cloudMove {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: -1800px 0;
  }
}


/* Page 2: keep the global sky/cloud background visible */
body.project-page,
.project-page {
  background: transparent !important;
}

.project-page main,
.project-page .page-content {
  background: transparent !important;
}


/* All project/subpages: preserve the global sky/cloud background */
body.project-page,
body.project-page main,
body.project-page .page-content,
body.project-page .project-page,
body.project-page .project-main {
  background: transparent !important;
}


/* 02 — Competenze: same visual language as 03 — Progetti */
.skill-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.skill-card h3 {
  font-size: 34px;
  margin: 8px 0 18px;
  letter-spacing: -1px;
}

.skill-card p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.skill-card span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.skill-card::after {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 980px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .skill-card {
	padding: 16px 16px 26px;
    min-height: 300px;
  }

  .skill-card h3 {
    font-size: 28px;
  }
  
  .tournament-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}


/* Explicit theme separation */
body:not(.light) {
  background: var(--bg);
}

body.light {
  color: #17324a;
}

body.light .site-background {
  background: transparent;
}


/* Fixed top navigation */
.site-header {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
}

body {
  padding-top: 30px;
}

@media (max-width: 640px) {
  body {
    padding-top: 55px;
  }
}


/* Light Mode contrast */
body.light .logo-name {
  color: var(--text) !important;
}

body.light .nav-links a {
  color: var(--muted) !important;
}

body.light .nav-links a:hover,
body.light .nav-links a.active {
  color: var(--text) !important;
}

body.light .theme-toggle {
  color: var(--text) !important;
  background: rgba(255,255,255,.72);
  border-color: rgba(23,32,51,.14);
}

body.light .site-header.scrolled {
  background: rgba(255,255,255,.78) !important;
  border-bottom-color: rgba(23,32,51,.12);
}

.hero-signature {
    margin-top: 12px;
    margin-bottom: 24px;
}

.hero-signature img {
    display: block;
    width: clamp(180px, 25vw, 360px);
    max-width: 65%;
    height: auto;
}

@media (max-width: 768px) {
    .hero-signature {
        max-width: 100%;
        overflow: hidden;
    }

    .hero-signature img {
        width: 200px;
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 640px) {
  .logo-mark {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }
}

@media (hover: none) and (pointer: coarse) and (orientation: landscape) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 18px;
  }

  .project-card {
    padding: 16px;
    min-height: 220px;
  }
}

@media (hover: none) and (pointer: coarse) and (orientation: landscape) {

  .skill-card {
    padding: 12px;
  }

}

@media (hover: none) and (pointer: coarse) and (orientation: landscape) {
  .tournament-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 18px;
  }

  .tournament-cell {
    padding: 16px;
    min-height: 220px;
  }
}

/* ============================================================
   COOKIE NOTICE
   ============================================================ */

.cookie-notice {
    position: fixed;
    left: 20px;
    right: 20px;
    bottom: 20px;
    z-index: 99999;

    display: none;

    background: rgba(20, 25, 35, 0.94);
    color: #ffffff;

    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;

    box-shadow:
        0 10px 35px rgba(0, 0, 0, 0.30);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    animation: cookieNoticeIn 0.35s ease-out;
}

.cookie-notice.show {
    display: block;
}

.cookie-notice-content {
    max-width: 1100px;
    margin: 0 auto;

    padding: 16px 18px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-notice-text {
    flex: 1;
}

.cookie-notice-text strong {
    display: block;
    margin-bottom: 4px;

    font-size: 15px;
    font-weight: 600;
}

.cookie-notice-text p {
    margin: 0;

    font-size: 13px;
    line-height: 1.5;

    color: rgba(255, 255, 255, 0.78);
}

.cookie-notice-text a {
    color: #5ebcff;
    text-decoration: none;
    white-space: nowrap;
}

.cookie-notice-text a:hover {
    text-decoration: underline;
}

#cookie-accept {
    flex-shrink: 0;

    border: none;
    border-radius: 9px;

    padding: 9px 17px;

    background: #2196f3;
    color: #ffffff;

    font-size: 13px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

#cookie-accept:hover {
    background: #42a5f5;
    transform: translateY(-1px);
}

#cookie-accept:active {
    transform: translateY(0);
}


/* ============================================================
   ANIMAZIONE
   ============================================================ */

@keyframes cookieNoticeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-mobile {
  display: none;
}

@media (max-width: 640px) {

  .logo-mark {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .logo-desktop {
    display: none !important;
  }

  .logo-mobile {
    display: block !important;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
}

/* ============================================================
   COOKIE NOTICE - COMPACT GLASS
   ============================================================ */

.cookie-notice {
    position: fixed !important;

    left: 50% !important;
    right: auto !important;
    bottom: 20px !important;

    transform: translateX(-50%);

    width: calc(100% - 40px) !important;
    max-width: 650px !important;

    z-index: 999999 !important;

    display: none;

    box-sizing: border-box;

    /* --------------------------------------------------------
       GLASS EFFECT - DARK MODE
       -------------------------------------------------------- */

    background: rgba(10, 20, 35, 0.20);

    border: 1px solid rgba(255, 255, 255, 0.16);

    backdrop-filter: blur(20px) saturate(135%);
    -webkit-backdrop-filter: blur(20px) saturate(135%);

    border-radius: 16px;

    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);

    /* TESTO DARK */
    color: #ffffff !important;
}


/* ============================================================
   MOSTRA BANNER
   ============================================================ */

.cookie-notice.show {
    display: block !important;
}


/* ============================================================
   CONTENUTO
   ============================================================ */

.cookie-notice-content {
    width: 100%;

    padding: 13px 16px;

    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;
}


/* ============================================================
   TESTO
   ============================================================ */

.cookie-notice-text {
    flex: 1;
    min-width: 0;
}

.cookie-notice-text strong {
    display: block;

    margin: 0 0 3px 0;

    font-size: 13px;
    font-weight: 600;

    color: #ffffff !important;
}

.cookie-notice-text span {
    display: block;

    margin: 0;

    font-size: 11px;
    line-height: 1.45;

    color: #ffffff !important;
}


/* ============================================================
   LINK PRIVACY
   ============================================================ */

.cookie-notice-text a {
    color: #62c4ff !important;

    text-decoration: none;

    white-space: nowrap;
}

.cookie-notice-text a:hover {
    text-decoration: underline;
}


/* ============================================================
   PULSANTE
   ============================================================ */

#cookie-accept {
    flex-shrink: 0;

    margin: 0;

    padding: 8px 14px;

    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;

    background: rgba(33, 150, 243, 0.70);

    color: #ffffff !important;

    font-family: inherit;
    font-size: 11px;
    font-weight: 600;

    cursor: pointer;

    box-shadow:
        0 3px 10px rgba(0, 0, 0, 0.10);

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

#cookie-accept:hover {
    background: rgba(66, 165, 245, 0.85);

    transform: translateY(-1px);
}

#cookie-accept:active {
    transform: translateY(0);
}


/* ============================================================
   LIGHT MODE
   Il tuo script aggiunge body.light
   ============================================================ */

body.light .cookie-notice {

    background: rgba(255, 255, 255, 0.10);

    border-color: rgba(255, 255, 255, 0.28);

    color: #000000 !important;

    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}


/* Titolo Light */

body.light .cookie-notice-text strong {
    color: #000000 !important;
}


/* Descrizione Light */

body.light .cookie-notice-text span {
    color: #000000 !important;
}


/* Link Light */

body.light .cookie-notice-text a {
    color: #1687d9 !important;
}


/* Pulsante Light */

body.light #cookie-accept {
    background: rgba(33, 150, 243, 0.70);

    color: #ffffff !important;
}

body.light #cookie-accept:hover {
    background: rgba(66, 165, 245, 0.85);
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 600px) {

    .cookie-notice {

        left: 10px !important;
        right: 10px !important;

        bottom: 10px !important;

        transform: none;

        width: calc(100% - 20px) !important;

        max-width: none !important;

        border-radius: 14px;
    }

    .cookie-notice-content {

        padding: 12px;

        gap: 10px;
    }

    .cookie-notice-text strong {

        font-size: 12px;
    }

    .cookie-notice-text span {

        font-size: 10px;

        line-height: 1.4;
    }

    #cookie-accept {

        padding: 7px 10px;

        font-size: 10px;
    }
}



.versioni-dropdown {
  margin: 20px 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.versioni-dropdown summary {
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  background: rgba(255, 255, 255, 0.10);
  color: var(--text-color, inherit);
  transition: background 0.25s ease;
}

.versioni-dropdown summary::-webkit-details-marker {
  display: none;
}

.versioni-dropdown summary::after {
  content: "+";
  float: right;
  font-size: 20px;
  line-height: 1;
}

.versioni-dropdown[open] summary::after {
  content: "−";
}

.versioni-dropdown summary:hover {
  background: rgba(255, 255, 255, 0.16);
}

.versioni-dropdown[open] {
  padding-bottom: 12px;
}

.versioni-dropdown > h3,
.versioni-dropdown > ul {
  margin-left: 18px;
  margin-right: 18px;
}
