/* Baskar Robert — portfolio stylesheet */

:root {
  --bg: #f7f9fc;
  --paper: #ffffff;
  --ink: #0a1a33;
  --muted: #4d5f79;
  --soft: #eef3f9;
  --line: #d9e2ee;
  --teal: #0a6f78;
  --teal-soft: #e2f3f3;
  --blue: #0b49a0;
  --blue-soft: #e9f0ff;
  --amber-soft: #fdf3e0;
  --amber-ink: #8a5a08;
  --on-accent: #ffffff;
  --shadow: 0 20px 55px rgba(10, 26, 51, 0.07);
  --shadow-sm: 0 6px 18px rgba(10, 26, 51, 0.05);
  --radius: 10px;
  --max: 1120px;
  --gutter: clamp(16px, 4vw, 28px);
  --focus: #0b49a0;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1220;
    --paper: #111c2e;
    --ink: #e8eef7;
    --muted: #a3b2c7;
    --soft: #172438;
    --line: #23334c;
    --teal: #5ecfd6;
    --teal-soft: #14313a;
    --blue: #8fb6ff;
    --blue-soft: #16263f;
    --amber-soft: #33270f;
    --amber-ink: #f0c46a;
    --on-accent: #06212a;
    --shadow: 0 20px 55px rgba(0, 0, 0, 0.45);
    --shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.35);
    --focus: #8fb6ff;
  }
}

:root[data-theme="dark"] {
  --bg: #0b1220;
  --paper: #111c2e;
  --ink: #e8eef7;
  --muted: #a3b2c7;
  --soft: #172438;
  --line: #23334c;
  --teal: #5ecfd6;
  --teal-soft: #14313a;
  --blue: #8fb6ff;
  --blue-soft: #16263f;
  --amber-soft: #33270f;
  --amber-ink: #f0c46a;
  --on-accent: #06212a;
  --shadow: 0 20px 55px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.35);
  --focus: #8fb6ff;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(15.5px, 0.42vw + 14px, 18px);
  line-height: 1.65;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; }

a { color: var(--blue); }
a:hover { color: var(--teal); }

:where(a, button, summary, input, textarea):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

h1, h2, h3, h4 {
  line-height: 1.22;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
}

h1 { font-size: clamp(2.3rem, 6vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); font-weight: 750; }
h3 { font-size: 1.12rem; font-weight: 700; }

p { margin: 0 0 14px; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: 12px;
  clip-path: inset(50%);
  z-index: 1000;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { clip-path: none; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.nav {
  max-width: var(--max);
  margin: 0 auto;
  min-height: 68px;
  padding: 10px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.02rem;
}

.brand-mark {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--teal);
  color: var(--on-accent);
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 13px;
  cursor: pointer;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.nav-menu a {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}

.nav-menu a:hover,
.nav-menu a:focus,
.nav-menu a[aria-current="page"] {
  color: var(--teal);
  border-color: var(--teal);
}

.nav-menu .nav-cta {
  color: var(--ink);
  border: 1px solid var(--line);
  border-bottom-width: 1px;
  border-radius: var(--radius);
  padding: 9px 15px;
  background: var(--paper);
}

.nav-menu .nav-cta:hover { border-color: var(--teal); color: var(--teal); }

@media (max-width: 959px) {
  .nav-toggle { display: inline-flex; }
  .nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px 0 12px;
  }
  .nav-menu.is-open { display: flex; }
  .nav-menu a {
    display: block;
    padding: 11px 4px;
    border-bottom: 1px solid var(--line);
  }
  .nav-menu .nav-cta { text-align: center; margin-top: 8px; border: 1px solid var(--line); }
}

.theme-toggle {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--muted);
  cursor: pointer;
}

.theme-toggle:hover { color: var(--teal); border-color: var(--teal); }

.theme-toggle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

