:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --surface-alt: #eef1fa;
  --accent: #0f8cff;
  --text: #1a1f2b;
  --muted: #5b6074;
  --border: #d9dce7;
  --gradient: linear-gradient(135deg, #0f8cff, #2ed7a5 60%, #ffd26a);
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  font-family: 'Space Grotesk', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

main {
  padding: 0 5vw 6rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.section {
  padding: 4.5rem 0;
  border-bottom: 1px solid var(--border);
}

.read-more {
  display: inline-flex;
  margin-top: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}

.read-more a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: inherit;
}

.read-more a:hover {
  color: var(--accent);
}

.section__header {
  max-width: 780px;
  margin-bottom: 2rem;
}

.section__header h2 {
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1.2;
}

.section__grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

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

.about__copy {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.about__visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2.5rem;
  border-radius: 28px;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
  isolation: initial;
  perspective: 1200px;
}

.logo-carousel {
  position: relative;
  width: clamp(220px, 22vw, 320px);
  aspect-ratio: 1 / 1;
  transform-origin: 50% 50%;
  animation: slow-spin 14s linear infinite;
  padding: clamp(0.5rem, 3vw, 1.5rem);
  box-sizing: border-box;
}

.logo-icon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.4s ease;
  animation: logo-cycle 32s linear infinite;
  padding: clamp(0.5rem, 3vw, 1.5rem);
  transform-origin: 50% 50%;
  box-sizing: border-box;
  transform: scale(0.9);
}

.logo-icon--google {
  animation-delay: 0s;
}

.logo-icon--wordpress {
  animation-delay: 8s;
}

.logo-icon--javascript {
  animation-delay: 16s;
}

.logo-icon--php {
  animation-delay: 24s;
}

.about__visual figcaption {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.about__halo {
  display: none;
}

.section--accent {
  background: var(--surface);
  border-radius: 20px;
  padding: 4rem;
  margin: 4rem 0;
  box-shadow: 0 25px 70px rgba(15, 51, 120, 0.1);
}

.hero {
  padding: 4rem 5vw 3rem;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(circle at top right, rgba(15, 140, 255, 0.15), transparent 40%), var(--bg);
}

.hero__badge {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-bottom: 2rem;
}

.hero__content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem;
  align-items: start;
}

.hero__aside {
  --hero-media-width: clamp(220px, 75%, 360px);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
}

.hero__portrait {
  margin: 0;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  width: var(--hero-media-width);
}

.hero__portrait img {
  width: 100%;
  display: block;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  filter: grayscale(100%);
}

