:root {
  --bg: #0d1117;
  --bg-alt: #161b22;
  --bg-tertiary: #21262d;
  --ink: #e6edf3;
  --muted: #8b949e;
  --accent: #58a6ff;
  --accent-green: #3fb950;
  --accent-purple: #a371f7;
  --accent-orange: #d29922;
  --card: rgba(22, 27, 34, 0.8);
  --border: rgba(48, 54, 61, 0.6);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  --radius: 12px;
  --max-width: 1160px;
  --nav-height: 72px;
  --font-display: "JetBrains Mono", "Fira Code", monospace;
  --font-body: "IBM Plex Sans", "SF Mono", "Fira Code", monospace;
  --glow: radial-gradient(circle at 30% 20%, rgba(88, 166, 255, 0.08), transparent 60%),
    radial-gradient(circle at 80% 10%, rgba(163, 113, 247, 0.05), transparent 55%),
    radial-gradient(circle at 50% 80%, rgba(63, 185, 80, 0.04), transparent 60%);
}

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

html {
  scroll-behavior: smooth;
  max-width: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 100%;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(88, 166, 255, 0.55) rgba(13, 17, 23, 0.9);
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: rgba(13, 17, 23, 0.9);
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(88, 166, 255, 0.65), rgba(63, 185, 80, 0.45));
  border-radius: 999px;
  border: 2px solid rgba(13, 17, 23, 0.9);
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(88, 166, 255, 0.85), rgba(63, 185, 80, 0.65));
}

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

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

video,
svg,
iframe {
  max-width: 100%;
}

p,
li,
a,
span {
  overflow-wrap: break-word;
  word-break: break-word;
}

.ambient-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
  z-index: 1;
}

.hero {
  position: relative;
  padding: calc(var(--nav-height) + 32px) 20px 80px;
  background: var(--glow);
  overflow: hidden;
  min-height: auto;
}

.hero::after {
  content: "";
  position: absolute;
  inset: -20% -10% 0;
  background: linear-gradient(145deg, rgba(13, 17, 23, 0.4), rgba(13, 17, 23, 0.95));
  z-index: 0;
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: var(--nav-height);
  padding: 0 20px;
  background: rgba(13, 17, 23, 0.82);
  border-bottom: 1px solid rgba(48, 54, 61, 0.7);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.05em;
}

.logo::before {
  content: "</";
  color: var(--accent-green);
  margin-right: 2px;
}

.logo::after {
  content: "/>";
  color: var(--accent-green);
  margin-left: 2px;
}

/* Enhanced Mobile Navigation */
.nav-links {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--bg-alt);
  padding: 24px;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  display: none;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 100;
  max-height: calc(100vh - var(--nav-height));
  overflow-y: auto;
}

.nav.active .nav-links {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.nav-links a {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--ink);
}

.nav-links a:hover {
  color: var(--accent);
}

.menu-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 10;
}

.bar {
  width: 24px;
  height: 2px;
  background-color: var(--ink);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

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

.nav.active .menu-toggle .bar:nth-child(2) {
  opacity: 0;
}

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

.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 60px auto 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.7rem;
  color: var(--accent-green);
  margin: 0;
  font-family: var(--font-body);
}

.eyebrow::before {
  content: "// ";
  color: var(--muted);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  letter-spacing: 0.02em;
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 1.1;
}

.subhead {
  font-size: 1rem;
  color: var(--muted);
  max-width: 560px;
  line-height: 1.7;
  font-family: var(--font-body);
}

.subhead::after {
  content: "_";
  color: var(--accent-green);
  animation: blink 1s step-end infinite;
}

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

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.btn {
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.btn.primary {
  background: linear-gradient(120deg, #238636, #1a7f2e);
  color: #ffffff;
  box-shadow: 0 18px 40px rgba(63, 185, 80, 0.2);
}

.btn.ghost {
  border-color: rgba(48, 54, 61, 0.8);
  color: var(--ink);
  background: var(--bg-tertiary);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 45px rgba(63, 185, 80, 0.25);
}

.hero-metrics {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: 8px;
}

.metric {
  font-size: 1.3rem;
  font-weight: 600;
}

.metric-label {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.section {
  padding: 64px 20px;
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--border);
  scroll-margin-top: calc(var(--nav-height) + 16px);
}

.section:nth-of-type(even) {
  background: var(--bg-alt);
}

.section-heading {
  max-width: var(--max-width);
  margin: 0 auto 36px;
}

.section-heading h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.section-heading p {
  color: var(--muted);
  max-width: 520px;
}

.cards,
.work-grid,
.testimonial-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  gap: 24px;
}

.qualification-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  gap: 24px;
}

