:root {
  --bg: #000000;
  --fg: #f9fafb;
  --muted: #9ca3af;
  --pill-bg: #111827;
  --pill-border: #1f2937;
  --accent: #00d4ff;
}

.hero-tagline {
  margin: 0.4rem 0 0;
  font-size: 1.05rem;
  line-height: 1.5;
  color: #e5e7eb;
  max-width: 30rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    sans-serif;
  background: var(--bg);
  color: var(--fg);
}

body.project-page,
body.blog-page {
  background: radial-gradient(
    ellipse at top,
    #1e1b4b 0,
    #020617 55%,
    #000000 100%
  );
  background-size: 150% 150%;
  animation: bg-pulse 15s ease-in-out infinite;
}

@keyframes bg-pulse {
  0% {
    background-position: 50% 0%;
  }
  50% {
    background-position: 50% 20%;
  }
  100% {
    background-position: 50% 0%;
  }
}

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

a:hover {
  text-decoration: underline;
}

.page {
  min-height: 100vh;
}

/* === NAVBAR === */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 0.9rem 10vw;
  background: transparent;
  backdrop-filter: none;
  border-bottom: none;
}

.site-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1120px;
  margin: 0 auto;
}

.site-nav-brand {
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.site-nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  font-size: 0.88rem;
  color: var(--fg);
}

.site-nav-links a {
  color: inherit;
}

.site-nav-links a:hover {
  color: #e5e7eb;
}

.site-nav-contact {
  padding: 0.35rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  font-size: 0.82rem;
}

/* === HERO (HOME) === */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
  align-items: flex-start;
  padding: 0 10vw;
  min-height: 100vh;
  column-gap: 5rem;
  position: relative;
  background: radial-gradient(ellipse at top, #1e1b4b 0, #020617 55%, #000000 100%);
  background-size: 150% 150%;
  animation: bg-pulse 15s ease-in-out infinite;
}

.hero-left {
  max-width: 26rem;
  display: flex;
  flex-direction: column;
  gap: 2.4rem;
  margin-top: 3.5rem;
  position: sticky;
  top: 3.5rem;
}

.hero-name-block {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.hero-name {
  margin: 0;
  font-size: clamp(2.4rem, 3.4vw, 3.4rem);
  line-height: 1.05;
}

.hero-year {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  font-size: 0.9rem;
}

.hero-links a {
  color: #e5e7eb;
  text-decoration: none;
  padding: 0.28rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.9);
}

.hero-links a:hover {
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.9);
}

.hero-links a:last-child {
  border-color: rgba(0, 212, 255, 0.7);
  background: rgba(8, 47, 73, 0.9);
  color: #e0faff;
}

.hero-links a:last-child:hover {
  border-color: rgba(0, 212, 255, 1);
  background: rgba(8, 47, 73, 1);
}

.hero-links a:nth-child(1) {
  background: rgba(30, 64, 175, 0.9); /* Work */
  border-color: rgba(59, 130, 246, 0.8);
}

.hero-links a:nth-child(2) {
  background: rgba(88, 28, 135, 0.9); /* Services */
  border-color: rgba(147, 51, 234, 0.8);
}

.hero-links a:nth-child(3) {
  background: rgba(17, 24, 39, 0.9); /* Blog */
  border-color: rgba(148, 163, 184, 0.9);
}

.hero-skills {
  margin-top: 1.4rem;
  font-size: 0.86rem;
  color: var(--muted);
  display: flex;
  gap: 0.5rem;
}

.hero-skills-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
}

.hero-skills-items {
  opacity: 0.9;
}

.hero-skills::before {
  content: "";
  display: block;
  width: 36px;
  height: 1px;
  background: rgb(255, 255, 255);
  margin-right: 0.75rem;
  align-self: center;
}

.hero-social-proof {
  margin: 1.2rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.hero-inquiries {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hero-inquiries-label {
  color: var(--muted);
  font-size: 0.86rem;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.6rem;
  border-radius: 999px;
  background: #0f1629;
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--fg);
}

.hero-pill:hover {
  background: #1b2438;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.65);
  cursor: pointer;
}

.hero-call-link {
  margin-top: -1.35rem;
  font-size: 0.8rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
}

.hero-call-link a {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.8rem;
  margin-left: 0.5rem;
  border-radius: 999px;
  border: 1px solid #1f2937;
  background: #020617;
  color: #e5e7eb;
  text-decoration: none;
  font-size: 0.8rem;
}

.hero-mini-grid {
  margin-top: 1.6rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem 1.2rem;
  font-size: 0.78rem;
}

.hero-mini-item {
  color: var(--muted);
}

.hero-mini-label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  margin-bottom: 0.15rem;
}

.hero-mini-value {
  color: #e5e7eb;
}

.hero-services {
  margin-top: 1.4rem;
  padding: 0;
}

.hero-services-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(148, 163, 184, 0.9);
  margin-bottom: 0.4rem;
}

.hero-services-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.hero-services-list li {
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
  font-size: 0.78rem;
  color: #e5e7eb;
}

