/* --- Animated Skills Visual Section --- */
.skills-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  margin-top: 12px;
}

.skills-media {
  display: flex;
  justify-content: flex-start;
}

.skills-lottie {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
}

.skills-lottie dotlottie-player {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1;
  filter: drop-shadow(0 0 10px #bfff0044);
}

.skills-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 160px;
  margin-bottom: 32px;
 /* keep scanner glow and tracks contained */
}
.skills-right{
  margin-left: 8px;
}

.skills-left, .skills-right {
  display: flex;
  gap: 0;
  flex: none;
  overflow: hidden;
  min-width: 0;
  padding-bottom: 8px;
  position: relative;
  width: 100%;
  scrollbar-width: none; /* Firefox */
}



.skills-left::-webkit-scrollbar, .skills-right::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.skills-left .skills-track,
.skills-right .skills-track {
  display: flex;
  gap: 24px;
  animation: skillMarquee 16s linear infinite;
}

.skills-left .skill, .skills-right .skill {
  min-width: 80px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  background: #222;
  box-shadow: 0 2px 12px #0008;
  flex: none;
  position: relative;
}

@keyframes skillMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.skills-left .skill, .skills-right .skill {
  min-width: 80px;
  margin: 1px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  background: #222;
  box-shadow: 0 2px 12px #0008;
  flex: none;
  position: relative;
  /* animation: skillSlide 8s linear infinite; */
}

@keyframes skillSlide {
  0% { transform: translateX(100%); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateX(-100%); opacity: 0; }
}
.skills-left .skill {
  color: #C0FF00;
  filter: none;
}
.skills-right .skill {
  color: #888;
  filter: grayscale(1) brightness(0.7);
}
.skills-scanner {
  width: 5px;
  height: 120px;
  background: linear-gradient(180deg, #1FDF64 0%, #C0FF00 100%);
  border-radius: 4px;
  z-index: 2;
  position: relative;
  margin: 0 1px;
   animation: scannerGlow 0.2s infinite alternate;
}

@keyframes scannerGlow {
  0% { box-shadow: 0 0 2px 2px #C0FF00, 0 0 8px 4px #1FDF6444; }
  100% { box-shadow: 0 0 4px 4px #1FDF64cc, 0 0 16px 8px #1FDF6444; }
}
@keyframes moveSkill {
  0% { transform: translateX(100px); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateX(-100px); opacity: 0; }
}
:root {
	--bg: #0a1628; /* dark teal/navy */
	--bg-elev: #0f2033;
	--text: #ffffff;
  --adi:#C0FF00;
	--muted: #8FA3B0; /* secondary text */
	--accent: #00ED64; /* neon green */
	--accent-2: #1FDF64;
	--border: #1a2a3d;
	--shadow: 0 10px 30px rgba(0, 237, 100, 0.08);
	--radius: 12px;
  --header-h: 64px;
  --skill-accent: var(--accent); /* green accent for skill gauges */
  --scroll-thumb: rgb(70, 78, 90);
  --scroll-thumb-hover: rgb(84, 198, 129);
  --scroll-track: rgba(255,255,255,0.08);
}

* { box-sizing: border-box; }
html, body { height: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
	color: var(--text);
	background-color: var(--bg);
	background-image:
		radial-gradient(1000px 600px at 10% -10%, rgba(0,237,100,0.07), transparent 60%),
		radial-gradient(700px 500px at 90% 0%, rgba(31,223,100,0.06), transparent 60%);
	background-repeat: no-repeat;
	background-attachment: fixed;
	background-size: cover;
}

/* Custom scrollbar accent */
html {
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
  scrollbar-width: thin;
}

::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--scroll-track);
}

::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.12);
  transition: background 180ms ease;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-thumb-hover);
}

@media (max-width: 700px) {
  html {
    scrollbar-width: none;
  }

  ::-webkit-scrollbar {
    width: 0;
    height: 0;
  }
  
}

