@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Color Palette - Sophisticated Obsidian & Slate */
  --bg-base: #0B0F19;
  --bg-surface: #121826;
  --bg-card: #182235;
  --bg-card-hover: #202D45;
  
  --border-subtle: rgba(255, 255, 255, 0.04);
  --border-active: rgba(255, 255, 255, 0.12);
  
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  
  --accent-soft: #38BDF8;
  --accent-dim: rgba(56, 189, 248, 0.15);
  --accent-solid: #0EA5E9;
  
  /* Layout & Spacing */
  --max-width: 1100px;
  --header-height: 80px;
  
  /* Transitions */
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Android Chrome "boosts" small fonts for readability — opt out so our
     explicitly-sized typography stays exactly as designed on mobile. */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* When the custom cursor is active, hide the OS cursor everywhere…
   EXCEPT inside text inputs/textarea/contenteditable so users can still see
   the I-beam and text-selection cursor (critical for the contact form). */
.custom-cursor-active,
.custom-cursor-active * {
  cursor: none;
}

.custom-cursor-active input,
.custom-cursor-active textarea,
.custom-cursor-active [contenteditable="true"],
.custom-cursor-active select {
  cursor: text;
}

body {
  overflow-x: hidden;
  background: radial-gradient(circle at 50% 0%, rgba(24, 34, 53, 0.4) 0%, var(--bg-base) 70%);
}

/* Cursor-Reactive Background
   Painted above body bg but BELOW all content via z-index 0 + isolation,
   with pointer-events:none so it never intercepts interactions.
   (Previously z-index:-1 — sections with their own bg-color would occlude it.) */
.cursor-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  isolation: isolate;
}

/* Ensure all real content paints above the reactive bg layer.
   IMPORTANT exclusions:
     .cursor-bg, .cursor-dot, .cursor-ring — position:fixed elements with
       viewport-relative transforms; setting them position:relative would
       break the cursor tracking.
     nav — the mobile dropdown that uses position:fixed on small viewports;
       same reason.
     header — the top bar that is position:fixed; if this rule matched,
       it would override fixed with relative and the bar would scroll away
       with the page instead of staying pinned to the top. */
body > *:not(.cursor-bg):not(.cursor-dot):not(.cursor-ring):not(nav):not(header) {
  position: relative;
  z-index: 1;
}

/* NOTE: The mobile <nav> was moved out of <header> so it has its own
   root-level stacking context and can paint above any transform/filter
   on the page. On desktop it stays in normal flow inside the header
   (handled by the existing `nav ul` rules below) and inherits no special
   positioning. The mobile-only overrides inside @media (max-width: 768px)
   apply position:fixed + z-index:9999 only there. */

/* Subtle static grid layer */
.cursor-bg__grid {
  position: absolute;
  inset: -2px;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: -1px -1px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 75%);
  opacity: 0.55;
}

/* Lava Lamp Particles — full-viewport canvas painted behind the glow layers.
   Kept very low-opacity so it adds atmosphere without competing with content. */
.cursor-bg__lava {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* Faded so individual blobs never overpower text/UI */
  opacity: 0.55;
  /* Screen blend brightens particles against the dark background, like
     bioluminescent light — same blend mode as the cursor spotlight. */
  mix-blend-mode: screen;
  pointer-events: none;
}

/* Soft mouse-tracking glow */
.cursor-bg__glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(56, 189, 248, 0.18) 0%,
    rgba(56, 189, 248, 0.08) 35%,
    transparent 70%);
  transform: translate3d(-50%, -50%, 0);
  opacity: 0;
  transition: opacity 0.6s ease;
  will-change: transform;
  filter: blur(10px);
}

.cursor-bg.active .cursor-bg__glow {
  opacity: 1;
}

/* Tighter, brighter spotlight that follows the cursor more closely */
.cursor-bg__spotlight {
  position: absolute;
  top: 0;
  left: 0;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(255, 255, 255, 0.06) 0%,
    rgba(56, 189, 248, 0.05) 40%,
    transparent 70%);
  transform: translate3d(-50%, -50%, 0);
  opacity: 0;
  transition: opacity 0.6s ease;
  will-change: transform;
  mix-blend-mode: screen;
}

