/* ===== BASE RESET & TOKENS ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --accent: #0077ff;
  --dark: #111;
  --light-bg: #f4f4f4;
  --card-bg: #ffffff;
  --text: #333;
  --radius: 8px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 5px 10px rgba(0, 0, 0, 0.2);
  --transition: 0.3s ease;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: var(--light-bg);
  color: var(--text);
}

/* ===== LINKS & LISTS ===== */
a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.header-p {
  text-indent: 30px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 20px;
  color: #011830;
}

/* ===== HEADER ===== */
header {
  background-color: var(--dark);
  color: white;
  text-align: center;
  padding: 60px 20px;
  animation: fadeSlide 1.5s ease;
}

.profile {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 20px;
  animation: zoomIn 1.5s ease;
  border: 4px solid rgba(255, 255, 255, 0.15);
}

header h1 {
  font-size: clamp(24px, 5vw, 36px);
  margin: 10px 0;
  animation: slideUp 1.5s ease;
}

header > p {
  font-size: clamp(14px, 3vw, 18px);
  color: #ffffff;
  margin: 0 0 20px;
  animation: slideUp 2s ease;
}

/* ===== HEADER BUTTONS ===== */
.buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.buttons a {
  display: inline-block;
  padding: 10px 24px;
  background: #333;
  color: white;
  border-radius: var(--radius);
  transition:
    background var(--transition),
    transform var(--transition);
  font-size: 15px;
}

.buttons a:hover {
  background: var(--accent);
  transform: translateY(-3px);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(-40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes zoomIn {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ===== SECTIONS ===== */
section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 20px;
}

section h2 {
  font-size: clamp(20px, 4vw, 26px);
  margin-bottom: 16px;
}

.projects-heading {
  padding-bottom: 0;
}

/* ===== SKILLS GRID ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 50px;
}

/* Mobile: single column */
@media (max-width: 480px) {
  .skills-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* Tablet+: 3 columns */
@media (min-width: 600px) {
  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.skills-grid-contents,
.skills-grid-contents-off,
.skills-grid-contents-off-noh,
.skills-grid-contents-off-noh-py {
  position: relative;
  padding: 20px;
  background-color: var(--card-bg);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform var(--transition);
  font-weight: 600;
  font-size: clamp(13px, 2.5vw, 16px);
}

.skills-grid-contents:hover,
.skills-grid-contents-off:hover,
.skills-grid-contents-off-noh:hover,
.skills-grid-contents-off-noh-py:hover {
  transform: translateY(-8px);
}

.skills-grid-contents::after {
  content: "✓";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  opacity: 0;
  transition: opacity 0.3s;
  color: green;
  font-weight: bold;
}
.skills-grid-contents:hover::after {
  opacity: 1;
}

.skills-grid-contents-off::after,
.skills-grid-contents-off-noh::after,
.skills-grid-contents-off-noh-py::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  font-size: 16px;
  transition: opacity 0.3s;
  font-weight: bold;
}

.skills-grid-contents-off:hover::after {
  content: "0% ×";
  opacity: 1;
  color: red;
}

.skills-grid-contents-off-noh:hover::after {
  content: "28% ×";
  opacity: 1;
  color: red;
}

.skills-grid-contents-off-noh-py:hover::after {
  content: "50% ×";
  opacity: 1;
  color: rgb(45, 10, 247);
}

/* ===== PROJECTS ===== */
.projects {
  padding-top: 10px;
}

.projects-list {
  display: grid;
  /* grid-template-columns: 1fr; */
  gap: 50px;
}

/* Tablet: 2 columns */
@media (min-width: 600px) {
  .projects-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.projects-item,
.projects-item-valentines,
.projects-item-happy,
.projects-item-goit {
  border: 1px solid #ddd;
  box-shadow:
    0 2px 1px rgba(46, 47, 66, 0.08),
    0 1px 1px rgba(46, 47, 66, 0.16),
    0 1px 6px rgba(46, 47, 66, 0.08);
  padding: 24px;
  border-radius: var(--radius);
  transition:
    transform var(--transition),
    color var(--transition),
    background-image var(--transition);
  background-color: var(--card-bg);
  min-height: 160px;
}

.projects-item h3,
.projects-item-valentines h3,
.projects-item-happy h3,
.projects-item-goit h3 {
  margin-top: 0;
  font-size: clamp(15px, 2.5vw, 18px);
}

.projects-item p,
.projects-item-valentines p,
.projects-item-happy p,
.projects-item-goit p {
  font-size: clamp(13px, 2vw, 15px);
}

.projects-item a,
.projects-item-valentines a,
.projects-item-happy a,
.projects-item-goit a {
  display: inline-block;
  margin-top: 10px;
  color: #4caf50;
  font-weight: bold;
  transition:
    transform var(--transition),
    filter var(--transition),
    color var(--transition);
}

/* Hover image reveal — only on non-touch devices */
/* @media (hover: hover) {} */
.projects-item:hover {
  background-image: url("../images/Nine Cups.JPG");
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-md);
  transform: translateY(-10px);
  color: rgba(0, 0, 0, 0);
}

.projects-item-valentines:hover {
  background-image: url("../images/Valentines.JPG");
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-md);
  transform: translateY(-10px);
  color: rgba(0, 0, 0, 0);
}

.projects-item-happy:hover {
  background-image: url("../images/happy-new-year.JPG");
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-md);
  transform: translateY(-10px);
  color: rgba(0, 0, 0, 0);
}

.projects-item-goit:hover {
  background-image: url("../images/hero.JPG");
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-md);
  transform: translateY(-10px);
  color: rgba(0, 0, 0, 0);
}

