/* ── Variables ── */
:root {
  --maincolor: #1698ff;
  --bg: #0b0b12;
  --bg-surface: #111119;
  --bg-card: #16161f;
  --text: #e4e4e7;
  --text-muted: #71717a;
  --border: rgba(22, 152, 255, 0.14);
  --sidebar-width: 240px;
  /* legacy compat names used throughout */
  --blackcolor: #e4e4e7;
  --whitecolor: #111119;
  --darkColor: #0b0b12;
  --graycolor: #71717a;
}

body.light-mode {
  --bg: #f4f4f8;
  --bg-surface: #ffffff;
  --bg-card: #f8f8fc;
  --text: #18181b;
  --text-muted: #52525b;
  --border: rgba(22, 152, 255, 0.2);
  --blackcolor: #18181b;
  --whitecolor: #ffffff;
  --darkColor: #f4f4f8;
  --graycolor: #52525b;
}

/* ── Reset ── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Roboto Mono", monospace;
}

html,
body {
  height: 100%;
  min-height: 100%;
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: rgba(22, 152, 255, 0.25);
  border-radius: 99px;
  transition: background 0.2s;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(22, 152, 255, 0.6);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(22, 152, 255, 0.25) transparent;
}

/* brief title glow when navigating to a section via nav click */
@keyframes title-arrive {
  0% {
    color: var(--maincolor);
    text-shadow: 0 0 24px rgba(22, 152, 255, 0.45);
  }
  100% {
    color: var(--text);
    text-shadow: none;
  }
}

.section-arriving > h1 {
  animation: title-arrive 1s ease-out forwards;
}

body {
  background-color: var(--bg);
  background-image: linear-gradient(
      rgba(22, 152, 255, 0.03) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(22, 152, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  color: var(--text);
}

a {
  color: var(--text);
  text-decoration: none;
  outline: none;
}

li {
  list-style: none;
}

/* ── Sidebar ── */
header {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--sidebar-width);
  height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-surface);
  border-right: 1px solid var(--border);
  z-index: 999;
  padding: 32px 0 20px;
  overflow-y: auto;
}

.logo-section {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
  margin: 0 20px;
}

.logo-section h1 {
  font-size: 26px;
  font-weight: 900;
  color: var(--maincolor);
  letter-spacing: 0.06em;
}

nav {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px 0;
}

