:root {
  --bg: #0a0f1f;
  --surface: #0f172a;
  --card: #111a2f;
  --card-strong: #152348;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #4af5c5;
  --accent-2: #f6c177;
  --accent-soft: rgba(74, 245, 197, 0.12);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --radius: 16px;
  --font-display: "Space Grotesk", "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Manrope", "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: radial-gradient(circle at 20% 20%, #132b45 0, transparent 25%),
    radial-gradient(circle at 80% 0%, #1b3c5c 0, transparent 25%),
    radial-gradient(circle at 30% 70%, #0f2a33 0, transparent 20%),
    var(--bg);
  min-height: 100vh;
  line-height: 1.7;
}

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

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

.background-art {
  position: fixed;
  inset: 0;
  background: linear-gradient(120deg, rgba(74, 245, 197, 0.05), rgba(246, 193, 119, 0.06));
  filter: blur(120px);
  z-index: 0;
  pointer-events: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 18px 32px;
  background: rgba(10, 15, 31, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0a0f1f;
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.brand-name {
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.brand-role {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
  border: 1px solid transparent;
  transition: color 0.2s ease, background 0.2s ease, border 0.2s ease;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.nav-link.active {
  color: #0a0f1f;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--muted);
}

.text-link {
  color: var(--text);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
}

.text-link:hover {
  color: var(--accent);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

.section {
  position: relative;
  z-index: 1;
  padding: 96px 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.section h2 {
  margin: 8px 0 0;
  font-size: 2.4rem;
  letter-spacing: -0.5px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 700;
  margin: 0;
}

.lede {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 720px;
}

.muted {
  color: var(--muted);
  margin: 0;
}

.hero {
  padding-top: 64px;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
  align-items: start;
}

.hero-copy h1 {
  font-family: var(--font-display);
  font-size: 3rem;
  margin: 12px 0 12px;
  letter-spacing: -1px;
}

.hero-copy .lede {
  margin-bottom: 20px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 22px 0 10px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.stat {
  border: 1px solid var(--border);
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.stat-value {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
}

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

.hero-card {
  background: linear-gradient(180deg, rgba(74, 245, 197, 0.05), rgba(17, 26, 47, 0.85));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.card-header h2 {
  margin: 6px 0 0;
  font-size: 1.6rem;
}

.pill-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 22px;
  display: grid;
  gap: 8px;
}

.pill-list li {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.hero-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.timeline {
  display: flex;
  align-items: center;
  gap: 6px;
}

.timeline .line {
  width: 38px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.timeline .dot {
  width: 10px;
  height: 10px;
}

.timeline .faint {
  background: rgba(255, 255, 255, 0.22);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: grid;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(74, 245, 197, 0.1), transparent 40%),
    radial-gradient(circle at 80% 0%, rgba(246, 193, 119, 0.08), transparent 40%);
  opacity: 0.9;
  pointer-events: none;
}

.project-card h3 {
  margin: 0;
  font-size: 1.3rem;
  letter-spacing: -0.3px;
}

.project-card p {
  margin: 0;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
}

.project-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.button {
  border: none;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.98rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease, border 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0a0f1f;
  box-shadow: 0 10px 30px rgba(74, 245, 197, 0.25);
}

.button.ghost {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.button[aria-disabled="true"],
.button.disabled {
  cursor: not-allowed;
  opacity: 0.55;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  border: 1px dashed var(--border);
  box-shadow: none;
}

.button:hover:not([aria-disabled="true"]):not(.disabled),
.button:focus-visible:not([aria-disabled="true"]):not(.disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.about-grid,
.skills-grid,
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.about-card,
.skill-card,
.work-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.about-card h3,
.skill-card h3,
.work-card h3 {
  margin-top: 0;
  margin-bottom: 10px;
}

.detail-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.detail-list li {
  border: 1px dashed var(--border);
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.skill-card .chip-row {
  margin-top: 6px;
}

.work-card .period {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.3px;
}

.work-card .role {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 6px 0;
}

.work-card .muted {
  margin-bottom: 10px;
}

.contact-card {
  background: linear-gradient(160deg, rgba(17, 26, 47, 0.95), rgba(26, 32, 52, 0.95));
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
  box-shadow: var(--shadow);
}

.contact-form {
  display: grid;
  gap: 12px;
}

.contact-form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-family: var(--font-body);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--accent-soft);
}

.form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.form-note {
  font-size: 0.95rem;
}

.form-success {
  margin: 0;
  color: var(--accent);
  font-weight: 700;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.modal[data-open="true"] {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
}

.modal-panel {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 22px;
  width: min(900px, 92vw);
  max-height: 90vh;
  overflow: auto;
  box-shadow: var(--shadow);
  z-index: 1;
}

.modal-content h3 {
  margin: 4px 0 8px;
  font-size: 1.6rem;
}

.modal-tools {
  margin: 10px 0 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modal-details,
.modal-screenshots {
  margin: 14px 0;
}

.modal-screenshots h4,
.modal-details h4 {
  margin: 0 0 8px;
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.screenshot {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.screenshot img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.modal-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.icon-button {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 1.1rem;
}

.icon-button.close {
  position: absolute;
  right: 12px;
  top: 12px;
}

.contact-meta p {
  margin: 6px 0;
}

@media (max-width: 960px) {
  .site-header {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .header-actions {
    justify-content: flex-start;
  }

  .section {
    padding: 78px 22px;
  }
}

@media (max-width: 640px) {
  .nav {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .site-header {
    position: sticky;
    top: 0;
  }

  .hero-copy h1 {
    font-size: 2.4rem;
  }

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