/* Quirks Mode 완전 차단 - 서버 호환성 최대 강화 */
* {
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    font-size: 100%;
    vertical-align: baseline;
    background: transparent;
    box-sizing: border-box;
}

/* 초소형 화면 보완 (예: 360px 이하) */
@media (max-width: 360px) {
    .hero-content h1 { font-size: 1.8rem; line-height: 1.25; }
    .hero-content h2 { font-size: 1rem; }
}

/* DAC 프로젝트 전용 갤러리 사이즈 조정 (스크롤 없이 정보 확인 용이) */
.dac-gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dac-gallery img {
  max-width: 100%;
  height: auto;
  /* 화면 높이에 따라 유연하게 제한: 40vh 또는 260px 중 더 작은 값 */
  max-height: min(40vh, 260px);
}

@media (max-width: 768px) {
  .dac-gallery img {
    max-height: min(35vh, 220px);
  }
}

/* 모든 요소 표준화 */
*, *::before, *::after {
    box-sizing: border-box;
}

/* HTML5 표준 모드 강제 */
html {
    display: block;
    width: 100%;
    height: 100%;
    font-size: 16px;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Body 표준화 */
body {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    font-size: 100%;
    vertical-align: baseline;
    background: transparent;
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* 추가 브라우저 호환성 */
html, body {
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 네비게이션 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    font-size: 1.8rem;
    font-weight: 800;
    font-family: 'Noto Sans KR', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    letter-spacing: 0.2px;
    color: #0c4a6e; /* 더 진한 블루 톤으로 한 단계 어둡게 */
}

/* 호버 시 살짝 진하게 */
.nav-logo:hover { color: #082f49; }

/* 네비게이션 로고 이미지 */
.nav-logo-img {
    width: 28px;
    height: 28px;
    margin-right: 8px;
    border-radius: 6px;
    object-fit: cover;
    display: block;
}

/* 모바일에서 nav-logo 폰트 사이즈 줄이기 */
@media (max-width: 768px) {
    .nav-logo {
        font-size: 1.4rem !important;
    }
}

/* 더 작은 모바일 화면에서 추가 조정 */
@media (max-width: 480px) {
    .nav-logo {
        font-size: 1.25rem !important;
    }
}

.nav-logo i {
    margin-right: 10px;
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a:hover {
    color: #2563eb;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #2563eb;
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer !important;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* 메인 섹션 */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    background: var(--hero-bg, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    position: relative;
    overflow: hidden;
    /* 고정 네비게이션바(약 70px) + 안전영역 보정 */
    padding-top: calc(90px + env(safe-area-inset-top, 0px));
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: clamp(1.6rem, 6vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 2rem;
    line-height: 1.2;
    /* 글로벌 래핑 보장 */
    overflow-wrap: anywhere;
    word-break: normal;
    max-width: 100%;
    display: block;
}

.hero-content h1 { 
    color: var(--hero-title-color, #fff); 
}

.hero-content h2 {
    font-size: clamp(1rem, 3.8vw, 1.5rem);
    font-weight: 600;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    /* 글로벌 래핑 보장 */
    overflow-wrap: anywhere;
    word-break: normal;
    max-width: 100%;
    display: block;
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.8;
    line-height: 1.8;
}

/* 모바일에서 hero-content 위쪽 마진 추가 - 스크롤 시에도 유지 */
@media (max-width: 768px) {
    .hero-content {
        margin-top: 2rem !important;
        padding-top: 0.5rem !important;
        min-height: auto !important;
    }
}

/* 더 작은 모바일 화면에서 추가 마진 */
@media (max-width: 480px) {
    .hero-content {
        margin-top: 2.5rem !important;
        padding-top: 0.5rem !important;
        min-height: auto !important;
    }
}

/* 모든 모바일 화면에서 강제 적용 */
@media screen and (max-width: 768px) {
    .hero-content {
        margin-top: 2rem !important;
        padding-top: 0.5rem !important;
        min-height: auto !important;
    }
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    border: 2px solid transparent;
}

.btn-primary {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.btn-primary:hover {
    background: transparent;
    color: #2563eb;
    border-color: #2563eb;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: white;
    border-color: white;
}

.btn-secondary:hover {
    background: white;
    color: #2563eb;
    transform: translateY(-2px);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.tech-icons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    font-size: 4rem;
    opacity: 0.8;
}

.tech-icons i {
    display: inline-block;
    animation: float 3s ease-in-out infinite;
    will-change: transform;
}

.tech-icons i:nth-child(2) {
    animation-delay: 0.5s;
}

.tech-icons i:nth-child(3) {
    animation-delay: 1s;
}

.tech-icons i:nth-child(4) {
    animation-delay: 1.5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* 서비스 섹션 */
.services {
    padding: 100px 0;
    background: #f8fafc;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: #1e293b;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.service-icon i {
    font-size: 2rem;
    color: white;
}

.service-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1e293b;
}

.service-card p {
    color: #64748b;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.service-card ul {
    list-style: none;
}

.service-card li {
    padding: 0.5rem 0;
    color: #475569;
    position: relative;
    padding-left: 1.5rem;
}

.service-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #2563eb;
    font-weight: bold;
}

/* 포트폴리오 섹션 */
.portfolio {
    padding: 100px 0;
    background: white;
}

/* 포트폴리오 섹션 차별화 */
.portfolio .section-title {
	color: #1e293b; /* 검은색으로 통일 */
}

.portfolio .service-card {
	border-top: 4px solid #4f46e5; /* darker indigo */
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio .service-card:hover {
	transform: translateY(-12px);
	box-shadow: 0 28px 60px rgba(79, 70, 229, 0.35);
}

.portfolio .service-icon {
	background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

/* 포트폴리오 카드/타임라인 제목 강조 */
.portfolio .service-card h3 {
    color: #3730a3; /* indigo-800 */
}

.portfolio .timeline-content h3 {
    color: #3730a3;
}

.experience-timeline {
    margin-bottom: 4rem;
}

.timeline-item {
    display: flex;
    align-items: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: #f8fafc;
    border-radius: 15px;
    border-left: 4px solid #2563eb;
}

.timeline-year {
    font-size: 2rem;
    font-weight: 700;
    color: #2563eb;
    margin-right: 2rem;
    min-width: 100px;
}

.timeline-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.timeline-content p {
    color: #64748b;
}

.skills-section h3 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: center;
    color: #1e293b;
}

/* 기술 스택 메인 타이틀 강조 */
.skills-section > h3 {
    color: #065f46; /* emerald-800 */
}

/* 기술 스택 섹션 차별화 */
.skills-section {
	background: linear-gradient(180deg, #eef2f7 0%, #e2e8f0 100%);
	padding: 2rem;
	border-radius: 16px;
	border: 1px solid #cbd5e1;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-category {
    text-align: center;
    padding: 2rem;
    background: #f8fafc;
    border-radius: 15px;
    border: 1px solid #e2e8f0;
}

.skills-section .skill-category {
	background: white;
	border-left: 4px solid #047857; /* darker emerald */
}

.skills-section .skill-category h4 {
    color: #065f46;
}

.skill-category h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1e293b;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.skill-tags span {
    background: #2563eb;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.skills-section .skill-tags span {
	background: #059669; /* darker green */
	box-shadow: 0 8px 18px rgba(5, 150, 105, 0.35);
}

/* 공통 프로젝트 썸네일 */
.project-thumb {
    width: 100%;
    height: 160px;
    background: #e5e7eb center/cover no-repeat;
    border-radius: 12px;
    margin-bottom: 12px;
}

.project-thumb--small {
    height: 120px;
}

.project-thumb--large {
    height: 220px;
}

/* 고정 비율 썸네일: 높이 대신 비율로 레이아웃 유지 */
.project-thumb--16x9 {
    height: auto;
    aspect-ratio: 16 / 9;
}

.project-thumb--rounded {
    border-radius: 20px;
}

/* 연락처 섹션 */
.contact {
    padding: 100px 0;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
}

.contact .section-title {
    color: white;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-cards {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.contact-card i {
    font-size: 2rem;
    color: #60a5fa;
    margin-bottom: 1rem;
}

.contact-card h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.contact-card p {
    opacity: 0.8;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-method i {
    color: #60a5fa;
    font-size: 1.2rem;
}

.contact-cta h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.contact-cta p {
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
}

.cta-buttons .btn-primary {
    background: #60a5fa;
    border-color: #60a5fa;
}

.cta-buttons .btn-primary:hover {
    background: transparent;
    color: #60a5fa;
}

.cta-buttons .btn-secondary {
    background: transparent;
    color: white;
    border-color: white;
}

.cta-buttons .btn-secondary:hover {
    background: white;
    color: #1e293b;
}

/* 푸터 */
.footer {
    background: #0f172a;
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* Footer business info */
.footer-biz-info {
    width: 100%;
    max-width: 1100px;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.85);
    text-align: left;
}
.footer-biz-info ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    justify-content: flex-start;
    align-items: flex-start;
}
.footer-biz-info li {
    font-size: 0.92rem;
    line-height: 1.6;
}
.footer-biz-info li strong {
    color: #ffffff;
    margin-right: 6px;
}

@media (max-width: 640px) {
  .footer-biz-info li { font-size: 0.85rem; }
}

.footer-logo {
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: #60a5fa;
}

.footer-logo i {
    margin-right: 0.5rem;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .hamburger { display: flex; }
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }
    .nav-menu.active { left: 0; }

    /* Hero adjustments for mobile */
    .hero { overflow: visible; padding-top: calc(112px + env(safe-area-inset-top, 0px)); }
    .hero-container { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
    .hero-content { padding-left: 16px; padding-right: 16px; }
    .hero-content h1 { font-size: 2.2rem; line-height: 1.25; white-space: normal; overflow-wrap: anywhere; margin-bottom: 1.25rem; }
    .hero-content h2 { font-size: 1.1rem; white-space: normal; overflow-wrap: anywhere; }
    .tech-icons { font-size: 3rem; }
    .services-grid { grid-template-columns: 1fr; }
    .hero-buttons, .cta-buttons { flex-direction: column; align-items: center; }
    .btn { width: 100%; max-width: 300px; text-align: center; }

    /* 연락처 섹션 - 모바일 가시성 및 레이아웃 개선 */
    .contact-content {
      grid-template-columns: 1fr;
      gap: 2rem;
    }

    .contact-cta .cta-layout {
      grid-template-columns: 1fr !important;
      column-gap: 0 !important;
      row-gap: 12px !important;
      justify-items: stretch !important;
    }

    /* 인라인 grid-column: 2 를 무력화하여 한 컬럼 레이아웃에서 보이도록 조정 */
    .contact-cta .cta-layout > a {
      grid-column: auto !important;
      justify-self: stretch !important;
    }

    .contact-cta .contact-photo {
      width: 100% !important;
      max-width: 180px;
      height: 180px;
      justify-self: center;
      grid-row: auto;
      grid-column: auto;
    }

    .contact-cta .btn {
      width: 100% !important;
      max-width: 100% !important;
      white-space: normal;
    }
}

@media (max-width: 480px) {
    .hero { overflow: visible; padding-top: calc(124px + env(safe-area-inset-top, 0px)); }
    .hero-content { padding-left: 14px; padding-right: 14px; }
    .hero-content h1 { font-size: 1.9rem; line-height: 1.3; }
}

/* 앵커 스크롤 오프셋: 고정 네비게이션 보정 */
#home {
    scroll-margin-top: 96px;
}


/* 스크롤 애니메이션 */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 부드러운 스크롤 */
html {
    scroll-behavior: smooth;
}

/* 앵커 스크롤 위치 보정 (섹션 상단 간격) */
section, 
#services, 
#contact,
#portfolio-grid {
    scroll-margin-top: 70px;
}

/* 포트폴리오 모달 스타일 */
.portfolio-item {
    /* 카드 전체에 포인터 커서를 주지 않고 버튼에서만 포인터 표시 */
    cursor: default;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* 모바일에서 스크롤 우선 제스처 힌트 및 탭 하이라이트 제거 */
@media (max-width: 768px) {
  .portfolio-item {
    touch-action: pan-y; /* 세로 스크롤 우선 */
    -webkit-tap-highlight-color: transparent; /* iOS 하이라이트 제거 */
  }
}

.portfolio-preview {
    margin-top: 1rem;
    padding: 0.5rem;
    background: #f8fafc;
    border-radius: 6px;
    text-align: center;
    font-size: 0.9rem;
    color: #64748b;
    border: 1px dashed #cbd5e1;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-drag: none;
    caret-color: transparent;
}

.portfolio-preview:active,
.portfolio-preview:focus,
.portfolio-preview:hover {
    cursor: pointer !important;
}

/* 버튼 내부 텍스트에도 동일 커서/선택 정책 적용 */
.portfolio-preview * {
    cursor: pointer !important;
    user-select: none;
    -webkit-user-select: none;
}

.portfolio-modal {
    display: none !important;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    visibility: hidden;
    opacity: 0;
}

/* 포트폴리오 모달 표시 상태 */
.portfolio-modal.show {
    display: block !important;
    visibility: visible;
    opacity: 1;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    z-index: 10;
}

.close-modal:hover {
    color: #000;
}

.modal-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.modal-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.modal-header p {
    opacity: 0.9;
    font-size: 1rem;
}

.modal-body {
    padding: 2rem;
    max-height: 60vh;
    overflow-y: auto;
}

/* 포트폴리오 모달 내 이미지 커서 정책: 기본은 기본 커서, 갤러리 이미지만 포인터 */
.portfolio-modal .modal-body img {
    cursor: default !important;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}
.portfolio-modal .modal-body img[data-gallery="true"] {
    cursor: pointer !important;
}

.modal-slides {
    position: relative;
    min-height: 300px;
}

.slide {
    display: none;
    animation: slideIn 0.3s ease-in-out;
}

.slide.active {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide h3 {
    color: #2563eb;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.slide-content {
    line-height: 1.8;
}

.slide-content ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.slide-content li {
    margin-bottom: 0.5rem;
    color: #4a5568;
}

.modal-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.nav-btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.nav-btn:hover {
    background: #1d4ed8;
}

.nav-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
}

#slide-counter {
    font-weight: 600;
    color: #64748b;
}

/* 자격증 이미지 확대 모달 */
.certificate-clickable {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

.certificate-clickable:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.certificate-clickable:active {
    transform: scale(0.98);
}

/* 자격/경력 증명서 카드에서 텍스트는 클릭/터치 대상에서 제외 */
.certificate-item h4,
.certificate-item p {
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
}

/* 포커스 아웃라인 제거 (접근성 고려해 역할 요소가 아니므로 시각적 제거) */
.certificate-clickable:focus {
    outline: none;
}

/* 전체 카드에도 탭 하이라이트 제거 */
.certificate-item {
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 768px) {
  .certificate-clickable {
    touch-action: pan-y;
    -webkit-tap-highlight-color: transparent;
  }
  /* 모바일 스크롤 중 눌림(pressed) 효과 제거 */
  .certificate-clickable:hover,
  .certificate-clickable:active {
    transform: none !important;
    box-shadow: none !important;
  }
}

.certificate-modal {
    display: none !important;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    visibility: hidden;
    opacity: 0;
}

.certificate-modal.show {
    display: block !important;
    visibility: visible;
    opacity: 1;
}

.certificate-modal-content {
    position: relative;
    margin: 2% auto;
    padding: 0;
    width: 90%;
    max-width: 1000px;
    max-height: 95vh;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: certificateModalSlideIn 0.3s ease-out;
    overflow: hidden;
}

@keyframes certificateModalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.close-certificate-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-certificate-modal:hover {
    color: #000;
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.certificate-modal-body {
    padding: 2rem;
    text-align: center;
    max-height: 90vh;
    overflow-y: auto;
    touch-action: pan-x pan-y;
    -webkit-overflow-scrolling: touch;
}

#certificate-zoom-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    transition: transform 0.3s ease;
    transform-origin: center center;
}

#certificate-zoom-image:active {
    cursor: grabbing;
}

.certificate-modal-info {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #2563eb;
}

.certificate-modal-info h3 {
    color: #1e293b;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.certificate-modal-info p {
    color: #64748b;
    font-size: 1rem;
    line-height: 1.6;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
        max-height: 85vh;
    }

    .modal-header {
        padding: 1.5rem 1.5rem 1rem;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .certificate-modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 90vh;
    }

    .certificate-modal-body {
        padding: 1rem;
        touch-action: pan-x pan-y;
        -webkit-overflow-scrolling: touch;
    }

    .certificate-modal-info h3 {
        font-size: 1.1rem;
    }

    .certificate-modal-info p {
        font-size: 0.9rem;
    }
    
    /* 모바일에서 자격증 이미지 터치 최적화 */
    .certificate-clickable {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
        touch-action: manipulation;
    }
    
    #certificate-zoom-image {
        max-height: 70vh;
        touch-action: pan-x pan-y pinch-zoom;
    }
    
    /* 모바일에서 터치 피드백 개선 */
    .certificate-clickable:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
}

/* 매우 작은 화면 (480px 이하) */
@media (max-width: 480px) {
    .certificate-modal-content {
        width: 98%;
        margin: 2% auto;
        max-height: 95vh;
    }
    
    .certificate-modal-body {
        padding: 0.5rem;
    }
    
    #certificate-zoom-image {
        max-height: 60vh;
    }
    
    .certificate-modal-info {
        margin-top: 1rem;
        padding: 0.8rem;
    }
    
    .certificate-modal-info h3 {
        font-size: 1rem;
    }
    
    .certificate-modal-info p {
        font-size: 0.8rem;
    }
}

