/* ================================
   SEONG CHIHYUN Portfolio
   Design System Based CSS
================================ */

/* ---------- Design Tokens ---------- */
:root {
  --color-background: #ffffff;
  --color-surface: #f8f9fb;
  --color-text: #111827;
  --color-muted: #6b7280;
  --color-border: #e5e7eb;
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;

  --font-main: Inter, Pretendard, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 4rem;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-soft: 0 16px 40px rgba(17, 24, 39, 0.08);
  --shadow-card: 0 10px 30px rgba(17, 24, 39, 0.06);
}

/* ---------- Reset ---------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-main);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 32rem),
    var(--color-background);
  color: var(--color-text);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--color-primary);
  color: #ffffff;
}

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;

  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 1.25rem 8%;
  background: rgba(255, 255, 255, 0.84);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(16px);
}

.logo {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav a {
  position: relative;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-muted);
  transition: color 0.2s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;

  width: 0;
  height: 2px;
  background: var(--color-primary);
  border-radius: 999px;
  transition: width 0.2s ease;
}

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

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

/* ---------- Hero ---------- */
.hero {
  min-height: 88vh;
  padding: 8rem 8% 6rem;

  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-tag {
  width: fit-content;
  margin: 0 0 1.25rem;
  padding: 0.45rem 0.85rem;

  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-primary);

  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
}

.hero h1 {
  max-width: 900px;
  margin: 0;

  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.hero-description {
  max-width: 680px;
  margin: 1.75rem 0 0;

  font-size: clamp(1.05rem, 2vw, 1.35rem);
  color: var(--color-muted);
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 46px;
  padding: 0.8rem 1.2rem;

  font-size: 0.95rem;
  font-weight: 800;

  border-radius: 999px;
  border: 1px solid var(--color-border);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

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

.button.primary {
  color: #ffffff;
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.button.primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}

.button.secondary {
  color: var(--color-text);
  background: #ffffff;
}

.button.secondary:hover {
  border-color: var(--color-primary);
}

/* ---------- Sections ---------- */
.section {
  padding: 6rem 8%;
  border-top: 1px solid var(--color-border);
  scroll-margin-top: 90px;
}

.section-title {
  margin-bottom: 2rem;
}

.section-title p {
  margin: 0 0 0.5rem;

  font-size: 0.9rem;
  font-weight: 800;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.section-title h2 {
  margin: 0;

  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.section-content {
  max-width: 760px;
}

.section-content p,
.contact-section > p {
  margin: 0;

  font-size: 1.1rem;
  color: var(--color-muted);
}

/* ---------- Skills ---------- */
.skills-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.skill-group {
  padding: 1.5rem;

  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.skill-group h3 {
  margin: 0 0 1rem;

  font-size: 1.1rem;
  letter-spacing: -0.03em;
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.skill-list span,
.project-tags span {
  display: inline-flex;
  align-items: center;

  padding: 0.45rem 0.75rem;

  font-size: 0.88rem;
  font-weight: 700;
  color: #374151;

  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
}

/* ---------- Projects ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.project-card {
  position: relative;
  overflow: hidden;

  display: flex;
  flex-direction: column;

  min-height: 280px;
  padding: 1.6rem;

  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;

  height: 4px;
  background: linear-gradient(
    90deg,
    var(--color-primary),
    rgba(37, 99, 235, 0.25)
  );

  opacity: 0;
  transition: opacity 0.2s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: var(--shadow-soft);
}

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

.project-card h3 {
  margin: 0 0 0.8rem;

  font-size: 1.35rem;
  letter-spacing: -0.04em;
}

.project-card p {
  margin: 0;

  color: var(--color-muted);
  font-size: 0.98rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.2rem;
}

.project-links {
  display: flex;
  gap: 0.8rem;
  margin-top: auto;
  padding-top: 1.5rem;
}

.project-links a {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--color-primary);
}

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

/* ---------- Contact ---------- */
.contact-section {
  text-align: center;
}

.contact-section .section-title {
  margin-bottom: 1rem;
}

.contact-section > p {
  max-width: 620px;
  margin: 0 auto 1.8rem;
}

/* ---------- Footer ---------- */
.footer {
  padding: 2rem 8%;
  text-align: center;

  color: var(--color-muted);
  border-top: 1px solid var(--color-border);
}

.footer p {
  margin: 0;
  font-size: 0.95rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .skills-container,
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 6%;
  }

  .nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }

  .hero {
    min-height: auto;
    padding: 5rem 6% 4rem;
  }

  .hero h1 {
    font-size: clamp(2.7rem, 14vw, 4.5rem);
  }

  .hero-description {
    font-size: 1rem;
  }

  .section {
    padding: 4rem 6%;
  }

  .skills-container,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    min-height: auto;
  }
}

@media (max-width: 480px) {
  .nav a {
    font-size: 0.86rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

  .section-title h2 {
    font-size: 2rem;
  }
}
