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

:root {
  --navy-950: #07111f;
  --navy-900: #0f172a;
  --navy-800: #172033;
  --blue-600: #0284c7;
  --blue-500: #0ea5e9;
  --blue-300: #7dd3fc;
  --teal-500: #14b8a6;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --white: #ffffff;
  --surface: #f8fafc;
  --success: #047857;
  --danger: #b91c1c;
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 70px rgba(15, 23, 42, 0.16);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --content: 1160px;
  --header-height: 76px;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--navy-900);
  font-family: var(--font-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

body.nav-open,
body.modal-open {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid rgba(14, 165, 233, 0.38);
  outline-offset: 3px;
}

::selection {
  background: var(--blue-300);
  color: var(--navy-950);
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--navy-950);
  font-family: var(--font-display);
  line-height: 1.15;
}

h1 {
  font-size: clamp(2.65rem, 7vw, 5.4rem);
  letter-spacing: -0.055em;
}

h2 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  letter-spacing: -0.04em;
}

h3 {
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  letter-spacing: -0.025em;
}

p {
  margin: 0 0 1rem;
}

.container {
  width: min(100% - 40px, var(--content));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 999;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--navy-950);
  color: var(--white);
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 1rem;
  color: var(--blue-600);
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 28px;
  height: 2px;
  background: currentColor;
  content: "";
}

.lead {
  color: var(--slate-600);
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  line-height: 1.75;
}

.section {
  padding: clamp(72px, 9vw, 112px) 0;
}

.section-soft {
  background: var(--surface);
}

.section-dark {
  background: var(--navy-950);
  color: var(--slate-300);
}

.section-dark h2,
.section-dark h3 {
  color: var(--white);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(280px, 0.52fr);
  gap: 48px;
  align-items: end;
  margin-bottom: 44px;
}

.section-heading p {
  margin: 0;
  color: var(--slate-600);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--header-height);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

.nav {
  position: relative;
  display: flex;
  min-height: var(--header-height);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: max-content;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  background: var(--navy-950);
  color: var(--blue-300);
  font-family: var(--font-display);
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
}

.brand-copy {
  display: grid;
  line-height: 1.1;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-role {
  margin-top: 3px;
  color: var(--slate-500);
  font-size: 0.69rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 10px 13px;
  border-radius: 10px;
  color: var(--slate-600);
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--slate-100);
  color: var(--navy-950);
}

.nav-links .nav-cta {
  margin-left: 6px;
  background: var(--navy-950);
  color: var(--white);
}

.nav-links .nav-cta:hover,
.nav-links .nav-cta.active {
  background: var(--blue-600);
  color: var(--white);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  background: var(--white);
  color: var(--navy-950);
  cursor: pointer;
}

.nav-toggle-lines,
.nav-toggle-lines::before,
.nav-toggle-lines::after {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  content: "";
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle-lines {
  position: relative;
}

.nav-toggle-lines::before {
  position: absolute;
  top: -6px;
}

.nav-toggle-lines::after {
  position: absolute;
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-lines {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-lines::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-lines::after {
  top: 0;
  transform: rotate(-45deg);
}

/* Buttons */
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 0.91rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
  background: var(--blue-600);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(2, 132, 199, 0.24);
}

.btn-primary:hover {
  background: #0369a1;
  box-shadow: 0 14px 30px rgba(2, 132, 199, 0.3);
}

.btn-dark {
  background: var(--navy-950);
  color: var(--white);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.18);
}

.btn-dark:hover {
  background: var(--navy-800);
}

.btn-outline {
  border-color: var(--slate-300);
  background: var(--white);
  color: var(--navy-900);
}

.btn-outline:hover {
  border-color: var(--blue-500);
  background: #f0f9ff;
}

.btn[aria-disabled="true"],
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue-600);
  font-size: 0.9rem;
  font-weight: 700;
}

.text-link:hover {
  color: #0369a1;
}

