:root {
  --bg: #0f0f10;
  --bg-soft: #17181a;
  --panel: #111214;
  --line: #2b2d31;
  --text: #f3f4f6;
  --text-soft: #b6bac2;
  --white-panel: #f1f1f1;
  --white-panel-text: #111111;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  --radius: 24px;
  --radius-sm: 18px;
  --max-width: 1180px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  background:
    radial-gradient(
      circle at top left,
      rgba(255, 255, 255, 0.05),
      transparent 28%
    ),
    linear-gradient(180deg, #0b0c0d 0%, #111214 100%);
  color: var(--text);
  line-height: 1.5;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.container {
  width: min(100% - 2rem, var(--max-width));
  margin: 0 auto;
}

.section {
  padding: 5rem 0;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
}

.section-title-small {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 0.8rem;
}

.section-copy {
  max-width: 650px;
  color: var(--text-soft);
  margin-bottom: 2.5rem;
}

.section-copy-reset {
  margin-bottom: 0;
}

.contact-copy-light {
  color: rgba(17, 17, 17, 0.72);
  max-width: 48ch;
}

.space-sm {
  height: 0.65rem;
}

.space-md {
  height: 1rem;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(12, 12, 13, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  flex-direction: column;
}

.brand strong {
  font-size: 1.05rem;
  letter-spacing: 0.08em;
}

.brand span {
  color: var(--text-soft);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-soft);
  font-size: 0.95rem;
  transition: color 0.25s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.menu-btn {
  display: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  border-radius: 999px;
  padding: 0.7rem 1rem;
  cursor: pointer;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  margin-bottom: 1.5rem;
}

.hero {
  min-height: calc(100vh - 76px);
  display: grid;
  align-items: center;
  padding: 3rem 0 4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 2rem;
  align-items: stretch;
}

.hero-copy,
.hero-card {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero-copy {
  position: relative;
  overflow: hidden;
  padding: clamp(2.2rem, 4vw, 3.2rem);
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.01)
  );
}

.hero-title {
  font-size: clamp(3.3rem, 6.2vw, 5.2rem);
  line-height: 0.94;
  letter-spacing: -0.04em;
  max-width: 8ch;
  margin: 0 0 1rem;
}

.hero-description {
  font-size: 1.02rem;
  line-height: 1.7;
  max-width: 54ch;
  margin: 0 0 1.6rem;
  color: var(--text-soft);
  opacity: 1;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.hero-card {
  overflow: hidden;
  position: relative;
  min-height: 420px;
  background: linear-gradient(180deg, #18191c 0%, #111214 100%);
  padding: 3rem 3rem 2.5rem;
}

.hero-card::before,
.hero-card::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.25;
}

.hero-card::before {
  width: 180px;
  height: 180px;
  background: #ffffff;
  top: -30px;
  right: -20px;
}

.hero-card::after {
  width: 160px;
  height: 160px;
  background: #64676d;
  bottom: 10px;
  left: -20px;
}

.btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.95rem 1.3rem;
  font-weight: 600;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: #4b4d53;
}

.btn-primary {
  background: var(--text);
  color: #111;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
}

.btn-outline {
  background: transparent;
  color: var(--text-soft);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.btn-outline:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.04);
}

.btn-light-section {
  background: #ffffff;
  color: #111111;
  border: 1px solid rgba(17, 17, 17, 0.2);
  transition: all 0.25s ease;
}

.btn-light-section:hover {
  background: #111111;
  color: #ffffff;
  border-color: #111111;
}

.mockup {
  position: absolute;
  inset: 2rem;
  border-radius: 28px;
  background: linear-gradient(145deg, #f1f1f1, #d8d8d8);
  padding: 1rem;
  color: #111;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1rem;
}

.mockup-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #444;
  font-size: 0.82rem;
}

.dots {
  display: flex;
  gap: 0.35rem;
}

.dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #b7b7b7;
}

.mockup-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
}