.hero-logos {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.hero-logos-label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(148, 163, 184, 0.85);
}

.hero-logos-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.hero-logos-row span {
  font-size: 0.8rem;
  color: rgba(148, 163, 184, 0.9);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(51, 65, 85, 0.85);
  background: rgba(15, 23, 42, 0.95);
}

.hero-pill-dot {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #020617;
}

.hero-pill-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-pill:hover {
  background: #020617;
}

.cta-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1.4rem;
}

.btn-main {
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  background: #020617;
  border: 1px solid rgba(0, 212, 255, 0.7);
  color: #00d4ff;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.btn-main:hover {
  background: #02081f;
  transform: translateY(-1px);
  box-shadow: 0 0 22px rgba(0, 212, 255, 0.7);
}

.btn-secondary {
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: #9ca3af;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.btn-secondary:hover {
  border-color: #e5e7eb;
  color: #e5e7eb;
  background: rgba(15, 23, 42, 0.7);
}

.hero-footer {
  margin-top: 3rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.hero-right {
  display: flex;
  justify-content: flex-start;
  margin-top: 1.5rem;
}

.device-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2.4rem;
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
  padding-right: 0.4rem;
}

.device-stack {
  scrollbar-width: none;
}

.device-stack::-webkit-scrollbar {
  display: none;
}

.hero-projects-label {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.45);
  margin-bottom: 2rem;
}

.device {
  width: min(540px, 80vw);
  transform: translateY(0);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  cursor: pointer;
  box-shadow: none;
}

.device-image {
  width: 100%;
  height: auto;
  display: block;
}

.device:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15), 0 0 30px rgba(99, 102, 241, 0.15);
}

.device::after {
  content: "View project";
  position: absolute;
  right: 1.1rem;
  bottom: 1rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: #e5e7eb;
  font-size: 0.72rem;
  opacity: 1;
  transform: translateY(0);
  pointer-events: none;
}

.device:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.hero-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, #000000);
  pointer-events: none;
}

/* === PROJECTS INDEX (HOME) === */

.projects-index {
  padding: 2.5rem 4vw 3.5rem;
}

.projects-index-inner {
  max-width: 52rem;
  margin: 0 auto;
}

.projects-index-title {
  margin: 0 0 1.2rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(148, 163, 184, 0.7);
}

.projects-index-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.55rem 1.5rem;
}

.projects-index-list a {
  color: #e5e7eb;
  text-decoration: none;
}

.projects-index-list a:hover {
  text-decoration: underline;
}

/* === BLOG GRID === */

.blog-grid {
  display: grid;
  gap: 2rem;
  justify-items: stretch;
}

.blog-card {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.blog-card a {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.blog-card-image-wrap {
  position: relative;
  overflow: hidden;
}

.blog-card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.blog-card-body {
  padding: 1.1rem 1.2rem 1.2rem;
}

.blog-card-meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

.blog-card-title {
  font-size: 0.95rem;
  margin: 0 0 0.3rem;
}

.blog-card-excerpt {
  margin: 0;
  font-size: 0.85rem;
  color: #d1d5db;
}

/* === ABOUT PAGE === */

.about {
  padding: 3rem 6vw 3rem;
  min-height: 100vh;
}

.about-inner {
  max-width: 960px;
  margin: 0 auto;
}

@media (max-width: 640px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1025px) {
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.about-text {
  font-size: 0.98rem;
  line-height: 1.7;
  color: #d1d5db;
}

.about-title {
  margin: 0 0 1.5rem;
  font-size: clamp(2rem, 3vw, 2.6rem);
  line-height: 1.1;
}

.about-text h2 {
  margin-top: 2rem;
  margin-bottom: 0.6rem;
  font-size: 1.25rem;
  font-weight: 600;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  padding-bottom: 0.3rem;
}

.blog-cta-box {
  margin: 2.4rem 0;
  padding: 1.1rem 1.3rem;
  border-radius: 1rem;
  border: 1px solid rgba(34, 197, 94, 0.4);
  background: radial-gradient(circle at top left, rgba(34, 197, 94, 0.15), rgba(15, 23, 42, 0.95));
  font-size: 0.9rem;
}

.blog-cta-box strong {
  color: #bbf7d0;
}

.code-block {
  margin: 2.2rem 0;
  border-radius: 1rem;
  border: 1px solid #1f2937;
  background: #020617;
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.9rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.9);
  background: rgba(15, 23, 42, 0.95);
  font-size: 0.75rem;
  color: var(--muted);
}

.code-block-body {
  padding: 0.75rem 0.9rem 0.9rem;
  overflow-x: auto;
}

.code-block pre {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.6;
}

.code-block code {
  color: #e5e7eb;
}

.code-copy-btn {
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: transparent;
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  font-size: 0.7rem;
  color: var(--muted);
  cursor: pointer;
}

.code-copy-btn:hover {
  border-color: #e5e7eb;
  color: #e5e7eb;
}

.blog-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.9rem;
}

.blog-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.blog-pill-primary {
  background: rgba(79, 70, 229, 0.16);
  border: 1px solid rgba(129, 140, 248, 0.6);
  color: #a5b4fc;
}

.blog-pill-muted {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: var(--muted);
}

.blog-author {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1.2rem 0 1.6rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.blog-author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  overflow: hidden;
}

.blog-author-avatar img {
  width: 100%;
  height: 100%;
  display: block;
}

.blog-article {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.1fr);
  column-gap: 2.5rem;
  align-items: flex-start;
  margin-top: 1.8rem;
}

