/* =============================================
   Raymond Trinidad Portfolio — style.css
   ============================================= */

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

:root {
  --color-bg:        #07090f;
  --color-surface:   #0d1117;
  --color-surface-2: #111827;
  --color-border:    #1c2333;
  --color-border-l:  #253047;
  --color-primary:   #4f8ef7;
  --color-primary-h: #3a7ae8;
  --color-text:      #e6eaf4;
  --color-muted:     #6b7a99;
  --color-accent:    #3ecf8e;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Fira Code", "Cascadia Code", Consolas, monospace;
  --radius:     8px;
  --radius-lg:  14px;
  --radius-xl:  20px;
  --max-w:      1120px;
  --max-w-n:    740px;
  --ease:       cubic-bezier(0.4, 0, 0.2, 1);
  --dur:        0.2s;
}

html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  line-height: 1.75;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--color-primary); text-decoration: none; transition: color var(--dur) var(--ease); -webkit-tap-highlight-color: transparent; }
a:hover { color: var(--color-primary-h); }
img { max-width: 100%; display: block; }
code { font-family: var(--font-mono); background: var(--color-surface); padding: 2px 6px; border-radius: 4px; font-size: 0.875em; }
pre { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.5rem; overflow-x: auto; margin: 1.5rem 0; }
pre code { background: none; padding: 0; }
small { font-size: 0.8em; color: var(--color-muted); }

/* ── Skip link ──────────────────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--color-primary);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0 0 var(--radius) var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 9999;
  transition: top var(--dur);
}
.skip-link:focus { top: 0; color: #fff; }

/* ── Layout ─────────────────────────────────────────────────────────────────── */
.container   { max-width: var(--max-w); margin: 0 auto; padding: 0 2rem; }
.container-narrow { max-width: var(--max-w-n); margin: 0 auto; padding: 0 2rem; }
.section     { padding: 6rem 0; }
.section-alt { background: var(--color-surface); }
.center-link { text-align: center; margin-top: 3rem; }

/* ── Section headers ────────────────────────────────────────────────────────── */
.section-header { margin-bottom: 3rem; }
.section-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.6rem;
}
.section-header h2,
.section h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.025em;
  line-height: 1.2;
}

/* ── Nav ─────────────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(7, 9, 15, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1rem 2rem;
}
.nav-logo {
  font-weight: 800;
  font-size: 1rem;
  color: var(--color-accent);
  letter-spacing: 0.06em;
  flex-shrink: 0;
}
.nav-logo:hover { color: var(--color-accent); text-decoration: none; }

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-links a {
  color: var(--color-muted);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color var(--dur), border-color var(--dur);
}
.nav-links a:hover,
.nav-links a.active { color: var(--color-text); border-bottom-color: var(--color-accent); }

/* Hamburger — 44×44px minimum touch target (iOS HIG) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-muted);
  border-radius: 2px;
  transition: all var(--dur) var(--ease);
}

/* ── Hero ────────────────────────────────────────────────────────────────────── */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 70% at 60% 0%, rgba(79,142,247,0.09) 0%, transparent 65%),
    radial-gradient(ellipse 40% 50% at 10% 90%, rgba(62,207,142,0.05) 0%, transparent 60%);
  pointer-events: none;
}
/* Subtle dot grid */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}
.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: var(--color-text);
  margin-bottom: 0.75rem;
}
.hero-role {
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: 1.25rem;
}
.hero-desc {
  color: var(--color-muted);
  font-size: 1rem;
  max-width: 520px;
  line-height: 1.85;
  margin-bottom: 2.5rem;
}
.hero-links { display: flex; gap: 0.875rem; flex-wrap: wrap; }

/* Hero avatar */
.hero-aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
.hero-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.hero-avatar-wrap::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-primary) 100%);
  z-index: 0;
}
.hero-avatar {
  position: relative;
  z-index: 1;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 3px solid var(--color-bg);
  display: block;
}

