/* ============================================================
   ICEconchy — personal hub
   Theme: icy glassmorphism (ICE + conch). Dark by default.
   ============================================================ */

:root {
  --bg: #05121c;
  --bg-2: #071b29;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-strong: rgba(255, 255, 255, 0.10);
  --border: rgba(150, 220, 255, 0.16);
  --border-strong: rgba(150, 220, 255, 0.32);
  --text: #e8f6ff;
  --text-dim: #9fc2d6;
  --accent: #46e0e0;      /* icy cyan */
  --accent-2: #7aa8ff;    /* cool blue */
  --accent-warm: #ffb9a3; /* conch blush */
  --shadow: 0 8px 40px rgba(0, 20, 40, 0.55);
  --radius: 18px;
  --maxw: 1040px;
}

:root[data-theme="light"] {
  --bg: #eaf6fb;
  --bg-2: #dceff7;
  --surface: rgba(255, 255, 255, 0.65);
  --surface-strong: rgba(255, 255, 255, 0.85);
  --border: rgba(20, 90, 120, 0.16);
  --border-strong: rgba(20, 90, 120, 0.30);
  --text: #0a2432;
  --text-dim: #4a7185;
  --accent: #0aa5b5;
  --accent-2: #3a68d8;
  --accent-warm: #d9714f;
  --shadow: 0 8px 40px rgba(30, 80, 110, 0.18);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(70, 224, 224, 0.10), transparent 60%),
    radial-gradient(900px 500px at 0% 20%, rgba(122, 168, 255, 0.10), transparent 55%),
    linear-gradient(160deg, var(--bg), var(--bg-2));
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }

/* ---------- animated aurora background ---------- */
.bg-orbs {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  filter: blur(60px);
  animation: aurora-hue 34s linear infinite;
  will-change: filter;
}
.orb {
  position: absolute; border-radius: 50%; opacity: 0.5;
  will-change: transform, opacity;
}
.orb-1 { width: 340px; height: 340px; top: -60px; right: -40px;
  background: radial-gradient(circle, var(--accent), transparent 70%);
  animation: drift-1 22s ease-in-out infinite; }
.orb-2 { width: 300px; height: 300px; top: 40%; left: -80px;
  background: radial-gradient(circle, var(--accent-2), transparent 70%);
  animation: drift-2 28s ease-in-out infinite; }
.orb-3 { width: 260px; height: 260px; bottom: -60px; right: 20%;
  background: radial-gradient(circle, var(--accent-warm), transparent 70%); opacity: 0.35;
  animation: drift-3 34s ease-in-out infinite; }

/* slow hue shift across the whole orb layer — the "breathing" aurora */
@keyframes aurora-hue {
  0%   { filter: blur(60px) hue-rotate(0deg); }
  50%  { filter: blur(60px) hue-rotate(22deg); }
  100% { filter: blur(60px) hue-rotate(0deg); }
}

/* each orb drifts on its own slow looping path (transform + opacity only) */
@keyframes drift-1 {
  0%,100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
  33%     { transform: translate(-60px, 50px) scale(1.12); opacity: 0.62; }
  66%     { transform: translate(30px, 90px) scale(0.95); opacity: 0.45; }
}
@keyframes drift-2 {
  0%,100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
  40%     { transform: translate(80px, -40px) scale(1.15); opacity: 0.6; }
  75%     { transform: translate(120px, 40px) scale(0.9); opacity: 0.42; }
}
@keyframes drift-3 {
  0%,100% { transform: translate(0, 0) scale(1); opacity: 0.35; }
  50%     { transform: translate(-70px, -60px) scale(1.2); opacity: 0.5; }
}

/* ---------- glass utility ---------- */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: var(--shadow);
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.85rem clamp(1rem, 4vw, 2rem);
  background: color-mix(in oklab, var(--bg) 65%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex; align-items: center; gap: 0.55rem;
  font-weight: 700; font-size: 1.05rem; color: var(--text); letter-spacing: 0.2px;
}
.brand:hover { color: var(--text); }
.brand-mark { width: 26px; height: 26px; color: var(--accent); }

.nav { display: flex; align-items: center; gap: 1.25rem; }
.nav a { color: var(--text-dim); font-weight: 500; font-size: 0.95rem; }
.nav a:hover { color: var(--text); }

.theme-toggle {
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); width: 38px; height: 38px; border-radius: 50%;
  cursor: pointer; font-size: 1.1rem; line-height: 1; display: grid; place-items: center;
  transition: transform 0.2s, border-color 0.2s;
}
.theme-toggle:hover { transform: rotate(180deg); border-color: var(--border-strong); }

