/* CSS Design System for Kim Jibin Portfolio */

:root {
  /* Colors */
  --color-blue: #0000ff; /* Electric Blue from wireframe */
  --color-white: #ffffff;
  --color-black: #111111;
  --color-gray: #666666;
  --color-light-gray: #f5f5f5;
  --color-border: rgba(0, 0, 255, 0.2);
  --color-modal-bg: rgba(255, 255, 255, 0.98);
  
  /* Fonts */
  --font-display: 'Outfit', 'Noto Sans KR', sans-serif;
  --font-body: 'Inter', 'Noto Sans KR', sans-serif;
  
  /* Layout constraints */
  --header-height: 80px;
  --grid-gap: 12px;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--color-white);
  color: var(--color-black);
  font-family: var(--font-body);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--color-white);
}
::-webkit-scrollbar-thumb {
  background: var(--color-blue);
  border-radius: 3px;
}

/* Common Typography & Accents */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.1;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

.accent-blue-text {
  color: var(--color-blue);
}

/* Header & Sticky Nav */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: var(--color-white);
  border-bottom: 2px solid var(--color-blue);
  z-index: 100;
  display: flex;
  align-items: center;
}

.header-container {
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

/* Centered Header Logo */
.header-center-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 70px;
  height: 32px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.header-logo-img {
  width: 190px;
  height: auto;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: block;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.header-center-logo:hover .header-logo-img {
  transform: translate(-50%, -50%) scale(1.1);
}

@media (max-width: 480px) {
  .header-center-logo {
    display: none;
  }
}

.logo .nav-brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--color-blue);
  letter-spacing: -0.02em;
}

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

.nav-link {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-blue);
  opacity: 0.6;
  text-transform: capitalize;
  position: relative;
  padding: 4px 0;
}

.nav-link:hover,
.nav-link.active {
  opacity: 1;
}

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

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

/* Mobile Toggle Hamburger */
.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  cursor: pointer;
  z-index: 110;
}

.mobile-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-blue);
  transition: all 0.3s ease;
}

/* Mobile menu toggle animation class */
.mobile-toggle.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.mobile-toggle.open span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Fullscreen Navigation */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-white);
  z-index: 105;
  display: flex;
  justify-content: center;
  align-items: center;
  transform: translateY(-100%);
  transition: transform 0.5s cubic-bezier(0.85, 0, 0.15, 1);
}

.mobile-nav-overlay.open {
  transform: translateY(0);
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.mobile-link {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--color-blue);
}

/* Main Content Wrapper */
.site-content {
  margin-top: var(--header-height);
}

/* Generic Section Layout */
.section {
  padding: 100px 40px;
  border-bottom: 1px solid rgba(0, 0, 255, 0.1);
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
}

.section-container {
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
}

/* 2-Column Split Layout */
.split-layout {
  display: flex;
  width: 100%;
}

.split-left {
  width: 50%;
  padding-right: 40px;
}

.split-right {
  width: 50%;
  padding-left: 40px;
  display: flex;
  align-items: center;
}

/* Introduction Section specific */
.intro-section {
  background-color: var(--color-white);
}

.brand-title {
  font-size: clamp(4rem, 12vw, 9.5rem);
  line-height: 0.85;
  color: var(--color-blue);
  letter-spacing: -0.04em;
}

.asterisk {
  color: var(--color-blue);
  font-weight: 400;
}

.intro-headline {
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-black);
  letter-spacing: -0.02em;
}

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

.about-headline {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-black);
  letter-spacing: -0.02em;
}

.about-text-content {
  max-width: 600px;
}

.about-text-content p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.7;
  color: var(--color-gray);
  margin-bottom: 30px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.about-text-content p:last-child {
  margin-bottom: 0;
}

/* Selected Works Section specific */
.work-section {
  display: block;
  padding: 100px 40px;
  background-color: var(--color-white);
}

.work-section-header {
  max-width: 1800px;
  margin: 0 auto 50px auto;
}

.work-section-title {
  font-size: 2.5rem;
  color: var(--color-blue);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.work-section-desc {
  font-size: 1.1rem;
  color: var(--color-gray);
  font-weight: 400;
}

/* Project Covers Grid (Matching superverymore.tv style) */
.project-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--grid-gap);
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
}

.project-card {
  position: relative;
  width: 100%;
  cursor: pointer;
  overflow: hidden;
  background-color: var(--color-light-gray);
}

.card-inner {
  position: relative;
  width: 100%;
  padding-bottom: 133.33%; /* 3:4 Aspect Ratio (Portrait) */
}

.media-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.hover-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

/* Hover overlay detail block */
.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: flex-end;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 2;
}

.overlay-details {
  transform: translateY(20px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--color-white);
  width: 100%;
}

