/* Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Custom Properties */
:root {
  --bg: #0a0a0a;
  --text: #e0e0e0;
  --muted: #777;
  --link: #c8c8c8;
  --link-hover: #fff;
  --border: #222;
  --font-heading: Georgia, 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

/* Base */
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Layout */
.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

/* Typography */
h1 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
}

h2 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--muted);
  margin-bottom: 1.5rem;
  letter-spacing: 0.01em;
}

h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

p {
  margin-bottom: 1rem;
  color: var(--text);
}

/* Links */
a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.2s ease;
}

@media (hover: hover) {
  a:hover {
    color: var(--link-hover);
  }
}

/* Header */
header {
  margin-bottom: 3.5rem;
}

.subtitle {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.3rem;
}

/* Sections */
section {
  margin-bottom: 3.5rem;
}

section:last-of-type {
  margin-bottom: 2rem;
}

/* Bold highlights */
strong {
  color: var(--text);
  font-weight: 600;
}

/* Bio */
.bio p {
  color: #999;
  font-size: 0.95rem;
  line-height: 1.75;
}

/* Genesys logo */
.genesys-logo {
  display: block;
  height: 2rem;
  width: auto;
  margin-bottom: 1.5rem;
  opacity: 0.85;
}

/* Section intro (used in Genesys) */
.section-intro {
  font-size: 0.95rem;
  color: #999;
  line-height: 1.75;
  margin-bottom: 1.5rem;
}

/* Copy email CTA */
.copy-email {
  background: none;
  border: 1px solid #2a2a2a;
  border-radius: 5px;
  padding: 0.4rem 0.8rem;
  margin-top: 1rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  min-width: 6.5rem;
  justify-content: center;
  transition: color 0.2s ease-out, border-color 0.2s ease-out,
              transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  outline: none;
}

.copy-email:active {
  transform: scale(0.97);
  transition: color 0.2s ease-out, border-color 0.2s ease-out,
              transform 0.07s ease-in;
}

.copy-email.copied {
  color: var(--text);
  border-color: #383838;
}

.copy-email:focus-visible {
  border-color: var(--muted);
  color: var(--link-hover);
}

.copy-label {
  transition: opacity 0.15s ease-out, filter 0.15s ease-out;
}

.copy-label.fade {
  opacity: 0;
  filter: blur(4px);
}

@media (hover: hover) {
  .copy-email:hover {
    color: var(--link-hover);
    border-color: #404040;
  }
}

@media (prefers-reduced-motion: reduce) {
  .copy-email,
  .copy-label {
    transition: none;
  }

  .copy-email:active {
    transition: none;
  }
}

/* Experience */
.experience-list {
  list-style: none;
}

.experience-item {
  margin-bottom: 1.5rem;
}

.experience-item h3 {
  margin-bottom: 0.15rem;
}

.experience-item h3 a {
  color: inherit;
  text-decoration: none;
}

.experience-item h3 a::after {
  content: '↗';
  font-size: 0.6em;
  font-weight: 400;
  margin-left: 0.3em;
  opacity: 0.3;
  vertical-align: super;
  display: inline-block;
  transition: opacity 0.15s ease-out;
}

@media (hover: hover) {
  .experience-item h3 a:hover {
    color: var(--link-hover);
  }

  .experience-item h3 a:hover::after {
    opacity: 0.7;
  }
}

.experience-role {
  font-size: 0.9rem;
  color: var(--muted);
}

.experience-detail {
  font-size: 0.85rem;
  color: #999;
  margin-top: 0.25rem;
}

/* Writing / Sharing */
.sharing-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.sharing-item {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  align-items: baseline;
  gap: 1.25rem;
}

.sharing-type {
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.45;
  white-space: nowrap;
}

.sharing-title {
  font-size: 0.9rem;
  color: #999;
}

@media (hover: hover) {
  a.sharing-title:hover {
    color: var(--link-hover);
  }
}

/* Contact */
.contact p {
  font-size: 0.95rem;
  color: var(--muted);
}

.contact a {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

@media (hover: hover) {
  .contact a:hover {
    border-color: var(--link-hover);
  }
}

/* Separator */
.separator {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3.5rem 0;
}

/* Footer */
footer {
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

footer p {
  font-size: 0.8rem;
  color: var(--muted);
  opacity: 0.6;
}

/* Language Toggle */
.lang-toggle {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 0.8rem;
  color: var(--muted);
  z-index: 10;
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 6px;
  border: 1px solid #1e1e1e;
}

.lang-toggle button {
  background: none;
  border: none;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.75rem 0.5rem;
  min-height: 44px;
  transition: color 0.2s ease;
  outline: none;
}

.lang-toggle button:focus-visible {
  color: var(--link-hover);
}

@media (hover: hover) {
  .lang-toggle button:hover {
    color: var(--link-hover);
  }
}

.lang-toggle button.active {
  color: var(--text);
}

.lang-toggle span {
  opacity: 0.4;
}

/* Responsive */
@media (max-width: 480px) {
  .container {
    padding: 3rem 1.25rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  section {
    margin-bottom: 2.5rem;
  }

  .lang-toggle {
    top: 1rem;
    right: 1rem;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0px);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    filter: blur(4px);
  }
  to {
    opacity: 1;
    filter: blur(0px);
  }
}

.lang-toggle {
  animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

header {
  animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 100ms;
}

main section:nth-of-type(1) {
  animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 250ms;
}

main hr:nth-of-type(1) {
  animation: fadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 325ms;
}

main section:nth-of-type(2) {
  animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 400ms;
}

main hr:nth-of-type(2) {
  animation: fadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 475ms;
}

main section:nth-of-type(3) {
  animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 550ms;
}

main hr:nth-of-type(3) {
  animation: fadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 625ms;
}

main section:nth-of-type(4) {
  animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 700ms;
}

main hr:nth-of-type(4) {
  animation: fadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 775ms;
}

main section:nth-of-type(5) {
  animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 850ms;
}

main hr:nth-of-type(5) {
  animation: fadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 925ms;
}

main section:nth-of-type(6) {
  animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 1000ms;
}

@media (prefers-reduced-motion: reduce) {
  .lang-toggle,
  header,
  main section,
  main hr {
    animation: none;
  }
}

/* Print */
@media print {
  body {
    background: #fff;
    color: #111;
  }

  .lang-toggle,
  .pt {
    display: none !important;
  }

  a {
    color: #111;
  }
}