.cursor-bg.active .cursor-bg__spotlight {
  opacity: 1;
}

/* Hide the reactive layers for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .cursor-bg__glow,
  .cursor-bg__spotlight,
  .cursor-bg__lava {
    display: none;
  }
  .cursor-bg__grid {
    opacity: 0.25;
  }
}

/* Custom Themed Cursor
   - .cursor-dot: tiny sky-blue pinpoint at the exact cursor location
   - .cursor-ring: thin ring that lerps behind it (the "delayed follower")
   Painted above everything; native cursor is hidden via JS on capable pointers. */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate3d(-50%, -50%, 0);
  opacity: 0;
  transition: opacity 0.35s ease;
  will-change: transform;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-soft);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.85),
    0 0 12px rgba(56, 189, 248, 0.55);
}

.cursor-ring {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid rgba(56, 189, 248, 0.55);
  background: radial-gradient(circle, rgba(56, 189, 248, 0.08) 0%, transparent 70%);
  transition: opacity 0.35s ease, width 0.25s ease, height 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

/* Active state — hover over clickable elements */
.cursor-dot.is-active {
  transform: translate3d(-50%, -50%, 0) scale(1.6);
}

.cursor-ring.is-active {
  width: 56px;
  height: 56px;
  border-color: rgba(56, 189, 248, 0.85);
  background: radial-gradient(circle, rgba(56, 189, 248, 0.16) 0%, transparent 70%);
}

/* Pressed state — click feedback */
.cursor-dot.is-pressed {
  transform: translate3d(-50%, -50%, 0) scale(0.7);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.95),
    0 0 18px rgba(56, 189, 248, 0.75);
}

.cursor-ring.is-pressed {
  width: 30px;
  height: 30px;
  border-color: rgba(255, 255, 255, 0.6);
}

/* Visible only when the cursor-bg is active (i.e. real mouse is moving).
   The .is-visible class is toggled from JS alongside .cursor-bg.active. */
.cursor-dot.is-visible,
.cursor-ring.is-visible {
  opacity: 1;
}

/* Hide custom cursor on touch / coarse pointers and when motion is reduced */
@media (hover: none), (pointer: coarse) {
  .cursor-dot,
  .cursor-ring {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cursor-dot,
  .cursor-ring {
    display: none;
  }
}

h1, h2, h3, h4 {
  font-family: 'Outfit', sans-serif;
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-card);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--bg-card-hover);
}

/* Reusable Layout Classes */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.section-padding {
  padding: 8rem 0;
}

.text-gradient {
  background: linear-gradient(135deg, #FFFFFF 30%, #94A3B8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Header & Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  background: rgba(11, 15, 25, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition-smooth);
}

header.scrolled {
  height: 70px;
  background: rgba(11, 15, 25, 0.85);
  border-bottom: 1px solid var(--border-active);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.03em;
  display: inline-flex;
  align-items: center;
}

.logo__text span {
  color: var(--text-muted);
  font-weight: 400;
}

/* Logo image — sized to fit the ~80px header height comfortably.
   Tweak max-height to taste; 36px leaves a nice 22px vertical margin.

   IMPORTANT: This site uses a dark obsidian header. Most transparent
   logos are dark text on transparent background, which would be invisible.
   The .logo__img--invert-dark variant flips dark pixels to light via CSS
   filter (no image editing needed). Drop in any logo and it just works. */

/* Default: hide the image, show the text wordmark */
.logo__img {
  display: none;
  height: 36px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

/* When the parent <a> has .logo--has-image (added by JS, kept on success,
   or never removed if no onerror fires), show the image and hide the text. */
.logo--has-image .logo__img {
  display: block;
}

.logo--has-image .logo__text {
  display: none;
}

/* Applied automatically by JS for transparent-background logos.
   inverts dark pixels → light (transparency stays transparent),
   tiny brightness boost for premium feel, subtle drop-shadow for depth. */
.logo__img.logo--inverted {
  filter:
    invert(1)
    brightness(1.05)
    drop-shadow(0 1px 1px rgba(0, 0, 0, 0.3));
}

/* Desktop nav lives inside <header> alongside the logo and hamburger.
   Push the nav to the right edge of the container with `margin-left: auto`,
   while keeping the logo flush left. On mobile (≤768px) this rule is
   overridden by the column layout inside the dropdown panel. */
nav {
  margin-left: auto;
  margin-right: 1rem; /* breathing room before the hamburger button */
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2.5rem;
  align-items: center;
}

nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 0.5rem 0;
}

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

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1.5px;
  background-color: var(--text-primary);
  transition: var(--transition-smooth);
}

