@import url('https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300&family=Syne:wght@400;500;600;700;800&display=swap');

/* ─── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #0a0a0a;
  --bg-2:       #111111;
  --bg-3:       #1a1a1a;
  --border:     #222222;
  --border-2:   #2e2e2e;
  --text:       #e8e8e8;
  --text-2:     #888888;
  --text-3:     #555555;
  --accent:     #c8ff00;
  --accent-dim: #c8ff0022;
  --font-display: 'Syne', sans-serif;
  --font-mono:    'DM Mono', monospace;
  --radius:     4px;
  --max-w:      1200px;
  --nav-h:      64px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: var(--font-mono); cursor: pointer; border: none; background: none; }

/* ─── Noise overlay ─────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}

/* ─── Nav ───────────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
nav.scrolled {
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(12px);
  border-color: var(--border);
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.5px;
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--text); }
.nav-cta {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent) !important;
  border: 1px solid var(--accent);
  padding: 6px 16px;
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s !important;
}
.nav-cta:hover { background: var(--accent); color: var(--bg) !important; }
.nav-cta::after { display: none !important; }

/* Mobile hamburger */
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 4px; }
.nav-toggle span { display: block; width: 22px; height: 1.5px; background: var(--text); transition: 0.3s; }

/* ─── Page sections (SPA routing) ──────────────────────────── */
.page { display: none; min-height: 100vh; padding-top: var(--nav-h); }
.page.active { display: block; }

/* ─── Hero ──────────────────────────────────────────────────── */
#home { padding-top: 0; }

.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 0 40px;
  max-width: var(--max-w);
  margin: 0 auto;
  gap: 80px;
  padding-top: var(--nav-h);
}
.hero-content { padding-top: 40px; }
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}
.hero-tag::before {
  content: '';
  display: block;
  width: 24px; height: 1px;
  background: var(--accent);
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(42px, 5vw, 72px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -2px;
  margin-bottom: 24px;
}
.hero-title em {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 1px var(--text-3);
}
.hero-subtitle {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.8;
  max-width: 440px;
  margin-bottom: 40px;
}
.hero-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 12px 24px;
  border-radius: var(--radius);
  transition: opacity 0.2s, transform 0.2s;
}
.btn-primary:hover { opacity: 0.85; transform: translateY(-1px); }
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--border-2);
  padding: 12px 24px;
  border-radius: var(--radius);
  transition: color 0.2s, border-color 0.2s;
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-3); }

.hero-image {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-image-frame {
  position: relative;
  width: 100%;
  max-width: 440px;
  aspect-ratio: 4/5;
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.hero-image-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(20%);
  transition: filter 0.4s;
}
.hero-image-frame:hover img { filter: grayscale(0%); }
.hero-image-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 60%, var(--bg) 100%);
  z-index: 1;
  pointer-events: none;
}
.hero-image-tag {
  position: absolute;
  bottom: -1px; left: -1px;
  background: var(--accent);
  color: var(--bg);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 12px;
  z-index: 2;
}
.hero-socials {
  position: absolute;
  right: -48px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.hero-social-link {
  color: var(--text-3);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  transition: color 0.2s;
}
.hero-social-link:hover { color: var(--accent); }

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 48px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}
.stat-item { display: flex; flex-direction: column; gap: 4px; }
.stat-number {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.stat-number span { color: var(--accent); }
.stat-label { font-size: 11px; color: var(--text-3); letter-spacing: 0.08em; }

/* ─── Section base ──────────────────────────────────────────── */
.section {
  padding: 100px 40px;
  max-width: var(--max-w);
  margin: 0 auto;
}
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 60px;
  gap: 24px;
  flex-wrap: wrap;
}
.section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.section-label::before {
  content: '';
  display: block;
  width: 24px; height: 1px;
  background: var(--accent);
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.1;
}
.section-link {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
  border-bottom: 1px solid var(--border-2);
  padding-bottom: 2px;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}
.section-link:hover { color: var(--accent); border-color: var(--accent); }