.container { max-width: 1100px; padding: 0 24px; margin: 0 auto; }
.skip-link {
	position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus { left: 24px; top: 12px; width: auto; height: auto; padding: 8px 12px; background: var(--accent); color: #002415; border-radius: 8px; }

.site-header { position: sticky; top: 0; backdrop-filter: blur(6px); background: rgba(10,22,40,0.6); border-bottom: 1px solid var(--border); z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.brand .logo { color: var(--accent); text-shadow: 0 0 10px rgba(0,237,100,0.6); }
.brand-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: 0 0 0 1px rgba(0, 237, 63, 0.1);
}
.brand-name { color: var(--text); text-decoration: none; font-size: 18px; }
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle:hover { background: rgba(255,255,255,0.06); }

.nav-toggle-icon {
  position: relative;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  display: block;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.nav-toggle-icon::before { top: -6px; }
.nav-toggle-icon::after { top: 6px; }

.site-nav a { color: var(--muted); text-decoration: none; margin-left: 20px; padding: 8px 12px; border-radius: 8px; transition: 150ms ease; }
.site-nav a:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.site-nav .cta { color: #002415; background: var(--accent); box-shadow: var(--shadow); }
.site-nav .cta:hover { transform: translateY(-1px); }

.hero {
  padding: 72px 0;
  border-bottom: 1px solid var(--border);
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  display: flex;
  align-items: center;
}
.hero-title { font-size: 40px; line-height: 1.2; margin: 0 0 8px; }
.hero-sub { color: var(--muted); margin: 0 0 16px; font-size: clamp(18px, 2.2vw, 26px); line-height: 1.3; }
.hero-bio { color: var(--muted); max-width: 720px; }
.accent { color: var(--accent); }
.hero-actions { display: flex; gap: 12px; margin-top: 20px; }
/* Mobile: center and stack hero action buttons */
@media (max-width: 600px) {
  .hero-actions {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
  }
  .hero-actions .btn {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }
  

  
}

/* Stabilize spacing between name and role using flex gap */
.hero-content { display: flex; flex-direction: column; gap: 12px; }
.hero-content .hero-title, .hero-content .hero-sub { margin: 0; }
/* Reserve a line height to avoid layout shift while typing */
.hero-sub { min-height: 1.3em; }
/* Adjust vertical spacing when role is visible vs not */
.hero-content.role-on { gap: 16px; }
.hero-content.role-off { gap: 8px; }
/* Wow look: shimmering name accent and neon role pulse */
.hero-title .accent {
  background: linear-gradient(90deg, #00ED64, #1FDF64, #C0FF00);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: title-shine 4s linear infinite;
}

@keyframes title-shine {
  0% { background-position: 0% center; }
  100% { background-position: -200% center; }
}

.hero-sub.typing-active {
  color: var(--accent);
  text-shadow: 0 0 6px rgba(0,237,100,0.55), 0 0 16px rgba(0,237,100,0.25);
  animation: neonPulse 1.6s ease-in-out infinite;
}

@keyframes neonPulse {
  0% { text-shadow: 0 0 4px rgba(0,237,100,0.35), 0 0 10px rgba(0,237,100,0.18); }
  40% { text-shadow: 0 0 10px rgba(0,237,100,0.65), 0 0 24px rgba(0,237,100,0.30); }
  100% { text-shadow: 0 0 5px rgba(0,237,100,0.40), 0 0 14px rgba(0,237,100,0.20); }
}

/* Hero avatar layout */
.hero-grid { display: grid; grid-template-columns: 1fr; align-items: center; gap: 24px; }
.hero-avatar { display: flex; align-items: center; justify-content: center; }
.hero-avatar img {
  width: clamp(220px, 26vw, 300px); height: clamp(220px, 26vw, 300px); border-radius: 50%;
	border: 2px solid var(--border);
	box-shadow: 0 0 0 6px rgba(0,237,100,0.12), 0 12px 32px rgba(0, 237, 100, 0.08);
	background: radial-gradient(60% 60% at 50% 30%, rgba(0,237,100,0.10), transparent 60%), var(--bg-elev);
}

/* Floating scroll-to-home button (bottom-right) */
.scroll-home {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15, 32, 51, 0.78);
  backdrop-filter: blur(10px);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(0,0,0,0.30), 0 0 0 1px rgba(0,237,100,0.10) inset;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: 180ms ease;
}

.scroll-home.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.scroll-home:hover {
  transform: translateY(-1px);
  border-color: rgba(0,237,100,0.35);
}

@media (max-width: 700px) {
  .scroll-home { right: 14px; bottom: 14px; width: 44px; height: 44px; }
}

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 10px; text-decoration: none; border: 1px solid var(--border); color: var(--text); background: rgba(255,255,255,0.02); transition: 150ms ease; }
.btn:hover { background: rgba(255,255,255,0.06); transform: translateY(-1px); }
.btn.primary { background: var(--accent); color: #002415; border-color: transparent; box-shadow: var(--shadow); }
/* Home hero "View Projects" button uses adi color */
.hero-actions .btn.primary { background: var(--adi); border-color: transparent; color: #002415; box-shadow: var(--shadow); }
.btn.primary:hover { filter: saturate(1.1); }
.btn.ghost { background: transparent; }

/* Home hero buttons: round corners to 30% */
.hero-actions .btn { border-radius: 40px }

/* Contact form submit button: larger radius and stronger hover */
.form-actions .btn.primary { border-radius: 40px; }
.form-actions .btn.primary:hover { transform: translateY(-2px); filter: saturate(1.12) brightness(1.02); }

/* Download CV "wow" styling */
#cv-download {
  border-color: var(--accent-2);
  color: var(--accent-2);
  box-shadow: 0 8px 22px rgba(31, 223, 100, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: 180ms ease;
}



/* Photo-like Action Buttons (green theme) */
.action-btn { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; border-radius: 16px; padding: 5px 9px; border: 1px solid var(--border); transition: 180ms ease; position: relative; }
.action-btn .btn-label { font-weight: 200;font-size: 10px; }
.action-btn .btn-icon { width: 8px; height: 8px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.action-btn .btn-icon svg { width: 14px; height: 14px; fill: currentColor; }
/* Font Awesome icon sizing inside action buttons */
.action-btn .btn-icon i { font-size: 12px; line-height: 1; color: currentColor; }
.action-btn:focus-visible { box-shadow: 0 0 0 3px rgba(0,237,100,0.6); }
.action-btn:hover { transform: translateY(-1px); }

/* Solid (accent) variant */
.action-btn.solid { background: linear-gradient(180deg, var(--accent), var(--accent-2)); color: #ffffff; border-color: transparent; box-shadow: 0 8px 22px rgba(0,237,100,0.28), inset 0 1px 0 rgba(255,255,255,0.35); }
.action-btn.solid .btn-icon { background: rgba(0,0,0,0.18); box-shadow: inset 0 1px 2px rgba(255,255,255,0.25), 0 2px 6px rgba(0,0,0,0.25); }
.action-btn.solid .btn-icon svg { fill: currentColor; }

/* Soft (dark) variant */
.action-btn.soft { background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02)); color: var(--accent); border-color: var(--border); box-shadow: 0 6px 18px rgba(0,0,0,0.25); }
.action-btn.soft .btn-icon { background: rgba(0,0,0,0.35); box-shadow: inset 0 1px 2px rgba(255,255,255,0.15), 0 2px 6px rgba(0,0,0,0.35); }
.action-btn.soft .btn-icon svg { fill: var(--accent); }

.section { padding: 56px 0; }
.section-title { font-size: 24px; margin: 0 0 20px; position: relative; text-align: center; }
.section-title::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); bottom: -8px; width: 72px; height: 2px; background: linear-gradient(90deg, var(--accent), transparent); }

/* Avoid sticky header covering anchor targets (#home, #about, etc.) */
section[id] { scroll-margin-top: calc(var(--header-h) + 8px); }
#home { scroll-margin-top: var(--header-h); }

.section-desc {
  margin: -6px auto 18px;
  max-width: 920px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}

.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.card { grid-column: span 12; background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 0 rgba(255,255,255,0.02); transition: 200ms ease; }
.card:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0,0,0,0.25), 0 0 0 1px rgba(0,237,100,0.06) inset; }
.card-media { background: #0b1b2d; display: grid; place-items: center; border-bottom: 1px solid var(--border); }
.card-body { padding: 16px; }
.card-title { margin: 0 0 6px; font-size: 18px; }
.card-desc { margin: 0 0 10px; color: var(--muted); }
.card-date { font-size: 12px; color: var(--muted); margin: 1px 0 2px; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0 8px; }
.tag { font-size: 9px; color: var(--text); border: 1px solid var(--adi); background: rgba(255,255,255,0.02); padding: 4px 8px; border-radius: 999px; }
.card-actions { display: flex; gap: 12px; margin-top: 10px; }

.about { display: grid; grid-template-columns: 1fr; gap: 16px; color: var(--muted); justify-items: center; text-align: center; }

/* About + Education/Experience cards */
.about-text { color: var(--muted); line-height: 1.7; margin: 0; max-width: 820px; }
.about-skills { margin: 8px; color: var(--text); font-weight: 700; }

.about-skills.typed { margin-top: -8px; }
.typewriter {
  display: inline-block;
  border-right: 2px solid currentColor;
  padding-right: 6px;
  white-space: nowrap;
  animation: caret-blink 1s steps(1) infinite;
}

@keyframes caret-blink {
  0%, 50% { border-right-color: currentColor; }
  51%, 100% { border-right-color: transparent; }
}

.about-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 50px;
	justify-items: center;
}

/* Skills terminal (one-line) */
.skills-terminal {
  margin: 10px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
  box-shadow: 0 10px 28px rgba(0,0,0,0.28);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

.skills-terminal-code {
  white-space: nowrap;
}

.terminal-spinner {
  margin-left: 6px;
  color: var(--accent);
}

/* Skills buttons */
.skills-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 0;
  justify-content: center;
}

.skill-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, rgba(0, 237, 100, 0.08), rgba(31, 223, 100, 0.05));
  border: 1px solid var(--accent);
  border-radius: 30px;
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 237, 100, 0.15);
}

