/* ===================================================================
 * Valence Mwigani Portfolio — Design System v2
 * Primary: #14B8A6 | Secondary: #0F172A | BG: #F8FAFC
 * Headings: Playfair Display | Body: Inter
 * =================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@500;600;700&display=swap");

:root {
  --primary: #14b8a6;
  --primary-dark: #0d9488;
  --primary-light: rgba(20, 184, 166, 0.12);
  --secondary: #0f172a;
  --bg: #f8fafc;
  --text: #334155;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --font-heading: "Playfair Display", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
  --header-h: 72px;
  --header-h-mobile: 64px;
  --section-y: clamp(4rem, 8vw, 6.5rem);
  --section-y-mobile: clamp(3rem, 6vw, 4.5rem);
  --container-max: 1140px;
  --nav-break: 900px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body.portfolio-site {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.6rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-dark); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--secondary); }

a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 10001;
  padding: 0.75em 1.25em;
  background: var(--primary);
  color: var(--secondary);
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.skip-link:focus { top: 1rem; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--secondary);
  line-height: 1.15;
  margin: 0 0 0.75em;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.section {
  padding: var(--section-y) 0;
}

.section--white { background: var(--white); }
.section--muted { background: var(--bg); }
.section--dark {
  background: var(--secondary);
  color: rgba(255, 255, 255, 0.88);
}
.section--dark h2, .section--dark h3 { color: var(--white); }

.eyebrow {
  display: inline-block;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary-dark);
  margin-bottom: 0.75rem;
}

.section-head {
  max-width: 640px;
  margin-bottom: 3.2rem;
}

.section-head--center {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(2.8rem, 4vw, 4.2rem);
  margin-bottom: 0.5em;
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.7rem;
}

.lead { font-size: 1.75rem; line-height: 1.65; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85em 1.6em;
  min-height: 44px;
  font-family: var(--font-body);
  font-size: 1.45rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover { transform: translateY(-2px); }

.btn--primary {
  background: var(--primary);
  color: var(--secondary);
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(20, 184, 166, 0.35);
}

.btn--primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--white);
}

.btn--outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.5);
}

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

.btn--secondary {
  background: var(--white);
  color: var(--secondary);
  border-color: var(--border);
}

.btn--secondary:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.btn--sm {
  padding: 0.55em 1.1em;
  font-size: 1.3rem;
}

.btn--ghost {
  background: var(--bg);
  color: var(--secondary);
  border-color: var(--border);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled,
.site-header--inner {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.site-header--inner .site-nav__links a,
.site-header.is-scrolled .site-nav__links a {
  color: var(--text);
}

.site-header--inner .menu-toggle span {
  background: var(--secondary);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 1.5rem;
}

.site-header__logo img {
  height: 40px;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__links a {
  display: block;
  padding: 0.5em 0.85em;
  font-size: 1.4rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.site-header.is-scrolled .site-nav__links a {
  color: var(--text);
}

.site-nav__links a:hover,
.site-nav__links a.is-active {
  color: var(--primary-dark);
  background: var(--primary-light);
}

.site-header.is-scrolled .site-nav__links a.is-active {
  color: var(--primary-dark);
}

.site-nav__cta .btn {
  padding: 0.6em 1.25em;
  font-size: 1.35rem;
}

.menu-toggle {
  display: none;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
  position: relative;
  z-index: 1001;
  -webkit-tap-highlight-color: transparent;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  margin: 5px auto;
  transition: background 0.2s;
}

.site-header.is-scrolled .menu-toggle span { background: var(--secondary); }

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 3rem) 0 4rem;
  background-color: var(--secondary);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg,
      rgba(15, 23, 42, 0.97) 0%,
      rgba(15, 23, 42, 0.92) 42%,
      rgba(15, 23, 42, 0.55) 68%,
      rgba(15, 23, 42, 0.25) 100%),
    url("../images/v10.jpeg") right center / cover no-repeat;
  z-index: 0;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 20% 40%, rgba(20, 184, 166, 0.08), transparent 55%);
  z-index: 0;
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 620px;
}

.hero__label {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(3.2rem, 5.5vw, 5.6rem);
  color: var(--white);
  margin-bottom: 0.35em;
  line-height: 1.08;
}

.hero__role {
  font-size: clamp(1.6rem, 2.5vw, 2rem);
  color: rgba(255, 255, 255, 0.75);
  font-weight: 400;
  margin-bottom: 1.25rem;
}

.hero__desc {
  font-size: 1.65rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.65;
  margin-bottom: 0;
  max-width: 52ch;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 2.75rem;
  padding: 0;
  list-style: none;
  max-width: 36rem;
}

.hero__stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  padding: 1.15rem 1.25rem;
  border-radius: 12px;
  text-align: left;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.09) 0%,
    rgba(255, 255, 255, 0.03) 100%
  );
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.hero__stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
  border-radius: 3px 0 0 3px;
}

.hero__stat:hover {
  border-color: rgba(20, 184, 166, 0.35);
  transform: translateY(-2px);
}

.hero__stat-value {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 4.5vw, 3rem);
  font-weight: 600;
  color: var(--white);
  line-height: 1;
  letter-spacing: -0.02em;
}

.hero__stat--text .hero__stat-value {
  font-size: clamp(1.45rem, 2.8vw, 1.75rem);
  line-height: 1.15;
}

.hero__stat-label {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.52);
  line-height: 1.35;
}

/* About */
.section--about {
  background: linear-gradient(165deg, var(--white) 0%, var(--bg) 45%, var(--white) 100%);
  position: relative;
  overflow: hidden;
}

