/*-----------------------------------*\
  #style.css
\*-----------------------------------*/

/* ---------- Design tokens ---------- */

:root {
  --accent: #f5f5f5;
  --accent-soft: rgba(245, 245, 245, 0.14);
  --accent-line: linear-gradient(90deg, #f5f5f5, #7d7d88);

  --bg-page: #0b0b0c;
  --bg-card: #111113;
  --bg-card-2: #17171a;
  --bg-card-3: #1d1d21;
  --border: #26262b;
  --border-soft: #1e1e23;

  --text-1: #f9f9f9;
  --text-2: #a9a9b2;
  --text-3: #75757f;

  --nav-bg: rgba(17, 17, 19, 0.82);

  --bg-gradient-onyx: linear-gradient(145deg, var(--bg-card-3), var(--bg-card-2));
  --bg-gradient-jet: linear-gradient(145deg, var(--bg-card-2), var(--bg-card));
  --border-gradient-onyx: linear-gradient(145deg, var(--border), transparent 72%);
  --bg-gradient-accent-1: linear-gradient(145deg, #f5f5f5, #b4b4bf);
  --bg-gradient-accent-2: linear-gradient(145deg, rgba(245, 245, 245, 0.16), transparent 70%);
  --text-gradient-accent: linear-gradient(90deg, #ffffff, #a9a9b2);

  --vegas-gold: #a9a9b2;

  --ff-display: 'Sora', system-ui, sans-serif;
  --ff-body: 'Inter', system-ui, sans-serif;

  --fs-1: 24px;
  --fs-2: 18px;
  --fs-3: 19px;
  --fs-4: 16px;
  --fs-5: 15px;
  --fs-6: 14px;
  --fs-7: 13px;
  --fs-8: 11px;

  --fw-300: 300;
  --fw-400: 400;
  --fw-500: 500;
  --fw-600: 600;

  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;

  --shadow-1: 0 2px 10px hsla(0, 0%, 0%, 0.25);
  --shadow-2: 0 8px 24px hsla(0, 0%, 0%, 0.28);
  --shadow-3: 0 12px 30px hsla(0, 0%, 0%, 0.3);
  --shadow-4: 0 18px 44px hsla(0, 0%, 0%, 0.28);
  --shadow-5: 0 24px 60px hsla(0, 0%, 0%, 0.35);

  --transition-1: 0.22s ease;
  --transition-2: 0.35s cubic-bezier(0.22, 0.9, 0.3, 1);
}

html[data-theme='light'] {
  --accent: #0a0a0b;
  --accent-soft: rgba(10, 10, 11, 0.09);
  --accent-line: linear-gradient(90deg, #0a0a0b, #85858f);

  --bg-page: #f4f4f5;
  --bg-card: #ffffff;
  --bg-card-2: #f7f7f8;
  --bg-card-3: #f0f0f2;
  --border: #e3e3e7;
  --border-soft: #ececef;

  --text-1: #0a0a0b;
  --text-2: #55555f;
  --text-3: #85858f;

  --nav-bg: rgba(255, 255, 255, 0.85);

  --bg-gradient-accent-1: linear-gradient(145deg, #1a1a1d, #55555f);
  --bg-gradient-accent-2: linear-gradient(145deg, rgba(10, 10, 11, 0.12), transparent 70%);
  --text-gradient-accent: linear-gradient(90deg, #0a0a0b, #55555f);

  --vegas-gold: #6b6b74;

  --shadow-1: 0 2px 10px hsla(240, 10%, 20%, 0.06);
  --shadow-2: 0 8px 24px hsla(240, 10%, 20%, 0.08);
  --shadow-3: 0 12px 30px hsla(240, 10%, 20%, 0.1);
  --shadow-4: 0 18px 44px hsla(240, 10%, 20%, 0.1);
  --shadow-5: 0 24px 60px hsla(240, 10%, 20%, 0.12);
}

/* ---------- Base ---------- */

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

html {
  font-family: var(--ff-body);
  scroll-behavior: smooth;
  color-scheme: dark;
}

html[data-theme='light'] {
  color-scheme: light;
}

body {
  background: var(--bg-page);
  color: var(--text-2);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  animation: pageIn 0.4s ease both;
  transition: opacity 0.24s ease, background-color 0.28s ease, color 0.28s ease;
}

body.is-leaving {
  opacity: 0;
}

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

li {
  list-style: none;
}

img,
ion-icon,
a,
button,
time,
span {
  display: block;
}

button {
  font: inherit;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  color: inherit;
}

input,
textarea {
  display: block;
  width: 100%;
  background: none;
  font: inherit;
}

::selection {
  background: var(--accent);
  color: var(--bg-page);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

@keyframes pageIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Surfaces ---------- */

.sidebar,
article {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 15px;
  box-shadow: var(--shadow-1);
  z-index: 1;
  transition: background-color 0.28s ease, border-color 0.28s ease;
}

.separator {
  width: 100%;
  height: 1px;
  background: var(--border-soft);
  margin: 16px 0;
}

.icon-box {
  position: relative;
  background: var(--border-gradient-onyx);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
  color: var(--text-1);
  box-shadow: none;
  flex-shrink: 0;
  z-index: 1;
  transition: transform var(--transition-2), box-shadow var(--transition-2);
}

.contact-item:hover .icon-box {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.45);
}

html[data-theme='light'] .contact-item:hover .icon-box {
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

.icon-box::before {
  content: '';
  position: absolute;
  inset: 1px;
  background: var(--bg-card-2);
  border-radius: inherit;
  z-index: -1;
}

.icon-box ion-icon {
  --ionicon-stroke-width: 32px;
}

article {
  display: none;
}

article.active {
  display: block;
  animation: fadeSlide 0.42s cubic-bezier(0.22, 0.9, 0.3, 1) backwards;
}

.h2,
.h3,
.h4,
.h5 {
  font-family: var(--ff-display);
  color: var(--text-1);
  letter-spacing: -0.01em;
}

.h2 { font-size: var(--fs-1); font-weight: 600; }
.h3 { font-size: var(--fs-2); font-weight: 600; }
.h4 { font-size: var(--fs-4); font-weight: 600; }
.h5 { font-size: var(--fs-7); font-weight: 500; }

.article-title {
  position: relative;
}

/* ---------- Layout ---------- */

main {
  margin: 15px 12px 75px;
  min-width: 0;
}

/* ---------- Sidebar ---------- */

.sidebar {
  margin-bottom: 15px;
  max-height: 116px;
  overflow: hidden;
  transition: max-height var(--transition-2), background-color 0.28s ease, border-color 0.28s ease;
}

.sidebar.active {
  max-height: 460px;
}

.sidebar-info {
  position: relative;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 15px;
  min-width: 0;
}

.avatar-box {
  position: relative;
  isolation: isolate;
  background: var(--bg-gradient-onyx);
  border-radius: var(--radius-md);
  overflow: visible;
  flex-shrink: 0;
  box-shadow: var(--shadow-1);
  transition: transform var(--transition-2), box-shadow var(--transition-2);
}

/* Beyaz aydinlatma halo (pp arkasinda) */
.avatar-box::before {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.32) 52%, transparent 76%);
  opacity: 0;
  filter: blur(10px);
  z-index: -1;
  pointer-events: none;
  transition: opacity var(--transition-2), transform var(--transition-2);
}

.sidebar-info:hover .avatar-box,
.avatar-box:focus-within {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 18px 42px hsla(0, 0%, 0%, 0.42), 0 0 30px rgba(255, 255, 255, 0.3);
}

.sidebar-info:hover .avatar-box::before,
.avatar-box:focus-within::before {
  opacity: 1;
  transform: scale(1.14);
}

.avatar-box img {
  position: relative;
  z-index: 1;
  width: 76px;
  height: 76px;
  border-radius: inherit;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-2), filter var(--transition-2);
}

.sidebar-info:hover .avatar-box img,
.avatar-box:focus-within img {
  transform: scale(1.07);
  filter: brightness(1.14) contrast(1.05);
}

html[data-theme='light'] .avatar-box::before {
  background: radial-gradient(circle at 50% 40%, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.11) 52%, transparent 76%);
}

html[data-theme='light'] .sidebar-info:hover .avatar-box {
  box-shadow: 0 18px 42px hsla(240, 10%, 20%, 0.2), 0 0 28px rgba(0, 0, 0, 0.18);
}

.info-content {
  min-width: 0;
}

.info-content .name {
  font-family: var(--ff-display);
  color: var(--text-1);
  font-size: var(--fs-3);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  transition: text-shadow var(--transition-2), letter-spacing var(--transition-2);
}

.sidebar-info:hover .info-content .name {
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.75), 0 0 30px rgba(255, 255, 255, 0.35);
  letter-spacing: 0.01em;
}

html[data-theme='light'] .sidebar-info:hover .info-content .name {
  text-shadow: 0 0 12px rgba(0, 0, 0, 0.35), 0 0 28px rgba(0, 0, 0, 0.14);
}

.info-content .title {
  color: var(--text-2);
  background: var(--bg-card-2);
  border: 1px solid var(--border-soft);
  font-size: var(--fs-8);
  font-weight: var(--fw-400);
  width: max-content;
  max-width: 100%;
  padding: 4px 11px;
  border-radius: 7px;
  letter-spacing: 0.02em;
}

.info_more-btn {
  position: absolute;
  top: -15px;
  right: -15px;
  border-radius: 0 var(--radius-lg) 0 var(--radius-md);
  font-size: 13px;
  color: var(--text-2);
  background: var(--bg-card-2);
  border: 1px solid var(--border-soft);
  border-top: none;
  border-right: none;
  padding: 10px;
  transition: var(--transition-1);
  z-index: 1;
}

.info_more-btn:hover,
.info_more-btn:focus-visible {
  color: var(--text-1);
  border-color: var(--border);
  background: var(--bg-card-3);
}

.info_more-btn span {
  display: none;
}

.sidebar-info_more {
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-2), visibility var(--transition-2);
}

.sidebar.active .sidebar-info_more {
  opacity: 1;
  visibility: visible;
}

.contacts-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.contact-info {
  min-width: 0;
  flex: 1;
}

.contact-title {
  color: var(--text-3);
  font-size: var(--fs-8);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 3px;
}

.contact-info :is(.contact-link, time, address) {
  color: var(--text-1);
  font-size: var(--fs-7);
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.contact-info address {
  font-style: normal;
}

.social-list {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  padding-bottom: 2px;
  padding-left: 2px;
}

.social-item .social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: var(--bg-card-2);
  color: var(--text-2);
  font-size: 17px;
  transition: var(--transition-1);
}

.social-item .social-link:hover {
  color: var(--text-1);
  border-color: var(--text-1);
  background: var(--bg-card-3);
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.4);
  transform: translateY(-5px) scale(1.06);
}