.skill-button i { font-size: 16px; color: var(--accent); }

.skill-button:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(0, 237, 100, 0.15), rgba(31, 223, 100, 0.1));
  box-shadow: 0 6px 18px rgba(0, 237, 100, 0.25);
  border-color: var(--accent-2);
}

.info-card { width: 100%; max-width: 920px; }

.info-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px 18px 16px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.28);
  text-align: left;
}

.info-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.info-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(0,237,100,0.10);
  border: 1px solid rgba(0,237,100,0.22);
}

.info-icon svg {
  width: 18px;
  height: 18px;
  fill: var(--accent);
}

.info-icon i {
  font-size: 18px;
  color: var(--accent);
}

.info-card-title {
  margin: 0;
  font-size: 26px;
  letter-spacing: 0.2px;
  color: var(--text);
  text-align: left;
}

.info-card-body { display: grid; gap: 14px; }

.info-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: baseline;
}

.info-main { color: var(--accent);opacity: 0.8; font-weight: 800; }
.info-main .info-bullet { margin-right: 8px; color: var(--accent); opacity: 0.9; }
.info-sub { color: var(--text); opacity: 0.8; margin-top: 8px; }
.info-date { color: var(--muted); white-space: nowrap; font-size: 14px; }

/* Experience timeline */
.timeline { display: grid; gap: 16px; }

