:root {
  --bg: #050816;
  --bg-alt: #0b1021;
  --text: #f5f5f5;
  --muted: #b3b3c6;
  --accent: #4f46e5;
  --accent-soft: rgba(79, 70, 229, 0.15);
  --border: #1e2235;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.4);
  --transition-fast: 0.2s ease;
  --transition-med: 0.3s ease;
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

/* Light theme */
body.light {
  --bg: #f5f5fa;
  --bg-alt: #ffffff;
  --text: #111827;
  --muted: #4b5563;
  --accent-soft: rgba(79, 70, 229, 0.07);
  --border: #e5e7eb;
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.12);
}

/* Global reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background: radial-gradient(circle at top, #111827 0, var(--bg) 45%);
  color: var(--text);
  line-height: 1.6;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* Reusable layout */
.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-title {
  font-size: 2rem;
  margin-bottom: 24px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 40%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

/* Header / Nav */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: linear-gradient(
    to bottom,
    rgba(5, 8, 22, 0.95),
    rgba(5, 8, 22, 0.7),
    transparent
  );
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.logo {
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.95rem;
}

.logo span {
  color: var(--accent);
}

.nav {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
  transition: width var(--transition-fast);
}

.nav-link:hover {
  color: var(--text);
}

.nav-link:hover::after {
  width: 60%;
}

/* Mobile nav button */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 1.1rem;
  padding: 6px 10px;
  color: var(--text);
  cursor: pointer;
}

/* Hero */
.hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-subtitle {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.hero-title {
  font-size: clamp(2.5rem, 4vw, 3.4rem);
  font-weight: 800;
  margin-bottom: 8px;
}

.hero-role {
  font-size: 1.05rem;
  color: var(--accent);
  margin-bottom: 16px;
}

.hero-desc {
  color: var(--muted);
  margin-bottom: 24px;
  max-width: 34rem;
}

.hero-buttons {
  display: flex;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition-med), transform var(--transition-fast),
    box-shadow var(--transition-fast), border-color var(--transition-fast);
  white-space: nowrap;
}

.primary-btn {
  background: var(--accent);
  color: #f9fafb;
  box-shadow: var(--shadow-soft);
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.65);
}

.outline-btn {
  border-color: var(--border);
  color: var(--text);
  background: rgba(15, 23, 42, 0.6);
}

.outline-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* Hero image / avatar */
.hero-image {
  display: flex;
  justify-content: center;
}

.hero-avatar {
  width: 230px;
  height: 230px;
  border-radius: 999px;
  border: 2px solid var(--accent-soft);
  object-fit: cover;
  box-shadow: var(--shadow-soft);
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 28px;
}

.about-grid p {
  color: var(--muted);
}

.about-details ul {
  list-style: none;
}

.about-details li {
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.95rem;
}

.about-details strong {
  color: var(--text);
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
}

.skill-card {
  background: rgba(15, 23, 42, 0.75);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition-fast),
    border-color var(--transition-fast), box-shadow var(--transition-fast);
}

body.light .skill-card {
  background: #ffffff;
}

.skill-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.45);
}

.skill-card h3 {
  margin-bottom: 6px;
  font-size: 1.05rem;
}

.skill-card p {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.project-card {
  background: rgba(15, 23, 42, 0.85);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition-fast),
    border-color var(--transition-fast), box-shadow var(--transition-fast);
}

body.light .project-card {
  background: #ffffff;
}

.project-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.45);
}

.project-card h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.project-card p {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.project-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-tags li {
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
}

.project-card ul:not(.project-tags) {
  list-style: disc;
  margin-left: 20px;
  padding-left: 0;
  margin-top: 10px;
}

.project-card ul:not(.project-tags) li {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 6px;
  padding-left: 4px;
}

/* Contact */
.contact-text {
  color: var(--muted);
  margin-bottom: 20px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.2fr;
  gap: 24px;
}

.contact-list {
  list-style: none;
  font-size: 0.95rem;
}

.contact-list li {
  margin-bottom: 8px;
}

.contact-list a {
  color: var(--accent);
  text-decoration: none;
}

.contact-list a:hover {
  text-decoration: underline;
}

.contact-form {
  display: grid;
  gap: 10px;
}

.contact-form input,
.contact-form textarea {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.85);
  color: var(--text);
  font-size: 0.95rem;
}

body.light .contact-form input,
body.light .contact-form textarea {
  background: #f9fafb;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-status {
  font-size: 0.85rem;
  height: 1.1rem;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 18px 0 26px;
  background: rgba(5, 8, 22, 0.95);
}

body.light .footer {
  background: #f9fafb;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--muted);
}

.vortex-link {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.vortex-link:hover {
  color: var(--text);
}

/* Responsive */
@media (max-width: 900px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .hero-image {
    order: -1;
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav {
    position: absolute;
    top: 56px;
    right: 4%;
    padding: 10px 14px;
    background: rgba(5, 8, 22, 0.98);
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    flex-direction: column;
    gap: 10px;
    display: none;
  }

  body.light .nav {
    background: #ffffff;
  }

  .nav.open {
    display: flex;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .hero-buttons {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 60px 0;
  }

  .hero-title {
    font-size: 2.2rem;
  }
}
