@import url("https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Great+Vibes&display=swap");

/* Ensure fallback fonts are visually similar to custom fonts */
html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
}

body {
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.hero-name {
  font-family: "Great Vibes", serif; /* cursive fallback */
}

@font-face {
  font-family: "Charter";
  font-style: normal;
  font-weight: normal;
  src: url("../fonts/Charter/charter_regular.woff2") format("woff2");
}
@font-face {
  font-family: "Charter";
  font-style: italic;
  font-weight: normal;
  src: url("../fonts/Charter/charter_italic.woff2") format("woff2");
}
@font-face {
  font-family: "Charter";
  font-style: normal;
  font-weight: bold;
  src: url("../fonts/Charter/charter_bold.woff2") format("woff2");
}
@font-face {
  font-family: "Charter";
  font-style: italic;
  font-weight: bold;
  src: url("../fonts/Charter/charter_bold_italic.woff2") format("woff2");
}

/* ===== RESET ===== */

a, abbr, acronym, address, applet, article, aside, audio, b, big, blockquote, body, canvas, caption, center, cite, code, dd, del, details, dfn, div, dl, dt, em, fieldset, figcaption, figure, footer, form, h1, h2, h3, h4, h5, h6, header, hgroup, html, i, iframe, img, ins, kbd, label, legend, li, mark, menu, nav, object, ol, p, pre, q, s, samp, section, small, span, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, time, tr, tt, u, ul, var, video {
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  font: inherit;
  vertical-align: baseline;
}

article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
  display: block;
}

/* ===== LIGHT THEME DEFAULTS ===== */

body {
  background-color: #fafafa;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  color: #353535;
}

p, a, code, pre, ol, ul, li {
  color: #353535;
  line-height: 1.6;
  font-weight: 300;
  font-size: 18px;
  font-family: "Poppins", sans-serif;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Poppins", sans-serif;
  font-weight: 400; 
}

a {
  text-underline-offset: 1px;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
}
a:hover {
  color: inherit;
}

b {
  font-weight: 600;
}

em {
  font-style: italic;
}

sub {
  font-weight: inherit;
  font-size: 0.65em;
  position: relative;
  top: 0.3em;
}

sup {
  font-weight: inherit;
  font-size: 0.65em;
  position: relative;
  top: -0.5em;
}