.timeline-item {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 14px;
  align-items: center\;
}

.timeline-marker {
  position: relative;
  width: 18px;
  height: 100%;
  display: flex;
  justify-content: center;
}

.timeline-marker::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: rgba(0,237,100,0.10);
  box-shadow: 0 0 0 4px rgba(0,237,100,0.08);
}

.timeline-marker::after {
  content: "";
  position: absolute;
  top: 14px;
  bottom: -18px;
  width: 2px;
  background: rgba(255,255,255,0.12);
}

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

.timeline-main { color: var(--accent);opacity: 0.8; font-weight: 800; }
.timeline-main .info-bullet { margin-right: 8px; color: var(--accent); opacity: 0.9; }
.timeline-date { color: var(--muted); white-space: nowrap; font-size: 14px; }
.contact { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.contact a { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; border: 1px solid var(--border); padding: 10px 14px; border-radius: 12px; background: rgba(255,255,255,0.02); }
.contact a:hover { background: rgba(255,255,255,0.06); }
.contact svg { width: 18px; height: 18px; fill: var(--accent); }
/* Font Awesome icons in contact links */
.contact i { font-size: 18px; color: var(--accent); line-height: 1; }

/* Skills (circular gauges) */
@property --prog { syntax: '<number>'; inherits: false; initial-value: 0; }

.skill-center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 1; color: #cfd8e3; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.9; }
.skill-center i { font-size: 36px; color: #cfd8e3; opacity: 0.95; }
.skill-center img { width: 44px; height: 44px; object-fit: contain; opacity: 0.9; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35)); }
.skill-name { color: var(--text); opacity: 0.9; }

/* Mobile: force three columns for detailed skills */
@media (max-width: 600px) {
  #skills-list.skills-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .skill-card { gap: 8px; padding: 6px; }
  .skill-center i { font-size: 30px; }
  .skill-center img { width: 34px; height: 34px; }
  .skill-name { font-size: 13px; }
}