nav a:hover::after, nav a.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  margin: 4px 0;
  transition: var(--transition-fast);
}

/* Hero Section */
.hero {
  /* Tightened from `+ 4rem` so the photo is visible above the fold on
     standard laptop viewports without scrolling. The header height alone
     is enough clearance; the extra 4rem was dead space. */
  padding-top: calc(var(--header-height) + 1.25rem);
  padding-bottom: 2rem;
  /* Was min-height: 85vh — forced vertical centering that pushed the photo
     off-screen on shorter viewports. Now sized to natural content. */
  display: flex;
  align-items: center;
  position: relative;
}

.hero-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  /* Was 3rem — tighter so content and headshot sit closer together,
     making both fit above the fold on a 1080p screen. */
  gap: 2rem;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 800px;
}

.tagline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 99px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 2rem;
}

.tagline::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10B981; /* pulsing green active state */
  box-shadow: 0 0 8px #10B981;
}

.hero h1 {
  font-size: 3.5rem;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  font-weight: 800;
}

.hero p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin-bottom: 2.5rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  border-radius: 12px;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: var(--text-primary);
  color: var(--bg-base);
  border: 1px solid var(--text-primary);
}

.btn-primary:hover {
  background: transparent;
  color: var(--text-primary);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  color: var(--text-primary);
  border-color: var(--border-active);
  background: rgba(255, 255, 255, 0.02);
  transform: translateY(-2px);
}

/* Profile Photo Container */
.hero-image-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-circle {
  position: relative;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  padding: 8px;
  background: linear-gradient(135deg, var(--border-active), transparent);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.profile-circle::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 50%, rgba(255, 255, 255, 0.05));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.profile-image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Strategic Summary / About */
.section-header {
  max-width: 600px;
  margin-bottom: 4rem;
}

.section-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  display: block;
}

.section-header h2 {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.2;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
}

.about-text p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}

.about-text p:last-child {
  margin-bottom: 0;
}

/* Stats / Metrics Row */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.metric-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 2rem;
  transition: var(--transition-smooth);
}

.metric-card:hover {
  border-color: var(--border-active);
  transform: translateY(-4px);
  background: var(--bg-card);
}

.metric-num {
  font-size: 2.5rem;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.metric-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Competencies Section */
.competency-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.competency-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 2.5rem;
  transition: var(--transition-smooth);
}

.competency-card:hover {
  background: var(--bg-card);
  border-color: var(--border-active);
  transform: translateY(-4px);
}

.competency-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-dim);
  color: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.competency-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.competency-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Experience / Timeline Section */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 20px;
  width: 1px;
  background: var(--border-subtle);
}

.timeline-item {
  position: relative;
  padding-left: 60px;
  margin-bottom: 4.5rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: 15px;
  top: 8px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg-base);
  border: 2px solid var(--text-secondary);
  transition: var(--transition-smooth);
}

.timeline-item:hover .timeline-dot {
  border-color: var(--text-primary);
  background: var(--text-primary);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

.timeline-meta {
  margin-bottom: 0.75rem;
}

.timeline-role {
  font-size: 1.35rem;
  font-weight: 600;
  display: inline-block;
  margin-right: 0.5rem;
}

.timeline-company {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 500;
}

.timeline-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: block;
  margin-top: 0.25rem;
}

.timeline-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 2rem;
  transition: var(--transition-smooth);
}

.timeline-content:hover {
  background: var(--bg-card);
  border-color: var(--border-active);
}

.timeline-list {
  list-style: none;
}

.timeline-list li {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  position: relative;
  padding-left: 1.25rem;
}

.timeline-list li:last-child {
  margin-bottom: 0;
}