.hero__portrait figcaption {
  padding: 0.8rem 1.25rem 1.1rem;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.hero h1 {
  font-size: clamp(2.75rem, 5vw, 4rem);
  margin-top: 0;
  margin-bottom: 1rem;
  line-height: 1.1;
}

.lede {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero__link {
  font-weight: 600;
  color: #0c1016;
  text-decoration: none;
  padding: 0.75rem 0;
}

.hero__link:hover {
  text-decoration: underline;
}

.hero__stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: nowrap;
  background: var(--surface-alt);
  border-radius: 999px;
  padding: 1.25rem 2.5rem;
  border: 1px solid var(--border);
  width: min(1240px, 100%);
  box-shadow: 0 18px 45px rgba(20, 52, 120, 0.15);
  text-align: center;
}

.hero__stats div {
  display: flex;
  flex-direction: column;
  padding: 0 0.75rem;
  flex: 1;
}

.stat__label {
  font-size: 0.8rem;
  color: var(--muted);
  display: block;
}

.stat__value {
  font-size: 2rem;
  font-weight: 600;
}

.hero__nav {
  display: flex;
  gap: 2rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.hero__nav a {
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
}

.hero__nav a:hover {
  color: var(--text);
}

.section__grid p {
  margin: 0;
  color: #364056;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--surface-alt);
  border-radius: 18px;
  padding: 1.75rem;
  border: 1px solid var(--border);
  box-shadow: 0 12px 30px rgba(20, 48, 105, 0.1);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.8rem;
}

.timeline {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.timeline article {
  padding: 2rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  box-shadow: 0 20px 40px rgba(25, 61, 120, 0.1);
}

.timeline__date {
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.timeline h3 {
  margin: 0.5rem 0 1rem;
}

.timeline ul {
  padding-left: 1.2rem;
  margin: 0;
  color: #434a63;
}

.experience-panel__body {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  align-items: flex-start;
}

.experience-panel__text {
  flex: 1 1 280px;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.projects {
  display: grid;
  gap: 1.8rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.project-tabs {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.project-tabs__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.project-tab {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  padding: 0.65rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.project-tab:is(:hover, :focus-visible) {
  border-color: var(--accent);
  color: var(--accent);
}

.project-tab.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.project-tabs__panels {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.project-panel[hidden] {
  display: none !important;
}

.experience-tabs {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.experience-tabs__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.experience-tab {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  padding: 0.65rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.experience-tab:is(:hover, :focus-visible) {
  border-color: var(--accent);
  color: var(--accent);
}

.experience-tab.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.experience-tabs__panels {
  display: block;
}

.experience-tabs__panels .timeline__panel {
  display: none;
}

.experience-tabs__panels .timeline__panel.is-active {
  display: block;
}

.experience-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.detail-card {
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 1.25rem;
  box-shadow: 0 8px 24px rgba(11, 33, 80, 0.08);
}

.detail-card__label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.detail-card__icon {
  width: 20px;
  height: 20px;
  fill: var(--accent);
}

.detail-card h4 {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

.detail-card p {
  margin: 0;
  color: #2a3145;
  line-height: 1.4;
}

.detail-card p:first-of-type {
  font-weight: 600;
  font-size: 1.05rem;
}

.detail-card p + p {
  margin-top: 0.25rem;
  font-weight: 400;
}

.detail-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.detail-card__cta:hover {
  text-decoration: underline;
}

.project {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem;
  border-radius: 20px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  box-shadow: 0 18px 40px rgba(20, 52, 120, 0.12);
}

.project__icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: rgba(20, 58, 170, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.project__icon svg {
  width: 42px;
  height: 42px;
  fill: currentColor;
}

.project p {
  margin: 0;
  color: #2a3145;
  line-height: 1.6;
  font-size: 1rem;
}

.project p + p {
  margin-top: 0.5rem;
}

.project ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  color: var(--muted);
}

.project li {
  background: rgba(15, 140, 255, 0.1);
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
}

.project--contact {
  margin-top: 2rem;
}

.blog-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.blog-grid--stacked {
  grid-template-columns: 1fr;
}

.blog-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.blog-layout__content {
  flex: 1 1 520px;
}

.blog-sidebar {
  flex: 0 0 280px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.blog-sidebar__card {
  background: var(--surface);
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 30px rgba(20, 48, 105, 0.08);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.blog-sidebar__card h4 {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.blog-sidebar__card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.blog-sidebar__card a {
  color: var(--accent);
  text-decoration: none;
}

.blog-sidebar__card a:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .blog-layout {
    flex-direction: column;
  }
  .blog-sidebar {
    flex-basis: 100%;
  }
}

.blog-card {
  background: var(--surface);
  border-radius: 18px;
  padding: 1.75rem;
  border: 1px solid var(--border);
  box-shadow: 0 12px 30px rgba(20, 48, 105, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.blog-card__meta {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.blog-card__link {
  margin-top: auto;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.blog-card__link:hover {
  text-decoration: underline;
}

.experience-media {
  margin: 1.5rem 0;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 16px 40px rgba(13, 33, 80, 0.15);
  max-width: 520px;
  width: 100%;
  aspect-ratio: 6 / 6;
}

.experience-panel__body .experience-media {
  margin: 0;
  flex: 0 0 auto;
}

.experience-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.article-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
  align-items: flex-start;
}

.article-layout__text {
  flex: 1 1 320px;
  min-width: 280px;
}

.blog-nav {
  margin-top: 2rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.blog-nav a {
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.blog-nav a:hover {
  text-decoration: underline;
}

@media (min-width: 900px) {
  .experience-tabs__panels .experience-media {
    margin-left: auto;
    margin-right: auto;
  }
  .article-layout .experience-media {
    margin-left: auto;
  }
}

.contact {
  background: var(--surface-alt);
  border-radius: 20px;
  padding: 2.5rem;
  border: 1px solid var(--border);
  box-shadow: 0 25px 55px rgba(24, 54, 110, 0.12);
}

.contact__links {
  margin-top: 1.5rem;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.6rem;
  border-radius: 999px;
  background: var(--gradient);
  color: #04111a;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
  box-shadow: 0 15px 35px rgba(15, 140, 255, 0.25);
}

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

.footer {
  padding: 2rem 5vw 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.footer a {
  color: var(--accent);
}

@keyframes slow-spin {
  from {
    transform: rotateY(0deg);
  }
  to {
    transform: rotateY(360deg);
  }
}

@keyframes logo-cycle {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  4% {
    opacity: 1;
    transform: scale(0.95);
  }
  18% {
    opacity: 1;
    transform: scale(1);
  }
  25% {
    opacity: 0;
    transform: scale(1.05);
  }
  100% {
    opacity: 0;
    transform: scale(0.85);
  }
}


@media (max-width: 640px) {
  .hero__nav {
    gap: 1rem;
  }

  .section--accent {
    padding: 3rem 1.5rem;
  }

  .footer {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
