/* ===== VARIABLES ===== */
:root {
  --primary-color: #1e9fab;
  --primary-dark: #203a43;
  --action-color: #ff9f43;
  --secondary-color: #6c757d;
  --dark-color: #343a40;
  --light-color: #f8f9fa;
  --background-color: #ffffff;
  --background-alt: #f8f9fa;
  --text-color: #343a40;
  --text-light: #6c757d;
  --border-color: #e9ecef;
  --success-color: #2e7d32;
  --success-light: #c8e6c9;
  --error-color: #c62288;
  --error-light: #ffcdd2;
  --box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  --border-radius: 8px;
  --section-padding: 100px 0;
}

/* ===== RESET & BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  font-size: 16px;
}

body {
  font-family: "Nunito", sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

ul {
  list-style: none;
}

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

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: var(--section-padding);
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--dark-color);
  margin-bottom: 15px;
  font-family: "Nunito", sans-serif;
}

.underline {
  width: 80px;
  height: 4px;
  background-color: var(--primary-color);
  margin: 0 auto;
  position: relative;
}

.underline::before {
  content: "";
  position: absolute;
  width: 40px;
  height: 4px;
  background-color: var(--primary-color);
  top: 0;
  left: -50px;
  opacity: 0.5;
}

.underline::after {
  content: "";
  position: absolute;
  width: 40px;
  height: 4px;
  background-color: var(--primary-color);
  top: 0;
  right: -50px;
  opacity: 0.5;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 30px;
  border-radius: var(--border-radius);
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  outline: none;
}

.primary-btn {
  background-color: var(--action-color);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 159, 67, 0.4);
}

.primary-btn:hover {
  background-color: var(--primary-dark);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(32, 58, 67, 0.5);
}

.secondary-btn {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.secondary-btn:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-3px);
}

.small-btn {
  padding: 8px 20px;
  font-size: 0.9rem;
}

/* ===== PRELOADER ===== */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--background-color);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hide {
  opacity: 0;
  visibility: hidden;
}

.loader {
  display: flex;
  align-items: center;
}

.loader .circle {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background-color: var(--primary-color);
  margin: 0 5px;
  animation: bounce 1.5s infinite ease-in-out both;
}

.loader .circle:nth-child(1) {
  animation-delay: -0.3s;
}

.loader .circle:nth-child(2) {
  animation-delay: -0.15s;
}

@keyframes bounce {
  0%,
  80%,
  100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

/* ===== HEADER ===== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: transparent;
  transition: var(--transition);
  padding: 20px 0;
}

header.scrolled {
  background-color: var(--background-color);
  box-shadow: var(--box-shadow);
  padding: 15px 0;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--dark-color);
  font-family: "Nunito", sans-serif;
  text-decoration: none;
}

.logo span {
  color: var(--primary-color);
}

.nav-links {
  display: flex;
  align-items: center;
}

.nav-links li {
  margin: 0 15px;
}

.nav-links a {
  color: var(--dark-color);
  font-weight: 500;
  position: relative;
  padding: 5px 0;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

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

.hamburger {
  display: none;
  cursor: pointer;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  transition: var(--transition);
  background-color: var(--dark-color);
}

/* ===== HERO SECTION ===== */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  position: relative;
  background-color: var(--background-alt);
  overflow: hidden;
  padding: 100px 0 60px;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.hero-text {
  flex: 1;
}

.hero-text h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
  color: var(--dark-color);
  font-family: "Nunito", sans-serif;
}

.hero-text h2 {
  font-size: 1.8rem;
  font-weight: 500;
  margin-bottom: 20px;
  color: var(--text-light);
}

.hero-text p {
  font-size: 1.1rem;
  margin-bottom: 30px;
  color: var(--text-light);
  max-width: 600px;
}

.highlight {
  color: var(--primary-color);
  position: relative;
  display: inline-block;
}


.hero-buttons {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
}

.play-btn {
  background: linear-gradient(135deg, var(--action-color), #ff7b2e);
  color: white;
  box-shadow: 0 8px 24px rgba(255, 159, 67, 0.5);
  animation: floatBtn 2.4s ease-in-out infinite;
}

.play-btn i {
  margin-right: 8px;
  animation: wiggle 1.6s ease-in-out infinite;
}

.play-btn:hover {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
}

@keyframes floatBtn {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes wiggle {
  0%,
  100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(-12deg);
  }
}

.social-icons {
  display: flex;
  gap: 15px;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--light-color);
  color: var(--primary-color);
  transition: var(--transition);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.social-icons a:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-3px);
}