html[data-theme='light'] .social-item .social-link:hover {
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.18);
}

/* ---------- Navbar ---------- */

.navbar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-soft);
  border-radius: 14px 14px 0 0;
  box-shadow: 0 -8px 24px hsla(0, 0%, 0%, 0.18);
  z-index: 5;
}

.navbar-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  padding: 0 6px;
  gap: 0;
}

.navbar-link {
  font-family: var(--ff-display);
  color: var(--text-2);
  font-size: var(--fs-8);
  font-weight: 500;
  padding: 20px 6px;
  position: relative;
  border-radius: 8px;
  transition: color var(--transition-1), background-color var(--transition-1);
}

.navbar-link::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 12px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.95), 0 0 30px rgba(255, 255, 255, 0.5);
  transform: translateX(-50%);
  transition: width var(--transition-2);
}

html[data-theme='light'] .navbar-link::after {
  box-shadow: none;
}

.navbar-link:hover,
.navbar-link:focus-visible {
  color: var(--text-1);
  background: var(--accent-soft);
}

.navbar-link.active {
  color: var(--text-1);
  font-weight: 600;
}

.navbar-link.active::after {
  width: 16px;
}

.navbar-item--theme {
  display: flex;
  align-items: center;
  padding-inline: 4px;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: var(--bg-card-2);
  color: var(--text-2);
  font-size: 16px;
  transition: var(--transition-1);
}