/* ─── Skills strip (home) ───────────────────────────────────── */
.skills-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 20px 40px;
  overflow: hidden;
  background: var(--bg-2);
}
.skills-ticker {
  display: flex;
  gap: 48px;
  white-space: nowrap;
  animation: ticker 30s linear infinite;
}
.skills-ticker span {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-3);
}
.skills-ticker .dot {
  color: var(--accent);
  font-size: 16px;
  line-height: 1;
  margin: 0 -24px;
  align-self: center;
}
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ─── Featured projects (home) ──────────────────────────────── */
.projects-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.project-card {
  background: var(--bg-2);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.project-card:nth-child(2n) { border-right: none; }
.project-card:nth-last-child(-n+2) { border-bottom: none; }
.project-card:hover { background: var(--bg-3); }
.project-card-img {
  width: 100%;
  aspect-ratio: 16/7;
  object-fit: cover;
  border-radius: 2px;
  filter: grayscale(30%);
  transition: filter 0.3s;
  border: 1px solid var(--border);
}
.project-card:hover .project-card-img { filter: grayscale(0%); }
.project-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.tag.running {
  color: var(--accent);
  border-color: var(--accent-dim);
}
.project-card-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.3px;
}
.project-card-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.project-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.project-card-date { font-size: 11px; color: var(--text-3); }
.project-card-arrow {
  font-size: 18px;
  color: var(--text-3);
  transition: color 0.2s, transform 0.2s;
}
.project-card:hover .project-card-arrow { color: var(--accent); transform: translate(3px, -3px); }

/* ─── Testimonial (home) ────────────────────────────────────── */
.testimonial-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px;
  background: var(--bg-2);
  position: relative;
}
.testimonial-block::before {
  content: '"';
  position: absolute;
  top: 24px; left: 40px;
  font-family: var(--font-display);
  font-size: 120px;
  line-height: 1;
  color: var(--border-2);
  pointer-events: none;
}
.testimonial-text {
  font-size: 18px;
  line-height: 1.8;
  color: var(--text);
  max-width: 800px;
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}
.testimonial-author { display: flex; align-items: center; gap: 16px; }
.testimonial-author-info .name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
}
.testimonial-author-info .role { font-size: 12px; color: var(--text-2); }

/* ─── Portfolio page ─────────────────────────────────────────── */
.portfolio-hero {
  padding: 80px 40px 60px;
  max-width: var(--max-w);
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
}
.portfolio-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 48px;
  padding: 0 40px;
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
  margin-top: 32px;
}
.filter-btn {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 2px;
  transition: all 0.2s;
}
.filter-btn:hover,
.filter-btn.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border: 1px solid var(--border);
  margin: 0 40px;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 80px;
}
.projects-grid .project-card {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.projects-grid .project-card:nth-child(3n) { border-right: none; }

/* ─── Project detail ─────────────────────────────────────────── */
.project-detail { display: none; }
.project-detail.active { display: block; }
.detail-hero {
  padding: 60px 40px 0;
  max-width: var(--max-w);
  margin: 0 auto;
}
.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 40px;
  transition: color 0.2s;
}
.detail-back:hover { color: var(--accent); }
.detail-header { margin-bottom: 48px; }
.detail-header .section-label { margin-bottom: 16px; }
.detail-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 20px;
}
.detail-subtitle { font-size: 16px; color: var(--text-2); max-width: 640px; line-height: 1.7; }
.detail-meta {
  display: flex;
  gap: 32px;
  margin-top: 32px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
  flex-wrap: wrap;
}
.detail-meta-item { display: flex; flex-direction: column; gap: 4px; }
.detail-meta-item .label { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.detail-meta-item .value { font-size: 13px; color: var(--text); }
.detail-hero-img {
  width: 100%;
  max-width: var(--max-w);
  margin: 40px auto 0;
  padding: 0 40px;
  display: block;
}
.detail-hero-img img {
  width: 100%;
  aspect-ratio: 21/8;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.detail-body {
  max-width: 800px;
  margin: 60px auto;
  padding: 0 40px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--text-2);
}
.detail-body h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  margin: 48px 0 16px;
  letter-spacing: -0.3px;
}
.detail-body h3 {
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 32px 0 12px;
}
.detail-body p { margin-bottom: 20px; }
.detail-body ul, .detail-body ol {
  padding-left: 20px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.detail-body li::marker { color: var(--accent); }
.detail-body strong { color: var(--text); font-weight: 500; }
.detail-body a { color: var(--accent); border-bottom: 1px solid var(--accent-dim); }
.detail-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  max-width: var(--max-w);
  margin: 0 auto 80px;
  padding: 0 40px;
}
.detail-gallery img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}
.detail-gallery img:hover { border-color: var(--border-2); }

