/* Accent color: change these to re-theme the whole site */
:root {
  --accent: #A78BFA;
  --accent-rgb: 167, 139, 250;
  --accent-light: #C4B5FD;
  --accent-dark: #8B5CF6;
  --accent-soft: #DDD6FE;
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Montserrat", sans-serif;
  background: #0f0f0f url('assets/patternBG.png') repeat;
  color: #fff;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  scrollbar-color: rgba(var(--accent-rgb), 0.35) #0f0f0f;
}

img {
  max-width: 100%;
}

::selection {
  background: rgba(var(--accent-rgb), 0.35);
  color: #fff;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0f0f0f; }
::-webkit-scrollbar-thumb {
  background: rgba(var(--accent-rgb), 0.3);
  border: 2px solid #0f0f0f;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(var(--accent-rgb), 0.5); }

/* Keyboard focus — one consistent ring for every interactive element */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 0.4rem;
}

/* Skip link — hidden until a keyboard user tabs to it */
.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10000;
  padding: 0.6rem 1rem;
  border-radius: 0.6rem;
  background: var(--accent);
  color: #160e2b;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

body.modal-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .fade-in,
  .work-page-fade,
  .skill-box,
  .resume-card,
  .contact-card,
  .contact-social {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Home page opening card */
.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 2.5rem);
  overflow-y: auto;
  background: rgba(8, 7, 14, 0.62);
  -webkit-backdrop-filter: blur(14px) saturate(125%);
  backdrop-filter: blur(14px) saturate(125%);
  transition: opacity 420ms ease, visibility 420ms ease, backdrop-filter 420ms ease;
}
.intro-overlay[hidden] { display: none; }
.intro-overlay.is-closing { opacity: 0; visibility: hidden; pointer-events: none; -webkit-backdrop-filter: blur(0) saturate(100%); backdrop-filter: blur(0) saturate(100%); }
.intro-overlay.is-closing .intro-card { animation: intro-slideoutfade 420ms cubic-bezier(.4,0,1,1) both; }
body.intro-open { overflow: hidden; }
.intro-reopen-trigger { cursor: pointer; }
.intro-reopen-trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }

