/*
  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);
  --nick-buffer: 2px;  /* small safety space to avoid right-edge clipping */
  --nick-descender-pad: 0.05em; /* tiny bottom pad to protect descenders like 'g' */
}

* { 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(34px, 5.5vw, 58px);
  line-height: 1.12; /* add headroom so descenders fit without clipping */
  margin: 0 0 12px;
  letter-spacing: -0.02em;
  display: inline-block;
  cursor: default;
}
/* Nickname wrapper reserves width smoothly; inner text scales for visual polish */
.name .nickwrap {
  display: inline-block;
  width: 0;                /* no space by default (we keep a typed space before Park) */
  overflow: hidden;        /* prevent scrollbars; vertical fits due to increased line-height */
  vertical-align: baseline;
  text-align: left;        /* ensure reveal starts from the left edge */
  /* Give inner glyphs a hair of vertical room without changing overall layout height */
  padding-bottom: var(--nick-descender-pad);
  margin-bottom: calc(var(--nick-descender-pad) * -1);
  transition: width .35s cubic-bezier(.22,.61,.36,1), margin-left .35s cubic-bezier(.22,.61,.36,1);
}
.name:hover .nickwrap,
.name:focus .nickwrap {
  width: calc(var(--nick-width, 10ch) + var(--nick-buffer)); /* allocate space + tiny buffer */
  margin-left: 0.35em;            /* space after 'Daniel' */
}

.name .nickname {
  display: inline-block;
  white-space: nowrap;
  transform-origin: left;
  transform: scaleX(0.9);  /* start slightly compressed to avoid boundary pop */
  opacity: 0;
  will-change: transform, opacity;
  transition: transform .35s cubic-bezier(.22,.61,.36,1), opacity .2s ease;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0;       /* neutralize parent letter-spacing */
}
.name:hover .nickname,
.name:focus .nickname {
  transform: scaleX(1);
  opacity: 1;
}

.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; }
}
