/* ===========================================================
   Md. Ruhul Kuddus – Portfolio
   Theme variables, layout, components
   =========================================================== */

:root {
  --bg: #0a0a0a;
  --surface: #111111;
  --surface-2: #161616;
  --border: #1f1f1f;
  --border-strong: #2a2a2a;
  --text: #e5e5e5;
  --text-dim: #a0a0a0;
  --text-faint: #6b6b6b;
  --accent: #4ade80;
  --accent-dim: rgba(74, 222, 128, 0.15);
  --accent-soft: rgba(74, 222, 128, 0.08);
  --danger: #f87171;
  --warn: #fbbf24;

  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --sidebar-w: 280px;
  --content-max: 820px;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-card: 0 1px 0 rgba(255,255,255,0.02) inset, 0 8px 24px rgba(0,0,0,0.25);
  --transition: 180ms cubic-bezier(.2,.6,.2,1);

  --navbar-h: 64px;
}

[data-theme="light"] {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f4f4f4;
  --border: #e7e7e7;
  --border-strong: #d4d4d4;
  --text: #0a0a0a;
  --text-dim: #525252;
  --text-faint: #8a8a8a;
  --accent: #16a34a;
  --accent-dim: rgba(22, 163, 74, 0.12);
  --accent-soft: rgba(22, 163, 74, 0.06);
  --shadow-card: 0 1px 2px rgba(0,0,0,0.04), 0 6px 18px rgba(0,0,0,0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 15.5px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--text); }

::selection { background: var(--accent); color: #0a0a0a; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ============== Layout ============== */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ============== Navbar (fixed top) ============== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--navbar-h);
  z-index: 100;
  background: rgba(10, 10, 10, 0.72);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
[data-theme="light"] .navbar { background: rgba(250, 250, 250, 0.78); }

.navbar-inner {
  height: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.navbar-brand {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.3px;
  white-space: nowrap;
}
.navbar-brand:hover { color: var(--text); }
.navbar-brand .accent { color: var(--accent); }

.navbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.navbar-links a {
  position: relative;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  padding: 8px 13px;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
}
.navbar-links a:hover { color: var(--text); background: var(--surface-2); }
.navbar-links a.active { color: var(--accent); }
.navbar-links a.active::after {
  content: "";
  position: absolute;
  left: 13px; right: 13px;
  bottom: -4px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.hamburger {
  display: none;
  width: 38px; height: 38px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all var(--transition);
}
.hamburger:hover { color: var(--accent); border-color: var(--accent); }
.hamburger svg { width: 18px; height: 18px; }

/* ============== CV viewer page ============== */
.cv-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}
.cv-download {
  align-self: flex-start;
  margin-top: 6px;
}

.cv-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}
.cv-meta-row .cv-meta-item strong { color: var(--text); font-weight: 600; }

.cv-viewer {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.cv-viewer iframe {
  display: block;
  width: 100%;
  height: 1100px;
  border: 0;
  background: #fff;
}
.cv-viewer-fallback {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-dim);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.cv-viewer-fallback a { font-family: var(--font-mono); font-size: 12.5px; }
.cv-viewer-fallback .dot { color: var(--text-faint); }

@media (max-width: 820px) {
  .cv-viewer iframe { height: 720px; }
  .cv-header-row { flex-direction: column; align-items: stretch; }
  .cv-download { align-self: flex-start; }
}

/* ============== Sidebar (fixed left, no nav) ============== */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: fixed;
  top: var(--navbar-h); left: 0; bottom: 0;
  padding: 32px 24px;
  border-right: 1px solid var(--border);
  background: var(--surface);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
  z-index: 40;
}

.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.avatar {
  position: relative;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1f1f1f, #0a0a0a);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 36px;
  color: var(--accent);
  letter-spacing: -1px;
  margin-bottom: 18px;
  overflow: hidden;
}
[data-theme="light"] .avatar {
  background: linear-gradient(135deg, #f0fdf4, #e7f8ec);
}
.avatar .avatar-initials { display: none; }
.avatar:not(:has(.avatar-img)) .avatar-initials { display: block; }
.avatar .avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-name {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.3px;
  line-height: 1.3;
}

.profile-role {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 4px;
}

.profile-meta {
  margin-top: 14px;
  width: 100%;
  font-size: 12.5px;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.profile-meta .row {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}
.profile-meta .row svg { flex-shrink: 0; opacity: 0.8; }

.tagline {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--text-faint);
  font-style: italic;
  line-height: 1.5;
}

/* Status indicator */
.status {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-dim);
  font-size: 11.5px;
  font-family: var(--font-mono);
  color: var(--accent);
}
.status .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

/* Socials */
.socials {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 16px;
}
.socials a {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim);
  transition: all var(--transition);
}
.socials a:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}
.socials svg { width: 16px; height: 16px; }