.intro-card {
  position: relative;
  isolation: isolate;
  width: min(100%, 650px);
  min-height: 440px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 3rem;
  padding: clamp(1.5rem, 5vw, 2.75rem);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.6rem;
  background:
    radial-gradient(ellipse 60% 50% at 92% 8%, rgba(var(--accent-rgb), .2), transparent 70%),
    radial-gradient(ellipse 50% 40% at 0% 100%, rgba(var(--accent-rgb), .07), transparent 70%),
    linear-gradient(150deg, rgba(30,28,48,.94), rgba(11,11,19,.96));
  box-shadow: 0 40px 120px rgba(0,0,0,.6), 0 0 0 1px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.07);
  -webkit-backdrop-filter: blur(24px) saturate(135%);
  backdrop-filter: blur(24px) saturate(135%);
  animation: intro-card-arrive 650ms cubic-bezier(.2,.8,.2,1) both;
}
/* Faint dot grid that fades out away from the top-right glow */
.intro-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(255,255,255,.09) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 100% 0%, #000, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 100% 0%, #000, transparent 75%);
  pointer-events: none;
}
/* Accent highlight along the top edge */
.intro-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), .6), transparent);
  pointer-events: none;
}
.intro-card-topline, .intro-card-bottomline { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.intro-topline-end { display: flex; align-items: center; gap: 1rem; }
.intro-mark { display: block; width: auto; height: 46px; object-fit: contain; filter: drop-shadow(0 4px 14px rgba(var(--accent-rgb), .25)); }
.intro-copy h2 span { color: var(--accent); }
.intro-edition { display: flex; align-items: center; gap: .55rem; color: rgba(236,234,250,.6); font-size: .62rem; font-weight: 700; letter-spacing: .18em; }
.intro-edition i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px rgba(var(--accent-rgb), .8); }
.intro-copy { position: relative; z-index: 1; }
.intro-eyebrow { display: flex; align-items: center; gap: .65rem; margin-bottom: 1.25rem; color: #a9abbe; font-size: .64rem; font-weight: 700; letter-spacing: .18em; }
.intro-eyebrow > span { width: 22px; height: 1px; background: var(--accent); }
.intro-copy h2 { margin: 0; color: #f4f4fa; font-size: clamp(2.6rem,6.6vw,4.1rem); font-weight: 600; letter-spacing: -.045em; line-height: 1.02; text-wrap: balance; }
.intro-copy h2 span {
  white-space: nowrap;
  background: linear-gradient(100deg, var(--accent-light), var(--accent) 55%, var(--accent-dark));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 24px rgba(var(--accent-rgb), .25));
}
.intro-copy > p:last-child { max-width: 420px; margin-top: 1.4rem; color: #b4b6c8; font-size: .98rem; line-height: 1.7; text-wrap: pretty; }
.intro-signature { display: flex; flex-direction: column; gap: .35rem; }
.intro-signature strong { color: rgba(236,234,250,.82); font-size: .66rem; font-weight: 700; letter-spacing: .16em; }
.intro-signature span { color: #8d8fa3; font-size: .78rem; font-weight: 500; }
.intro-enter { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: .9rem; min-height: 50px; padding: .45rem .5rem .45rem 1.4rem; border: 1px solid rgba(var(--accent-rgb), .75); border-radius: 999px; color: #160e2b; background: linear-gradient(180deg, var(--accent-light), var(--accent)); box-shadow: 0 10px 30px rgba(var(--accent-rgb), .22), inset 0 1px 0 rgba(255,255,255,.35); font: inherit; font-size: .83rem; font-weight: 700; cursor: pointer; transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease; }
.intro-enter svg { box-sizing: content-box; padding: 8px; border-radius: 50%; background: rgba(22,14,43,.12); transition: transform 220ms cubic-bezier(.2,.8,.2,1); }
.intro-enter:hover { transform: translateY(-2px); filter: brightness(1.05); box-shadow: 0 14px 38px rgba(var(--accent-rgb), .32), inset 0 1px 0 rgba(255,255,255,.35); }
.intro-enter:hover svg { transform: translateX(3px); }
.intro-enter:active { transform: translateY(0); }
/* Box-shadow rings follow the round shape of the buttons, unlike outlines */
.intro-enter:focus-visible, .intro-close:focus-visible { outline: none; box-shadow: 0 0 0 2px #13121d, 0 0 0 4px var(--accent-light); }
.intro-enter svg, .intro-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.intro-close { flex-shrink: 0; display: grid; width: 36px; height: 36px; place-items: center; padding: 0; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; color: #c9cad8; background: rgba(255,255,255,.04); cursor: pointer; transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 220ms ease; }
.intro-close svg { width: 16px; height: 16px; }
.intro-close:hover { color: #fff; background: rgba(var(--accent-rgb), .14); border-color: rgba(var(--accent-rgb), .45); transform: rotate(90deg); }
.intro-card-bottomline { align-items: center; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.09); }
.intro-orbit { position: absolute; z-index: -1; width: 230px; aspect-ratio: 1; border: 1px solid rgba(var(--accent-rgb), .14); border-radius: 50%; pointer-events: none; }
.intro-orbit-one { top: 13%; right: -17%; animation: intro-orbit-spin 28s linear infinite; }
.intro-orbit-two { top: 3%; right: -27%; width: 340px; border-color: rgba(255,255,255,.06); }
/* A small accent dot travelling along the inner orbit */
.intro-orbit-one::after { content: ""; position: absolute; top: 50%; left: -3px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
/* Content rises in after the card lands; reopening restarts it since the overlay toggles display */
.intro-card-topline, .intro-eyebrow, .intro-copy h2, .intro-copy > p:last-child, .intro-card-bottomline { animation: intro-rise 700ms cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--intro-delay, 0ms); }
.intro-card-topline { --intro-delay: 120ms; }
.intro-eyebrow { --intro-delay: 200ms; }
.intro-copy h2 { --intro-delay: 270ms; }
.intro-copy > p:last-child { --intro-delay: 360ms; }
.intro-card-bottomline { --intro-delay: 440ms; }
@keyframes intro-card-arrive { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes intro-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes intro-orbit-spin { to { transform: rotate(360deg); } }
@keyframes intro-slideoutfade {
  from { opacity: 1; filter: blur(0); transform: translate3d(0,0,0) scale(1); }
  to { opacity: 0; filter: blur(5px); transform: translate3d(30px,-14px,0) scale(.97); }
}
@media (max-width: 540px) {
  .intro-card { min-height: 410px; gap: 2.25rem; padding: 1.5rem; border-radius: 1.3rem; }
  .intro-edition { display: none; }
  .intro-copy h2 { font-size: clamp(2.4rem,11.5vw,3.4rem); }
  .intro-copy > p:last-child { font-size: .9rem; }
  .intro-card-bottomline { align-items: stretch; flex-direction: column; gap: 1.25rem; }
  .intro-enter { width: 100%; justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) {
  .intro-card, .intro-orbit-one, .intro-card-topline, .intro-eyebrow, .intro-copy h2, .intro-copy > p:last-child, .intro-card-bottomline { animation: none; }
  .intro-overlay, .intro-enter, .intro-enter svg, .intro-close, .nav-links { transition-duration: .01ms; }
  .intro-close:hover { transform: none; }
  .intro-overlay.is-closing .intro-card { animation: none; }
}

/* Fade Animation Base */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in.show {
  opacity: 1;
  transform: translateY(0);
}

/* Navbar wrapper — the top bar itself is fully transparent on every
   viewport; the only visible nav UI is the floating dock (.nav-links)
   below. Kept free of transform/filter/backdrop-filter so it doesn't
   trap the dock's position: fixed inside its box. */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 56px;
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* left | center | right */
  align-items: center;
  padding: 0 1.5rem;
  overflow: visible;
  background: transparent;
  border-bottom: none;
  box-shadow: none;
  z-index: 1000;
}

/* Logo bar is replaced by the dock on every viewport; the hero photo is
   the intro-reopen trigger instead. */
.navbar .logo {
  display: none;
}

/* .navbar also carries the .fade-in utility class, whose translateY transform
   would create a new containing block and trap the dock's fixed
   positioning inside the (56px-tall) navbar box. Keep the navbar's reveal
   opacity-only so it stays a plain ancestor for position: fixed children. */
.navbar.fade-in,
.navbar.fade-in.show {
  transform: none;
}

/* Floating pill dock — the only nav UI, on every viewport size */
.nav-links {
  grid-column: unset;
  justify-self: unset;

  position: fixed;
  top: auto;
  bottom: 1rem;
  left: 50%;
  right: auto;
  transform: translateX(-50%);

  height: auto;
  width: auto;
  max-width: calc(100% - 2rem);

  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;

  /* 40px links + 0.4rem padding = same height as .profile-badge */
  padding: 0.4rem;
  border-radius: 999px;
  background: rgba(20, 20, 20, 0.55);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);

  z-index: 3000;
  transition: opacity 180ms ease, transform 260ms cubic-bezier(.2,.8,.2,1), visibility 180ms ease;
}

body.intro-open .nav-links {
  display: none;
}

.nav-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: #ccc;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

/* Active page sits centred in a soft accent disc rather than lifting,
   so the dock's row of icons stays level */


.nav-links a:hover:not(.active) {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}

.nav-links a.active::after {
  display: none;
}

.nav-icon {
  display: flex;
  width: 18px;
  height: 18px;
}

.nav-icon svg {
  width: 100%;
  height: 100%;
}

/* Labels stay in the DOM for accessibility but are visually hidden in the dock */
.nav-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Active page gets a small accent dot under its icon */
.nav-links a {
  position: relative;
  border-radius: 50%;
}

.nav-links a.active::before {
  content: "";
  position: absolute;
  bottom: 3px;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  transform: translateX(-50%);
}

/* Tooltip label (text set from .nav-text by main.js) for pointer users */
.nav-links a[data-label]::after {
  content: attr(data-label);
  position: absolute;
  bottom: calc(100% + 0.7rem);
  left: 50%;
  display: block;
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  border-radius: 0.5rem;
  background: rgba(16, 15, 26, 0.95);
  color: #e9e7f7;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover::after,
  .nav-links a:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}


/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}

/* Outer image container */
.hero-image {
  flex: 1 1 500px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Glass container — full-bleed photo card, content overlaid on top */
.hero-photo {
  position: relative;
  /* Corner radii are derived from these so the card, photo and glass
     panel stay concentric (inner radius = outer radius - inset) */
  --card-radius: 1.4rem;
  --card-inset: 10px;
  --frame-radius: calc(var(--card-radius) - var(--card-inset));
  border-radius: var(--card-radius);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.15);
  /* Outer drop shadow + a thicker inner stroke just inside the edge,
     for a refined "glass card" finish */
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.6),
    inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  overflow: hidden;
  max-width: 420px;
  width: 100%;
  /* Matches the photo (1200x1800) so it shows uncropped, with room
     for the face above the details panel */
  aspect-ratio: 2 / 3;
}

/* Photo sits inset from the card edge, so the glass card background
   shows through as a clearly visible frame/mat around it */
.hero-image-frame {
  position: absolute;
  inset: var(--card-inset);
  border-radius: var(--frame-radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  z-index: 0;
}

.hero-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* "Open to new opportunities" badge — frosted glass chip floating over
   the top-left of the photo, gently bobbing */
.hero-availability {
  position: absolute;
  top: calc(var(--card-inset) + 12px);
  left: calc(var(--card-inset) + 12px);
  right: calc(var(--card-inset) + 12px);
  width: fit-content;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.85rem 0.5rem 0.5rem;
  border-radius: 0.9rem;
  text-align: left;
  background: rgba(14, 12, 20, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(var(--accent-rgb), 0.12);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  backdrop-filter: blur(14px) saturate(120%);
  animation: hero-badge-float 4s ease-in-out infinite;
}

.hero-availability-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 0.6rem;
  background: rgba(var(--accent-rgb), 0.16);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  color: var(--accent-light);
}

.hero-availability-icon svg {
  width: 17px;
  height: 17px;
}

/* Live "available" indicator on the icon's corner */
.hero-availability-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #4ade80;
  border: 2px solid #0e0c14;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
  animation: hero-badge-pulse 2s ease-out infinite;
}

.hero-availability-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.hero-availability-text strong {
  font-size: 0.74rem;
  font-weight: 600;
  color: #fff;
}

.hero-availability-text small {
  font-size: 0.62rem;
  color: #c9c3d9;
}

@keyframes hero-badge-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes hero-badge-pulse {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-availability,
  .hero-availability-dot {
    animation: none;
  }
}

/* Details panel — pinned to the bottom of the photo, matching the
   frame's inset and corner radius exactly so the glass sits flush. */
.hero-content {
  position: absolute;
  /* +1px so it sits inside the frame's 1px border, not on top of it */
  inset: auto calc(var(--card-inset) + 1px) calc(var(--card-inset) + 1px);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 0.6rem;
  /* Tall top padding = the zone where the glass fades out, so the fade
     happens above the text rather than behind it */
  padding: 3.5rem 1.5rem 1.4rem;
  border-radius: 0 0 calc(var(--frame-radius) - 1px) calc(var(--frame-radius) - 1px);
  overflow: hidden;
  isolation: isolate;
}

/* Soft frosted glass: blur + a light dark tint, then masked so both
   the blur and the tint fade smoothly into the clear photo above.
   The mask is on the backdrop-filter layer itself, so there's no hard
   seam where the blur starts. */
.hero-content::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit; /* Safari doesn't always clip backdrop-filter to the parent's radius */
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(to top, rgba(14, 12, 20, 0.75) 0%, rgba(14, 12, 20, 0.6) 70%, rgba(14, 12, 20, 0) 100%);
  /* brightness() tames the light shirt/tie behind the name */
  -webkit-backdrop-filter: blur(18px) saturate(110%) brightness(0.7);
  backdrop-filter: blur(18px) saturate(110%) brightness(0.7);
  /* Solid up past the name; only the top padding zone fades out */
  -webkit-mask-image: linear-gradient(to top, #000 0%, #000 75%, transparent 100%);
  mask-image: linear-gradient(to top, #000 0%, #000 75%, transparent 100%);
}

/* Faint accent glow at the base so it reads as tinted glass, not a shadow */
.hero-content::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit; /* Safari doesn't always clip backdrop-filter to the parent's radius */
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(120% 60% at 50% 100%, rgba(var(--accent-rgb), 0.10), transparent 70%);
}

.hero-content h2 {
  font-size: 0.8rem;
  font-weight: 400;
  color: #ccc;
  /* Sits over the photo where the scrim is weakest (closest to fully
     transparent); a text-shadow keeps it legible regardless of how
     bright that patch of the underlying photo happens to be */
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}

.hero-name-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hero-content h1 {
  /* Scales with the card width so a long full name never overflows the
     narrow profile card, on any viewport. */
  font-size: clamp(1rem, 4.6vw, 1.4rem);
  font-weight: 700;
  color: var(--accent-light);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8), 0 2px 12px rgba(0, 0, 0, 0.6);
}

/* Hidden until the name finishes typing (see the scroll-typing effect
   in main.js), then pops in as the payoff of the reveal — hidden again
   once the name starts erasing on scroll-away. */
.verified-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--accent);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.verified-badge.show {
  opacity: 1;
  transform: scale(1);
}

.verified-badge svg {
  width: 100%;
  height: 100%;
}

/* Role + skill pills share one wrapper so every row (including the
   wrap between the two groups) is spaced by the same gap */
.hero-tags {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.hero-content .skill-tags {
  justify-content: flex-start;
  gap: 0.4rem;
  margin: 0;
}

/* Sized down to match the compact card, rather than the site's
   full-size default tags/buttons. Role and skill pills share identical
   metrics so they line up row to row; .skill-tags .skill-tag also
   outranks the skills-section `.skill-tags span` rule. */
.hero-content .role-tag,
.hero-content .skill-tags .skill-tag {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.5;
}

.hero-content .btn-group {
  width: 100%;
  align-items: flex-start;
  gap: 0.6rem;
  margin-top: 0.3rem;
}

.hero-content .btn {
  padding: 0.5rem 1.1rem;
  font-size: 0.8rem;
  min-width: 0;
}

/* Role tags — the "Software Engineer / Web & Mobile (Flutter)" line,
   as compact pills instead of a plain text line. Kept visually quieter
   (no cyan border/glow) than .skill-tags below so the two rows don't
   compete for attention. */
.role-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.role-tag {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ddd;
}

/* Buttons */
.btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 2rem;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  min-width: 140px;
  text-align: center;
}

/* Filled button */
.btn-primary {
  background: var(--accent);
  color: #0f0f0f;
  box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.4);
}

.btn-primary:hover {
  background: var(--accent-dark);
  color: #fff;
  transform: translateY(-2px);
}

/* Outlined button */
.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.3);
}