/* Home hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(68px, 10vw, 126px) 0 clamp(78px, 10vw, 120px);
  background:
    radial-gradient(circle at 90% 20%, rgba(14, 165, 233, 0.16), transparent 28%),
    radial-gradient(circle at 10% 90%, rgba(20, 184, 166, 0.1), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.hero::before {
  position: absolute;
  inset: 0;
  opacity: 0.38;
  background-image: linear-gradient(rgba(148, 163, 184, 0.17) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 184, 0.17) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
  content: "";
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.75fr);
  gap: clamp(48px, 8vw, 92px);
  align-items: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  padding: 7px 11px;
  border: 1px solid #bae6fd;
  border-radius: 999px;
  background: #f0f9ff;
  color: #075985;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.status-pill::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal-500);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
  content: "";
}

.hero h1 span {
  color: var(--blue-600);
}

.hero-copy .lead {
  max-width: 620px;
  margin: 26px 0 32px;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  margin-top: 34px;
  padding: 0;
  list-style: none;
  color: var(--slate-600);
  font-size: 0.84rem;
  font-weight: 600;
}

.hero-facts li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-facts li::before {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--blue-500);
  content: "";
}

.hero-visual {
  position: relative;
  min-height: 520px;
}

.portrait-frame {
  position: absolute;
  inset: 20px 26px 34px 32px;
  overflow: hidden;
  border: 10px solid var(--white);
  border-radius: var(--radius-lg);
  background: var(--slate-200);
  box-shadow: var(--shadow-lg);
  transform: rotate(2.2deg);
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.code-card {
  position: absolute;
  right: -8px;
  bottom: 4px;
  width: min(310px, 78%);
  padding: 18px;
  border: 1px solid rgba(125, 211, 252, 0.23);
  border-radius: 18px;
  background: rgba(7, 17, 31, 0.96);
  color: #dbeafe;
  box-shadow: var(--shadow-lg);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.7;
}

.code-card-dots {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.code-card-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--slate-500);
}

.code-key { color: #7dd3fc; }
.code-value { color: #5eead4; }
.code-comment { color: #64748b; }

.float-badge {
  position: absolute;
  top: 4px;
  left: 0;
  display: inline-grid;
  place-items: center;
  width: 90px;
  height: 90px;
  border: 8px solid var(--white);
  border-radius: 24px;
  background: linear-gradient(145deg, var(--blue-500), var(--teal-500));
  color: var(--white);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  transform: rotate(-8deg);
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.info-card,
.project-card,
.value-card,
.contact-card,
.timeline-card {
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.info-card {
  padding: 28px;
}

.card-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 22px;
  place-items: center;
  border-radius: 14px;
  background: #e0f2fe;
  color: #0369a1;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
}

.info-card:nth-child(2) .card-icon {
  background: #ccfbf1;
  color: #0f766e;
}

.info-card:nth-child(3) .card-icon {
  background: #ede9fe;
  color: #6d28d9;
}

.info-card p,
.value-card p,
.project-card p {
  margin: 12px 0 0;
  color: var(--slate-600);
}

/* Featured project */
.featured-project {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 0.78fr);
  gap: 52px;
  align-items: center;
}

.browser-mock {
  overflow: hidden;
  border: 1px solid #293548;
  border-radius: 20px;
  background: var(--navy-900);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 13px 16px;
  border-bottom: 1px solid #293548;
  background: #111c2f;
}

.browser-bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--slate-500);
}

.browser-address {
  flex: 1;
  margin-left: 8px;
  padding: 6px 12px;
  border-radius: 7px;
  background: #1e293b;
  color: var(--slate-300);
  font-size: 0.69rem;
}

