
/* =========================================
   1. ROOT & THEME
========================================= */

:root {
  --bg: #f5f7ff;
  --surface: #ffffff;
  --surface-soft: #eaf0ff;
  --text: #151923;
  --muted: #626b7c;
  --border: #151923;

  --red: #ff4057;
  --red-dark: #e72d47;
  --blue: #3978ff;
  --blue-dark: #205bd8;

  --shadow: 6px 6px 0 var(--border);
  --shadow-small: 4px 4px 0 var(--border);

  --radius: 18px;
  --transition: 0.25s ease;
}

[data-theme="dark"] {
  --bg: #101522;
  --surface: #1c2638;
  --surface-soft: #26334a;
  --text: #f5f7ff;
  --muted: #b5c0d4;
  --border: #f5f7ff;

  --red: #ff5269;
  --red-dark: #e72d47;
  --blue: #548cff;
  --blue-dark: #3978ff;

  --shadow: 6px 6px 0 var(--border);
  --shadow-small: 4px 4px 0 var(--border);
}

/* =========================================
   2. RESET
========================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  font-family: "Space Grotesk", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.section {
  padding: 110px 0;
}

/* =========================================
   3. HEADER & NAVIGATION
========================================= */

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg);
  border-bottom: 2px solid var(--border);
}

.navbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -2px;
}

.logo span {
  color: var(--red);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 700;
  position: relative;
  transition: color var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--red);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle,
.menu-toggle {
  width: 42px;
  height: 42px;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
}

.theme-toggle {
  font-size: 1.3rem;
}

.theme-toggle:hover,
.menu-toggle:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--border);
}

.menu-toggle {
  display: none;
  padding: 9px;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  margin: 4px auto;
  transition: var(--transition);
}

/* =========================================
   4. HERO
========================================= */

.hero {
  min-height: 650px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 65px;
}

.availability {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--surface);
  border: 2px solid var(--border);
  padding: 8px 14px;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 25px;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(57, 120, 255, 0.15);
}