.main-nav {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.main-nav ul {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0 12px;
  gap: 2px;
}

.main-nav ul li a {
  display: block;
  padding: 9px 14px;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  border-left: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.main-nav ul li a:hover,
.main-nav ul li a.active,
.main-nav ul li a:focus {
  color: var(--maincolor);
  border-left-color: var(--maincolor);
  background: rgba(22, 152, 255, 0.07);
}

/* hamburger — desktop hidden */
.hamburger {
  display: none;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  transition: all 0.3s ease-in-out;
  background-color: var(--text);
}

/* social links at bottom of sidebar */
.social-links-nav {
  margin-top: auto;
  padding: 16px 12px 0;
  border-top: 1px solid var(--border);
}

.social-links-nav ul {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 10px;
}

.social-links-nav a {
  color: var(--text-muted);
  font-size: 15px;
  transition: color 0.2s;
}

.social-links-nav a:hover {
  color: var(--maincolor);
}

/* theme toggle inside sidebar */
.theme-mode-container {
  display: flex;
  justify-content: center;
  padding: 16px 12px 0;
}

.theme-mode-container > div {
  display: flex;
  cursor: pointer;
  padding: 7px 18px;
  background-color: rgba(22, 152, 255, 0.07);
  border: 1px solid var(--border);
  border-radius: 20px;
  align-items: center;
  gap: 6px;
  transition: background 0.2s, border-color 0.2s;
}

.theme-mode-container > div:hover {
  background-color: rgba(22, 152, 255, 0.16);
  border-color: var(--maincolor);
}

.theme-mode-container > div i {
  font-size: 13px;
  color: var(--maincolor);
}

/* sticky — no-op; sidebar is always fixed */
.sticky {}

/* ── Main content ── */
section,
footer {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
}

section {
  display: block;
}

section > * {
  padding: 80px 80px 64px;
}

section > * h1 {
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 32px;
  text-align: center;
  color: var(--text);
  letter-spacing: -0.01em;
}

section > * h1::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  background: var(--maincolor);
  border-radius: 2px;
  margin: 10px auto 0;
}

section > div:not(.intro-section) > div:first-of-type:not(.contact-inner):not(.skills-groups):not(.contact-intro) {
  text-align: center;
  margin-bottom: 32px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Hero / Intro ── */
.intro-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 80px 80px;
  position: relative;
  border-bottom: 1px solid var(--border);
}

.intro-section > * {
  display: flex;
}

.intro-text-container {
  flex: 2;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.intro-title {
  font-size: 12px;
  color: var(--maincolor);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.intro-title::before {
  content: "//";
  font-weight: 900;
}

.intro-title::after {
  content: "hello world";
}

.intro-short-desc {
  font-size: clamp(28px, 3.2vw, 48px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
}

.intro-diff-roles {
  display: flex;
  align-items: center;
  font-size: 14px;
  line-height: 1;
}

.role-prefix {
  color: var(--maincolor);
  font-weight: 700;
  white-space: nowrap;
  opacity: 0.8;
}

/* typing animation */
.type {
  display: inline-block;
  overflow: hidden;
  height: 1.3em;
  vertical-align: middle;
}

.type > span {
  display: flex;
  flex-direction: column;
  color: var(--maincolor);
  font-weight: 700;
}

.type span span {
  width: 0;
  max-width: max-content;
  overflow: hidden;
  height: 1.3em;
  white-space: nowrap;
  display: flex;
  align-items: center;
  animation: c 0.5s infinite steps(1), t 2s linear infinite alternate -1.8s,
    m 16s steps(4) infinite;
}

.type span span::before {
  content: " ";
  display: inline-block;
}

@keyframes t {
  90%,
  100% {
    width: 100%;
  }
}

@keyframes c {
  0%,
  100% {
    box-shadow: 5px 0 0 #0000;
  }
  50% {
    box-shadow: 5px 0 0 var(--maincolor);
  }
}

@keyframes m {
  100% {
    transform: translateY(-400%);
  }
}

.intro-bio {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.intro-bio p {
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--text-muted);
}

.intro-bio p a {
  color: var(--maincolor);
  font-weight: 600;
}

.intro-bio p a:hover {
  text-decoration: underline;
}

.profiles-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.intro-resume-section a,
.intro-resume-section button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  font-size: 12px;
  font-weight: 600;
  font-family: "Roboto Mono", monospace;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  text-align: left;
}

.intro-resume-section a:hover,
.intro-resume-section button:hover {
  border-color: var(--maincolor);
  color: var(--maincolor);
  background-color: transparent;
}

.for-li a {
  border-color: var(--maincolor);
  color: var(--maincolor);
  background: rgba(22, 152, 255, 0.07);
}

.for-li a:hover {
  background: rgba(22, 152, 255, 0.15);
  color: var(--maincolor);
}

.for-gh a {
  border-color: var(--border);
  color: var(--text-muted);
}

.for-gh a:hover {
  border-color: var(--text);
  color: var(--text);
  background-color: transparent;
}

.intro-profile-container {
  flex: 1;
  justify-content: center;
  align-items: center;
}

.intro-profile-container img {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  border: 3px solid var(--maincolor);
  box-shadow: 0 0 48px rgba(22, 152, 255, 0.18);
}


/* ── Experience timeline ── */
.experience-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.experience-intro {
  text-align: center;
  margin-bottom: 40px;
  font-size: 13px;
  color: var(--text-muted);
}

.timeline {
  position: relative;
  max-width: 740px;
  width: 100%;
  padding-left: 28px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 28px;
}

.timeline-dot {
  position: absolute;
  left: -24px;
  top: 18px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--maincolor);
  box-shadow: 0 0 8px rgba(22, 152, 255, 0.45);
}

.timeline-card {
  background-color: var(--bg-card);
  border-radius: 8px;
  padding: 20px 22px;
  border: 1px solid var(--border);
  transition: border-color 0.2s, transform 0.2s;
}

.timeline-card:hover {
  border-color: var(--maincolor);
  transform: translateY(-2px);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
}

.timeline-role {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}

.timeline-date {
  font-size: 10.5px;
  color: var(--maincolor);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.timeline-company {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.timeline-bullets {
  padding-left: 16px;
  margin-bottom: 14px;
}

.timeline-bullets li {
  list-style: disc;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.timeline-bullets li a {
  color: var(--maincolor);
  font-weight: 600;
}

.timeline-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.timeline-more {
  text-align: center;
  margin-top: 12px;
}

/* ── Tech tags (shared) ── */
.tech-tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 10.5px;
  color: var(--maincolor);
  border: 1px solid var(--border);
  border-radius: 3px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: rgba(22, 152, 255, 0.05);
}

/* ── Services ── */
.services-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.services-intro {
  text-align: center;
  margin-bottom: 36px;
  font-size: 13px;
  color: var(--text-muted);
}

.services-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  width: 100%;
  max-width: 960px;
}

.service-card {
  flex: 1;
  min-width: 240px;
  max-width: 300px;
  border-radius: 10px;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  padding: 28px 22px;
  transition: border-color 0.2s, transform 0.2s;
}

.service-card:hover {
  border-color: var(--maincolor);
  transform: translateY(-3px);
}

.service-icon {
  font-size: 26px;
  color: var(--maincolor);
  margin-bottom: 16px;
}

.service-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: 0.01em;
}

.service-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.8;
}

/* ── Projects / Works ── */
.works-intro {
  text-align: center;
  margin-bottom: 32px;
  font-size: 13px;
  color: var(--text-muted);
}

.projects-container {
  width: 100%;
  max-width: 740px;
}

.view-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  border-radius: 6px;
  transition: border-color 0.2s, color 0.2s;
}

