:root {
  color-scheme: light;
  --bg: #ffffff;
  --paper: #f8f8f8;
  --surface: #ffffff;
  --soft: #f2f2f2;
  --text: #1a1a1a;
  --muted: #5f5f5f;
  --faint: #9b9b9b;
  --border: #e6e6e6;
  --highlight: #ffe48b;
  --highlight-strong: #e8c84a;
  --green: #dff1e8;
  --blue: #e4f1f7;
  --peach: #fff0e8;
  --nav-bg: rgba(255, 255, 255, 0.92);
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.08);
  --max: 1000px;
}

html.dark {
  color-scheme: dark;
  --bg: #121212;
  --paper: #1e1e1e;
  --surface: #1a1a1a;
  --soft: #2a2a2a;
  --text: #ececec;
  --muted: #a0a0a0;
  --faint: #707070;
  --border: #333333;
  --highlight: #ffe48b;
  --highlight-strong: #e8c84a;
  --green: #dff1e8;
  --blue: #e4f1f7;
  --peach: #fff0e8;
  --nav-bg: rgba(18, 18, 18, 0.92);
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
}

html.theme-changing,
html.theme-changing *,
html.theme-changing *::before,
html.theme-changing *::after {
  transition:
    background-color 520ms cubic-bezier(0.16, 1, 0.3, 1),
    color 520ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 520ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 520ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 520ms cubic-bezier(0.16, 1, 0.3, 1) !important;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 999;
  padding: 8px 14px;
  border-radius: 4px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.85rem;
  transition: top 180ms ease;
}

.skip-link:focus {
  top: 16px;
}

.site-nav {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 48px;
  border-bottom: 1px solid transparent;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  transition:
    border-color 220ms ease,
    padding 220ms ease,
    background-color 220ms ease;
}

.site-nav.scrolled {
  padding-top: 18px;
  padding-bottom: 18px;
  border-color: var(--border);
}

.nav-logo {
  font-family: "Lora", Georgia, serif;
  font-size: 1.08rem;
  font-weight: 500;
  letter-spacing: 0;
}

.nav-right,
.nav-links,
.hero-tags,
.connect-links,
.portfolio-meta,
.timeline-meta {
  display: flex;
  align-items: center;
}

.nav-right {
  gap: 28px;
}

.nav-links {
  gap: 36px;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 400;
  transition: color 180ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text);
}

.theme-toggle {
  min-height: 34px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  line-height: 1;
  transition:
    background-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  background: var(--text);
  color: var(--bg);
  transform: translateY(-1px);
}

.hero,
.content-section,
.connect-section {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding-right: 48px;
  padding-left: 48px;
}

.hero {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: center;
  padding-top: 128px;
  padding-bottom: 72px;
}

.hero-eyebrow,
.hero-title,
.hero-intro,
.hero-tags,
.scroll-hint {
  opacity: 0;
  animation: fade-up 800ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-eyebrow {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  animation-delay: 120ms;
}

.hero-title {
  max-width: 820px;
  margin: 0 0 30px;
  color: var(--text);
  font-family: "Lora", Georgia, serif;
  font-size: clamp(2.35rem, 6.2vw, 4.5rem);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.12;
  animation-delay: 260ms;
}

.hero-title em,
.connect-title em {
  display: inline;
  padding: 0 0.12em;
  background: var(--highlight);
  color: #1a1a1a;
  font-style: italic;
}

.hero-intro {
  max-width: 670px;
  margin: 0 0 34px;
  color: var(--muted);
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1.85;
  animation-delay: 400ms;
}

.hero-tags {
  flex-wrap: wrap;
  gap: 10px;
  animation-delay: 540ms;
}

.btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border: 0;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
  transition:
    background-color 220ms ease,
    border-color 220ms ease,
    color 220ms ease,
    transform 220ms ease,
    box-shadow 220ms ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--highlight);
  color: #1a1a1a;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--highlight-strong);
  box-shadow: 0 10px 26px rgba(232, 200, 74, 0.24);
}

.btn-secondary {
  border: 1px solid var(--border);
  background: var(--soft);
  color: var(--text);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: var(--text);
  color: var(--bg);
}

.tag,
.pill,
.timeline-company {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  white-space: nowrap;
}

.tag {
  min-height: 30px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  background: var(--soft);
  color: var(--muted);
  font-size: 0.8rem;
}

.scroll-hint {
  position: absolute;
  bottom: 48px;
  left: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--faint);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation-delay: 900ms;
}

.scroll-hint::before {
  width: 34px;
  height: 1px;
  background: var(--border);
  content: "";
}

.content-section {
  padding-top: 104px;
  padding-bottom: 104px;
  border-top: 1px solid var(--border);
}

