/* ryangil.com: responsive, light/dark, no external fonts */
:root {
  --bg: #f7f8fc;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --fg: #0b1020;
  --muted: #4b5568;
  --line: rgba(15, 23, 42, 0.09);
  --a1: #6366f1;
  --a2: #06b6d4;
  --a3: #a855f7;
  --accent: #4f46e5;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px -12px rgba(15, 23, 42, .18);
  --radius: 20px;
  --font: "Pretendard Variable", Pretendard, system-ui, -apple-system, "Segoe UI", Roboto, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #070a14; --surface: rgba(17, 24, 44, 0.62); --surface-solid: #0f1528; --fg: #e8ecf7; --muted: #9aa4bd;
    --line: rgba(255, 255, 255, 0.08); --accent: #8b8cf8;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px -16px rgba(0, 0, 0, .6); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #070a14; --surface: rgba(17, 24, 44, 0.62); --surface-solid: #0f1528; --fg: #e8ecf7; --muted: #9aa4bd;
  --line: rgba(255, 255, 255, 0.08); --accent: #8b8cf8;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px -16px rgba(0, 0, 0, .6); color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 17px/1.7 var(--font); word-break: keep-all; overflow-wrap: break-word; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { letter-spacing: -0.025em; line-height: 1.2; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 50; background: var(--fg); color: var(--bg); padding: 8px 12px; border-radius: 10px; }
:focus-visible { outline: 3px solid var(--a1); outline-offset: 3px; border-radius: 8px; }

/* aurora background */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora i { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; filter: blur(80px); opacity: .32; animation: drift 26s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { background: var(--a1); top: -18vmax; left: -10vmax; }
.aurora i:nth-child(2) { background: var(--a2); top: 10vmax; right: -16vmax; animation-delay: -8s; opacity: .22; }
.aurora i:nth-child(3) { background: var(--a3); bottom: -22vmax; left: 20vmax; animation-delay: -16s; opacity: .18; }
@keyframes drift { to { transform: translate3d(6vmax, 4vmax, 0) scale(1.12); } }

/* header */
header.top { position: sticky; top: 0; z-index: 20; transition: background .25s, box-shadow .25s; }
header.top.scrolled { background: var(--surface); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); box-shadow: 0 1px 0 var(--line); }
header nav { position: relative; max-width: 1120px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--fg); text-decoration: none; margin-right: auto; white-space: nowrap; }
.brand img { border-radius: 50%; }
.links { display: flex; gap: 4px; }
.links a { color: var(--muted); text-decoration: none; font-size: 15px; padding: 6px 12px; border-radius: 999px; transition: color .2s, background .2s; }
.links a:hover { color: var(--fg); background: var(--line); }
.tools { display: flex; align-items: center; gap: 8px; }
.langs { display: flex; padding: 3px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.langs a { padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--muted); text-decoration: none; }
.langs a[aria-current="page"] { background: var(--fg); color: var(--bg); }
.icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--fg); cursor: pointer; }
.burger { display: none; }
.burger span { display: block; width: 16px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .25s; }
.burger span + span { margin-top: 4px; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(3px) rotate(45deg); }
.burger[aria-expanded="true"] span + span { transform: translateY(-3px) rotate(-45deg); margin-top: 0; }

/* layout */
main { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
section { padding: 88px 0 0; }
h2 { font-size: clamp(28px, 4vw, 40px); margin: 0 0 28px; }
h2::after { content: ""; display: block; width: 44px; height: 4px; margin-top: 14px; border-radius: 4px; background: linear-gradient(90deg, var(--a1), var(--a2)); }
p { margin: 0 0 14px; }

/* hero */
.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center; padding-top: 56px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--muted); padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); backdrop-filter: blur(8px); margin: 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; animation: ping 2.4s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); } 70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
h1 { font-size: clamp(38px, 7vw, 76px); font-weight: 800; margin: 20px 0 8px; }
.grad { background: linear-gradient(110deg, var(--fg) 20%, var(--a1) 55%, var(--a2) 80%); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% 100%; animation: shine 9s ease-in-out infinite alternate; }
@keyframes shine { to { background-position: 100% 0; } }
.sub { color: var(--muted); font-size: 18px; margin-bottom: 22px; }
.lead { font-size: clamp(18px, 2vw, 21px); color: var(--fg); max-width: 640px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 700; font-size: 15.5px; text-decoration: none; transition: transform .2s, box-shadow .2s, background .2s; }
.btn.primary { color: #fff; background: linear-gradient(120deg, var(--a1), var(--a3)); box-shadow: 0 10px 24px -10px var(--a1); }
.btn.ghost { color: var(--fg); background: var(--surface); border: 1px solid var(--line); backdrop-filter: blur(8px); }
.btn:hover { transform: translateY(-2px); }
.btn.primary:hover { box-shadow: 0 16px 30px -12px var(--a1); }

.hero-photo { justify-self: center; }
@property --angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.ring { position: relative; width: min(340px, 70vw); aspect-ratio: 1; border-radius: 50%; padding: 6px; background: conic-gradient(from var(--angle), var(--a1), var(--a2), var(--a3), var(--a1)); animation: spin 8s linear infinite; box-shadow: 0 30px 60px -30px var(--a1); }
.ring img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 6px solid var(--bg); background: #fff; }
@keyframes spin { to { --angle: 360deg; } }

.stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 8px; }
.stat { padding: 20px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); backdrop-filter: blur(10px); box-shadow: var(--shadow); }
.stat b { display: block; font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -0.02em; background: linear-gradient(120deg, var(--a1), var(--a2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { font-size: 14px; color: var(--muted); line-height: 1.4; display: block; margin-top: 4px; }

/* about */
.prose { max-width: 760px; font-size: 18px; }
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 26px; }
.bento-card, .skill, .card { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); backdrop-filter: blur(10px); transition: transform .25s, border-color .25s; }
.bento-card::before, .skill::before, .card::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--a1) 16%, transparent), transparent 60%); }
.bento-card:hover::before, .skill:hover::before, .card:hover::before { opacity: 1; }
.bento-card:hover, .skill:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--a1) 40%, var(--line)); }
.bento-card { padding: 22px; }
.bento-card h3 { font-size: 17px; margin: 0 0 8px; }
.bento-card p { font-size: 15px; color: var(--muted); margin: 0; line-height: 1.6; }

