@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg: #09090b;
  --bg-surface: #111114;
  --bg-surface-elevated: #16161b;
  --bg-surface-hover: #1c1c23;
  --border: #212128;
  --border-light: #2c2c36;
  --border-focus: #454556;
  --text: #f4f4f6;
  --text-muted: #9595a4;
  --text-dim: #606070;
  --accent: #ffffff;
  --primary-btn-bg: #ffffff;
  --primary-btn-text: #09090b;
  --primary-btn-hover: #e2e2e8;
  --font-display: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --container-w: 1080px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

[data-theme="light"] {
  --bg: #fafafa;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f4f4f6;
  --bg-surface-hover: #ebebee;
  --border: #e4e4e7;
  --border-light: #d4d4d8;
  --border-focus: #a1a1aa;
  --text: #09090b;
  --text-muted: #52525b;
  --text-dim: #8b8b99;
  --accent: #09090b;
  --primary-btn-bg: #09090b;
  --primary-btn-text: #ffffff;
  --primary-btn-hover: #27272a;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  line-height: 1.6;
  min-height: 100vh;
  transition: background-color 0.2s ease, color 0.2s ease;
}

::selection {
  background: var(--text);
  color: var(--bg);
}

.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* NAVBAR */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

[data-theme="light"] .navbar {
  background-color: rgba(250, 250, 250, 0.88);
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.nav-brand {
  text-decoration: none;
  color: var(--text);
}

.brand-text {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* SLEEK THEME SWITCHER */
.theme-toggle-switch {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.theme-toggle-switch:hover {
  color: var(--text);
  border-color: var(--border-light);
  background: var(--bg-surface-hover);
}

.theme-toggle-switch svg {
  width: 17px;
  height: 17px;
}

/* HERO SECTION */
.hero-section {
  padding: 6.5rem 0 5rem;
}

.hero-wrap {
  max-width: 760px;
}

.hero-title {
  font-size: 3.4rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.12;
  color: var(--text);
  margin-bottom: 1.35rem;
}

.hero-subtitle {
  font-size: 1.18rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2.25rem;
  font-weight: 400;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.72rem 1.3rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-primary {
  background: var(--primary-btn-bg);
  color: var(--primary-btn-text);
  border: 1px solid var(--primary-btn-bg);
}

.btn-primary:hover {
  background: var(--primary-btn-hover);
  border-color: var(--primary-btn-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-light);
  transform: translateY(-1px);
}

.btn svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.btn-secondary svg {
  fill: currentColor;
}

/* SECTIONS */
.section {
  padding: 4.5rem 0;
}

.section-head {
  margin-bottom: 2.5rem;
}

.section-tag {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.section-desc {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

/* PROJECTS GRID */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
}

.project-card:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.project-card-top {
  margin-bottom: 1.5rem;
}

.card-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.15rem;
}

/* Natural, human tags without monospace font */
.project-status {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.22rem 0.6rem;
  border-radius: 6px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.project-category {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-dim);
}

.project-card-title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 0.55rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-card-title svg {
  width: 17px;
  height: 17px;
  opacity: 0.35;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.project-card:hover .project-card-title svg {
  opacity: 1;
  transform: translate(2px, -2px);
}

.project-card-desc {
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.tag-pill {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-surface-elevated);
  padding: 0.22rem 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--border);
}

/* TOOLS GRID */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.tool-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.35rem 1.5rem;
  transition: all 0.15s ease;
}

.tool-card:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-light);
}

.tool-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.45rem;
}

.tool-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
}

.tool-badge {
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-dim);
}

.tool-summary {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* STACK ICONS GRID */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 0.85rem;
}

.stack-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.15rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  text-align: center;
  transition: all 0.15s ease;
}

.stack-item:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.stack-item svg {
  width: 28px;
  height: 28px;
  fill: var(--text);
}

.stack-name {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* CONTACTS / SOCIALS GRID */
.contacts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.contact-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.25rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 0.95rem;
  transition: all 0.15s ease;
}

.contact-card:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-light);
  transform: translateY(-1px);
}

.contact-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon svg {
  width: 19px;
  height: 19px;
  fill: var(--text);
}

.contact-info {
  overflow: hidden;
}

.contact-title {
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.15rem;
}

.contact-sub {
  font-size: 0.76rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* FOOTER */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.75rem 0;
  margin-top: 2rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copy {
  font-size: 0.88rem;
  color: var(--text-dim);
}

.footer-anchors {
  display: flex;
  gap: 1.5rem;
}

.footer-anchor {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.15s ease;
}

.footer-anchor:hover {
  color: var(--text);
}

/* RESPONSIVE */
@media (max-width: 980px) {
  .hero-title {
    font-size: 2.75rem;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stack-grid {
    grid-template-columns: repeat(5, 1fr);
  }
  .contacts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .nav-wrapper {
    justify-content: flex-end;
  }
  .nav-links {
    display: none;
  }
  .hero-title {
    font-size: 2.2rem;
  }
  .hero-buttons {
    flex-direction: column;
  }
  .btn {
    width: 100%;
  }
  .tools-grid {
    grid-template-columns: 1fr;
  }
  .stack-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .contacts-grid {
    grid-template-columns: 1fr;
  }
  .footer-content {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
}
