:root {
  --bg: #050816;
  --bg-alt: #070b1f;
  --bg-elevated: #0b1026;
  --fg: #f5f7ff;
  --muted: #a3b1d1;
  --accent: #4f46e5;
  --accent-soft: rgba(79, 70, 229, 0.15);
  --accent-strong: #6366f1;
  --border-subtle: rgba(148, 163, 184, 0.25);
  --danger: #ef4444;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 999px;
  --shadow-soft: 0 22px 45px rgba(15, 23, 42, 0.75);
  --shadow-subtle: 0 12px 30px rgba(15, 23, 42, 0.5);
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: radial-gradient(circle at top left, #111827 0, #020617 40%, #020617 100%);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
}

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

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

.container {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4.5rem 0;
}

.section-alt {
  background: radial-gradient(circle at top right, #0b1120 0, #020617 45%, #020617 100%);
}

.section-inner {
  border-radius: 32px;
  padding: 2.75rem 2.4rem;
  background: linear-gradient(
      145deg,
      rgba(15, 23, 42, 0.95),
      rgba(15, 23, 42, 0.96),
      rgba(23, 37, 84, 0.9)
    );
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(22px);
}

.section-alt .section-inner {
  background: linear-gradient(
      155deg,
      rgba(15, 23, 42, 0.96),
      rgba(15, 23, 42, 0.96),
      rgba(30, 64, 175, 0.88)
    );
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 2.4rem;
}

.section-header h2 {
  font-size: 1.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.25rem;
}

.section-header p {
  margin: 0;
  max-width: 520px;
  color: var(--fg);
  font-size: 0.98rem;
}

/* Header & nav */

.site-header {
  position: relative;
  padding: 1.2rem 0 4rem;
  overflow: hidden;
}

.header-inner {
  position: relative;
  z-index: 1;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: -120px -40%;
  background: radial-gradient(circle at top left, #1d4ed8 0, transparent 55%);
  opacity: 0.35;
  pointer-events: none;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 1.3rem;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: radial-gradient(circle at top left, #020617 0, #020617ee 55%, #020617 100%);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.75);
}

.logo {
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.92rem;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.4rem;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
}

.nav-links a {
  position: relative;
  padding: 0.25rem 0;
  color: var(--muted);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  border-radius: 999px;
  transition: width 0.22s ease-out;
}

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

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

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: #020617;
  cursor: pointer;
}

.nav-toggle span {
  width: 14px;
  height: 1.7px;
  border-radius: 999px;
  background: var(--fg);
}

/* AI banner */

.ai-banner {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.2rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(129, 140, 248, 0.4);
  color: var(--muted);
  font-size: 0.76rem;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(16px);
}

.ai-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
}

.ai-text {
  white-space: nowrap;
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 2.75rem;
  align-items: center;
  margin-top: 3rem;
}

.hero-text h1 {
  font-size: clamp(2.2rem, 3.15vw, 3rem);
  line-height: 1.12;
  margin: 0 0 0.8rem;
}

.hero-subtitle {
  margin: 0 0 1.6rem;
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 540px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 500;
  color: var(--accent-strong);
  font-size: 0.78rem;
  margin-bottom: 0.6rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1.4rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out,
    border-color 0.12s ease-out, background 0.12s ease-out, color 0.12s ease-out;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 16px 35px rgba(88, 80, 236, 0.7);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 38px rgba(88, 80, 236, 0.8);
}

.btn.ghost {
  border-color: rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.9);
  color: var(--muted);
}

.btn.ghost:hover {
  border-color: rgba(148, 163, 184, 0.7);
  color: var(--fg);
}

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

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  align-items: center;
  font-size: 0.78rem;
  color: var(--muted);
}

.hero-meta .dot {
  opacity: 0.6;
}

.hero-card {
  position: relative;
}

.code-card {
  border-radius: 22px;
  background: radial-gradient(circle at top left, #1f2937 0, #020617 55%);
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.code-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
  background: radial-gradient(circle at top left, #020617 0, #020617 60%, #020617 100%);
}

.code-header .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.code-header .red {
  background: #f87171;
}

.code-header .amber {
  background: #fb923c;
}

.code-header .green {
  background: #4ade80;
}

.code-title {
  margin-left: auto;
  font-size: 0.76rem;
  color: var(--muted);
}

.code-block {
  margin: 0;
  padding: 1.1rem 1.15rem 1.2rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 0.76rem;
  line-height: 1.7;
  color: #e5e7eb;
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.95) 0, #020617 65%);
  overflow-x: auto;
}

.code-block::-webkit-scrollbar {
  height: 6px;
}

.code-block::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
  border-radius: 999px;
}