.section--about::before {
  content: "";
  position: absolute;
  top: -20%;
  right: -10%;
  width: min(480px, 50vw);
  height: min(480px, 50vw);
  background: radial-gradient(circle, rgba(20, 184, 166, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.95fr) 1.15fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
  position: relative;
  z-index: 1;
}

.about-media {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
}

.about-photo {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--secondary);
}

.about-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(15, 23, 42, 0.35) 100%);
  pointer-events: none;
}

.about-photo img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  display: block;
}

.about-photo-caption {
  margin: 1rem 0 0;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  letter-spacing: 0.02em;
}

.about-content h2 {
  font-size: clamp(2.6rem, 4vw, 3.6rem);
  margin: 0.35em 0 0.6em;
  max-width: 18ch;
}

.about-lead {
  font-size: 1.75rem;
  line-height: 1.65;
  color: var(--text);
  margin: 0 0 1.25rem;
  max-width: 52ch;
}

.about-content > p {
  font-size: 1.55rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
  max-width: 58ch;
}

.about-content > p strong {
  color: var(--secondary);
}

.about-education {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin: 1.5rem 0 1.75rem;
  padding: 1.15rem 1.35rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  max-width: 58ch;
}

.about-education__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--primary-dark);
  background: var(--primary-light);
  border-radius: 10px;
}

.about-education strong {
  display: block;
  font-size: 1.35rem;
  color: var(--secondary);
  margin-bottom: 0.2rem;
}

.about-education span {
  font-size: 1.45rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.about-highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}

.about-highlight {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.35rem 1.25rem;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s, border-color 0.25s;
}

.about-highlight:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(20, 184, 166, 0.35);
}

.about-highlight__num {
  flex-shrink: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--primary-dark);
  padding: 0.35em 0.55em;
  border-radius: 8px;
  background: var(--primary-light);
  line-height: 1;
}

.about-highlight h4 {
  font-family: var(--font-body);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--secondary);
  margin: 0 0 0.35rem;
}

.about-highlight p {
  margin: 0;
  font-size: 1.35rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.about-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.skill-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}

.skill-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.skill-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.skill-card h3 {
  font-family: var(--font-body);
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.skill-bar {
  margin-bottom: 0.85rem;
}

.skill-bar__label {
  display: flex;
  justify-content: space-between;
  font-size: 1.3rem;
  margin-bottom: 0.35rem;
  color: var(--text-muted);
}

.skill-bar__track {
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.skill-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  border-radius: 99px;
  transition: width 1s var(--ease);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.tag {
  font-size: 1.2rem;
  font-weight: 600;
  padding: 0.35em 0.75em;
  border-radius: 99px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}

/* Projects — primary focus */
.projects-section {
  background: linear-gradient(180deg, var(--white) 0%, var(--bg) 100%);
}

.filter-bar {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.65rem;
  justify-content: flex-start;
  margin-bottom: 2.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0.35rem;
  margin-inline: calc(-1 * clamp(1rem, 4vw, 2rem));
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-btn {
  font-family: var(--font-body);
  font-size: 1.35rem;
  font-weight: 600;
  padding: 0.65em 1.15em;
  min-height: 44px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.filter-btn:hover,
.filter-btn.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--secondary);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.75rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s, border-color 0.25s;
  height: 100%;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(20, 184, 166, 0.45);
}

.project-card.is-hidden { display: none; }

.project-card__media {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, var(--primary-dark) 100%);
}

.project-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}

