/* --- Global Variables & Base Styles --- */
:root {
    /* Light Mode Defaults */
    --bg-color: #f8f9fa;
    --bg-alternate-color: #ffffff;
    --text-color: #212529;
    --text-muted-color: #6c757d;
    --primary-color: #0d1b2a; /* Dark Blue */
    --secondary-color: #415a77; /* Mid Blue */
    --accent-color: #bfa060; /* Gold */
    --card-bg-color: #ffffff;
    --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    --border-color: #dee2e6;
    --heading-font: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif; /* Fallback fonts */
    --body-font: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;    /* Fallback fonts */
    --logo-dark-display: none;
    --logo-light-display: block;
    --svg-invert: 0;
    --rgb-primary: 13, 27, 42;
}

/* Dark Mode Variables */
body.dark-mode {
    --bg-color: #0a0a0a;
    --bg-alternate-color: #121212;
    --text-color: #e9ecef;
    --text-muted-color: #adb5bd;
    --primary-color: #bfa060; /* Gold */
    --secondary-color: #778da9; /* Lighter Blue */
    --accent-color: #ffffff;
    --card-bg-color: #1a1a1a;
    --card-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    --border-color: #343a40;
    --logo-dark-display: block;
    --logo-light-display: none;
    --svg-invert: 1;
    --rgb-primary: 191, 160, 96;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    font-size: 16px;
    font-weight: 400; /* Default body font weight */
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased; /* Smoother font rendering */
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    font-weight: 700; /* Default heading weight */
    margin-bottom: 1rem;
    color: var(--text-color);
    line-height: 1.3; /* Heading line height */
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.6rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-muted-color);
}
/* Removed dark mode p color override - use text-muted-color */


img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Utility Classes --- */
.text-center { text-align: center; }
.section-padding { padding: 80px 0; }
.bg-alternate { background-color: var(--bg-alternate-color); transition: background-color 0.3s ease;}
.section-title { margin-bottom: 40px; position: relative; }
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 15px auto 0;
    transition: background-color 0.3s ease;
}
.section-title:not(.text-center)::after { margin-left: 0; }

.section-description { max-width: 700px; margin: 0 auto 40px; color: var(--text-muted-color); }


/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 700; /* Buttons Bold */
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-family: var(--body-font);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--bg-color);
    border-color: var(--primary-color);
}
.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
body.dark-mode .btn-primary {
    color: #0a0a0a;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--bg-color);
     border-color: var(--secondary-color);
}
.btn-secondary:hover {
     background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
     box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
body.dark-mode .btn-secondary {
    color: #0a0a0a;
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}
.btn-outline:hover {
     background-color: var(--primary-color);
     color: var(--bg-color);
     transform: translateY(-2px);
}
body.dark-mode .btn-outline:hover {
    color: #0a0a0a;
}


/* --- Header & Navbar --- */
.navbar {
    background-color: var(--bg-alternate-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
body.dark-mode .navbar {
     box-shadow: 0 2px 15px rgba(0, 0, 0, 0.4);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: var(--heading-font);
    color: var(--primary-color);
    display: flex; /* Align logo image vertically */
    align-items: center;
}
.navbar-brand img {
    max-height: 40px; /* Header logo height */
    width: auto;
}
.logo-dark { display: var(--logo-dark-display); }
.logo-light { display: var(--logo-light-display); }


.navbar-nav {
    list-style: none;
    display: flex;
}

.navbar-nav li {
    margin-left: 30px;
}

.navbar-nav a {
    color: var(--text-color);
    font-weight: 400; /* Navigation items regular weight */
    padding-bottom: 5px;
    position: relative;
    font-size: 0.95rem; /* Slightly smaller nav text */
}

.navbar-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.navbar-nav a:hover::after,
.navbar-nav a.active::after {
    width: 100%;
}

.dark-mode-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.4rem;
    cursor: pointer;
    margin-left: 20px;
    transition: color 0.3s ease;
}
.dark-mode-toggle:hover {
    color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.6rem;
    cursor: pointer;
}
.mobile-menu {
    display: none;
    background-color: var(--bg-alternate-color);
    position: absolute;
    top: 70px; /* Should match navbar height */
    left: 0;
    width: 100%;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
}
.mobile-menu ul { list-style: none; }
.mobile-menu li { border-bottom: 1px solid var(--border-color); }
.mobile-menu li:last-child { border-bottom: none; }
.mobile-menu a {
    display: block;
    padding: 15px 20px;
    color: var(--text-color);
    font-weight: 400;
}
.mobile-menu a:hover { background-color: var(--bg-color); }


/* --- Hero Section --- */
.hero-section {
    height: 80vh;
    /* background: url('../images/hero-bg.jpg') no-repeat center center/cover; /* 기존 로컬 이미지 주석 처리 */
    background: url('https://images.unsplash.com/photo-1551434678-e076c223a692?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1170&q=80') no-repeat center center/cover; /* 이전 Unsplash 이미지 */
    /* background: url('https://images.pexels.com/photos/3861969/pexels-photo-3861969.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2') no-repeat center center/cover; /* Pexels 이미지 주석 처리 */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 20px;
    font-weight: 700;
    color: #fff;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 40px;
    color: #e0e0e0;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    font-weight: 400;
}

.hero-section .btn-primary {
    background-color: var(--primary-color);
    color: var(--bg-color);
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 700;
}
body.dark-mode .hero-section .btn-primary {
     color: #0a0a0a;
}
.hero-section .btn-primary:hover {
     background-color: var(--secondary-color);
     border-color: var(--secondary-color);
}


/* --- About Preview Section --- */
.about-preview {
    display: flex;
    align-items: center;
    gap: 50px;
}
.about-image {
    flex-basis: 40%;
    max-width: 40%;
}
.about-image img {
    border-radius: 10px;
    box-shadow: var(--card-shadow);
}
.about-content {
    flex-basis: 60%;
    max-width: 60%;
}
.about-content .section-title { text-align: left; }
.about-content .section-title::after { margin-left: 0; }


/* --- Services Section --- */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--card-bg-color);
    padding: 40px 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}