.projects-item a:hover,
.projects-item-happy a:hover {
  transform: scale(1.2);
  filter: brightness(1.3);
}

.projects-item-valentines a:hover {
  transform: scale(1.2);
  color: #000000;
  filter: brightness(1.3);
}

.projects-item-happy a:hover,
.projects-item-goit a:hover {
  transform: scale(1.2);
  color: #f70000;
  filter: brightness(1.3);
}

/* @media (hover: none) {
  .projects-item:active {
    background-image: url("../images/Nine Cups.JPG");
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow-md);
    transform: translateY(-10px);
    color: rgba(0, 0, 0, 0);
  }

  .projects-item-valentines:active {
    background-image: url("../images/Valentines.JPG");
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow-md);
    transform: translateY(-10px);
    color: rgba(0, 0, 0, 0);
  }

  .projects-item-happy:active {
    background-image: url("../images/happy-new-year.JPG");
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow-md);
    transform: translateY(-10px);
    color: rgba(0, 0, 0, 0);
  }

  .projects-item-goit:active {
    background-image: url("../images/hero.JPG");
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow-md);
    transform: translateY(-10px);
    color: rgba(0, 0, 0, 0);
  }

  .projects-item a:hover,
  .projects-item-happy a:active {
    transform: scale(1.2);
    filter: brightness(1.3);
  }

  .projects-item-valentines a:active {
    transform: scale(1.2);
    color: #000000;
    filter: brightness(1.3);
  }

  .projects-item-happy a:active,
  .projects-item-goit a:active {
    transform: scale(1.2);
    color: #f70000;
    filter: brightness(1.3);
  }
} */

/* ===== CONTACT ===== */
.contact ul {
  padding: 0;
}

.contact h2 {
  margin-bottom: 12px;
}

.contact-list {
  margin-bottom: 10px;
  font-size: clamp(13px, 2.5vw, 16px);
}

.contact-list p {
  margin: 0;
}

.contact-list a {
  display: inline;
  color: black;
  transition:
    color var(--transition),
    transform var(--transition);
}

.contact-list a:hover {
  color: #07f113;
  filter: brightness(1.3);
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 20px;
  background: var(--dark);
  color: white;
  font-size: 14px;
  margin-top: 20px;
}

/* ===== TABLET LAYOUT TWEAKS (600–1024px) ===== */
@media (min-width: 600px) and (max-width: 1024px) {
  header {
    padding: 50px 40px;
  }

  .profile {
    width: 160px;
    height: 160px;
  }

  section {
    padding: 20px 32px;
  }
}

/* ===== DESKTOP (1024px+) ===== */
@media (min-width: 1024px) {
  .profile {
    width: 200px;
    height: 200px;
  }

  .skills-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  section {
    padding: 30px 20px;
  }
}

/* ===== MOBILE SMALL (≤360px) ===== */
@media (max-width: 360px) {
  header {
    padding: 40px 14px;
  }

  .profile {
    width: 120px;
    height: 120px;
  }

  .buttons a {
    padding: 9px 16px;
    font-size: 14px;
  }

  .projects-item,
  .projects-item-valentines,
  .projects-item-happy,
  .projects-item-goit {
    padding: 16px;
  }
}