.project-title {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 800;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

.project-date {
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0.8;
}

/* Card Hover Interactions */
.project-card:hover .thumbnail-img {
  transform: scale(1.05);
}

.project-card:hover .hover-video {
  opacity: 1;
}

.project-card:hover .card-overlay {
  opacity: 1;
}

.project-card:hover .overlay-details {
  transform: translateY(0);
}

/* Contact Section specific */
.contact-section {
  background-color: var(--color-white);
  min-height: 80vh;
}

.contact-container {
  text-align: center;
}

.contact-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  color: var(--color-blue);
  letter-spacing: -0.03em;
  margin-bottom: 60px;
}

.contact-info {
  margin-bottom: 60px;
}

.contact-email {
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-family: var(--font-display);
  font-weight: 900;
  color: var(--color-black);
  letter-spacing: -0.02em;
  display: inline-block;
  margin-bottom: 12px;
  position: relative;
}

.contact-email::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: var(--color-blue);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s ease;
}

.contact-email:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.contact-phone {
  font-size: 1.25rem;
  color: var(--color-gray);
  font-weight: 400;
}

.contact-social {
  display: flex;
  justify-content: center;
  gap: 40px;
}

.social-link {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-blue);
  opacity: 0.6;
}

.social-link:hover {
  opacity: 1;
  transform: translateY(-2px);
}

/* Footer styling */
.site-footer {
  padding: 40px;
  background-color: var(--color-white);
  border-top: 1px solid rgba(0, 0, 255, 0.15);
}

.footer-container {
  max-width: 1800px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--color-gray);
  font-size: 0.9rem;
}

.footer-meta {
  text-align: right;
  font-weight: 400;
}

/* High-End Detail Modal Popup */
.project-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 200;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.project-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-modal-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1;
}

.modal-content-wrap {
  position: relative;
  width: 90%;
  max-width: 1400px;
  height: 85vh;
  background-color: var(--color-white);
  border: 2.5px solid var(--color-blue);
  z-index: 2;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 255, 0.15);
  display: flex;
  opacity: 0;
  transform: scale(0.95);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
}

.project-modal.open .modal-content-wrap {
  opacity: 1;
  transform: scale(1);
}

/* Close Button styling */
.modal-close-btn {
  position: absolute;
  top: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  background: var(--color-white);
  border: 1.5px solid var(--color-blue);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-close-btn:hover {
  background-color: var(--color-blue);
  transform: rotate(90deg);
}

.close-bar {
  display: block;
  width: 18px;
  height: 2px;
  background-color: var(--color-blue);
  transition: background-color 0.3s ease;
}

.close-bar:first-child {
  transform: translateY(1px) rotate(45deg);
}

.close-bar:last-child {
  transform: translateY(-1px) rotate(-45deg);
}

.modal-close-btn:hover .close-bar {
  background-color: var(--color-white);
}

/* Modal Internal Body */
.modal-body {
  display: flex;
  width: 100%;
  height: 100%;
}

.modal-media-wrap {
  width: 65%;
  height: 100%;
  background-color: #0d0d0d;
  overflow-y: auto;
  padding: 30px;
}

.modal-video-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.modal-video-element,
.modal-img-element,
.modal-iframe {
  width: 100%;
  height: auto;
  border-radius: 4px;
  display: block;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.modal-iframe {
  aspect-ratio: 16 / 9;
}

/* Modal text side */
.modal-details-wrap {
  width: 35%;
  height: 100%;
  padding: 60px 40px;
  overflow-y: auto;
  border-left: 2px solid var(--color-blue);
  display: flex;
  flex-direction: column;
}

.modal-header-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.project-category {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-blue);
  border: 1px solid var(--color-blue);
  padding: 4px 10px;
  border-radius: 4px;
}

.project-year {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-gray);
  padding: 4px 0;
}

.modal-project-title {
  font-size: 2.2rem;
  color: var(--color-black);
  margin-bottom: 30px;
  letter-spacing: -0.02em;
}

.modal-meta-grid {
  border-top: 1.5px solid rgba(0, 0, 255, 0.1);
  border-bottom: 1.5px solid rgba(0, 0, 255, 0.1);
  padding: 20px 0;
  margin-bottom: 30px;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.meta-row:last-child {
  margin-bottom: 0;
}

.meta-label {
  font-size: 0.9rem;
  color: var(--color-gray);
  font-weight: 500;
}

.meta-value {
  font-size: 0.95rem;
  color: var(--color-black);
  font-weight: 600;
}

.modal-description-wrap {
  flex-grow: 1;
}

.modal-project-desc {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--color-gray);
  font-weight: 400;
}

/* Responsiveness */

