
:root {
  --c-black: #222023;
  --c-cream: #FAEADD;
  --c-yellow: #FBD050;
  --c-pink: #F29CB7;
  --c-lav: #DDAAFF;
  --c-purple: #522A6F;

  --font-body: "Montserrat", sans-serif;
  --font-display: "Michroma", sans-serif;

  --container: 1280px;
  --radius: 10px;
  --radius-lg: 16px;

  --t-fast: 160ms;
  --t-med: 240ms;

  --bg: var(--c-cream);
  --text: var(--c-black);
  --muted: rgba(34, 32, 35, 0.72);
  --border: rgba(34, 32, 35, 0.14);

  --header-bg: var(--c-black);
  --header-text: var(--c-cream);

  --surface: rgba(221, 170, 255, 0.16); 
  --card: rgba(255, 255, 255, 0.72);
  --card-border: rgba(34, 32, 35, 0.12);

  --accent: var(--c-purple);
  --accent-2: var(--c-lav);

  --link: var(--c-purple);
  --focus: var(--c-lav);

  --hero-overlay: linear-gradient(180deg,
    rgba(221, 170, 255, 0.18) 0%,
    rgba(82, 42, 111, 0.25) 55%,
    rgba(34, 32, 35, 0.25) 100%
  );

  --shadow-1: 0 4px 8px rgba(0, 0, 0, 0.16);
  --shadow-2: 0 8px 16px rgba(0, 0, 0, 0.24);
}

html[data-theme="dark"] {
  --bg: var(--c-black);
  --text: var(--c-cream);
  --muted: rgba(250, 234, 221, 0.75);
  --border: rgba(250, 234, 221, 0.18);

  --header-bg: var(--c-black);
  --header-text: var(--c-cream);

  --surface: rgba(250, 234, 221, 0.06);
  --card: rgba(250, 234, 221, 0.10);
  --card-border: rgba(250, 234, 221, 0.18);

  --accent: var(--c-yellow);
  --accent-2: var(--c-pink);

  --link: var(--c-yellow);
  --focus: var(--c-pink);

  --hero-overlay: linear-gradient(180deg,
    rgba(250, 234, 221, 0.10) 0%,
    rgba(251, 208, 80, 0.18) 38%,
    rgba(242, 156, 183, 0.20) 72%,
    rgba(34, 32, 35, 0.40) 100%
  );
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: var(--c-black);
    --text: var(--c-cream);
    --muted: rgba(250, 234, 221, 0.75);
    --border: rgba(250, 234, 221, 0.18);

    --header-bg: var(--c-black);
    --header-text: var(--c-cream);

    --surface: rgba(250, 234, 221, 0.06);
    --card: rgba(250, 234, 221, 0.10);
    --card-border: rgba(250, 234, 221, 0.18);

    --accent: var(--c-yellow);
    --accent-2: var(--c-pink);

    --link: var(--c-yellow);
    --focus: var(--c-pink);

    --hero-overlay: linear-gradient(180deg,
      rgba(250, 234, 221, 0.10) 0%,
      rgba(251, 208, 80, 0.18) 38%,
      rgba(242, 156, 183, 0.20) 72%,
      rgba(34, 32, 35, 0.40) 100%
    );
  }
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
}

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

a {
  color: var(--link);
  text-decoration-color: rgba(0, 0, 0, 0);
  transition: color var(--t-fast) ease,
              text-decoration-color var(--t-fast) ease,
              opacity var(--t-fast) ease;
}

a:hover {
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 10px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 10px;
  background: var(--accent);
  color: var(--c-black);
  padding: 10px 12px;
  border-radius: 8px;
  z-index: 9999;
}
.skip-link:focus {
  left: 10px;
}