.view-more-btn:hover {
  border-color: var(--maincolor);
  color: var(--maincolor);
}

.works-more {
  margin-top: 24px;
  text-align: center;
}

.project-item {
  position: relative;
  margin: 0 0 14px;
  padding: 20px 22px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background-color: var(--bg-card);
  transition: border-color 0.2s, transform 0.2s;
  overflow: hidden;
}

.project-item:hover {
  border-color: var(--maincolor);
  transform: translateY(-2px);
}

.project-links {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.project-links a {
  color: var(--text-muted);
  font-size: 16px;
  transition: color 0.2s;
}

.project-links a:hover {
  color: var(--maincolor);
}

.project-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.project-description {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 12px;
}

.project-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

/* Project status badge */
.project-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px 2px 6px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-radius: 20px;
  margin-bottom: 8px;
}

.project-badge.active {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.28);
  color: #22c55e;
}

.project-badge.active::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  animation: pulse-dot 1.6s ease-in-out infinite;
}

@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45); }
  70% { box-shadow: 0 0 0 5px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* ── Project card browser preview ── */
.project-preview {
  margin: -20px -22px 16px;
  border-bottom: 1px solid var(--border);
}

.browser-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: rgba(22, 152, 255, 0.03);
  border-bottom: 1px solid var(--border);
}

.browser-dots {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.browser-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.browser-dots span:nth-child(1) { background: rgba(255, 95, 87, 0.55); }
.browser-dots span:nth-child(2) { background: rgba(254, 188, 46, 0.55); }
.browser-dots span:nth-child(3) { background: rgba(40, 200, 64, 0.55); }

.browser-bar {
  flex: 1;
  font-size: 9.5px;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 3px 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.7;
  letter-spacing: 0.01em;
}

.browser-screen {
  height: 190px;
  overflow: hidden;
  background: var(--bg-surface);
}

.browser-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.5s ease;
}

.project-item:hover .browser-screen img {
  transform: scale(1.04);
}

.browser-screen.preview-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--bg) 0%, rgba(22, 152, 255, 0.06) 100%);
}

.browser-screen.preview-placeholder i {
  font-size: 28px;
  color: rgba(22, 152, 255, 0.18);
}

/* 3-panel mobile screenshot strip */
.mobile-screens {
  display: flex;
  height: 190px;
  gap: 1px;
  background: var(--border);
  overflow: hidden;
}

.mobile-screen {
  flex: 1;
  overflow: hidden;
}

.mobile-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.5s ease;
}

.project-item:hover .mobile-screen img {
  transform: scale(1.04);
}

/* Gallery trigger overlay */
.project-preview {
  position: relative;
}

.gallery-trigger {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 3;
  font-family: "Roboto Mono", monospace;
  white-space: nowrap;
}

.project-item:hover .gallery-trigger {
  opacity: 1;
}

/* ── Gallery Modal ── */
.gallery-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1001;
  align-items: center;
  justify-content: center;
}

.gallery-modal.open {
  display: flex;
}

.gallery-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.gallery-modal-content {
  position: relative;
  z-index: 1;
  width: 90vw;
  max-width: 900px;
  max-height: 92vh;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
}

.gallery-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.gallery-modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.2s;
  line-height: 1;
}

.gallery-modal-close:hover { color: var(--text); }

.gallery-modal-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 24px 56px;
  background: var(--bg);
  min-height: 0;
}

