:root {
  --bg: #f6f3ee;
  --surface: #ffffff;
  --ink: #1c1b18;
  --muted: #5c5a55;
  --accent: #c2572f;
  --accent-soft: #f4d6c9;
  --line: #ded7cd;
  --shadow: 0 12px 30px rgba(34, 26, 16, 0.12);
  --header-bg: rgba(246, 243, 238, 0.95);
  --grad-start: #fff7ef;
  --accent-bg: #fffdf9;
}

* {
  box-sizing: border-box;
}

body.theme-dark {
  --bg: #141313;
  --surface: #241f1d;
  --ink: #f5efe9;
  --muted: #d2c8be;
  --accent: #e07a52;
  --accent-soft: #3d2d26;
  --line: #4a413c;
  --shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
  --header-bg: rgba(20, 19, 19, 0.95);
  --grad-start: #1b1614;
  --accent-bg: #1a1615;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Tahoma", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top, var(--grad-start), var(--bg));
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

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

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 40px;
  height: 40px;
}

.brand-name {
  font-weight: 700;
  letter-spacing: 0.4px;
}

.nav {
  display: flex;
  gap: 18px;
  font-size: 14px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--muted);
}

.nav a:hover {
  color: var(--ink);
}

.theme-toggle {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
}

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

.scroll-track {
  height: 3px;
  background: transparent;
}

.scroll-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #f3a57f);
  transition: width 0.1s ease;
}

.hero {
  padding: 80px 0 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 36px;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}

h1 {
  font-size: clamp(32px, 3.5vw, 46px);
  margin: 0 0 12px;
}

.lead {
  font-size: 18px;
  color: var(--muted);
  margin-bottom: 24px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-meta {
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.dot {
  font-size: 18px;
}

.social-inline {
  margin-top: 14px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

.social-link img {
  width: 16px;
  height: 16px;
}

.hero-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.profile-card {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.profile-top {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 16px;
  align-items: center;
}

.profile-photo {
  width: 90px;
  height: 90px;
  border-radius: 20px;
  border: 2px solid var(--accent-soft);
  background: #fff7ef;
  object-fit: cover;
}

.profile-name {
  margin: 0 0 4px;
  font-size: 20px;
}

.profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.profile-badges span {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
}

.hero-card-body {
  padding: 18px 20px 22px;
}

.tag-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-list li {
  background: var(--accent-soft);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
}

.section {
  padding: 60px 0;
}

.logo-strip {
  padding: 12px 0 32px;
}

.logo-inner {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.logo-chip {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  box-shadow: var(--shadow);
}

.accent {
  background: var(--accent-bg);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
  align-items: start;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.stats div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}

.stats strong {
  display: block;
  font-size: 20px;
}

.stats span {
  color: var(--muted);
  font-size: 13px;
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.contact-list {
  display: grid;
  gap: 12px;
}

.contact-list .label {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.contact-list .value {
  font-weight: 600;
}

.contact-list .link {
  color: var(--accent);
  word-break: break-word;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.skill-card {
  background: transparent;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  perspective: 1000px;
  -webkit-tap-highlight-color: transparent;
}

.skill-card-inner {
  position: relative;
  width: 100%;
  min-height: 230px;
  transform-style: preserve-3d;
  transition: transform 0.5s ease;
}

.skill-card:focus-visible .skill-card-inner {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.skill-card.is-flipped .skill-card-inner {
  transform: rotateY(180deg);
}

.skill-card-face {
  position: absolute;
  inset: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

.skill-card-front img {
  width: 36px;
  height: 36px;
}

.skill-card-front::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.55);
  opacity: 0;
  transition: opacity 0.2s ease;
}

body.theme-dark .skill-card-front::after {
  background: rgba(14, 12, 11, 0.55);
}

.skill-card:hover .skill-card-front::after,
.skill-card:focus-visible .skill-card-front::after {
  opacity: 1;
}

.skill-card-back {
  transform: rotateY(180deg);
}

.skill-card-back ul {
  margin: 6px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.skill-card-back {
  background: var(--surface);
}

body.theme-dark .skill-card-face {
  background: #24201e;
  border-color: #5a4f48;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
}

body.theme-dark .skill-card-back {
  background: #2a231f;
}

.flip-hint {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 1;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.skill-card:hover .flip-hint,
.skill-card:focus-visible .flip-hint {
  opacity: 1;
}

body.theme-dark .flip-hint {
  color: #fff7ef;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.skill-card:active {
  background: transparent;
}

.rating {
  margin: 10px 0 0;
  font-weight: 600;
  color: var(--ink);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.project-header {
  display: flex;
  gap: 12px;
  align-items: center;
}

.project-header img {
  width: 44px;
  height: 44px;
}

.project-card ul {
  padding-left: 18px;
  margin: 12px 0 0;
  color: var(--muted);
}

.timeline {
  display: grid;
  gap: 24px;
  margin-top: 24px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 16px;
  align-items: start;
}

.timeline-marker {
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  margin-top: 6px;
}

.muted {
  color: var(--muted);
}

.contact-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}

.contact-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  font-weight: 600;
  transition: transform 0.1s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--accent);
  color: #fff;
}

.button.ghost {
  color: var(--accent);
  background: transparent;
}

.site-footer {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
}

@media (max-width: 720px) {
  .nav {
    justify-content: center;
  }

  .header-inner {
    flex-direction: column;
  }
}