.hero-image {
  flex: 1;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image img {
  width: 350px;
  height: 350px;
  object-fit: cover;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  box-shadow: var(--box-shadow);
  position: relative;
  z-index: 1;
  border: 5px solid white;
}

.shape-1,
.shape-2 {
  position: absolute;
  border-radius: 50%;
  z-index: 0;
}

.shape-1 {
  width: 300px;
  height: 300px;
  background-color: rgba(30, 159, 171, 0.1);
  top: -30px;
  right: -30px;
}

.shape-2 {
  width: 200px;
  height: 200px;
  background-color: rgba(30, 159, 171, 0.15);
  bottom: -20px;
  left: -20px;
}

.scroll-down {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: bounce 2s infinite;
}

.mouse {
  width: 30px;
  height: 50px;
  border: 2px solid var(--text-light);
  border-radius: 20px;
  position: relative;
}

.wheel {
  width: 6px;
  height: 6px;
  background-color: var(--text-light);
  border-radius: 50%;
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  animation: wheel 1.5s infinite;
}

.arrow span {
  display: block;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--text-light);
  border-bottom: 2px solid var(--text-light);
  transform: rotate(45deg);
  margin: 5px 0;
}

@keyframes wheel {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
}

/* ===== ABOUT SECTION ===== */
.about {
  background-color: var(--background-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 32px 0;
}

.about .container {
  width: 100%;
  margin-block: auto;
}

.about .section-header {
  margin-bottom: 22px;
}

.about .section-header h2 {
  font-size: 1.9rem;
  margin-bottom: 10px;
}

.about-content {
  display: flex;
  align-items: center;
  gap: 44px;
}

.about-image {
  flex: 1;
  position: relative;
}

.about-image img {
  width: auto;
  max-width: 100%;
  max-height: clamp(170px, 36vh, 360px);
  display: block;
  margin: 0 auto;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.experience-badge {
  position: absolute;
  bottom: -20px;
  right: -18px;
  width: 100px;
  height: 100px;
  background-color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  box-shadow: var(--box-shadow);
  border: 5px solid white;
}

.experience-badge .years {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
}

.experience-badge .text {
  font-size: 0.78rem;
  text-align: center;
  line-height: 1.2;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 18px;
}

.stat-card {
  background-color: var(--background-alt);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--primary-color);
  border-radius: var(--border-radius);
  padding: 12px 8px;
  text-align: center;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--box-shadow);
  border-color: rgba(30, 159, 171, 0.4);
}

.stat-card i {
  font-size: 1.1rem;
  color: var(--action-color);
  margin-bottom: 4px;
}

.stat-num {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
  color: var(--primary-color);
  font-family: "Nunito", sans-serif;
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 4px;
}

.about-text {
  flex: 1;
}

.about-text h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--dark-color);
  font-family: "Nunito", sans-serif;
}

.about-text p {
  margin-bottom: 12px;
  color: var(--text-light);
  font-size: 0.95rem;
}

.about-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.detail {
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail i {
  color: var(--primary-color);
  font-size: 1.1rem;
}

.about-details .detail span {
  font-size: 0.9rem;
}

.about-buttons {
  display: flex;
  gap: 12px;
}

/* ===== SKILLS SECTION ===== */
.skills {
  background-color: var(--background-alt);
}

.skills-content {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.skills-text {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.skills-text h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--dark-color);
  font-family: "Nunito", sans-serif;
}

.skills-text p {
  color: var(--text-light);
}

.skills-categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.category {
  background-color: var(--background-color);
  border-radius: var(--border-radius);
  padding: 30px;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.category:hover {
  transform: translateY(-10px);
}

.category h4 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--dark-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.category h4 i {
  color: var(--primary-color);
}

.skills-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.skill-item {
  width: 100%;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background-color: var(--border-color);
  border-radius: 10px;
  overflow: hidden;
}

.progress {
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 10px;
  transition: width 1.5s ease-in-out;
}

/* ===== EXPERIENCE SECTION ===== */
.experience {
  background-color: var(--background-color);
}

.timeline {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, transparent 0%, var(--primary-color) 6%, var(--primary-color) 94%, transparent 100%);
  opacity: 0.25;
}

.timeline-progress {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 0;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--primary-color), var(--action-color));
  box-shadow: 0 0 8px rgba(30, 159, 171, 0.6), 0 0 18px rgba(30, 159, 171, 0.35);
  z-index: 1;
  will-change: height;
}

