:root {
  --bg: #050816;
  --bg-alt: #020617;
  --surface: #050816;
  --surface-soft: #0b1120;
  --border-subtle: rgba(15, 23, 42, 0.8);
  --accent: #e5e7eb;
  --accent-soft: rgba(148, 163, 184, 0.15);
  --accent-strong: #f9fafb;
  --text: #f9fafb;
  --text-muted: #9ca3af;
  --danger: #f97373;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 999px;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.7);
  --shadow-subtle: 0 14px 30px rgba(15, 23, 42, 0.4);
  --blur: 18px;
  --transition-fast: 180ms ease-out;
}

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

html,
body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: none;
}

body::after {
  content: none;
}

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

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

button,
input,
textarea {
  font-family: inherit;
}

/* Layout */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 20px 12px;
  backdrop-filter: blur(var(--blur));
  background: rgba(5, 8, 22, 0.96);
}

.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 16px;
  background: #111827;
  color: #e5e7eb;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  box-shadow: 0 12px 30px rgba(55, 65, 81, 0.6);
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 18px;
  padding: 6px;
  margin: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(31, 41, 55, 1);
  box-shadow: var(--shadow-subtle);
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  transition:
    color var(--transition-fast),
    background-color var(--transition-fast),
    transform var(--transition-fast);
}

.nav-links a:hover {
  color: #e5e7eb;
  background: rgba(99, 102, 241, 0.14);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.9);
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 0;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 14px;
  height: 1.8px;
  border-radius: 999px;
  background: #e5e7eb;
}

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 20px 72px;
}

.section {
  padding: 72px 0 16px;
}

.section-alt {
  margin-top: 28px;
  padding: 72px 24px 32px;
  border-radius: 32px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.85);
}

.section-header {
  max-width: 640px;
  margin-bottom: 32px;
}

.section-header h2 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e5e7eb;
}

.section-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr);
  gap: 32px;
  align-items: center;
  padding-top: 32px;
}

.hero-content {
  padding-right: 16px;
  padding-left: 0;
}

.eyebrow {
  margin: 0 0 16px;
  padding: 0;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none !important;
  color: var(--accent-strong);
  text-align: left;
  display: block;
}

.hero-title {
  margin: 0 0 8px;
  padding: 0;
  font-size: clamp(40px, 5vw, 52px);
  letter-spacing: 0;
  text-align: left;
  display: block;
}

.hero-subtitle {
  margin: 0 0 22px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast),
    border-color var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #f9fafb;
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
  box-shadow: 0 22px 55px rgba(88, 80, 236, 0.8);
  transform: translateY(-1px) translateZ(0);
}

.btn-ghost {
  background: rgba(15, 23, 42, 0.68);
  border-color: rgba(148, 163, 184, 0.4);
  color: #e5e7eb;
}

.btn-ghost:hover {
  border-color: rgba(129, 140, 248, 0.9);
  background: rgba(15, 23, 42, 0.96);
}

.hero-card {
  position: relative;
  padding: 18px 18px 16px;
  border-radius: 28px;
  background: var(--surface-soft);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
  overflow: hidden;
}

.hero-profile-image {
  width: 100%;
  margin-bottom: 16px;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.hero-profile-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: high-quality;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hero-card::before {
  content: none;
}

.hero-highlight {
  position: relative;
  padding: 12px 12px 10px;
  border-radius: 18px;
  background: #020617;
  border: 1px solid rgba(31, 41, 55, 1);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.9);
}

.hero-highlight p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.12);
  color: #bbf7d0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.4);
}

.hero-meta {
  list-style: none;
  margin: 14px 0 0;
  padding: 10px 0 0;
  border-top: 1px dashed rgba(148, 163, 184, 0.4);
}

.hero-meta li {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding: 3px 0;
  color: var(--text-muted);
}

.hero-meta .label {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 10px;
}

.hero-meta .value {
  color: #e5e7eb;
  font-weight: 500;
}

/* Work Experience */

.experience-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.experience-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(55, 65, 81, 0.3);
  border: 1px solid rgba(75, 85, 99, 0.4);
  color: var(--text);
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-fast);
  gap: 16px;
  text-decoration: none;
}

.experience-item:hover {
  background: rgba(55, 65, 81, 0.5);
  border-color: rgba(148, 163, 184, 0.5);
  transform: translateX(2px);
}

.experience-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.experience-role {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
}

.experience-company {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.3;
}