.btn-outline:hover {
  background: var(--accent);
  color: #0f0f0f;
  transform: translateY(-2px);
}

/* Mobile Button Fix */
@media (max-width: 480px) {
  .btn-group {
    flex-direction: column;
    align-items: center;
  }

  .btn-group .btn {
    width: 100%;
    max-width: 260px;
  }
}

/* Mobile & Extra Small (<= 480px) — rebalance the card: less dead
   space around it, a taller card so the photo isn't squeezed down to a
   sliver by the text panel, and tighter panel spacing to help that. */
@media (max-width: 480px) {
  .hero {
    min-height: auto;
    padding: 3rem 1.5rem;
  }

  .hero-photo {
    aspect-ratio: auto;
    height: min(78vh, 620px);
  }

  .hero-content {
    gap: 0.45rem;
    padding: 2.75rem 1.25rem 1.1rem;
  }

  .hero-content h2 { font-size: 0.75rem; }

  .hero-tags {
    margin: 0.1rem 0;
  }

  .hero-content .btn-group {
    margin-top: 0.25rem;
  }
}


/* Mini profile badge — fixed top-left pill that takes over from the
   hero card once it scrolls out of view (toggled by main.js) */
.profile-badge {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 2500;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  max-width: calc(100% - 2rem);
  padding: 0.4rem 1rem 0.4rem 0.4rem;
  border-radius: 999px;
  text-decoration: none;
  color: #fff;
  background: rgba(20, 20, 20, 0.55);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px) scale(0.96);
  transition: opacity 220ms ease, transform 300ms cubic-bezier(.2,.8,.2,1), visibility 220ms ease, border-color 0.25s ease;
}

.profile-badge.show {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.profile-badge:hover,
.profile-badge:focus-visible {
  border-color: rgba(var(--accent-rgb), 0.45);
}

body.intro-open .profile-badge {
  display: none;
}

.profile-badge-avatar {
  position: relative;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
}

.profile-badge-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 12%;
  border: 2px solid rgba(var(--accent-rgb), 0.6);
  display: block;
}

.profile-badge-status {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #4ade80;
  border: 2px solid #141414;
  animation: hero-badge-pulse 2s ease-out infinite;
}

.profile-badge-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
  text-align: left;
}

.profile-badge-text strong {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-badge-text small {
  font-size: 0.66rem;
  color: #c9c3d9;
  white-space: nowrap;
}

.profile-badge-open {
  color: #4ade80;
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .profile-badge {
    transition: opacity 220ms ease, visibility 220ms ease;
    transform: none;
  }

  .profile-badge-status {
    animation: none;
  }
}


/* Typing effect base — clips/reveals text for the scroll-triggered
   typewriter effect in main.js */
#hero-title {
  white-space: nowrap;
  overflow: hidden;
}


/* Skills Section */
.section-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin-bottom: 3rem;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.section-eyebrow span {
  width: 24px;
  height: 1px;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.55);
}

.skills {
  max-width: 1180px;
  margin: 4rem auto 6rem;
  padding: 2rem 2rem;
  text-align: center;
}

.skills h2 {
  position: relative;
  display: inline-block;
  margin-bottom: 3.5rem;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.skills h2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.75rem;
  width: 3rem;
  height: 2px;
  background: var(--accent);
  transform: translateX(-50%);
  box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.8);
}

/* Responsive Grid — a 2x2 grid keeps the four skill cards wide and short */
.skills-container {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  max-width: 960px;
  margin: 0 auto;
}

/* Skill Card */
.skill-box {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 1.1rem;
  align-content: start;
  padding: 1.35rem;
  text-align: left;
  background: linear-gradient(145deg, rgba(32, 31, 48, 0.9), rgba(13, 13, 21, 0.88));
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 1.35rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.35);

  /* Animation base state */
  opacity: 0;
  transform: translateY(30px) scale(0.9);
  transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.skill-box::before {
  content: "";
  position: absolute;
  inset: 0;
  top: -5rem;
  right: -4rem;
  width: 15rem;
  height: 15rem;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.12);
  filter: blur(35px);
  pointer-events: none;
}

.skill-box > * {
  position: relative;
  z-index: 1;
}

.skill-box.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.skill-box:hover {
  border-color: rgba(var(--accent-rgb), 0.5);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.55), 0 0 28px rgba(var(--accent-rgb), 0.12);
}

.skill-box-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.skill-box-header span:last-child {
  padding: 0.35rem 0.6rem;
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
}

.skill-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  grid-column: 1;
  grid-row: 2 / span 3;
  width: 3.75rem;
  height: 3.75rem;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 1rem;
  background: rgba(var(--accent-rgb), 0.08);
}

