@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300..700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap");

:root {
  --text: #bebebe;
  /* --background: #282c34; */
  --background: #1f2633;
  --primary: #6abdd2;
  --secondary: #1c3f4d;
  --accent: #d1944b;
}

.jet-mono {
  font-family: "JetBrains Mono", monospace;
  font-optical-sizing: auto;
  font-style: normal;
}

.space-g {
  font-family: "Space Grotesk", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}
h1 {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-style: normal;
  font-size: 500%;
  color: rgb(226, 226, 226);
}

h2,
h3,
h4,
h5 {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  font-style: normal;
  color: rgb(226, 226, 226);
}

.hero-title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-style: normal;
  font-size: 500%;
  color: rgb(226, 226, 226);
  line-height: 0.75;
}

.faded-title {
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.575), #d1954b7a);

  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.project-title {
  font-weight: 600;
}

html {
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    system-ui,
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif,
    Apple Color Emoji,
    "Segoe UI Emoji",
    "Segoe UI Symbol",
    "Noto Color Emoji";
  height: 100%;
}

body {
  font-family: "JetBrains Mono", monospace;
  min-height: 100vh;
  background-color: red;
  color: var(--text);
  font-size: 90%;
  padding-top: 80px;
  height: 100%;
}

a {
  color: white;
  text-decoration: none !important;
}

footer {
  border-top: 1px solid;
  text-align: center;
  background-color: #27272721;
}

.more-margin {
  margin-top: 20rem;
}

.more-margin2 {
  margin-top: 10rem;
}

.skip-link {
  position: absolute;
  top: -30px;
}

.skip-link:focus-visible {
  top: 5px;
}

/* ------ General Styles ------ */
.bg-light-g {
  background-color: #1b1b1b;
}

.bg-light {
  background-color: #fdfdfbab;
}

.white-text {
  color: rgb(226, 226, 226);
}

.yellow-text {
  color: rgb(221, 221, 61);
}

.red-text {
  color: rgb(204, 69, 69);
}

.c-primary {
  color: var(--primary);
}

.c-secondary {
  color: var(--secondary);
}

.c-accent {
  color: var(--accent);
}

.shapeless {
  clip-path: polygon(0% 5%, 90% 10%, 100% 100%, 5% 95%);
}

/* ------- Navigation -------- */
.nav-link {
  color: var(--primary);
}

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

.blur-nav {
  background: rgba(255, 255, 255, 0); /* transparent */
  backdrop-filter: blur(10px); /* blur effect */
  -webkit-backdrop-filter: blur(10px); /* Safari support */
  border-bottom: 1px solid rgba(112, 112, 112, 0.116); /* subtle edge */
}
/* ------ Custom Cards ------ */

.custom-card {
  background-color: #ffffff0c;
  padding: 4rem;
}

.project-text {
  background-color: #00000034;
  padding: 1rem;
}

.project-icon {
  font-size: 200%;
}

.link-icon {
  font-size: 130%;
}

.blog-card {
  background-color: #ffffff0c;
  border-radius: 0%;
  border-width: 0;
}

.project-card {
  max-width: 16rem;
}

@media (max-width: 540px) {
  .shapeless {
    clip-path: none;
  }

  .custom-card {
    background-color: #ffffff0c;
    padding: 1rem;
  }
}

@media (min-width: 540px) {
  .shifter {
    min-width: 5rem;
  }
}

/* ----- Projects List Cards ------ */

