:root {
  --bg-body: #020617;
  --bg-elevated: #020617;
  --bg-elevated-soft: #020617;
  --bg-accent-soft: rgba(37, 99, 235, 0.08);
  --surface-1: #020617;
  --surface-2: #020617;
  --border-subtle: rgba(148, 163, 184, 0.3);
  --border-strong: rgba(148, 163, 184, 0.6);
  --accent: #6366f1;
  --accent-soft: rgba(99, 102, 241, 0.14);
  --accent-strong: #4f46e5;
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --text-soft: #6b7280;
  --shadow-soft: 0 24px 80px rgba(15, 23, 42, 0.7);
}

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

/* Custom Webkit Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-body);
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 999px;
  border: 2px solid var(--bg-body);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.5);
}

/* Highly Professional Text Selection */
::selection {
  background: rgba(56, 189, 248, 0.25);
  color: #ffffff;
}
[data-theme="light"] ::selection {
  background: rgba(239, 68, 68, 0.25);
  color: inherit;
}

/* ADA Keyboard Accessibility Focus Rings */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

html {
  /* Let JS handle smooth scrolling offset calculations to prevent Safari jank */
  scroll-padding-top: 100px; /* Prevents native hard anchor loads from hiding behind header */
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: radial-gradient(circle at top, #0b1120 0, #020617 52%, #020617 100%);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

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

a {
  color: inherit;
}

button {
  font: inherit;
}

.app {
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

/* Header / Navigation */

.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.96),
    rgba(15, 23, 42, 0.86),
    transparent
  );
  border-bottom: 1px solid rgba(15, 23, 42, 0.8);
}

.site-header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 24px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 40%;
  background: radial-gradient(circle at 20% 0%, #38bdf8 0, #6366f1 40%, #4f46e5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: #0b1120;
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.9);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-weight: 600;
  font-size: 15px;
}

.brand-role {
  font-size: 12px;
  color: var(--text-muted);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-link {
  position: relative;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-muted);
  padding-block: 4px;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8, #6366f1);
  transition: width 0.25s ease;
}

.nav-link:hover {
  color: var(--text-main);
}

.nav-link.is-active {
  color: var(--text-main);
}

.nav-link.is-active::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.85);
  color: var(--text-main);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease,
    box-shadow 0.2s ease;
  will-change: transform, box-shadow;
}

.icon-button i {
  font-size: 14px;
}

.icon-button:hover {
  background: rgba(30, 64, 175, 0.9);
  border-color: rgba(129, 140, 248, 0.8);
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.7);
}

.nav-toggle {
  display: none;
}

/* Live clock in header */
.live-time {
  font-size: 0.9rem;
  color: var(--text-muted);
  min-width: 3.5em;
  text-align: right;
}

/* Layout */

.page-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 96px 24px 72px;
}

.section {
  padding-block: 40px;
}

.section-alt {
  position: relative;
}

.section-alt::before {
  content: "";
  position: absolute;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  inset-block: 0;
  background: radial-gradient(
    circle at top,
    rgba(37, 99, 235, 0.14),
    transparent 55%
  );
  opacity: 0.6;
  pointer-events: none;
}

.section-inner {
  position: relative;
  z-index: 1;
}

.section-header {
  margin-bottom: 20px;
}

.section-header-center {
  text-align: center;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 4px;
}

.section-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-intro {
  margin-top: 10px;
  color: var(--text-muted);
  max-width: 640px;
}

.section-header-center .section-intro {
  margin-inline: auto;
}

.text-strong {
  color: #e5e7eb;
  font-weight: 600;
}

/* Hero */

.section-hero {
  padding-top: 24px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.1fr);
  gap: 40px;
  align-items: center;
}