.theme-toggle:hover {
  color: var(--text-1);
  border-color: var(--text-1);
  background: var(--bg-card-3);
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.4);
  transform: translateY(-2px) scale(1.05);
}

html[data-theme='light'] .theme-toggle:hover {
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.18);
}

.theme-toggle ion-icon {
  transition: transform var(--transition-2);
}

.theme-toggle:hover ion-icon {
  transform: rotate(-18deg);
}

.theme-toggle .icon-sun { display: none; }
html[data-theme='light'] .theme-toggle .icon-sun { display: block; }
html[data-theme='light'] .theme-toggle .icon-moon { display: none; }

/* ---------- About ---------- */

.about .article-title {
  margin-bottom: 15px;
}

.about-text {
  color: var(--text-2);
  font-size: var(--fs-6);
  font-weight: var(--fw-300);
  line-height: 1.7;
}

.about-text p {
  margin-bottom: 15px;
}

.service {
  margin-bottom: 30px;
}

.service-title {
  margin-bottom: 18px;
}

.service-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.service-item {
  position: relative;
  background: var(--bg-card-2);
  border: 1px solid var(--border-soft);
  padding: 20px;
  border-radius: var(--radius-md);
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 16px;
  transition: border-color var(--transition-1), transform var(--transition-2),
    box-shadow var(--transition-2), background-color 0.28s ease;
}