/* Hero aside card */
.hero-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-l);
  border-radius: var(--radius-xl);
  padding: 2rem 2.25rem;
  min-width: 200px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.03), 0 20px 60px rgba(0,0,0,0.4);
}
.hero-card-row { text-align: center; padding: 0.75rem 0; }
.hero-card-val {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-accent);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 0.3rem;
}
.hero-card-label {
  display: block;
  font-size: 0.72rem;
  color: var(--color-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.hero-card-divider {
  height: 1px;
  background: var(--color-border);
  margin: 0 -0.5rem;
}

/* ── Buttons ─────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.01em;
  transition: all var(--dur) var(--ease);
  cursor: pointer;
  white-space: nowrap;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3), 0 0 20px rgba(79,142,247,0.2);
}
.btn-primary:hover {
  background: var(--color-primary-h);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3), 0 0 28px rgba(79,142,247,0.35);
  text-decoration: none;
  transform: translateY(-1px);
}
.btn-outline {
  border: 1.5px solid var(--color-border-l);
  color: var(--color-muted);
  background: transparent;
}
.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  text-decoration: none;
}
.btn-ghost {
  color: var(--color-muted);
  background: rgba(255,255,255,0.04);
  border: 1.5px solid var(--color-border);
}
.btn-ghost:hover {
  color: var(--color-text);
  background: rgba(255,255,255,0.07);
  border-color: var(--color-border-l);
  text-decoration: none;
}

/* ── Stats Bar ───────────────────────────────────────────────────────────────── */
.stats-bar {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 2.75rem 0;
}
.stats-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.stat { flex: 1; text-align: center; padding: 0.5rem 1rem; }
.stat-val {
  display: block;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--color-accent);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 0.4rem;
}
.stat-label {
  display: block;
  font-size: 0.72rem;
  color: var(--color-muted);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.stat-divider {
  width: 1px;
  height: 48px;
  background: var(--color-border-l);
  flex-shrink: 0;
}

/* ── Skills ──────────────────────────────────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.skill-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.skill-card:hover {
  border-color: var(--color-border-l);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}
.skill-icon {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  line-height: 1;
}
.skill-card h3 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--color-accent);
  margin-bottom: 0.6rem;
}
.skill-card p { color: var(--color-muted); font-size: 0.875rem; line-height: 1.7; }

/* ── Timeline ────────────────────────────────────────────────────────────────── */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 112px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--color-border-l);
}
.timeline-item {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 2.5rem;
  padding: 0 0 2.5rem 0;
  position: relative;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-left {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  padding-top: 0.15rem;
  position: relative;
}
.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 2px solid var(--color-bg);
  box-shadow: 0 0 0 3px rgba(62,207,142,0.2);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.timeline-meta {
  font-size: 0.72rem;
  color: var(--color-muted);
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
  line-height: 1.4;
}
.timeline-body { padding-top: 0; }
.timeline-body h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.25rem;
  letter-spacing: -0.01em;
}
.timeline-company {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--color-primary);
  font-weight: 500;
  margin-bottom: 0.65rem;
}
.timeline-body p {
  color: var(--color-muted);
  font-size: 0.875rem;
  line-height: 1.8;
}

/* ── Certifications ──────────────────────────────────────────────────────────── */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 1rem;
}
.cert-group {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: border-color var(--dur), box-shadow var(--dur);
}
.cert-group:hover {
  border-color: var(--color-border-l);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}