.hero-title {
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.hero-subtitle {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.hero-body {
  font-size: 15px;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease,
    box-shadow 0.2s ease, color 0.2s ease;
  will-change: transform, box-shadow;
}

.btn-primary {
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  color: #0b1120;
  box-shadow: 0 18px 45px rgba(56, 189, 248, 0.8);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 55px rgba(56, 189, 248, 0.9);
}

.btn-ghost {
  background: rgba(15, 23, 42, 0.8);
  border-color: rgba(148, 163, 184, 0.6);
  color: var(--text-main);
}

.btn-ghost:hover {
  background: rgba(30, 64, 175, 0.9);
  border-color: rgba(129, 140, 248, 0.9);
}

.btn i {
  font-size: 13px;
}

/* Loading state for buttons */
.btn-loading {
  opacity: 0.7;
  pointer-events: none;
}
.btn-loading .btn-text {
  visibility: hidden;
}
.btn-loading .spinner {
  display: inline-block;
}
.spinner {
  display: none;
}


.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.meta-item {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(51, 65, 85, 0.9);
  background: radial-gradient(circle at 0 0, rgba(37, 99, 235, 0.16), transparent);
}

.meta-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-soft);
  margin-bottom: 2px;
}

.meta-value {
  font-size: 13px;
}

.hero-aside {
  display: flex;
  justify-content: flex-end;
}

.card-profile {
  max-width: 320px;
}