.service-item:hover {
  border-color: var(--text-1);
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow-3), 0 0 30px rgba(255, 255, 255, 0.22);
}

html[data-theme='light'] .service-item:hover {
  box-shadow: var(--shadow-3), 0 0 26px rgba(0, 0, 0, 0.12);
}

.service-icon-box {
  margin-top: 2px;
  color: var(--text-1);
}

.service-icon-box ion-icon {
  font-size: 30px;
}

.service-content-box {
  text-align: left;
  min-width: 0;
}

.service-item-title {
  margin-bottom: 6px;
}

.service-item-text {
  color: var(--text-2);
  font-size: var(--fs-6);
  font-weight: var(--fw-300);
  line-height: 1.65;
}

/* ---------- Resume ---------- */

.timeline {
  margin-bottom: 30px;
}

.timeline .title-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 22px;
}

.timeline-list {
  font-size: var(--fs-6);
  margin-left: 45px;
}

.timeline-item {
  position: relative;
}

.timeline-item:not(:last-child) {
  margin-bottom: 22px;
}

.timeline-item-title {
  font-size: var(--fs-6);
  line-height: 1.35;
  margin-bottom: 5px;
}

.timeline-list span {
  color: var(--vegas-gold);
  font-size: var(--fs-7);
  font-weight: var(--fw-400);
  line-height: 1.6;
}

.timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  top: -24px;
  left: -30px;
  width: 1px;
  height: calc(100% + 46px);
  background: var(--border);
}

.timeline-item::after {
  content: '';
  position: absolute;
  top: 6px;
  left: -32px;
  height: 5px;
  width: 5px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--bg-card);
}

.timeline-text {
  color: var(--text-2);
  font-weight: var(--fw-300);
  line-height: 1.65;
}

.skill {
  margin-bottom: 4px;
}

.skills-title {
  margin-bottom: 18px;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  background: none;
  box-shadow: none;
  border: none;
}

.skills-item {
  margin: 0 !important;
}

.skill .title-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 0;
}

.skills-list .skills-item .h5 {
  color: var(--text-1);
  background: var(--bg-card-2);
  border: 1px solid var(--border-soft);
  padding: 7px 12px;
  border-radius: 999px;
  font-size: var(--fs-7);
  font-weight: 400;
  transition: var(--transition-2);
  transition-property: border-color, background-color, color, transform;
}

.skills-list .skills-item:hover .h5 {
  border-color: var(--text-3);
  background: var(--bg-card-3);
  color: var(--text-1);
  transform: translateY(-2px);
}

/* ---------- Projects ---------- */

