:root {
  --bg: #0a0a0b;
  --bg-elev: #121214;
  --bg-elev-2: #18181b;
  --bg-soft: #101012;
  --text: #f5f5f5;
  --muted: #a1a1aa;
  --muted-2: #7a7a82;
  --line: #26262b;
  --line-light: #34343a;
  --red: #c41e2a;
  --red-dark: #8f141d;
  --red-glow: rgba(196, 30, 42, 0.18);
  --red-glow-2: rgba(196, 30, 42, 0.08);
  --white: #ffffff;
  --radius: 4px;
  --radius-lg: 8px;
  --transition: 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
  --shadow: 0 10px 40px rgba(0,0,0,0.35);
  --max: 1200px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.nav-open {
  overflow: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

p, h1, h2, h3, h4, h5, h6 {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.container {
  width: min(100% - 48px, var(--max));
  margin: 0 auto;
}

.section {
  padding: 96px 0;
  position: relative;
}

.section-alt {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 20px;
}

.section-label::before {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--red);
  flex-shrink: 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 48px;
}

.section-heading h2 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

.section-heading p {
  color: var(--muted);
  font-size: 17px;
  max-width: 680px;
}

.grid-bg {
  background-image:
    linear-gradient(rgba(196, 30, 42, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(196, 30, 42, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(10, 10, 11, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(38, 38, 43, 0.8);
  transition: background var(--transition), box-shadow var(--transition);
}

.site-header.scrolled {
  background: rgba(10, 10, 11, 0.96);
  box-shadow: 0 4px 24px rgba(0,0,0,0.25);
}

.nav {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  font-size: 15px;
  color: var(--text);
  flex-shrink: 0;
  z-index: 5;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border: 1px solid var(--red);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: rgba(196, 30, 42, 0.06);
}

.brand-name span {
  color: var(--muted);
  font-weight: 400;
  margin-left: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  font-size: 13px;
  color: var(--muted);
  transition: color var(--transition);
  letter-spacing: 0.01em;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a.nav-cta {
  color: var(--text);
  padding: 10px 18px;
  border: 1px solid var(--line-light);
  margin-left: 8px;
}

.nav-links a.nav-cta:hover {
  border-color: var(--red);
  color: var(--white);
  background: rgba(196, 30, 42, 0.08);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  margin-left: auto;
  position: relative;
  z-index: 5;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text);
  position: relative;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

.btn-primary:hover {
  background: #a81823;
  border-color: #a81823;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--line-light);
}

.btn-outline:hover {
  border-color: var(--muted);
  background: rgba(255,255,255,0.03);
}

.btn-ghost {
  padding: 12px 0;
  color: var(--muted);
  border: none;
}

.btn-ghost:hover {
  color: var(--text);
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

/* Hero */
.hero {
  padding-top: 152px;
  padding-bottom: 72px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 75% 35%, rgba(196, 30, 42, 0.16), transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 70%, rgba(196, 30, 42, 0.06), transparent 70%),
    linear-gradient(180deg, #0a0a0b 0%, #0d0d0f 100%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, black 30%, transparent 100%);
}

.hero-line {
  position: absolute;
  right: 8%;
  top: 15%;
  bottom: 10%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(196,30,42,0.35), transparent);
  display: none;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr);
  gap: 56px;
  align-items: end;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 28px;
}

.hero-eyebrow .dot {
  width: 6px;
  height: 6px;
  background: var(--red);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(196, 30, 42, 0.12);
}

.hero h1 {
  font-size: clamp(36px, 5.6vw, 68px);
  line-height: 1.06;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  max-width: 900px;
}

.hero h1 .line {
  display: block;
}

.hero h1 .accent {
  color: #d6d6da;
}

.hero-sub {
  font-size: 18px;
  line-height: 1.75;
  color: var(--muted);
  max-width: 700px;
  margin-bottom: 36px;
}

.hero-actions {
  margin-bottom: 40px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  max-width: 760px;
}

.hero-meta-item {
  font-size: 13px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.hero-meta-item::before {
  content: "";
  width: 4px;
  height: 4px;
  background: var(--red);
  border-radius: 50%;
  flex-shrink: 0;
}

.hero-panel {
  background: rgba(18, 18, 20, 0.72);
  border: 1px solid var(--line);
  padding: 28px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.panel-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.panel-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #9ca3a0;
  letter-spacing: 0.04em;
}

.panel-status .status-dot {
  width: 6px;
  height: 6px;
  background: #7d8a84;
  border-radius: 50%;
}

.profile-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.profile-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 13px 0;
  border-bottom: 1px solid #1e1e22;
  font-size: 13px;
}

.profile-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.profile-row .k {
  color: var(--muted-2);
  flex-shrink: 0;
}

.profile-row .v {
  color: #d8d8dc;
  text-align: right;
}

.profile-row .v.placeholder {
  color: #8a8a90;
  font-style: italic;
}

.placeholder {
  color: #9a9aa0;
  font-style: italic;
}

.status-banner {
  margin-top: 20px;
  padding: 14px 16px;
  background: rgba(196, 30, 42, 0.06);
  border: 1px solid rgba(196, 30, 42, 0.2);
  font-size: 12px;
  color: #c9b8ba;
  line-height: 1.7;
}

.status-banner strong {
  color: #e8dfe0;
  font-weight: 500;
}
/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.skill-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  padding: 28px;
}

.skill-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.skill-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
}

.skill-card-header p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}

.skill-count {
  font-size: 11px;
  color: var(--muted-2);
  border: 1px solid #2a2a2e;
  padding: 6px 10px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-tag {
  padding: 9px 12px;
  font-size: 13px;
  color: #d2d2d7;
  background: #141416;
  border: 1px solid #2a2a2e;
  line-height: 1.4;
}

/* Languages */
.language-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.language-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  padding: 28px;
}

.lang-name {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 8px;
}

.lang-level {
  display: inline-block;
  font-size: 12px;
  color: var(--red);
  font-weight: 500;
  margin-bottom: 14px;
  letter-spacing: 0.01em;
}

.lang-level.placeholder {
  color: #c9a2a6;
  font-style: italic;
}

.language-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.75;
}

/* Resume */
.resume-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: 32px;
  align-items: start;
}

.resume-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  padding: 32px;
}