.gallery-image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.gallery-main-img {
  max-width: 100%;
  max-height: 58vh;
  object-fit: contain;
  border-radius: 6px;
  display: block;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  transition: border-color 0.2s, color 0.2s;
  z-index: 2;
}

.gallery-nav:hover { border-color: var(--maincolor); color: var(--maincolor); }
.gallery-nav:disabled { opacity: 0.25; cursor: default; pointer-events: none; }
.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }

.gallery-counter {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.gallery-thumbnails {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  overflow-x: auto;
  justify-content: center;
  flex-shrink: 0;
}

.gallery-thumb {
  width: 60px;
  height: 44px;
  border-radius: 4px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.2s, opacity 0.2s;
  opacity: 0.55;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

.gallery-thumb.active {
  border-color: var(--maincolor);
  opacity: 1;
}

.gallery-thumb:hover { opacity: 1; }

/* title row: name left, links right */
.project-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

/* legacy */
.external-link {
  display: none;
}

.project-item a {
  text-decoration: none;
  color: inherit;
}

/* ── Skills ── */
.skills-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.skills-groups {
  max-width: 840px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.skills-group-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--maincolor);
  margin-bottom: 10px;
}

.skills-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.skill-badge {
  display: inline-block;
  padding: 4px 11px;
  font-size: 11.5px;
  color: var(--text);
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-weight: 500;
  transition: border-color 0.2s, color 0.2s;
  margin: 0;
}

.skill-badge:hover {
  border-color: var(--maincolor);
  color: var(--maincolor);
}

/* ── Blog ── */
.blog-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.blog-intro {
  text-align: center;
  margin-bottom: 30px;
  font-size: 13px;
  color: var(--text-muted);
}

.blog-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  width: 100%;
  max-width: 1000px;
}

.blog-cards > div {
  display: flex;
  flex-direction: column;
  width: 300px;
  border-radius: 8px;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}

.blog-cards > div:hover {
  border-color: var(--maincolor);
  transform: translateY(-3px);
}

.blog-cards > div img {
  width: 100%;
  height: 155px;
  object-fit: cover;
  display: block;
}

.blog-cards > div .title {
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  padding: 14px 16px 8px;
  line-height: 1.5;
  margin-bottom: 0;
  min-height: auto;
}

.blog-cards > div .title a {
  color: var(--text);
  transition: color 0.2s;
}

.blog-cards > div .title a:hover {
  color: var(--maincolor);
}

.blog-cards > div .short-desc {
  font-size: 12px;
  color: var(--text-muted);
  padding: 0 16px 10px;
  line-height: 1.6;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blog-cards > div .more-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px 14px;
  margin-top: auto;
  border-top: 1px solid var(--border);
}

.blog-cards > div .more-info a {
  color: var(--maincolor);
  font-size: 12px;
  font-weight: 700;
}

.blog-cards > div .more-info span {
  font-size: 11px;
  color: var(--text-muted);
}

/* ── Contact ── */
.contact-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border);
}

.contact-intro {
  text-align: center;
  margin-bottom: 40px;
  font-size: 13px;
  color: var(--text-muted);
}

.contact-inner {
  display: flex;
  gap: 64px;
  width: 100%;
  max-width: 900px;
  align-items: flex-start;
}

.contact-info-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 200px;
}

.contact-info-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.contact-info-item i {
  color: var(--maincolor);
  width: 16px;
  text-align: center;
}

.contact-info-item a {
  color: var(--text-muted);
  transition: color 0.2s;
}

.contact-info-item a:hover {
  color: var(--maincolor);
}

.contact-socials {
  display: flex;
  gap: 14px;
  margin-top: 8px;
}

.contact-socials a {
  color: var(--text-muted);
  font-size: 18px;
  transition: color 0.2s;
}

.contact-socials a:hover {
  color: var(--maincolor);
}

.contact-form {
  flex: 1;
}

.contact-form form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.form-row {
  display: flex;
  gap: 24px;
}

.form-field {
  position: relative;
  flex: 1;
  margin-bottom: 28px;
}

.form-field input,
.form-field textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 14px 0 8px;
  color: var(--text);
  font-family: "Roboto Mono", monospace;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
  resize: none;
}

.form-field textarea {
  min-height: 100px;
}

.form-field label {
  position: absolute;
  top: 14px;
  left: 0;
  font-size: 12px;
  color: var(--text-muted);
  pointer-events: none;
  transition: top 0.18s, font-size 0.18s, color 0.18s;
  letter-spacing: 0.02em;
}