.projects .about-text {
  margin-bottom: 20px;
}

.project-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 10px;
}

.project-item {
  display: block;
  transition: transform var(--transition-2);
}

.project-item:hover {
  transform: translateY(-9px);
}

article.active .project-item {
  animation: cardIn 0.5s cubic-bezier(0.22, 0.9, 0.3, 1) backwards;
}

article.active .project-item:nth-child(2) { animation-delay: 0.06s; }
article.active .project-item:nth-child(3) { animation-delay: 0.12s; }
article.active .project-item:nth-child(4) { animation-delay: 0.18s; }
article.active .project-item:nth-child(5) { animation-delay: 0.24s; }
article.active .project-item:nth-child(6) { animation-delay: 0.3s; }

.project-link {
  width: 100%;
  display: block;
  text-align: left;
  color: inherit;
}

.project-img {
  position: relative;
  width: 100%;
  height: 190px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 14px;
  background: var(--bg-card-2);
  border: 1px solid var(--border-soft);
  transition: border-color var(--transition-1), box-shadow var(--transition-2),
    background-color 0.28s ease;
}

.project-link:hover .project-img,
.project-link:focus-visible .project-img {
  border-color: var(--text-1);
  box-shadow: var(--shadow-4), 0 0 34px rgba(255, 255, 255, 0.3);
}

html[data-theme='light'] .project-link:hover .project-img,
html[data-theme='light'] .project-link:focus-visible .project-img {
  box-shadow: var(--shadow-4), 0 0 30px rgba(0, 0, 0, 0.14);
}

.project-img::before {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
  z-index: 1;
  transition: var(--transition-1);
}

.project-link:hover .project-img::before,
.project-link:focus-visible .project-img::before {
  background: hsla(0, 0%, 0%, 0.55);
}

.project-img::after {
  content: '';
  position: absolute;
  top: 0;
  left: -70%;
  width: 55%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  transform: skewX(-18deg);
  opacity: 0;
  z-index: 3;
  pointer-events: none;
}

.project-link:hover .project-img::after,
.project-link:focus-visible .project-img::after {
  animation: shine 0.95s cubic-bezier(0.22, 0.9, 0.3, 1);
}

@keyframes shine {
  0% { left: -70%; opacity: 0; }
  30% { opacity: 1; }
  100% { left: 125%; opacity: 0; }
}

html[data-theme='light'] .project-img::after {
  background: linear-gradient(100deg, transparent, rgba(10, 10, 11, 0.18), transparent);
}

.project-item-icon-box {
  --scale: 0.85;
  background: var(--bg-card);
  color: var(--text-1);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(var(--scale));
  font-size: 18px;
  padding: 16px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-2);
  opacity: 0;
  z-index: 2;
  transition: var(--transition-2);
}

.project-link:hover .project-item-icon-box,
.project-link:focus-visible .project-item-icon-box {
  --scale: 1;
  opacity: 1;
}

.project-item-icon-box ion-icon {
  --ionicon-stroke-width: 44px;
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-2);
}

.project-link:hover img {
  transform: scale(1.09);
}

.project-title,
.project-category {
  margin-left: 2px;
}

.project-title {
  font-family: var(--ff-display);
  color: var(--text-1);
  font-size: var(--fs-5);
  font-weight: 500;
  line-height: 1.35;
  margin-bottom: 3px;
  transition: color var(--transition-1);
}

.project-title::after {
  content: '';
  display: block;
  width: 0;
  height: 1px;
  margin-top: 6px;
  border-radius: 1px;
  background: var(--text-1);
  transition: width var(--transition-2);
}

.project-link:hover .project-title::after,
.project-link:focus-visible .project-title::after {
  width: 32px;
}

.project-category {
  color: var(--text-3);
  font-size: var(--fs-7);
  font-weight: var(--fw-300);
}

/* ---------- Buttons ---------- */

.form-btn {
  position: relative;
  background: var(--text-1);
  border: 1px solid var(--text-1);
  color: var(--bg-card);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  width: max-content;
  max-width: 100%;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: var(--fs-6);
  font-weight: 500;
  text-transform: capitalize;
  transition: var(--transition-2);
  transition-property: background-color, border-color, color, transform, box-shadow;
}

