/* 📘 학생 포트폴리오 웹페이지 Design System */

:root {
  /* Colors */
  --primary-color: #2196f3;
  --primary-hover: #1976d2;
  --secondary-color: #e3f2fd;
  --accent-color: #ffc107;
  --text-color: #333333;
  --text-muted: #666666;
  --background-white: #ffffff;
  --bg-offset: #f8f9fa;
  --border-color: #e0e0e0;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);

  /* Typography */
  --font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
  --font-size-base: 16px;
  --h1-size: clamp(2.5rem, 5vw, 3.5rem);
  --h2-size: clamp(2rem, 4vw, 2.8rem);
  --h3-size: 1.5rem;
  --body-size: 1.1rem;

  /* Spacing & Borders */
  --spacing-section: 100px;
  --border-radius: 16px;
  --transition-fast: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  color: var(--text-color);
  background-color: var(--background-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Accessibility: Skip Navigation */
.skip-nav {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  background: var(--primary-color);
  color: white;
  font-weight: 700;
  border-radius: 0 0 8px 8px;
  z-index: 9999;
  transition: top 0.3s ease;
}

.skip-nav:focus {
  top: 0;
}

/* Accessibility: Screen Reader Only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Accessibility: Focus Visible */
*:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

.container {
  max-width: 1218px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-large {
  max-width: 1418px;
}

section {
  padding: var(--spacing-section) 0;
}

/* Typography Utilities */
.section-title {
  text-align: center;
  margin-bottom: 60px;
}

.section-title h2 {
  font-size: var(--h2-size);
  font-weight: 800;
  position: relative;
  display: inline-block;
  padding-bottom: 15px;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 2px;
}

.section-title p {
  margin-top: 15px;
  color: var(--text-muted);
}

/* Header & Nav */
header {
  position: fixed;
  top: 0;
  width: 100%;
  height: 80px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-fast);
}

header.scrolled {
  height: 65px;
  box-shadow: var(--shadow-sm);
}

header .container {
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-color);
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 40px;
}

.nav-links a {
  font-weight: 600;
  font-size: 1.05rem;
  position: relative;
}

.nav-links a:hover {
  color: var(--primary-color);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: var(--transition-fast);
}

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

.mobile-toggle {
  display: none;
  font-size: 1.8rem;
  color: var(--primary-color);
  z-index: 1100;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
  background-color: #000;
  /* Video fallback box */
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  /* Slightly more transparent to see video better */
  z-index: 1;
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 2;
  /* Ensure content is above overlay and video */
  max-width: 800px;
}

.hero-content h2 {
  font-size: var(--h1-size);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 24px;
  color: var(--background-white);
}

.hero-content p {
  font-size: var(--body-size);
  color: var(--background-white);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-btn {
  display: inline-block;
  padding: 16px 40px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50px;
  font-size: 1.1rem;
  box-shadow: 0 8px 20px rgba(33, 150, 243, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(33, 150, 243, 0.4);
  background-color: var(--primary-hover);
}

.scroll-down {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: bounce 2s infinite;
}

.scroll-down a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: white;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.scroll-text {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  font-weight: 700;
  text-transform: uppercase;
  opacity: 0.8;
}

.scroll-down a i {
  font-size: 1.5rem;
}

.scroll-down a:hover {
  opacity: 1;
}

.scroll-down a:hover i {
  color: var(--primary-color);
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  40% {
    transform: translateX(-50%) translateY(-10px);
  }

  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* Works Section */
.works {
  background-color: var(--bg-offset);
}

.filter-group {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 50px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 25px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 30px;
  font-weight: 600;
  transition: var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

@media (max-width: 1400px) {
  .works-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1024px) {
  .works-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .works-grid {
    grid-template-columns: repeat(1, 1fr);
  }
}

.work-card {
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
  display: flex;
  flex-direction: column;
}

.work-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.card-img {
  width: 100%;
  height: 240px;
  overflow: hidden;
  position: relative;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.work-card:hover .card-img img {
  transform: scale(1.1);
}

.card-content {
  padding: 24px;
  flex-grow: 1;
  position: relative;
}

.card-category {
  display: inline-block;
  padding: 4px 12px;
  background: var(--secondary-color);
  color: var(--primary-color);
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 20px;
  margin-bottom: 12px;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.card-author {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 15px;
}

.card-desc {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 60px;
}

.tool {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  margin-bottom: 50px;
}

.icon {
  width: 30px;
}

.card-btn {
  font-weight: 700;
  color: var(--primary-color);
  /* display: flex; */
  /* align-items: center; */
  gap: 8px;
  margin-top: auto;
  display: block;
  text-align: right;
  position: absolute;
  right: 24px;
  bottom: 24px;
}

.card-btn i {
  transition: transform 0.3s ease;
}

.card-btn:hover i {
  transform: translateX(5px);
}

/* About Section */
.about {
  background-color: var(--background-white);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-content h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 24px;
}

.about-features {
  display: grid;
  gap: 20px;
  margin-top: 40px;
}

.feature-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.feature-icon {
  min-width: 50px;
  height: 50px;
  background: var(--secondary-color);
  color: var(--primary-color);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.feature-text h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.feature-text p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.stat-box {
  padding: 30px;
  background: var(--bg-offset);
  border-radius: var(--border-radius);
  text-align: center;
}

.stat-num {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-color);
  display: block;
}

.stat-label {
  font-weight: 600;
  color: var(--text-muted);
}

/* Contact Section */
.contact {
  background-color: var(--bg-offset);
}

.contact-wrapper {
  max-width: 900px;
  margin: 0 auto;
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 1fr 1.5fr;
}

.contact-info {
  background: var(--primary-color);
  color: white;
  padding: 40px;
}

.contact-info h3 {
  font-size: 1.5rem;
  margin-bottom: 30px;
}

.contact-details {
  display: grid;
  gap: 24px;
}

.detail-item {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.detail-item i {
  transform: translateY(4px);
}

.contact-form {
  padding: 40px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: inherit;
  transition: var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.submit-btn {
  width: 100%;
  padding: 14px;
  background: var(--primary-color);
  color: white;
  font-weight: 700;
  border-radius: 8px;
  margin-top: 10px;
  transition: var(--transition-fast);
}

.submit-btn:hover {
  background: var(--primary-hover);
  box-shadow: 0 5px 15px rgba(33, 150, 243, 0.2);
}

/* Footer */
footer {
  padding: 60px 0 30px;
  background: #1a1a1a;
  color: #888;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 30px;
}

.footer-logo {
  color: white;
  font-size: 1.5rem;
  font-weight: 800;
}

footer address {
  font-style: normal;
  font-size: 14px;
}

.social-links {
  display: flex;
  gap: 20px;
}

.social-links a i {
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-links a {
  width: 40px;
  height: 40px;
  background: #333;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.social-links a:hover {
  background: var(--primary-color);
  transform: translateY(-3px);
}

.copyright {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid #333;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 992px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0px 14px;
  }

  .mobile-toggle {
    display: block;
  }

  .filter-btn {
    font-size: 0.9rem;
    color: var(--text-color);
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    background: rgb(255, 255, 255);
    flex-direction: column;
    align-items: center;
    padding: 80px 0 40px;
    gap: 30px;
    box-shadow: var(--shadow-md);
    transition: transform 0.4s ease-in-out;
    z-index: 999;
    display: flex;
    transform: translateY(-100%);
  }

  .nav-links.active {
    transform: translateY(0);
  }

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

  .hero-content h2 {
    font-size: 2.3rem;
    font-weight: 800;
    color: var(--background-white)
  }

  .cta-btn {
    padding: 12px 30px;
    font-size: 1rem;
  }
}

/* Top Button Styles */
#topBtn {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#topBtn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#topBtn:hover {
  background-color: var(--primary-hover);
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

#topBtn i {
  font-size: 22px;
}

@media (max-width: 768px) {
  #topBtn {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
}

/* 🖼️ Image Modal Style */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  padding-top: 100px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 94%;
  max-height: 82vh;
  object-fit: contain;
  border: 10px solid #fff;
  /* border-radius: 8px; */
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
  animation: zoom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

@keyframes zoom {
  from {
    transform: scale(0.8);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-close {
  position: absolute;
  top: 30px;
  right: 50px;
  color: #fff;
  font-size: 60px;
  font-weight: 300;
  transition: 0.3s;
  cursor: pointer;
  line-height: .8;
}

.modal-close:hover,
.modal-close:focus {
  color: var(--primary-color);
  transform: rotate(90deg);
}

@media (max-width: 700px) {
  .modal-content {
    width: 95%;
  }

  .modal-close {
    top: 20px;
    right: 30px;
    font-size: 45px;
  }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}