:root {
  /* 래퍼런스(Daniel Reyes 포트폴리오)의 구조를 그대로 따르되, 밝고 신뢰감 있는(안전·공공기관) 톤으로 재배색 */
  --background: #ffffff;
  --foreground: #16202e;
  --card: #f4f7fb;
  --muted: #5b6472;
  --border: #e3e8ef;
  --accent: #0b5fff;      /* wood-tone 자리를 대신하는 안전 블루 */
  --accent-2: #ffb800;    /* 포인트 옐로우(도로 표지 느낌) */
  --accent-foreground: #ffffff;
  --radius: 4px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; scroll-behavior: smooth; }
body {
  background: var(--background);
  color: var(--foreground);
  font-family: "Inter", "Pretendard", "Malgun Gothic", sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
p { color: var(--muted); line-height: 1.7; }
h1, h2, h3 { font-family: "Playfair Display", Georgia, serif; font-weight: 700; margin: 0; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* concrete texture -> 은은한 그리드 텍스처로 대체 */
.section {
  padding: 96px 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(11,95,255,0.015) 2px, rgba(11,95,255,0.015) 4px);
}
.section-alt { background-color: var(--card); }

.divider {
  height: 2px;
  width: 90px;
  background: linear-gradient(to right, var(--accent), var(--accent-2));
  margin: 20px 0 44px;
}
.wood-divider { height: 1px; background: linear-gradient(to right, transparent, var(--accent) 20%, var(--accent-2) 80%, transparent); margin: 0 auto; }

.section-head h2 { font-size: 2rem; line-height: 1.25; }
.section-head h2 span { display: block; font-size: 1.35rem; font-weight: 700; color: var(--accent); margin-top: 6px; font-family: "Inter", sans-serif; }

/* Header */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: flex; flex-shrink: 0; filter: drop-shadow(0 2px 6px rgba(11,95,255,0.35)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name { font-weight: 800; font-size: 1.1rem; font-family: "Playfair Display", serif; color: var(--foreground); }
.brand-sub { font-size: 0.68rem; font-weight: 700; color: var(--accent); letter-spacing: 0.02em; }
.main-nav { display: flex; gap: 32px; }
.main-nav a { font-size: 0.9rem; font-weight: 600; color: var(--foreground); }
.main-nav a:hover { color: var(--accent); }

/* Hero (풀스크린 이미지 + 좌측 정렬 텍스트, 래퍼런스 Hero.tsx 구조 그대로) */
.hero { position: relative; height: 100vh; min-height: 620px; overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-fallback {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
}
.hero-fallback::after {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 2px, transparent 2px 64px),
                     repeating-linear-gradient(0deg, rgba(255,255,255,0.05) 0 2px, transparent 2px 64px);
}
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(6,12,28,0.55), rgba(6,12,28,0.15) 60%); }
.hero-content { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center; max-width: 620px; }
.hero-kicker { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.hero-kicker span:last-child { color: var(--accent-2); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; }
.brand-mark-sm { filter: drop-shadow(0 2px 8px rgba(255,184,0,0.4)); }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); color: #fff; line-height: 1.2; margin-bottom: 24px; }
.hero-desc { color: rgba(255,255,255,0.88); font-size: 1.05rem; max-width: 460px; margin-bottom: 36px; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }
.cta-center { justify-content: center; }

.btn {
  display: inline-block; padding: 15px 26px; font-weight: 700; font-size: 0.92rem;
  border-radius: var(--radius); transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent-2); color: #16202e; }