.card-profile .card-profile-body {
  padding: 16px 18px 18px;
}
.card-timeline-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}
.avatar-wrapper {
  padding: 4px;
  border-radius: 26px;
  background: radial-gradient(circle at 0 0, #38bdf8, #6366f1);
}

.avatar {
  border-radius: 22px;
  border: 4px solid #020617;
  object-fit: cover;
  width: 100%;
  height: auto;
}

.card-profile-body p {
  font-size: 14px;
  color: var(--text-muted);
}

.inline-links {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.inline-links a {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: var(--text-main);
  text-decoration: none;
  font-size: 14px;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.inline-links a:hover {
  background: rgba(30, 64, 175, 0.9);
  border-color: rgba(129, 140, 248, 0.9);
  transform: translateY(-1px);
}

/* Cards & grids */

.card {
  background: radial-gradient(circle at 0 0, rgba(15, 23, 42, 0.85), #020617);
  border-radius: 18px;
  padding: 18px 18px 18px;
  border: 1px solid rgba(51, 65, 85, 0.9);
  box-shadow: 0 26px 80px rgba(15, 23, 42, 0.9);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease;
  will-change: transform, box-shadow;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 32px 90px rgba(15, 23, 42, 1);
  border-color: rgba(56, 189, 248, 0.4);
}

[data-theme="light"] .card:hover {
  box-shadow: 0 32px 90px rgba(15, 23, 42, 0.08); /* softer shadow for light mode */
  border-color: rgba(239, 68, 68, 0.4); /* red accent */
}

.card h3 {
  font-size: 17px;
  margin-bottom: 4px;
}

.card-subtitle {
  font-size: 13px;
  color: var(--text-soft);
}

.card-meta {
  font-size: 13px;
  color: var(--text-soft);
  margin-top: 4px;
}

.card-body {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 8px;
}

.card-list {
  margin-top: 10px;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 14px;
}

.card-list li + li {
  margin-top: 6px;
}

.card-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: rgba(30, 64, 175, 0.4);
  color: #c7d2fe;
  border: 1px solid rgba(129, 140, 248, 0.9);
  margin-bottom: 8px;
}

.link-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #bfdbfe;
  background: rgba(56, 189, 248, 0.06);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.link-inline:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(56, 189, 248, 0.15);
}

.link-inline i {
  font-size: 11px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.link-inline:hover i {
  transform: translateX(4px);
}

.grid {
  display: grid;
  gap: 18px;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-project {
  min-height: 0;
}

.card-cert {
  min-height: 0;
}

.card-skill-group h3 {
  margin-bottom: 6px;
}

.card-skill-group ul {
  list-style: none;
  margin-top: 6px;
}

.card-skill-group li {
  font-size: 14px;
  color: var(--text-muted);
}

.card-skill-group li + li {
  margin-top: 4px;
}

/* Skills section */

.section-alt .section-inner {
  position: relative;
}

.skills-grid {
  margin-top: 10px;
}

/* Timeline */

.timeline {
  position: relative;
  margin-top: 16px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #38bdf8, #6366f1);
  opacity: 0.5;
}

.timeline-item {
  position: relative;
  margin-left: 32px;
  margin-bottom: 16px;
}

.timeline-dot {
  position: absolute;
  left: -22px;
  top: 18px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #0b1120;
  border: 2px solid #60a5fa;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.25);
}

.timeline-content {
  padding-left: 4px;
}

/* Contact section */

.section-contact {
  padding-bottom: 56px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.contact-card {
  border-radius: 16px;
  padding: 14px 15px;
  background: radial-gradient(circle at 0 0, rgba(15, 23, 42, 0.9), #020617);
  border: 1px solid rgba(51, 65, 85, 0.9);
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease,
    transform 0.2s ease, box-shadow 0.2s ease;
  will-change: transform, box-shadow;
}

.contact-card i {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.8);
  color: #e5e7eb;
  font-size: 15px;
}

.contact-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.contact-value {
  display: block;
  font-size: 14px;
}

.contact-card:hover {
  transform: translateY(-2px);
  border-color: rgba(129, 140, 248, 0.9);
  box-shadow: 0 20px 60px rgba(37, 99, 235, 0.7);
}

/* Back to top */

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: radial-gradient(circle at 0 0, #38bdf8, #6366f1);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #020617;
  box-shadow: 0 22px 58px rgba(37, 99, 235, 0.9);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 30;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top i {
  font-size: 15px;
}

/* Footer */

.site-footer {
  border-top: 1px solid rgba(15, 23, 42, 1);
  padding: 16px 0 18px;
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.9), #020617);
}

.site-footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: 24px;
  font-size: 13px; /* Slightly bumped for legibility */
  color: var(--text-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.live-time-footer {
  font-family: monospace; /* Gives context and digital flavor */
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.site-footer strong {
  font-weight: 600;
  color: var(--text-main);
}

/* Scroll behavior styling */

.site-header--scrolled {
  border-bottom-color: rgba(37, 99, 235, 0.9);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.9);
}

/* Responsive */
/* --- LIGHT MODE OVERRIDES --- */
[data-theme="light"] {
  --bg-body: #f4f0e6;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-soft: #64748b;
  --border-subtle: rgba(15, 23, 42, 0.1);
  --border-strong: rgba(15, 23, 42, 0.2);
  --accent: #ef4444; /* red-500 */
  --accent-strong: #dc2626; /* red-600 */
}

[data-theme="light"] body {
  background: radial-gradient(circle at top, #fdfbf7 0, #f4f0e6 52%, #e8e1d5 100%);
}

[data-theme="light"] .site-header {
  background: linear-gradient(
    to bottom,
    rgba(253, 251, 247, 0.96),
    rgba(253, 251, 247, 0.86),
    transparent
  );
  border-bottom-color: rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .site-header--scrolled {
  border-bottom-color: rgba(15, 23, 42, 0.15);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

[data-theme="light"] .icon-button {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(15, 23, 42, 0.15);
  color: #0f172a;
}

[data-theme="light"] .icon-button:hover {
  background: rgba(254, 226, 226, 0.6);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
  box-shadow: 0 10px 30px rgba(239, 68, 68, 0.15);
}

[data-theme="light"] .btn-primary {
  background: linear-gradient(135deg, #fca5a5, #ef4444);
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(239, 68, 68, 0.3);
}

[data-theme="light"] .btn-primary:hover {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 15px 40px rgba(239, 68, 68, 0.4);
  transform: translateY(-1px);
}

[data-theme="light"] .btn-ghost {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(15, 23, 42, 0.2);
  color: #0f172a;
}

[data-theme="light"] .btn-ghost:hover {
  background: rgba(254, 226, 226, 0.6); /* very light red hover */
  border-color: rgba(239, 68, 68, 0.4);
  color: #b91c1c; /* darker red text */
}

[data-theme="light"] .text-strong {
  color: #0f172a;
}

[data-theme="light"] .brand-mark {
  color: #ffffff;
}

[data-theme="light"] .brand-mark {
  background: radial-gradient(circle at 20% 0%, #fca5a5 0, #ef4444 40%, #b91c1c 100%);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.3);
}

[data-theme="light"] .meta-item {
  border-color: rgba(15, 23, 42, 0.1);
  background: radial-gradient(circle at 0 0, rgba(239, 68, 68, 0.05), transparent);
}

[data-theme="light"] .card-badge {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border-color: rgba(239, 68, 68, 0.4);
}

[data-theme="light"] .card,
[data-theme="light"] .contact-card {
  background: radial-gradient(circle at 0 0, rgba(253, 251, 247, 0.95), #fdfbf7);
  border-color: rgba(15, 23, 42, 0.08); /* slightly softer border for warm white */
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .inline-links a {
  background: rgba(253, 251, 247, 0.9);
  border-color: rgba(15, 23, 42, 0.15);
  color: #0f172a;
}

[data-theme="light"] .inline-links a:hover {
  background: rgba(254, 226, 226, 0.6);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

[data-theme="light"] .link-inline {
  color: #dc2626;
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.25);
}

[data-theme="light"] .link-inline:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.4);
  color: #b91c1c;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.15);
}

[data-theme="light"] .nav-link::after {
  background: linear-gradient(90deg, #fca5a5, #ef4444);
}

[data-theme="light"] .timeline::before {
  background: linear-gradient(to bottom, #fca5a5, #ef4444);
}

[data-theme="light"] .timeline-dot {
  background: #fdfbf7;
  border-color: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2);
}

[data-theme="light"] .site-footer {
  border-top-color: rgba(15, 23, 42, 0.1);
  background: radial-gradient(circle at top, rgba(253, 251, 247, 0.9), #f4f0e6);
}

[data-theme="light"] .section-alt::before {
  background: radial-gradient(circle at top, rgba(239, 68, 68, 0.06), transparent 55%);
}

[data-theme="light"] .site-nav.is-open {
  background: rgba(253, 251, 247, 0.98);
  border-bottom-color: rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .contact-card i {
  background: rgba(241, 245, 249, 0.9);
  border-color: rgba(15, 23, 42, 0.15);
  color: #0f172a;
}

[data-theme="light"] .contact-card:hover i {
  background: rgba(254, 226, 226, 0.6);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

[data-theme="light"] .back-to-top {
  color: #ffffff;
  background: radial-gradient(circle at 0 0, #fca5a5, #ef4444);
  box-shadow: 0 22px 58px rgba(239, 68, 68, 0.5);
}

[data-theme="light"] .avatar-wrapper {
  background: radial-gradient(circle at 0 0, #fca5a5, #ef4444);
}

[data-theme="light"] .avatar {
  border: 4px solid #fdfbf7;
}

/* Responsive */

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.1fr);
    gap: 30px;
  }

  .hero-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .site-header-inner {
    padding-inline: 16px;
  }

  .site-nav {
    position: fixed;
    inset-inline: 0;
    top: 54px;
    background: rgba(15, 23, 42, 0.98);
    border-bottom: 1px solid rgba(37, 99, 235, 0.8);
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 16px 14px;
    gap: 10px;
    transform: translateY(-20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  [data-theme="light"] .site-nav {
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(239, 68, 68, 0.4);
  }

  .site-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-toggle {
    display: flex;
  }

  .page-main {
    padding-inline: 16px;
  }

  .hero-grid {
    display: flex;
    flex-direction: column-reverse;
    gap: 24px;
  }

  .hero-meta {
    grid-template-columns: minmax(0, 1fr);
  }

  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 26px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

