/* Portfolio design: quiet surfaces, editorial type and a single accent. */
:root {
  color-scheme: light;
  --paper: #f6f5f0;
  --ink: #202923;
  --muted: #667068;
  --line: #dcded5;
  --accent: #326352;
  --white: #fff;
}
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body.portfolio { margin: 0; background: var(--paper); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; line-height: 1.65; word-break: keep-all; overflow-wrap: anywhere; }
.portfolio *, .portfolio *::before, .portfolio *::after { box-sizing: border-box; }
.portfolio a { color: inherit; text-decoration: none; }
.portfolio button { font: inherit; cursor: pointer; }
.portfolio button, .portfolio a { -webkit-tap-highlight-color: transparent; }
.portfolio :focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
.portfolio ::selection { background: #d8e7cf; color: var(--ink); }
.page-width { width: min(1180px, calc(100% - 96px)); margin-inline: auto; }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 100; padding: 12px 20px; background: var(--white); }
.skip-link:focus { top: 12px; }
.site-header { position: sticky; top: 0; z-index: 30; height: 68px; background: rgb(246 245 240 / 96%); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
.header-inner { width: min(1180px, calc(100% - 96px)); height: 100%; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-size: 19px; font-weight: 750; letter-spacing: -0.7px; flex-shrink: 0; }
.brand-mark { display: block; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; object-fit: cover; }
.brand-caption { font-size: 9px; letter-spacing: 1.8px; color: var(--muted); font-weight: 500; margin-left: 4px; }
.hero { padding-top: 90px; display: grid; grid-template-columns: 1.45fr 1fr; gap: 56px 80px; align-items: center; }
.eyebrow { margin: 0 0 22px; font-size: 10px; font-weight: 650; letter-spacing: 2px; line-height: 1.5; color: var(--accent); }
.status-dot { display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; background: var(--accent); vertical-align: 1px; }
.hero-copy, .profile-card { align-self: start; }
.hero h1 { margin: 0; font-size: clamp(38px, 4.5vw, 64px); line-height: 1.23; letter-spacing: -3.5px; font-weight: 750; }
.hero h1 > span { color: var(--accent); }
.hero-intro { margin: 30px 0 0; font-size: 16px; color: var(--muted); line-height: 1.95; }
.hero-intro strong { color: var(--ink); font-weight: 650; }
.about-details { margin-top: 18px; }
.about-details-copy { margin-top: 12px; padding: 20px 0 4px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.95; color: var(--muted); }
.about-details-copy p { margin: 0 0 18px; }
.about-details-copy p:last-child { margin-bottom: 0; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 26px; margin-top: 36px; }
.button { padding: 15px 22px; display: inline-flex; align-items: center; gap: 32px; font-size: 13px; font-weight: 600; border-radius: 4px; transition: background 180ms ease; }
.portfolio .button-dark { color: var(--paper); background: var(--ink); }
.portfolio .button-dark:hover { background: var(--accent); }
.text-link { font-size: 13px; border-bottom: 1px solid var(--line); padding: 7px 0; }
.text-link span { margin-left: 12px; }
.profile-card { width: 100%; max-width: 340px; justify-self: end; padding: 18px; border: 1px solid var(--line); background: #eceee6; border-radius: 6px; transform: rotate(2deg); }
.profile-topline { display: flex; justify-content: space-between; gap: 10px; font-size: 8px; letter-spacing: 1.5px; color: var(--muted); }
.portrait-wrap { margin: 24px 0; aspect-ratio: 812 / 1204; background: #d9dfd2; overflow: hidden; border-radius: 3px; }
.portrait-wrap img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.profile-name { display: flex; align-items: center; justify-content: space-between; }
.profile-name strong { display: block; font-size: 21px; letter-spacing: -0.8px; }
.profile-name div > span { display: block; font-size: 10px; color: var(--muted); margin-top: 2px; }
.profile-signature { font: italic 36px Georgia, serif; color: var(--accent); }
.profile-note { margin-top: 20px; padding-top: 16px; border-top: 1px solid #cdd2c5; display: flex; justify-content: space-between; gap: 20px; }
.profile-note > span { font-size: 8px; letter-spacing: 1.5px; color: var(--muted); }
.profile-note p { margin: 0; font-size: 10px; text-align: right; }
.hero-meta { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 12px; }
.hero-meta .expertise-strip { margin-top: 0; padding-block: 20px; }
.expertise-strip { grid-column: 1 / -1; display: flex; align-items: center; gap: 36px; padding: 30px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 16px; }
.expertise-strip p { margin: 0; color: var(--muted); font-size: 11px; flex-shrink: 0; }
.expertise-strip ul { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 30px; list-style: none; margin: 0; padding: 0; width: 100%; font-size: 14px; font-weight: 650; }
.section-block { padding-top: 110px; padding-bottom: 110px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 40px; }
.portfolio h2 { font-size: clamp(28px, 3vw, 40px); line-height: 1.35; letter-spacing: -1.8px; font-weight: 700; margin: 0; }
.accent-dot { color: var(--accent); }
.section-description { margin: 0 0 3px; color: var(--muted); font-size: 13px; line-height: 1.9; }
.work-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); padding-bottom: 20px; margin-bottom: 30px; }
.work-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.work-filters button { border: 1px solid transparent; background: transparent; color: var(--muted); padding: 7px 15px; border-radius: 30px; font-size: 12px; }
.work-filters button[aria-pressed='true'] { background: var(--ink); color: var(--white); }
.work-filters button:hover { border-color: var(--muted); }
.work-filters span { margin-left: 5px; opacity: 0.6; font-size: 10px; }
.work-count { font-size: 11px; color: var(--muted); margin: 0; white-space: nowrap; }
.work-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 38px 26px; }
.work-category-heading { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; margin: 4px 0 -10px; padding-top: 18px; border-top: 1px solid var(--ink); font-size: 15px; letter-spacing: -0.4px; }
.work-category-heading small { color: var(--muted); font-size: 9px; font-weight: 600; letter-spacing: 1.3px; }
.work-category-heading[hidden] { display: none; }
.work-card { min-width: 0; grid-column: span 2; }
.work-card[hidden] { display: none; }
.work-open { width: 100%; display: block; border: 0; padding: 0; background: transparent; text-align: left; color: var(--ink); }
.work-image { display: block; position: relative; overflow: hidden; aspect-ratio: 1.6; background: #e8ebe3; border-radius: 5px; border: 1px solid rgb(32 41 35 / 5%); padding: 22px; }
.work-card:nth-of-type(3n+2) .work-image { background: #e7e8e3; }
.work-card:nth-of-type(3n) .work-image { background: #e9e3d9; }
.work-image img { display: block; width: 100%; height: 100%; object-fit: contain; transition: transform 250ms ease; }
.work-arrow { position: absolute; display: grid; place-items: center; right: 12px; bottom: 12px; width: 34px; height: 34px; background: var(--white); color: var(--ink); border-radius: 50%; font-size: 19px; transition: background 180ms, color 180ms; }
.work-open:hover .work-image img { transform: scale(1.035); }
.work-open:hover .work-arrow { color: var(--white); background: var(--accent); }
.work-meta { display: flex; justify-content: space-between; gap: 10px; margin: 18px 0 8px; color: var(--muted); font-size: 9px; font-weight: 600; letter-spacing: 1px; }
.work-title { display: block; font-size: 21px; font-weight: 700; letter-spacing: -0.7px; }
.work-description { display: block; color: var(--muted); font-size: 12px; margin: 7px 0 12px; }
.work-tags { display: block; font-size: 10px; color: var(--accent); }
.career-section { padding: 90px 0; background: #eeefe9; border-block: 1px solid var(--line); }
.career-layout { display: grid; grid-template-columns: 1fr 1.65fr; gap: 70px; align-items: start; }
.career-intro { position: sticky; top: 130px; }
.career-intro > p:not(.eyebrow) { font-size: 13px; color: var(--muted); margin-top: 25px; line-height: 1.9; }
.career-small { font-size: 9px; letter-spacing: 1.2px; color: var(--muted); margin-top: 48px; }
.career-small strong { display: block; margin-top: 4px; font: 35px Georgia, serif; color: var(--accent); letter-spacing: -1px; }
.career-row { display: grid; grid-template-columns: 145px 1fr; gap: 25px; border-top: 1px solid #ced4c9; padding: 28px 0; }
.career-date { font-size: 10px; color: var(--muted); margin: 4px 0 0; }
.career-heading { display: flex; align-items: center; gap: 12px; }
.career-heading img { width: 36px; height: 36px; object-fit: contain; border-radius: 6px; }
.career-heading h3 { font-size: 17px; letter-spacing: -0.6px; font-weight: 650; margin: 0; }
.career-heading p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.career-body ul { list-style: none; padding: 0; margin: 20px 0 0; color: var(--muted); font-size: 12px; }
.career-body li { position: relative; padding-left: 12px; margin: 6px 0; }
.career-body li::before { content: ''; position: absolute; left: 0; top: 9px; width: 3px; height: 3px; background: var(--accent); }
.principles-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; }
.principle { border-top: 1px solid var(--ink); padding: 25px 0 0; }
.principle-number { font: italic 33px Georgia, serif; color: #849783; }
.principle h3 { font-size: 18px; margin: 28px 0 14px; letter-spacing: -0.6px; font-weight: 650; }
.principle p { font-size: 13px; line-height: 1.95; color: var(--muted); margin: 0; }
.principle-label { display: block; margin-top: 25px; font-size: 9px; letter-spacing: 1.3px; color: var(--accent); }
.credentials { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 16px 28px; padding: 16px 0; border-block: 1px solid var(--line); }
.credentials-heading { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.credentials .eyebrow { margin: 0; font-size: 9px; }
.credentials h2 { font-size: 14px; letter-spacing: -0.4px; }
.credentials a { display: inline-flex; align-items: center; gap: 12px; padding: 8px 0; font-size: 13px; font-weight: 600; }
.credentials a:hover { color: var(--accent); }
.credentials a > span { color: var(--muted); font-size: 14px; }
.contact-section { background: var(--ink); color: var(--paper); padding: 85px 0; }
.contact-inner { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 32px 60px; }
.contact-section .eyebrow { color: #aec6af; }
.contact-section h2 { font-size: clamp(32px, 3.4vw, 46px); }
.contact-section p:not(.eyebrow) { font-size: 12px; color: #b9c3b9; margin: 24px 0 0; }
.contact-email { justify-self: end; display: flex; gap: 30px; padding: 14px 0; border-bottom: 1px solid #637267; font-size: clamp(17px, 2vw, 26px); letter-spacing: -0.7px; }
.contact-links { grid-column: 1 / -1; display: flex; gap: 30px; font-size: 12px; color: #c5d0c4; }
.contact-links a:hover { color: var(--white); }
.site-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 25px; padding-block: 30px; font-size: 11px; color: var(--muted); }
.site-footer .brand { color: var(--ink); }
.dev-friends { width: 100%; display: flex; align-items: center; flex-wrap: wrap; gap: 16px 32px; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.dev-friends h2 { font-size: 16px; letter-spacing: -0.3px; color: var(--ink); }
.dev-friends-list { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.dev-friends-list a { display: inline-flex; align-items: center; gap: 20px; padding: 11px 16px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); font-size: 12px; }
.dev-friends-list a:hover { border-color: var(--accent); color: var(--accent); }
.friend-placeholder { padding: 11px 16px; color: var(--muted); font-size: 11px; }
/* One native dialog for all project details; background is inert while open. */
#project-dialog { width: min(590px, calc(100% - 40px)); max-width: none; max-height: calc(100dvh - 48px); padding: 0; margin: auto; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--paper); overflow-y: auto; overscroll-behavior: contain; box-shadow: 0 30px 100px rgb(0 0 0 / 25%); }
#project-dialog { scrollbar-width: none; }
#project-dialog::-webkit-scrollbar { display: none; }
#project-dialog::backdrop { background: rgb(20 30 24 / 65%); backdrop-filter: blur(4px); }
.dialog-header { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--paper); padding: 15px 25px; border-bottom: 1px solid var(--line); }
.dialog-header > span { font-size: 9px; letter-spacing: 1.5px; color: var(--accent); }
#close-project { display: flex; align-items: center; gap: 15px; font-size: 12px; padding: 7px 10px; background: transparent; border: 0; color: var(--ink); }
#close-project span { font-size: 24px; line-height: 1; }
#dialog-content { padding: 8px 10px 25px; }
.project-detail-content > div { padding: 24px; }
.project-detail-content h3 { color: var(--ink); font-size: 26px; letter-spacing: -1px; line-height: 1.4; }
.project-detail-content [class*='text-'] { color: var(--ink); }
.project-detail-content p { color: var(--muted); font-size: 14px; line-height: 1.9; }
.project-detail-content [class*='bg-'] { background: #e6ebe0; }
.project-detail-content a { border-color: var(--line); transform: none; box-shadow: none; }
.project-detail-content a:hover { border-color: var(--accent); }
.project-detail-content img { max-width: 100%; max-height: 340px; object-fit: contain; }
.project-detail-content .text-base { font-size: 14px; }
.project-detail-content .flex-wrap > span { font-size: 11px; color: var(--accent); background: #e6ebe0; }
@media (min-width: 1600px) { .hero { padding-top: 110px; } }
@media (max-width: 1050px) {
  .page-width { width: calc(100% - 64px); }
  .header-inner { width: calc(100% - 64px); gap: 20px; }
  .brand-caption { display: none; }
  .hero { gap: 45px; padding-top: 65px; }
  .hero h1 { letter-spacing: -2.5px; }
  .career-layout { grid-template-columns: 1fr 1.7fr; gap: 35px; }
  .career-row { grid-template-columns: 1fr; gap: 12px; }
  .section-description { max-width: 230px; }
  .work-card { grid-column: span 3; }
}
@media (max-width: 700px) {
  html { scroll-padding-top: 80px; }
  .page-width { width: calc(100% - 40px); }
  .header-inner { width: calc(100% - 40px); }
  .brand { font-size: 17px; gap: 8px; }
  .brand-mark { width: 34px; height: 34px; }
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 50px; }
  .hero h1 { font-size: clamp(35px, 8.5vw, 52px); letter-spacing: -2px; }
  .eyebrow { font-size: 9px; letter-spacing: 1.5px; margin-bottom: 20px; }
  .hero-intro { font-size: 14px; margin-top: 23px; }
  .hero-actions { margin-top: 28px; gap: 23px; }
  .button { padding: 13px 17px; font-size: 12px; gap: 18px; }
  .text-link { font-size: 12px; }
  .profile-card { max-width: 300px; width: calc(100% - 14px); justify-self: center; transform: rotate(1deg); }
  .expertise-strip { gap: 18px; align-items: start; flex-direction: column; margin-top: 0; padding-block: 24px; }
  .expertise-strip ul { justify-content: flex-start; gap: 14px 23px; font-size: 12px; }
  .section-block { padding-block: 65px; }
  .section-heading { display: block; margin-bottom: 26px; }
  .portfolio h2 { font-size: 28px; letter-spacing: -1.3px; }
  .section-description { margin-top: 17px; max-width: none; font-size: 12px; }
  .work-toolbar { gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
  .work-filters { gap: 2px; }
  .work-filters button { font-size: 11px; padding: 7px 11px; }
  .work-count { font-size: 10px; }
  .work-grid { grid-template-columns: 1fr; gap: 32px; }
  .work-card { grid-column: auto; }
  .work-title { font-size: 20px; }
  .work-image { padding: 24px; }
  .career-section { padding-block: 65px; }
  .career-layout { grid-template-columns: 1fr; gap: 35px; }
  .career-intro { position: static; }
  .career-small { margin-top: 25px; }
  .career-row { grid-template-columns: 1fr; padding-block: 25px; }
  .career-body ul { margin-top: 16px; }
  .principles-grid { grid-template-columns: 1fr; gap: 32px; }
  .principle { padding-top: 20px; }
  .principle h3 { margin-top: 18px; }
  .principle-label { margin-top: 20px; }
  .credentials { gap: 8px 24px; padding: 14px 0; }
  .credentials-heading { width: 100%; }
  .credentials a { font-size: 12px; }
  .contact-section { padding-block: 60px; }
  .contact-inner { grid-template-columns: 1fr; gap: 30px; }
  .contact-section h2 { font-size: 33px; }
  .contact-email { justify-self: start; font-size: 22px; gap: 20px; }
  .contact-links { gap: 26px; }
  .site-footer { gap: 20px; padding-block: 25px; }
  #project-dialog { width: calc(100% - 20px); max-height: calc(100dvh - 24px); border-radius: 8px; }
  .dialog-header { padding: 12px 15px; }
  #dialog-content { padding: 0 0 18px; }
  .project-detail-content > div { padding: 18px; }
  .project-detail-content h3 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .portfolio *, .portfolio *::before, .portfolio *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 767px) {
  html { scroll-padding-top: 80px; }
  .site-header { height: 64px; }
  .brand { font-size: 17px; gap: 8px; }
  .brand-mark { width: 34px; height: 34px; }
}

.project-detail-content .detail-project-link { align-self: flex-start; color: var(--accent); font-size: 12px; text-decoration: underline; text-underline-offset: 4px; }