.cert-issuer {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: 1rem;
}
.cert-list { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.cert-list li {
  color: var(--color-text);
  font-size: 0.875rem;
  padding-left: 1rem;
  position: relative;
  line-height: 1.5;
}
.cert-list li::before { content: "–"; position: absolute; left: 0; color: var(--color-muted); }

/* ── Blog Posts ──────────────────────────────────────────────────────────────── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}
.post-card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: border-color var(--dur), transform var(--dur), box-shadow var(--dur);
}
.post-card:hover {
  border-color: var(--color-border-l);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}
.post-date {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--color-accent);
}
.post-card h3 { font-size: 0.975rem; font-weight: 700; line-height: 1.4; }
.post-card h3 a { color: var(--color-text); }
.post-card h3 a:hover { color: var(--color-primary); }
.post-card p { color: var(--color-muted); font-size: 0.85rem; flex: 1; line-height: 1.75; }
.read-more { font-size: 0.82rem; font-weight: 600; color: var(--color-primary); }

/* Blog List page */
.posts-list { display: flex; flex-direction: column; gap: 2.5rem; }
.post-item { border-bottom: 1px solid var(--color-border); padding-bottom: 2.5rem; }
.post-item h2 { font-size: 1.3rem; margin: 0.4rem 0 0.75rem; letter-spacing: -0.01em; }
.post-item h2 a { color: var(--color-text); }
.post-item h2 a:hover { color: var(--color-primary); }
.post-item p { color: var(--color-muted); }
.post-meta { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0.75rem 0; }
.tag {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: 0.7rem;
  padding: 2px 10px;
  border-radius: 999px;
}

/* ── Blog Post Single ────────────────────────────────────────────────────────── */
.post-header { margin-bottom: 2.5rem; border-bottom: 1px solid var(--color-border); padding-bottom: 2rem; }
.post-header h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); margin: 0.75rem 0; letter-spacing: -0.025em; }
.post-desc { color: var(--color-muted); font-size: 1rem; }
.post-body h2 { font-size: 1.35rem; margin: 2.5rem 0 0.75rem; letter-spacing: -0.015em; }
.post-body h3 { font-size: 1.05rem; margin: 1.75rem 0 0.5rem; color: var(--color-accent); }
.post-body p { margin-bottom: 1.25rem; color: var(--color-muted); }
.post-body ul, .post-body ol { margin: 1rem 0 1.25rem 1.5rem; color: var(--color-muted); }
.post-body li { margin-bottom: 0.4rem; }
.post-body blockquote { border-left: 3px solid var(--color-primary); padding-left: 1.25rem; color: var(--color-muted); font-style: italic; margin: 1.5rem 0; }
.post-body table { display: block; width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.875rem; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.post-body th { background: var(--color-surface); color: var(--color-text); padding: 0.6rem 1rem; text-align: left; border: 1px solid var(--color-border); }
.post-body td { padding: 0.6rem 1rem; border: 1px solid var(--color-border); color: var(--color-muted); }
.post-footer { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--color-border); }

/* ── Contact ─────────────────────────────────────────────────────────────────── */
.contact-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-l);
  border-radius: var(--radius-xl);
  padding: 3.5rem;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  align-items: start;
}
.contact-text .section-label { margin-bottom: 0.5rem; }
.contact-text h2 { margin-bottom: 0.75rem; letter-spacing: -0.02em; }
.contact-text p { color: var(--color-muted); font-size: 0.95rem; margin-bottom: 1rem; }
.contact-email-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-accent);
  word-break: break-all;
  margin-bottom: 1.5rem;
}
.contact-email-link:hover { opacity: 0.8; }
.social-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.social-links a { color: var(--color-muted); font-size: 0.85rem; font-weight: 500; transition: color var(--dur); }
.social-links a:hover { color: var(--color-text); }

/* Contact form */
.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--color-muted);
  text-transform: uppercase;
}
.form-group input,
.form-group textarea {
  background: var(--color-bg);
  border: 1px solid var(--color-border-l);
  border-radius: var(--radius);
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  width: 100%;
  box-sizing: border-box;
  transition: border-color var(--dur), box-shadow var(--dur);
  -webkit-appearance: none;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.18);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--color-muted); opacity: 0.6; }