.browser-screen {
  min-height: 330px;
  padding: 34px;
  background:
    radial-gradient(circle at 88% 14%, rgba(14, 165, 233, 0.22), transparent 24%),
    linear-gradient(155deg, #0f172a, #07111f);
}

.mock-label {
  display: inline-block;
  margin-bottom: 20px;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.14);
  color: var(--blue-300);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.browser-screen h3 {
  max-width: 390px;
  color: var(--white);
  font-size: clamp(1.8rem, 3vw, 2.45rem);
}

.browser-screen p {
  max-width: 390px;
  margin-top: 14px;
  color: var(--slate-300);
  font-size: 0.85rem;
}

.mock-button {
  display: inline-block;
  margin-top: 12px;
  padding: 9px 13px;
  border-radius: 8px;
  background: var(--blue-500);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
}

.feature-copy .lead {
  margin: 18px 0 22px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.tags li,
.tag {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  background: var(--surface);
  color: var(--slate-600);
  font-size: 0.73rem;
  font-weight: 700;
}

.section-dark .tags li {
  border-color: #334155;
  background: #111c2f;
  color: var(--slate-300);
}

/* CTA */
.cta-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 36px;
  align-items: center;
  padding: clamp(30px, 5vw, 54px);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 88% 12%, rgba(125, 211, 252, 0.25), transparent 25%),
    var(--navy-950);
  color: var(--slate-300);
}

.cta-panel h2 {
  color: var(--white);
}

.cta-panel p {
  max-width: 660px;
  margin: 14px 0 0;
}

.cta-panel .btn-outline {
  border-color: #475569;
  background: transparent;
  color: var(--white);
}

.cta-panel .btn-outline:hover {
  border-color: var(--blue-300);
  background: rgba(255, 255, 255, 0.06);
}

/* Inner pages */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(64px, 9vw, 104px) 0 clamp(58px, 7vw, 86px);
  border-bottom: 1px solid var(--slate-200);
  background:
    radial-gradient(circle at 82% 30%, rgba(14, 165, 233, 0.15), transparent 26%),
    var(--surface);
}

.page-hero::after {
  position: absolute;
  right: -70px;
  bottom: -80px;
  width: 280px;
  height: 280px;
  border: 1px solid rgba(14, 165, 233, 0.18);
  border-radius: 50%;
  box-shadow: 0 0 0 38px rgba(14, 165, 233, 0.035), 0 0 0 76px rgba(14, 165, 233, 0.025);
  content: "";
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  max-width: 900px;
  font-size: clamp(2.65rem, 6vw, 4.8rem);
}

.page-hero .lead {
  max-width: 720px;
  margin: 22px 0 0;
}

/* About */
.profile-intro {
  display: grid;
  grid-template-columns: minmax(260px, 0.48fr) minmax(0, 1fr);
  gap: clamp(38px, 7vw, 78px);
  align-items: center;
}

.profile-photo {
  position: relative;
}

.profile-photo::before {
  position: absolute;
  inset: 20px -18px -20px 18px;
  z-index: -1;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--blue-500), var(--teal-500));
  content: "";
}

.profile-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 30%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.profile-copy h2 {
  max-width: 740px;
}

.profile-copy .lead {
  margin: 22px 0;
}

