:root {
  --navy: #050d18;
  --ink: #122033;
  --muted: #5b6b80;
  --paper: #f4f7fb;
  --white: #ffffff;
  --blue: #1a6ef5;
  --blue-deep: #0d47c4;
  --orange: #ff7a18;
  --line: rgba(255, 255, 255, 0.12);
  --header: 84px;
  --font-display: "Outfit", sans-serif;
  --font-body: "Figtree", sans-serif;
  --shadow: 0 22px 50px rgba(5, 13, 24, 0.12);
  --radius: 22px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--ink); background: var(--white); line-height: 1.65; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.section { padding: 48px 0 96px; }
.eyebrow { color: var(--blue); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.78rem; margin-bottom: 12px; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  font-family: var(--font-display);
  border: 0;
  cursor: pointer;
}
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-deep); }
.btn-primary:disabled { opacity: 0.65; cursor: not-allowed; }
.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.45);
}
.btn-ghost.dark {
  color: var(--blue);
  border-color: rgba(26, 110, 245, 0.35);
}
.btn-small {
  min-height: 42px;
  padding: 0 16px;
  font-size: 0.92rem;
}
.btn-danger {
  background: transparent;
  color: #b42318;
  border: 1px solid rgba(180, 35, 24, 0.35);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(5, 13, 24, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  min-height: var(--header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--white); }
.brand img { width: 52px; height: 52px; object-fit: contain; background: #000; border-radius: 12px; }
.brand strong { display: block; font-family: var(--font-display); font-size: 1.05rem; }
.brand small { color: #9ab0c9; font-size: 0.75rem; }
.site-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.site-nav a {
  color: #d5e2f0;
  padding: 8px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
}
.site-nav a:hover,
.site-nav a.active { color: var(--white); background: rgba(26, 110, 245, 0.18); }
.nav-cta { background: var(--blue) !important; color: var(--white) !important; padding-inline: 14px !important; }
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 10px;
  padding: 10px 8px;
  background: transparent !important;
  cursor: pointer;
  color: #ffffff !important;
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  z-index: 60;
  forced-color-adjust: none;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2.5px;
  margin: 5px 0;
  background: #ffffff !important;
  background-color: #ffffff !important;
  border-radius: 2px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: max(420px, min(62vh, 48vw));
  background: #050d18;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: #050d18;
}
.hero-image {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center top;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 13, 24, 0.2) 0%, rgba(5, 13, 24, 0.88) 78%);
}
.hero-content {
  position: relative;
  z-index: 1;
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 44px 0 48px;
  color: var(--white);
  max-width: 780px;
  min-height: inherit;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-sizing: border-box;
}
.hero-mark { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.hero-mark img {
  width: 92px;
  height: 92px;
  object-fit: contain;
  background: #000;
  border-radius: 18px;
  flex-shrink: 0;
}
.hero-mark p {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 7vw, 5.2rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 0.02em;
  color: var(--orange);
}
.hero-content .eyebrow { color: #9cc2ff; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); margin-bottom: 18px; }
.hero-lead { font-size: 1.12rem; color: #d7e4f3; }
main > section:not(.hero),
.site-footer { position: relative; z-index: 2; }
main > section:not(.hero) { background: var(--white); }

.portfolio-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.tab-btn {
  border: 1px solid #d5deea;
  background: var(--white);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  font-family: var(--font-display);
  cursor: pointer;
}
.tab-btn.active {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.portfolio-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: linear-gradient(135deg, #0b3dcc 0%, #1a6ef5 55%, #4d94ff 100%);
  color: var(--white);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
}
.portfolio-banner h2 {
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  margin-bottom: 8px;
}
.portfolio-banner p { color: #e8f1ff; max-width: 640px; }
.portfolio-banner .link-text {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.portfolio-form-wrap {
  display: none;
  background: var(--paper);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 28px;
  border: 1px solid rgba(5, 13, 24, 0.06);
}
.portfolio-form-wrap.open { display: block; }
.portfolio-form-wrap h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}
.portfolio-form-wrap .form-intro {
  color: var(--muted);
  margin-bottom: 20px;
}
.portfolio-form {
  display: grid;
  gap: 14px;
}
.portfolio-form .grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.portfolio-form label { display: grid; gap: 8px; font-weight: 700; }
.field-label {
  display: block;
  font-weight: 700;
  margin-bottom: 10px;
}
.field-hint {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
}
.custom-file-field {
  display: grid;
  gap: 8px;
}
.custom-file-label {
  font-weight: 700;
  color: var(--ink);
}
.custom-file-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none;
}
.custom-file-panel {
  border: 1px solid #d5deea;
  border-radius: 14px;
  background: #f8fbff;
  padding: 12px 14px;
  display: grid;
  gap: 6px;
}
.custom-file-panel.is-loaded {
  background: rgba(10, 122, 62, 0.06);
  border-color: rgba(10, 122, 62, 0.22);
}
.loaded-file-name {
  color: var(--ink);
  font-weight: 700;
  font-size: 0.95rem;
  word-break: break-word;
}
.custom-file-line {
  margin: 0;
  color: #0a7a3e;
  font-style: italic;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.45;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
}
.custom-file-panel:not(.is-loaded) .custom-file-line {
  color: var(--muted);
  font-style: normal;
}
.btn-upload-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(26, 110, 245, 0.4);
  background: var(--blue);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  font-style: normal;
  cursor: pointer;
  line-height: 1;
}
.btn-upload-inline:hover { background: var(--blue-deep); }
.portfolio-form input:not(.custom-file-input),
.portfolio-form select,
.portfolio-form textarea {
  width: 100%;
  border: 1px solid #d5deea;
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  background: var(--white);
}
.form-error { color: #b42318; font-weight: 700; }
.form-success {
  color: #0a7a3e;
  font-weight: 700;
  line-height: 1.5;
  padding: 12px 14px;
  background: rgba(10, 122, 62, 0.08);
  border-radius: 12px;
  border: 1px solid rgba(10, 122, 62, 0.2);
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-weight: 600;
}
.checkbox-row input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  flex-shrink: 0;
}
.warn-box {
  display: none;
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 122, 24, 0.1);
  border: 1px solid rgba(255, 122, 24, 0.35);
  color: #8a3b00;
  font-weight: 600;
}
.warn-box.open { display: block; }
.warn-box a { color: var(--blue); font-weight: 800; }

.experience-list { display: grid; gap: 14px; }
.experience-card {
  background: var(--white);
  border: 1px solid #d5deea;
  border-radius: 16px;
  padding: 16px;
  display: grid;
  gap: 12px;
}
.experience-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.experience-card-head strong { font-family: var(--font-display); }

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.portfolio-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid rgba(5, 13, 24, 0.08);
  box-shadow: 0 16px 36px rgba(5, 13, 24, 0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.portfolio-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 44px rgba(5, 13, 24, 0.12);
}
.card-top {
  display: flex;
  align-items: center;
  gap: 14px;
}
.portfolio-avatar,
.business-logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
  background: #e8eef7;
  flex-shrink: 0;
}
.portfolio-avatar.placeholder,
.business-logo.placeholder {
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--blue);
}
.portfolio-card h3 { font-size: 1.35rem; margin: 0; }
.portfolio-card .meta {
  color: var(--muted);
  font-size: 0.95rem;
}
.portfolio-card .meta.accent,
.meta.accent { color: var(--blue); font-weight: 700; }
.portfolio-card .badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.badge-open { background: rgba(26, 110, 245, 0.12); color: var(--blue); }
.badge-closed { background: rgba(91, 107, 128, 0.14); color: var(--muted); }
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.service-tag {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 122, 24, 0.12);
  color: #b85a00;
  font-size: 0.82rem;
  font-weight: 700;
}
.exp-list {
  margin: 0;
  padding-left: 18px;
  color: var(--ink);
}
.exp-list li { margin-bottom: 6px; }
.exp-list span { color: var(--muted); }
.portfolio-card .motivation,
.portfolio-card .about {
  color: var(--ink);
  white-space: pre-wrap;
  line-height: 1.55;
}
.motivation-block { margin-top: 4px; }
.motivation.is-clamped {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  white-space: normal;
}
.view-more-link {
  display: inline;
  margin-top: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.view-more-link:hover { text-decoration: underline; }
.hiring-note {
  flex: 1;
  min-width: 140px;
  color: #0a7a3e;
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.35;
}
.card-actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding-top: 8px;
}
.portfolio-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  background: var(--paper);
  border-radius: var(--radius);
  padding: 36px 24px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 13, 24, 0.62);
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}
.modal-backdrop.open { display: flex; }
.modal-card {
  width: min(520px, 100%);
  background: var(--white);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}