.skill-box .skill-icon {
  width: 2.2rem;
  height: 2.2rem;
  object-fit: contain;
}

.skill-box h3,
.skill-box p,
.skill-box .skill-tags {
  grid-column: 2;
}

.skill-box h3 {
  font-size: 1.15rem;
  margin-bottom: 0.45rem;
  color: #fff;
}

.skill-box p {
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.65;
  color: #a9abbe;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.15rem;
}

.skill-tags span {
  padding: 0.3rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #d2d3df;
  font-size: 0.65rem;
  font-weight: 600;
}

/* Tablet */
@media (max-width: 900px) {
  .skills-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .skills {
    padding: 1.5rem;
  }
}

/* Mobile & Small screens */
@media (max-width: 480px) {
  .skills {
    padding: 1rem;
  }
  .skill-box h3 {
    font-size: 1rem;
  }
  .skill-box p {
    font-size: 0.8rem;
  }

  .skills-container {
    grid-template-columns: 1fr;
  }
}

/* Inline SVG icons pick up the accent colour */
.skill-icon-wrap svg,
.work-page-service-icon-wrap svg {
  color: var(--accent);
}

/* Home Expertise Section — builds on the base service card styles below, restyled to match the skills cards */
.work-page-services.home-expertise {
  max-width: 1180px;
  margin: 5rem auto 6rem;
  padding: 2rem;
  background: none;
}

.home-expertise .section-eyebrow {
  margin-bottom: 0.7rem;
}

.home-expertise .section-title {
  position: relative;
  display: inline-block;
  margin-bottom: 3.5rem;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.home-expertise .section-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.75rem;
  width: 3rem;
  height: 2px;
  background: var(--accent);
  transform: translateX(-50%);
  box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.8);
}

.home-expertise .work-page-services-container {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  max-width: 960px;
}

.home-expertise .work-page-service-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 1.1rem;
  align-content: start;
  min-height: 0;
  padding: 1.35rem;
  border-radius: 1.35rem;
}

.home-expertise .work-page-service-card:hover {
  transform: none;
}

.home-expertise .work-page-service-card-header {
  grid-column: 1 / -1;
  margin-bottom: 1.5rem;
}

.home-expertise .work-page-service-number {
  font-size: 0.68rem;
}

.home-expertise .work-page-service-label {
  padding: 0.35rem 0.6rem;
  font-size: 0.6rem;
}

.home-expertise .work-page-service-icon-wrap {
  grid-column: 1;
  width: 3.75rem;
  height: 3.75rem;
  margin-bottom: 0;
  border-radius: 1rem;
  box-shadow: none;
}

.home-expertise .work-page-service-icon {
  width: 2.2rem;
  height: 2.2rem;
}

.home-expertise .work-page-service-content {
  grid-column: 2;
}

.home-expertise .work-page-service-card h3 {
  margin-bottom: 0.45rem;
  font-size: 1.15rem;
}

.home-expertise .work-page-service-card p {
  line-height: 1.65;
}

.home-expertise .work-page-service-tags {
  gap: 0.4rem;
  margin-top: 1.15rem;
}

.home-expertise .work-page-service-tags span {
  padding: 0.3rem 0.55rem;
  font-size: 0.65rem;
}

.home-expertise .work-page-service-link {
  grid-column: 1 / -1;
  margin-top: 1.35rem;
}

@media (max-width: 768px) {
  .work-page-services.home-expertise {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .work-page-services.home-expertise {
    padding: 1rem;
  }

  .home-expertise .work-page-services-container {
    grid-template-columns: 1fr;
  }

  .home-expertise .work-page-service-card {
    min-height: 0;
  }

  .home-expertise .work-page-service-card h3 {
    font-size: 1rem;
  }

  .home-expertise .work-page-service-card p {
    font-size: 0.8rem;
  }
}

/* Featured works Section */

/* Section container */
.featured-works {
  max-width: 1180px;
  margin: 5rem auto 6rem;
  padding: 2rem;
  text-align: center;
}

/* Title */
.featured-works .section-title {
  position: relative;
  display: inline-block;
  margin-bottom: 3.5rem;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.featured-works .section-eyebrow {
  margin-bottom: 0.7rem;
}

.featured-works .section-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.75rem;
  width: 3rem;
  height: 2px;
  background: var(--accent);
  transform: translateX(-50%);
  box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.8);
}

/* Toggle buttons */
.works-toggle {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

/* Pill that glides beneath the active button; positioned/sized in JS
   from the active button's offsetLeft/Top/Width/Height, so it tracks
   it smoothly instead of each button snapping its own background. */
.toggle-indicator {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--accent);
  border-radius: 2rem;
  z-index: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1),
              width 0.35s ease, height 0.35s ease;
}

.toggle-btn {
  position: relative;
  z-index: 1;
  background: transparent;
  border: 1px solid rgba(var(--accent-rgb), 0.45);
  color: var(--accent);
  padding: 0.6rem 1rem;
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.3s ease, background 0.3s ease;
}

.toggle-btn:hover {
  background: rgba(var(--accent-rgb), 0.15);
}

.toggle-btn.active {
  color: #000;
}

/* Works container */
.works-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1.5rem;
  align-items: stretch;
}

/* Work box */
.work-box {
  position: relative;
  min-width: 0;
  min-height: 465px;
  background: linear-gradient(155deg, #1a1a29 0%, #13131e 72%, #0f0f18 100%);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 1.2rem;
  padding: 1rem;
  text-align: left;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22), inset 0 1px rgba(255, 255, 255, 0.035);
  transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;

  /* Flex layout ensures buttons stick to bottom */
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.work-box::before {
  content: none;
}

/* While the category filter is switching, fade the current boxes out
   before the JS swaps the .hidden classes, then fade the new set back
   in — turns the instant show/hide into a smooth cross-fade. */
.works-container.filtering .work-box {
  opacity: 0;
  transform: scale(0.96) translateY(8px);
  pointer-events: none;
}

/* Keep project previews framed consistently, regardless of source image shape. */
.work-box img {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: none;
  height: 190px;
  flex: 0 0 190px;
  margin: 0 0 1.15rem;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 0.85rem;
  background: #0c0c14;
  display: block;
  transition: transform 0.4s ease, border-color 0.3s ease;
}

/* Keep the single mobile app card compact when its filter is selected. */
.work-box.mobile-dev {
  width: min(100%, 420px);
  min-height: 0;
  justify-self: center;
}

.work-box.mobile-dev > img {
  aspect-ratio: 4 / 3;
  max-height: 230px;
  object-position: center;
  object-fit: contain;
  background: rgba(8, 8, 14, 0.85);
}

/* Category eyebrow — "Web Development", "Mobile Development" */
.work-category {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}

.work-category::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.5);
}

.work-box h3 {
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.025em;
  color: #f4f4fa;
  margin-bottom: 0.45rem;
  overflow-wrap: anywhere;
}

.work-box p {
  font-size: 0.84rem;
  color: #a9abbe;
  margin-bottom: 0.9rem;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

/* Tech/medium tags */
.work-tags {
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.work-tag {
  padding: 0.28rem 0.6rem;
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #bcbecf;
  font-size: 0.68rem;
  font-weight: 600;
}

@media (hover: hover) and (pointer: fine) {
  .work-box:hover {
    transform: translateY(-5px);
    border-color: rgba(var(--accent-rgb), 0.38);
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.38), 0 0 24px rgba(var(--accent-rgb), 0.07);
  }

  .work-box:hover img { transform: scale(1.015); border-color: rgba(var(--accent-rgb), 0.28); }
}

/* Work actions (button container) — single full-width CTA now, kept
   pinned to the bottom of the card with a subtle divider above it */
.work-actions {
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.work-box .preview-btn {
  min-height: 42px;
  padding: 0.65rem 0.9rem;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 0.65rem;
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--accent-soft);
  font-size: 0.8rem;
  box-shadow: none;
}

.work-box .preview-btn:hover {
  border-color: rgba(var(--accent-rgb), 0.65);
  background: rgba(var(--accent-rgb), 0.18);
  box-shadow: 0 8px 20px rgba(var(--accent-rgb), 0.1);
}


/* Buttons */
/* "View Details" (card face) / "Live Demo" (inside the modal) — same
   full-width gradient treatment, matching the reference card's CTA */
.preview-btn,
.visit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.75rem 1.2rem;
  border-radius: 0.8rem;
  border: none;
  background: linear-gradient(135deg, var(--accent-light), var(--accent-dark));
  color: #160e2b;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 16px rgba(var(--accent-rgb), 0.25);
}

