/* =======================================================================
   DaoDung -- Main Stylesheet | Dark Theme + Mobile-First | v2.0
   ======================================================================= */

/* ===================== VARIABLES ===================== */
:root {
  --bg: #090909;
  --bg-2: #111115;
  --bg-card: #141418;
  --bg-hover: #1c1c22;
  --bg-input: #0f0f13;
  --bg-glass: rgba(14, 14, 18, 0.88);
  --text: #ededf0;
  --text-2: #9090a0;
  --text-3: #606075;
  --border: #1e1e28;
  --border-2: #2e2e3e;
  --border-3: #3e3e52;
  --accent: #8b7cf8;
  --accent-light: rgba(139, 124, 248, 0.12);
  --accent-glow: 0 0 28px rgba(139, 124, 248, 0.22);
  --green: #4ade80;
  --red: #f87171;
  --yellow: #facc15;
  --blue: #60a5fa;
  --nav-h: 64px;
  --mob-nav: 60px;
  --r: 8px;
  --r-lg: 14px;
  --r-xl: 20px;
  --max-w: 1160px;
  --max-w-n: 740px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --t: 0.2s;
  --t-slow: 0.35s;
}

/* ===================== RESET ===================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
ul {
  list-style: none;
}
button {
  cursor: pointer;
  font-family: inherit;
}
code,
pre {
  font-family: "JetBrains Mono", "Fira Code", monospace;
}
::selection {
  background: rgba(139, 124, 248, 0.25);
}

/* ===================== UTILITIES ===================== */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 1.5rem);
}
.container--narrow {
  max-width: var(--max-w-n);
}

/* ===================== SCROLLBAR ===================== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-2);
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--border-3);
}

/* ===================== NAVIGATION ===================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 500;
  height: var(--nav-h);
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--t);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  gap: 1rem;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}
.logo-img {
  height: 32px;
  width: auto;
}
.logo-text {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--text) 30%, var(--text-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.1rem;
}
.nav-link {
  padding: 0.38rem 0.75rem;
  border-radius: var(--r);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
  transition:
    color var(--t) var(--ease),
    background var(--t) var(--ease);
  white-space: nowrap;
}
.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: var(--bg-hover);
}
.nav-link--cta {
  border: 1px solid var(--border-2);
  color: var(--text) !important;
  margin-left: 0.4rem;
}
.nav-link--cta:hover {
  border-color: var(--accent);
  background: var(--accent-light) !important;
  color: var(--accent) !important;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: none;
  border: 1px solid var(--border-2);
  border-radius: var(--r);
  padding: 7px;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition:
    transform var(--t) var(--ease),
    opacity var(--t);
}
.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===================== MOBILE BOTTOM NAV ===================== */
.mob-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--mob-nav);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  z-index: 400;
}
.mob-nav-inner {
  display: flex;
  height: 100%;
}
.mob-nav-link {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-3);
  font-size: 0.6rem;
  font-weight: 500;
  transition: color var(--t);
  -webkit-tap-highlight-color: transparent;
}
.mob-nav-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.mob-nav-link.active {
  color: var(--accent);
}
.mob-nav-link:active {
  opacity: 0.7;
}

/* ===================== LAYOUT ===================== */
.main-content {
  flex: 1;
}

/* ===================== FOOTER ===================== */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.25rem 0;
  margin-top: auto;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: var(--text-3);
}
.footer-copy a {
  color: var(--text-2);
}
.footer-copy a:hover {
  color: var(--text);
}
.footer-links {
  display: flex;
  gap: 1.5rem;
}
.footer-links a {
  color: var(--text-3);
  transition: color var(--t);
}
.footer-links a:hover {
  color: var(--text-2);
}

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.58rem 1.3rem;
  border-radius: var(--r);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
  border: 1px solid transparent;
  transition: all var(--t) var(--ease);
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}
.btn--primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn--primary:hover {
  background: #7a6be0;
  border-color: #7a6be0;
}
.btn--outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border-2);
}
.btn--outline:hover {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
}
.btn--ghost {
  background: transparent;
  color: var(--text-2);
  border-color: var(--border);
}
.btn--ghost:hover {
  background: var(--bg-hover);
  border-color: var(--border-2);
  color: var(--text);
}
.btn--danger {
  background: transparent;
  color: var(--red);
  border-color: var(--red);
}
.btn--danger:hover {
  background: rgba(248, 113, 113, 0.1);
}
.btn--sm {
  padding: 0.32rem 0.8rem;
  font-size: 0.8rem;
}
.btn--lg {
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
}
.btn--full {
  width: 100%;
}