/* Contact form */
.form { margin-top: 24px; background: rgba(10,22,40,0.70); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: 0 1px 0 rgba(255,255,255,0.02); max-width: 760px; margin-left: auto; margin-right: auto; }
.doodle-fx {
  transition: opacity 400ms ease;
}

#doodle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: -1;
  opacity: 0;
  transition: opacity 400ms ease;
}
.form-row { display: grid; gap: 8px; margin-bottom: 14px; }
.form-row label { color: var(--muted); font-size: 14px; }
.form-row input, .form-row textarea {
	background: rgba(255,255,255,0.02);
	border: 1px solid var(--border);
	border-radius: 10px;
	color: var(--text);
	padding: 10px 12px;
	font: inherit;
}
.form-row input::placeholder, .form-row textarea::placeholder { color: #7e8e9c; }
.form-actions { display: flex; align-items: center; gap: 12px; margin-top: 8px; justify-content: center; flex-wrap: wrap; }
.form-note { color: var(--muted); margin: 0; }

/* Wow validation styles */
.form-row { position: relative; }
.form-row input:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--border);
  box-shadow: none;
}
.form-row.is-valid input, .form-row.is-valid textarea {
  border-color: var(--border);
  box-shadow: none;
}
.form-row.is-error input, .form-row.is-error textarea {
  border-color: var(--border);
  box-shadow: none;
}
.field-error {
  color: #ff9c9c;
  font-size: 12px;
  line-height: 1.3;
  opacity: 0.95;
}

/* Collapse when empty so no extra space remains */
.field-error:empty { display: none; }
.field-error:not(:empty) { display: block; margin-top: 4px; }

/* Hide error while the field is focused/being edited */
.form-row:focus-within .field-error { display: none; }

@keyframes shakeX {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-8px); }
  30% { transform: translateX(8px); }
  45% { transform: translateX(-6px); }
  60% { transform: translateX(6px); }
  75% { transform: translateX(-3px); }
}
.form.shake {
  animation: shakeX 420ms ease;
  border-color: #ff6b6b;
  box-shadow: 0 0 0 1px rgba(255,107,107,0.14), inset 0 0 0 1px rgba(255,107,107,0.25);
}

.site-footer { border-top: 1px solid var(--border); padding: 32px 0 28px; color: var(--muted); text-align: center; background: var(--bg); }
.footer-brand { margin: 0 0 12px; font-size: 24px; color: var(--accent); text-shadow: 0 0 10px rgba(0,237,100,0.40); font-weight: 700; }
.footer-inner { display: grid; gap: 12px; justify-items: center; }
.footer-nav { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.footer-nav a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 8px; transition: 150ms ease; }
.footer-nav a:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.footer-social { display: flex; gap: 18px; justify-content: center; }
.social-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--border); background: rgba(255,255,255,0.02); color: var(--muted); box-shadow: inset 0 1px 2px rgba(255,255,255,0.08), 0 6px 18px rgba(0,0,0,0.28); transition: 180ms ease; }
.social-btn:hover { color: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px rgba(0,237,100,0.10), inset 0 1px 2px rgba(255,255,255,0.18); transform: translateY(-1px); }
.social-btn i { font-size: 18px; line-height: 1; }
.footer-divider { border: 0; height: 1px; background: var(--border); max-width: 900px; margin: 14px auto 10px; opacity: 0.5; }
.footer-copy { color: var(--muted); margin: 0; font-size: 14px; }

@media (min-width: 700px) {
	.hero { padding: 96px 0; }
	.hero-title { font-size: 56px; }
	.hero-grid { grid-template-columns: 1.2fr 0.8fr; }
  .hero-avatar img { width: clamp(260px, 24vw, 340px); height: clamp(260px, 24vw, 340px); }
	.grid .card { grid-column: span 6; }
}

@media (max-width: 700px) {
  :root { --header-h: 56px; }

  /* Mobile: show avatar first, then content */
  .hero-grid { grid-template-columns: 1fr; grid-template-areas: "avatar" "content"; }
  .hero-avatar { grid-area: avatar; }
  .hero-content { grid-area: content; }

  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 0;
    gap: 10px;
  }

  .nav-toggle { display: inline-flex; }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 10px 0 6px;
    border-top: 1px solid var(--border);
  }

  .site-header.nav-open .site-nav { display: flex; }

  .site-nav a {
    margin-left: 0;
    text-align: center;
    padding: 10px 12px;
  }
}