.timeline-progress::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 50%);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--action-color);
  border: 2px solid #ffffff;
  box-shadow: 0 0 14px rgba(255, 159, 67, 0.9);
}

.js-timeline .timeline-item {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.js-timeline .timeline-item.is-revealed {
  opacity: 1;
  transform: none;
}

.timeline-item {
  position: relative;
  width: 50%;
  padding-right: 46px;
  padding-bottom: 40px;
}

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

.timeline-dot {
  position: absolute;
  top: 26px;
  right: -7px;
  width: 14px;
  height: 14px;
  background-color: var(--primary-color);
  border: 3px solid var(--background-color);
  border-radius: 50%;
  z-index: 2;
  box-shadow: 0 0 0 2px rgba(30, 159, 171, 0.25);
  transition: box-shadow 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
}

.timeline-item:hover .timeline-dot {
  box-shadow: 0 0 0 4px rgba(30, 159, 171, 0.3);
  transform: scale(1.15);
}

.timeline-item.is-revealed .timeline-dot {
  background-color: var(--action-color);
  box-shadow: 0 0 0 4px rgba(255, 159, 67, 0.28), 0 0 14px rgba(255, 159, 67, 0.6);
  transform: scale(1.2);
}

.timeline-content {
  position: relative;
  background-color: var(--background-color);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--primary-color);
  border-radius: 0 14px 14px 0;
  padding: 18px 22px;
  box-shadow: 0 4px 18px rgba(32, 58, 67, 0.06);
  transition: var(--transition);
}

.timeline-content:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(30, 159, 171, 0.15);
  border-color: rgba(30, 159, 171, 0.45);
}

.timeline-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 10px;
}

.timeline-head h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark-color);
  font-family: "Nunito", sans-serif;
}

.timeline-head h4 {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--action-color);
  margin-top: 2px;
}

.timeline-date {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-color);
  background-color: rgba(30, 159, 171, 0.1);
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
  margin-top: 2px;
}

.timeline-content p {
  margin-bottom: 12px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-light);
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-left: 0;
  margin: 0;
  list-style: none;
}

.timeline-tags li {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--primary-color);
  background-color: rgba(30, 159, 171, 0.08);
  border: 1px solid rgba(30, 159, 171, 0.22);
  border-radius: 999px;
  padding: 3px 10px;
}

.timeline-item:nth-child(even) {
  margin-left: 50%;
  padding-right: 0;
  padding-left: 46px;
}

.timeline-item:nth-child(even) .timeline-dot {
  right: auto;
  left: -7px;
}

.timeline-item:nth-child(even) .timeline-content {
  border-left: 1px solid var(--border-color);
  border-right: 3px solid var(--primary-color);
  border-radius: 14px 0 0 14px;
}

.timeline-item:nth-child(even) .timeline-content:hover {
  border-color: rgba(30, 159, 171, 0.45);
}

/* ===== PROJECTS SECTION ===== */
.projects {
  background-color: var(--background-alt);
}

.projects-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

.filter-btn {
  padding: 8px 20px;
  background-color: var(--background-color);
  border: none;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
}

.filter-btn.active,
.filter-btn:hover {
  background-color: var(--primary-color);
  color: white;
}

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

.project-item {
  background-color: var(--background-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.project-item:hover {
  transform: translateY(-10px);
}

.project-img {
  height: 200px;
  overflow: hidden;
  object-fit: cover;
}

.project-img img {
  width: 100%;
  height: 100%;
  transition: var(--transition);
}

.project-item:hover .project-img img {
  transform: scale(1.1);
}

.project-info {
  padding: 20px;
}

.project-info h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--dark-color);
  font-family: "Nunito", sans-serif;
}

.project-info p {
  margin-bottom: 15px;
  color: var(--text-light);
  font-size: 0.9rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.project-tech span {
  padding: 5px 10px;
  background-color: var(--background-alt);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--text-light);
}

.project-links {
  display: flex;
  gap: 10px;
}

/* ===== SNAKE GAME SECTION ===== */
.snake-game-section {
  background-color: var(--background-color);
  padding: var(--section-padding);
}

.game-intro {
  text-align: center;
  max-width: 560px;
  margin: -40px auto 45px;
  color: var(--text-light);
  font-size: 1.05rem;
}

.game-shell {
  max-width: 440px;
  margin: 0 auto;
}