.nav-side {
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (min-width: 960px) {
  .nav { justify-content: flex-start; }
  .brand { margin-right: auto; }
  .nav-side { order: 3; margin-left: 18px; }
}

@media (max-width: 959px) {
  .nav-side { margin-left: auto; }
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-weight: 650;
  font-size: 0.97rem;
  text-decoration: none;
  cursor: pointer;
  max-width: 100%;
  overflow-wrap: anywhere;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.button:hover { transform: translateY(-1px); border-color: var(--teal); color: var(--ink); }

.button.primary {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--on-accent);
}

.button.primary:hover { color: var(--on-accent); }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0 20px;
}

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

.hero { padding: 62px 0 46px; }

.hero-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}

.availability {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--teal-soft);
  color: var(--teal);
  border: 1px solid color-mix(in srgb, var(--teal) 30%, transparent);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 0.85rem;
  font-weight: 650;
  margin-bottom: 20px;
}

.availability::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  flex: none;
}

.hero h1 { margin-bottom: 8px; }

.hero-subtitle {
  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
  font-weight: 650;
  color: var(--teal);
  margin-bottom: 14px;
}

.hero-copy { color: var(--muted); font-size: 1.04rem; max-width: 60ch; }

.hero-copy strong { color: var(--ink); font-weight: 650; }

.social-links { display: flex; flex-wrap: wrap; gap: 10px; }

.social-link {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--muted);
  box-shadow: var(--shadow-sm);
}

.social-link:hover { color: var(--teal); border-color: var(--teal); }
.social-link svg { width: 19px; height: 19px; fill: currentColor; }

/* ---------- Panel ---------- */

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-row { padding: 20px 22px; border-bottom: 1px solid var(--line); }
.panel-row:last-child { border-bottom: 0; }

.panel-label {
  margin: 0 0 12px;
  font-size: 0.73rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 12px; }

.metric strong {
  display: block;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--teal);
  line-height: 1.15;
}

.metric span { font-size: 0.85rem; color: var(--muted); }

.facts { list-style: none; margin: 0; padding: 0; font-size: 0.93rem; }

.facts li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
}

.facts li:last-child { border-bottom: 0; }
.facts span { color: var(--muted); }
.facts strong { font-weight: 650; text-align: right; overflow-wrap: anywhere; }

/* ---------- Sections ---------- */

.section { padding: 64px 0; border-top: 1px solid var(--line); }
.section.alt { background: var(--soft); }

.section-heading { max-width: 66ch; margin-bottom: 34px; }

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.73rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
}

.section-heading p:not(.eyebrow) { color: var(--muted); }

.lede { font-size: 1.08rem; }

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 265px), 1fr));
  gap: 20px;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.97rem; margin-bottom: 12px; }

.card-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--teal-soft);
  color: var(--teal);
  margin-bottom: 14px;
}

.card-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.check-list { list-style: none; margin: 0; padding: 0; font-size: 0.94rem; color: var(--muted); }

.check-list li { position: relative; padding: 4px 0 4px 24px; }

.check-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 12px;
  width: 9px;
  height: 5px;
  border-left: 2px solid var(--teal);
  border-bottom: 2px solid var(--teal);
  transform: rotate(-45deg);
}

/* ---------- Tags ---------- */

.tags { display: flex; flex-wrap: wrap; gap: 8px; }

.tag {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 600;
}

.tag.accent { background: var(--blue-soft); border-color: color-mix(in srgb, var(--blue) 28%, transparent); color: var(--blue); }

/* ---------- Timeline ---------- */

.timeline { display: grid; gap: 0; }

.timeline-item {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 28px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}

.timeline-item:first-child { border-top: 0; padding-top: 0; }

.period { font-size: 0.88rem; font-weight: 650; color: var(--teal); padding-top: 2px; }
.period small { display: block; color: var(--muted); font-weight: 500; margin-top: 3px; }

.role { font-size: 1.12rem; font-weight: 750; margin-bottom: 3px; }
.company { font-size: 0.92rem; color: var(--muted); font-weight: 600; margin-bottom: 9px; }
.timeline-item p { color: var(--muted); font-size: 0.97rem; margin-bottom: 10px; }