.profile-note {
  padding: 18px 20px;
  border-left: 4px solid var(--blue-500);
  border-radius: 0 12px 12px 0;
  background: #f0f9ff;
  color: #0c4a6e;
  font-size: 0.93rem;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.value-card {
  padding: 30px;
}

.value-card .number {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--blue-500);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.timeline::before {
  position: absolute;
  top: 25px;
  left: 12%;
  right: 12%;
  height: 2px;
  background: var(--slate-200);
  content: "";
}

.timeline-card {
  position: relative;
  z-index: 1;
  padding: 24px;
}

.timeline-dot {
  width: 18px;
  height: 18px;
  margin-bottom: 24px;
  border: 4px solid var(--white);
  border-radius: 50%;
  background: var(--blue-500);
  box-shadow: 0 0 0 2px var(--blue-300);
}

.timeline-card p {
  margin: 11px 0 0;
  color: var(--slate-600);
  font-size: 0.9rem;
}

.quote-panel {
  max-width: 880px;
  margin-inline: auto;
  text-align: center;
}

.quote-panel blockquote {
  margin: 0;
  color: var(--white);
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.3;
}

.quote-panel cite {
  display: block;
  margin-top: 22px;
  color: var(--blue-300);
  font-style: normal;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.project-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
}

.project-visual {
  position: relative;
  min-height: 220px;
  padding: 24px;
  background: linear-gradient(145deg, var(--navy-950), #16324f);
  color: var(--white);
}

.project-card:nth-child(2) .project-visual {
  background: linear-gradient(145deg, #0f766e, #0f172a);
}

.project-card:nth-child(3) .project-visual {
  background: linear-gradient(145deg, #4c1d95, #0f172a);
}

.project-window {
  overflow: hidden;
  min-height: 150px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.2);
}

.project-window-top {
  display: flex;
  gap: 5px;
  padding: 9px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.project-window-top span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.48);
}

.project-window-body {
  padding: 22px;
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 700;
}

.project-window-body small {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.68);
  font-family: var(--font-body);
  font-size: 0.69rem;
  font-weight: 500;
}

.project-status {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(7, 17, 31, 0.75);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.project-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 28px;
}

.project-body .tags {
  margin: 18px 0 24px;
}

.project-body .text-link,
.project-body .btn {
  margin-top: auto;
  align-self: flex-start;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.process-step {
  padding: 30px;
  border-top: 3px solid var(--blue-500);
  background: rgba(255, 255, 255, 0.04);
}

.process-step:nth-child(2) {
  border-color: var(--teal-500);
}

.process-step:nth-child(3) {
  border-color: #8b5cf6;
}

.process-step .step-number {
  color: var(--blue-300);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.process-step h3 {
  margin-top: 14px;
}

.process-step p {
  margin: 12px 0 0;
}

/* Gallery */
.gallery-section + .gallery-section {
  margin-top: 68px;
}

.gallery-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.gallery-heading p {
  max-width: 560px;
  margin: 0;
  color: var(--slate-600);
  font-size: 0.9rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--slate-200);
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.gallery-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.gallery-item:hover img {
  transform: scale(1.035);
}

.gallery-item figcaption {
  padding: 14px 16px 17px;
  color: var(--slate-600);
  font-size: 0.78rem;
  line-height: 1.55;
}

.gallery-label {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(7, 17, 31, 0.82);
  color: var(--white);
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.image-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(7, 17, 31, 0.88);
  backdrop-filter: blur(12px);
}

.image-modal.open {
  display: grid;
}

.modal-dialog {
  position: relative;
  width: min(100%, 1000px);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-lg);
}

.modal-dialog img {
  width: 100%;
  max-height: 75vh;
  object-fit: contain;
  background: var(--navy-950);
}

.modal-caption {
  margin: 0;
  padding: 16px 20px 20px;
  color: var(--slate-600);
  font-size: 0.88rem;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(7, 17, 31, 0.8);
  color: var(--white);
  font-size: 1.2rem;
  cursor: pointer;
}

/* Contact */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.65fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.contact-card {
  padding: clamp(26px, 4vw, 38px);
}

.contact-card > p {
  margin-top: 13px;
  color: var(--slate-600);
}

.contact-list {
  display: grid;
  gap: 14px;
  margin: 30px 0;
}

.contact-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  background: var(--surface);
}

.contact-item-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 11px;
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 700;
}