.snake-screen {
  background: linear-gradient(160deg, #2b4a55, var(--primary-dark));
  border-radius: 18px;
  padding: 18px;
  border: 1px solid rgba(30, 159, 171, 0.25);
  box-shadow: 0 20px 50px rgba(32, 58, 67, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.snake-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px 12px;
}

.hud-item {
  text-align: center;
  min-width: 70px;
}

.hud-logo {
  color: var(--action-color);
  font-size: 1.3rem;
}

.hud-label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  font-family: "Courier New", monospace;
}

.hud-value {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  color: #8fe3ea;
  font-family: "Courier New", monospace;
}

.snake-board-wrap {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  max-width: min(100%, max(120px, calc(100vh - 330px)));
  margin: 0 auto;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.05);
}

#snakeCanvas {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: var(--primary-dark);
  image-rendering: pixelated;
}

.snake-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(32, 58, 67, 0.82);
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.snake-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.overlay-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8fe3ea;
  font-family: "Courier New", monospace;
  text-shadow: 0 0 18px rgba(143, 227, 234, 0.5);
}

.overlay-sub {
  margin-top: 8px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
}

.overlay-score {
  margin-top: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--action-color);
  font-family: "Courier New", monospace;
}

.snake-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 16px 0 14px;
}

.snake-btn {
  padding: 9px 18px;
  font-size: 0.9rem;
  gap: 8px;
}

.snake-btn.primary-btn {
  background-color: var(--action-color);
  color: white;
  box-shadow: 0 4px 12px rgba(255, 159, 67, 0.35);
}

.snake-btn.primary-btn:hover {
  background-color: var(--primary-dark);
}

.snake-btn:not(.primary-btn) {
  background-color: rgba(255, 255, 255, 0.1);
  color: #eef6f8;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.snake-btn:not(.primary-btn):hover {
  background-color: rgba(30, 159, 171, 0.3);
}

.snake-dpad {
  display: none;
  justify-content: center;
  padding-bottom: 14px;
}

.dpad-grid {
  display: grid;
  grid-template-columns: repeat(3, 54px);
  grid-template-rows: repeat(3, 54px);
  gap: 8px;
}

.dpad-btn {
  background-color: var(--primary-color);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 3px 10px rgba(30, 159, 171, 0.3);
}

.dpad-btn:hover,
.dpad-btn:active {
  background-color: #157f89;
  color: white;
}

.dpad-up { grid-column: 2; grid-row: 1; }
.dpad-left { grid-column: 1; grid-row: 2; }
.dpad-right { grid-column: 3; grid-row: 2; }
.dpad-down { grid-column: 2; grid-row: 3; }

.snake-hint {
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}

.snake-hint kbd {
  padding: 2px 7px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  background-color: rgba(255, 255, 255, 0.12);
  font-size: 0.72rem;
  color: #eef6f8;
}

/* ===== CONTACT SECTION ===== */
.contact {
  background-color: var(--background-color);
}

.contact-content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 50px;
  align-items: start;
}

.contact-content .clock-wrapper {
  grid-column: 1 / -1;
  justify-self: center;
  margin-top: 40px;
}

.contact-info h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--dark-color);
  font-family: "Nunito", sans-serif;
}

.contact-info p {
  color: var(--text-light);
}

.contact-info > p {
  margin-bottom: 24px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.contact-item i {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.contact-item h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 5px;
  color: var(--dark-color);
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--light-color);
  color: var(--primary-color);
  transition: var(--transition);
}

.social-links a:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-3px);
}

.contact-form-container {
  background-color: var(--background-alt);
  padding: 40px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  position: relative;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 15px 20px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background-color: var(--background-color);
  font-size: 1rem;
  transition: var(--transition);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary-dark);
  outline: none;
}

.form-group label {
  position: absolute;
  top: 15px;
  left: 20px;
  pointer-events: none;
  transition: var(--transition);
  color: var(--text-light);
}

.form-group input:focus ~ label,
.form-group textarea:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:not(:placeholder-shown) ~ label {
  top: -10px;
  left: 15px;
  font-size: 0.8rem;
  background-color: var(--background-color);
  padding: 0 5px;
  color: var(--primary-dark);
}

.submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  align-self: flex-start;
}

.submit-btn i {
  transition: var(--transition);
}

.submit-btn:hover i {
  transform: translateX(5px);
}

.form-status {
  margin-top: 10px;
  font-size: 0.9rem;
}

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