.hero-intro,
.section-label {
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.hero-content h1 {
  font-size: clamp(3rem, 6vw, 5.6rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -5px;
  overflow-wrap: anywhere;
}

.hero-content h1 span {
  color: var(--red);
}

.hero-content h2 {
  font-size: clamp(1.2rem, 2.5vw, 1.7rem);
  margin-top: 20px;
  color: var(--blue);
}

.hero-description {
  max-width: 520px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 1rem;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 13px 23px;
  border: 2px solid var(--border);
  border-radius: 9px;
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: var(--shadow-small);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
}

.btn:hover {
  transform: translate(-3px, -3px);
  box-shadow: 7px 7px 0 var(--border);
}

.btn-primary {
  background: var(--red);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--red-dark);
}

.btn-outline {
  background: var(--surface);
  color: var(--text);
}

.hero-social {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 35px;
}

.social-link {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 9px;
  box-shadow: 3px 3px 0 var(--border);
  transition: var(--transition);
}

.social-link svg {
  width: 21px;
  height: 21px;
}

.social-link:hover {
  background: var(--blue);
  color: white;
  transform: translateY(-4px);
}

/* Hero visual */

.hero-visual {
  min-height: 460px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-frame {
  width: min(340px, 85%);
  aspect-ratio: 4 / 5;
  background: var(--blue);
  border: 3px solid var(--border);
  border-radius: 22px;
  padding: 12px;
  box-shadow: 12px 12px 0 var(--border);
  transform: rotate(3deg);
}

.profile-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 2px solid var(--border);
  border-radius: 13px;
  background: var(--surface-soft);
}

.floating-card {
  position: absolute;
  bottom: 45px;
  left: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 2px solid var(--border);
  padding: 13px 16px;
  border-radius: 12px;
  box-shadow: var(--shadow-small);
  transform: translateZ(0);
}

.floating-icon {
  color: var(--red);
  font-size: 1.8rem;
}

.floating-card strong,
.floating-card small {
  display: block;
}

.floating-card strong {
  font-size: 0.9rem;
}

.floating-card small {
  color: var(--muted);
  font-size: 0.75rem;
}

.hero-sticker {
  position: absolute;
  top: 35px;
  right: -5px;
  background: var(--red);
  color: white;
  border: 2px solid var(--border);
  border-radius: 50%;
  width: 105px;
  height: 105px;
  display: grid;
  place-content: center;
  text-align: center;
  font-weight: 800;
  line-height: 1.1;
  transform: rotate(12deg);
  box-shadow: var(--shadow-small);
}

.hero-decoration {
  position: absolute;
  font-size: 3.5rem;
  font-weight: 800;
}

.decoration-one {
  top: 30px;
  left: 10px;
  color: var(--red);
}

.decoration-two {
  bottom: 15px;
  right: 20px;
  color: var(--blue);
}

/* =========================================
   5. SECTION HEADING
========================================= */

.section-heading {
  margin-bottom: 45px;
}

.section-heading h2 {
  font-size: clamp(2.2rem, 5vw, 3.7rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -2px;
}

.section-heading h2 span {
  color: var(--blue);
}

.section-heading > p:last-child {
  margin-top: 13px;
  color: var(--muted);
}

/* =========================================
   6. ABOUT
========================================= */

.about-section {
  background: var(--surface-soft);
  border-top: 2px solid var(--border);
  border-bottom: 2px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 22px;
}

.about-card {
  position: relative;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.about-main {
  grid-row: span 2;
  min-height: 280px;
}

.card-number {
  color: var(--red);
  font-weight: 800;
  font-size: 0.8rem;
}

.about-main h3 {
  margin: 25px 0 15px;
  font-size: 1.8rem;
}

.about-main h3 span {
  color: var(--blue);
}

.about-main p,
.about-highlight p {
  color: var(--muted);
}

.about-highlight {
  min-height: 150px;
}

.about-highlight h3 {
  font-size: 1.3rem;
  margin: 8px 0;
}

.highlight-icon {
  font-size: 2rem;
  color: var(--red);
}

.blue-card {
  background: var(--blue);
  color: #ffffff;
}

.blue-card p,
.blue-card .highlight-icon {
  color: #ffffff;
}

/* =========================================
   7. SKILLS
========================================= */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.skill-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 23px 15px;
  text-align: center;
  box-shadow: var(--shadow-small);
  transition: transform var(--transition), background var(--transition);
}

.skill-card:hover {
  transform: translateY(-6px);
  background: var(--surface-soft);
}

.skill-icon {
  width: 62px;
  height: 62px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  padding: 13px;
  background: var(--surface-soft);
  border: 2px solid var(--border);
  border-radius: 14px;
  transition: transform 0.25s ease, background 0.25s ease;
}

.skill-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.skill-card:hover .skill-icon {
  transform: rotate(-5deg) scale(1.08);
  background: var(--surface);
}

.skill-card h3 {
  font-size: 1rem;
  margin-bottom: 5px;
}

.skill-card p {
  color: var(--muted);
  font-size: 0.8rem;
}

/* =========================================
   8. PROJECTS
========================================= */

.projects-section {
  background: var(--surface-soft);
  border-top: 2px solid var(--border);
  border-bottom: 2px solid var(--border);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.project-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.project-card:hover {
  transform: translate(-3px, -5px);
  box-shadow: 10px 10px 0 var(--border);
}

.project-image-link {
  display: block;
  overflow: hidden;
  border-bottom: 2px solid var(--border);
  background: var(--surface-soft);
}

.project-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-image-link:hover .project-image {
  transform: scale(1.05);
}

.project-info {
  padding: 22px;
}

.project-category {
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.project-info h3 {
  font-size: 1.35rem;
  margin: 8px 0;
}

.project-info p {
  color: var(--muted);
  font-size: 0.9rem;
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}

.project-link {
  font-weight: 800;
  color: var(--red);
  font-size: 0.85rem;
}

.project-link:hover {
  color: var(--blue);
}

/* =========================================
   9. CONTACT
========================================= */

.contact-wrapper {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 50px;
  padding: 55px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 22px;
  box-shadow: 9px 9px 0 var(--border);
}

.contact-heading {
  position: relative;
  z-index: 1;
}

.contact-heading h2 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -2px;
  margin: 15px 0;
}

.contact-heading h2 span {
  color: var(--red);
}

.contact-heading > p:not(.section-label) {
  color: var(--muted);
  margin-bottom: 25px;
  max-width: 400px;
}

.contact-list {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 13px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 2px solid var(--border);
  border-radius: 11px;
  background: var(--bg);
  transition: var(--transition);
}

.contact-item:hover {
  transform: translateX(5px);
  background: var(--blue);
  color: white;
}

.contact-icon {
  width: 46px;
  height: 46px;
  padding: 9px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.contact-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.contact-item:hover .contact-icon {
  background: white;
  color: #151923;
}

.contact-item strong,
.contact-item small {
  display: block;
  overflow-wrap: anywhere;
}

.contact-item strong {
  font-size: 0.9rem;
}

.contact-item small {
  color: var(--muted);
  font-size: 0.75rem;
}

.contact-item:hover small {
  color: white;
}

.contact-arrow {
  margin-left: auto;
  font-size: 1.1rem;
  font-weight: 800;
  opacity: 0.65;
  transition: transform 0.25s ease;
}

.contact-item:hover .contact-arrow {
  transform: translate(3px, -3px);
  opacity: 1;
}

.contact-decoration {
  position: absolute;
  right: -10px;
  bottom: -55px;
  font-size: 8rem;
  font-weight: 800;
  opacity: 0.05;
  pointer-events: none;
}

/* =========================================
   10. FOOTER
========================================= */

.footer {
  border-top: 2px solid var(--border);
  padding: 25px 0;
  background: var(--surface-soft);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-content p {
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

.back-top {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--blue);
}

/* =========================================
   11. SCROLL REVEAL
========================================= */

.reveal {
  opacity: 0;
  transform: translate3d(0, 35px, 0);
  transition:
    opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.active {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.skills-grid .reveal:nth-child(2),
.projects-grid .reveal:nth-child(2),
.contact-list .reveal:nth-child(2) {
  transition-delay: 0.1s;
}

.skills-grid .reveal:nth-child(3),
.projects-grid .reveal:nth-child(3),
.contact-list .reveal:nth-child(3) {
  transition-delay: 0.2s;
}

.skills-grid .reveal:nth-child(4),
.projects-grid .reveal:nth-child(4),
.contact-list .reveal:nth-child(4) {
  transition-delay: 0.3s;
}

/* =========================================
   12. RESPONSIVE
========================================= */

@media (max-width: 900px) {
  .hero-grid {
    gap: 30px;
  }

  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .contact-wrapper {
    padding: 35px;
    gap: 30px;
  }
}

@media (max-width: 700px) {
  .section {
    padding: 80px 0;
  }

  .menu-toggle {
    display: block;
  }

  .nav-menu {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 20px 20px;
    background: var(--bg);
    border-bottom: 2px solid var(--border);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
  }

  .nav-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-link {
    padding: 13px 5px;
    border-bottom: 1px solid var(--border);
  }

  .hero {
    padding-top: 65px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-content {
    text-align: center;
  }

  .hero-description {
    margin-inline: auto;
  }

  .hero-buttons,
  .hero-social {
    justify-content: center;
  }

  .hero-visual {
    min-height: 400px;
  }

  .profile-frame {
    width: min(290px, 75%);
  }

  .floating-card {
    left: 0;
    bottom: 25px;
  }

  .hero-sticker {
    right: 0;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-main {
    grid-row: auto;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
    padding: 28px;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 420px) {
  .container {
    width: min(100% - 28px, 1120px);
  }

  .hero-content h1 {
    font-size: 3rem;
    letter-spacing: -3px;
  }

  .hero-visual {
    min-height: 350px;
  }

  .floating-card {
    padding: 9px;
    gap: 7px;
  }

  .hero-sticker {
    width: 82px;
    height: 82px;
    font-size: 0.8rem;
  }

  .skills-grid {
    gap: 12px;
  }

  .skill-card {
    padding: 18px 9px;
  }

  .contact-wrapper {
    padding: 22px;
  }
}

/* =========================================
   13. ACCESSIBILITY
========================================= */

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}

@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;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
