/* thehkk.com — shared stylesheet */

:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --surface-2: #f4f4f5;
  --text: #18181b;
  --text-muted: #63636e;
  --border: #e7e7ea;
  --accent: #6366f1;
  --accent-2: #a855f7;
  --accent-soft: rgba(99, 102, 241, 0.1);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 32px rgba(0, 0, 0, 0.07);
  --radius: 16px;
  --max-width: 800px;
  --font-display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

:root[data-theme="dark"] {
  --bg: #0b0b0e;
  --surface: #141419;
  --surface-2: #1c1c22;
  --text: #ededf0;
  --text-muted: #9d9dab;
  --border: #26262e;
  --accent: #818cf8;
  --accent-2: #c084fc;
  --accent-soft: rgba(129, 140, 248, 0.12);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.5);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16.5px;
  transition: background-color 0.35s ease, color 0.35s ease;
  overflow-x: hidden;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

::selection {
  background: var(--accent);
  color: #fff;
}

/* ---------- Header / nav ---------- */

header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.35s ease, border-color 0.35s ease;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

nav .brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  text-decoration: none;
  color: var(--text);
  letter-spacing: -0.02em;
}

nav .brand span {
  color: var(--accent);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-right a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-right a:hover,
.nav-right a[aria-current="page"] {
  color: var(--text);
}

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, background-color 0.35s ease;
}

.theme-toggle:hover {
  border-color: var(--accent);
  transform: rotate(15deg) scale(1.06);
}

.theme-toggle svg {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

:root[data-theme="light"] .theme-toggle .icon-moon {
  display: block;
}

/* ---------- Main / typography ---------- */

main {
  padding: 48px 0 80px;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 7vw, 56px);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 30px);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 16px;
}

h3 {
  font-family: var(--font-display);
  font-size: 18.5px;
  letter-spacing: -0.01em;
  margin: 28px 0 8px;
}

p {
  margin-bottom: 16px;
}

.muted {
  color: var(--text-muted);
}

.lede {
  font-size: clamp(17px, 2.5vw, 20px);
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 620px;
}

a {
  color: var(--accent);
}

ul,
ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

li {
  margin-bottom: 6px;
}

.grad {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Section label (eyebrow) */
.section-label {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

section {
  padding: 44px 0;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 72px 0 56px;
}

.hero-bg {
  position: absolute;
  inset: -40% -20% auto;
  height: 140%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  animation: drift 16s ease-in-out infinite alternate;
}

.blob-1 {
  width: 420px;
  height: 420px;
  background: var(--accent);
  top: 8%;
  left: -6%;
}

.blob-2 {
  width: 360px;
  height: 360px;
  background: var(--accent-2);
  top: 20%;
  right: -4%;
  animation-delay: -8s;
}

:root[data-theme="dark"] .blob {
  opacity: 0.22;
}

@keyframes drift {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(60px, 40px) scale(1.15);
  }
}

.hero .eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.hero .location {
  font-size: 15px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
}

.hero .location .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.22);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(34, 197, 94, 0.06);
  }
}

/* Load-in stagger for hero */
.hero .fade-up {
  opacity: 0;
  transform: translateY(18px);
  animation: fadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero .fade-up:nth-child(2) {
  animation-delay: 0.08s;
}
.hero .fade-up:nth-child(3) {
  animation-delay: 0.16s;
}
.hero .fade-up:nth-child(4) {
  animation-delay: 0.24s;
}
.hero .fade-up:nth-child(5) {
  animation-delay: 0.32s;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 8px 0;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 18px;
  transition: border-color 0.2s ease, transform 0.2s ease, background-color 0.35s ease;
}

.stat:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.stat .num {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.5vw, 32px);
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat .label {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-top: 4px;
}

@media (max-width: 640px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Experience timeline ---------- */

.timeline {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--accent-2), transparent);
  opacity: 0.35;
}

.timeline > li {
  position: relative;
  padding: 0 0 36px 36px;
  margin: 0;
}

.timeline > li:last-child {
  padding-bottom: 0;
}

.timeline > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent);
  transition: background-color 0.35s ease;
}

.timeline .role {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17.5px;
  letter-spacing: -0.01em;
}

.timeline .role .company {
  color: var(--accent);
}

.timeline .meta {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 2px 0 8px;
}

.timeline p {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 10px;
  max-width: 640px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.tags li {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 9px;
  margin: 0;
  transition: background-color 0.35s ease, border-color 0.35s ease;
}

/* ---------- Skills ---------- */

.skill-groups {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 8px;
}

.skill-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.2s ease, transform 0.2s ease, background-color 0.35s ease;
}

.skill-group:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.skill-group h3 {
  margin: 0 0 10px;
  font-size: 15px;
  color: var(--accent);
}

@media (max-width: 640px) {
  .skill-groups {
    grid-template-columns: 1fr;
  }
}

/* Chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chips li {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 4px 13px;
  font-size: 13.5px;
  font-weight: 500;
  margin: 0;
  transition: transform 0.15s ease;
}

.chips li:hover {
  transform: translateY(-2px);
}

/* ---------- Cards (apps grid) ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  text-decoration: none;
  color: var(--text);
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.25s ease, background-color 0.35s ease;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.card:hover::after {
  transform: scaleX(1);
}

.card .app-icon {
  font-size: 36px;
  line-height: 1;
  margin-bottom: 14px;
  display: block;
}

.card h3 {
  margin: 0 0 6px;
}

.card p {
  color: var(--text-muted);
  font-size: 15px;
  margin: 0;
}

.card .card-cta {
  display: inline-block;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #ffffff;
  text-decoration: none;
  padding: 11px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-soft), 0 4px 12px rgba(0, 0, 0, 0.12);
}

.btn.secondary {
  background: var(--surface);
  color: var(--accent);
  border: 1px solid var(--border);
}

.btn.secondary:hover {
  border-color: var(--accent);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0;
}

/* ---------- Contact ---------- */

.contact-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: background-color 0.35s ease, border-color 0.35s ease;
}

.contact-box::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.contact-box h2 {
  margin-bottom: 8px;
}

.contact-box p {
  max-width: 460px;
  margin: 0 auto 20px;
  color: var(--text-muted);
}

/* ---------- Breadcrumb / legal ---------- */

.breadcrumb {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.breadcrumb a {
  color: var(--text-muted);
}

.updated {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  font-size: 14px;
  color: var(--text-muted);
  transition: border-color 0.35s ease;
}

footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
}

footer a {
  color: var(--text-muted);
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero .fade-up,
  .reveal {
    opacity: 1;
    transform: none;
  }
}