.qualification-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.timeline {
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 12px;
}

.timeline-track {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 1fr);
  gap: 18px;
  padding: 18px 8px 8px;
}

.timeline-track::before {
  content: "";
  position: absolute;
  top: 26px;
  left: 8px;
  right: 8px;
  height: 1px;
  background: linear-gradient(90deg, rgba(88, 166, 255, 0.15), rgba(63, 185, 80, 0.4), rgba(88, 166, 255, 0.15));
  z-index: 0;
}

.timeline-item {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  padding: 12px 14px 16px;
  background: rgba(22, 27, 34, 0.55);
  border: 1px solid rgba(48, 54, 61, 0.45);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
}

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(63, 185, 80, 0.18);
}

.timeline-content h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.timeline-company {
  display: block;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
}

.timeline-date {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}

.qualification-card p {
  margin: 8px 0 0;
  color: var(--muted);
}

.certificate-card {
  display: grid;
  gap: 16px;
  align-items: center;
}

.certificate-text p {
  margin: 8px 0 0;
}

.certificate-media {
  justify-self: center;
}

.certificate-media img {
  width: min(360px, 100%);
  border-radius: 10px;
  border: 1px solid rgba(88, 166, 255, 0.25);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
  background: rgba(13, 17, 23, 0.6);
}
.cards {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card,
.work-card,
.testimonial,
.about-panel,
.contact-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover,
.work-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  border-color: rgba(63, 185, 80, 0.4);
}

.work-card:hover .work-image img {
  transform: scale(1.06);
  filter: saturate(1.1) contrast(1.08);
}

.work-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.work-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  border-color: rgba(63, 185, 80, 0.4);
}

.work-image {
  height: 180px;
  width: 100%;
  background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-alt));
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.work-image::after {
  content: "Project Preview";
  color: #888;
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.6;
}

.work-image.has-image::after {
  content: none;
}

.about-meta {
  margin-top: 20px;
  padding: 16px;
  border-radius: 12px;
  background: rgba(15, 18, 24, 0.65);
  border: 1px solid rgba(88, 166, 255, 0.2);
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.95rem;
}

.about-meta strong {
  color: var(--ink);
  font-weight: 600;
}

.work-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
  transition: transform 0.35s ease, filter 0.35s ease;
  filter: saturate(1.05) contrast(1.05);
}

.work-content {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.work-link {
  margin-top: 14px;
  align-self: flex-start;
  padding: 0;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent-green);
  text-decoration: none;
}

.work-link::before {
  content: "// ";
  color: var(--accent-green);
  opacity: 0.75;
}

.work-link:hover {
  text-decoration: underline;
}


.work-content p {
  font-size: 0.95rem;
}

.card h3,
.work-card h3 {
  margin-bottom: 12px;
  font-size: 1.5rem;
}

.card ul {
  padding-left: 18px;
  margin: 18px 0 0;
  color: var(--muted);
}

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

.work-tag {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 6px;
  background: rgba(63, 185, 80, 0.12);
  color: var(--accent-green);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 16px;
  text-align: center;
  font-family: var(--font-body);
}

.work-metrics {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--accent-orange);
}