.section-label {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-label::before {
  width: 26px;
  height: 1px;
  background: var(--text);
  content: "";
}

.section-title {
  max-width: 760px;
  margin: 0 0 24px;
  font-family: "Lora", Georgia, serif;
  font-size: clamp(1.95rem, 4vw, 3rem);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.18;
}

.section-intro {
  max-width: 650px;
  margin: 0 0 48px;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.85;
}

.about-grid {
  display: block;
}

.about-text p {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 1.02rem;
  font-weight: 300;
  line-height: 1.82;
}

.about-text strong {
  color: var(--text);
  font-weight: 500;
}

.about-sidebar {
  display: grid;
  max-width: 100%;
  gap: 28px;
  margin-top: 42px;
  padding-top: 0;
}

.sidebar-block h3 {
  margin: 0 0 14px;
  color: var(--faint);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.sidebar-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 42px;
}

.sidebar-block ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar-block li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 300;
}

.sidebar-block li::before {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  margin-top: 10px;
  border-radius: 50%;
  background: var(--highlight);
  content: "";
}

.portfolio-grid {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.portfolio-card {
  display: grid;
  min-height: 360px;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  transition:
    box-shadow 260ms ease,
    transform 260ms ease,
    border-color 260ms ease;
}

.portfolio-card:nth-child(even) {
  direction: rtl;
}

.portfolio-card:nth-child(even) > * {
  direction: ltr;
}

.portfolio-card:hover {
  border-color: transparent;
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.portfolio-preview {
  position: relative;
  display: grid;
  min-height: 300px;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 228, 139, 0.35), rgba(223, 241, 232, 0.72)),
    var(--paper);
}

.portfolio-card:nth-child(2) .portfolio-preview {
  background:
    linear-gradient(135deg, rgba(228, 241, 247, 0.9), rgba(255, 240, 232, 0.72)),
    var(--paper);
}

.portfolio-card:nth-child(3) .portfolio-preview {
  background:
    linear-gradient(135deg, rgba(223, 241, 232, 0.85), rgba(255, 228, 139, 0.32)),
    var(--paper);
}

.project-preview-card {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 360px;
  overflow: hidden;
  background: #ffffff;
}

.preview-image-frame {
  display: grid;
  min-height: 0;
  place-items: center;
  padding: 0;
  background: #ffffff;
}

.preview-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.preview-action {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: flex-start;
  padding: 28px 30px 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #ffffff 34%);
}

.preview-link {
  color: #1a1a1a;
  font-size: 0.86rem;
  font-weight: 800;
  border-bottom: 1px solid currentColor;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.preview-link:hover,
.preview-link:focus-visible {
  color: #1a1a1a;
  opacity: 0.58;
  transform: translateX(3px);
}

.portfolio-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 46px;
}

.portfolio-meta {
  justify-content: space-between;
  gap: 16px;
}

.portfolio-sector,
.timeline-company {
  min-height: 26px;
  padding: 4px 12px;
  background: var(--highlight);
  color: #1a1a1a;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.timeline-dot-separator {
  display: inline-block;
  margin: 0 0.18em;
  font-size: 1.35em;
  line-height: 0;
  transform: translateY(0.04em);
}

.portfolio-year,
.timeline-year {
  color: var(--faint);
  font-size: 0.75rem;
}

.portfolio-name,
.timeline-role {
  margin: 0;
  font-family: "Lora", Georgia, serif;
  font-weight: 500;
  letter-spacing: 0;
}

.portfolio-name {
  font-size: 1.55rem;
  line-height: 1.22;
}

.portfolio-tagline {
  margin: 0;
  color: var(--muted);
  font-family: "Lora", Georgia, serif;
  font-size: 0.96rem;
  font-style: italic;
  line-height: 1.55;
}

.portfolio-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.8;
}

.portfolio-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.pill {
  min-height: 27px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  background: var(--soft);
  color: var(--text);
  font-size: 0.72rem;
}

.portfolio-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  color: #51c994;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.2;
  transition:
    color 180ms ease,
    opacity 180ms ease,
    transform 180ms ease;
}

.portfolio-link::after {
  content: "↗";
  font-size: 0.94em;
  line-height: 1;
  transform: translateY(-0.04em);
}

.portfolio-link:hover,
.portfolio-link:focus-visible {
  color: #7be3b1;
  opacity: 0.88;
  transform: translateX(3px);
}

#projects {
  padding-bottom: clamp(72px, 8vw, 90px);
}

.project-tools {
  margin-top: clamp(44px, 6vw, 64px);
  padding-top: 0;
  padding-bottom: 0;
}

.tools-title {
  margin-bottom: clamp(32px, 4vw, 44px);
}