.form-btn ion-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.form-btn:hover {
  background: var(--text-2);
  border-color: var(--text-2);
  color: var(--bg-card);
  transform: translateY(-2px);
  box-shadow: var(--shadow-3);
}

.form-btn:active {
  transform: translateY(0);
}

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

.btn-ghost:hover {
  background: var(--accent-soft);
  border-color: var(--text-1);
  color: var(--text-1);
}

/* ---------- Support ---------- */

.blog .about-text {
  margin-bottom: 20px;
}

/* ---------- Contact ---------- */

.contact-form {
  min-width: 0;
}

.form-title {
  margin-bottom: 16px;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.contact-btn {
  animation: fadeSlide 0.3s ease backwards;
  min-width: 0;
  flex: 0 1 auto;
}

.contact-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-btn:nth-child(2) {
  animation-delay: 0.06s;
}

/* ---------- Project detail pages ---------- */

.project-page {
  background: var(--bg-page);
}

.project-main {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 16px 64px;
}

.project-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-size: var(--fs-7);
  transition: var(--transition-1);
}

.back-link:hover {
  color: var(--text-1);
  transform: translateX(-3px);
}

.project-detail {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-2);
  animation: fadeSlide 0.42s cubic-bezier(0.22, 0.9, 0.3, 1) backwards;
  transition: background-color 0.28s ease, border-color 0.28s ease;
}

.project-detail-cover {
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 22px;
  background: var(--bg-card-2);
  border: 1px solid var(--border-soft);
}

.project-detail-cover img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.project-detail-cat {
  color: var(--vegas-gold);
  font-size: var(--fs-7);
  margin-top: 6px;
}

.project-detail-desc {
  color: var(--text-2);
  font-size: var(--fs-6);
  line-height: 1.75;
  margin: 18px 0;
}

.project-detail-sub {
  font-family: var(--ff-display);
  color: var(--text-1);
  font-size: var(--fs-4);
  font-weight: 600;
  margin-bottom: 12px;
}

.project-detail-features {
  margin-bottom: 22px;
}

.project-detail-features li {
  position: relative;
  color: var(--text-2);
  font-size: var(--fs-6);
  line-height: 1.7;
  padding-left: 18px;
  margin-bottom: 8px;
}

.project-detail-features li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.project-detail-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.project-detail-tech span {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-card-2);
  border: 1px solid var(--border-soft);
  color: var(--text-2);
  font-size: var(--fs-7);
}

.project-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--border-soft);
}

/* ---------- Scrollbar ---------- */