.work-meta {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.work-meta .work-tag {
  margin-bottom: 0;
  flex: 1 1 auto;
  min-width: 140px;
}

.work-meta .work-link {
  margin-top: 2px;
  margin-left: 0;
}

.about {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  gap: 32px;
}

.about-copy p {
  color: var(--muted);
}

.about-panel {
  display: grid;
  gap: 16px;
}

.about-panel ul {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.about-signature {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.08em;
  color: var(--accent-green);
}

.testimonial-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.testimonial p {
  margin: 0 0 14px;
  color: var(--ink);
}

.testimonial span {
  color: var(--muted);
  font-size: 0.9rem;
}

.contact {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  gap: 32px;
}

.contact-copy p {
  color: var(--muted);
}

.contact-cta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.contact-note {
  color: var(--muted);
  font-size: 0.9rem;
}

.contact-form {
  display: grid;
  gap: 16px;
}

.turnstile-invisible {
  height: 0;
  width: 0;
  overflow: hidden;
}

.contact-form .btn {
  margin-top: 8px;
  width: 100%;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 500;
  font-family: var(--font-body);
  font-size: 0.9rem;
}

label span::before {
  content: "$";
  color: var(--accent-green);
  margin-right: 4px;
}

input,
textarea,
select {
  background: var(--bg-alt);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.95rem;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(63, 185, 80, 0.3);
  border-color: rgba(63, 185, 80, 0.6);
}

.error {
  display: none;
  color: #f85149;
  font-size: 0.8rem;
}

label.invalid .error {
  display: block;
}

.form-note {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0;
  font-family: var(--font-body);
}

.form-note::before {
  content: "<!-- ";
  color: var(--muted);
  opacity: 0.5;
}

.form-note::after {
  content: " -->";
  color: var(--muted);
  opacity: 0.5;
}

.form-note:empty::before,
.form-note:empty::after {
  content: "";
}

/* Skills Section */
.skills-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.skill-category {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  backdrop-filter: blur(12px);
}

.skill-category h3 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-green);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.skill-category h3::before {
  content: ">";
  color: var(--muted);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tags span {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--muted);
  transition: all 0.2s ease;
  font-family: var(--font-body);
}

.skill-tags span:hover {
  background: rgba(88, 166, 255, 0.15);
  border-color: rgba(88, 166, 255, 0.4);
  color: var(--accent);
}

/* Social Links */
.about-cta {
  display: flex;
  gap: 20px;
  margin-top: 24px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.social-link:hover {
  color: var(--accent);
}

.social-link svg {
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.social-link:hover svg {
  opacity: 1;
}

/* Footer */


.footer {
  padding: 48px 24px 64px;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}

.footer .logo {
  display: inline-block;
  margin-bottom: 12px;
}

.footer p {
  font-size: 0.85rem;
}

.footer p::before {
  content: "// ";
  color: var(--accent-green);
}

/* Note: Main reveal animations handled by GSAP, these are fallback styles */
.reveal {
  will-change: transform, opacity;
}

@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }

  .nav-links {
    position: static;
    display: flex;
    flex-direction: row;
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
    opacity: 1;
    transform: none;
    gap: 32px;
  }

  .nav-links a {
    font-size: 0.95rem;
    color: var(--muted);
    font-weight: 400;
    transition: color 0.2s ease;
  }

  .nav-links a:hover {
    color: var(--accent);
  }

  .work-meta {
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
  }

  .work-meta .work-tag {
    flex: 0 0 50%;
  }

  .work-meta .work-link {
    margin-left: auto;
    margin-top: 0;
  }

  .hero {
    padding: 40px 40px 120px;
  }

  .hero-content {
    margin-top: 100px;
    gap: 28px;
  }

  .subhead {
    font-size: 1.15rem;
  }

  .section {
    padding: 80px 40px;
  }

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

  .cards,
  .work-grid,
  .testimonial-grid {
    gap: 24px;
  }

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

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

  .certificate-card {
    grid-template-columns: 1.3fr 0.7fr;
  }

  .certificate-media {
    justify-self: end;
  }

  .timeline-track {
    overflow: visible;
  }

  .work-image {
    height: 220px;
  }

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

  .contact-form .btn {
    width: auto;
  }

  .about {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: start;
    gap: 40px;
  }
}

@media (min-width: 1024px) {
  .hero-content {
    gap: 32px;
  }

  .section {
    padding: 120px 40px;
  }

  .hero-metrics {
    gap: 32px;
  }
}