.contact-item small {
  display: block;
  color: var(--slate-500);
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-item span,
.contact-item a {
  color: var(--navy-900);
  font-size: 0.9rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.privacy-note {
  padding: 15px 16px;
  border: 1px solid #bae6fd;
  border-radius: 12px;
  background: #f0f9ff;
  color: #0c4a6e;
  font-size: 0.82rem;
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

label {
  display: block;
  margin-bottom: 7px;
  color: var(--slate-700);
  font-size: 0.77rem;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--slate-300);
  border-radius: 11px;
  background: var(--white);
  color: var(--navy-900);
  padding: 13px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input::placeholder,
textarea::placeholder {
  color: #94a3b8;
}

input:focus,
textarea:focus {
  border-color: var(--blue-500);
  outline: none;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

textarea {
  min-height: 150px;
  resize: vertical;
}

.form-status {
  display: none;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 600;
}

.form-status.success,
.form-status.error {
  display: block;
}

.form-status.success {
  border: 1px solid #a7f3d0;
  background: #ecfdf5;
  color: var(--success);
}

.form-status.error {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: var(--danger);
}

/* 404 */
.error-page {
  display: grid;
  min-height: calc(100vh - var(--header-height));
  place-items: center;
  padding: 70px 0;
  background: var(--surface);
  text-align: center;
}

.error-code {
  color: var(--blue-600);
  font-family: var(--font-display);
  font-size: clamp(5rem, 18vw, 10rem);
  font-weight: 700;
  letter-spacing: -0.08em;
  line-height: 0.9;
}

.error-page h1 {
  margin-top: 18px;
  font-size: clamp(2rem, 5vw, 3.4rem);
}

.error-page p {
  max-width: 560px;
  margin: 18px auto 28px;
  color: var(--slate-600);
}

/* Footer */
.site-footer {
  padding: 54px 0 26px;
  border-top: 1px solid var(--slate-200);
  background: var(--white);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 36px;
  align-items: start;
  padding-bottom: 34px;
}

.footer-intro {
  max-width: 530px;
}

.footer-intro p {
  margin: 14px 0 0;
  color: var(--slate-600);
  font-size: 0.88rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  color: var(--slate-600);
  font-size: 0.84rem;
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--blue-600);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 22px;
  border-top: 1px solid var(--slate-200);
  color: var(--slate-500);
  font-size: 0.76rem;
}

.footer-bottom p {
  margin: 0;
}

/* Responsive */
@media (max-width: 980px) {
  .hero-grid,
  .featured-project,
  .profile-intro,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    max-width: 760px;
  }

  .hero-visual {
    width: min(100%, 560px);
    min-height: 540px;
    margin-inline: auto;
  }

  .featured-project {
    gap: 40px;
  }

  .card-grid,
  .projects-grid,
  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .timeline::before {
    display: none;
  }

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

  .profile-photo {
    width: min(100%, 460px);
  }
}

@media (max-width: 780px) {
  :root {
    --header-height: 68px;
  }

  .container {
    width: min(100% - 30px, var(--content));
  }

  .brand-role {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 1px);
    right: 0;
    left: 0;
    display: none;
    align-items: stretch;
    flex-direction: column;
    gap: 4px;
    padding: 14px 15px 20px;
    border-bottom: 1px solid var(--slate-200);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.09);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 14px;
  }

  .nav-links .nav-cta {
    margin: 4px 0 0;
    text-align: center;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .card-grid,
  .projects-grid,
  .process-grid,
  .story-grid {
    grid-template-columns: 1fr;
  }

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

  .gallery-heading {
    display: block;
  }

  .gallery-heading p {
    margin-top: 10px;
  }

  .cta-panel,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .cta-panel .button-row {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: clamp(2.45rem, 14vw, 3.45rem);
  }

  .hero-visual {
    min-height: 440px;
  }

  .portrait-frame {
    inset: 16px 12px 54px 18px;
  }

  .float-badge {
    width: 74px;
    height: 74px;
    border-width: 6px;
    font-size: 0.92rem;
  }

  .code-card {
    right: 0;
    width: 88%;
    font-size: 0.69rem;
  }

  .hero-facts {
    display: grid;
    gap: 10px;
  }

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

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

/* Small reusable utilities */
.mt-30 { margin-top: 30px; }
.muted-on-dark { color: var(--slate-300) !important; }
.justify-center { justify-content: center; }
.botcheck-field { display: none !important; }