.project-card__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 2.4rem;
  color: rgba(255, 255, 255, 0.35);
}

.project-card__featured {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.35em 0.7em;
  border-radius: 6px;
  background: var(--primary);
  color: var(--secondary);
}

.project-card__body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-card__cat {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.project-card__body h3 {
  font-family: var(--font-body);
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0.4em 0 0.5em;
  color: var(--secondary);
}

.project-card__body p {
  font-size: 1.4rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 2rem;
  border-left: 2px solid var(--border);
  max-width: 720px;
  margin: 0 auto;
}

.timeline-item {
  position: relative;
  padding: 0 0 2.5rem 1.5rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -2rem;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  margin-left: -7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.timeline-item h3 {
  font-family: var(--font-body);
  font-size: 1.65rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.timeline-item .company {
  font-size: 1.4rem;
  color: var(--primary-dark);
  font-weight: 600;
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.service-card h3 {
  font-family: var(--font-body);
  font-size: 1.65rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.service-card p {
  margin: 0;
  font-size: 1.45rem;
  color: var(--text-muted);
}

/* Journal */
.journal-featured {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
}

.journal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.journal-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.journal-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.journal-card__cat {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-dark);
  text-transform: uppercase;
}

.journal-card h3 {
  font-size: 1.55rem;
  font-family: var(--font-body);
  font-weight: 700;
  margin: 0.5em 0;
}

.journal-card h3 a { color: inherit; }
.journal-card h3 a:hover { color: var(--primary-dark); }

/* Contact */
.section--contact {
  background: linear-gradient(180deg, var(--bg) 0%, var(--white) 50%, var(--bg) 100%);
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 1.75rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, border-color 0.25s;
}

a.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(20, 184, 166, 0.45);
  color: inherit;
}

a.contact-card:hover .contact-card__value {
  color: var(--primary-dark);
}

.contact-card--static {
  cursor: default;
}

.contact-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary-light), rgba(20, 184, 166, 0.2));
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.contact-card__label {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contact-card__value {
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--secondary);
  line-height: 1.4;
  overflow-wrap: anywhere;
  word-break: break-word;
  transition: color 0.2s;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

/* Contact page layout (form) */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 3rem;
  align-items: start;
}

.contact-info {
  display: grid;
  gap: 1.25rem;
}

.contact-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.contact-item__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.contact-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--secondary);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75em 1em;
  font-family: var(--font-body);
  font-size: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* Footer */
.site-footer {
  background: #0b1220;
  color: rgba(255, 255, 255, 0.65);
  padding: 3rem 0 2rem;
  font-size: 1.4rem;
}

.site-footer a { color: var(--primary); }

.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.site-footer h3 {
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

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

.site-footer li { margin-bottom: 0.5rem; }

.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  text-align: center;
}

/* Preloader */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s, visibility 0.5s;
}

.ss-loaded #preloader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-dots span {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 4px;
  background: var(--primary);
  border-radius: 50%;
  animation: pulse 1.2s infinite ease-in-out;
}