/* Theme toggle (lives in navbar) */
.theme-toggle {
  width: 38px; height: 38px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all var(--transition);
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle svg { width: 15px; height: 15px; }
.theme-toggle .theme-toggle-label { display: none; }

/* ============== Main content ============== */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: calc(var(--navbar-h) + 40px) 56px 96px;
  max-width: calc(var(--sidebar-w) + var(--content-max) + 112px);
}

.page-header {
  margin-bottom: 36px;
}
.page-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
}
.page-title {
  font-family: var(--font-mono);
  font-size: 36px;
  letter-spacing: -1px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.15;
}
.page-title .accent { color: var(--accent); }
.page-subtitle {
  margin-top: 10px;
  color: var(--text-dim);
  font-size: 15.5px;
  max-width: 60ch;
}

.section { margin-top: 52px; }
.section-title {
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-faint);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-title::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--accent);
}

/* ============== Cards & tags ============== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-dim);
  border: 1px solid var(--border-strong);
  transition: all var(--transition);
}
.tag.accent {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent-dim);
}
.tag:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Badge (status) */
.badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: 4px;
}
.badge.live { background: rgba(74, 222, 128, 0.15); color: var(--accent); }
.badge.completed { background: rgba(96, 165, 250, 0.15); color: #60a5fa; }
.badge.progress { background: rgba(251, 191, 36, 0.15); color: var(--warn); }
.badge.private { background: rgba(160,160,160,0.15); color: var(--text-dim); }

/* ============== Home page ============== */
.hero h1 {
  font-family: var(--font-mono);
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.1;
}
.hero h1 .wave { display: inline-block; animation: wave 2.4s ease-in-out infinite; transform-origin: 70% 70%; }
@keyframes wave {
  0%, 60%, 100% { transform: rotate(0deg); }
  10% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  30% { transform: rotate(14deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(10deg); }
}
.hero-intro {
  margin-top: 18px;
  font-size: 17px;
  color: var(--text-dim);
  max-width: 60ch;
  line-height: 1.7;
}
.hero-intro strong { color: var(--text); font-weight: 600; }
.hero-intro .accent { color: var(--accent); }

.cta-row {
  margin-top: 32px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
}
.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}
.btn.primary {
  background: var(--accent);
  color: #0a0a0a;
  border-color: var(--accent);
}
.btn.primary:hover {
  background: transparent;
  color: var(--accent);
}
.btn svg { width: 14px; height: 14px; }

/* Now grid */
.now-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.now-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: all var(--transition);
}
.now-card:hover { border-color: var(--accent-dim); transform: translateY(-2px); }
.now-card .label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.now-card .label .arrow { color: var(--text-faint); }
.now-card .value {
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: left;
}
.stat .num {
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -1px;
  line-height: 1;
}
.stat .num .plus { font-size: 18px; color: var(--text-dim); vertical-align: super; }
.stat .desc {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--text-dim);
}

