/* Shaker Br */

:root {
  --blue: #2979ff;
  --green: #00e676;
  --red: #ff4b4b;

  --bg: #141820;
  --card: #1c2230;
  --card-hover: #232a3a;
  --text: #e6eaf0;
  --muted: #94a0b4;
  --line: #2a3344;

  --font: 'Ubuntu', system-ui, sans-serif;
  --aside-w: 240px;
  --r: 10px;
}

[data-theme='light'] {
  --bg: #f2f4f8;
  --card: #ffffff;
  --card-hover: #f8f9fc;
  --text: #1a2233;
  --muted: #5c6b82;
  --line: #dde2ea;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

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

/* Floating theme toggle */
.theme-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  transition: color 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.theme-float:hover {
  color: var(--text);
  border-color: var(--blue);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
}

[data-theme='light'] .theme-float {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.theme-float svg {
  width: 1.2rem;
  height: 1.2rem;
}

.theme-float__sun { display: none; }
[data-theme='light'] .theme-float__moon { display: none; }
[data-theme='light'] .theme-float__sun { display: block; }

/* Shell layout */
.shell {
  display: grid;
  grid-template-columns: var(--aside-w) 1fr;
  max-width: 960px;
  margin: 0 auto;
  min-height: 100dvh;
}

/* Sidebar */
.aside {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 2rem 1.25rem 1.5rem;
  border-right: 1px solid var(--line);
  overflow-y: auto;
}

.aside__identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.aside__photo {
  position: relative;
  display: block;
  width: 10rem;
  max-width: 100%;
  margin-bottom: 1.15rem;
  transform: rotate(-2.5deg);
  transition: transform 0.45s cubic-bezier(0.34, 1.2, 0.64, 1) 0.12s;
}

.aside__photo:hover {
  transform: rotate(0deg) scale(1.03);
  transition: transform 0.45s cubic-bezier(0.34, 1.2, 0.64, 1) 0.12s;
}

.aside__photo::before,
.aside__photo::after {
  content: '';
  position: absolute;
  border-radius: 14px;
  border: 2px solid var(--blue);
  pointer-events: none;
  transition: transform 0.45s cubic-bezier(0.34, 1.2, 0.64, 1) 0.12s;
}

.aside__photo::before {
  inset: -5px;
  transform: rotate(5deg);
  opacity: 0.55;
  animation: photo-frame-drift 7s ease-in-out infinite;
}

.aside__photo:hover::before {
  inset: -5px;
  transform: rotate(2deg);
  transition: transform 0.45s cubic-bezier(0.34, 1.2, 0.64, 1) 0.12s;
  animation: none;
}

.aside__photo::after {
  inset: -8px -3px -3px -8px;
  border-color: var(--green);
  transform: rotate(-7deg);
  opacity: 0.4;
  animation: photo-frame-drift-alt 9s ease-in-out infinite;
}

.aside__photo:hover::after {
  inset: -8px -3px -3px -8px;
  transform: rotate(-2deg);
  transition: transform 0.45s cubic-bezier(0.34, 1.2, 0.64, 1) 0.12s;
  animation: none;
}

.aside__photo:not(:hover)::before {
  transform: rotate(5deg);
  transition: transform 0.45s cubic-bezier(0.34, 1.2, 0.64, 1) 0.12s;
  animation: photo-frame-drift 7s ease-in-out 0.57s infinite;
}

.aside__photo:not(:hover)::after {
  transform: rotate(-7deg);
  transition: transform 0.45s cubic-bezier(0.34, 1.2, 0.64, 1) 0.12s;
  animation: photo-frame-drift-alt 9s ease-in-out 0.57s infinite;
}

@keyframes photo-frame-drift {
  0%, 100% { inset: -5px; }
  50% { inset: -8px -4px -4px -8px; }
}

@keyframes photo-frame-drift-alt {
  0%, 100% { inset: -8px -3px -3px -8px; }
  50% { inset: -5px -6px -6px -5px; }
}

.aside__photo img {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid var(--line);
  display: block;
  background: var(--card);
  transition: border-color 0.45s cubic-bezier(0.34, 1.2, 0.64, 1) 0.12s;
}

.aside__photo:hover img {
  border-color: var(--blue);
  transition: border-color 0.45s cubic-bezier(0.34, 1.2, 0.64, 1) 0.12s;
}

.aside__name {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.aside__role {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--blue);
  line-height: 1.45;
}

.aside__meta {
  margin: 0.25rem 0 0;
  font-size: 0.72rem;
  color: var(--muted);
}

.aside__langs {
  margin: 0.45rem 0 0;
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.45;
  opacity: 0.9;
}

.aside__label {
  margin: 0 0 0.5rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.75;
}

.aside__nav-wrap {
  padding-top: 0.25rem;
  border-top: 1px solid var(--line);
}

.aside__nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.aside__nav a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  padding: 0.42rem 0.6rem;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.aside__nav a::before {
  content: '';
  flex-shrink: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--line);
  transition: background 0.15s, transform 0.15s;
}

.aside__nav a:hover {
  color: var(--text);
  background: var(--card);
  border-color: var(--line);
}

.aside__nav a:hover::before {
  background: var(--blue);
  transform: scale(1.2);
}

.aside__footer {
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.aside__social {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
}

.aside__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0.35rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  text-align: center;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.aside__social-link:hover {
  color: var(--blue);
  border-color: var(--blue);
  background: var(--card-hover);
}

.aside__hub {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  margin-top: 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.aside__hub:hover {
  color: var(--text);
  border-color: var(--blue);
  background: var(--card-hover);
}

.aside__hub-logo { object-fit: contain; }
.aside__hub-logo--light { display: none; }
[data-theme='light'] .aside__hub-logo--dark { display: none; }
[data-theme='light'] .aside__hub-logo--light { display: block; }

/* Main */
.main {
  padding: 2rem 2rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.panel {
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
  scroll-margin-top: 1.5rem;
}

.panel--flat {
  background: transparent;
  border: none;
  padding-left: 0;
  padding-right: 0;
}

.panel__title {
  margin: 0 0 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.panel__subtitle {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
}

.panel__text {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
}

/* Skills */
.skills { display: flex; flex-direction: column; gap: 1.1rem; }

.skills__title {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
}

.skills__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  transition: border-color 0.15s;
}

.skill-item:hover { border-color: var(--blue); }

.skill-item__icon {
  width: 1.6rem;
  height: 1.6rem;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: #ffffff;
  border-radius: 5px;
  padding: 2px;
}

[data-theme='light'] .skill-item__icon {
  background: #eef1f5;
}

.skill-item__icon img {
  width: 1.15rem;
  height: 1.15rem;
  object-fit: contain;
}

.skill-item__name {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.2;
}

/* Work */
.work-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1.5rem;
}

.jobs {
  list-style: none;
  margin: 0;
  padding: 0;
}

.jobs li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}

.jobs li:last-child { border-bottom: none; padding-bottom: 0; }
.jobs li:first-child { padding-top: 0; }

.jobs__role {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
}

.jobs__meta {
  margin: 0.1rem 0 0;
  font-size: 0.74rem;
  color: var(--muted);
}

/* Projects */
.projects {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.project-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s;
}

.project-row:hover {
  border-color: var(--blue);
  text-decoration: none;
}

.project-row__logo {
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--card);
}

.project-row__logo img,
.project-row__logo-img {
  width: 1.4rem;
  height: 1.4rem;
  object-fit: contain;
}

.project-row__logo-img--light { display: none; }
[data-theme='light'] .project-row__logo-img--dark { display: none; }
[data-theme='light'] .project-row__logo-img--light { display: block; }

.project-row__text { flex: 1; min-width: 0; }

.project-row__text strong {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
}

.project-row__text span {
  display: block;
  margin-top: 0.08rem;
  font-size: 0.74rem;
  color: var(--muted);
}

.project-row__arrow {
  color: var(--muted);
  font-size: 0.85rem;
  padding-right: 1rem;
}

.project-row:hover .project-row__arrow { color: var(--blue); }

.projects__more {
  margin: 0.7rem 0 0;
  font-size: 0.76rem;
  color: var(--muted);
}

/* Contact */
.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.contact-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
  padding: 0.4rem 0.75rem 0.4rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  transition: border-color 0.15s, color 0.15s;
}