.form-status.error {
  color: var(--error-color);
}

/* ===== FOOTER ===== */
footer {
  background-color: var(--primary-dark);
  padding: 0 0 50px;
  color: white;
}

.wave-top {
  display: block;
  width: 100%;
  height: 80px;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}

.footer-logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: white;
  font-family: "Nunito", sans-serif;
  text-decoration: none;
}

.footer-logo span {
  color: var(--action-color);
}

.footer-quote {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  font-style: italic;
  font-family: "Nunito", sans-serif;
  line-height: 1.7;
  letter-spacing: 0.02em;
}

.footer-quote i {
  color: var(--primary-color);
  font-style: normal;
  font-size: 0.85rem;
  margin: 0 6px;
  vertical-align: middle;
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: var(--box-shadow);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 99;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--primary-dark);
  color: white;
  transform: translateY(-5px);
}

/* ===== SCROLL PROGRESS ===== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--action-color), var(--primary-color));
  z-index: 10001;
  border-radius: 0 3px 3px 0;
}

/* ===== SCROLL ANIMATIONS ===== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(45px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}

.animate-on-scroll[data-animation="slide-left"] {
  transform: translateX(-55px);
}

.animate-on-scroll[data-animation="slide-right"] {
  transform: translateX(55px);
}

.animate-on-scroll[data-animation="zoom-in"] {
  transform: scale(0.9);
}

.animate-on-scroll.show {
  opacity: 1;
  transform: none;
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 1200px) {
  .hero-text h1 {
    font-size: 3rem;
  }

  .hero-text h2 {
    font-size: 1.6rem;
  }

  .skills-categories {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
  }

  .hero-text {
    order: 2;
  }

  .hero-image {
    order: 1;
    margin-bottom: 30px;
  }

  .hero-buttons,
  .social-icons {
    justify-content: center;
  }

  .about {
    min-height: 0;
    display: block;
    padding: 80px 0 50px;
  }

  .about .container {
    margin-block: 0;
  }

  .about-content {
    flex-direction: column;
  }

  .about-image {
    margin-bottom: 30px;
  }

  .contact-content {
    grid-template-columns: 1fr;
  }

  .contact-content .clock-wrapper {
    order: 3;
    margin-top: 20px;
  }

  .contact-info {
    order: 2;
  }

  .contact-form-container {
    order: 1;
    margin-bottom: 30px;
  }

  .timeline::before {
    left: 16px;
  }

  .timeline-progress {
    left: 16px;
    transform: none;
  }

  .timeline-item,
  .timeline-item:nth-child(even) {
    width: 100%;
    margin-left: 0;
    padding-right: 0;
    padding-left: 44px;
  }

  .timeline-dot,
  .timeline-item:nth-child(even) .timeline-dot {
    right: auto;
    left: 10px;
  }

  .timeline-content,
  .timeline-item:nth-child(even) .timeline-content {
    border-left: 3px solid var(--primary-color);
    border-right: 1px solid var(--border-color);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .snake-dpad {
    display: flex;
  }

  .snake-board-wrap {
    max-width: min(100%, max(120px, calc(100vh - 504px)));
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .nav-links {
    position: fixed;
    left: -100%;
    top: 70px;
    gap: 0;
    flex-direction: column;
    background-color: var(--background-color);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    padding: 20px 0;
  }

  .nav-links.active {
    left: 0;
  }

  .nav-links li {
    margin: 15px 0;
  }

  .hero-text h1 {
    font-size: 2.5rem;
  }

  .hero-text h2 {
    font-size: 1.4rem;
  }

  .section-header h2 {
    font-size: 2rem;
  }

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

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

  .about-details {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-text h2 {
    font-size: 1.2rem;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 10px;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .about-buttons {
    flex-direction: column;
    gap: 10px;
  }

  .about-buttons .btn {
    width: 100%;
  }

  .section-header h2 {
    font-size: 1.8rem;
  }

  .about-text h3,
  .skills-text h3 {
    font-size: 1.5rem;
  }

  .contact-form-container {
    padding: 20px;
  }
}

/* ===== SMALL DEVICES ===== */
@media (max-width: 480px) {
  section {
    padding: 60px 0;
  }

  .container {
    padding: 0 15px;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .hero {
    padding: 90px 0 50px;
  }

  .hero-content {
    gap: 20px;
  }

  .hero-text h1 {
    font-size: 1.8rem;
  }

  .about-content {
    gap: 30px;
  }

  .experience-badge {
    width: 100px;
    height: 100px;
    bottom: -15px;
    right: 10px;
  }

  .experience-badge .years {
    font-size: 1.6rem;
  }

  .about-stats {
    gap: 10px;
    margin-top: 20px;
  }

  .stat-card {
    padding: 12px 8px;
  }

  .stat-card i {
    font-size: 1.2rem;
    margin-bottom: 6px;
  }

  .stat-num {
    font-size: 1.25rem;
  }

  .contact-content {
    gap: 30px;
  }

  .contact-form-container {
    padding: 16px;
  }

  .form-group input,
  .form-group textarea {
    padding: 13px 16px;
  }

  .snake-screen {
    padding: 12px;
    border-radius: 14px;
  }

  .snake-hud {
    padding: 0 2px 8px;
  }

  .hud-value {
    font-size: 1.1rem;
  }

  .snake-controls {
    gap: 8px;
    padding: 12px 0 10px;
  }

  .snake-btn {
    padding: 8px 12px;
    font-size: 0.85rem;
  }

  .snake-hint {
    font-size: 0.72rem;
  }

  .timeline-content {
    padding: 18px;
  }

  .timeline-item {
    padding-bottom: 34px;
  }

  .game-shell {
    max-width: 100%;
  }
}

@media (max-height: 600px) {
  .hero {
    min-height: 100svh;
    padding: 110px 0 60px;
  }
}

section[id] {
  scroll-margin-top: 80px;
}


/* ===== CUSTOM CURSOR ===== */
.cursor,
.cursor2,
.snake-svg {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  body {
    cursor: none;
  }

  .cursor {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border: 2px solid var(--action-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate3d(-50%, -50%, 0);
    transition: width 0.25s ease, height 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
  }

  .cursor2 {
    display: block;
    position: fixed;
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
  }

  .snake-svg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
  }

  .snake-svg.active {
    display: block;
    filter: drop-shadow(0 0 5px rgba(30, 159, 171, 0.45));
  }

  .cursor.hover {
    width: 64px;
    height: 64px;
    border-color: var(--primary-color);
    background-color: rgba(30, 159, 171, 0.12);
  }

  .cursor.click {
    width: 26px;
    height: 26px;
    border-color: var(--action-color);
    background-color: rgba(255, 159, 67, 0.25);
  }
}

/* ===== TESTIMONIALS ===== */
.testimonials {
  background-color: var(--background-alt);
}

.review__cards {
  max-width: 1000px;
  margin: 0 auto;
}

.review__cards .testimonial__card {
  margin: 0 15px;
}

.testimonial__card {
  background-color: var(--background-color);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  transition: var(--transition);
  border-top: 4px solid var(--primary-color);
}

.testimonial__card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(30, 159, 171, 0.2);
}