body.dark-mode .service-card:hover {
     box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}


.service-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
    filter: invert(var(--svg-invert, 0));
}
body.dark-mode .service-icon {
     /* Example gold filter - adjust color as needed */
     filter: invert(75%) sepia(27%) saturate(950%) hue-rotate(350deg) brightness(95%) contrast(80%);
}


.service-card h3 {
    margin-bottom: 15px;
}

.service-link {
    display: inline-block;
    margin-top: 20px;
    font-weight: 700;
    color: var(--primary-color);
}
.service-link i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}
.service-link:hover i {
    transform: translateX(5px);
}

/* --- IT Trends Section (Notion Embed) --- */
.notion-embed-container {
    background-color: var(--card-bg-color);
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    margin-top: 40px;
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.notion-embed-container iframe {
    display: block;
    width: 100%;
    /* Height is set inline in HTML, adjust there as needed */
    border: 0;
}

/* --- Portfolio Section --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    cursor: pointer;
}

.portfolio-item img {
    transition: transform 0.4s ease;
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

.portfolio-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0));
    color: #fff;
    padding: 40px 20px 20px;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.portfolio-item:hover .portfolio-info {
    transform: translateY(0);
}

.portfolio-info h3 {
    font-size: 1.4rem;
    margin-bottom: 5px;
    color: #fff;
}

.portfolio-info p {
    color: #ffffff;
    font-size: 0.95rem;
    opacity: 0.9;
    margin-bottom: 0;
}

/* --- Testimonials Section --- */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 데스크탑: 3열 그리드 */
  gap: 30px; /* 카드 사이 간격 */
  margin-top: 40px; /* 제목 아래 여백 */
}

.testimonial-card {
  background-color: var(--card-bg-color); /* 카드 배경색 (라이트/다크 모드 변수 사용) */
  border-radius: 8px; /* 카드 모서리 둥글게 */
  box-shadow: var(--card-shadow); /* 카드 그림자 (라이트/다크 모드 변수 사용) */
  overflow: hidden; /* 이미지가 카드를 벗어나지 않도록 */
  display: flex; /* 카드 내부 요소를 flexbox로 정렬 (이미지+콘텐츠) */
  flex-direction: column; /* 이미지 위, 콘텐츠 아래 수직 정렬 */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-5px); /* 호버 시 살짝 위로 이동 */
  box-shadow: 0 8px 25px rgba(var(--rgb-primary), 0.15); /* 호버 시 그림자 강조 */
}

.testimonial-image {
  width: 100%; /* 이미지 너비는 카드에 맞춤 */
  height: 200px; /* 이미지 높이 고정 (원하는 크기로 조절) */
  object-fit: cover; /* 이미지 비율 유지하며 영역 채우기 */
}

.testimonial-content {
  padding: 25px; /* 카드 내부 텍스트 여백 */
  display: flex; /* 내부 요소(quote, author) 정렬 위해 추가 */
  flex-direction: column; /* 수직 정렬 */
  flex-grow: 1; /* 카드의 남은 공간을 채우도록 함 */
}