/* projects */
.card { padding: 28px; margin-bottom: 22px; }
.card:hover { border-color: color-mix(in srgb, var(--a1) 35%, var(--line)); }
.card-head { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 16px; }
.num { flex: none; font-size: 15px; font-weight: 800; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; color: #fff; background: linear-gradient(135deg, var(--a1), var(--a3)); }
.card h3 { font-size: clamp(19px, 2.2vw, 23px); margin: 2px 0 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span, .tags span { font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--a1) 10%, transparent); color: var(--fg); border: 1px solid var(--line); }
.card-body { max-width: 820px; }
.card-body ul { padding-left: 0; list-style: none; margin: 14px 0; display: grid; gap: 8px; }
.card-body li { position: relative; padding-left: 26px; }
.card-body li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 10px; height: 10px; border-radius: 3px; background: linear-gradient(135deg, var(--a1), var(--a2)); }
figure { margin: 20px 0 0; }
figure img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); background: #fff; transition: transform .35s; }
figure a:hover img { transform: scale(1.01); }

/* career timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 22px; border-left: 2px solid var(--line); display: grid; gap: 4px; }
.timeline li { position: relative; display: grid; grid-template-columns: 200px 1fr; gap: 16px; padding: 12px 16px; border-radius: 14px; transition: background .2s; }
.timeline li:hover { background: var(--surface); }
.timeline li::before { content: ""; position: absolute; left: -30px; top: 20px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 3px solid var(--a1); }
.timeline li:first-child::before { background: var(--a1); box-shadow: 0 0 0 6px color-mix(in srgb, var(--a1) 22%, transparent); }
.timeline time { color: var(--muted); font-size: 14.5px; font-variant-numeric: tabular-nums; padding-top: 2px; }
.timeline b { display: block; font-size: 16.5px; }
.timeline span { color: var(--muted); font-size: 15px; }

/* skills */
.skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.skill { padding: 22px; }
.skill h3 { font-size: 17px; margin: 0 0 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* education */
.edus { display: grid; gap: 10px; }
.edu { display: grid; grid-template-columns: 160px 1fr; gap: 16px; padding: 16px 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.edu span { font-weight: 700; color: var(--muted); font-size: 14.5px; }
.edu p { margin: 0; }

/* contact */
.contact-panel { text-align: center; padding: clamp(36px, 6vw, 64px) 24px; border-radius: 28px; color: #fff; background: radial-gradient(120% 140% at 0% 0%, var(--a1), transparent 60%), radial-gradient(120% 140% at 100% 100%, var(--a2), transparent 55%), #1e1b4b; box-shadow: var(--shadow); }
.contact-panel h2 { color: #fff; }
.contact-panel h2::after { margin: 14px auto 0; background: #fff; }
.contact-panel p { font-size: 19px; opacity: .92; }
.contact-panel .cta { justify-content: center; }
.contact-panel .btn.primary { background: #fff; color: #1e1b4b; box-shadow: none; }
.contact-panel .btn.ghost { color: #fff; background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); }

footer { max-width: 1120px; margin: 72px auto 0; padding: 28px 24px 48px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
footer p { margin: 0; }
footer a { color: var(--muted); }

/* reveal on scroll (only when JS runs) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

/* tablet */
@media (max-width: 960px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
/* mobile */
@media (max-width: 860px) {
  .burger { display: grid; }
  .links { position: absolute; top: 62px; left: 12px; right: 12px; flex-direction: column; gap: 2px; padding: 10px; border-radius: 18px; background: var(--surface-solid); border: 1px solid var(--line); box-shadow: var(--shadow); opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .2s, transform .2s; }
  .links.open { opacity: 1; transform: none; pointer-events: auto; }
  .links a { padding: 12px 14px; font-size: 16px; }
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 28px; }
  .hero-photo { order: -1; justify-self: start; }
  .ring { width: 160px; padding: 4px; }
  .ring img { border-width: 4px; }
  section { padding-top: 64px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  header nav { padding: 10px 16px; gap: 10px; }
  main { padding: 0 16px; }
  .bento, .skills { grid-template-columns: 1fr; }
  .stats { gap: 10px; }
  .stat { padding: 16px 14px; }
  .card { padding: 20px; }
  .card-head { gap: 12px; }
  .num { width: 38px; height: 38px; border-radius: 12px; font-size: 13px; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; padding: 10px 12px; }
  .edu { grid-template-columns: 1fr; gap: 4px; }
  .langs a { padding: 3px 8px; }
  .cta .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