.preview-btn:hover,
.visit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(var(--accent-rgb), 0.4);
}

.preview-btn svg,
.visit-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Live Demo sits below the gallery inside the modal */
.modal-content .visit-btn {
  margin-top: 1rem;
}



/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 5000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(8, 8, 14, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
}

.modal-content {
  position: relative;
  outline: none;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  grid-template-rows: 1fr auto;
  column-gap: 2rem;
  background: linear-gradient(145deg, rgba(32, 31, 48, 0.98), rgba(11, 11, 18, 0.98));
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 1.5rem;
  padding: 1.25rem;
  max-width: 1080px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  overflow-x: hidden;
  animation: popup 0.4s ease;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.65), 0 0 40px rgba(var(--accent-rgb), 0.08);
  isolation: isolate;
}

.project-gallery {
  width: 100%;
  gap: 0.5rem;
}

.project-gallery-stage {
  position: relative;
  width: 100%;
  min-height: 180px;
  height: min(29vh, 320px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  background: rgba(8, 8, 14, 0.65);
}

.project-gallery .project-gallery-main-image {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.project-gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: #fff;
  background: rgba(8, 8, 14, 0.72);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.project-gallery-arrow:hover,
.project-gallery-thumbnail:hover,
.project-gallery-thumbnail.active {
  border-color: var(--accent);
}

.project-gallery-previous { left: 0.75rem; }
.project-gallery-next { right: 0.75rem; }

.project-gallery-count {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 1rem;
  color: #fff;
  background: rgba(8, 8, 14, 0.72);
  font-size: 0.75rem;
}

.project-gallery-thumbnails {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.15rem 0 0.45rem;
}

.project-gallery-thumbnail {
  flex: 0 0 5.5rem;
  height: 3.75rem;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.45rem;
  background: #12121c;
  cursor: pointer;
}

.project-gallery-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-study-frame {
  display: block;
  width: 100%;
  height: 0;
  min-height: 0;
  flex: 1 1 auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.75rem;
  background: #12121c;
}

.modal-content::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.13), transparent 42%);
  pointer-events: none;
  z-index: -1;
}

.modal-content .gallery {
  display: flex;
  flex-direction: column;
  align-self: start;
  gap: 0.75rem;
  min-width: 0;
}

.modal-content .gallery img {
  width: 100%;
  max-height: 28rem;
  object-fit: contain;
  background: rgba(8, 8, 14, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.modal-content .gallery img + img {
  max-height: 11rem;
}

/* Web project previews share one gallery and detail layout. */
.web-project-modal {
  grid-template-rows: auto;
  height: auto;
}

.web-project-modal > .gallery {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  width: 100%;
}

.web-project-modal .project-modal-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.project-modal-actions .preview-btn,
.project-modal-actions .visit-btn {
  min-width: 0;
  margin: 0;
  padding-inline: 0.7rem;
  font-size: 0.82rem;
}

/* Full project detail — title, summary, tech-used tags, key features */
.modal-details {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  min-width: 0;
  padding: 1rem 0.75rem 0.5rem 0;
  text-align: left;
}

@media (max-width: 760px) {
  .featured-works {
    margin: 3.5rem auto 4rem;
    padding: 1.5rem clamp(1rem, 4vw, 2rem);
  }

  .works-container { gap: 1rem; }
}

@media (max-width: 600px) {
  .featured-works {
    margin: 2.5rem auto 3.5rem;
    padding: 1rem;
    width: 100%;
    min-width: 0;
  }

  .featured-works .section-title {
    margin-bottom: 2.5rem;
    font-size: clamp(1.7rem, 8vw, 2.25rem);
  }

  .works-container {
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  .work-box {
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: 0;
    padding: 1rem;
    border-radius: 1.1rem;
  }

  .work-box img {
    width: 100%;
    height: 180px;
    flex-basis: 180px;
    margin: 0 0 1rem;
  }

  .work-box h3 {
    font-size: clamp(1rem, 4.5vw, 1.15rem);
    line-height: 1.35;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .work-box p {
    max-width: 100%;
    font-size: 0.9rem;
    overflow-wrap: anywhere;
  }
  .work-tags { gap: 0.4rem; }
  .work-tag { padding: 0.28rem 0.65rem; }
  .work-actions { padding-top: 0.9rem; }
}

/* Keep the category filters compact and balanced on phones. */
@media (max-width: 480px) {
  .works-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(100%, 22rem);
    margin-inline: auto;
    gap: 0.55rem;
  }

  .works-toggle .toggle-btn {
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: 2.75rem;
    padding: 0.55rem 0.8rem;
    font-size: 0.72rem;
    line-height: 1.3;
    white-space: normal;
  }
}

@media (max-width: 360px) {
  .featured-works { padding-inline: 0.75rem; }
  .work-box { padding: 0.85rem; }
  .work-box img {
    width: 100%;
    height: 160px;
    flex-basis: 160px;
    margin: 0 0 0.9rem;
  }

  .works-toggle { gap: 0.45rem; }
}

.modal-details h2 {
  max-width: 20rem;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  line-height: 1.15;
  color: var(--accent);
  margin-bottom: 1rem;
}

.modal-summary {
  color: #bcbecf;
  font-size: 0.92rem;
  line-height: 1.75;
  margin-bottom: 1.75rem;
}

.modal-details h4 {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0.65rem;
}

.modal-details .work-tags {
  margin-bottom: 1.75rem;
}

.modal-features {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem 1rem;
  margin-bottom: 0.5rem;
}

.modal-features li {
  position: relative;
  padding-left: 1.1rem;
  color: #d2d3df;
  font-size: 0.8rem;
  line-height: 1.5;
}

.modal-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.close-modal {
  position: absolute;
  padding: 0;
  font-family: inherit;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(8, 8, 14, 0.6);
  font-size: 1.5rem;
  line-height: 1;
  color: #fff;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.close-modal:hover {
  border-color: rgba(var(--accent-rgb), 0.55);
  background: rgba(var(--accent-rgb), 0.12);
  transform: rotate(90deg);
}

/* Animation */
@keyframes popup {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.hidden {
  display: none !important;
}

/* Tablet + mobile: every work modal (web and mobile)
   shares one frame — same width, same height, same media window — and
   its content scrolls inside that frame. */
@media (max-width: 900px) {
  .modal {
    --modal-media-h: clamp(220px, 38dvh, 360px);
    padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
    overflow: hidden;
  }

  .modal-content,
  .modal-content.web-project-modal {
    display: flex;
    flex-direction: column;
    width: min(100%, 680px);
    height: 88vh;
    height: min(88dvh, 900px, calc(100dvh - 2rem));
    max-height: none;
    margin: 0 auto;
    padding: 3.5rem 1rem 1rem;
    border-radius: 1.25rem;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .modal-content > .gallery {
    flex: 0 0 auto;
    align-self: stretch;
    width: 100%;
  }

  /* Static galleries become one fixed-height, swipeable media window;
     extra shots peek in from the right so it reads as scrollable. */
  .modal-content .gallery:not(.project-gallery) {
    flex-direction: row;
    gap: 0.75rem;
    height: var(--modal-media-h);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
  }

  .modal-content .gallery:not(.project-gallery) img,
  .modal-content .gallery:not(.project-gallery) img + img {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
    scroll-snap-align: center;
    box-shadow: none;
  }

  .modal-content .gallery:not(.project-gallery) img:not(:only-child) {
    flex-basis: 86%;
  }

  .project-gallery-stage {
    height: var(--modal-media-h);
    min-height: 0;
  }

  .project-gallery-thumbnail {
    flex-basis: 4.5rem;
    height: 3.25rem;
  }

  .modal-details,
  .web-project-modal .modal-details {
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
    align-self: stretch;
    width: 100%;
    padding: 1.25rem 0.25rem 0;
  }

  .modal-details h2 {
    max-width: none;
    font-size: clamp(1.4rem, 4.5vw, 1.85rem);
    margin-bottom: 0.75rem;
  }

  .modal-summary,
  .modal-details .work-tags,
  .modal-features {
    margin-bottom: 1.25rem;
  }

  /* Actions sit at the bottom of the frame when content is short. */
  .modal-details .project-modal-actions {
    margin-top: auto;
  }

  .case-study-frame {
    height: 0;
    min-height: 0;
    flex: 1 1 auto;
  }
}

@media (max-width: 600px) {
  .modal {
    --modal-media-h: clamp(190px, 32dvh, 280px);
    padding: max(0.75rem, env(safe-area-inset-top)) 0.75rem max(0.75rem, env(safe-area-inset-bottom));
  }

  .modal-content,
  .modal-content.web-project-modal {
    height: 90vh;
    height: min(90dvh, calc(100dvh - 1.5rem));
    padding: 3.25rem 0.85rem 0.85rem;
    border-radius: 1.1rem;
  }

  .modal-details,
  .web-project-modal .modal-details {
    padding-top: 1rem;
  }

  .modal-summary {
    font-size: 0.88rem;
    line-height: 1.65;
  }

  .modal-features { grid-template-columns: 1fr; }

  .project-gallery-thumbnail {
    flex-basis: 4rem;
    height: 2.9rem;
  }
}

/* Responsive */
@media (max-width: 480px) {
  .project-modal-actions { gap: 0.5rem; }
  .project-modal-actions .preview-btn,
  .project-modal-actions .visit-btn {
    padding-inline: 0.45rem;
    font-size: 0.72rem;
  }
  .project-modal-actions svg { width: 15px; height: 15px; }
  .toggle-btn {
    width: 100%;
    text-align: center;
  }
}

/* Footer Section */

.footer {
  position: relative;
  background: linear-gradient(180deg, rgba(15, 15, 15, 0.97), rgba(8, 8, 8, 1));
  color: #fff;
  padding: 4.5rem 2rem 1rem;
  font-size: 0.95rem;
  text-align: center;
  overflow: hidden;
  /* Keep the floating dock nav clear of the footer's own content/links */
  padding-bottom: 6rem;
}

/* Glowing top divider + ambient cyan bloom, matching the site's card accents */
.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(700px, 90%);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.5), transparent);
}

.footer::after {
  content: "";
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 240px;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.08), transparent 70%);
  pointer-events: none;
}