.featured-card {
  aspect-ratio: 1 / 1;
  display: flex;
  background-color: #ffffff0c;
  border-radius: 0%;
  border-width: 0;
  transition:
    filter 0.3s ease,
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.featured-card:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.featured-card .card-body {
  display: flex;
  flex-direction: column;
}

.tech-stack {
  margin-top: auto;
}

.featured-description {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.projects-text {
  font-size: 90%;
  font-weight: 100;
}

/* ----- profile image ------ */

.profile-img {
  filter: grayscale();
  transition:
    filter 0.3s ease,
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.profile-img:hover {
  filter: none;
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.section-title {
  display: flex;
  align-items: first baseline;
  gap: 12px;
  width: 100%;
}

.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--primary); /* change to your accent color if needed */
  margin-left: 12px;
}

.terminal-blink {
  display: inline-block;
  animation: terminalBlink 1s steps(1, end) infinite;
}

@keyframes terminalBlink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .terminal-blink {
    animation: none;
  }
}

/*  ----- Fixed BG ----- */

.bg-fixed {
  position: fixed;
  inset: 0;
  background: linear-gradient(var(--background), var(--secondary));
  z-index: -1;
}

.page-content {
  position: relative;
}

/*  ----- Blog Article ----- */

.l-text {
  font-weight: 100;
}
/*  ------ Buttons ----- */

.c-button {
  background-color: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 0px;
}

.c-button:hover {
  background-color: var(--primary);
  color: var(--secondary);
  border: 1px solid transparent;
  border-radius: 0px;
}

/*  ---- fix footer to the bottom ------  */
.page-content {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* ----- Form Page ----- */

.form-page-shell {
  margin-top: 2rem;
  margin-bottom: 3rem;
}

.form-page-title {
  margin-bottom: 1rem;
}

.form-page-intro {
  margin-bottom: 1.25rem;
}

.page-form {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(106, 189, 210, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 1.25rem;
}

.form-row {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  margin-bottom: 0.4rem;
  color: #e2e2e2;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.required-mark {
  color: var(--accent);
}

.page-form input,
.page-form select,
.page-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(15, 20, 28, 0.35);
  color: #f1f1f1;
  padding: 0.62rem 0.7rem;
  border-radius: 0;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.page-form input::placeholder,
.page-form textarea::placeholder {
  color: rgba(241, 241, 241, 0.52);
}

.page-form textarea {
  min-height: 9rem;
  resize: vertical;
}

.page-form input:focus,
.page-form select:focus,
.page-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(106, 189, 210, 0.22);
  background: rgba(15, 20, 28, 0.55);
}

.page-form input[type="checkbox"],
.page-form input[type="radio"] {
  width: auto;
  margin-right: 0.5rem;
  transform: translateY(1px);
}

.field-help {
  display: block;
  margin-top: 0.35rem;
  color: rgba(226, 226, 226, 0.76);
}

.form-errors,
.field-errors {
  border-left: 3px solid #da5b5b;
  background: rgba(218, 91, 91, 0.1);
  padding: 0.55rem 0.75rem;
}

.form-errors {
  margin-bottom: 1rem;
}

.field-errors {
  margin-top: 0.45rem;
}

.form-errors p,
.field-errors p {
  margin: 0;
  color: #ffb1b1;
}

.form-submit {
  margin-top: 0.55rem;
  padding: 0.55rem 1.15rem;
}

/*  ----- scroll adjust ----- */

#about,
#contact,
#articles,
#work {
  scroll-margin-top: 100px;
}

/* ----- Blog Index Page ----- */

.blog-index-shell {
  margin-top: 2rem;
  margin-bottom: 4rem;
}

.blog-index-hero {
  padding: 2.5rem;
}

.blog-index-title {
  margin-bottom: 0.85rem;
}

.blog-index-intro {
  max-width: 70ch;
  color: rgba(226, 226, 226, 0.9);
}

.blog-grid-row {
  margin-top: 2.25rem;
}

.blog-index-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(106, 189, 210, 0.22);
  border-radius: 0;
  overflow: hidden;
  transition:
    transform 0.26s ease,
    box-shadow 0.26s ease,
    border-color 0.26s ease;
}

.blog-index-card:hover {
  transform: translateY(-5px);
  border-color: rgba(106, 189, 210, 0.45);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25);
}

.blog-index-media-link {
  display: block;
}

.blog-index-media {
  width: 100%;
  height: auto;
  filter: grayscale(20%);
  transition: filter 0.26s ease;
}

.blog-index-card:hover .blog-index-media {
  filter: grayscale(0%);
}