.blog-article-content {
  max-width: 40rem;
}

.blog-article-image {
  border-radius: 1.6rem;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.blog-article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-article-intro {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

@media (max-width: 1024px) {
  .blog-article {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 1.8rem;
  }

  .blog-article-content {
    max-width: none;
  }
}

.about-text p {
  margin: 0 0 1.1rem;
}

.about-text a {
  color: #4ade80;
}

.about-photo {
  margin: 2.5rem 0 0;
  width: 220px;
}

.about-photo-img {
  width: 100%;
  display: block;
  border-radius: 1rem;
}

/* === PROJECT DETAIL PAGES === */

.project-detail {
  padding: 0 6vw 2.5rem;
  padding-top: 3rem;
  min-height: 100vh;
}

.detail-back {
  display: inline-block;
  font-size: 0.9rem;
  color: var(--muted);
}

.detail-back:hover {
  color: #e5e7eb;
}

.project-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
  align-items: center;
  column-gap: 3rem;
}

.project-detail-image-wrap {
  max-width: 700px;
}

.project-detail-image {
  width: 100%;
  height: auto;
  border-radius: 2.2rem;
  display: block;
}

.project-detail-info {
  max-width: 280px;
}

.project-detail-title {
  margin: 0 0 0.3rem;
  font-size: 1.5rem;
}

.project-detail-role,
.project-detail-year {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.project-detail-copy {
  margin-top: 1rem;
  color: var(--muted);
}

.project-tech {
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.project-tech li {
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  font-size: 0.8rem;
  color: #e5e7eb;
}

/* === CONTACT MODAL === */

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

.contact-modal.is-open {
  display: flex;
}

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

.contact-modal-body {
  position: relative;
  max-width: 420px;
  width: 90vw;
  background: #020617;
  border-radius: 1.4rem;
  border: 1px solid #1f2937;
  padding: 1.8rem 1.9rem 1.7rem;
  box-shadow: 0 22px 70px rgba(15, 23, 42, 0.85);
  z-index: 1;
}

.contact-modal-body h2 {
  margin: 0 0 0.9rem;
  font-size: 1.15rem;
}

.contact-modal-body p {
  margin: 0 0 1.1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.5rem 0.7rem;
  border-radius: 0.6rem;
  border: 1px solid #1f2937;
  background: #020617;
  color: #e5e7eb;
  font-size: 0.86rem;
}

.contact-form textarea {
  resize: vertical;
  min-height: 80px;
}

.contact-form-submit {
  align-self: flex-start;
  margin-top: 0.2rem;
  padding: 0.45rem 1.2rem;
  border-radius: 999px;
  border: none;
  background: var(--pill-bg);
  color: #e5e7eb;
  font-size: 0.86rem;
  cursor: pointer;
}

.contact-form-submit:hover {
  background: #1f2937;
}

.contact-form-status {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.contact-modal-links {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.9rem;
}

.contact-modal-links a {
  color: #e5e7eb;
}

.contact-modal-close {
  position: absolute;
  top: 0.9rem;
  right: 1.1rem;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.1rem;
}

.project-detail-cta{
  margin-top: 1.8rem;
}

.project-detail-btn {
  margin-top: 1.8rem;
  padding: 0.55rem 1.6rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 212, 255, 0.7);
  background: #020617;
  color: #00d4ff;
  font-size: 0.9rem;
  cursor: pointer;
}

.project-detail-btn:hover {
  background: #02081f;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.7);
}

/* Entrance animations */

.fade-in-left,
.fade-in-right,
.fade-in-up {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-left.is-visible,
.fade-in-right.is-visible,
.fade-in-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* === RESPONSIVE === */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 2rem;
    min-height: auto;
  }

  .site-nav {
    padding: 0.75rem 6vw;
  }

  .hero-social-proof,
  .hero-mini-grid {
    display: none;
  }

  .hero-left {
    position: static;
    margin-top: 2.5rem;
  }

  .hero-right {
    justify-content: flex-start;
    margin-top: 0.5rem;
  }

  .device-stack {
    align-items: flex-start;
    max-height: none;
    overflow: visible;
  }

  .hero-projects-label {
    margin-bottom: 1rem;
  }

  .device {
    width: min(480px, 90vw);
  }

  .project-detail-layout {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 2.5rem;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 2.8rem 8vw 3.2rem;
  }

  .device {
    width: 92vw;
  }

  .project-detail-btn {
    margin-bottom: 1.6rem;
    margin-top: 2.8rem;
  }
}