/* Featured projects (home) */
.featured-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 16px;
}
.featured-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: all var(--transition);
}
.featured-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
}
.featured-card .head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  margin-bottom: 8px;
}
.featured-card h3 {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--text);
  font-weight: 600;
}
.featured-card .desc {
  color: var(--text-dim);
  font-size: 14px;
  margin: 8px 0 14px;
}
.featured-card .tag-row { margin-top: 10px; }

/* ============== Experience timeline ============== */
.timeline {
  position: relative;
  margin-left: 8px;
  padding-left: 28px;
  border-left: 2px solid var(--border-strong);
}
.timeline-item {
  position: relative;
  margin-bottom: 30px;
}
.timeline-item:last-child { margin-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -36px;
  top: 8px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.timeline-item.current::before {
  background: var(--accent);
}
.timeline-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: all var(--transition);
}
.timeline-card:hover { border-color: var(--accent-dim); }
.timeline-card h3 {
  font-family: var(--font-mono);
  font-size: 17px;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.3px;
}
.timeline-card .company {
  color: var(--accent);
  font-size: 14px;
  margin-top: 2px;
  font-weight: 500;
}
.timeline-card ul {
  margin: 14px 0 10px;
  padding-left: 18px;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.7;
}
.timeline-card ul li { margin-bottom: 6px; }
.timeline-card ul li::marker { color: var(--accent); }

/* ============== Projects ============== */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 18px;
  transition: all var(--transition);
}
.project-card:hover { border-color: var(--accent-dim); transform: translateY(-2px); }
.project-num {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 700;
  color: var(--accent-dim);
  line-height: 1;
}
.project-card.featured .project-num { color: var(--accent); }
.project-body .head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  margin-bottom: 8px;
}
.project-body h3 {
  font-family: var(--font-mono);
  font-size: 17px;
  color: var(--text);
  font-weight: 600;
}
.project-body .desc {
  color: var(--text-dim);
  font-size: 14px;
  margin: 6px 0 12px;
}
.project-body ul {
  margin: 8px 0 12px;
  padding-left: 18px;
  font-size: 13.5px;
  color: var(--text-dim);
}
.project-body ul li { margin-bottom: 4px; }
.project-body ul li::marker { color: var(--accent); }
.project-links {
  margin-top: 12px;
  display: flex;
  gap: 14px;
  font-size: 13px;
  font-family: var(--font-mono);
}
.project-links a {
  display: inline-flex; align-items: center; gap: 5px;
}
.project-links svg { width: 13px; height: 13px; }

.section-divider {
  margin: 48px 0 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.section-divider .label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 2px;
}
.section-divider .line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ============== Skills ============== */
.skills-cat {
  margin-bottom: 32px;
}
.skills-cat h3 {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 10px;
}
.skills-cat h3 .icon { color: var(--accent); }
.skill-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.skill {
  display: flex; align-items: center; gap: 14px;
}
.skill-name {
  flex: 0 0 130px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
}
.skill-bar {
  flex: 1;
  height: 6px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.skill-bar .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #22c55e);
  border-radius: 999px;
  width: 0;
  transition: width 1.2s cubic-bezier(.2,.6,.2,1);
}
.skill-lvl {
  flex: 0 0 60px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

/* ============== Education ============== */
.edu-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 14px;
  transition: all var(--transition);
}
.edu-card:hover { transform: translateX(2px); }
.edu-card .head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  margin-bottom: 6px;
}
.edu-card h3 {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--text);
  font-weight: 600;
}
.edu-card .institution { color: var(--accent); font-size: 14px; }
.edu-card .meta { margin-top: 8px; font-size: 13.5px; color: var(--text-dim); }
.edu-card .date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
}