.testimony-text {
  color: var(--text-light);
  font-style: italic;
  line-height: 1.7;
  padding: 10px 0 20px;
}

.testimony-text i {
  color: var(--primary-color);
  margin-right: 8px;
  font-size: 1.1rem;
}

.testimony-profile {
  display: flex;
  align-items: center;
  gap: 15px;
  border-top: 2px solid var(--border-color);
  padding-top: 20px;
  margin-top: 20px;
}

.profile-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: rgba(30, 159, 171, 0.15);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.testimony-profile .name {
  font-weight: 700;
  color: var(--dark-color);
  margin-bottom: 2px;
}

.testimony-profile .role {
  font-size: 0.85rem;
  color: var(--text-light);
}

.review__cards .slick-prev,
.review__cards .slick-next {
  width: 45px;
  height: 45px;
  background-color: var(--primary-color);
  border-radius: 50%;
  z-index: 10;
  transition: var(--transition);
}

.review__cards .slick-prev:hover,
.review__cards .slick-next:hover {
  background-color: var(--primary-dark);
}

.review__cards .slick-prev {
  left: -20px;
}

.review__cards .slick-next {
  right: -20px;
}

.review__cards .slick-dots {
  bottom: -45px;
}

.review__cards .slick-dots li button:before {
  color: var(--primary-color);
  opacity: 0.4;
}

.review__cards .slick-dots li.slick-active button:before {
  color: var(--primary-color);
  opacity: 1;
}

/* ===== ANIMATED CLOCK ===== */
.clock-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.clock-mode {
  position: relative;
  display: inline-flex;
  background: rgba(13, 29, 36, 0.9);
  border: 1px solid rgba(30, 159, 171, 0.35);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 22px;
  box-shadow: 0 0 18px rgba(30, 159, 171, 0.25);
}