.timeline-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--text-muted);
}

/* Tools & Tech Stack */
.tech-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
}

.tech-group {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 2rem;
}

.tech-group h3 {
  font-size: 1.15rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.75rem;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tech-tag {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  transition: var(--transition-fast);
}

.tech-tag:hover {
  color: var(--text-primary);
  border-color: var(--border-active);
  background: var(--bg-card-hover);
}

/* Sample Work / Snapshots */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.portfolio-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  overflow: hidden;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.portfolio-card:hover {
  border-color: var(--border-active);
  transform: translateY(-6px);
}

.portfolio-img-container {
  height: 200px;
  background: var(--bg-card);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
}

.portfolio-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.portfolio-card:hover .portfolio-img-container img {
  transform: scale(1.05);
}

.portfolio-placeholder-icon {
  font-size: 2.5rem;
  color: var(--text-muted);
}

.portfolio-body {
  padding: 2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.portfolio-body h3 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.portfolio-body p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  flex-grow: 1;
}

/* Business Support / Offerings */
.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}

.support-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 2rem;
  transition: var(--transition-smooth);
}

.support-card:hover {
  background: var(--bg-card);
  border-color: var(--border-active);
}

.support-card h3 {
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

.support-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Why Work With Me */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
}

/* Footer row inside .why-grid — the relocated timezone tagline pill.
   Spans the full grid width (1 / -1) and centers itself, so it sits
   visually balanced under the three why-cards regardless of how many
   columns the auto-fit grid produces. */
.why-grid__footer {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.why-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 2.5rem;
  transition: var(--transition-smooth);
}

.why-card:hover {
  background: var(--bg-card);
  border-color: var(--border-active);
}

.why-card h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.why-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Contact Section & Form */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3rem;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-category-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  border-left: 2px solid var(--text-muted);
  padding-left: 0.75rem;
}

