:root {
  --bg: #f7f9fc;
  --bg-soft: #eef3f9;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-strong: rgba(255, 255, 255, 0.96);
  --panel-border: rgba(59, 130, 246, 0.14);
  --text: #243447;
  --text-soft: #5f6f82;
  --heading: #0f172a;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.1);
  --danger: #e85d75;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  --radius: 22px;
  --container: 1160px;
  --header-height: 76px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 22%),
    radial-gradient(circle at 85% 10%, rgba(14, 165, 233, 0.07), transparent 18%),
    linear-gradient(180deg, #fbfcfe 0%, #f4f7fb 50%, #eef3f9 100%);
  line-height: 1.65;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.92), transparent 82%);
  pointer-events: none;
  opacity: 0.4;
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(transparent 0, rgba(15, 23, 42, 0.04) 50%, transparent 100%);
  background-size: 100% 5px;
  opacity: 0.06;
  pointer-events: none;
  z-index: -1;
}

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

button,
input,
textarea {
  font: inherit;
}

svg {
  display: block;
}

.container {
  width: min(var(--container), calc(100% - 1.5rem));
  margin: 0 auto;
}

.section {
  padding: 5rem 0;
  scroll-margin-top: calc(var(--header-height) + 16px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--header-height);
  border-bottom: 1px solid transparent;
  transition: background 180ms ease, border-color 180ms ease, backdrop-filter 180ms ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(148, 163, 184, 0.18);
  backdrop-filter: blur(18px);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-height);
}

.brand,
.hero-command,
.section-label,
.hero-title,
.hero-typewriter,
.terminal-body,
.nav-menu a,
.btn,
.badge-list span,
.tech-stack,
.timeline-date {
  font-family: "JetBrains Mono", monospace;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-mark,
.avatar {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 14px;
  color: var(--accent);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(255, 255, 255, 0.98));
  box-shadow: inset 0 0 18px rgba(37, 99, 235, 0.06);
  font-weight: 700;
}

.brand-copy {
  display: flex;
  flex-direction: column;
}

.brand-copy strong {
  font-size: 0.95rem;
  color: var(--heading);
  letter-spacing: 0.08em;
}

.brand-copy span {
  color: var(--text-soft);
  font-size: 0.78rem;
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.28rem;
  width: 2.9rem;
  height: 2.9rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--heading);
}

.nav-toggle span {
  width: 1.1rem;
  height: 2px;
  margin: 0 auto;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(0.38rem) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-0.38rem) rotate(-45deg);
}

.nav-menu {
  position: absolute;
  top: calc(100% + 0.65rem);
  left: 0.75rem;
  right: 0.75rem;
  display: grid;
  gap: 0.35rem;
  padding: 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(-0.5rem);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

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

.nav-menu a {
  padding: 0.9rem 1rem;
  border-radius: 12px;
  color: var(--text-soft);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-menu a:hover,
.nav-menu a:focus-visible,
.nav-menu a.is-active {
  color: var(--accent);
  background: rgba(37, 99, 235, 0.08);
}

.hero {
  min-height: calc(100vh - var(--header-height));
  display: grid;
  align-items: center;
  padding-top: 2rem;
}

.hero-layout,
.contact-grid,
.section-grid {
  display: grid;
  gap: 1.5rem;
}

.hero-layout {
  grid-template-columns: 1.2fr 0.88fr;
  align-items: center;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1rem;
  color: var(--accent);
  font-size: 0.84rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.status-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
  background: var(--accent-strong);
  box-shadow: 0 0 16px rgba(37, 99, 235, 0.3);
}

.hero h1,
.section-heading h2 {
  margin: 0;
  color: var(--heading);
  letter-spacing: -0.04em;
}

.hero h1 {
  font-size: clamp(2.8rem, 8vw, 5.7rem);
  line-height: 0.95;
}

.hero-title {
  margin: 1rem 0 0;
  color: var(--text);
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-typewriter {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 1.4rem 0 1rem;
  padding: 0.6rem 0;
  color: var(--accent);
  font-size: clamp(1rem, 2vw, 1.1rem);
  font-weight: 600;
}

.hero-summary,
.section-heading p,
.about-panel p,
.project-card li,
.contact-list a,
.contact-form label {
  color: var(--text-soft);
}

.hero-summary {
  max-width: 42rem;
  margin: 0;
  font-size: 1.04rem;
}

.hero-actions,
.social-links,
.about-meta,
.contact-list,
.badge-list,
.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.hero-actions {
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.85rem 1.2rem;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.2);
}

.btn-secondary {
  border-color: rgba(37, 99, 235, 0.22);
  background: rgba(37, 99, 235, 0.06);
  color: var(--accent);
}

.btn-ghost {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.65);
  color: var(--text);
}

.social-links {
  margin-top: 1.75rem;
}

.social-links a,
.contact-list a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.social-links a {
  padding: 0.7rem 0.95rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--text-soft);
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.social-links a:hover,
.social-links a:focus-visible,
.contact-list a:hover,
.contact-list a:focus-visible {
  color: var(--accent);
}

.social-links svg {
  width: 1rem;
  height: 1rem;
}

.panel,
.terminal-card {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(240, 249, 245, 0.92));
  box-shadow: var(--shadow);
}