.contact-chip__icon {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: #ffffff;
  border-radius: 50%;
  padding: 2px;
}

[data-theme='light'] .contact-chip__icon {
  background: #eef1f5;
}

.contact-chip__icon img {
  width: 0.85rem;
  height: 0.85rem;
  object-fit: contain;
}

.contact-chip:hover {
  border-color: var(--blue);
  color: var(--blue);
}

/* Footer */
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.5rem;
  font-size: 0.74rem;
  color: var(--muted);
}

.foot a { color: var(--muted); }
.foot a:hover { color: var(--blue); }

/* Responsive */
@media (max-width: 720px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .aside {
    position: relative;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 1.75rem 1.25rem;
    gap: 1.25rem;
  }

  .aside__nav-wrap,
  .aside__footer {
    width: 100%;
    max-width: 20rem;
    margin-inline: auto;
  }

  .aside__footer {
    margin-top: 0;
  }

  .aside__nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
  }

  .aside__nav a {
    justify-content: center;
    padding: 0.4rem 0.35rem;
    font-size: 0.74rem;
  }

  .aside__nav a::before {
    display: none;
  }

  .aside__social {
    grid-template-columns: repeat(2, 1fr);
  }

  .main { padding: 1.25rem 1.25rem 2rem; }

  .work-grid { grid-template-columns: 1fr; }

  .skills__grid { grid-template-columns: repeat(2, 1fr); }

  .theme-float {
    bottom: 1rem;
    right: 1rem;
  }
}

@media (max-width: 380px) {
  .skills__grid { grid-template-columns: 1fr; }
}

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

  .aside__photo::before,
  .aside__photo::after {
    animation: none !important;
  }
}