/* ---------- layout ---------- */
main { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem); }

.section { padding: clamp(3rem, 8vw, 5rem) 0 1rem; }
.section-head { margin-bottom: 1.75rem; }
.section-head h2 {
  font-size: clamp(1.5rem, 4vw, 2rem); margin: 0 0 0.35rem;
  letter-spacing: -0.5px;
}
.section-note { color: var(--text-dim); margin: 0; font-size: 0.95rem; }
.section-note code {
  background: var(--surface-strong); padding: 0.1em 0.4em; border-radius: 6px;
  font-size: 0.85em; border: 1px solid var(--border);
}

/* ---------- hero ---------- */
.hero { padding: clamp(3.5rem, 12vw, 7rem) 0 1rem; }
.eyebrow {
  color: var(--accent); text-transform: uppercase; letter-spacing: 3px;
  font-size: 0.8rem; font-weight: 600; margin: 0 0 0.5rem;
}
.hero-title {
  font-size: clamp(2.8rem, 10vw, 5rem); margin: 0; line-height: 1.02;
  letter-spacing: -2px; font-weight: 800;
  background: linear-gradient(120deg, var(--text), var(--accent) 60%, var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-tagline { font-size: clamp(1.05rem, 3vw, 1.35rem); max-width: 40ch; margin: 1.1rem 0 0; }
.hero-sub { display: block; color: var(--text-dim); font-size: 0.95rem; margin-top: 0.4rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.75rem 0 1.5rem; }
.btn {
  display: inline-block; padding: 0.7rem 1.35rem; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem; cursor: pointer;
  border: 1px solid transparent; transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #04121a; box-shadow: 0 6px 24px rgba(70, 224, 224, 0.3);
}
.btn-primary:hover { color: #04121a; }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { color: var(--text); border-color: var(--border-strong); }

.socials { list-style: none; display: flex; flex-wrap: wrap; gap: 1.25rem; padding: 0; margin: 0; }
.socials a { color: var(--text-dim); font-size: 0.95rem; font-weight: 500; }
.socials a:hover { color: var(--accent); }
a[data-placeholder] { border-bottom: 1px dashed var(--border-strong); }

/* ---------- cards / projects ---------- */
.cards {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem 1.35rem;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  display: flex; flex-direction: column; gap: 0.6rem; min-height: 150px;
  transition: transform 0.18s, border-color 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.card h3 { margin: 0; font-size: 1.1rem; }
.card h3 a { color: var(--text); }
.card h3 a:hover { color: var(--accent); }
.card p { margin: 0; color: var(--text-dim); font-size: 0.92rem; flex: 1; }
.card-meta {
  display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center;
  font-size: 0.82rem; color: var(--text-dim); margin-top: 0.35rem;
}
.card-meta .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 0.35rem; vertical-align: -1px; }
.card-meta span { display: inline-flex; align-items: center; }

.skeleton {
  position: relative; overflow: hidden; border-color: var(--border);
}
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, var(--surface-strong), transparent);
  transform: translateX(-100%); animation: shimmer 1.4s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }

.fallback { color: var(--text-dim); margin-top: 1rem; }

/* ---------- notes ---------- */
.notes { display: grid; gap: 0.75rem; }
.note {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 1rem 1.25rem;
  display: flex; justify-content: space-between; gap: 1rem; align-items: baseline;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.2s, transform 0.15s;
}
.note:hover { border-color: var(--border-strong); transform: translateX(3px); }
.note-title { font-weight: 600; color: var(--text); }
.note-title:hover { color: var(--accent); }
.note-desc { color: var(--text-dim); font-size: 0.9rem; margin-top: 0.15rem; }
.note-date { color: var(--text-dim); font-size: 0.82rem; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- about ---------- */
.about-body { padding: 1.75rem; max-width: 720px; }
.about-body p { margin: 0 0 1rem; }
.facts { display: grid; gap: 0.75rem; margin: 1.25rem 0 0; }
.facts > div { display: grid; grid-template-columns: 120px 1fr; gap: 0.75rem; }
.facts dt { color: var(--accent); font-weight: 600; font-size: 0.9rem; }
.facts dd { margin: 0; color: var(--text-dim); }

/* ---------- footer ---------- */
.site-footer {
  text-align: center; padding: 3rem 1rem 2rem;
  color: var(--text-dim); font-size: 0.85rem; margin-top: 2rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 560px) {
  .nav { gap: 0.85rem; }
  .nav a { font-size: 0.9rem; }
  .facts > div { grid-template-columns: 1fr; gap: 0.15rem; }
  .note { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto; }
}