@media (min-width: 1250px) {
  body::-webkit-scrollbar {
    width: 14px;
  }
  body::-webkit-scrollbar-track {
    background: var(--bg-page);
  }
  body::-webkit-scrollbar-thumb {
    border: 4px solid var(--bg-page);
    background: var(--border);
    border-radius: 20px;
  }
  body::-webkit-scrollbar-thumb:hover {
    background: var(--text-3);
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 369px) {
  .navbar-link {
    padding: 16px 4px;
    --fs-8: 10px;
  }

  .theme-toggle {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }

  .avatar-box::before {
    inset: -6px;
    filter: blur(7px);
  }
}

@media (min-width: 580px) {
  :root {
    --fs-1: 30px;
    --fs-2: 22px;
    --fs-3: 24px;
    --fs-4: 18px;
    --fs-5: 16px;
    --fs-6: 15px;
    --fs-7: 14px;
    --fs-8: 12px;
  }

  .sidebar,
  article {
    width: 520px;
    margin-inline: auto;
    padding: 26px;
  }

  .icon-box {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    font-size: 18px;
  }

  main {
    margin-top: 40px;
    margin-bottom: 100px;
  }

  .sidebar {
    max-height: 180px;
    margin-bottom: 26px;
  }

  .sidebar.active {
    max-height: 600px;
  }

  .sidebar-info {
    gap: 22px;
  }

  .avatar-box {
    border-radius: var(--radius-lg);
  }

  .avatar-box img {
    width: 112px;
    height: 112px;
  }

  .info-content .name {
    margin-bottom: 12px;
  }

  .info-content .title {
    padding: 5px 14px;
  }

  .info_more-btn {
    top: -26px;
    right: -26px;
    padding: 10px 14px;
  }

  .info_more-btn span {
    display: block;
    font-size: var(--fs-8);
  }

  .info_more-btn ion-icon {
    display: none;
  }

  .separator {
    margin: 26px 0;
  }

  .contacts-list {
    gap: 18px;
  }

  .navbar {
    border-radius: 18px 18px 0 0;
  }

  .navbar-list {
    gap: 6px;
  }

  .navbar-link {
    --fs-8: 13px;
    padding: 20px 10px;
  }

  .about .article-title {
    margin-bottom: 20px;
  }

  .service-item {
    padding: 24px;
  }

  .timeline-list {
    margin-left: 62px;
  }

  .timeline-item:not(:last-child)::before {
    left: -39px;
  }

  .timeline-item::after {
    left: -41px;
    height: 6px;
    width: 6px;
  }

  .project-img {
    height: auto;
  }

  .project-img img {
    height: 190px;
  }

  .project-main {
    padding: 56px 24px 88px;
  }

  .project-detail {
    padding: 32px;
  }
}

@media (min-width: 768px) {
  .sidebar,
  article {
    width: 700px;
  }

  .contacts-list {
    grid-template-columns: 1fr 1fr;
    gap: 20px 18px;
  }

  .navbar-link {
    --fs-8: 14px;
  }

  .project-list {
    grid-template-columns: 1fr 1fr;
  }

  .service-list {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}

@media (min-width: 1024px) {
  .sidebar,
  article {
    width: 950px;
    box-shadow: var(--shadow-2);
  }

  main {
    margin-top: 84px;
    margin-bottom: 40px;
  }

  .main-content {
    position: relative;
    width: max-content;
    margin: auto;
  }

  .navbar {
    position: absolute;
    bottom: auto;
    top: -56px;
    left: auto;
    right: 0;
    width: max-content;
    border-radius: var(--radius-md);
    padding: 0 10px;
    background: var(--nav-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-1);
  }

  .navbar-list {
    gap: 18px;
    padding: 0;
  }

  .navbar-link {
    padding: 12px 4px;
    font-weight: 500;
  }

  .navbar-link::after {
    bottom: 6px;
  }

  .project-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
  }

  .service-list {
    gap: 18px;
  }
}

@media (min-width: 1250px) {
  .sidebar,
  article {
    width: auto;
  }

  article {
    min-height: 100%;
  }

  main {
    max-width: 1200px;
    margin-inline: auto;
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 24px;
  }

  .main-content {
    min-width: 0;
    flex: 1;
    width: auto;
    margin: 0;
  }

  .sidebar {
    position: sticky;
    top: 60px;
    width: 280px;
    flex-shrink: 0;
    max-height: max-content;
    height: max-content;
    margin-bottom: 0;
    padding-top: 54px;
    z-index: 1;
  }

  .sidebar-info {
    flex-direction: column;
    text-align: center;
  }

  .avatar-box img {
    width: 132px;
    height: 132px;
  }

  .info-content .name {
    white-space: nowrap;
    text-align: center;
  }

  .info-content .title {
    margin-inline: auto;
  }

  .info_more-btn {
    display: none;
  }

  .sidebar-info_more {
    opacity: 1;
    visibility: visible;
  }

  .contacts-list {
    grid-template-columns: 1fr;
  }

  .contact-item {
    align-items: flex-start;
  }

  .social-list {
    justify-content: center;
  }
}

/* ---------- Theme switch transitions ---------- */

.icon-box::before,
.info-content .title,
.project-detail-cover,
.project-detail-tech span,
.project-detail-features li::before,
.timeline-item::after,
.navbar,
.contact-title,
.contact-info .contact-link,
.project-category {
  transition: background-color 0.28s ease, border-color 0.28s ease, color 0.28s ease;
}