:root {
  --bg: #020617;
  --bg-alt: #020617;
  --bg-card: #0b1120;
  --accent: #4f46e5;
  --accent-soft: rgba(79, 70, 229, 0.15);
  --text: #e5e7eb;
  --text-muted: #9ca3af;
  --border-subtle: rgba(148, 163, 184, 0.35);
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-soft: 0 22px 45px rgba(15, 23, 42, 0.8);
}

/* Base */

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

html {
  scroll-behavior: smooth;
}

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

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

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

.container {
  width: min(1120px, 100% - 2.4rem);
  margin-inline: auto;
}

/* Header / nav */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(18px);
  background: linear-gradient(to bottom, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.6));
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

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

.logo {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: radial-gradient(circle at 20% 0%, #38bdf8, #4f46e5 45%, #a855f7 100%);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: #0f172a;
  letter-spacing: 0.06em;
}

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

.main-nav a {
  color: var(--text-muted);
  position: relative;
  padding-bottom: 0.2rem;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8, #4f46e5, #a855f7);
  transition: width 0.2s ease-out;
}

.main-nav a:hover {
  color: #e5e7eb;
}

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

/* Mobile nav toggle */

.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: radial-gradient(circle at 20% 0%, #1e293b, #020617 70%);
  padding: 0;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 60%;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: #e5e7eb;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Hero */

.hero {
  padding: 3.5rem 0 3rem;
}

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

.hero-kicker {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.hero h1 {
  font-size: clamp(2.1rem, 2.5vw + 1.6rem, 2.7rem);
  line-height: 1.15;
  margin: 0 0 0.9rem;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 34rem;
  margin-bottom: 1.3rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.35rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #f9fafb;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 12px 25px rgba(79, 70, 229, 0.45);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 18px 35px rgba(79, 70, 229, 0.55);
}

.btn-secondary {
  background: rgba(15, 23, 42, 0.9);
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.5);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.7);
}

.btn-secondary:hover {
  border-color: rgba(129, 140, 248, 0.8);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.hero-meta i {
  margin-right: 0.35rem;
  color: #38bdf8;
}

.hero-social {
  display: flex;
  gap: 0.75rem;
  font-size: 1.1rem;
}

.hero-social a {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 20% 0%, #1e293b, #020617 70%);
  color: #e5e7eb;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.hero-social a:hover {
  transform: translateY(-1px);
  border-color: #6366f1;
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.85);
}

/* Hero photo */

.hero-photo {
  display: flex;
  justify-content: center;
}

.photo-wrapper {
  position: relative;
  padding: 5px;
  border-radius: 30px;
  background: radial-gradient(circle at 0% 0%, #38bdf8, transparent 55%), radial-gradient(circle at 100% 100%, #a855f7, transparent 55%);
  box-shadow: var(--shadow-soft);
}

.photo-wrapper img {
  border-radius: 24px;
  display: block;
}

/* Sections */

.section {
  padding: 3rem 0;
}

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

.section h2 {
  font-size: 1.6rem;
  margin-bottom: 0.4rem;
}

.section-intro {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 32rem;
  margin-bottom: 1.5rem;
}

/* Projects */

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

.project-card {
  position: relative;
  padding: 1.2rem 1.1rem 1.3rem;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.15), transparent 55%),
              radial-gradient(circle at 100% 100%, rgba(168, 85, 247, 0.2), transparent 55%),
              #020617;
  border: 1px solid rgba(148, 163, 184, 0.5);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.9);
  overflow: hidden;
}

.project-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.16rem 0.55rem;
  font-size: 0.7rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.7);
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

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

.project-card p {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 0.7rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem;
}

.project-tags li {
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.7);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.project-links {
  display: flex;
  gap: 0.7rem;
  font-size: 0.8rem;
}

.project-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(99, 102, 241, 0.8);
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
}

.project-links a:hover {
  border-color: #a855f7;
}

/* Skills */

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

.skill-column {
  padding: 1.1rem 1.1rem 1.2rem;
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.55);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.85);
}

.skill-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.skill-header i {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, #38bdf8, #4f46e5);
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  color: #0f172a;
}

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

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

.skill-list li {
  margin-bottom: 0.25rem;
}

/* About */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr);
  gap: 2rem;
}

.about-grid p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.about-stats {
  display: grid;
  gap: 0.7rem;
}

.stat-card {
  padding: 0.7rem 0.9rem;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.55);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.stat-value {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.9rem;
}

/* Contact */

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

.contact-form {
  padding: 1.3rem 1.2rem 1.4rem;
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.6);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
}

.form-group {
  margin-bottom: 0.9rem;
}

label {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 0.2rem;
}

input,
textarea {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.95);
  color: var(--text);
  font-size: 0.9rem;
}

input:focus,
textarea:focus {
  outline: 1px solid #6366f1;
  border-color: #6366f1;
}

.contact-direct h3 {
  margin-top: 0;
  margin-bottom: 0.6rem;
}

.contact-direct ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.contact-direct li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}

.contact-direct i {
  color: #38bdf8;
}

/* Footer */

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  padding: 1rem 0 1.3rem;
  background: radial-gradient(circle at top, #020617 0, #020617 60%, #000 100%);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Responsive */

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-photo {
    order: -1;
  }
  .projects-grid,
  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .about-grid,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .main-nav {
    position: absolute;
    inset: 58px 0 auto;
    background: rgba(2, 6, 23, 0.98);
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
    transform: translateY(-120%);
    transition: transform 0.2s ease-out;
  }
  .main-nav.open {
    transform: translateY(0);
  }
  .main-nav .nav-links {
    flex-direction: column;
    padding: 0.75rem 1.2rem 0.9rem;
  }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