hr {
  border: 0;
  height: 0;
  border-top: 1px solid rgb(0, 0, 0);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
hr.hard {
  border-top: 1px solid rgba(0, 0, 0, 0.5);
}
hr.soft {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

img {
  width: 100%;
  margin: 0 auto;
  display: block;
}

video {
  width: 100%;
  margin: 0 auto;
  display: block;
}

svg {
  width: 100%;
}

.container {
  padding-right: calc(6vw - (100vw - 100%));
  padding-left: 6vw;
  flex: 1;
  background-color: #fafafa;
}

::-moz-selection {
  color: white;
  background: #353535;
}
::selection {
  color: white;
  background: #353535;
}

/* ===== RESPONSIVE TYPOGRAPHY / CONTAINERS ===== */
@media screen and (max-width: 769px) {
  a, p, td, th, tr, code, pre, ol, ul, li, div {
    font-size: 15px;
  }
  h1 {
    font-size: 24px;
    line-height: 1.2;
    padding: 1.5vh 0;
    
  }
  h1.title {
    font-weight: 500;
    font-size: 26px;
  }
  h2 {
    line-height: 1.3;     /* slightly more relaxed */
    padding: 2vh 0 0.5vh;
    font-size: 22px;      /* was 18px */
  }
  h3 {
    line-height: 1.2;
    padding: 1.5vh 0;
    font-size: 17px;
    font-style: italic;
  }
}

@media screen and (min-width: 769px) {
  .container {
    padding-right: calc(8.5vw - (100vw - 100%));
    padding-left: 8.5vw;
  }
  a, p, td, th, tr, code, pre, ol, ul, li, div {
    font-size: 16px;
  }
  h1 {
    font-size: 24px;
    line-height: 1.2;
    padding: 2vh 0;
  }
  h1.title {
    padding: 0 0 1vh;
    font-weight: 500;
    font-size: 26px;
  }
  h2 {
    line-height: 1.3;     /* slightly more relaxed */
    padding: 3vh 0 0.75vh;
    font-size: 22px;      /* was 18px */
  }
  h3 {
    line-height: 1.2;
    padding: 2vh 0;
    font-size: 17px;
  }
}

@media screen and (min-width: 992px) {
  .container {
    padding-right: calc(12vw - (100vw - 100%));
    padding-left: 12vw;
  }
}
@media screen and (min-width: 1200px) {
  .container {
    padding-right: calc(15vw - (100vw - 100%));
    padding-left: 15vw;
  }
}
@media screen and (min-width: 1600px) {
  .container {
    padding-right: calc(18vw - (100vw - 100%));
    padding-left: 18vw;
  }
}
@media screen and (min-width: 2000px) {
  .container {
    padding-right: calc(22vw - (100vw - 100%));
    padding-left: 22vw;
  }
}
@media screen and (min-width: 2400px) {
  .container {
    padding-right: calc(24vw - (100vw - 100%));
    padding-left: 24vw;
  }
}
@media screen and (min-width: 3200px) {
  .container {
    padding-right: calc(32vw - (100vw - 100%));
    padding-left: 28vw;
  }
}


/* ===== FOOTER ===== */

footer {
  padding: 3vh 0px;
  background-color: #fafafa;
}
footer span {
  padding: 0 1px;
  font-size: 0.85em;
}
footer p {
  font-style: italic;
}
@media screen and (min-width: 992px) {
  footer {
    padding: 3vh 0px;
    background-color: #fafafa;
  }
}
@media screen and (min-width: 1200px) {
  footer {
    padding: 4vh 0px;
    background-color: #fafafa;
  }
}
@media screen and (min-width: 1600px) {
  footer {
    padding: 5vh 0px;
  }
}

/* ===== BLOG LAYOUT (unchanged from original) ===== */
/* keep all your existing blog styles below */

div.container.blog#first-content {
  padding-top: 2vh;
  background-color: #f6f6f6;
}
/* ... keep all blog-related rules exactly as they were ... */
/* (for brevity I’m not re-pasting them; just leave your current
   blog section CSS exactly as-is starting from div.container.blog…) */


/* ===== TABLES, CODE, SLIDERS, VIDEO, SLIDESHOW ===== */
/* keep all of these sections exactly as in your current file
   (table styles, code styles, slider, video control, slideshow, etc.)
   – no change needed for light/dark beyond globals above. */

/* ===== NAVBAR + THEME TOGGLE ===== */

/* Hero big name */

/* Header row: name (left) + photo (right) */

.hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-top: 1vh;
  padding-bottom: 0.5vh;
}

/* Left side: name + tagline */
.hero-header-text {
  flex: 1 1 auto;
}

.hero-name {
  font-family: "Great Vibes", cursive;
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: none;
}

.hero-tagline {
  margin-top: 0.25rem;
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.7;
}

/* Right side: circular photo */
.hero-header-photo {
  flex: 0 0 auto;           /* fixed-size column, no wrap */
  display: flex;
  justify-content: center;
}

.hero-header-photo img {
  width: 250px;        /* same width and height */
  height: 250px;
  border-radius: 50%;  /* makes it circular */
  object-fit: cover;   /* crops nicely inside the circle */
  border: none;
}

#about {
  margin-top: 1.5rem;      /* if you don't have this yet, add it */
}

/* Make row adapt but NOT stack on smaller screens */
@media screen and (max-width: 600px) {
  .hero-header {
    padding-top: 3vh;
    padding-bottom: 3vh;
    gap: 1.5rem;
  }

  .hero-name {
    font-size: clamp(2.2rem, 8vw, 3rem);
  }

  .hero-header-photo img {
    width: 120px;
    height: 120px;
  }
}


