/* ==========================================================================
   YUIN LABS — Portfolio
   Color System:
   --bg:        #111111
   --surface:   #18181B
   --border:    #27272A
   --text:      #F4F4F5
   --muted:     #A1A1AA
   --subtle:    #71717A
   --accent:    #FF5500
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-radius: 0 !important;
}

:root {
  --bg:       #111111;
  --surface:  #18181B;
  --border:   #27272A;
  --text:     #F4F4F5;
  --muted:    #A1A1AA;
  --subtle:   #71717A;
  --accent:   #FF5500;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --sans: 'Space Grotesk', system-ui, sans-serif;
}

html {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  min-height: 100vh;
}

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

/* ---- WRAPPER ---- */
.site-wrapper {
  max-width: 1160px;
  margin: 0 auto;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

/* ---- HEADER ---- */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 56px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Brand logo */
.brand-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-logo-img {
  height: 28px;
  width: auto;
  display: block;
  /* Slight brightness bump so it reads cleanly on the dark header */
  filter: brightness(1.05);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 3px 10px;
}

.status-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  flex-shrink: 0;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.header-nav a {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
  letter-spacing: 0.02em;
  transition: color 0.15s;
}

.header-nav a:hover { color: var(--text); }

/* ---- HERO ---- */
.hero {
  border-bottom: 1px solid var(--border);
  padding: 72px 32px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 352px;
  gap: 64px;
  align-items: center;
}

.hero-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 20px;
  letter-spacing: 0.04em;
}

.hero-headline {
  font-family: var(--sans);
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.18;
  color: var(--text);
  margin-bottom: 20px;
}

.hero-bio {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.65;
  max-width: 540px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-portrait {
  width: 100%;
  aspect-ratio: 1;
  align-self: center;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--surface);
}

.hero-portrait img,
.hero-portrait .hero-illustration {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.hero-portrait img:not(.hero-illustration) {
  filter: grayscale(80%) contrast(110%);
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 10px 20px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #111;
  border-color: var(--accent);
}
.btn-primary:hover { background: #e04b00; border-color: #e04b00; }

.btn-outline {
  background: transparent;
  color: var(--muted);
  border-color: var(--border);
}
.btn-outline:hover { color: var(--text); border-color: var(--muted); }

.btn.small { padding: 6px 14px; font-size: 0.75rem; }

/* ---- SECTIONS ---- */
.section {
  padding: 64px 32px;
  border-bottom: 1px solid var(--border);
}

.section-label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  font-weight: 700;
}

.section-title {
  font-family: var(--sans);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 10px;
}

.section-sub {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 36px;
  max-width: 600px;
}

/* ---- WORK TABLE ---- */
.work-table {
  border: 1px solid var(--border);
}

.work-table-head {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1.8fr 1.4fr 44px;
  padding: 10px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--subtle);
  letter-spacing: 0.06em;
  font-weight: 600;
  text-transform: uppercase;
}

.work-row { border-bottom: 1px solid var(--border); }
.work-row:last-child { border-bottom: none; }

.work-row-main {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1.8fr 1.4fr 44px;
  align-items: center;
  padding: 20px;
  gap: 0 12px;
  cursor: pointer;
  transition: background 0.15s;
}

.work-row-main:hover { background: var(--surface); }

.work-title {
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.work-client {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.work-stack {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.work-impact {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.expand-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 1rem;
  line-height: 1;
  width: 28px;
  height: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.expand-btn:hover, .expand-btn[aria-expanded="true"] {
  color: var(--accent);
  border-color: var(--accent);
}

.work-detail {
  display: none;
  padding: 20px 20px 24px;
  border-top: 1px solid var(--border);
  background: #0f0f11;
}

.work-detail.open { display: block; }

.work-detail p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 14px;
}

.work-detail ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.work-detail ul li {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--subtle);
  padding-left: 16px;
  position: relative;
  line-height: 1.5;
}

.work-detail ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ---- WORK LINKS (GitHub + Loom) ---- */
.work-links {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.work-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.work-link:hover {
  color: var(--text);
  border-color: var(--muted);
}

.work-link-github:hover {
  color: var(--text);
  border-color: var(--muted);
}

.work-link-loom:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---- SERVICES TABLE ---- */
.services-table {
  border: 1px solid var(--border);
}

.service-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 28px 24px;
  border-bottom: 1px solid var(--border);
  gap: 32px;
  transition: background 0.15s;
}
.service-row:last-child { border-bottom: none; }
.service-row:hover { background: var(--surface); }

.service-left {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  flex: 1;
}

.service-num {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--subtle);
  font-weight: 700;
  padding-top: 2px;
  flex-shrink: 0;
}

.service-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.service-name {
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}

.service-desc {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
  max-width: 520px;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.service-tags span {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--subtle);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 2px 8px;
}

.service-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.service-price {
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.service-scope {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--subtle);
  margin-bottom: 8px;
}

/* ---- CONTACT ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
}

.inquiry-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.875rem;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
}

.field input::placeholder,
.field textarea::placeholder { color: var(--subtle); }

.field select { cursor: pointer; }
.field select option { background: var(--bg); color: var(--text); }

.field textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.55;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.form-feedback {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
}

/* Contact Links */
.contact-links {
  border: 1px solid var(--border);
  overflow: hidden;
}

.contact-link-item {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-link-item:last-child { border-bottom: none; }

.contact-link-label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--subtle);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.contact-link-value {
  font-size: 0.9375rem;
  color: var(--text);
  font-weight: 500;
  transition: color 0.15s;
}

a.contact-link-value:hover { color: var(--accent); }

.engagement-rules {
  padding: 20px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.engagement-rules p {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 6px;
}

.engagement-rules p:last-child { margin-bottom: 0; }

.engagement-rules strong {
  color: var(--text);
  font-weight: 600;
}

/* ---- FOOTER ---- */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 32px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--subtle);
  border-top: 1px solid var(--border);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .header { padding: 0 20px; }
  .header-nav { gap: 20px; }

  .hero { padding: 48px 20px; }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-portrait {
    width: min(100%, 352px);
    justify-self: center;
  }
  .hero-headline { font-size: 1.75rem; }

  .section { padding: 48px 20px; }

  .work-table-head { display: none; }
  .work-row-main {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto;
    gap: 4px;
    padding: 16px;
  }
  .work-title { grid-column: 1; }
  .expand-btn { grid-column: 2; grid-row: 1; }
  .work-client, .work-stack { grid-column: 1; }
  .work-impact { grid-column: 1; }
  .work-detail { padding: 16px; }

  .service-row { flex-direction: column; gap: 16px; }
  .service-right { flex-direction: row; align-items: center; }

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

  .footer { flex-direction: column; gap: 6px; align-items: flex-start; }
}

@media (max-width: 600px) {
  .header-nav a:not(:last-child) { display: none; }
  .hero-headline { font-size: 1.5rem; }
  .section-title { font-size: 1.375rem; }
}