.panel {
  padding: 1.5rem;
}

.terminal-card {
  overflow: hidden;
}

.terminal-topbar {
  display: flex;
  gap: 0.55rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(241, 250, 246, 0.95);
}

.terminal-topbar span {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 999px;
}

.terminal-topbar span:nth-child(1) {
  background: var(--danger);
}

.terminal-topbar span:nth-child(2) {
  background: #fbbf24;
}

.terminal-topbar span:nth-child(3) {
  background: var(--accent-strong);
}

.profile-card {
  padding: 1.6rem;
}

.profile-card-head {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.2rem;
}

.avatar.large {
  width: 4.2rem;
  height: 4.2rem;
  border-radius: 18px;
  font-size: 1.25rem;
}

.profile-kicker {
  margin: 0 0 0.35rem;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-card h2 {
  margin: 0;
  color: var(--heading);
  font-size: 1.45rem;
}

.profile-subtitle {
  margin: 0.35rem 0 0;
  color: var(--text-soft);
}

.profile-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 1.2rem 0;
}

.profile-stat {
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.92);
}

.profile-stat strong {
  display: block;
  color: var(--heading);
  font-size: 1.08rem;
}

.profile-stat span {
  color: var(--text-soft);
  font-size: 0.86rem;
}

.profile-list {
  display: grid;
  gap: 0.9rem;
}

.profile-list span {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-list strong {
  color: var(--text);
  font-weight: 500;
}

.section-heading {
  max-width: 48rem;
  margin-bottom: 2rem;
}

.section-heading h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.05;
}

.section-heading p:last-child {
  margin-top: 1rem;
}

.section-grid {
  grid-template-columns: 0.95fr 1.05fr;
  align-items: center;
}

.about-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.2rem;
  align-items: start;
}

.avatar {
  width: 5rem;
  height: 5rem;
  border-radius: 18px;
  font-size: 1.45rem;
}

.about-meta span,
.badge-list span,
.cert-item,
.tech-stack,
.project-year {
  display: inline-flex;
  align-items: center;
  min-height: 2.2rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.96);
}

.about-meta span,
.tech-stack,
.project-year {
  color: var(--text);
}

.skills-grid,
.projects-grid,
.cert-grid {
  display: grid;
  gap: 1.15rem;
}

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

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

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

.skill-card h3,
.project-card h3,
.timeline-item h3 {
  margin: 0 0 1rem;
  color: var(--heading);
  font-size: 1.1rem;
}

.badge-list span,
.tech-stack,
.timeline-date {
  font-size: 0.8rem;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.card-head a {
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.project-card ul {
  margin: 1rem 0 0;
  padding-left: 1.1rem;
}

.project-card li + li {
  margin-top: 0.7rem;
}

.cert-item {
  justify-content: flex-start;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  color: var(--text);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.cert-item:hover,
.cert-item:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.24);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.timeline {
  position: relative;
  display: grid;
  gap: 1rem;
  max-width: 50rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 1.05rem;
  top: 0.9rem;
  bottom: 0.9rem;
  width: 1px;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.35), rgba(37, 99, 235, 0.04));
}

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

.timeline-dot {
  position: absolute;
  top: 1.45rem;
  left: 0.78rem;
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 999px;
  background: var(--accent-strong);
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.3);
}

.timeline-date {
  width: fit-content;
  margin: 0 0 0.8rem;
  color: var(--accent);
}

.contact-grid {
  grid-template-columns: 0.9fr 1.1fr;
  align-items: start;
}

.contact-list {
  margin-top: 1.2rem;
  flex-direction: column;
  align-items: flex-start;
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.contact-form label {
  display: grid;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 500ms ease, transform 500ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .hero-layout,
  .section-grid,
  .contact-grid,
  .skills-grid,
  .projects-grid,
  .cert-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 1rem;
  }

  .hero-copy,
  .profile-card {
    max-width: 100%;
  }
}

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

  .nav-menu {
    position: static;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 4rem 0;
  }

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

  .hero-summary {
    font-size: 0.98rem;
  }

  .panel,
  .terminal-body {
    padding: 1.15rem;
  }

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

  .social-links a,
  .btn {
    width: 100%;
  }

  .profile-card-head,
  .profile-highlights {
    grid-template-columns: 1fr;
  }

  .profile-card-head {
    display: grid;
  }
}