.loader-dots span:nth-child(2) { animation-delay: 0.15s; }
.loader-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes pulse {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

/* Page header (inner pages) */
.page-hero {
  padding: calc(var(--header-h) + 3rem) 0 3rem;
  background: var(--secondary);
  color: var(--white);
  text-align: center;
}

.page-hero h1 {
  color: var(--white);
  font-size: clamp(3rem, 5vw, 4.5rem);
}

.page-hero p {
  color: rgba(255, 255, 255, 0.7);
  max-width: 600px;
  margin: 0.75rem auto 0;
}

/* Responsive — tablet */
@media (max-width: 1024px) {
  .project-grid,
  .services-grid,
  .journal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-grid { grid-template-columns: 1fr; }
  .about-highlights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-media { position: static; }
  .contact-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-grid,
  .journal-featured { grid-template-columns: 1fr; }
}

/* Responsive — mobile nav (≤900px) */
@media (max-width: 900px) {
  :root {
    --header-h: var(--header-h-mobile);
  }

  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .site-header__logo img {
    height: 34px;
  }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem clamp(1rem, 4vw, 2rem) 2rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.3s var(--ease), opacity 0.3s, visibility 0.3s;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.menu-open {
    overflow: hidden;
    touch-action: none;
  }

  body.menu-open .site-nav {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  body.menu-open .menu-toggle span {
    background: var(--secondary);
  }

  .site-nav__links {
    flex-direction: column;
    width: 100%;
    align-items: stretch;
    gap: 0.15rem;
  }

  .site-nav__links a {
    color: var(--text) !important;
    padding: 0.85em 1em;
    min-height: 44px;
    display: flex;
    align-items: center;
    font-size: 1.5rem;
  }

  .site-nav__cta {
    width: 100%;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
  }

  .site-nav__cta .btn {
    width: 100%;
    min-height: 48px;
  }
}

/* Responsive — mobile layout (≤768px) */
@media (max-width: 768px) {
  .section {
    padding-block: var(--section-y-mobile);
  }

  .section-head h2 {
    font-size: clamp(2.4rem, 7vw, 3.2rem);
  }

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

  .lead {
    font-size: 1.6rem;
  }

  .about-grid,
  .about-highlights { grid-template-columns: 1fr; }

  .about-content h2 {
    max-width: none;
    font-size: clamp(2.4rem, 7vw, 3rem);
  }

  .about-photo img {
    aspect-ratio: 1 / 1;
    max-height: 420px;
    object-position: center top;
  }

  .about-actions .btn,
  .contact-actions .btn,
  .btn-group .btn {
    width: 100%;
    min-height: 48px;
  }

  .project-grid,
  .services-grid,
  .journal-grid,
  .contact-cards,
  .site-footer__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .contact-card__value {
    font-size: 1.4rem;
  }

  .hero {
    min-height: auto;
    padding: calc(var(--header-h) + 2rem) 0 3rem;
    align-items: flex-end;
  }

  .hero h1 {
    font-size: clamp(2.8rem, 9vw, 4rem);
  }

  .hero__role {
    font-size: 1.55rem;
  }

  .hero__desc {
    font-size: 1.5rem;
  }

  .hero__stats {
    grid-template-columns: 1fr;
    max-width: 100%;
    gap: 0.65rem;
    margin-top: 2rem;
  }

  .hero__stat {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
  }

  .hero__stat-value {
    font-size: 2rem;
  }

  .hero__stat--text .hero__stat-value {
    font-size: 1.45rem;
  }

  .hero__stat-label {
    text-align: right;
    max-width: 11rem;
    font-size: 1rem;
  }

  .hero::before {
    background:
      linear-gradient(180deg,
        rgba(15, 23, 42, 0.96) 0%,
        rgba(15, 23, 42, 0.9) 50%,
        rgba(15, 23, 42, 0.82) 100%),
      url("../images/v10.jpeg") 75% 20% / cover no-repeat;
  }

  .hero__content {
    max-width: none;
    width: 100%;
  }

  .btn-group {
    flex-direction: column;
    width: 100%;
  }

  .page-hero {
    padding: calc(var(--header-h) + 2rem) 0 2.5rem;
  }

  .page-hero h1 {
    font-size: clamp(2.6rem, 8vw, 3.6rem);
  }

  .journal-featured {
    padding: 1.5rem;
  }

  .journal-featured h2 {
    font-size: 2rem !important;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .timeline {
    padding-left: 1.5rem;
  }

  .site-footer__grid {
    gap: 1.5rem;
    text-align: center;
  }
}

/* Responsive — small phones (≤480px) */
@media (max-width: 480px) {
  .filter-bar {
    justify-content: flex-start;
  }

  .project-card__body h3 {
    font-size: 1.6rem;
  }

  .contact-card {
    padding: 1.35rem;
  }

  .about-highlight {
    flex-direction: column;
    gap: 0.65rem;
  }

  .about-education {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Responsive — 320px */
@media (max-width: 375px) {
  .hero__label {
    font-size: 1.1rem;
    letter-spacing: 0.08em;
  }

  .hero h1 {
    font-size: 2.6rem;
  }

  .filter-btn {
    font-size: 1.25rem;
    padding: 0.6em 1em;
  }

  .skill-card,
  .service-card {
    padding: 1.35rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