.tools-track {
  display: grid;
  align-items: center;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: clamp(16px, 2.6vw, 32px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.tools-track li {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-direction: column;
  gap: 16px;
  justify-content: flex-start;
  text-align: center;
}

.tools-track span {
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 400;
  line-height: 1.2;
}

.tool-logo {
  display: block;
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 9px 12px rgba(0, 0, 0, 0.22)) saturate(1);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    filter 180ms ease;
}

.logo-sap {
  width: 104px;
  height: auto;
}

.logo-sql,
.logo-postgresql,
.logo-powerbi,
.logo-tableau,
.logo-python,
.logo-typescript,
.logo-supabase {
  width: 62px;
  height: 62px;
}

.logo-tableau {
  width: 58px;
  height: 58px;
}

.tools-track li:hover .tool-logo {
  filter: drop-shadow(0 11px 16px rgba(0, 0, 0, 0.28)) saturate(1.1);
  opacity: 0.9;
  transform: translateY(-3px);
}

.tools-track li:hover span {
  opacity: 0.72;
}

.timeline {
  position: relative;
  display: grid;
  margin-top: 18px;
}

.timeline::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
  background: var(--border);
  content: "";
}

.timeline-item {
  position: relative;
  padding: 2px 0 56px 42px;
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 700ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  position: absolute;
  top: 8px;
  left: -5px;
  width: 11px;
  height: 11px;
  border: 2px solid var(--border);
  border-radius: 50%;
  background: var(--bg);
  content: "";
  transition:
    background-color 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.timeline-item.in-view {
  opacity: 1;
  transform: translateY(0);
}

.timeline-item.in-view::before {
  border-color: var(--highlight-strong);
  background: var(--highlight);
  box-shadow: 0 0 0 5px rgba(255, 228, 139, 0.28);
}

.timeline-meta {
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.timeline-role {
  margin-bottom: 8px;
  font-size: 1.25rem;
  line-height: 1.3;
}

.timeline-desc {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 300;
  line-height: 1.8;
}

.timeline-desc-list {
  display: grid;
  gap: 10px;
  padding-left: 18px;
}

.timeline-desc-list li {
  padding-left: 2px;
}

.connect-section {
  padding-top: 116px;
  padding-bottom: 116px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.connect-title {
  margin-bottom: 20px;
  font-family: "Lora", Georgia, serif;
  font-size: clamp(2.3rem, 5.2vw, 4rem);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.12;
}

.connect-sub {
  max-width: 520px;
  margin: 0 auto 34px;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.8;
}

.connect-links {
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.site-footer {
  display: flex;
  width: min(100%, var(--max));
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
  padding: 28px 48px 44px;
  border-top: 1px solid var(--border);
  color: var(--faint);
  font-size: 0.82rem;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 700ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .site-nav {
    padding-right: 24px;
    padding-left: 24px;
  }

  .nav-links {
    display: none;
  }

  .hero,
  .content-section,
  .connect-section,
  .site-footer {
    padding-right: 24px;
    padding-left: 24px;
  }

  .portfolio-card,
  .portfolio-card:nth-child(even) {
    grid-template-columns: 1fr;
    direction: ltr;
  }

  .portfolio-body {
    padding: 34px;
  }

  .sidebar-columns {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .tools-track {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    row-gap: 34px;
  }
}

@media (max-width: 640px) {
  .site-nav {
    padding: 18px 18px;
  }

  .site-nav.scrolled {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .nav-logo {
    font-size: 1rem;
  }

  .theme-toggle {
    min-height: 32px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .hero,
  .content-section,
  .connect-section,
  .site-footer {
    padding-right: 18px;
    padding-left: 18px;
  }

  .hero {
    padding-top: 112px;
    padding-bottom: 80px;
  }

  .hero-title {
    font-size: clamp(2.2rem, 13vw, 3.35rem);
  }

  .connect-links {
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .scroll-hint {
    left: 18px;
  }

  .content-section,
  .connect-section {
    padding-top: 78px;
    padding-bottom: 78px;
  }

  .section-label {
    margin-bottom: 34px;
  }

  .portfolio-preview {
    min-height: 235px;
  }

  .project-preview-card {
    min-height: 255px;
  }

  .preview-image-frame {
    padding: 0;
  }

  .preview-action {
    min-height: 66px;
    padding: 24px 22px 18px;
  }

  .portfolio-body {
    padding: 28px;
  }

  .timeline-item {
    padding-left: 28px;
  }

  .tools-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px 20px;
  }

  .tools-track li {
    gap: 12px;
  }

  .tool-logo {
    width: 50px;
    height: 50px;
  }

  .logo-sap {
    width: 82px;
    height: auto;
  }

  .logo-sql,
  .logo-postgresql,
  .logo-powerbi,
  .logo-tableau,
  .logo-python,
  .logo-typescript,
  .logo-supabase {
    width: 54px;
    height: 54px;
  }

  .tools-track span {
    font-size: 0.86rem;
  }

  .portfolio-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

  .hero-eyebrow,
  .hero-title,
  .hero-intro,
  .hero-tags,
  .scroll-hint,
  .reveal,
  .timeline-item {
    opacity: 1;
    transform: none;
  }
}
