/* Getij — teal & coral portfolio theme for Jekyll */
:root, [data-theme="light"] {
  --bg: #f9f9f9; --surface: #ffffff; --sidebar: #eef4f2; --sidebar-line: #e0ecea; --ink: #191919; --muted: #5c6b68;
  --line: #d6e7e4; --line-strong: #adcfc9; --heading: #191919; --brand: #1c6758; --link: #1c6758;
  --accent: #ff9779; --accent-hover: #ffac94; --accent-ink: #191919;
  --stripe-a: #e0ecea; --stripe-b: #eef4f2; --code-bg: #ebf3f1; --chip-bg: #eef4f2;
  --tok-key: #1c6758; --tok-str: #995b49; --tok-com: #5c8a80;
  --wave-1: #d6e7e4; --wave-2: #adcfc9; --wave-3: #1c6758;
}
[data-theme="dark"] {
  --bg: #0f2723; --surface: #143630; --sidebar: #0a1b18; --sidebar-line: #143630; --ink: #ebf3f1; --muted: #85b8ad;
  --line: #1f5247; --line-strong: #296d5f; --heading: #ebf3f1; --brand: #ebf3f1; --link: #85b8ad;
  --accent: #ff9779; --accent-hover: #ffc1af; --accent-ink: #191919;
  --stripe-a: #0f2723; --stripe-b: #143630; --code-bg: #0a1b18; --chip-bg: #143630;
  --tok-key: #85b8ad; --tok-str: #ffd5c9; --tok-com: #5ca092;
  --wave-1: #143630; --wave-2: #1f5247; --wave-3: #296d5f;
}
:root {
  --font: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --radius: 6px;
  --measure: 66ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.65 var(--font); }
::selection { background: var(--accent); color: var(--accent-ink); }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--link); text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; }

/* Shell */
.shell { display: grid; grid-template-columns: 272px minmax(0, 1fr); min-height: 100vh; }
.main { padding: 64px 72px 96px; max-width: 1100px; }

/* Sidebar */
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--sidebar); border-right: 1px solid var(--sidebar-line); padding: 40px 32px; display: flex; flex-direction: column; gap: 40px; }
.sidebar__id { display: flex; flex-direction: column; gap: 14px; text-decoration: none; }
.sidebar__avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.sidebar__avatar--empty { background: repeating-linear-gradient(135deg, var(--stripe-a) 0 6px, var(--bg) 6px 12px); }
.sidebar__name { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; color: var(--brand); }
.sidebar__tagline { margin: -26px 0 0; font-size: 13px; line-height: 1.6; color: var(--muted); }
.sidebar__nav { display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.sidebar__nav a { display: flex; align-items: center; gap: 12px; padding: 8px 0; color: var(--muted); text-decoration: none; }
.sidebar__nav a::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: transparent; flex: none; }
.sidebar__nav a:hover { color: var(--brand); }
.sidebar__nav a[aria-current="page"] { color: var(--brand); font-weight: 700; }
.sidebar__nav a[aria-current="page"]::before { background: var(--accent); }
.sidebar__foot { margin-top: auto; display: flex; flex-direction: column; gap: 20px; }
.sidebar__social { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.sidebar__social a { color: var(--brand); text-decoration-color: var(--line-strong); }
.theme-toggle { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; cursor: pointer; font: 12px var(--mono); color: var(--muted); }
.theme-toggle__track { width: 36px; height: 20px; border-radius: 99px; background: var(--line); border: 1px solid var(--line-strong); display: flex; align-items: center; padding: 2px; transition: background .2s; }
.theme-toggle__knob { width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .2s; }
[data-theme="dark"] .theme-toggle__track { background: var(--accent); border-color: var(--accent); }
[data-theme="dark"] .theme-toggle__knob { background: var(--accent-ink); transform: translateX(16px); }

/* Type */
h1, h2, h3 { color: var(--heading); line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(32px, 4vw, 40px); letter-spacing: -0.02em; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
p { text-wrap: pretty; }
.lead { font-size: 17px; color: var(--muted); max-width: var(--measure); margin: 0; }
.eyebrow { font: 13px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--link); margin: 0; }
.tag { font: 12px/1 var(--mono); padding: 5px 8px; border-radius: 99px; background: var(--chip-bg); color: var(--muted); border: 1px solid var(--line); }
.button { display: inline-block; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 15px; padding: 12px 22px; border-radius: 999px; text-decoration: none; }
.button:hover { background: var(--accent-hover); color: var(--accent-ink); }
.button--outline { background: transparent; color: var(--link); box-shadow: inset 0 0 0 1.5px var(--link); }
.button--outline:hover { background: var(--chip-bg); color: var(--link); }

/* Home */
.hero { display: flex; flex-direction: column; gap: 18px; max-width: 640px; margin-bottom: 56px; }
.hero__title { font-size: clamp(40px, 5.5vw, 56px); line-height: 1.1; letter-spacing: -0.025em; margin: 0; }
.hero__lead p { font-size: 18px; color: var(--muted); margin: 0; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section { margin-bottom: 56px; }
.section__head h2 { margin: 0; }
.more { font-size: 14px; }

/* Projects */
.page__head { margin-bottom: 32px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.chip { font: 13px/1 var(--mono); padding: 9px 14px; border-radius: 99px; cursor: pointer; background: var(--chip-bg); color: var(--muted); border: 1px solid var(--line); }
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--link); border-color: var(--link); color: var(--bg); }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.project-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.project-card:hover { border-color: var(--accent); transform: translateY(-2px); color: var(--ink); text-decoration: none; }
.project-card__img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.project-grid--dense .project-card__img { aspect-ratio: 16/8; }
.project-card__img--empty { background: repeating-linear-gradient(135deg, var(--stripe-a) 0 10px, var(--stripe-b) 10px 20px); }
.project-card__body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; }
.project-card__top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.project-card__title { font-weight: 700; color: var(--heading); }
.project-card__year { font: 12px var(--mono); color: var(--muted); }
.project-card__desc { font-size: 14px; line-height: 1.55; color: var(--muted); }
.project-card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.empty { color: var(--muted); }