.clock-mode__thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 108px;
  height: calc(100% - 8px);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary-color), #157f89);
  box-shadow: 0 0 14px rgba(30, 159, 171, 0.7);
  transition: left 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 0;
}

.clock-mode.is-digital .clock-mode__thumb {
  left: calc(50% + 2px);
}

.clock-mode__btn {
  position: relative;
  z-index: 1;
  width: 108px;
  padding: 8px 0;
  border: none;
  background: transparent;
  color: rgba(238, 246, 248, 0.55);
  font-family: "Nunito", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  transition: color 0.3s ease;
}

.clock-mode__btn.is-active {
  color: #ffffff;
}

.clock-stage {
  position: relative;
  display: flex;
  justify-content: center;
}

.clock-view {
  display: none;
}

.clock-view.is-active {
  display: flex;
  animation: clockViewIn 0.5s ease;
}

@keyframes clockViewIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* --- Analog view --- */
.clock-view--analog {
  position: relative;
  align-items: center;
  padding-bottom: 104px;
}

.clock-ring {
  position: absolute;
  top: 0;
  left: 50%;
  width: 292px;
  height: 292px;
  margin-left: -146px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--primary-color), var(--action-color), var(--primary-color), var(--primary-dark), var(--primary-color));
  opacity: 0.32;
  filter: blur(3px);
  animation: clockSpin 18s linear infinite;
  z-index: 0;
}

@keyframes clockSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.clock-container {
  position: relative;
  width: 260px;
  height: 260px;
  animation: clockPulse 4s ease-in-out infinite;
}

.clock-container::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.03), rgba(30, 159, 171, 0.4), rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.28));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
  pointer-events: none;
  z-index: 1;
}

@keyframes clockPulse {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(30, 159, 171, 0.35)); }
  50% { filter: drop-shadow(0 0 24px rgba(30, 159, 171, 0.75)); }
}

.clock {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #2b4a55, var(--primary-dark) 55%, #10242c);
  border: 4px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 0 0 6px rgba(30, 159, 171, 0.22),
    0 0 34px rgba(30, 159, 171, 0.45),
    inset 0 0 46px rgba(0, 0, 0, 0.45);
}

.clock__big-tick,
.clock__small-tick {
  position: absolute;
  border-radius: 2px;
}

.clock__big-tick {
  width: 4px;
  height: 18px;
  background: linear-gradient(180deg, var(--action-color), var(--primary-color));
  box-shadow: 0 0 6px rgba(30, 159, 171, 0.9);
}

.clock__small-tick {
  width: 2px;
  height: 9px;
  background: rgba(255, 255, 255, 0.35);
}

.clock__num {
  position: absolute;
  color: #eef6f8;
  font-size: 1rem;
  font-weight: 800;
  font-family: "Nunito", sans-serif;
  text-shadow: 0 0 10px rgba(30, 159, 171, 0.8);
  z-index: 2;
}

.clock-date {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  z-index: 2;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(13, 29, 36, 0.75);
  border: 1px solid rgba(30, 159, 171, 0.4);
  color: #8fe3ea;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  font-family: "Nunito", sans-serif;
  box-shadow: 0 0 8px rgba(30, 159, 171, 0.25);
  white-space: nowrap;
}

.center-bottom,
.center-up {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
}

.center-bottom {
  width: 16px;
  height: 16px;
  background-color: var(--primary-color);
  box-shadow: 0 0 12px rgba(30, 159, 171, 0.9);
}

.center-up {
  width: 7px;
  height: 7px;
  background-color: var(--action-color);
  z-index: 5;
  box-shadow: 0 0 8px rgba(255, 159, 67, 0.9);
}

.sec-hand,
.big-hand,
.small-hand {
  position: absolute;
  bottom: 50%;
  left: 50%;
  transform-origin: 50% 100%;
  border-radius: 5px;
  z-index: 2;
}

.sec-hand {
  width: 2px;
  height: 100px;
  background: linear-gradient(to top, transparent 22%, var(--action-color) 22%);
  margin-left: -1px;
  box-shadow: 0 0 10px rgba(255, 159, 67, 0.9);
}

.big-hand {
  width: 4px;
  height: 72px;
  background-color: #eef6f8;
  margin-left: -2px;
  box-shadow: 0 0 8px rgba(238, 246, 248, 0.5);
}

