:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.7);
  --border: rgba(56, 189, 248, 0.15);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #22d3ee;
  --accent-dim: #0891b2;
  --accent-glow: rgba(34, 211, 238, 0.25);
  --success: #34d399;
  --font-sans: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --radius: 12px;
  --radius-lg: 20px;
  --header-height: 72px;
  --transition: 0.25s ease;
}

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

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

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

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

ul {
  list-style: none;
}

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

.container {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}

.bg-glow--1 {
  width: 480px;
  height: 480px;
  top: -120px;
  right: -80px;
  background: rgba(34, 211, 238, 0.12);
}

.bg-glow--2 {
  width: 400px;
  height: 400px;
  bottom: 10%;
  left: -100px;
  background: rgba(99, 102, 241, 0.1);
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 100;
  background: rgba(10, 14, 23, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.header--scrolled {
  border-color: var(--border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

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

.nav__logo {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--accent);
}

.nav__logo-bracket {
  color: var(--text-muted);
}

.nav__links {
  display: flex;
  gap: 2rem;
}

.nav__links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
  position: relative;
}

.nav__links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav__links a:hover,
.nav__links a:focus-visible {
  color: var(--accent);
}

.nav__links a:hover::after {
  width: 100%;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: transform var(--transition), opacity var(--transition);
}

main {
  position: relative;
  z-index: 1;
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-height) + 3rem) 0 4rem;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--success);
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.25);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}

.hero__status {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

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

.hero__title {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.text-accent {
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
}

.hero__description {
  color: var(--text-secondary);
  max-width: 520px;
  margin-bottom: 2rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: all var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent-dim), var(--accent));
  color: var(--bg-primary);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn--outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text-primary);
}

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn--block {
  width: 100%;
}

.hero__social {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.social-link svg {
  width: 18px;
  height: 18px;
}

.social-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(34, 211, 238, 0.05);
}

.terminal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
}

.terminal__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--border);
}

.terminal__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal__dot--red { background: #ef4444; }
.terminal__dot--yellow { background: #eab308; }
.terminal__dot--green { background: #22c55e; }

.terminal__title {
  margin-left: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.terminal__body {
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.8;
}

.terminal__prompt {
  color: var(--accent);
}

.terminal__output {
  color: var(--text-secondary);
  padding-left: 1rem;
}

.terminal__cursor {
  animation: blink 1s step-end infinite;
  color: var(--accent);
}

@keyframes blink {
  50% { opacity: 0; }
}

.section {
  padding: 6rem 0;
}

.section--alt {
  background: rgba(17, 24, 39, 0.4);
}

.section__header {
  margin-bottom: 3rem;
}

.section__header--sub {
  margin-top: 3rem;
  margin-bottom: 1.5rem;
}

.section__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.section__title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section__subtitle {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  backdrop-filter: blur(8px);
  transition: border-color var(--transition), transform var(--transition);
}

.card:hover {
  border-color: rgba(34, 211, 238, 0.3);
}

.about__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2rem;
  align-items: start;
}

.about__card p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.about__card p:last-child {
  margin-bottom: 0;
}

.about__card strong {
  color: var(--text-primary);
}

.about__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}

.stat__value {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-mono);
}

.stat__label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

.timeline__item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline__item:last-child {
  margin-bottom: 0;
}

.timeline__marker {
  position: absolute;
  left: -2rem;
  top: 1.75rem;
  width: 14px;
  height: 14px;
  background: var(--accent);
  border: 3px solid var(--bg-primary);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--accent-glow);
}

.timeline__date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
}

.timeline__title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0.35rem 0;
}

.timeline__org {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.badge {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge--active {
  background: rgba(52, 211, 153, 0.15);
  color: var(--success);
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.experience__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.experience__card {
  height: 100%;
}

.experience__header {
  margin-bottom: 1.25rem;
}

.experience__date {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.experience__title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.experience__org {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.experience__desc {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.experience__highlights {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.experience__highlights li {
  position: relative;
  padding-left: 1.25rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.experience__highlights li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.experience__cert {
  max-width: 100%;
}

.cert-item__preview {
  position: relative;
}

.cert-item__placeholder {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 180px;
  padding: 1.5rem;
  color: var(--text-muted);
}

.cert-item__placeholder svg {
  width: 40px;
  height: 40px;
  color: var(--accent);
}

.cert-item__preview--placeholder img {
  display: none;
}

.cert-item__preview--placeholder .cert-item__placeholder {
  display: flex;
}

.cert-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.cert-item {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.cert-item--featured {
  border-color: rgba(34, 211, 238, 0.35);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.08), transparent);
}

.cert-item__preview {
  display: block;
  width: 100%;
  border: none;
  background: rgba(0, 0, 0, 0.25);
  cursor: pointer;
  padding: 0;
  text-decoration: none;
  color: inherit;
  transition: background var(--transition);
}

.cert-item__preview:hover {
  background: rgba(34, 211, 238, 0.08);
}

.cert-item__preview img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.cert-item__preview--pdf {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.5rem;
}

.cert-item__pdf-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent);
}

.cert-item__pdf-badge svg {
  width: 28px;
  height: 28px;
}

.cert-item__pdf-title {
  font-weight: 600;
  color: var(--text-primary);
}

.cert-item__body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.cert-item__date {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.cert-item h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.cert-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.cert-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cert-item__view,
.cert-item__verify {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.cert-item__view:hover,
.cert-item__verify:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(34, 211, 238, 0.06);
}

.cert-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.cert-modal[hidden] {
  display: none;
}

.cert-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
}

.cert-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.cert-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  color: var(--text-primary);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.cert-modal__close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.cert-modal__title {
  font-size: 1rem;
  margin-bottom: 1rem;
  padding-right: 2.5rem;
}

.cert-modal__image {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  display: block;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.skill-group__title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1rem;
  font-family: var(--font-mono);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tags li {
  font-size: 0.85rem;
  padding: 0.35rem 0.75rem;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-secondary);
}

.competencies {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.competency {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.competency__icon {
  color: var(--accent);
  font-size: 0.6rem;
}

.languages {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 480px;
}

.language {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: 1rem;
}

.language__name {
  font-weight: 500;
}

.language__bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.language__bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  border-radius: 999px;
}

.language__level {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.contact__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
}

.contact__text {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.contact__links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact__item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  transition: all var(--transition);
  word-break: break-all;
}

.contact__item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--accent);
}

.contact__item:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  background: rgba(34, 211, 238, 0.05);
}

.contact__item--static {
  cursor: default;
}

.contact__item--static:hover {
  border-color: var(--border);
  background: transparent;
  color: var(--text-secondary);
}

.contact__cta h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.contact__cta p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.contact__cta-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer {
  position: relative;
  z-index: 1;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer__social {
  display: flex;
  gap: 1.5rem;
}

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

@media (max-width: 900px) {
  .hero__inner,
  .about__grid,
  .experience__grid,
  .contact__grid {
    grid-template-columns: 1fr;
  }

  .hero__visual {
    order: -1;
  }
}

@media (max-width: 768px) {
  .nav__toggle {
    display: flex;
  }

  .nav__links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(10, 14, 23, 0.98);
    padding: 1.5rem 2rem;
    gap: 1.25rem;
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition), opacity var(--transition);
  }

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

  .nav__toggle--active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav__toggle--active span:nth-child(2) {
    opacity: 0;
  }

  .nav__toggle--active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

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

@media (max-width: 480px) {
  .hero__actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

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