.footer-container {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  max-width: 900px;  /* same width as hero-photo */
  margin: 0 auto;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-logo {
  height: 50px;
  width: auto;
  object-fit: contain;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), 0.25));
}

.footer-brand p {
  color: #aaa;
  max-width: 250px;
}

.footer-links,
.footer-contact {
  text-align: left;
}

.footer-links h4,
.footer-contact h4 {
  color: var(--accent);
  margin-bottom: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.footer-links ul,
.footer-contact ul {
  list-style: none;
}

.footer-links ul li,
.footer-contact ul li {
  margin-bottom: 0.7rem;
}

.footer-links ul li a,
.footer-contact ul li a {
  display: inline-block;
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease, transform 0.3s ease;
}

.footer-links ul li a:hover,
.footer-contact ul li a:hover {
  color: var(--accent);
  transform: translateX(4px);
}

/* Contact rows with icon bubbles, matching the contact/resume pages */
.footer-contact ul li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.footer-contact ul li > span:last-child {
  color: #ccc;
}

.footer-contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--accent);
}

.footer-contact-icon svg {
  width: 15px;
  height: 15px;
}

.footer-brand p {
  font-size: 0.88rem;
  line-height: 1.7;
}

.footer-bottom {
  position: relative;
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.2rem;
  color: #888;
  font-size: 0.85rem;
}

/* Responsive Footer */
@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
  }

  .footer-links,
  .footer-contact {
    text-align: center;
  }

  /* Center the list as one block so the icons stay in a single column */
  .footer-contact ul {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .footer-brand p {
    max-width: 320px;
    margin-inline: auto;
  }
}

@media (max-width: 480px) {
  .footer {
    padding: 2rem 1rem 6rem;
  }

  .footer-logo {
    height: 40px;
  }
}

/* Ensure all buttons, links, and toggles use Montserrat */
button,
a {
  font-family: "Montserrat", sans-serif;
}

/* Optional: inherit font for inputs and selects as well */
input,
select,
textarea {
  font-family: "Montserrat", sans-serif;
}

/* WORK | PORTFOLIO SECTION */


/* Work Page Hero Section */
.work-page-hero {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 6rem 2rem;
  min-height: 50vh;
  background: url('assets/patternBG.png') repeat;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.work-page-hero-text {
  color: #fff;
  max-width: 800px;
}

.work-page-hero-text .section-eyebrow {
  margin-bottom: 1rem;
}

.work-page-hero-text h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--accent);
}

.work-page-hero-text p {
  font-size: 1.2rem;
  line-height: 1.6;
  /* Muted so the subtitle sits below the heading instead of competing with it */
  color: #9a9cb0;
}

/* Responsive for tablet */
@media (max-width: 768px) {
  .work-page-hero-text h1 {
    font-size: 2.2rem;
  }
  .work-page-hero-text p {
    font-size: 1.1rem;
  }
}

/* Responsive for mobile (<480px) */
@media (max-width: 480px) {
  .work-page-hero {
    padding: 4rem 1rem;
  }
  .work-page-hero-text h1 {
    font-size: 1.8rem;
  }
  .work-page-hero-text p {
    font-size: 1rem;
  }
}

/* Fade in/out scroll animation */
.work-page-fade {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.work-page-fade.work-page-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Service cards — base styles used by the home Expertise section (.home-expertise) */
.work-page-services {
  position: relative;
  padding: 6rem 2rem 7rem;
  background: #0f0f0f url('assets/patternBG.png') repeat;
  color: #fff;
  text-align: center;
}

/* Responsive Grid Layout */
.work-page-services-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
  gap: 1.5rem;
  max-width: 1180px;
  margin: 0 auto;
}

/* Service Card */
.work-page-service-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 390px;
  padding: 1.5rem;
  text-align: left;
  background: linear-gradient(145deg, rgba(32, 31, 48, 0.9), rgba(13, 13, 21, 0.88));
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  border-radius: 1.5rem;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.35);
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.work-page-service-card::before {
  content: "";
  position: absolute;
  top: -5rem;
  right: -4rem;
  width: 15rem;
  height: 15rem;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.12);
  filter: blur(35px);
  pointer-events: none;
}

.work-page-service-card > * {
  position: relative;
  z-index: 1;
}

.work-page-service-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.5);
}

.work-page-service-number {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.work-page-service-label {
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.work-page-service-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 4.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 1.15rem;
  background: rgba(var(--accent-rgb), 0.08);
  box-shadow: inset 0 0 18px rgba(var(--accent-rgb), 0.08);
}

.work-page-service-icon {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
}

.work-page-service-content {
  flex: 1;
}

.work-page-service-card h3 {
  margin-bottom: 0.65rem;
  font-size: 1.35rem;
  font-weight: 700;
}

.work-page-service-card p {
  max-width: 28rem;
  color: #a9abbe;
  font-size: 0.9rem;
  line-height: 1.7;
}

.work-page-service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.25rem;
}