/* ===================== ALERTS ===================== */
.alert {
  padding: 0.85rem 1.1rem;
  border-radius: var(--r);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
}
.alert--success {
  background: rgba(74, 222, 128, 0.08);
  border-color: rgba(74, 222, 128, 0.25);
  color: var(--green);
}
.alert--error {
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.25);
  color: var(--red);
}

/* ===================== SECTIONS ===================== */
.section {
  padding: clamp(3rem, 6vw, 5rem) 0;
}
.section--alt {
  background: var(--bg-2);
}
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2.25rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.section-title {
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.section-more {
  color: var(--text-2);
  font-size: 0.875rem;
  transition: color var(--t);
}
.section-more:hover {
  color: var(--accent);
}

/* ===================== PAGE HERO ===================== */
.page-hero {
  padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(1.5rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  top: -80px;
  left: -80px;
  width: 400px;
  height: 400px;
  background: radial-gradient(
    circle,
    rgba(139, 124, 248, 0.06) 0%,
    transparent 70%
  );
  pointer-events: none;
}
.page-title {
  font-size: clamp(1.75rem, 6vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.1;
}
.page-subtitle {
  margin-top: 0.65rem;
  color: var(--text-2);
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  max-width: 560px;
}

/* ===================== HOME HERO ===================== */
.hero {
  padding: clamp(4rem, 8vw, 7rem) 0 clamp(3rem, 6vw, 5rem);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(139, 124, 248, 0.07) 0%,
    transparent 65%
  );
  pointer-events: none;
}
.hero .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}
.hero-content {
  flex: 1;
  min-width: 0;
}
.hero-greeting {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.65rem;
  font-weight: 600;
}
.hero-name {
  font-size: clamp(2.2rem, 7vw, 4.25rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1.05;
  margin-bottom: 0.5rem;
}
.hero-role {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--text-2);
  margin-bottom: 1.1rem;
}
.hero-bio {
  max-width: 500px;
  color: var(--text-2);
  margin-bottom: 2rem;
  line-height: 1.75;
}
.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.hero-visual {
  flex-shrink: 0;
}
.hero-avatar {
  width: clamp(160px, 20vw, 220px);
  height: clamp(160px, 20vw, 220px);
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-3);
  box-shadow: var(--accent-glow);
}
.hero-avatar-placeholder {
  width: clamp(160px, 20vw, 220px);
  height: clamp(160px, 20vw, 220px);
  border-radius: 50%;
  border: 1px dashed var(--border-2);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  color: var(--text-3);
  font-size: 3rem;
}

/* Quick links */
.quick-links {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  justify-content: center;
}
.quick-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  color: var(--text-2);
  transition: all var(--t) var(--ease);
  font-size: 0.9rem;
  background: var(--bg-card);
}
.quick-link:hover {
  border-color: var(--accent);
  color: var(--text);
  background: var(--accent-light);
  transform: translateY(-2px);
}
.quick-link span {
  font-size: 1.15rem;
}

/* ===================== CARDS ===================== */
.card-grid {
  display: grid;
  gap: 1.25rem;
}
.card-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}
.card-grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition:
    border-color var(--t) var(--ease),
    transform var(--t) var(--ease),
    box-shadow var(--t);
  display: flex;
  flex-direction: column;
}
.card:hover {
  border-color: var(--border-2);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}
