:root {
  --bg: #050816;
  --bg-alt: #0b1020;
  --card-bg: #111827;
  --accent: #22c55e;
  --accent-soft: rgba(34, 197, 94, 0.12);
  --text: #f9fafb;
  --muted: #9ca3af;
  --border: #1f2933;
  --danger: #f97373;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.75);
  --shadow-card: 0 12px 30px rgba(15, 23, 42, 0.85);
  --container-width: 1080px;
  --transition: 0.2s ease-out;
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background: radial-gradient(circle at top, #1e293b 0, #020617 45%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* Layout */

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 80px 0;
}

.section-alt {
  background: radial-gradient(circle at top left, #111827 0, #020617 55%);
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  border-bottom: 1px solid rgba(15, 23, 42, 0.8);
}

.section-header {
  margin-bottom: 32px;
}

.section-header h2 {
  font-size: 1.8rem;
  margin: 0 0 6px;
}

.section-header p {
  margin: 0;
  color: var(--muted);
}

/* Header / Nav */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: linear-gradient(
    to bottom,
    rgba(2, 6, 23, 0.95),
    rgba(2, 6, 23, 0.8),
    transparent
  );
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--text);
}

.logo span {
  color: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--muted);
  position: relative;
  padding-bottom: 4px;
  transition: color var(--transition);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0;
  margin-left: 1rem;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle span + span {
  margin-top: 4px;
}

/* Hero */

.hero {
  padding: 72px 0 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.3fr);
  gap: 32px;
  align-items: stretch;
}

.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}

.hero-text h1 {
  font-size: clamp(2.4rem, 3.4vw, 3rem);
  margin: 0 0 10px;
}

.hero-subtitle {
  margin: 0 0 20px;
  color: var(--muted);
  max-width: 420px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-card {
  background: radial-gradient(circle at top right, #1f2937 0, #020617 65%);
  border-radius: 22px;
  padding: 20px 20px 18px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.hero-card ul {
  list-style: none;
  padding: 0;
  margin: 16px 0 12px;
  font-size: 0.9rem;
  color: var(--muted);
}

.hero-card li + li {
  margin-top: 4px;
}

.hero-card li span {
  color: var(--text);
  font-weight: 500;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 6px;
}

.hero-socials a {
  font-size: 0.8rem;
  text-decoration: none;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  color: var(--muted);
  background: rgba(15, 23, 42, 0.8);
  transition: background var(--transition), border-color var(--transition), color var(--transition),
    transform var(--transition);
}

.hero-socials a:hover {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(34, 197, 94, 0.12);
  transform: translateY(-1px);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.3rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), color var(--transition), border-color var(--transition),
    transform var(--transition), box-shadow var(--transition);
}

.btn.primary {
  background: linear-gradient(135deg, #22c55e, #4ade80);
  color: #020617;
  box-shadow: 0 12px 25px rgba(34, 197, 94, 0.45);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(34, 197, 94, 0.6);
}

.btn.ghost {
  background: transparent;
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.5);
}

.btn.ghost:hover {
  border-color: var(--accent);
  background: rgba(15, 23, 42, 0.8);
}

.btn.small {
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
}

.btn.full-width {
  width: 100%;
}

/* About */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 24px;
  align-items: start;
}

.pill-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill-list li {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.8rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

/* Cards / Projects */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.grid-3 > .card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.card {
  background: radial-gradient(circle at top, #020617 0, #020617 40%, #020617 100%);
  border-radius: var(--radius-lg);
  padding: 18px 18px 16px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
   height: 100%;
  cursor: pointer;
  transition: transform 0.18s ease-out, box-shadow 0.18s ease-out,
              border-color 0.18s ease-out, background 0.18s ease-out;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
  border-color: rgba(34, 197, 94, 0.7);
  background: radial-gradient(circle at top, #020617 0, #020617 30%, #020617 100%);
}

.card:hover .card-cta {
  color: #22c55e;
}

.card-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.45);
  color: var(--muted);
}

.card h3 {
  margin: 4px 0;
  font-size: 1.05rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.meta-list {
  list-style: none;
  padding: 0;
  margin: 6px 0 8px;
  font-size: 0.8rem;
  color: var(--muted);
}

.meta-list li + li {
  margin-top: 2px;
}

.card-actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.text-link {
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

/* Downloads */

.downloads-table-wrapper {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.95);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.downloads-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.downloads-table thead {
  background: rgba(15, 23, 42, 0.98);
}

.downloads-table th,
.downloads-table td {
  padding: 10px 14px;
  text-align: left;
}

.downloads-table th {
  font-weight: 500;
  color: var(--muted);
  border-bottom: 1px solid rgba(55, 65, 81, 0.9);
}

.downloads-table tbody tr:nth-child(odd) {
  background: rgba(15, 23, 42, 0.85);
}

.downloads-table tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.95);
}

.downloads-table a {
  color: var(--accent);
  text-decoration: none;
}

.downloads-table a:hover {
  text-decoration: underline;
}

.downloads-note {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Contact */

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 24px;
  align-items: start;
}

.contact-form {
  background: rgba(15, 23, 42, 0.95);
  border-radius: var(--radius-lg);
  padding: 16px 16px 14px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: var(--shadow-soft);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.field label {
  font-size: 0.8rem;
  color: var(--muted);
}

.field input,
.field textarea {
  border-radius: var(--radius-md);
  border: 1px solid rgba(55, 65, 81, 0.9);
  padding: 8px 10px;
  background: #020617;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.35);
}

.form-note {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: left;
}

/* Footer */

.site-footer {
  border-top: 1px solid rgba(15, 23, 42, 0.95);
  background: #020617;
  padding: 16px 0 20px;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Responsive */

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .about-grid,
  .grid-3,
  .contact-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .grid-3 {
    gap: 16px;
  }
}

@media (max-width: 720px) {
  .section {
    padding: 56px 0;
  }

  .nav-links {
    position: absolute;
    top: 64px;
    right: 1.5rem;
    background: rgba(15, 23, 42, 0.98);
    padding: 10px 14px;
    flex-direction: column;
    gap: 0.5rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: var(--shadow-soft);
    transform-origin: top right;
    transform: scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition), transform var(--transition);
  }

  .nav-links.open {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
  }

  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    gap: 3px;
  }

  .downloads-table th:nth-child(3),
  .downloads-table td:nth-child(3) {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .footer-content {
    flex-direction: column;
    align-items: flex-start;
  }
}