@media (min-width: 1000px) {
	.grid .card { grid-column: span 4; }
}

/* Focus styles */
a, button { outline: none; }
a:focus-visible, button:focus-visible { box-shadow: 0 0 0 3px rgba(0,237,100,0.35); border-radius: 10px; }

/* Container for the 3D effect */
#projects-grid {
  display: flex;
  /* Show ~3 cards on desktop without scrolling */
  gap: 24px;
  padding: 70px 0;
  /* Extra side space prevents hover-scale from clipping at edges */
  padding-inline: 40px;
  scroll-padding-inline: 40px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  perspective: 1000px; /* Essential for 3D depth */
  scroll-behavior: smooth;
  scrollbar-width: none; /* Hide scrollbar for cleaner look */
  position: relative; /* sit above section backdrop */
  z-index: 1;
	justify-content: flex-start;
}

#projects-grid::-webkit-scrollbar {
  display: none;
}

/* Projects section red light backdrop */
#projects {
  position: relative;
  overflow: visible;
}

/* Decorative side images for Projects section */
#projects .projects-side {
  position: absolute;
  top: 70%;
  transform: translateY(-50%);
  width: clamp(140px, 22vw, 180px);
  height: auto;
  pointer-events: auto; /* enable hover/click */
  cursor: pointer;
  z-index: 2; /* above grid for interaction */
  opacity: 0.32; /* subtle by default */
  filter: drop-shadow(0 12px 28px rgba(0,0,0,0.35));
  transition: opacity 160ms ease, transform 160ms ease, filter 160ms ease;
}

#projects .projects-side.left { left: 18px; }
#projects .projects-side.right { right: 18px; }

#projects .projects-side:hover,
#projects .projects-side:focus-visible {
  opacity: 0.6;
  transform: translateY(-50%);
  filter: drop-shadow(0 0 12px rgba(0,237,100,0.45));
}

/* Lit state for right-side photo after first click */
#projects .projects-side.right.is-on {
  opacity: 0.6;
  transform: translateY(-50%);
  filter: drop-shadow(0 0 18px rgba(0,237,100,0.10));
}

@media (max-width: 820px) {
  #projects .projects-side { display: none; }
}



/* Base Card Styling */
.card {
  flex: 0 0 320px;
  min-height: 500px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 20px;
  scroll-snap-align: center;
  position: relative; /* allow pseudo-element shadow outside */
  overflow: visible;  /* override earlier overflow: hidden */
  
  /* The 3D "Cover-flow" look */
  transition: transform 0.5s ease, filter 0.5s ease, box-shadow 0.5s ease;
  transform-style: preserve-3d;
  
  /* Initial state: side cards appear smaller and darker */
  filter: brightness(0.5);
  transform: rotateY(25deg) scale(0.9);
}

/* Border-only sweep overlay */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;              /* glow thickness */
  border-radius: 24px;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(
    120deg,
    rgba(0, 237, 100, 0) 0%,
    rgba(0, 237, 100, 0.08) 38%,
    rgba(0, 237, 100, 0.75) 50%,
    rgba(0, 237, 100, 0.12) 62%,
    rgba(0, 237, 100, 0) 100%
  );
  filter: drop-shadow(0 0 10px rgba(0, 237, 100, 0.35));
  transform: translateX(-28%);

  /* Show only the ring using masks (WebKit + standard) */
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

@keyframes card-border-sweep {
  0% { opacity: 0; transform: translateX(-28%); }
  10% { opacity: 0.9; }
  50% { opacity: 1; transform: translateX(28%); }
  80% { opacity: 0.65; }
  100% { opacity: 0; transform: translateX(48%); }
}

/* Programmatic trigger: left-to-right sweep */
#projects-grid.sweep-left .card::after {
  animation: card-border-sweep 900ms ease both;
  animation-delay: var(--sweep-delay, 0ms);
}