.navbar {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.navbar a {
  text-decoration: none;
  font-weight: 500;
}

/* Toggle button */
.theme-toggle {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1.1rem;
  margin-left: auto;
}

/* ===== GLOBAL LINK COLOR (light mode) ===== */

a {
  color: #111827;        /* dark gray, like Pulkit's text */
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ===== DARK THEME (FINAL) ===== */

/* Dark background everywhere */
body.dark-theme {
  background-color: #020617;       /* very dark gray */
  color: #e5e7eb;                  /* soft off-white */
}

/* All content containers use dark background */
body.dark-theme .container {
  background-color: #020617;
}

/* All text inside containers becomes soft white */
body.dark-theme .container * {
  color: #e5e7eb;
}

/* Links in dark mode */
body.dark-theme a {
  color: #e5e7eb;
}

/* Code blocks in dark mode */
body.dark-theme code {
  background-color: rgba(15,23,42,0.8);
  border-color: #1f2937;
  color: #e5e7eb;
}

body.dark-theme pre code {
  background-color: #020617 !important;
  color: #e5e7eb !important;
}

/* Footer matches dark background */
body.dark-theme footer,
body.dark-theme footer * {
  background-color: #020617;
  color: #e5e7eb;
}

footer {
  padding: 1.5vh 0;          /* was 3–5vh, this makes it shorter */
  background-color: #fafafa; /* or #020617 in dark mode */
}

footer p {
  font-style: italic;
  font-size: 0.8rem;         /* smaller text */
  line-height: 1.3;
}

footer span {
  font-size: 0.75rem;
}


footer p {
  font-style: italic;
  font-size: 0.8rem;      /* smaller text */
  line-height: 1.3;
}

/* force footer links to match footer text size */
footer a {
  font-size: 0.8rem;      /* same as footer p */
  font-weight: 400;       /* optional: less bold */
}
footer p,
footer a {
  margin-top: 3rem;   /* add blank space above footer */
  font-size: 0.65rem;
}
.hero-name {
  font-family: "Great Vibes", cursive;
  font-size: clamp(3.5rem, 12vw, 7rem);
  font-weight: 400;              /* script fonts usually look best at normal weight */
  letter-spacing: 0.05em;        /* less spacing for script */
  text-transform: none;          /* keep natural casing */
}
.hero-shell {
  padding-top: 0.5vh;
  padding-bottom: 1vh;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end; /* links on the right, like Pulkit */
  gap: 2rem;
  margin-bottom: 2rem;
}

.top-nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-family: "Poppins", sans-serif;  /* explicit, matches body */
  font-size: 0.95rem;                  /* tweak as you like */
  font-weight: 400;                    /* 300 in body, 400 here */
}

.top-nav a {
  color: #111827;
  font-family: "Poppins", sans-serif;  /* ensure same face */
  font-size: inherit;
  font-weight: inherit;
}


.top-nav a:hover {
  text-decoration: underline;
}

/* keep theme toggle aligned nicely */
.top-nav .theme-toggle {
  margin-left: 0;
}
.social-links {
  margin-top: 1rem;
  display: flex;
  justify-content: center;  /* center horizontally */
  gap: 1rem;
  align-items: center;
}

.social-links a {
  font-size: 1.3rem;
  color: #111827;
}

.social-links a:hover {
  text-decoration: none;
  color: #353535;
}

/* Contact Form Styles */
.form-group {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
}

input[type="text"],
input[type="email"],
textarea {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  background-color: #fff;
  color: #111827;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  outline: none;
  border-color: #353535;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea {
  resize: vertical;
  min-height: 150px;
}

input[type="submit"].submit-btn {
  background-color: #353535;
  color: white;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
  font-weight: 500;
  font-family: "Poppins", sans-serif;
  text-transform: none;
  letter-spacing: 0;
}

input[type="submit"].submit-btn:hover {
  background-color: #1d4ed8;
  opacity: 1;
}

#form-status {
  margin-top: 1rem;
  font-weight: 500;
}

/* Dark theme form styling */
body.dark-theme input[type="text"],
body.dark-theme input[type="email"],
body.dark-theme textarea {
  background-color: #1f2937;
  color: #e5e7eb;
  border-color: #374151;
}

body.dark-theme input[type="text"]:focus,
body.dark-theme input[type="email"]:focus,
body.dark-theme textarea:focus {
  border-color: #60a5ff;
  box-shadow: 0 0 0 3px rgba(96, 165, 255, 0.1);
}

/* ===== CONTACT FORM STYLES (FORCE OVERRIDE) ===== */

form[name="contact"] input[type="text"],
form[name="contact"] input[type="email"],
form[name="contact"] textarea {
  padding: 0.75rem !important;
  border: 1px solid #999 !important;
  border-radius: 6px !important;
  font-family: "Poppins", sans-serif !important;
  font-size: 1rem !important;
  background-color: #fff !important;
  color: #111827 !important;
  box-sizing: border-box !important;
  width: 100% !important;
  display: block !important;
  margin: 0 0 1.5rem 0 !important;
}