.card-thumb {
  overflow: hidden;
  aspect-ratio: 16/9;
}
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease);
}
.card:hover .card-thumb img {
  transform: scale(1.04);
}
.card-body {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}
.card-date {
  font-size: 0.75rem;
  color: var(--text-3);
}
.card-title {
  font-size: 0.975rem;
  font-weight: 600;
  line-height: 1.45;
}
.card-title a {
  transition: color var(--t);
}
.card-title a:hover {
  color: var(--accent);
}
.card-text {
  font-size: 0.85rem;
  color: var(--text-2);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-link {
  font-size: 0.82rem;
  color: var(--text-2);
  margin-top: auto;
  transition: color var(--t);
}
.card-link:hover {
  color: var(--accent);
}

/* Tool cards */
.tool-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 6px;
}
.tool-icon-placeholder {
  width: 40px;
  height: 40px;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tool-card-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.45rem;
}
.tool-actions {
  margin-top: auto;
  padding-top: 0.7rem;
}
.tool-category {
  margin-bottom: 3rem;
}
.tool-category-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  margin-bottom: 1.1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* ===================== PAGINATION ===================== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}
.page-btn {
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text-2);
  font-size: 0.875rem;
  transition: all var(--t);
}
.page-btn:hover,
.page-btn--active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ===================== ABOUT ===================== */
.about-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 3rem;
  align-items: start;
}
.about-avatar {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-3);
  box-shadow: var(--accent-glow);
}
.about-avatar-placeholder {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 1px dashed var(--border-2);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  color: var(--text-3);
  font-size: 2.5rem;
}
.about-meta {
  margin-top: 1.25rem;
}
.about-meta h2 {
  font-size: 1.3rem;
  font-weight: 700;
}
.about-role {
  color: var(--text-2);
  margin: 0.25rem 0 1rem;
  font-size: 0.875rem;
}
.about-info-list {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-2);
}
.about-info-list strong {
  color: var(--text);
}
.about-section-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.about-bio-block,
.about-skills-block,
.about-timeline-block {
  margin-bottom: 2.5rem;
}
.about-bio-block p {
  color: var(--text-2);
}
/* Skills */
.skills-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.skill-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  margin-bottom: 0.3rem;
  color: var(--text-2);
}
.skill-bar {
  height: 4px;
  background: var(--bg-hover);
  border-radius: 2px;
  overflow: hidden;
}
.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #a78bfa);
  border-radius: 2px;
  transition: width 0.7s var(--ease);
}
/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
}
.timeline-item {
  display: flex;
  gap: 1.25rem;
  position: relative;
  padding-bottom: 1.75rem;
}
.timeline-item:last-child {
  padding-bottom: 0;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 16px;
  bottom: 0;
  width: 1px;
  background: var(--border);
}
.timeline-item:last-child::before {
  display: none;
}
.timeline-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid var(--border-3);
  background: var(--bg-card);
  flex-shrink: 0;
  margin-top: 4px;
}
.timeline-content h4 {
  font-size: 0.95rem;
  font-weight: 600;
}
.timeline-period {
  font-size: 0.78rem;
  color: var(--text-3);
  display: block;
  margin: 0.2rem 0 0.5rem;
}
.timeline-content p {
  font-size: 0.875rem;
  color: var(--text-2);
}

/* ===================== SOCIAL ===================== */
.social-grid {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.social-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: all var(--t) var(--ease);
  overflow: hidden;
}
.social-card:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
  transform: translateX(4px);
}
.social-card-inner {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1rem 1.25rem;
}
.social-icon {
  font-size: 1.5rem;
  width: 2.25rem;
  text-align: center;
  flex-shrink: 0;
}
.social-icon-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 6px;
  flex-shrink: 0;
}
.social-info {
  flex: 1;
  min-width: 0;
}
.social-name {
  font-weight: 600;
  font-size: 0.975rem;
}
.social-url {
  font-size: 0.77rem;
  color: var(--text-3);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.social-arrow {
  color: var(--text-3);
  font-size: 1rem;
  flex-shrink: 0;
  transition:
    color var(--t),
    transform var(--t);
}
.social-card:hover .social-arrow {
  color: var(--accent);
  transform: translateX(2px);
}

/* ===================== CONTACT ===================== */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 3rem;
  align-items: start;
}
.contact-form-title,
.contact-info-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.4rem;
}
.contact-info {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
}
.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.contact-info-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.contact-info-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  width: 1.8rem;
}
.contact-info-item strong {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.15rem;
}
.contact-info-item a,
.contact-info-item span {
  font-size: 0.85rem;
  color: var(--text-2);
}
.contact-social h3 {
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.7rem;
  color: var(--text-2);
}