/* Small global pulse on all cards (no transform override) */
@keyframes card-glow-pulse {
  0% {
    box-shadow: 0 1px 0 rgba(255,255,255,0.02);
    border-color: var(--border);
    filter: brightness(0.6);
  }
  50% {
    box-shadow: 0 0 30px rgba(0, 237, 100, 0.22), 0 0 0 1px rgba(0,237,100,0.10) inset;
    border-color: var(--accent);
    filter: brightness(1.0);
  }
  100% {
    box-shadow: 0 1px 0 rgba(255,255,255,0.02);
    border-color: var(--border);
    filter: brightness(0.6);
  }
}

/* Trigger class: quick glow pulse across all cards */
#projects-grid.cards-buzz .card {
  animation: card-glow-pulse 650ms ease both;
}

/* Two-click glow: fast light-up, slow light-down */
@keyframes card-glow-up {
  0% {
    box-shadow: 0 1px 0 rgba(255,255,255,0.02);
    border-color: var(--border);
    filter: brightness(0.6);
  }
  100% {
    box-shadow: 0 0 36px rgba(0, 237, 100, 0.28), 0 0 0 1px rgba(0,237,100,0.12) inset;
    border-color: var(--accent);
    filter: brightness(1.0);
  }
}

@keyframes card-glow-down {
  0% {
    box-shadow: 0 0 36px rgba(0, 237, 100, 0.28), 0 0 0 1px rgba(0,237,100,0.12) inset;
    border-color: var(--accent);
    filter: brightness(1.0);
  }
  100% {
    box-shadow: 0 1px 0 rgba(255,255,255,0.02);
    border-color: var(--border);
    filter: brightness(0.6);
  }
}

#projects-grid.cards-on .card {
  animation: card-glow-up 300ms ease-out forwards;
}

#projects-grid.cards-fade .card {
  animation: card-glow-down 1500ms ease-out forwards;
}

/* Front-bottom ground shadow (elliptical) */
.card::before {
  content: "";
  position: absolute;
  left: 54%; /* slight right bias to match reference */
  bottom: -28px;
  width: 150%;
  height: 20px;
  transform: translateX(-50%);
  pointer-events: none;
  
  /* Soft ellipse fading to transparent */
  background: radial-gradient(50% 120% at 50% 50%, rgba(0, 0, 0, 0.45) 0%, rgba(0,0,0,0.35) 35%, rgba(0,0,0,0) 70%);
  filter: blur(14px);
  opacity: 2.8;
}

/* Hide ground shadow when card is hovered/focused */
.card:hover::before,
.card:focus-within::before {
  opacity: 0;
  filter: none;
}

/* Card Media/Image */
.card-media img {
  width: 100%;
  height: auto; /* base: allow mobile overrides */
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

/* Active/Hover logic for modern browsers */
/* This ensures the card in the center (or hovered) stands out */
.card:hover, 
.card:focus-within {
  filter: brightness(1);
  transform: rotateY(0deg) scale(1.1);
  z-index: 5;
  border-color: var(--accent);
  box-shadow: 0 0 30px rgba(0, 237, 100, 0.2);
}

/* Add a gradient overlay to match the image style */
.card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-title {
  font-size: 1.5rem;
  color: var(--text);
  margin: 0;
}

.card-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Mobile: smaller project cards and tighter grid spacing */
@media (max-width: 600px) {
  /* Reduce horizontal padding and gaps for the carousel */
  #projects-grid {
    gap: 16px;
    padding: 40px 0;
    padding-inline: 20px;
  }

  /* Shrink card footprint */
  .card {
    flex: 0 0 240px;
    min-height: 200px;
    max-height: 230px;
    padding: 14px;
    border-radius: 20px;
    transform: none;
    overflow: hidden;
  }

  /* Slightly smaller media area inside cards */
  .card-media img {
    height: 150px;
    border-radius: 14px;
    margin-bottom: 14px;
  }

  /* Clamp description; expand on tap/focus */
  .card-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .card:focus-within,
  .card:active {
    max-height: none;
    overflow: visible;
  }

  .card:focus-within .card-desc,
  .card:active .card-desc {
    -webkit-line-clamp: unset;
    overflow: visible;
  }

  /* Disable global hover so only the active card animates */
  .card:hover,
  .card:focus-within {
    transform: scale(1.03);
    box-shadow: 0 8px 20px rgba(0,0,0,0.22), 0 0 0 1px rgba(0,237,100,0.05) inset;
    border-color: var(--accent);
  }

  /* Active (centered/visible) card gets the half-hover baseline */
  .card.card--active {
    transform: rotateY(6deg) scale(0.96);
    box-shadow: 0 8px 20px rgba(0,0,0,0.22), 0 0 0 1px rgba(0,237,100,0.05) inset;
  
  }

  /* Tap/click/keyboard on the active card unlocks the full hover */
  .card.card--active:hover,
  .card.card--active:focus-within,
  .card.card--active:active,
  .card.card--active:focus-visible {
    transform: rotateY(0deg) scale(1.06);
    box-shadow: 0 12px 28px rgba(0,0,0,0.26), 0 0 0 1px rgba(0,237,100,0.08) inset;
    border-color: var(--accent);
  }
}