/* ─── About page ─────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.about-img-wrap {
  position: relative;
}
.about-img-frame {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.about-img-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(20%);
  transition: filter 0.4s;
}
.about-img-frame:hover img { filter: grayscale(0%); }
.about-badge {
  position: absolute;
  bottom: -20px; right: -20px;
  background: var(--accent);
  color: var(--bg);
  width: 100px; height: 100px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.4;
}
.about-badge .num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}
.about-content .section-label { margin-bottom: 16px; }
.about-content .section-title { margin-bottom: 32px; }
.about-bio { font-size: 15px; color: var(--text-2); line-height: 1.9; margin-bottom: 40px; }
.about-skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
}
.skill-tag {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 2px;
  transition: all 0.2s;
}
.skill-tag:hover { color: var(--accent); border-color: var(--accent-dim); }
.about-timeline {
  margin-top: 80px;
  border-top: 1px solid var(--border);
  padding-top: 80px;
}
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: 115px;
  top: 50%;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border-2);
  transform: translateY(-50%);
  transition: background 0.2s;
}
.timeline-item:hover::before { background: var(--accent); }
.timeline-period { font-size: 12px; color: var(--text-3); padding-top: 4px; }
.timeline-content .role {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}
.timeline-content .company { font-size: 13px; color: var(--accent); margin-bottom: 8px; }
.timeline-content .desc { font-size: 13px; color: var(--text-2); line-height: 1.7; }

/* ─── Contact page ───────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.contact-info .section-label { margin-bottom: 16px; }
.contact-info .section-title { margin-bottom: 32px; }
.contact-intro { font-size: 15px; color: var(--text-2); line-height: 1.9; margin-bottom: 48px; }
.contact-items { display: flex; flex-direction: column; gap: 24px; margin-bottom: 48px; }
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
  transition: border-color 0.2s;
}
.contact-item:hover { border-color: var(--border-2); }
.contact-item-icon {
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.contact-item-label { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); margin-bottom: 4px; }
.contact-item-value { font-size: 14px; color: var(--text); }
.contact-item-value a { transition: color 0.2s; }
.contact-item-value a:hover { color: var(--accent); }
.contact-socials { display: flex; gap: 12px; flex-wrap: wrap; }
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: var(--radius);
  transition: all 0.2s;
}
.social-link:hover { color: var(--accent); border-color: var(--accent-dim); background: var(--accent-dim); }
.contact-faq { display: flex; flex-direction: column; gap: 0; }
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
}
.faq-q {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-q::after {
  content: '+';
  color: var(--text-3);
  font-size: 20px;
  font-weight: 300;
  transition: transform 0.2s;
  flex-shrink: 0;
}
.faq-item.open .faq-q::after { transform: rotate(45deg); color: var(--accent); }
.faq-a { font-size: 13px; color: var(--text-2); line-height: 1.8; display: none; padding-top: 4px; }
.faq-item.open .faq-a { display: block; }

/* ─── Footer ─────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
}
.footer-logo span { color: var(--accent); }
.footer-copy { font-size: 12px; color: var(--text-3); }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 12px; color: var(--text-3); transition: color 0.2s; }
.footer-links a:hover { color: var(--text); }

/* ─── Animations ─────────────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 48px; padding: 80px 24px 60px; }
  .hero-image { display: none; }
  .hero-stats { gap: 24px; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .about-img-wrap { max-width: 360px; }
  .projects-featured { grid-template-columns: 1fr; }
  .project-card:nth-child(2n) { border-right: none; }
  .projects-grid { grid-template-columns: 1fr 1fr; margin: 0 24px; }
  .section { padding: 60px 24px; }
  .portfolio-hero { padding: 60px 24px 40px; }
  .portfolio-filters { padding: 0 24px; }
  .detail-hero, .detail-body, .detail-gallery { padding-left: 24px; padding-right: 24px; }
  .detail-hero-img { padding: 0 24px; }
  nav { padding: 0 24px; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 24px;
    gap: 20px;
  }
  .nav-toggle { display: flex; }
  footer { padding: 32px 24px; flex-direction: column; align-items: flex-start; gap: 16px; }
  .skills-strip { padding: 16px 24px; }
  .testimonial-block { padding: 32px 24px; }
  .timeline-item { grid-template-columns: 1fr; gap: 8px; }
  .timeline-item::before { display: none; }
  .detail-gallery { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .projects-grid { grid-template-columns: 1fr; }
  .projects-grid .project-card:nth-child(3n) { border-right: none; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .detail-title { font-size: 28px; }
  .detail-meta { gap: 20px; }
}