.form-group textarea { resize: vertical; min-height: 130px; }
.contact-status {
  font-size: 0.88rem;
  min-height: 1.2em;
  font-weight: 500;
  margin: 0;
}
.contact-status.success { color: #00b894; }
.contact-status.error   { color: #d63031; }

/* ── Footer ──────────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 3rem 2rem;
  background: var(--color-surface);
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}
.footer-name { font-weight: 700; color: var(--color-text); font-size: 0.9rem; }
.footer-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-links a { color: var(--color-muted); font-size: 0.8rem; font-weight: 500; }
.footer-links a:hover { color: var(--color-text); }
.footer-copy { color: var(--color-muted); font-size: 0.78rem; }

/* ── Scroll to top ───────────────────────────────────────────────────────────── */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 40px;
  height: 40px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border-l);
  color: var(--color-muted);
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--dur), transform var(--dur), background var(--dur);
  pointer-events: none;
  z-index: 100;
}
.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.scroll-top:hover { background: var(--color-border-l); color: var(--color-text); }

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .skills-grid  { grid-template-columns: repeat(2, 1fr); }
  .certs-grid   { grid-template-columns: repeat(2, 1fr); }
  .hero-inner   { grid-template-columns: 1fr; gap: 3rem; }
  .hero-aside   { flex-direction: row; align-items: center; gap: 2rem; flex-wrap: wrap; order: -1; }
  .hero-text    { order: 0; }
  .hero-avatar  { width: 160px; height: 160px; }
  .hero-card    { min-width: 200px; }
  .contact-card { grid-template-columns: 1fr; gap: 2rem; }
  .timeline::before { left: 0; }
  .timeline-item    { grid-template-columns: 1fr; gap: 0.75rem; padding-bottom: 2rem; }
  .timeline-left    { flex-direction: row; align-items: center; gap: 0.75rem; }
  .timeline-dot     { order: -1; }
  .timeline-meta    { text-align: left; }
}
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(7,9,15,0.97);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    gap: 0;
    padding: 1rem 0;
  }
  .nav-links.is-open { display: flex; }
  .nav-links li a {
    display: flex;
    align-items: center;
    padding: 0.875rem 2rem;
    min-height: 44px;   /* iOS HIG minimum touch target */
    border-bottom: none;
  }
  .stats-grid { flex-direction: column; gap: 1.5rem; }
  .stat-divider { width: 48px; height: 1px; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); } /* keep 2-col at tablet */
  .certs-grid  { grid-template-columns: 1fr; }
  .contact-card { padding: 2rem; }
}
@media (max-width: 560px) {
  .section { padding: 3.5rem 0; }
  .section-header { margin-bottom: 2rem; }
  .container, .container-narrow { padding: 0 1rem; }

  /* Hero: single column, avatar stacked above card */
  .hero { padding: 2.5rem 0; min-height: auto; }
  .hero-aside { flex-direction: column; align-items: center; width: 100%; }
  .hero-avatar { width: 120px; height: 120px; }
  .hero-card {
    min-width: 0;
    width: 100%;
    padding: 1.25rem 1.5rem;
    display: flex;
    gap: 0;
  }
  .hero-card-row { flex: 1; padding: 0; }
  .hero-card-divider { width: 1px; height: auto; margin: 0 0.25rem; }
  .hero-card-val { font-size: 1.4rem; }
  .hero-desc { margin-bottom: 1.75rem; }

  /* CTA buttons: full-width stacked column */
  .hero-links { flex-direction: column; gap: 0.75rem; width: 100%; }
  .hero-links .btn { width: 100%; justify-content: center; white-space: normal; }

  /* Skills: single column on very small screens */
  .skills-grid { grid-template-columns: 1fr; }

  /* Stats: tighter */
  .stats-bar { padding: 2rem 0; }

  /* Contact: tighter padding on small screens */
  .contact-card { padding: 1.5rem 1rem; gap: 1.5rem; }
  .contact-form .btn { width: 100%; justify-content: center; }
  .social-links { gap: 1rem; }

  /* Footer */
  .footer-links { gap: 0.75rem; }

  /* Scroll-to-top: smaller and closer to edge on mobile */
  .scroll-top { bottom: 1.25rem; right: 1.25rem; width: 36px; height: 36px; font-size: 0.9rem; }
}