.work-page-service-tags span {
  padding: 0.35rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #d2d3df;
  font-size: 0.68rem;
  font-weight: 600;
}

.work-page-service-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.25s ease, padding 0.25s ease;
}

.work-page-service-link span {
  font-size: 1.25rem;
  line-height: 1;
}

.work-page-service-card:hover {
  transform: translateY(-10px);
  border-color: rgba(var(--accent-rgb), 0.5);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.55), 0 0 28px rgba(var(--accent-rgb), 0.12);
}

.work-page-service-card:hover .work-page-service-link {
  padding-left: 0.35rem;
}

/* Responsive for mobile (<480px) */
@media (max-width: 480px) {
  .work-page-services {
    padding: 3rem 1rem;
  }

  .work-page-service-card {
    min-height: 350px;
    padding: 1.35rem;
  }

  .work-page-service-card-header {
    margin-bottom: 1.5rem;
  }

  .work-page-service-card h3 {
    font-size: 1.3rem;
  }

  .work-page-service-card p {
    font-size: 0.95rem;
  }
}

/* =========================
   Resume Section (Base)
========================= */
.resume-section {
  padding: 4rem 2rem;
  background: #0f0f0f url('assets/patternBG.png');
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  line-height: 1.6;
}

.resume-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1200px;
  margin: auto;
  align-items: stretch;
}

/* =========================
   Resume Card Base
========================= */
.resume-card {
  position: relative;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  border-radius: 1.2rem;
  padding: 2rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  text-align: left;
}

.resume-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.1), transparent 60%);
  pointer-events: none;
}

.resume-card.show {
  opacity: 1;
  transform: translateY(0);
}

.resume-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.5), 0 0 24px rgba(var(--accent-rgb), 0.1);
}

.resume-card h2 {
  position: relative;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--accent);
  font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 0.5rem;
}

/* Card heading with leading icon badge */
.resume-card-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.resume-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  flex-shrink: 0;
  border-radius: 0.6rem;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.25);
}

.resume-card-icon svg {
  width: 1.1rem;
  height: 1.1rem;
}

/* =========================
   Profile Card
========================= */
.resume-card.objective {
  grid-column: span 3;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2.5rem;
  align-items: center;
  padding: 2.5rem;
}

.resume-profile-photo {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 0 6px rgba(var(--accent-rgb), 0.04);
}

.resume-profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  display: block;
}

/* Fade the photo's bottom edge into the card */
.resume-profile-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.45), transparent 40%);
  pointer-events: none;
}

.resume-profile-body {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.resume-profile-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: rgba(var(--accent-rgb), 0.8);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.resume-profile-eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
}

.resume-card.objective h2 {
  margin-bottom: 0.4rem;
  padding-bottom: 0;
  border-bottom: none;
  font-size: 2.2rem;
  line-height: 1.15;
  font-weight: 700;
  color: #fff;
}

.resume-role {
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.resume-bio {
  position: relative;
  color: #bbb;
  line-height: 1.75;
  max-width: 68ch;
}

.resume-profile-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 0;
  padding: 0;
}

.resume-profile-tags li {
  font-size: 0.8rem;
  color: var(--accent-soft);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  background: rgba(var(--accent-rgb), 0.06);
}

/* Logo as a quiet signature, not a competing headline */
.resume-profile-logo {
  position: absolute;
  top: 1.75rem;
  right: 2rem;
  height: 26px;
  width: auto;
  opacity: 0.55;
}

/* =========================
   Special Layout Cards
========================= */
.resume-card.wide {
  grid-column: span 2;
}

.resume-card.full {
  grid-column: span 3;
}

/* =========================
   Personal Info Grid
========================= */
.info-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem 1.5rem;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.info-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #777;
}

.info-value {
  color: #f2f2f2;
  font-size: 1rem;
  font-weight: 600;
}

/* =========================
   Timeline (Education / Work Experience)
========================= */
/*
  Dot and line share one axis: 5px from the list's left edge.
  Items sit 24px in, so the axis is at -19px relative to each item.
  The dot's vertical centre matches the date row's centre (line-height 1rem → 0.5rem).
*/
.timeline {
  position: relative;
  list-style: none;
  padding-left: 24px;
  margin: 0;
}

.timeline-item {
  position: relative;
  padding-bottom: 1.6rem;
}

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

/* Connector from this dot down to the next one */
.timeline-item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 0.5rem;
  bottom: -0.5rem;
  width: 2px;
  background: rgba(255, 255, 255, 0.12);
}

.timeline-dot {
  position: absolute;
  z-index: 1;
  top: calc(0.5rem - 5px);
  left: -24px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.7);
}

.timeline-date {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1rem;
  margin-bottom: 0.3rem;
}

.timeline-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.2rem;
}

.timeline-sub {
  font-size: 0.9rem;
  color: #aaa;
}

/* "Current" pill for an ongoing role */
.timeline-badge {
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.5rem;
  padding: 0.15rem 0.55rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 999px;
}

.timeline-item.is-current .timeline-dot {
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.15), 0 0 12px rgba(var(--accent-rgb), 0.5);
}

/* =========================
   Skill Tags
========================= */
.skill-tags {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.skill-tag {
  padding: 0.4rem 1rem;
  border-radius: 2rem;
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
}

/* =========================
   Technical Skills (Circular)
========================= */
.skills-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 2rem 1.5rem;
  justify-items: center;
  text-align: center;
  padding: 0.5rem 0;
}

/* Hidden holder for the shared ring gradient (not display:none, or the gradient won't render) */
.skill-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.skill-circle {
  position: relative;
  width: 100%;
  max-width: 130px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.skill-item:hover .skill-circle {
  transform: translateY(-4px);
  filter: drop-shadow(0 0 12px rgba(var(--accent-rgb), 0.35));
}

.skill-circle svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg); /* start progress from top */
}

.skill-circle circle {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
}

.skill-circle circle.bg {
  stroke: rgba(255, 255, 255, 0.08);
}

.skill-circle circle.progress {
  stroke: url(#skillGradient);
  /* start empty (2πr ≈ 264) until the JS animation runs */
  stroke-dasharray: 264;
  stroke-dashoffset: 264;
  filter: drop-shadow(0 0 4px rgba(var(--accent-rgb), 0.5));
}

/* Inner disc that holds the icon + percentage */
.skill-label {
  position: absolute;
  inset: 16%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  color: #fff;
}

.skill-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.3rem;
}