.form-field input:focus,
.form-field textarea:focus {
  border-bottom-color: var(--maincolor);
}

.form-field input:focus ~ label,
.form-field input:not(:placeholder-shown) ~ label,
.form-field textarea:focus ~ label,
.form-field textarea:not(:placeholder-shown) ~ label {
  top: -4px;
  font-size: 9.5px;
  color: var(--maincolor);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.field-error {
  display: none;
  position: absolute;
  right: 0;
  bottom: -18px;
  font-size: 10px;
  color: #d6374a;
  letter-spacing: 0.04em;
}

.field-error.visible {
  display: block;
}

.form-submit-btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border: none;
  background: var(--maincolor);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  border-radius: 6px;
  cursor: pointer;
  font-family: "Roboto Mono", monospace;
  letter-spacing: 0.04em;
  transition: opacity 0.2s;
  margin-top: 4px;
}

.form-submit-btn:hover {
  opacity: 0.85;
}

.message-error {
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 16px;
  color: #fff;
  background-color: #d6374a;
  border-radius: 6px;
  font-size: 12px;
}

/* ── Resume Modal ── */
.resume-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.resume-modal.open {
  display: flex;
}

.resume-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

.resume-modal-content {
  position: relative;
  z-index: 1;
  width: 90vw;
  max-width: 860px;
  height: 90vh;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.resume-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.resume-modal-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.resume-modal-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text-muted);
  transition: border-color 0.2s, color 0.2s;
  letter-spacing: 0.04em;
}

.resume-modal-download:hover {
  border-color: var(--maincolor);
  color: var(--maincolor);
}

.resume-modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.2s;
  line-height: 1;
}

.resume-modal-close:hover {
  color: var(--text);
}

.resume-modal-content iframe {
  flex: 1;
  border: none;
  width: 100%;
  background: #fff;
}

/* ── Footer ── */
footer {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 56px;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11.5px;
}

/* ── Scroll to top ── */
.scroll-to-top {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 24px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background-color: var(--bg-surface);
  cursor: pointer;
  z-index: 998;
  transition: border-color 0.2s;
}

.scroll-to-top:hover {
  border-color: var(--maincolor);
}

.scroll-to-top i {
  color: var(--maincolor);
}

/* ── Mobile (≤ 900px) ── */
@media (max-width: 900px) {
  html {
    scroll-padding-top: 60px;
  }

  :root {
    --sidebar-width: 0px;
  }

  header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 60px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-right: none;
    border-bottom: 1px solid var(--border);
    overflow: visible;
  }

  .logo-section {
    border-bottom: none;
    padding: 0;
    margin: 0;
  }

  nav {
    flex-direction: row;
    flex: 1;
    justify-content: flex-end;
    padding: 0;
    align-items: center;
  }

  .main-nav {
    flex-direction: row;
    justify-content: flex-end;
  }

  .main-nav ul {
    position: fixed;
    top: 60px;
    left: -100%;
    flex-direction: column;
    width: 100%;
    padding: 16px 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    transition: 0.3s;
    gap: 0;
    height: auto;
  }

  .main-nav ul.active {
    left: 0;
  }

  .main-nav ul li a {
    padding: 12px 24px;
    border-radius: 0;
    font-size: 11px;
  }

  .hamburger {
    display: block;
    cursor: pointer;
    margin-left: 12px;
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .social-links-nav {
    display: none;
  }

  .my-contact-addresses .card4,
  .social-links-nav.bottom {
    display: block;
  }

  .theme-mode-container {
    padding: 0;
    margin-right: 4px;
  }

  section,
  footer {
    margin-left: 0;
    width: 100%;
  }

  section {
    padding-top: 60px;
  }

  section > * {
    padding: 48px 20px 36px;
  }

  .intro-section {
    flex-direction: column-reverse;
    min-height: auto;
    gap: 32px;
    padding: 56px 20px 48px;
    align-items: flex-start;
  }

  .intro-section > * {
    flex: none;
    width: 100%;
  }

  .intro-profile-container {
    justify-content: center;
  }

  .intro-profile-container img {
    width: 180px;
    height: 180px;
  }

  .profiles-container {
    flex-direction: column;
    gap: 10px;
  }

  .contact-form form > div {
    width: 100%;
  }

  .projects-container {
    width: 100%;
  }

  .timeline {
    width: 100%;
  }

  .skills-groups {
    width: 100%;
  }

  .contact-inner {
    flex-direction: column;
    gap: 36px;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .resume-modal-content {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }
}
