/* style.css */

:root {
  --radius: 0.5rem;
  
  /* Light Theme HSL Values */
  --background: 0 0% 100%;
  --foreground: 222.2 84% 4.9%;
  --card: 0 0% 100%;
  --card-foreground: 222.2 84% 4.9%;
  --primary: 222.2 47.4% 11.2%;
  --primary-foreground: 210 40% 98%;
  --secondary: 210 40% 96.1%;
  --secondary-foreground: 222.2 47.4% 11.2%;
  --muted: 210 40% 96.1%;
  --muted-foreground: 215.4 16.3% 46.9%;
  --accent: 210 40% 96.1%;
  --accent-foreground: 222.2 47.4% 11.2%;
  --border: 214.3 32% 91.4%;
  --input: 214.3 32% 91.4%;
  
  /* Shadow presets */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.dark {
  /* Dark Theme HSL Values */
  --background: 222.2 84% 4.9%;
  --foreground: 210 40% 98%;
  --card: 222.2 84% 8%;
  --card-foreground: 210 40% 98%;
  --primary: 210 40% 98%;
  --primary-foreground: 222.2 47.4% 11.2%;
  --secondary: 217.2 32.6% 17.5%;
  --secondary-foreground: 210 40% 98%;
  --muted: 217.2 32.6% 17.5%;
  --muted-foreground: 215.4 16.3% 56.9%;
  --accent: 217.2 32.6% 17.5%;
  --accent-foreground: 210 40% 98%;
  --border: 217.2 32.6% 17.5%;
  --input: 217.2 32.6% 17.5%;

  /* Shadow presets dark */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
}

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

body {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic", sans-serif;
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
  flex: 1;
}

/* Header & GNB */
header {
  border-bottom: 1px solid hsl(var(--border));
  background-color: hsl(var(--background) / 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  font-size: 1.25rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  text-decoration: none;
  letter-spacing: -0.5px;
}

/* Nav Menu */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.5rem;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--foreground) / 0.8);
  text-decoration: none;
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  color: hsl(var(--foreground));
  background-color: hsl(var(--secondary));
}

/* Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  list-style: none;
  min-width: 160px;
  padding: 0.5rem;
  display: none;
  box-shadow: var(--shadow-md);
  margin-top: 0.25rem;
  animation: fadeIn 0.15s ease;
}

.dropdown-menu li a {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: hsl(var(--foreground) / 0.8);
  text-decoration: none;
  border-radius: calc(var(--radius) - 2px);
  transition: all 0.2s ease;
}

.dropdown-menu li a:hover {
  color: hsl(var(--foreground));
  background-color: hsl(var(--secondary));
  transform: translateX(2px);
}

.nav-item:hover .dropdown-menu {
  display: block;
}

/* Utilities / Theme Toggle Button */
.theme-toggle-btn {
  background-color: hsl(var(--secondary));
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  background-color: hsl(var(--accent));
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.theme-toggle-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Mobile Toggle Hamburger */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: hsl(var(--foreground));
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-toggle svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* Hero Section */
.hero {
  background-color: hsl(var(--secondary));
  border-radius: calc(var(--radius) + 2px);
  padding: 3rem 2rem;
  margin-bottom: 2rem;
  text-align: center;
  border: 1px solid hsl(var(--border));
}

.hero h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

.hero p {
  color: hsl(var(--muted-foreground));
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Placeholder Content Area */
.placeholder-content {
  border: 2px dashed hsl(var(--border));
  border-radius: var(--radius);
  padding: 4rem 2rem;
  text-align: center;
  color: hsl(var(--muted-foreground));
  margin-top: 1rem;
}

/* Grid Layouts for visual scaffolding */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

/* Cards (Wireframe style but modern) */
.card {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card-desc {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

/* Footer */
footer {
  border-top: 1px solid hsl(var(--border));
  padding: 2rem 1rem;
  text-align: center;
  background-color: hsl(var(--background));
  margin-top: auto;
}

footer p {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

/* Keyframes */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Styles */
@media (max-width: 768px) {
  .mobile-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: hsl(var(--background));
    border-bottom: 1px solid hsl(var(--border));
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    align-items: stretch;
    box-shadow: var(--shadow-md);
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-links {
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
  }

  .nav-item {
    width: 100%;
  }

  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    border-left: 2px solid hsl(var(--border));
    border-radius: 0;
    margin-left: 1rem;
    margin-top: 0.5rem;
    padding: 0 0 0 0.5rem;
    display: block; /* Show hierarchy directly on mobile */
  }

  .grid-2, .grid-3, .grid-5 {
    grid-template-columns: 1fr;
  }
}

/* About Page Specific Styles */
.about-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
  align-items: start;
  margin-top: 1.5rem;
}

.profile-card {
  text-align: center;
  padding: 2rem 1.5rem;
}

.profile-img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid hsl(var(--border));
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease;
}

.profile-card:hover .profile-img {
  transform: scale(1.05);
}

.about-text {
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

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

@media (max-width: 768px) {
  .about-layout {
    grid-template-columns: 1fr;
  }
}

/* Contact List Styles */
.contact-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.contact-item strong {
  min-width: 90px;
  color: hsl(var(--muted-foreground));
}

.contact-item a {
  color: hsl(var(--foreground));
  text-decoration: none;
  border-bottom: 1px dashed hsl(var(--border));
  transition: all 0.2s ease;
}

.contact-item a:hover {
  color: hsl(var(--foreground));
  border-bottom-style: solid;
}


/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  display: flex;
  opacity: 1;
}

.modal-content {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  max-width: 600px;
  width: 90%;
  padding: 2rem;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: modalFadeIn 0.3s ease;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: hsl(var(--foreground));
  cursor: pointer;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: hsl(var(--muted-foreground));
}

#modal-img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

#modal-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

#modal-desc {
  font-size: 0.95rem;
  line-height: 1.8;
  color: hsl(var(--foreground) / 0.9);
}

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

/* Specific Project Card Styles */
.project-card {
  cursor: pointer;
  padding: 0;
  overflow: hidden;
}

.project-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-bottom: 1px solid hsl(var(--border));
  transition: transform 0.3s ease;
}

.project-card:hover img {
  transform: scale(1.05);
}

.project-card-info {
  padding: 1rem;
}

.project-card .card-title {
  font-size: 1rem;
  margin-bottom: 0;
}


