:root {
  --bg: #050816;
  --bg-alt: #0b1020;
  --card: #111827;
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.15);
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border: #1f2937;
  --radius-lg: 18px;
  --transition: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: radial-gradient(circle at top, #111827 0, #020617 45%, #000 100%);
  color: var(--text);
}

/* ===== Layout ===== */

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.section {
  padding: 5rem 0;
}

.section-alt {
  padding: 5rem 0;
  background: rgba(15, 23, 42, 0.8);
}

.section-title {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

/* ===== Nav ===== */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.9),
    rgba(15, 23, 42, 0.4),
    transparent
  );
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.nav-scrolled {
  background: rgba(15, 23, 42, 0.96);
  border-color: rgba(31, 41, 55, 0.9);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.8);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0;
}

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

.logo span {
  color: var(--accent);
}

.nav nav a {
  margin-left: 1.5rem;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--muted);
  position: relative;
  padding-bottom: 0.2rem;
  transition: color var(--transition);
}

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

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

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

/* ===== Hero ===== */

.hero {
  padding: 4.5rem 0 4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.5fr);
  gap: 3rem;
  align-items: center;
}

.hero-tag {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 4vw, 3.1rem);
  margin: 0 0 0.8rem;
}

.hero-sub {
  color: var(--muted);
  max-width: 34rem;
  margin-bottom: 1.8rem;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 1.4rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.4rem;
  font-size: 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition),
    border-color var(--transition), transform var(--transition),
    box-shadow var(--transition);
}

.btn.primary {
  background: var(--accent);
  color: #020617;
  box-shadow: 0 8px 25px rgba(56, 189, 248, 0.35);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.5);
}

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

.btn.ghost:hover {
  border-color: var(--accent);
  background: rgba(15, 23, 42, 0.85);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.hero-meta span {
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(31, 41, 55, 0.9);
}

/* Hero side card */

.hero-card {
  background: linear-gradient(135deg, #020617, #020617);
  border-radius: 24px;
  padding: 1.8rem 1.6rem;
  border: 1px solid rgba(31, 41, 55, 0.9);
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.9);
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(
    circle at top,
    rgba(56, 189, 248, 0.16),
    transparent 60%
  );
  opacity: 0.7;
  pointer-events: none;
}

.hero-card-body {
  position: relative;
  z-index: 1;
}

.hero-avatar {
  position: relative;
  width: 84px;
  height: 84px;
  margin-bottom: 1.2rem;
}

.hero-avatar .circle {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 20%, #38bdf8, #0ea5e9);
  opacity: 0.9;
}

.hero-avatar .circle-2 {
  inset: 12px;
  background: radial-gradient(circle at 70% 80%, #0ea5e9, #020617);
  opacity: 0.8;
}

.hero-avatar .initials {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.4rem;
}

.hero-card-body h2 {
  margin: 0 0 0.2rem;
}

.hero-card-body p {
  margin: 0 0 0.8rem;
  color: var(--muted);
  font-size: 0.9rem;
}

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

.hero-card-body li {
  margin-bottom: 0.3rem;
  position: relative;
}

.hero-card-body li::before {
  content: "•";
  position: absolute;
  left: -0.8rem;
  color: var(--accent);
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.85rem;
}

.hero-links a {
  text-decoration: none;
  color: var(--accent);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.4);
  background: rgba(15, 23, 42, 0.9);
  transition: background var(--transition), color var(--transition),
    border-color var(--transition), transform var(--transition);
}

.hero-links a:hover {
  background: var(--accent);
  color: #020617;
  border-color: transparent;
  transform: translateY(-1px);
}

/* ===== Skills ===== */

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

.skill-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.4rem;
  border: 1px solid var(--border);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.75);
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: "";
  position: absolute;
  inset: -30%;
  background: radial-gradient(
    circle at top left,
    rgba(56, 189, 248, 0.16),
    transparent 60%
  );
  opacity: 0;
  transition: opacity var(--transition);
}

.skill-card:hover::before {
  opacity: 1;
}

.skill-card h3 {
  margin-top: 0;
  margin-bottom: 0.6rem;
}

.skill-card ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ===== Projects ===== */

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

.project-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.5rem;
  border: 1px solid var(--border);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.85);
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(
    circle at top right,
    rgba(56, 189, 248, 0.18),
    transparent 60%
  );
  opacity: 0;
  transition: opacity var(--transition);
}

.project-card:hover::before {
  opacity: 1;
}

.project-card h3 {
  margin-top: 0;
  margin-bottom: 0.6rem;
}

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

.project-card ul {
  margin: 0 0 0.8rem;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.project-links a {
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(56, 189, 248, 0.4);
  padding-bottom: 2px;
}

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

/* ===== Contact ===== */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.8rem;
  margin-top: 1.5rem;
}

.contact-grid h3 {
  margin-top: 0;
}

.contact-grid a {
  color: var(--accent);
  text-decoration: none;
}

.contact-grid a:hover {
  text-decoration: underline;
}

/* ===== Footer ===== */

.footer {
  border-top: 1px solid var(--border);
  padding: 1.3rem 0 1.5rem;
  background: #020617;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

/* ===== Animations ===== */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.show {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */

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

@media (max-width: 800px) {
  .skills-grid,
  .projects-grid,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .nav nav a {
    margin-left: 1rem;
  }
}

@media (max-width: 600px) {
  .nav-inner {
    flex-direction: row;
  }

  .hero {
    padding-top: 4rem;
  }

  .hero-meta {
    flex-direction: column;
    align-items: flex-start;
  }
}