/* ---------- FAQ ---------- */

.faq { display: grid; gap: 12px; max-width: 80ch; }

.faq-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px 20px;
  box-shadow: var(--shadow-sm);
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  padding: 16px 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  color: var(--teal);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1;
  flex: none;
}

.faq-item[open] summary::after { content: "\2212"; }
.faq-item > div { padding: 0 0 16px; color: var(--muted); font-size: 0.97rem; }
.faq-item > div p:last-child { margin-bottom: 0; }

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

.contact-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 40px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
}

.contact-card h2 { max-width: 22ch; }
.contact-card > p { color: var(--muted); max-width: 62ch; }

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

.site-footer {
  border-top: 1px solid var(--line);
  padding: 34px 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  justify-content: space-between;
  align-items: center;
}

.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { color: var(--muted); text-decoration: none; font-weight: 600; padding-block: 5px; }
.footer-links a:hover { color: var(--teal); }

/* ---------- Resume page ---------- */

.doc { padding: 52px 0 70px; }

.doc-header {
  border-bottom: 2px solid var(--ink);
  padding-bottom: 20px;
  margin-bottom: 30px;
}

.doc-header h1 { font-size: clamp(2rem, 5vw, 2.7rem); margin-bottom: 6px; }
.doc-header .hero-subtitle { margin-bottom: 10px; }

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: 0.93rem;
  color: var(--muted);
  margin-top: 12px;
}

.doc-meta span { overflow-wrap: anywhere; }
.doc-meta a { color: var(--blue); }

.doc section { margin-bottom: 36px; }
.doc section > p,
.doc .entry ul,
.doc > .container > section > ul { max-width: 74ch; }
.doc .kv { max-width: 92ch; }

.doc h2 {
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--teal);
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  margin-bottom: 20px;
}

.doc ul { margin: 0 0 6px; padding-left: 20px; color: var(--muted); font-size: 0.97rem; }
.doc ul li { margin-bottom: 5px; }

.entry { margin-bottom: 24px; }
.entry:last-child { margin-bottom: 0; }

.entry-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 18px;
  align-items: baseline;
  margin-bottom: 3px;
}

.entry-head h3 { margin: 0; }
.entry-date { font-size: 0.88rem; font-weight: 650; color: var(--teal); white-space: nowrap; }
.entry-org { font-size: 0.93rem; color: var(--muted); font-weight: 600; margin-bottom: 8px; }

.kv { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 10px 20px; font-size: 0.97rem; }
.kv dt { font-weight: 650; }
.kv dd { margin: 0; color: var(--muted); }

