@import url("https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,500;0,9..144,700;1,9..144,500&family=Source+Sans+3:ital,wght@0,400;0,600;1,400&display=swap");

:root {
  --bg-deep: #e8dcc4;
  --page-bg: url("tausta.png");
  --bar: #3d2a14;
  --bar-edge: #8a6a32;
  --gold: #5c4318;
  --gold-soft: #6b5420;
  --link: #1a5c1a;
  --link-hover: #0d3d0d;
  --text: #1c1810;
  --muted: rgba(28, 24, 16, 0.78);
  --glass: rgba(255, 250, 240, 0.72);
  --glass-border: rgba(90, 70, 30, 0.28);
  --bar-width: 48px;
  --font-serif: "Fraunces", "Times New Roman", Times, serif;
  --font-sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 2.25rem 1.5rem 3rem 1.5rem;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.55;
  background-color: var(--bg-deep);
  background-image: var(--page-bg);
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 100% 100%;
  background-attachment: fixed;
}

body:has(.left-bar) {
  padding-left: calc(var(--bar-width) + 1.75rem);
}

.left-bar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--bar-width);
  background: var(--bar);
  border-right: 2px solid var(--bar-edge);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
  z-index: 20;
  animation: fade-bar 0.7s ease both;
}

.left-bar span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(180deg);
  writing-mode: vertical-rl;
  color: #f4e45a;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 52rem;
  animation: rise-in 0.7s ease both;
}

.hero {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  margin-bottom: 2rem;
}

.hero-photo {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 6px rgba(92, 67, 24, 0.12), 0 10px 28px rgba(0, 0, 0, 0.25);
  background: #c8b896;
}

.eyebrow {
  margin: 0 0 0.2rem;
  color: var(--gold-soft);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.eyebrow a {
  color: inherit;
}

h1 {
  margin: 0;
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.15rem);
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

.lede {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.back {
  display: inline-block;
  margin-bottom: 0.85rem;
  color: var(--link);
  font-size: 0.92rem;
  text-decoration: none;
}

.back:hover {
  color: var(--link-hover);
}

a {
  color: var(--link);
}

a:hover {
  color: var(--link-hover);
}

table {
  border-collapse: collapse;
  background: var(--glass);
  backdrop-filter: blur(4px);
}

table, td, th {
  border: 1px solid #a09070;
}

td, th {
  padding: 0.45rem 0.6rem;
  vertical-align: top;
}

.link-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14.5rem, 1fr));
  gap: 1rem;
}

.link-groups section {
  padding: 1rem 1.15rem 1.15rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 0.9rem;
  backdrop-filter: blur(6px);
}

.link-groups h2 {
  margin: 0 0 0.65rem;
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.link-groups ul,
.plain-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.link-groups a,
.plain-links a {
  display: inline-block;
  padding: 0.18rem 0;
  color: var(--link);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.18s ease, transform 0.18s ease;
}

.link-groups a:hover,
.plain-links a:hover,
.cv-item a:hover {
  color: var(--link-hover);
  transform: translateX(3px);
}

.note {
  margin: 1.35rem 0 0;
  max-width: 40rem;
  color: var(--gold-soft);
  font-size: 1.02rem;
}

.email-img {
  height: 29px;
  width: auto;
  vertical-align: middle;
}

@keyframes fade-bar {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 720px) {
  :root {
    --bar-width: 0px;
  }

  body {
    padding: 3.6rem 1rem 2.5rem;
  }

  body:has(.left-bar) {
    padding-left: 1rem;
  }

  .left-bar {
    right: 0;
    bottom: auto;
    width: 100%;
    height: 2.6rem;
    border-right: 0;
    border-bottom: 2px solid var(--bar-edge);
  }

  .left-bar span {
    writing-mode: horizontal-tb;
    transform: translate(-50%, -50%);
    font-size: 0.92rem;
    letter-spacing: 0.14em;
  }

  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  body {
    background-attachment: scroll;
  }
}