form[name="contact"] input[type="text"]:focus,
form[name="contact"] input[type="email"]:focus,
form[name="contact"] textarea:focus {
  outline: none !important;
  border-color: #353535 !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
}

form[name="contact"] textarea {
  resize: vertical !important;
  min-height: 150px !important;
}

form[name="contact"] input[type="submit"] {
  background-color: #353535 !important;
  color: white !important;
  padding: 0.75rem 2rem !important;
  border: none !important;
  border-radius: 6px !important;
  font-size: 1rem !important;
  cursor: pointer !important;
  font-weight: 500 !important;
  font-family: "Poppins", sans-serif !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  display: inline-block !important;
  margin-top: 0.5rem !important;
}

form[name="contact"] input[type="submit"]:hover {
  background-color: #111827 !important;
}


/* Dark theme */
body.dark-theme form[name="contact"] input[type="text"],
body.dark-theme form[name="contact"] input[type="email"],
body.dark-theme form[name="contact"] textarea {
  background-color: #1f2937 !important;
  color: #e5e7eb !important;
  border-color: #374151 !important;
}

body.dark-theme form[name="contact"] input[type="submit"] {
  background-color: #e5e7eb !important;
  color: #020617 !important;
}

body.dark-theme form[name="contact"] input[type="submit"]:hover {
  background-color: #d1d5db !important;
}

body.dark-theme form[name="contact"] input[type="text"]:focus,
body.dark-theme form[name="contact"] input[type="email"]:focus,
body.dark-theme form[name="contact"] textarea:focus {
  border-color: #60a5ff !important;
  box-shadow: 0 0 0 3px rgba(96, 165, 255, 0.1) !important;
}
.section-intro {
  max-width: 640px;
  margin-bottom: 2rem;
  color: #94a3b8;
}

.posts-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.post-item {
  padding: 1.5rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.4);
}

.post-title {
  margin: 0 0 0.4rem;
}

.post-title a {
  color: #111827;
  text-decoration: none;
  font-weight: bold;
}

.post-title a:hover {
  text-decoration: underline;
}

.post-meta {
  margin: 0 0 0.9rem;
  font-size: 0.85rem;
  color: #111827;
}

.post-excerpt {
  margin: 0;
}

/* Filter Controls */
#filter-container {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1.5rem 0 2rem 0;
}

.filter-btn {
  font-family: "Poppins", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.4rem 1rem;
  border-radius: 2rem;
  border: 1px solid #ccc;
  background: transparent;
  color: #353535;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: #353535;
}

.filter-btn.active {
  background-color: #353535;
  color: #fff;
  border-color: #353535;
}

/* Pagination Controls */
#pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 3rem 0;
}

.pagi-btn {
  font-family: "Poppins", sans-serif;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid #ccc;
  color: #353535;
  cursor: pointer;
  border-radius: 4px;
}

.pagi-btn.active {
  background: #353535;
  color: #fff;
  border-color: #353535;
}

.pagi-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Pagination Controls - DARK THEME SUPPORT - Aligns with your body.dark-theme logic */
body.dark-theme .filter-btn {
  color: #e5e7eb;
  border-color: #374151;
}

body.dark-theme .filter-btn.active {
  background-color: #e5e7eb;
  color: #020617;
}

body.dark-theme .pagi-btn {
  color: #e5e7eb;
  border-color: #374151;
}

body.dark-theme .pagi-btn.active {
  background-color: #e5e7eb;
  color: #020617;
}

/* Mobile Navigation Fix */
@media (max-width: 600px) {
  .top-nav-links {
    display: flex;
    flex-wrap: wrap; /* Allows links to go to a second line if they don't fit */
    justify-content: right;
    gap: 8px;
    padding: 10px 0;
  }

  .top-nav-links a {
    font-size: 0.85rem; /* Slightly smaller text for mobile */
    margin: 4px !important;
  }

  .theme-toggle {
    margin-left: 5px !important;
  }
}

/* TLDR Box - Matching blog listing card style */
/* .tldr-box {
    background: #f1f3f5;
    border-radius: 12px;
    padding: 28px 32px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
} */

.tldr-box p {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.55;
}

.post-item {
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.4);
}

.tldr-box {
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.4);
}