/* Desktop-only: enforce 16:9 media and taller wow cards */
@media (min-width: 1000px) {
  .card-media {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 16px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
  }
  .card-media img {
    height: 100%;
    margin-bottom: 0;
  }
  .card {
    min-height: 520px;
  }
}

/* Mobile (≤820px): show and reposition side images with smaller size */
@media (max-width: 820px) {
  /* Ensure images are visible and sized down for UX */
  #projects .projects-side {
    display: inline-block; /* overrides earlier display:none */
    width: clamp(60px, 20vw, 90px);
    height: auto;
    transform: none; /* cancel desktop Y-translate */
    opacity: 0.4; /* subtler on mobile */
    z-index: 5; /* above grid so taps register */
    pointer-events: auto;
    touch-action: manipulation;
  }

  /* Left image: bottom-left of the Projects section */
  #projects .projects-side.left {
    margin: 10px;
    left: 12px;
    bottom: 0px;
    top: auto;
    
  }

  /* Right image: top-right of the Projects section */
  #projects .projects-side.right {
    margin: 10px;
    right: 12px;
    top: 150px;
    bottom: 10px;
   
  }

  /* Prevent hover/click from moving images on mobile */
  #projects .projects-side:hover,
  #projects .projects-side:focus-visible,
  #projects .projects-side.right.is-on {
    transform: none !important;
  }

  /* Mobile: reserve right-side space in scroller for .projects-side.right */
  #projects-grid {
    padding-inline-end: calc(clamp(60px, 20vw, 90px) + 16px);
    scroll-padding-inline-end: calc(clamp(60px, 20vw, 90px) + 16px);
  }
  #projects-grid {
    gap: 12px;
    padding: 10px 0;
    padding-inline: 2px;
  }
  
  
}

/* Popup Overlay */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 40, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Popup Card */
.popup-card {
  background: var(--bg-elev);
  border: 1px solid var(--accent);
  padding: 40px;
  border-radius: 24px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 237, 100, 0.2);
  transform: scale(0.8);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.popup-overlay.active .popup-card {
  transform: scale(1);
}

/* Checkmark Animation */
.checkmark {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: block;
  stroke-width: 3;
  stroke: var(--accent);
  stroke-miterlimit: 10;
  margin: 0 auto 20px;
  box-shadow: inset 0px 0px 0px var(--accent);
  animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}

.checkmark__circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 3;
  stroke-miterlimit: 10;
  stroke: var(--accent);
  fill: none;
  animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark__check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke { 100% { stroke-dashoffset: 0; } }
@keyframes scale { 0%, 100% { transform: none; } 50% { transform: scale3d(1.1, 1.1, 1); } }
@keyframes fill { 100% { box-shadow: inset 0px 0px 0px 40px rgba(0, 237, 100, 0.1); } }


/* Hacker Animation Background */
#hacker-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  /* Covers Home (100vh) + roughly half of About (~300px) */
  height: calc(100vh + 400px); 
  z-index: -1; /* Behind everything */
  pointer-events: none; /* Allows clicking on buttons/links */
  opacity: 0.15; /* More subtle */
  mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
}

/* Code Rain Animation Background */
#code-rain-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  /* Covers Home (100vh) and about 450px of the About section */
  height: calc(100vh + 450px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.15; /* More subtle so text stays readable */
  mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
}


/* Ensure sections are relative so the canvas stays at the top */
body {
  position: relative;
  overflow-x: hidden;
}

/* Another canvas */
#grid-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 140vh;
  z-index: -1;
  pointer-events: none;
  opacity: 0.4; /* Reduced for subtler grid */
  mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
}

.scroll-home-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  color: var(--accent);
}

.scroll-home-icon i {
  font-size: 18px;
}
