.mockup-panel,
.mockup-sidebar,
.mockup-footer {
  background: white;
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.mockup-panel,
.mockup-sidebar {
  padding: 1rem;
}

.mockup-sidebar {
  display: grid;
  gap: 0.8rem;
}

.mockup-line,
.mockup-chip,
.mockup-card,
.bar {
  border-radius: 999px;
  background: #d7d7d7;
}

.mockup-line {
  height: 12px;
}

.mockup-line.short {
  width: 45%;
}

.mockup-line.mid {
  width: 70%;
}

.mockup-line.long {
  width: 92%;
}

.mockup-chip {
  width: 80px;
  height: 30px;
  background: #161616;
}

.mockup-cards {
  margin-top: 1.1rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
}

.mockup-card {
  height: 115px;
  border-radius: 18px;
}

.bar {
  height: 12px;
  background: #d4d4d4;
  overflow: hidden;
}

.bar > span {
  display: block;
  height: 100%;
  background: #161616;
  border-radius: inherit;
}

.mockup-footer {
  padding: 0.9rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.about-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 2rem;
}

.card-dark,
.card-light {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.card-dark {
  background: linear-gradient(180deg, #17181a 0%, #111214 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 2rem;
}

.card-light {
  background: var(--white-panel);
  color: var(--white-panel-text);
  padding: 2rem;
}

.about-photo {
  aspect-ratio: 4 / 4.5;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 1.5rem;
  overflow: hidden;
  background: #111;
}
.profile-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center top;
}
.about-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.pill {
  padding: 0.6rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
  font-size: 0.88rem;
}

.card-light h3,
.card-dark h3 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  letter-spacing: -0.04em;
}

.card-light p,
.card-dark p {
  color: inherit;
  opacity: 0.82;
}

.skills-section {
  padding: 2rem 0 0;
}
.skills-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.skills-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.5rem;
  backdrop-filter: blur(8px);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.skills-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.skills-card h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.skills-tags span {
  display: inline-block;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.95rem;
}

.projects-top {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 2rem;
}

.projects-top--simple {
  justify-content: flex-start;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.filter-btn {
  background: transparent;
  color: var(--text-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.7rem 1rem;
  cursor: pointer;
  transition: 0.25s ease;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--text);
  color: #111;
  border-color: var(--text);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.35rem;
  align-items: stretch;
}

.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 500px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(160deg, #1a1b1e 0%, #0f1012 100%);
  box-shadow: var(--shadow);
  transition:
    transform 0.28s ease,
    border-color 0.28s ease;
}

.project-card h3 {
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.project-card p {
  color: var(--text-soft);
  font-size: 0.95rem;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, 0.14);
}

.project-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top center;
}

.project-subtitle {
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 0.85;
  margin: 0.35rem 0 0.9rem;
}

.project-thumb {
  height: 260px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  background: #111;
  cursor: pointer;
}

.project-content {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.35rem;
  flex: 1;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.2rem;
}

.project-stack span {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  color: #d4d7de;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.project-tag {
  display: inline-flex;
  width: fit-content;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  color: #d0d4db;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1rem;
}

.project-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 104px;
  padding: 0.78rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  transition: 0.25s ease;
}

.project-link:hover {
  background: rgba(255, 255, 255, 0.08);
}

.project-link--primary {
  background: var(--text);
  color: #111;
  border-color: var(--text);
}

.project-link--primary:hover {
  background: #ffffff;
  color: #111;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.contact-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 1rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #111;
  background: rgba(17, 17, 17, 0.08);
  border: 1px solid rgba(17, 17, 17, 0.1);
}

.contact-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.8rem;
}

.contact-list {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-item span:last-child {
  color: var(--white-panel-text);
  text-align: right;
}

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.social-link {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-weight: 700;
  color: var(--text-soft);
  transition: 0.25s ease;
}

.social-link:hover {
  color: var(--text);
  transform: translateY(-3px);
}

.footer {
  padding: 2rem 0 4rem;
  color: var(--text-soft);
}

.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.project-thumb {
  height: 250px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  background: #0d0f12;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.project-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(10, 12, 16, 0.12), rgba(10, 12, 16, 0.22)),
    linear-gradient(to top, rgba(7, 8, 10, 0.72), rgba(7, 8, 10, 0.08));
  z-index: 1;
  pointer-events: none;
  transition: background 0.3s ease;
}

.project-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center top;
  filter: brightness(0.72) contrast(1.06) saturate(0.82);
  transform: scale(1.03);
  transition:
    transform 0.35s ease,
    filter 0.35s ease;
}

.project-thumb:hover .project-image {
  transform: scale(1.06);
  filter: brightness(0.82) contrast(1.08) saturate(0.88);
}

.project-preview-hint {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 2;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #f3f4f6;
  background: rgba(10, 12, 16, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

/* Modal */

.image-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.image-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.image-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 6, 8, 0.82);
  backdrop-filter: blur(8px);
}

.image-modal-content {
  position: relative;
  z-index: 2;
  width: min(92vw, 1100px);
  max-height: 90vh;
  padding: 1rem;
  border-radius: 24px;
  background: #111214;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.image-modal-title {
  color: #f3f4f6;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.9rem;
  padding-right: 3rem;
}

.image-modal-img {
  display: block;
  width: 100%;
  max-height: calc(90vh - 80px);
  object-fit: contain;
  border-radius: 18px;
  background: #0b0c0d;
}

.image-modal-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: #f3f4f6;
  font-size: 1.4rem;
  cursor: pointer;
}

.image-modal-close:hover {
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 980px) {
  .hero-grid,
  .about-grid,
  .contact-grid,
  .mockup-grid {
    grid-template-columns: 1fr;
  }

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

  .hero {
  min-height: auto;
  padding: 2.5rem 0 3rem;
}

.hero-copy {
  padding: 2rem;
}

.hero-card {
  min-height: 340px;
}

}

@media (max-width: 760px) {
  .menu-btn {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: calc(100% + 0.8rem);
    flex-direction: column;
    padding: 1rem;
    background: rgba(12, 12, 13, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: 0.25s ease;
  }

  .nav-links.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .projects-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-cta-group {
    flex-direction: column;
  }

  .projects-top {
    align-items: start;
    flex-direction: column;
  }

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

  .contact-item span:last-child {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