.btn-outline { border: 1px solid rgba(255,255,255,0.7); color: #fff; }
.btn-outline-dark { border: 1px solid var(--accent); color: var(--accent); }

/* Project grid (호버시 메타 노출 카드, 래퍼런스 ProjectCard.tsx 그대로) */
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.project-card { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.project-thumb { aspect-ratio: 4/3; position: relative; background-size: cover; background-position: center; }
.project-hover {
  position: absolute; inset: 0; padding: 20px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 4px;
  background: linear-gradient(0deg, rgba(6,12,28,0.85), transparent 60%);
  opacity: 0; transition: opacity 0.25s ease;
}
.project-card:hover .project-hover { opacity: 1; }
.project-hover .p-cat { color: var(--accent-2); font-weight: 700; font-size: 0.82rem; margin: 0; }
.project-hover .p-loc, .project-hover .p-type, .project-hover .p-year { color: #fff; font-size: 0.78rem; margin: 0; opacity: 0.85; }
.project-body { padding: 22px; }
.project-body h3 { font-size: 1.1rem; margin-bottom: 8px; }
.project-body p { font-size: 0.9rem; margin: 0; }

/* Recognition/Process grid */
.recognition-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.reco-item { border-left: 2px solid var(--accent); padding: 6px 0 6px 20px; }
.reco-item h3 { font-family: "Inter", sans-serif; font-size: 1rem; font-weight: 700; margin-bottom: 8px; color: var(--foreground); }
.reco-item p { font-size: 0.88rem; margin: 0; }

/* About */
.about-inner { max-width: 960px; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.about-grid > p { font-size: 1.02rem; }
.about-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.about-points li { font-size: 0.92rem; color: var(--muted); border-bottom: 1px solid var(--border); padding-bottom: 14px; }
.about-points strong { display: block; color: var(--foreground); font-size: 0.98rem; margin-bottom: 4px; }

/* CTA section */
.section-cta { text-align: center; background-color: var(--foreground); background-size: cover; background-position: center; position: relative; }
.section-cta::before { content: ""; position: absolute; inset: 0; background: rgba(16,24,38,0.72); }
.section-cta .container { position: relative; z-index: 1; }
.section-photo { width: 100%; aspect-ratio: 16/7; object-fit: cover; border-radius: var(--radius); margin-bottom: 40px; }
.section-cta h2 { color: #fff; font-size: 1.9rem; }
.section-cta h2 span { color: var(--accent-2); font-family: "Inter", sans-serif; font-size: 1.15rem; display: block; margin-top: 10px; }
.section-cta p { color: rgba(255,255,255,0.75); max-width: 480px; margin: 20px auto 32px; }
.section-cta .btn-outline-dark { border-color: rgba(255,255,255,0.5); color: #fff; }

/* Footer */
.site-footer { background: var(--foreground); color: #a9b3c1; padding-top: 56px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-bottom: 36px; }
.site-footer h3 { color: #fff; font-size: 1.1rem; }
.site-footer h4 { color: #fff; font-family: "Inter", sans-serif; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px; }
.site-footer p { color: #8b95a6; font-size: 0.88rem; margin: 0 0 6px; }
.site-footer a:hover { color: var(--accent-2); }
.footer-bottom { padding: 18px 0; font-size: 0.8rem; color: #64708a; text-align: center; }

/* Hero word-stagger headline */
.reveal-h1 { font-family: "Playfair Display", Georgia, serif; font-size: clamp(2.2rem, 5vw, 3.6rem); color: #fff; line-height: 1.2; margin-bottom: 24px; }
.reveal-h1 span { display: inline-block; opacity: 0; transform: translateY(100%); animation: wordUp .7s cubic-bezier(.23,1,.32,1) forwards; animation-delay: calc(var(--i) * .1s + .1s); }
@keyframes wordUp { to { opacity: 1; transform: translateY(0); } }

/* Stats strip */
.stats-strip { background: var(--foreground); padding: 44px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat-num { font-family: "Playfair Display", serif; font-size: 2.2rem; font-weight: 800; color: var(--accent-2); }
.stat-suf { font-family: "Playfair Display", serif; font-size: 2.2rem; font-weight: 800; color: var(--accent-2); margin-left: 2px; }
.stat p { color: rgba(255,255,255,0.7); font-size: 0.85rem; margin: 6px 0 0; }

/* Before/After slider */
.ba-block { margin-top: 56px; }
.ba-block h3 { font-family: "Inter", sans-serif; font-size: 1.05rem; font-weight: 700; margin-bottom: 16px; color: var(--foreground); }
.ba-auto { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.ba-after, .ba-before { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 16px; background-size: cover; background-position: center; }
.ba-before { clip-path: inset(0 0 0 0); animation: baWipe 6s cubic-bezier(.65,0,.35,1) infinite; }
.ba-after span, .ba-before span { background: rgba(0,0,0,0.55); color: #fff; font-size: 0.72rem; font-weight: 700; padding: 4px 10px; border-radius: 3px; letter-spacing: 0.05em; }

@keyframes baWipe {
  0%   { clip-path: inset(0 0 0 0); }
  42%  { clip-path: inset(0 100% 0 0); }
  50%  { clip-path: inset(0 100% 0 0); }
  92%  { clip-path: inset(0 0 0 0); }
  100% { clip-path: inset(0 0 0 0); }
}
@media (prefers-reduced-motion: reduce) {
  .ba-before { animation: none; clip-path: inset(0 50% 0 0); }
}

/* Project card click affordance */
.project-card[data-case] { cursor: pointer; }

/* Case detail modal */
.case-modal { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; padding: 24px; }
.case-modal.open { display: flex; }
.case-modal-backdrop { position: absolute; inset: 0; background: rgba(10,15,25,0.7); }
.case-modal-panel {
  position: relative; background: #fff; max-width: 720px; width: 100%; max-height: 88vh;
  overflow-y: auto; border-radius: var(--radius); animation: modalUp .3s cubic-bezier(.23,1,.32,1);
}
@keyframes modalUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
.case-modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 2; width: 34px; height: 34px; border-radius: 50%;
  border: none; background: rgba(255,255,255,0.9); color: var(--foreground); font-size: 1rem; cursor: pointer;
}
.case-modal-thumb { aspect-ratio: 16/8; background-size: cover; background-position: center; background-color: var(--card); }
.case-modal-body { padding: 28px 32px 36px; }
.case-modal-tag { color: var(--accent); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; margin: 0 0 6px; }
.case-modal-body h3 { font-size: 1.4rem; margin-bottom: 8px; }
.case-modal-meta { font-size: 0.82rem; color: var(--muted); margin-bottom: 18px; }
.case-modal-summary { font-size: 0.95rem; margin-bottom: 26px; }
.case-modal-body h4 { font-family: "Inter", sans-serif; font-size: 0.9rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--foreground); margin-bottom: 14px; }
.case-modal-steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 20px; }
.case-modal-steps li { counter-increment: step; padding-left: 40px; position: relative; font-size: 0.9rem; color: var(--muted); }
.case-modal-steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 0.75rem; font-weight: 700; display: flex; align-items: center; justify-content: center; z-index: 1;
}
.case-step-photo { width: 100%; aspect-ratio: 16/9; background-size: cover; background-position: center; border-radius: var(--radius); margin-bottom: 10px; background-color: var(--card); }
.case-modal-steps li p { margin: 0; }

/* Sticky floating CTA buttons */
.sticky-cta {
  position: fixed; right: 24px; z-index: 60;
  display: flex; align-items: center; gap: 10px;
  padding: 13px 18px; border-radius: 999px; color: #fff;
  box-shadow: 0 10px 28px rgba(0,0,0,0.22);
  transition: transform .2s cubic-bezier(.23,1,.32,1), box-shadow .2s ease;
}
.sticky-cta:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(0,0,0,0.28); }
.sticky-cta-text { font-size: 0.72rem; line-height: 1.35; white-space: nowrap; }
.sticky-cta-text b { font-size: 0.85rem; }

.sticky-cta-call { bottom: 24px; background: linear-gradient(135deg, var(--accent), var(--accent) 60%, #0a3fb0); animation: ctaPulse 2.4s ease-in-out infinite; }
.sticky-cta-icon-call { font-size: 1.15rem; }
@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 10px 28px rgba(11,95,255,0.25), 0 0 0 0 rgba(11,95,255,0.35); }
  50% { box-shadow: 0 10px 28px rgba(11,95,255,0.25), 0 0 0 10px rgba(11,95,255,0); }
}
@media (prefers-reduced-motion: reduce) { .sticky-cta-call { animation: none; } }

.sticky-cta-blog { bottom: 92px; background: #03c75a; }
.sticky-cta-blog:hover { background: #02b350; }
.sticky-cta-icon-blog {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  background: #03c75a; border: 2px solid #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 1px #03c75a;
}

@media (max-width: 640px) {
  .sticky-cta { right: 14px; padding: 11px 14px; }
  .sticky-cta-call { bottom: 14px; }
  .sticky-cta-blog { bottom: 70px; }
  .sticky-cta-text { display: none; }
}

/* ===== Animations ===== */
.hero-fallback { animation: heroZoom 6s ease-out forwards; }
@keyframes heroZoom { from { transform: scale(1.12); } to { transform: scale(1); } }

.hero-anim { opacity: 0; transform: translateY(22px); animation: fadeUp .8s cubic-bezier(.23,1,.32,1) forwards; animation-delay: var(--delay, 0s); }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

.scroll-cue { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 2; }
.scroll-cue span { display: block; width: 22px; height: 34px; border: 2px solid rgba(255,255,255,0.7); border-radius: 12px; position: relative; }
.scroll-cue span::before { content: ""; position: absolute; top: 6px; left: 50%; width: 4px; height: 8px; background: var(--accent-2); border-radius: 2px; transform: translateX(-50%); animation: scrollDot 1.6s ease-in-out infinite; }
@keyframes scrollDot { 0% { opacity: 1; top: 6px; } 60% { opacity: 0; top: 18px; } 100% { opacity: 0; top: 18px; } }

[data-animate] { opacity: 0; transform: translateY(28px); transition: opacity .7s cubic-bezier(.23,1,.32,1) var(--d,0s), transform .7s cubic-bezier(.23,1,.32,1) var(--d,0s); }
[data-animate].in-view { opacity: 1; transform: translateY(0); }

.project-thumb { transition: transform .4s cubic-bezier(.23,1,.32,1); }
.project-card:hover .project-thumb { transform: scale(1.04); }
.project-card { transition: box-shadow .3s ease; }
.project-card:hover { box-shadow: 0 18px 40px rgba(11,95,255,0.12); }

.btn, .brand-mark, .reco-item { transition: transform .2s cubic-bezier(.23,1,.32,1), box-shadow .2s ease, border-color .2s ease; }
.reco-item:hover { transform: translateX(4px); border-color: var(--accent-2); }

@media (prefers-reduced-motion: reduce) {
  .hero-fallback, .hero-anim, .scroll-cue span::before, [data-animate] { animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important; }
}

@media (max-width: 860px) {
  .main-nav { display: none; }
  .project-grid { grid-template-columns: 1fr; }
  .recognition-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { min-height: 560px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 64px 0; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .header-inner { height: 64px; }
  .brand-mark svg { width: 28px; height: 28px; }
  .brand-name { font-size: 0.95rem; }

  .hero { min-height: 100svh; }
  .hero-kicker { gap: 8px; margin-bottom: 18px; }
  .hero-kicker span:last-child { font-size: 0.7rem; letter-spacing: 0.04em; }
  .reveal-h1, .hero h1 { font-size: 1.9rem; margin-bottom: 16px; }
  .hero-desc { font-size: 0.92rem; margin-bottom: 26px; }
  .hero-cta { gap: 10px; }
  .hero-cta .btn { flex: 1 1 100%; text-align: center; font-size: 0.85rem; padding: 13px 18px; }

  .section { padding: 48px 0; }
  .section-head h2 { font-size: 1.5rem; }
  .section-head h2 span { font-size: 1.05rem; }
  .divider { margin: 14px 0 28px; }

  .stats-grid { gap: 14px; }
  .stat-num, .stat-suf { font-size: 1.5rem; }
  .stat p { font-size: 0.75rem; }

  .about-grid { gap: 28px; }
  .about-grid > p { font-size: 0.92rem; }

  .ba-block h3 { font-size: 0.92rem; }
  .ba-after span, .ba-before span { font-size: 0.65rem; padding: 3px 8px; }

  .section-cta h2 { font-size: 1.4rem; }
  .section-cta h2 span { font-size: 0.95rem; }
  .section-cta .hero-cta .btn { flex: 1 1 100%; }

  .case-modal { padding: 0; }
  .case-modal-panel { max-height: 100vh; height: 100%; border-radius: 0; }
  .case-modal-body { padding: 20px 18px 32px; }
  .case-modal-body h3 { font-size: 1.15rem; }
  .case-modal-summary { font-size: 0.88rem; }

  .footer-grid { gap: 24px; padding-bottom: 24px; }
  .site-footer p, .site-footer a { word-break: keep-all; }
}