.contact-method {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.contact-method span {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.contact-method a, .contact-method p {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
}

.contact-method a {
  word-break: break-all;
}

.contact-method a:hover {
  color: var(--accent-soft);
}

/* Social Icons Row */
.social-icons {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  margin-bottom: 0.25rem;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.social-icon svg {
  width: 20px;
  height: 20px;
}

.social-icon:hover {
  transform: translateY(-3px);
  border-color: var(--border-active);
  background: var(--bg-card);
}

.social-icon--whatsapp:hover {
  color: #25D366;
  border-color: rgba(37, 211, 102, 0.35);
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.15);
}

.social-icon--linkedin:hover {
  color: #38BDF8;
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 8px 20px rgba(56, 189, 248, 0.15);
}

.social-icon--facebook:hover {
  color: #60A5FA;
  border-color: rgba(96, 165, 250, 0.35);
  box-shadow: 0 8px 20px rgba(96, 165, 250, 0.15);
}

.contact-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 3rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

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

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.form-control {
  width: 100%;
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--text-secondary);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.form-status {
  margin-top: 1rem;
  font-size: 0.9rem;
  display: none;
}

.form-status.success {
  color: #10B981;
}

.form-status.error {
  color: #EF4444;
}

/* Footer */
footer {
  padding: 4rem 0;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-base);
}

footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

/* Footer logo — same source as header, smaller size, vertically aligned.
   Reuses the .logo__img rule above for sizing defaults and the
   .logo--inverted class (added by JS) for dark-on-transparent handling. */
.footer__logo {
  height: 22px;
  width: auto;
  max-width: 110px;
  object-fit: contain;
  /* Override the .logo__img default `display: none` — we always want the
     footer image to attempt to render. The inline onerror handler removes
     the element entirely if the file is missing. */
  display: block;
}

/* Reveal On Scroll Animation Utilities */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Styles */
@media (max-width: 968px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }
  
  .tagline {
    justify-content: center;
  }
  
  .hero-content {
    align-items: center;
    display: flex;
    flex-direction: column;
  }
  
  .hero h1 {
    font-size: 2.75rem;
  }
  
  .hero-cta {
    justify-content: center;
  }
  
  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  .section-padding {
    padding: 5rem 0;
  }
  
  .nav-toggle {
    display: block;
  }
  
  nav {
    /* Mobile-only overrides. On desktop the nav stays in normal flow
       inside the header (handled by the desktop `nav ul` rules below)
       so we don't apply fixed positioning or high z-index here. */
    position: fixed;
    top: var(--header-height);
    left: 0;
    z-index: 9999; /* above everything in the page when open */
    width: 100%;
    /* Near-opaque background + heavy backdrop blur. Previously used
       var(--bg-surface) which is a flat solid color but had no visual
       separation from the page — making the hero text appear to bleed
       through. The combination of: (a) dark rgba with 92% opacity,
       (b) backdrop-filter blur of 24px so anything behind gets frosted,
       and (c) a top inset shadow gives the panel a clearly defined edge
       against the hero content below. */
    background: rgba(11, 15, 25, 0.92);
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-active);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04),
                0 12px 32px rgba(0, 0, 0, 0.4);
    padding: 2rem;
    /* Fill the rest of the viewport so no hero text bleeds in around the
       edges. flex column centers the menu items vertically. */
    height: calc(100vh - var(--header-height));
    height: calc(100dvh - var(--header-height)); /* dynamic vh: ignores mobile URL bar */
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transform: translateY(-150%);
    transition: var(--transition-smooth);
  }
  
  nav.active {
    transform: translateY(0);
  }

  /* Lock body scroll while the mobile menu is open. Prevents the page
     from being scrollable behind the menu — on iOS Safari especially
     this otherwise lets content slide around behind the overlay. */
  body.nav-open {
    overflow: hidden;
    position: fixed;
    inset: 0;
  }
  
  nav ul {
    flex-direction: column;
    gap: 0.5rem; /* tighter gap now that each link has its own tap area */
    align-items: stretch;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }

  /* Larger tap targets on mobile — 44px is the iOS/Android minimum for
     comfortable touch interaction. The underline animation from the
     desktop styles still works on these. */
  nav ul a {
    display: block;
    padding: 0.85rem 1rem;
    font-size: 1.05rem;
    text-align: center;
    border-radius: 10px;
    transition: var(--transition-fast);
  }

  nav ul a:hover,
  nav ul a:active,
  nav ul a.active {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
  }
  
  .timeline::before {
    left: 10px;
  }
  
  .timeline-dot {
    left: 5px;
  }
  
  .timeline-item {
    padding-left: 35px;
  }
  
  footer .container {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
}

/* Small phones (e.g. iPhone SE, Galaxy A series) — 376–480px wide.
   The 768px and 968px breakpoints above leave .hero h1 at 44px and
   .section-padding at 80px which still feels oversized on these devices.
   This pass shrinks hero typography, tightens section spacing, reduces
   the headshot, and pads the container more efficiently. */
@media (max-width: 480px) {
  .container {
    padding: 0 1.25rem;
  }

  .section-padding {
    padding: 3.5rem 0;
  }

  .hero {
    padding-top: calc(var(--header-height) + 0.75rem);
    padding-bottom: 1.5rem;
  }

  .hero-grid {
    gap: 1.5rem;
  }

  .hero h1 {
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: 1rem;
  }

  .hero p {
    font-size: 1rem;
    margin-bottom: 1.75rem;
  }

  .section-header {
    margin-bottom: 2.5rem;
  }

  .section-header h2 {
    font-size: 1.6rem;
  }

  .profile-circle {
    width: 200px;
    height: 200px;
  }

  .metric-num {
    font-size: 2rem;
  }

  .btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
  }

  .contact-card {
    padding: 2rem 1.25rem;
  }

  .competency-card,
  .support-card,
  .why-card {
    padding: 1.75rem;
  }

  .footer-meta {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .footer__logo {
    height: 20px;
    max-width: 90px;
  }
}

/* Very small phones (e.g. iPhone 5/SE 1st gen, Galaxy Fold cover) — < 380px */
@media (max-width: 380px) {
  .container {
    padding: 0 1rem;
  }

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

  .section-header h2 {
    font-size: 1.4rem;
  }

  .profile-circle {
    width: 170px;
    height: 170px;
  }

  .metrics-grid {
    gap: 1rem;
  }

  .metric-card {
    padding: 1.25rem;
  }
}