/* Layout helpers */

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 2.25rem;
}

.highlight-card {
  padding: 1.5rem 1.4rem;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at top left, var(--accent-soft), #020617 55%);
  border: 1px solid rgba(129, 140, 248, 0.4);
  box-shadow: var(--shadow-subtle);
}

.highlight-card h3 {
  margin: 0 0 0.9rem;
  font-size: 1.05rem;
}

.highlight-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.highlight-card li {
  padding-left: 1.1rem;
  position: relative;
}

.highlight-card li + li {
  margin-top: 0.5rem;
}

.highlight-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--accent-strong);
}

/* Skills */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.3rem;
}

.skill-card {
  padding: 1.3rem 1.15rem;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.7);
}

.skill-card h3 {
  margin: 0 0 0.6rem;
  font-size: 1rem;
}

.skill-card p {
  margin: 0 0 0.7rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.skill-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.skill-card li + li {
  margin-top: 0.25rem;
}

/* Projects */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}

.project-card {
  padding: 1.4rem 1.25rem;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: var(--shadow-subtle);
}

.project-label {
  display: inline-flex;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.12);
  color: rgba(191, 219, 254, 0.9);
  font-size: 0.78rem;
  margin-bottom: 0.5rem;
}

.project-card h3 {
  margin: 0 0 0.55rem;
  font-size: 1.02rem;
}

.project-card p {
  margin: 0 0 0.7rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.project-meta {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  font-size: 0.8rem;
  color: rgba(148, 163, 184, 0.9);
}

/* Contact */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.1fr);
  gap: 2.1rem;
}

.contact-grid p {
  color: var(--muted);
  font-size: 0.94rem;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  font-size: 0.9rem;
}

.contact-list li + li {
  margin-top: 0.4rem;
}

.contact-list span {
  color: rgba(148, 163, 184, 0.9);
  margin-right: 0.3rem;
}

.contact-form {
  padding: 1.5rem 1.4rem;
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.97);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: var(--shadow-soft);
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.9rem;
}

.form-row label {
  font-size: 0.8rem;
  color: rgba(148, 163, 184, 0.95);
}

.form-row input,
.form-row textarea {
  border-radius: 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.96);
  color: var(--fg);
  padding: 0.65rem 0.7rem;
  font-size: 0.9rem;
  outline: none;
  resize: vertical;
}

.form-row input::placeholder,
.form-row textarea::placeholder {
  color: rgba(148, 163, 184, 0.7);
}

.form-row input:focus,
.form-row textarea:focus {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.7);
}

.form-note {
  margin-top: 0.6rem;
  font-size: 0.78rem;
  color: rgba(148, 163, 184, 0.9);
}

.error-text {
  color: var(--danger);
  font-size: 0.78rem;
  margin-top: 0.15rem;
}

/* Footer */

.site-footer {
  padding: 2.5rem 0 3rem;
}

.footer-inner {
  border-radius: 26px;
  padding: 1.4rem 1.5rem;
  background: radial-gradient(circle at top left, #020617 0, #020617ee 52%, #020617 100%);
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-inner p {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(148, 163, 184, 0.9);
}

.footer-note {
  color: rgba(148, 163, 184, 0.85);
}

/* Responsive */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-card {
    order: -1;
  }

  .section-inner {
    padding: 2.1rem 1.6rem;
  }

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

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

  .two-column,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .nav {
    border-radius: 18px;
    padding: 0.65rem 0.9rem;
  }

  .ai-banner {
    width: 100%;
    justify-content: flex-start;
    align-items: center;
  }

  .ai-text {
    white-space: normal;
  }

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

  .nav-links {
    position: absolute;
    inset-inline: 1.5rem;
    top: 4.9rem;
    padding: 0.65rem 0.9rem;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.4);
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.86rem;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.85);
    transform-origin: top center;
    transform: scaleY(0.8);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.17s ease-out, transform 0.17s ease-out;
  }

  .nav-links.open {
    opacity: 1;
    transform: scaleY(1);
    pointer-events: auto;
  }

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

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

  .section-inner {
    padding: 1.7rem 1.2rem;
    border-radius: 24px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .ai-banner {
    font-size: 0.7rem;
  }

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