.experience-date {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.experience-arrow {
  font-size: 14px;
  color: var(--text-muted);
  opacity: 0.7;
  flex-shrink: 0;
  transition: opacity var(--transition-fast);
}

.experience-item:hover .experience-arrow {
  opacity: 1;
}

/* Projects */

.projects-wrapper {
  position: relative;
}

/* Collapsed should only be ~one row tall (prevents huge empty space) */
.projects-collapsed.projects-wrapper {
  max-height: 340px;
  overflow: hidden;
}

/* Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.project-card {
  position: relative;
  padding: 18px 16px 14px;
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-subtle);
  transition:
    transform 180ms ease-out,
    box-shadow 180ms ease-out,
    border-color 180ms ease-out,
    background 180ms ease-out;
}

.project-card:hover {
  transform: translateY(-4px) translateZ(0);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.9);
  border-color: rgba(129, 140, 248, 0.9);
}

.project-tag {
  position: absolute;
  top: 10px;
  right: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  background: rgba(55, 65, 81, 0.9);
  color: #e5e7eb;
}

.project-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.project-card p {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}

.project-meta {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
  padding: 0;
}

.project-meta li {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: #cbd5f5;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
}

.project-links a {
  color: var(--accent-strong);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.project-links a::after {
  content: "↗";
  font-size: 11px;
}

.project-links a:hover {
  text-decoration: underline;
}

/* --- Projects: "See more" blur overlay --- */

/* Collapsed: blur everything AFTER the first 3 projects */
.projects-collapsed .project-card:nth-child(n + 4) {
  filter: blur(9px) brightness(0.55) saturate(0.9);
  opacity: 0.85;
  pointer-events: none;
  user-select: none;
}

/* Overlay strip at bottom (NOT full height) */
.projects-more {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 140px; /* tweak 110–160 */
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 5;
  pointer-events: none;
}

.projects-collapsed .projects-more {
  display: flex;
}

.projects-more::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(2, 6, 23, 0) 0%,
    rgba(2, 6, 23, 0.65) 55%,
    rgba(2, 6, 23, 0.9) 100%
  );
  backdrop-filter: blur(10px);
}

/* Pill button */
.projects-more-btn {
  position: relative;
  z-index: 1;
  pointer-events: auto;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(255, 255, 255, 0.95);
  color: rgba(15, 23, 42, 0.98);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 160ms ease-out;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
}

.projects-more-btn:hover {
  transform: translateY(-1px);
}

/* Expanded state */
.projects-expanded.projects-wrapper {
  max-height: none;
  overflow: visible;
}

.projects-expanded .project-card {
  filter: none;
  opacity: 1;
  pointer-events: auto;
}

.projects-expanded .projects-more {
  position: static;
  height: auto;
  display: flex;
  padding-top: 16px;
  pointer-events: auto;
}

.projects-expanded .projects-more::before {
  display: none;
}

/* Connect */

.connect-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr);
  gap: 20px;
}

.connect-card {
  border-radius: var(--radius-lg);
  padding: 16px 16px 14px;
  background: var(--surface-soft);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-subtle);
}

.connect-card h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.connect-copy {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--text-muted);
}

.connect-copy a {
  color: var(--accent-strong);
}

.connect-copy a:hover {
  text-decoration: underline;
}

.contact-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(55, 65, 81, 1);
  background: #020617;
  color: #e5e7eb;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.85);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast),
    background-color var(--transition-fast),
    color var(--transition-fast);
}

.contact-pill .pill-arrow {
  font-size: 11px;
}

.contact-pill:hover {
  transform: translateY(-2px);
  border-color: rgba(129, 140, 248, 0.9);
  background: rgba(15, 23, 42, 1);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 1);
}

.connect-form {
  border-radius: var(--radius-lg);
  padding: 16px 16px 12px;
  background: var(--surface-soft);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-subtle);
}

.connect-form h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 10px;
}

.field-group label {
  font-size: 12px;
  color: var(--text-muted);
}

.field-group input,
.field-group textarea {
  border-radius: 11px;
  border: 1px solid rgba(55, 65, 81, 0.9);
  background: rgba(15, 23, 42, 0.96);
  padding: 8px 10px;
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background-color var(--transition-fast);
}

.field-group input:focus,
.field-group textarea:focus {
  border-color: rgba(129, 140, 248, 0.9);
  box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.6);
  background: rgba(15, 23, 42, 0.98);
}

.field-group textarea {
  resize: vertical;
  min-height: 88px;
}

.connect-form button[disabled] {
  background: rgba(55, 65, 81, 0.9);
  border-color: rgba(75, 85, 99, 0.9);
  box-shadow: none;
  opacity: 0.9;
  cursor: not-allowed;
}

.form-note {
  margin: 6px 0 0;
  font-size: 11px;
  color: var(--text-muted);
}

.form-status-success {
  color: #22c55e;
}

.form-status-error {
  color: var(--danger);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Footer */

.site-footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 20px 32px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

/* Responsive */

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

  .hero-card {
    order: -1;
  }

  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .connect-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .site-header {
    padding-inline: 16px;
  }

  main {
    padding-inline: 16px;
  }

  .section-alt {
    padding-inline: 16px;
  }

  .experience-item {
    flex-wrap: wrap;
    padding: 10px 14px;
  }

  .experience-content {
    flex-basis: 100%;
    margin-bottom: 4px;
  }

  .experience-date {
    font-size: 12px;
  }

  .nav-links {
    position: fixed;
    inset-inline: 16px;
    top: 64px;
    padding: 8px;
    flex-direction: column;
    align-items: stretch;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.98);
    border-color: rgba(148, 163, 184, 0.6);
    transform-origin: top center;
    transform: scaleY(0.85);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .nav-links a {
    justify-content: flex-start;
    padding-block: 7px;
  }

  .nav-links.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: scaleY(1);
    transition:
      opacity 150ms ease-out,
      transform 150ms ease-out;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .hero {
    padding-top: 18px;
  }

  .section {
    padding-top: 52px;
  }

  .projects-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