/* ============== Contact ============== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}
.contact-link {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex; flex-direction: column; gap: 8px;
  transition: all var(--transition);
}
.contact-link:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}
.contact-link .icon {
  width: 38px; height: 38px;
  border-radius: 8px;
  background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  margin-bottom: 6px;
}
.contact-link .icon svg { width: 18px; height: 18px; }
.contact-link .label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-faint);
}
.contact-link .value {
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  word-break: break-word;
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.contact-form h3 {
  font-family: var(--font-mono);
  font-size: 16px;
  margin-bottom: 18px;
  color: var(--text);
}
.field {
  display: flex; flex-direction: column;
  margin-bottom: 14px;
}
.field label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-faint);
  margin-bottom: 6px;
}
.field input, .field textarea {
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  color: var(--text);
  padding: 10px 12px;
  font-family: var(--font-sans);
  font-size: 14px;
  transition: border-color var(--transition);
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.field textarea { resize: vertical; min-height: 110px; }

/* ============== Achievements ============== */
.ach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.ach-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: all var(--transition);
}
.ach-card:hover { border-color: var(--accent-dim); transform: translateY(-2px); }
.ach-card .icon {
  width: 40px; height: 40px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.ach-card h3 {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 6px;
}
.ach-card p { font-size: 13.5px; color: var(--text-dim); line-height: 1.5; }

/* ============== Cert cards ============== */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.cert-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  transition: all var(--transition);
}
.cert-card:hover { border-color: var(--accent-dim); transform: translateY(-2px); }
.cert-card h3 {
  font-family: var(--font-mono);
  font-size: 14.5px;
  color: var(--text);
  margin-bottom: 6px;
  font-weight: 600;
}
.cert-card .org { color: var(--accent); font-size: 13px; }
.cert-card .date {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-faint);
  margin-top: 8px;
}

/* ============== Misc ============== */
.prose p {
  margin-bottom: 16px;
  color: var(--text-dim);
  line-height: 1.8;
  font-size: 15.5px;
}
.prose p strong { color: var(--text); font-weight: 600; }
.prose p .accent { color: var(--accent); }

.lead {
  font-size: 17px !important;
  color: var(--text) !important;
}

.footer {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  flex-wrap: wrap;
  gap: 12px;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms ease, transform 600ms cubic-bezier(.2,.6,.2,1);
  will-change: opacity, transform;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ============== Responsive ============== */
@media (max-width: 1100px) {
  .navbar-links a { padding: 8px 10px; font-size: 12.5px; }
}

@media (max-width: 960px) {
  .main { padding: calc(var(--navbar-h) + 28px) 28px 64px; }
  .hero h1 { font-size: 34px; }
  .page-title { font-size: 30px; }
}

@media (max-width: 820px) {
  .sidebar { display: none; }
  .main {
    margin-left: 0;
    padding: calc(var(--navbar-h) + 24px) 20px 56px;
    max-width: 100%;
  }
  .navbar-inner { padding: 0 18px; gap: 12px; }
  .navbar-links {
    display: none;
    position: fixed;
    top: var(--navbar-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 14px;
    gap: 2px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    max-height: calc(100vh - var(--navbar-h));
    overflow-y: auto;
  }
  .navbar-links.open { display: flex; }
  .navbar-links a {
    padding: 12px 16px;
    font-size: 14px;
    border-radius: 6px;
  }
  .navbar-links a.active { background: var(--accent-soft); }
  .navbar-links a.active::after { display: none; }
  .hamburger { display: flex; }
  body.menu-open { overflow: hidden; }
  .project-card { grid-template-columns: 1fr; gap: 8px; }
  .project-num { font-size: 22px; }
}

@media (max-width: 520px) {
  .navbar-inner { padding: 0 14px; }
  .navbar-brand { font-size: 13.5px; }
  .hero h1 { font-size: 28px; }
  .page-title { font-size: 24px; }
  .stat .num { font-size: 24px; }
  .skill-name { flex-basis: 100px; font-size: 12px; }
  .skill-lvl { flex-basis: 44px; font-size: 11px; }
  .timeline { padding-left: 22px; }
  .timeline-item::before { left: -29px; }
}
