/*
Theme Name: Ortyx CV
Theme URI: https://ortyx.tech
Author: Linus Särnhult
Author URI: https://ortyx.tech
Description: A dark, single-page CV / résumé theme with a "frost & ember" identity — hero, stat strip, a vertical experience timeline, a domains grid, and social links. All content is editable from the WordPress admin (Customizer + Experience & Domain post types). Ships with a full CV as its defaults so it renders complete on activation.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ortyx-cv
*/

:root {
  --ground: #0b0f14;
  --panel: #121a21;
  --panel-2: #0f151b;
  --line: #263441;
  --text: #dde5eb;
  --muted: #7f8f9c;
  --muted-dim: #556472;
  --ice: #74d3e6;
  --ice-deep: #3ba7bd;
  --ember: #f0a35e;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "JetBrains Mono", "SF Mono", Consolas, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 600px at 82% -8%, rgba(116, 211, 230, 0.10), transparent 60%),
    radial-gradient(700px 500px at -10% 108%, rgba(59, 167, 189, 0.06), transparent 60%),
    var(--ground);
}
.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(129, 143, 156, 0.10) 1px, transparent 1.2px);
  background-size: 26px 26px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent 55%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent 55%);
}

.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 28px 120px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ice-deep);
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--ice-deep);
  opacity: 0.7;
}

h2 {
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 16px 0 0;
}

.cv-section { margin-top: 96px; }

.portrait {
  width: clamp(96px, 13vw, 128px);
  aspect-ratio: 1 / 1;
  padding: 3px;
  margin: 0 0 30px;
  border-radius: 50%;
  background: linear-gradient(150deg, var(--ice), var(--ice-deep) 45%, var(--line) 78%);
  box-shadow: 0 0 30px rgba(116, 211, 230, 0.13), 0 16px 36px rgba(0, 0, 0, 0.45);
}
.portrait img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--panel);
}
header.hero {
  padding-top: clamp(90px, 16vh, 160px);
}
.kicker {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.kicker .dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ice);
  box-shadow: 0 0 12px var(--ice);
  margin-right: 10px;
  vertical-align: middle;
}
h1 {
  font-size: clamp(2.7rem, 8.5vw, 5rem);
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: -0.035em;
  margin: 22px 0 0;
  text-wrap: balance;
}
h1 .frost {
  background: linear-gradient(120deg, #eaf7fb, var(--ice) 55%, var(--ice-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  font-size: clamp(1.05rem, 2.3vw, 1.28rem);
  color: var(--text);
  max-width: 56ch;
  margin: 28px 0 0;
}
.lede b { color: #fff; font-weight: 600; }
.lede .frost {
  background: linear-gradient(120deg, #eaf7fb, var(--ice) 55%, var(--ice-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 600;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: 30px;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
}
.meta-row span { display: inline-flex; align-items: center; gap: 8px; }
.meta-row span::before {
  content: "";
  width: 5px; height: 5px;
  background: var(--muted-dim);
  transform: rotate(45deg);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 54px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.stat { background: var(--panel); padding: 24px 22px; }
.stat .num {
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: #fff;
}
.stat .lbl {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 6px;
}

.domains {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 34px;
}
.domain {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  padding: 22px;
  transition: border-color .25s ease, transform .25s ease;
}
.domain:hover { border-color: var(--ice-deep); transform: translateY(-2px); }
.domain .idx {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ice-deep);
  letter-spacing: 0.1em;
}
.domain h3 {
  margin: 12px 0 8px;
  font-size: 1.12rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.domain p { margin: 0; color: var(--muted); font-size: 0.92rem; }

/* ---------- timeline ---------- */
.timeline { margin-top: 38px; }
.tl-item {
  position: relative;
  padding: 0 0 30px 32px;
  border-left: 1px solid var(--line);
}
.tl-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -6px; top: 4px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--ground);
  border: 2px solid var(--ice-deep);
}
.tl-item.now::before {
  background: var(--ice);
  border-color: var(--ice);
  box-shadow: 0 0 12px var(--ice);
}
.tl-when {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--ice-deep);
  font-variant-numeric: tabular-nums;
}
.tl-role { font-size: 1.1rem; font-weight: 650; letter-spacing: -0.01em; margin: 7px 0 3px; }
.tl-co { font-size: 0.94rem; }
.tl-co b { color: #fff; font-weight: 600; }
.tl-co span { color: var(--muted); }
.tl-desc { color: var(--muted); font-size: 0.92rem; margin: 11px 0 0; max-width: 62ch; }

/* ---------- links ---------- */
.links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 34px;
}
a.link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 18px 20px;
  transition: border-color .2s ease, background .2s ease;
}
a.link:hover, a.link:focus-visible { border-color: var(--ice); background: var(--panel-2); }
a.link:focus-visible { outline: 2px solid var(--ice); outline-offset: 2px; }
a.link .lname { font-weight: 600; }
a.link .lhandle { font-family: var(--mono); font-size: 0.82rem; color: var(--muted); }
a.link .arrow { color: var(--ice-deep); font-family: var(--mono); transition: transform .2s ease; }
a.link:hover .arrow { transform: translate(3px, -3px); color: var(--ice); }

footer.cv-footer {
  margin-top: 96px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--muted-dim);
}
footer.cv-footer a { color: var(--muted); text-decoration: none; }
footer.cv-footer a:hover { color: var(--ice); }

/* ---------- language switch ---------- */
.langswitch {
  position: fixed;
  top: 18px; right: 18px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 2px;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  background: rgba(15, 21, 27, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px;
}
.langswitch span, .langswitch a { padding: 3px 10px; border-radius: 999px; text-decoration: none; }
.langswitch .active { background: var(--ice); color: #08222a; font-weight: 700; }
.langswitch a { color: var(--muted); transition: color .2s ease, background .2s ease; }
.langswitch a:hover, .langswitch a:focus-visible { color: var(--ice); background: var(--panel); }
.langswitch a:focus-visible { outline: 2px solid var(--ice); outline-offset: 2px; }

.rise { opacity: 0; transform: translateY(18px); animation: rise .8s cubic-bezier(.2,.7,.3,1) forwards; }
.rise.d1 { animation-delay: .08s; }
.rise.d2 { animation-delay: .16s; }
.rise.d3 { animation-delay: .24s; }
.rise.d4 { animation-delay: .32s; }
@keyframes rise { to { opacity: 1; transform: none; } }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .rise, .reveal { animation: none !important; opacity: 1 !important; transform: none !important; transition: none !important; }
}

@media (max-width: 620px) {
  .stats { grid-template-columns: 1fr; }
  .domains, .links { grid-template-columns: 1fr; }
}