.blog-index-meta {
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.blog-index-post-title {
  line-height: 1.25;
}

.blog-index-post-link {
  color: #e2e2e2;
}

.blog-index-post-link:hover {
  color: var(--primary);
}

.blog-index-summary {
  color: rgba(226, 226, 226, 0.78);
}

.blog-index-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.blog-empty {
  padding: 1.25rem;
  border: 1px dashed rgba(106, 189, 210, 0.45);
  background: rgba(255, 255, 255, 0.03);
}

/* ----- Blog Detail Page ----- */

.blog-code {
  overflow-x: auto;
  padding: 1rem;
  border-radius: 10px;
  background: #0f172a;
  color: #e5e7eb;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92rem;
  line-height: 1.45;
}

.blog-page-shell {
  margin-top: 2rem;
  margin-bottom: 3.5rem;
}

.blog-page-header {
  padding: 2.25rem;
}

.blog-page-title {
  margin-bottom: 0.9rem;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.1;
}

.blog-page-meta {
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.blog-page-authors {
  border-top: 1px solid rgba(106, 189, 210, 0.25);
  padding-top: 1rem;
}

.blog-page-author-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.blog-page-author-item {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(106, 189, 210, 0.28);
  padding: 0.35rem 0.55rem;
}

.blog-page-author-image img {
  width: 2rem;
  height: 2rem;
  object-fit: cover;
}

.blog-page-intro {
  color: rgba(226, 226, 226, 0.9);
  line-height: 1.75;
}

.blog-page-body {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(106, 189, 210, 0.2);
  padding: 1.3rem;
}

.blog-page-body p,
.blog-page-body li {
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.blog-page-body pre,
.blog-page-body code {
  max-width: 100%;
  overflow-x: auto;
}

.blog-page-body a {
  color: var(--primary);
  text-decoration: underline !important;
}

.blog-page-body a:hover {
  color: var(--accent);
}

.blog-gallery-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(106, 189, 210, 0.2);
  padding: 0.45rem;
}

.blog-gallery-caption {
  margin-top: 0.55rem;
  color: rgba(226, 226, 226, 0.78);
  font-size: 0.85rem;
}

.blog-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.blog-tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.6rem;
  border: 1px solid rgba(106, 189, 210, 0.34);
  background: rgba(255, 255, 255, 0.03);
  color: var(--primary);
  font-size: 0.82rem;
}

.blog-tag-pill:hover {
  border-color: var(--primary);
  color: var(--secondary);
  background: var(--primary);
}

@media (max-width: 768px) {
  h1 {
    font-size: 2.2rem;
  }

  .page-form {
    padding: 1rem;
  }

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

  .blog-index-hero {
    padding: 1.2rem;
    clip-path: none;
  }

  .blog-page-header {
    padding: 1rem;
    clip-path: none;
  }

  .blog-page-author-item {
    width: 100%;
  }

  .blog-page-body {
    padding: 1rem;
  }
}

/* ----- Custom mobile nav toggler ----- */
.c-nav-toggle {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(106, 189, 210, 0.55);
  border-radius: 0;
  background: rgba(28, 63, 77, 0.25);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  line-height: 0;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.c-nav-toggle:focus {
  box-shadow: none;
}

.c-nav-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.c-nav-toggle:hover {
  border-color: var(--primary);
  background: rgba(28, 63, 77, 0.45);
}

.c-nav-toggle-icon {
  width: 20px;
  height: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 0 0 auto;
}

.c-nav-toggle-icon span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--primary);
  transform-origin: center;
  transition:
    transform 0.25s ease,
    opacity 0.2s ease,
    background 0.25s ease;
}

/* Animated morph: burger -> close */
.c-nav-toggle[aria-expanded="true"] .c-nav-toggle-icon span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
  background: var(--accent);
}

.c-nav-toggle[aria-expanded="true"] .c-nav-toggle-icon span:nth-child(2) {
  opacity: 0;
}

.c-nav-toggle[aria-expanded="true"] .c-nav-toggle-icon span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
  background: var(--accent);
}