header {
  background: var(--header-bg);
  padding: 10px;
  border-bottom: 1px solid rgba(250, 234, 221, 0.10);
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.logo img {
  width: 80px;
  height: auto;
}

nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

nav a {
  color: var(--header-text);
  text-decoration: none;
  padding: 10px 10px;
  border-radius: 10px;
}

nav a:hover {
  background: rgba(250, 234, 221, 0.10);
}

nav a[aria-current="page"] {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(250, 234, 221, 0.20);
  background: rgba(250, 234, 221, 0.06);
  color: var(--header-text);
  cursor: pointer;
  transition: transform var(--t-fast) ease,
              background var(--t-fast) ease,
              opacity var(--t-fast) ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  background: rgba(250, 234, 221, 0.10);
}

.theme-toggle:active {
  transform: translateY(0);
  opacity: 0.92;
}

.theme-toggle [data-icon] {
  line-height: 1;
}

.theme-toggle [data-label] {
  font-weight: 600;
  font-size: 14px;
}


.hero {
  background-image: url("../images/hero.jpg");
  background-size: 110%;
  background-position: center bottom;
  background-attachment: fixed;
  background-repeat: no-repeat;
  min-height: 260px;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-overlay);
  pointer-events: none;
}

.hero-inner {
  min-height: 260px;
}

.hero-text {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: var(--header-text);
  text-align: center;
  padding: 0 16px;
  white-space: nowrap;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.hero-text h1 {
  margin: 0;
  font-size: 42px;
  letter-spacing: 1px;
}

.michroma-regular {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: normal;
}

main {
  padding: 48px 0 80px;
}

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

.content h2 {
  font-size: 32px;
  margin: 26px 0 14px;
}

.content p {
  color: var(--muted);
  max-width: 70ch;
  margin: 0 auto 18px;
  padding: 0 16px;
}

.cards-container {
  display: flex;
  gap: 28px;
  justify-content: center;
  padding: 32px 16px 40px;
  flex-wrap: wrap;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-1);
  transition: transform var(--t-med) ease,
              box-shadow var(--t-med) ease;
  width: 380px;
  min-height: 310px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.card:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-2);
}

.card h3 {
  margin: 10px 0 12px;
  font-size: 22px;
}

.card p {
  margin: 10px 0 0;
  color: var(--muted);
}

.card a {
  color: var(--accent);
  font-weight: 600;
  align-items: center;
  justify-content: center;
}

.card a:hover {
  color: var(--accent-2);
}


.card-icon {
  border-radius: 14px;
  overflow: hidden;
  height: 180px;
  object-fit: cover;
  display: flex;
  justify-self: center;
  align-items: center;
  border: 1px solid var(--border);
  background: var(--surface);
}

.portfolio {
  max-width: 900px;
  margin: 40px auto 0;
  padding: 22px 16px;
  text-align: left;
}

.portfolio h2 {
  text-align: center;
  font-size: 32px;
  margin: 0 0 30px;
}

.portfolio-block {
  margin-bottom: 34px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.portfolio-block p,
.portfolio-block li {
  color: var(--text);
}

.portfolio-contact {
  text-align: center;
  color: var(--muted);
  margin: 0;
}



.label {
  margin-top: 14px;
  font-weight: 600;
}

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

.skills-list li {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 14px;
}

.gallery-row {
  margin-bottom: 34px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.gallery-label {
  font-size: 22px;
  margin: 0 0 12px;
  border-bottom: 2px solid rgba(0, 0, 0, 0);
  padding-bottom: 6px;
}

.gallery-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.gallery-images img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-1);
  transition: transform var(--t-med) ease;
}

.gallery-images img:hover {
  transform: scale(1.02);
}


.about-media {
  display: flex;
  justify-content: center;
}

.about-media img {
  width: min(360px, 100%);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
  border: 1px solid var(--border);
}

footer {
  background: var(--header-bg);
  color: var(--header-text);
  text-align: center;
  padding: 14px;
  margin-top: 40px;
}

@media (max-width: 980px) {
  .hero {
    background-attachment: scroll;
    background-size: cover;
  }
  .hero-text h1 {
    font-size: 34px;
    white-space: normal;
  }
  .card {
    width: min(520px, 100%);
  }
  .gallery-images {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  header .container {
    flex-wrap: wrap;
    justify-content: center;
  }
  nav {
    flex-wrap: wrap;
    justify-content: center;
  }
  .content h2 {
    font-size: 28px;
  }
  .gallery-images {
    grid-template-columns: 1fr;
  }
}