.modal-card-wide { width: min(640px, 100%); }
.modal-card h3 { margin-bottom: 12px; font-size: 1.5rem; }
.modal-card > p { color: var(--muted); margin-bottom: 12px; }
.apply-portfolio-nudge {
  color: var(--ink) !important;
  background: rgba(26, 110, 245, 0.08);
  border: 1px solid rgba(26, 110, 245, 0.2);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 16px !important;
  font-weight: 600;
  line-height: 1.5;
}
.modal-card .btn { margin-top: 0; }
.modal-card .form-actions { margin-top: 8px; }

.site-footer { background: var(--navy); color: #c9d8ea; padding-top: 56px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 0.8fr 1fr; gap: 32px; padding-bottom: 36px; }
.footer-grid p { margin-top: 14px; }
.footer-grid h4 { color: var(--white); margin-bottom: 12px; }
.footer-grid a { display: block; margin-bottom: 8px; }
.footer-tag { margin-top: 18px; color: #8cb6ff; font-weight: 700; }
.footer-base { border-top: 1px solid var(--line); padding: 18px 0; text-align: center; }

@media (max-width: 980px) {
  .portfolio-grid,
  .portfolio-form .grid-2,
  .footer-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: var(--header);
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    padding: 16px 20px 24px;
  }
  .site-nav.open { display: flex; }
  .hero-mark img { width: 72px; height: 72px; }
  .hero-mark p { font-size: clamp(1.8rem, 10vw, 2.8rem); }
  .hero h1 { font-size: clamp(1.5rem, 7vw, 2.2rem); }
  .card-top { align-items: flex-start; }
}