/* Large Screens */
@media (max-width: 1400px) {
  .project-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Medium Screens (Tablets / Laptops) */
@media (max-width: 1024px) {
  --header-height: 70px;
  
  .split-layout {
    flex-direction: column;
  }
  
  .split-left, .split-right {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
  }
  
  .split-left {
    margin-bottom: 40px;
  }
  
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .modal-body {
    flex-direction: column;
  }
  
  .modal-media-wrap {
    width: 100%;
    height: 50%;
  }
  
  .modal-details-wrap {
    width: 100%;
    height: 50%;
    border-left: none;
    border-top: 2px solid var(--color-blue);
    padding: 30px;
  }
  
  .modal-content-wrap {
    height: 80vh;
  }
}

/* Small Screens (Mobile) */
@media (max-width: 768px) {
  .header-container {
    padding: 0 20px;
  }
  
  .nav-menu {
    display: none; /* Hide standard menu */
  }
  
  .mobile-toggle {
    display: flex; /* Show hamburger button */
  }
  
  .section {
    padding: 80px 20px;
  }
  
  .brand-title {
    font-size: 4.5rem;
  }
  
  .intro-headline {
    font-size: 2.2rem;
  }
  
  .about-headline {
    font-size: 2.2rem;
  }
  
  .project-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .contact-title {
    font-size: 2.4rem;
  }
  
  .contact-email {
    font-size: 1.4rem;
  }
  
  .contact-social {
    flex-wrap: wrap;
    gap: 20px;
  }
  
  .footer-container {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  
  .footer-meta {
    text-align: left;
  }
  
  .modal-content-wrap {
    width: 95%;
    height: 85vh;
  }
  
  .modal-close-btn {
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
  }
}

/* Logo & Info button header layout */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.info-btn {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-blue);
  border: 1.5px solid var(--color-blue);
  padding: 3px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
}

.info-btn:hover {
  background-color: var(--color-blue);
  color: var(--color-white);
}

/* Profile Modal Custom Styles */
.profile-modal-wrap {
  background-color: var(--color-white);
  border: 2.5px solid var(--color-blue);
  color: var(--color-blue);
}

.profile-modal-body {
  background-color: var(--color-white);
  color: var(--color-blue);
  display: flex;
  width: 100%;
  height: 100%;
}

.profile-left-col {
  width: 32%;
  padding: 60px 40px;
  border-right: 2px solid var(--color-blue);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.profile-right-col {
  width: 68%;
  padding: 60px 50px;
  overflow-y: auto;
}

.profile-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  color: var(--color-blue);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.profile-contact-info {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.5;
}

.profile-contact-info p {
  margin-bottom: 12px;
}

.profile-contact-info a {
  color: var(--color-blue);
  text-decoration: underline;
}

.profile-section {
  margin-bottom: 45px;
}

.profile-section:last-child {
  margin-bottom: 0;
}

.profile-section-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  text-transform: uppercase;
  border-bottom: 2px solid var(--color-blue);
  padding-bottom: 6px;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.profile-list {
  list-style: none;
}

.profile-list li {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 10px;
  position: relative;
  padding-left: 20px;
  font-weight: 500;
}

.profile-list li::before {
  content: '*';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--color-blue);
  font-weight: 800;
}

.profile-activity-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

/* Tablet & Mobile responsive for Profile Modal */
@media (max-width: 1024px) {
  .profile-modal-body {
    flex-direction: column;
  }
  
  .profile-left-col {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 2px solid var(--color-blue);
    padding: 30px 24px;
    gap: 20px;
  }
  
  .profile-right-col {
    width: 100%;
    height: calc(100% - 220px);
    padding: 30px 24px;
  }
  
  .profile-activity-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .profile-title {
    font-size: 2.2rem;
  }
}

@media (max-width: 768px) {
  .profile-modal-wrap {
    width: 95%;
    height: 85vh;
  }
}

/* Homepage Intro Animation Styles */
#intro-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--color-white);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  pointer-events: auto;
}

#intro-logo-img {
  position: absolute;
  width: 400px;
  max-width: 80vw;
  height: auto;
  transform: scale(1);
  opacity: 1;
  transition: transform 0.4s cubic-bezier(0.85, 0, 0.15, 1), opacity 0.4s ease;
  z-index: 2;
  will-change: transform, opacity;
}

#intro-blue-circle {
  position: absolute;
  width: 90px;
  height: 90px;
  background-color: var(--color-blue);
  border-radius: 50%;
  transform: scale(0);
  transition: transform 0.4s cubic-bezier(0.85, 0, 0.15, 1);
  z-index: 1;
  will-change: transform;
}

#intro-overlay.masked {
  mask: url(#reveal-mask);
  -webkit-mask: url(#reveal-mask);
}

#mask-circle {
  transform: scale(0);
  transform-origin: center;
  transition: transform 0.8s cubic-bezier(0.85, 0, 0.15, 1);
  will-change: transform;
}

/* Hero section '디자이너' fade-in, slide-down animation */
.intro-section .accent-blue-text {
  display: inline-block;
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

body.intro-complete .intro-section .accent-blue-text {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.5s;
}

/* Image Cycler for Project 22 */
.image-cycler {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.image-cycler img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.image-cycler img.active {
  opacity: 1;
}