/* Inline line icons — undo the ring svg sizing/rotation and use the accent colour */
.skill-circle .skill-icons svg {
  width: clamp(26px, 6vw, 34px);
  height: clamp(26px, 6vw, 34px);
  transform: none;
  color: var(--accent);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

/* Two icons side by side need to be a bit smaller */
.skill-circle .skill-icons svg:not(:only-child) {
  width: clamp(22px, 5vw, 28px);
  height: clamp(22px, 5vw, 28px);
}

/* Keep icon circles from picking up the ring's thick stroke */
.skill-circle .skill-icons circle {
  stroke-width: inherit;
}

.skill-label strong {
  font-size: clamp(0.85rem, 2.5vw, 1rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.skill-name {
  font-size: clamp(0.75rem, 2vw, 0.9rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.8);
}

/* Mobile fix */
@media (max-width: 480px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 1rem;
  }
  .skill-circle {
    max-width: 105px;
  }
}




/* =========================
   CTA Button
========================= */
.download-btn {
  grid-column: 1 / -1;
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.8rem 1.8rem;
  font-size: 1rem;
  font-weight: 600;
  color: #0f0f0f;
  background: var(--accent);
  border-radius: 2rem;
  text-decoration: none;
  min-width: 160px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.4);
  transition: all 0.3s ease;
  margin-bottom: 2rem;
}

.download-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.download-btn:hover {
  background: var(--accent-dark);
  color: #fff;
  box-shadow: 0 6px 16px rgba(var(--accent-rgb), 0.6);
  transform: translateY(-2px);
}

.cta-wrapper {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

/* =========================
   Responsive
========================= */
@media (max-width: 992px) {
  .resume-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .resume-card.objective,
  .resume-card.full,
  .resume-card.wide {
    grid-column: span 2;
  }
}

@media (max-width: 600px) {
  .resume-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .resume-card.objective,
  .resume-card.wide,
  .resume-card.full {
    grid-column: span 1;
  }
  .resume-card.objective {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
    text-align: center;
  }
  .resume-profile-photo {
    width: 160px;
    margin: 0 auto;
    border-radius: 50%;
    aspect-ratio: 1;
  }
  .resume-profile-eyebrow,
  .resume-profile-tags {
    justify-content: center;
  }
  .resume-profile-eyebrow::before {
    display: none;
  }
  .resume-card.objective h2 {
    font-size: 1.5rem;
  }
  .resume-bio {
    margin: 0 auto;
  }
  .resume-profile-logo {
    display: none;
  }
  .info-grid {
    grid-template-columns: 1fr;
  }
  .resume-card h2 {
    font-size: 1.1rem;
  }
  .resume-card {
    padding: 1.5rem;
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .resume-card.objective h2 {
    font-size: 1.3rem;
  }
  .resume-card h2 {
    font-size: 1rem;
  }
  .resume-card {
    font-size: 0.9rem;
    padding: 1.2rem;
  }
}


/* ===== Contact Section ===== */

/* Contact Section */
.contact-section {
  padding: 5rem 2rem 7rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.contact-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.25rem;
  max-width: 1200px;
  width: 100%;
  min-width: 0;
  align-items: start;
}

/* Contact Info Card */
.contact-card {
  position: relative;
  background: linear-gradient(160deg, rgba(30, 30, 50, .94), rgba(13, 14, 22, .97));
  border: 1px solid rgba(var(--accent-rgb), .2);
  border-radius: 1.6rem;
  padding: 2.35rem;
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35), inset 0 1px rgba(255,255,255,.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0, rgba(var(--accent-rgb), .2), transparent 38%);
  pointer-events: none;
}

.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), 0 0 26px rgba(var(--accent-rgb), 0.1);
}

.contact-card-header {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.6rem;
}

.contact-card-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), .35), transparent);
}

.contact-card-brand {
  min-width: 0;
}

.contact-card-kicker {
  display: block;
  margin-bottom: .55rem;
  color: var(--accent);
  font-size: .63rem;
  font-weight: 700;
  letter-spacing: .18em;
}

.contact-card-brand h2 {
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.15;
}

.contact-card-brand h2 em {
  color: var(--accent);
  font-family: Georgia, serif;
  font-weight: 400;
}

.contact-card-brand p {
  max-width: 440px;
  margin-top: .8rem;
  color: #a3a6b8;
  font-size: .85rem;
  line-height: 1.65;
}

.contact-availability {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  flex-shrink: 0;
  padding: .42rem .75rem;
  border: 1px solid rgba(81, 246, 176, .28);
  border-radius: 999px;
  background: rgba(81, 246, 176, .07);
  color: #7ff5c3;
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .12em;
  white-space: nowrap;
}

.contact-availability i {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #51f6b0;
  box-shadow: 0 0 10px #51f6b0;
}

.contact-availability i::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #51f6b0;
  animation: contactPulse 2s ease-out infinite;
}

@keyframes contactPulse {
  0% { transform: scale(1); opacity: .7; }
  100% { transform: scale(2.8); opacity: 0; }
}

.contact-info-list {
  position: relative;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  text-align: left;
}

.contact-info-list li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .85rem 1rem;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 1rem;
  background: rgba(255, 255, 255, .025);
  transition: border-color .25s ease, background .25s ease, transform .25s ease;
}

.contact-info-list li:hover,
.contact-info-list li:focus-within {
  border-color: rgba(var(--accent-rgb), .3);
  background: rgba(var(--accent-rgb), .06);
  transform: translateX(4px);
}

.contact-info-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: .8rem;
  border: 1px solid rgba(var(--accent-rgb), .18);
  background: linear-gradient(145deg, rgba(var(--accent-rgb), .18), rgba(var(--accent-rgb), .05));
  color: var(--accent-light);
  transition: transform .25s ease, background .25s ease;
}

.contact-info-list li:hover .contact-info-icon {
  transform: scale(1.06);
  background: linear-gradient(145deg, rgba(var(--accent-rgb), .28), rgba(var(--accent-rgb), .08));
}

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

.contact-info-list > li > div {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: .2rem;
  min-width: 0;
}

.contact-info-label {
  font-size: .66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: #8a8da3;
}

.contact-info-value {
  color: #fff;
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color 0.3s ease;
}

/* Make the whole row clickable for link values */
a.contact-info-value::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.contact-info-list li:has(a.contact-info-value)::after {
  content: "";
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-right: .25rem;
  border-top: 1.8px solid currentColor;
  border-right: 1.8px solid currentColor;
  color: #6b6e85;
  transform: rotate(45deg);
  transition: color .25s ease, transform .25s ease;
}

.contact-info-list li:has(a.contact-info-value):hover::after {
  color: var(--accent);
  transform: translateX(3px) rotate(45deg);
}

.contact-info-list li:hover a.contact-info-value {
  color: var(--accent-light);
}

a.contact-info-value:focus-visible {
  outline: none;
}

.contact-info-list li:has(a.contact-info-value:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Chat With Me */
.contact-social {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(25, 28, 48, .94), rgba(12, 14, 25, .96));
  border: 1px solid rgba(175, 143, 255, .25);
  border-radius: 1.6rem;
  padding: 2.35rem;
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35), inset 0 1px rgba(255,255,255,.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-social::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0, rgba(151, 115, 255, .2), transparent 42%);
  pointer-events: none;
}

.contact-social:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), 0 0 26px rgba(var(--accent-rgb), 0.1);
}

.contact-social h2 {
  margin-bottom: .65rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: #fff;
}

.contact-social p {
  color: #a7a9bb;
  margin-bottom: 1.8rem;
  font-size: .85rem;
}

.social-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.social-btn {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  justify-content: flex-start;
  padding: 1rem 1.2rem;
  border-radius: .9rem;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.social-icon {
  display: flex;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.social-icon svg {
  width: 100%;
  height: 100%;
}

.social-btn:hover {
  transform: translateY(-3px) translateX(3px);
}

.messenger-btn {
  background: linear-gradient(135deg, #00b2ff, #006aff);
  box-shadow: 0 6px 18px rgba(0, 106, 255, 0.35);
}

.messenger-btn:hover {
  box-shadow: 0 10px 24px rgba(0, 106, 255, 0.5);
}

.whatsapp-btn {
  background: #25d366;
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35);
}

.whatsapp-btn:hover {
  box-shadow: 0 10px 24px rgba(37, 211, 102, 0.5);
}


/* Responsive */
@media (max-width: 768px) {
  .contact-container {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
  }

  .contact-card-header {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .contact-availability {
    order: -1;
  }

  .contact-card-brand p {
    margin-inline: auto;
  }

  .social-buttons {
    align-items: center;
  }

  .social-btn {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .contact-card,
  .contact-social {
    padding: 1.5rem;
  }

  .contact-card-brand h2 {
    font-size: 1.6rem;
  }

  .contact-card-brand p {
    font-size: 0.82rem;
  }

  .contact-info-list li {
    gap: .85rem;
    padding: .75rem .85rem;
  }

  .contact-info-icon {
    width: 38px;
    height: 38px;
  }

  .contact-info-value {
    font-size: 0.88rem;
  }

  .contact-card:hover,
  .contact-social:hover,
  .contact-info-list li:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-availability i::after {
    animation: none;
  }
}

/***************************************************
    ENSURE NAVBAR ALWAYS ON TOP
****************************************************/
.navbar,
header {
  position: fixed !important;
  z-index: 9999 !important;
}


@media (max-width: 360px) {
  .project-modal-actions { grid-template-columns: 1fr; }
}