/* ===================== DEVICES/ADVICE ===================== */
.advice-intro {
  max-width: 700px;
  color: var(--text-2);
  margin-bottom: 2.5rem;
  font-size: 1rem;
}
.card--advice .advice-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}
.advice-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-top: 0.75rem;
}
.advice-list li {
  font-size: 0.84rem;
  color: var(--text-2);
  padding-left: 1rem;
  position: relative;
}
.advice-list li::before {
  content: "-";
  position: absolute;
  left: 0;
  color: var(--text-3);
}
.advice-cta {
  text-align: center;
  padding: clamp(2.5rem, 5vw, 4rem) 2rem;
  margin-top: 3rem;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--bg-2);
  position: relative;
  overflow: hidden;
}
.advice-cta::before {
  content: "";
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 300px;
  background: radial-gradient(
    circle,
    rgba(139, 124, 248, 0.08),
    transparent 70%
  );
  pointer-events: none;
}
.advice-cta h2 {
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  margin-bottom: 0.6rem;
}
.advice-cta p {
  color: var(--text-2);
  margin-bottom: 1.5rem;
}

/* ===================== BLOG POST ===================== */
.post-header {
  padding: clamp(2.5rem, 5vw, 4rem) 0 2rem;
  border-bottom: 1px solid var(--border);
}
.post-date {
  font-size: 0.82rem;
  color: var(--text-3);
  display: block;
  margin-bottom: 0.65rem;
}
.post-title {
  font-size: clamp(1.7rem, 5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.15;
}
.post-excerpt {
  margin-top: 0.9rem;
  color: var(--text-2);
  font-size: 1.05rem;
}
.post-featured-img {
  max-height: 460px;
  overflow: hidden;
  border-radius: var(--r-lg);
  margin-top: 2rem;
}
.post-featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-body {
  padding: clamp(2rem, 4vw, 3rem) 0;
}
.post-content {
  color: var(--text-2);
  font-size: 1.02rem;
  line-height: 1.85;
}
.post-content h1,
.post-content h2,
.post-content h3 {
  color: var(--text);
  margin: 1.75em 0 0.75em;
  letter-spacing: -0.02em;
}
.post-content h2 {
  font-size: 1.4rem;
}
.post-content h3 {
  font-size: 1.15rem;
}
.post-content p {
  margin-bottom: 1.2em;
}
.post-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.post-content ul,
.post-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.2em;
}
.post-content li {
  margin-bottom: 0.3em;
}
.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  color: var(--text-3);
  font-style: italic;
  background: var(--bg-card);
  border-radius: 0 var(--r) var(--r) 0;
}
.post-content pre {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.85rem;
}
.post-content code {
  background: var(--bg-2);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.875em;
  color: var(--accent);
}
.post-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}
.post-content img {
  width: 100%;
  border-radius: var(--r);
  margin: 1.5rem 0;
}
.post-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.post-updated {
  font-size: 0.78rem;
  color: var(--text-3);
}