.resume-card h3 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 12px;
}

.resume-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 20px;
}

.resume-file {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  background: #101012;
  border: 1px solid #26262a;
  margin-bottom: 24px;
}

.resume-file-icon {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(196,30,42,0.35);
  background: rgba(196,30,42,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
  flex-shrink: 0;
}

.resume-file-icon svg {
  width: 20px;
  height: 20px;
}

.resume-file-meta .name {
  display: block;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 4px;
  word-break: break-word;
}

.resume-file-meta .note {
  display: block;
  font-size: 12px;
  color: var(--muted-2);
}

.resume-checklist {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.resume-checklist li {
  padding-left: 20px;
  position: relative;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.75;
}

.resume-checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 6px;
  height: 1px;
  background: var(--red);
}

/* Contact */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 32px;
  align-items: start;
}

.contact-intro p {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.85;
  margin-bottom: 24px;
}

.contact-intro .availability {
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
}

.availability-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  display: block;
  margin-bottom: 8px;
}

.availability p {
  font-size: 14px;
  margin-bottom: 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.contact-card {
  display: block;
  padding: 22px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  transition: border-color var(--transition), background var(--transition);
  min-width: 0;
}

a.contact-card:hover {
  border-color: #3a3a40;
  background: #151517;
}

.contact-card .k {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 10px;
}

.contact-card .v {
  display: block;
  font-size: 15px;
  color: var(--text);
  line-height: 1.5;
  word-break: break-word;
}

.contact-card .v.placeholder {
  color: #9a9aa0;
  font-style: italic;
}

.contact-card .hint {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted-2);
  line-height: 1.6;
}

/* Footer */
.site-footer {
  padding: 36px 0 48px;
  border-top: 1px solid var(--line);
  background: #080809;
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-brand {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.footer-brand span {
  color: var(--muted);
  font-weight: 400;
}

.footer-copy {
  font-size: 13px;
  color: var(--muted-2);
  line-height: 1.7;
  max-width: 520px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
}

.footer-links a {
  font-size: 13px;
  color: var(--muted);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--text);
}

.footer-note {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #1a1a1d;
  font-size: 12px;
  color: #6f6f76;
  line-height: 1.8;
}

/* Case study page */
.page-hero {
  padding-top: 140px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 50% 60% at 80% 30%, rgba(196, 30, 42, 0.12), transparent 70%),
    linear-gradient(180deg, #0a0a0b 0%, #0e0e10 100%);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted-2);
  margin-bottom: 28px;
}

.breadcrumb a {
  color: var(--muted);
  transition: color var(--transition);
}

.breadcrumb a:hover {
  color: var(--text);
}

.breadcrumb .sep {
  color: #4a4a50;
}

.page-hero h1 {
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  max-width: 920px;
}

.page-hero .lead {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.8;
  max-width: 780px;
  margin-bottom: 28px;
}

.case-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.7fr);
  gap: 32px;
  align-items: start;
}