/* Prose (About and other pages) */
.prose { max-width: var(--measure); }
.prose > * + * { margin-top: 1.1em; }
.prose p, .prose ul, .prose ol { margin-bottom: 0; }
.prose h2 { margin-top: 2em; display: flex; align-items: center; gap: 12px; }
.prose h2::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--accent); flex: none; }
.prose li + li { margin-top: .35em; }
.prose ul li::marker { color: var(--link); }
.prose blockquote { margin: 1.6em 0; padding: 20px 24px; background: var(--code-bg); border-radius: var(--radius); color: var(--heading); font-size: 18px; }
.prose blockquote p { margin: 0; }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2.5em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose th { background: var(--code-bg); color: var(--heading); }
.prose img { border-radius: var(--radius); }

/* Code */
code, pre { font-family: var(--mono); font-size: 14px; }
:not(pre) > code { background: var(--code-bg); color: var(--heading); padding: 2px 6px; border-radius: 4px; font-size: .88em; }
pre, .highlight { background: var(--code-bg); border-radius: var(--radius); }
pre { margin: 0; padding: 18px 20px; overflow-x: auto; line-height: 1.6; }
.highlight .c, .highlight .c1, .highlight .cm { color: var(--tok-com); font-style: italic; }
.highlight .k, .highlight .kd, .highlight .kn, .highlight .kr, .highlight .kc { color: var(--tok-key); font-weight: 600; }
.highlight .s, .highlight .s1, .highlight .s2, .highlight .m, .highlight .mi, .highlight .mf { color: var(--tok-str); }
.highlight .nf, .highlight .nx, .highlight .nc { color: var(--heading); }

/* Blog */
.post-list { list-style: none; margin: 0; padding: 0; max-width: var(--measure); }
.post-list__item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.post-list__title { font-weight: 600; text-decoration: none; }
.post-list__title:hover { text-decoration: underline; }
.post-list__date { font: 12px/1.9 var(--mono); color: var(--muted); white-space: nowrap; }
.post-list__desc { grid-column: 1 / -1; margin: 0; font-size: 14px; color: var(--muted); }
.post-year { margin-bottom: 40px; }
.post-year__title { font: 600 14px var(--mono); letter-spacing: .04em; color: var(--muted); margin: 0 0 4px; }
.post__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; }
.post__project { max-width: var(--measure); margin-top: 48px; padding: 20px 24px; border-left: 3px solid var(--accent); background: var(--code-bg); border-radius: 0 var(--radius) var(--radius) 0; }
.post__project a { font-weight: 600; }
.post__project p:last-child { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.post__back { margin-top: 48px; font-size: 14px; }

/* 404: message in a bottle */
.notfound { max-width: 720px; }
.notfound .lead { margin-bottom: 32px; }
.notfound__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.tide { margin: 0 0 32px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--sidebar); }
.tide svg { display: block; width: 100%; height: clamp(160px, 28vw, 220px); }
.tide__mark { stroke: var(--line-strong); stroke-dasharray: 4 6; }
.tide__label { font: 12px var(--mono); fill: var(--muted); }
.tide__wave { animation: tide-drift var(--dur) linear infinite; }
.tide__wave--1 { fill: var(--wave-1); --dx: -160px; --dur: 11s; animation-direction: reverse; }
.tide__wave--2 { fill: var(--wave-2); --dx: -240px; --dur: 8s; opacity: .9; }
.tide__wave--3 { fill: var(--wave-3); --dx: -320px; --dur: 6s; }
.tide__bob { animation: tide-bob 4s ease-in-out infinite; }
.tide__glass { fill: var(--surface); fill-opacity: .9; stroke: var(--link); stroke-width: 2; }
.tide__cork { fill: var(--accent); }
.tide__paper { fill: var(--bg); stroke: var(--line-strong); }
.tide__text { font: 600 13px var(--mono); fill: var(--heading); }
.tide__shine { stroke: var(--line-strong); stroke-width: 2; stroke-linecap: round; }
@keyframes tide-drift { to { transform: translateX(var(--dx)); } }
@keyframes tide-bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-7px) rotate(5deg); } }
@media (prefers-reduced-motion: reduce) {
  .tide__wave, .tide__bob { animation: none; }
}

/* Small screens: sidebar becomes a top bar */
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 16px 20px; border-right: 0; border-bottom: 1px solid var(--sidebar-line); }
  .sidebar__id { flex-direction: row; align-items: center; gap: 10px; }
  .sidebar__avatar { width: 32px; height: 32px; }
  .sidebar__name { font-size: 17px; }
  .sidebar__tagline, .sidebar__social { display: none; }
  .sidebar__nav { flex-direction: row; gap: 16px; margin-left: auto; }
  .sidebar__foot { margin-top: 0; }
  .theme-toggle__label { display: none; }
  .main { padding: 40px 20px 72px; }
}