.note {
  background: var(--amber-soft);
  color: var(--amber-ink);
  border: 1px solid color-mix(in srgb, var(--amber-ink) 30%, transparent);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 0.92rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 940px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .timeline-item { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .period { padding-top: 0; }
  .period small { display: inline; margin-left: 8px; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .kv dd { margin-bottom: 10px; }
}

@media (max-width: 640px) {
  .hero { padding: 40px 0 32px; }
  .section { padding: 46px 0; }
  .doc { padding: 34px 0 52px; }
  .contact-card { padding: 24px; border-radius: 13px; }
  .card { padding: 20px; }
  .panel-row { padding: 18px; }
  .actions { gap: 10px; }
  .actions .button { flex: 1 1 100%; }
  .entry-head { gap: 2px; }
  .entry-date { order: -1; }
}

/* Small phones (iPhone SE and narrower) */
@media (max-width: 400px) {
  .hero h1 { font-size: 2.05rem; }
  .button { padding: 11px 15px; font-size: 0.92rem; }
  .metrics { grid-template-columns: 1fr 1fr; gap: 14px 10px; }
  .metric strong { font-size: 1.4rem; }
  .facts li { flex-direction: column; gap: 0; padding: 8px 0; }
  .facts strong { text-align: left; }
  .doc-meta { gap: 6px 14px; font-size: 0.88rem; }
  .faq-item { padding-inline: 16px; }
  .brand { font-size: 0.95rem; gap: 9px; }
  .brand-mark { width: 34px; height: 34px; }
  .nav { gap: 10px; }

  /* icon-only menu button, matching the theme toggle beside it
     (the word "Menu" stays in the DOM for screen readers) */
  .nav-toggle {
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
    font-size: 0;
  }
  .nav-toggle::before {
    content: "";
    width: 17px;
    height: 12px;
    border-top: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    box-shadow: inset 0 0 0 1px transparent;
    position: relative;
  }
  .nav-toggle::after {
    content: "";
    position: absolute;
    width: 17px;
    height: 2px;
    background: currentColor;
  }
  .nav-toggle { position: relative; }
  .nav-side { gap: 8px; }
  .availability { align-items: flex-start; }
  .availability::before { margin-top: 8px; }
}

/* Landscape phones: reclaim vertical space */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { padding: 28px 0 24px; }
  .section { padding: 38px 0; }
}

/* Large desktops: widen the measure rather than stranding content in the middle */
@media (min-width: 1500px) {
  :root { --max: 1240px; }
}

@media (min-width: 1900px) {
  :root { --max: 1320px; }
  .hero { padding: 76px 0 58px; }
  .section { padding: 78px 0; }
}

/* Fine pointers get tighter targets; touch screens get comfortable ones */
@media (pointer: coarse) {
  .nav-menu a, .footer-links a { padding-block: 9px; }
  .social-link { width: 46px; height: 46px; }
}

/* ---------- Print ---------- */

@media print {
  :root {
    --bg: #fff;
    --paper: #fff;
    --ink: #000;
    --muted: #2b2b2b;
    --line: #b5b5b5;
    --teal: #0a5f68;
    --blue: #000;
    --shadow: none;
    --shadow-sm: none;
    --gutter: 0px;
  }

  body {
    font-size: 10pt;
    line-height: 1.42;
    background: #fff;
  }

  .site-header,
  .site-footer,
  .actions,
  .no-print,
  .skip-link { display: none !important; }

  .doc { padding: 0; }
  .doc .container { max-width: none; padding: 0; }

  .doc-header {
    border-bottom: 1.5pt solid #000;
    padding-bottom: 8pt;
    margin-bottom: 12pt;
  }

  .doc-header h1 { font-size: 20pt; margin-bottom: 2pt; }
  .doc-header .hero-subtitle { font-size: 11.5pt; margin-bottom: 5pt; }
  .doc-header p { margin-bottom: 6pt; }

  .doc-meta {
    gap: 2pt 14pt;
    font-size: 9pt;
    margin-top: 6pt;
  }

  /* keep the contact line compact: the link text is already readable */
  .doc-meta a { color: #000; text-decoration: none; }
  .doc-meta a::after { content: none; }

  .doc section { margin-bottom: 13pt; page-break-inside: auto; }
  .doc section > p,
  .doc .entry ul,
  .doc .kv { max-width: none; }

  .doc h2 {
    font-size: 10pt;
    letter-spacing: 0.09em;
    padding-bottom: 3pt;
    margin-bottom: 8pt;
    page-break-after: avoid;
  }

  .entry { margin-bottom: 10pt; page-break-inside: avoid; }
  .entry-head { margin-bottom: 1pt; }
  .entry-head h3 { font-size: 11pt; }
  .entry-date { font-size: 9pt; }
  .entry-org { font-size: 9.5pt; margin-bottom: 3pt; }

  .doc ul { padding-left: 14pt; margin-bottom: 0; font-size: 10pt; }
  .doc ul li { margin-bottom: 1pt; }

  .kv { grid-template-columns: 130pt 1fr; gap: 3pt 10pt; font-size: 10pt; }

  h2, h3 { page-break-after: avoid; }

  a { color: #000; text-decoration: none; }
}