.testimonial-quote {
  margin-bottom: 20px; /* 인용문 아래 여백 */
  font-style: italic; /* 인용문 기울임꼴 */
  color: var(--text-muted-color); /* 인용문 텍스트 색상 */
  position: relative;
  flex-grow: 1; /* 인용문이 가능한 공간을 차지하도록 함 */
}

.testimonial-quote i {
  color: var(--primary-color); /* 인용 부호 색상 */
  font-size: 1.2rem;
  opacity: 0.6;
}
.testimonial-quote i.fa-quote-left {
    margin-right: 10px;
    vertical-align: top; /* 왼쪽 인용부호 살짝 위로 */
}
.testimonial-quote i.fa-quote-right {
    margin-left: 10px;
    vertical-align: bottom; /* 오른쪽 인용부호 살짝 아래로 */
}

.testimonial-quote p {
    margin-bottom: 0; /* 인용문 단락 아래 기본 여백 제거 */
    display: inline; /* 인용 부호와 같은 줄에 표시되도록 */
    line-height: 1.6; /* 줄 간격 조정 */
}


.testimonial-author {
  display: flex;
  align-items: center;
  /* margin-top: auto; /* flex-grow로 대체 */
  padding-top: 15px; /* 인용문과의 간격 */
  border-top: 1px solid var(--border-color); /* 구분선 */
}

.testimonial-author h4 {
  margin-bottom: 2px; /* 이름 아래 여백 줄임 */
  font-size: 1rem;
  font-weight: 700; /* 이름 굵게 */
  color: var(--text-color);
}

.testimonial-author span {
  font-size: 0.9rem;
  color: var(--text-muted-color);
}

/* --- Contact Section --- */
.contact-info {
    margin-bottom: 40px;
}
.contact-info p {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text-color);
}
.contact-info i {
    color: var(--primary-color);
    margin-right: 10px;
    width: 20px;
}

.tally-embed-container {
    border: 1px solid transparent; /* Initial state */
    border-radius: 8px;
    transition: border-color 0.3s ease;
    /* Max-width and margin are set inline in HTML for this specific case */
}
body.dark-mode .tally-embed-container {
    border-color: var(--border-color); /* Border in dark mode for clarity */
}


/* --- Footer --- */
.footer {
    background-color: var(--bg-alternate-color);
    color: var(--text-muted-color);
    padding: 40px 0;
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
body.dark-mode .footer {
     background-color: #0a0a0a;
}

.footer p {
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: var(--text-muted-color);
}

.footer a {
    color: var(--text-muted-color);
    font-weight: 400;
}
.footer a:hover {
    color: var(--primary-color);
}

.social-links {
    margin-top: 15px;
}
.social-links a {
    color: var(--text-muted-color);
    font-size: 1.3rem;
    margin: 0 10px;
    transition: color 0.3s ease;
}
.social-links a:hover {
    color: var(--primary-color);
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .container { max-width: 960px; }
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    .hero-title { font-size: 3rem; }
    .about-preview { flex-direction: column; text-align: center; }
    .about-image, .about-content { flex-basis: 100%; max-width: 80%; margin: 0 auto; }
    .about-image { margin-bottom: 30px; }
    .about-content .section-title { text-align: center; }
     .about-content .section-title::after { margin: 15px auto 0; }

    .testimonial-grid {
      grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container { max-width: 720px; }
    .navbar-nav { display: none; }
    .dark-mode-toggle { margin-left: auto; margin-right: 15px; }
    .mobile-menu-toggle { display: block; }

    .hero-section { height: 70vh; }
    .hero-title { font-size: 2.5rem; }
    .hero-subtitle { font-size: 1.1rem; }

    .section-padding { padding: 60px 0; }
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }

    .service-grid, .portfolio-grid, .testimonial-grid { grid-template-columns: 1fr; } /* Apply 1-column layout */

    /* 모바일에서 이미지 높이 살짝 줄임 (선택 사항) */
   .testimonial-image {
    height: 180px;
   }
}

@media (max-width: 576px) {
    .container { max-width: 100%; padding: 0 15px; }
    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; }
    .btn { padding: 10px 25px; font-size: 0.9rem; }
     .about-image, .about-content { max-width: 100%; }

    .footer { text-align: center; }
    .social-links a { margin: 0 8px; }

    /* Further adjust Notion embed height for mobile */
     .notion-embed-container iframe {
        height: 500px; /* Example adjustment for mobile */
    }
}