/*
  Modern dark portfolio theme
  - Black background with subtle grid and glow accents
  - Clean typography (Inter)
  - Accessible contrast and focus states
*/

:root {
  --bg: #0b0b0f;
  --panel: #0f1016;
  --fg: #eaeaf0;
  --muted: #a8a8b3;
  --line: #1a1b24;
  --accent: #7c3aed;  /* violet */
  --accent-2: #06b6d4; /* cyan */
  --shadow: 0 10px 30px rgba(0,0,0,.45);
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  color: var(--fg);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(124, 58, 237, .18), transparent 60%),
    radial-gradient(800px 400px at 100% 0%, rgba(6, 182, 212, .16), transparent 60%),
    linear-gradient(transparent 0, rgba(255,255,255,0.02) 100%),
    var(--bg);
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Noto Sans", Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative; /* allow grid pseudo-element to sit behind content */
}

/* Subtle grid overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(to right, var(--line) 1px, transparent 1px),
                    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: .2;
  pointer-events: none;
  z-index: -1; /* grid behind all text/content */
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  background: var(--panel);
  outline: 2px solid var(--accent-2);
  border-radius: 8px;
}

/* Hero */
.hero {
  padding: 96px 0 32px;
  background: transparent;
}
.intro { text-align: left; }

.name {
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
  display: inline-block;
  cursor: default;
}
.name .nickname { /* (Dongin) pops in between without leaving a gap initially */
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  max-width: 0;           /* no layout space initially */
  opacity: 0;             /* visually hidden */
  transition: max-width .35s cubic-bezier(.22,.61,.36,1), opacity .2s ease, padding .35s cubic-bezier(.22,.61,.36,1);
  will-change: max-width, opacity, padding;
  color: var(--muted);
  font-weight: 400;
  padding: 0;             /* no spacing when hidden */
}
.name:hover .nickname,
.name:focus .nickname {
  max-width: 9ch;         /* enough for “(Dongin)” */
  opacity: 1;
  padding-left: 0.35em;   /* space before nickname */
  padding-right: 0;       /* rely on typed space before 'Park' */
}

.tagline {
  margin: 0 0 6px;
  color: var(--fg);
  font-weight: 600;
}

.bio {
  margin: 0;
  color: var(--muted);
  max-width: 70ch;
}

.meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 500;
}

.section {
  padding: 40px 0;
}
.section h2 {
  font-size: clamp(22px, 3.5vw, 28px);
  margin: 0 0 16px;
}
.section p { color: var(--muted); }

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 18px 18px 16px;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(124, 58, 237, .18), 0 10px 28px rgba(0,0,0,.55);
  border-color: rgba(124, 58, 237, .35);
}
.card .icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 10px;
  color: #d5ccff;
  background: radial-gradient(60% 60% at 30% 20%, rgba(124, 58, 237, .35), rgba(6, 182, 212, .15));
  border: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 10px;
}
.card h3 { margin: 6px 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); }

/* Badges */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0; margin: 8px 0 0;
  list-style: none;
}
.badge {
  padding: 8px 12px;
  font-size: 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  color: var(--fg);
}

.footer {
  padding: 36px 0 56px;
  color: var(--muted);
}
.footer .surname-inline { color: var(--fg); }

/* Focus outlines */
:focus { outline: none; }
.name:focus { outline: 2px solid var(--accent-2); outline-offset: 4px; border-radius: 6px; }

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