.small-hand {
  width: 6px;
  height: 54px;
  background-color: var(--primary-color);
  margin-left: -3px;
  box-shadow: 0 0 8px rgba(30, 159, 171, 0.8);
}

/* Pendulum */
.clock-pendulum {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 0;
  height: 0;
  z-index: 2;
}

.pendulum-rod {
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 80px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(238, 246, 248, 0.9), rgba(238, 246, 248, 0.2));
  box-shadow: 0 0 6px rgba(30, 159, 171, 0.5);
  transform-origin: 50% 0%;
}

.pendulum-rod::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--primary-color);
  box-shadow: 0 0 8px rgba(30, 159, 171, 0.9);
}

.pendulum-bob {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #ffc27d, var(--action-color) 60%, #d97c1f);
  box-shadow: 0 0 18px rgba(255, 159, 67, 0.8);
}

/* --- Digital view --- */
.clock-view--digital {
  position: relative;
  align-items: center;
  justify-content: center;
}

.clock-digital-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 26px 30px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(43, 74, 85, 0.92), rgba(16, 36, 44, 0.96));
  border: 1px solid rgba(30, 159, 171, 0.35);
  box-shadow:
    0 0 0 6px rgba(30, 159, 171, 0.12),
    0 0 40px rgba(30, 159, 171, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 0 60px rgba(0, 0, 0, 0.35);
}

.clock-display {
  display: flex;
  align-items: center;
  gap: 8px;
  perspective: 600px;
}

.clock-digit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 58px;
  padding: 0 4px;
  font-family: "Courier New", monospace;
  font-size: 2.7rem;
  font-weight: 800;
  line-height: 1;
  color: #8fe3ea;
  text-shadow: 0 0 14px rgba(143, 227, 234, 0.85);
  background: linear-gradient(180deg, rgba(32, 58, 67, 0.85), rgba(16, 36, 44, 0.9));
  border: 1px solid rgba(143, 227, 234, 0.16);
  border-radius: 8px;
  box-shadow: inset 0 -5px 10px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform-style: preserve-3d;
}

.clock-digit.flip {
  animation: digitFlip 0.5s ease;
}

@keyframes digitFlip {
  0% { transform: rotateX(0deg); }
  40% { transform: rotateX(-90deg); opacity: 0.4; }
  60% { transform: rotateX(90deg); opacity: 0.4; }
  100% { transform: rotateX(0deg); opacity: 1; }
}

.clock-colon {
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 2px;
}

.clock-colon i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--action-color);
  box-shadow: 0 0 8px rgba(255, 159, 67, 0.9);
  animation: colonBlink 1s steps(1) infinite;
}

.clock-colon i:last-child {
  animation-delay: 0.5s;
}

@keyframes colonBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.15; }
}

.clock-seconds {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.clock-seconds .clock-digit {
  min-width: 24px;
  height: 34px;
  font-size: 1.5rem;
}

.clock-ampm {
  align-self: center;
  margin-left: 4px;
  padding: 5px 7px;
  border-radius: 7px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #ffd9a8;
  background: rgba(255, 159, 67, 0.14);
  border: 1px solid rgba(255, 159, 67, 0.4);
  box-shadow: 0 0 10px rgba(255, 159, 67, 0.25);
}

.clock-digital-date {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(238, 246, 248, 0.65);
}

.clock-caption {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--text-light);
  font-size: 0.9rem;
  max-width: 300px;
  margin-top: 20px;
}

.clock-caption i {
  color: var(--primary-color);
  margin-right: 6px;
}

@media (max-width: 576px) {
  .clock-view--analog {
    padding-bottom: 100px;
  }

  .clock-container {
    width: 220px;
    height: 220px;
  }

  .clock-ring {
    width: 248px;
    height: 248px;
    margin-left: -124px;
  }

  .clock-pendulum {
    transform: scale(0.9);
    transform-origin: top center;
  }

  .clock-mode__btn,
  .clock-mode__thumb {
    width: 96px;
  }

  .clock-digit {
    min-width: 30px;
    height: 50px;
    font-size: 2.2rem;
  }

  .clock-digital-panel {
    padding: 20px 16px;
  }
}
@media (hover: none) and (pointer: coarse) {
  .snake-dpad {
    display: flex;
  }
}


@media (hover: none) and (pointer: coarse) {
  .snake-dpad {
    display: flex;
  }

  .snake-board-wrap {
    max-width: min(100%, max(120px, calc(100vh - 504px)));
  }
}