/* ===================== FORMS ===================== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.form-group:last-child {
  margin-bottom: 0;
}
.form-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-2);
}
.form-input {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text);
  font-family: inherit;
  font-size: 0.925rem;
  padding: 0.6rem 0.85rem;
  transition:
    border-color var(--t),
    box-shadow var(--t);
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}
.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 124, 248, 0.12);
}
.form-input::placeholder {
  color: var(--text-3);
}
.form-textarea {
  resize: vertical;
  min-height: 120px;
}
.form-textarea--sm {
  min-height: 80px;
}
.form-textarea--editor {
  min-height: 380px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.84rem;
  line-height: 1.7;
}
.form-hint {
  font-size: 0.77rem;
  color: var(--text-3);
}
.form-row {
  display: grid;
  gap: 1rem;
}
.form-row--2 {
  grid-template-columns: 1fr 1fr;
}
.input-group {
  display: flex;
}
.input-group .form-input {
  border-radius: var(--r) 0 0 var(--r);
}
.input-suffix {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 var(--r) var(--r) 0;
  padding: 0 0.8rem;
  color: var(--text-3);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: color var(--t);
}
.input-suffix:hover {
  color: var(--text);
}

/* ===================== BADGES ===================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge--green {
  background: rgba(74, 222, 128, 0.12);
  color: var(--green);
}
.badge--gray {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-2);
}
.badge--yellow {
  background: rgba(250, 204, 21, 0.12);
  color: var(--yellow);
}
.badge--blue {
  background: rgba(96, 165, 250, 0.12);
  color: var(--blue);
}

/* ===================== EMPTY STATE ===================== */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-3);
}
.empty-state a {
  color: var(--accent);
}

/* ===================== AUTH ===================== */
.auth-layout {
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-wrap {
  width: 100%;
  max-width: 420px;
  padding: 1.25rem;
}
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 2.25rem 2rem;
}
.auth-header {
  text-align: center;
  margin-bottom: 1.75rem;
}
.auth-title {
  font-size: 1.5rem;
  font-weight: 700;
}
.auth-sub {
  color: var(--text-3);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* ===================== RESPONSIVE 1024px ===================== */
@media (max-width: 1024px) {
  .card-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact-layout {
    grid-template-columns: 1fr;
  }
  .contact-info {
    position: static;
  }
}

/* ===================== RESPONSIVE 768px ===================== */
@media (max-width: 768px) {
  :root {
    --nav-h: 58px;
  }
  body {
    padding-bottom: var(--mob-nav);
  }

  /* Show mobile bottom nav */
  .mob-nav {
    display: block;
  }

  /* Hamburger visible, desktop menu hidden by default */
  .nav-toggle {
    display: flex;
  }
  .nav-menu {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1rem 1rem;
    gap: 0.25rem;
    z-index: 499;
  }
  .nav-menu.open {
    display: flex;
  }
  .nav-link {
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
  }
  .nav-link--cta {
    margin-left: 0;
    margin-top: 0.35rem;
    text-align: center;
  }

  /* Hero */
  .hero .container {
    flex-direction: column-reverse;
    gap: 2rem;
    text-align: center;
  }
  .hero-bio {
    max-width: 100%;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-avatar,
  .hero-avatar-placeholder {
    width: 140px;
    height: 140px;
  }

  /* Grids */
  .card-grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .card-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }

  /* About */
  .about-layout {
    grid-template-columns: 1fr;
  }
  .about-meta {
    text-align: center;
  }
  .about-avatar,
  .about-avatar-placeholder {
    margin-inline: auto;
  }

  /* Forms */
  .form-row--2 {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
  .footer-links {
    justify-content: center;
  }
}

/* ===================== RESPONSIVE 480px ===================== */
@media (max-width: 480px) {
  .card-grid--3,
  .card-grid--4 {
    grid-template-columns: 1fr;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .page-hero {
    padding: 2rem 0 1.5rem;
  }
  .section {
    padding: 2.5rem 0;
  }
  .quick-links {
    flex-direction: column;
  }
  .quick-link {
    justify-content: center;
  }
}

/* ===================== SAFE AREA (iPhone notch) ===================== */
@supports (padding: env(safe-area-inset-bottom)) {
  .mob-nav {
    padding-bottom: env(safe-area-inset-bottom);
    height: calc(var(--mob-nav) + env(safe-area-inset-bottom));
  }
  @media (max-width: 768px) {
    body {
      padding-bottom: calc(var(--mob-nav) + env(safe-area-inset-bottom));
    }
  }
}