.case-main {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.case-section {
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}

.case-section:last-child {
  border-bottom: none;
}

.case-section h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.case-section p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.85;
  margin-bottom: 16px;
}

.case-section p:last-child {
  margin-bottom: 0;
}

.case-section ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.case-section li {
  position: relative;
  padding-left: 20px;
  font-size: 14px;
  color: #cbcbcf;
  line-height: 1.75;
}

.case-section li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 6px;
  height: 1px;
  background: var(--red);
}

.case-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 96px;
}

.sidebar-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  padding: 24px;
}

.sidebar-card h3 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sidebar-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid #1e1e22;
  font-size: 13px;
}

.sidebar-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sidebar-row .k {
  color: var(--muted-2);
}

.sidebar-row .v {
  color: #d6d6da;
  text-align: right;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.result-item {
  padding: 20px;
  background: #101012;
  border: 1px solid #252529;
}

.result-value {
  display: block;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.result-value.pass {
  color: #d7dce0;
}

.result-label {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.disclaimer-box {
  margin-top: 24px;
  padding: 18px 20px;
  background: rgba(196, 30, 42, 0.05);
  border: 1px solid rgba(196, 30, 42, 0.2);
  font-size: 13px;
  color: #cfc5c6;
  line-height: 1.8;
}

.disclaimer-box strong {
  color: #efe6e7;
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.screenshot-placeholder {
  aspect-ratio: 16 / 10;
  border: 1px dashed #3a3a40;
  background: #101012;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--muted-2);
  line-height: 1.7;
}

.case-nav {
  padding: 32px 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

/* Utility / responsive */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
  border: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1120px) {
  .hero-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }
  .hero-panel {
    max-width: 680px;
  }
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .case-card.featured {
    grid-column: span 2;
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 980px) {
  .about-layout,
  .experience-layout,
  .resume-layout,
  .contact-layout,
  .case-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .cred-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .cred-item:nth-child(3) {
    border-right: none;
  }
  .cred-item:nth-child(1),
  .cred-item:nth-child(2),
  .cred-item:nth-child(3) {
    border-bottom: 1px solid var(--line);
  }
  .case-sidebar {
    position: static;
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex;
  }
  .nav-links {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    background: rgba(10, 10, 11, 0.98);
    border-bottom: 1px solid var(--line);
    padding: 20px 24px 28px;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    display: none;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links li {
    width: 100%;
  }
  .nav-links a {
    display: block;
    padding: 12px 0;
    width: 100%;
    border-bottom: 1px solid #1c1c20;
  }
  .nav-links li:last-child a {
    border-bottom: none;
  }
  .nav-links a.nav-cta {
    margin-left: 0;
    margin-top: 12px;
    display: inline-flex;
    width: auto;
    padding: 12px 18px;
  }
  .projects-grid,
  .skills-grid,
  .cert-grid,
  .case-studies-wrap,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .case-card.featured {
    grid-column: span 1;
  }
  .language-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .section {
    padding: 72px 0;
  }
  .container {
    width: min(100% - 40px, var(--max));
  }
  .hero {
    padding-top: 128px;
    min-height: auto;
  }
  .hero h1 {
    font-size: clamp(34px, 9vw, 52px);
  }
  .hero-sub {
    font-size: 16px;
  }
  .cred-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cred-item:nth-child(3) {
    border-right: 1px solid var(--line);
  }
  .cred-item:nth-child(2n) {
    border-right: none;
  }
  .cred-item:nth-child(4) {
    border-bottom: 1px solid var(--line);
  }
  .case-meta,
  .cert-fields,
  .result-grid,
  .screenshot-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .cert-card {
    flex-direction: column;
    gap: 18px;
  }
  .exp-top {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-inner {
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .language-grid,
  .cred-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .cred-item {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .cred-item:last-child {
    border-bottom: none;
  }
  .btn {
    width: 100%;
    justify-content: center;
  }
  .btn-row {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
