:root {
  --bg: #f8f7f4;
  --white: #ffffff;
  --beige: #e8e2d9;
  --taupe: #a69b8d;
  --charcoal: #292929;
  --gray: #777777;
  --border: rgba(166, 155, 141, 0.38);
  --shadow: 0 12px 28px rgba(41, 41, 41, 0.08);
  --radius: 22px;
  --radius-sm: 14px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--charcoal);
  line-height: 1.7;
}

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

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

button,
input,
textarea {
  font: inherit;
}

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

.section {
  padding: 6rem 0;
}

.section-alt {
  background: rgba(232, 226, 217, 0.35);
}

.eyebrow {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray);
  font-weight: 700;
}

.section-heading {
  margin-bottom: 2.5rem;
}

.section-heading.narrow {
  max-width: 760px;
}

.section-intro {
  max-width: 68ch;
  margin: 1rem 0 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.7rem, 5vw, 4.5rem);
  line-height: 1.08;
  letter-spacing: -0.06em;
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.2;
  letter-spacing: -0.05em;
  margin-bottom: 0;
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 0.55rem;
}

p {
  color: var(--gray);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(248, 247, 244, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

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

.brand {
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--charcoal);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.nav-links a {
  position: relative;
  padding: 0.5rem 0.2rem;
  color: var(--charcoal);
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 100%;
  height: 2px;
  background: var(--taupe);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--charcoal);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: 10px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--charcoal);
  margin: 0 auto;
  border-radius: 20px;
}

.hero {
  padding-top: 4.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 3.5rem;
}

.hero-copy {
  max-width: 630px;
}

.subtitle {
  margin-bottom: 1.1rem;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--taupe);
  font-weight: 600;
}

.lead {
  font-size: 1.07rem;
  color: var(--gray);
  max-width: 58ch;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.9rem 1.5rem;
  border-radius: 999px;
  border: 1px solid var(--charcoal);
  font-weight: 600;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--charcoal);
  color: var(--white);
  border-color: var(--charcoal);
}

.btn-primary:hover {
  background: #1d1d1d;
}

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

.btn-secondary:hover {
  background: var(--beige);
}

.hero-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  padding: 0;
  margin: 2rem 0 0;
}

.hero-tags li {
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.55);
  color: var(--gray);
  border-radius: 999px;
  font-size: 0.82rem;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.profile-card {
  position: relative;
  width: min(100%, 440px);
  min-height: 500px;
  padding: 2.2rem;
  display: grid;
  place-items: center;
  border-radius: 2rem;
  background: linear-gradient(135deg, var(--white), rgba(232, 226, 217, 0.8));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.avatar-wrap {
  width: 240px;
  height: 240px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 0 0 18px rgba(166, 155, 141, 0.08);
}

.avatar-circle {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: var(--beige);
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  color: var(--charcoal);
  font-size: 3.2rem;
  letter-spacing: -0.06em;
  font-weight: 700;
}

.info-card {
  position: absolute;
  left: 1.5rem;
  right: 1.5rem;
  bottom: 1.5rem;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--border);
  border-radius: 1.2rem;
  padding: 1rem 1.1rem;
  box-shadow: 0 18px 30px rgba(41, 41, 41, 0.04);
}

.mini-label {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray);
}

.mini-value {
  margin: 0.35rem 0 0;
  color: var(--charcoal);
  font-weight: 600;
}

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

.about-copy {
  background: var(--white);
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.about-copy p {
  margin-bottom: 1.2rem;
}

.about-panels {
  display: grid;
  gap: 1.1rem;
}

.detail-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.3rem 1.4rem;
}

.detail-card h3 {
  color: var(--charcoal);
}

.detail-card p {
  margin-bottom: 0;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

.skills-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.skill-list span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  background: rgba(232, 226, 217, 0.5);
  border: 1px solid var(--border);
  color: var(--charcoal);
  font-size: 0.92rem;
}

.certificate-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.certificate-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.certificate-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(41, 41, 41, 0.09);
}

.certificate-preview {
  display: block;
  width: 100%;
  height: 220px;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: var(--beige);
  color: inherit;
  cursor: zoom-in;
}

.certificate-preview:focus-visible {
  position: relative;
  z-index: 1;
  outline: 3px solid var(--charcoal);
  outline-offset: -3px;
}

.certificate-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.certificate-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.4rem;
}

.certificate-body h3 {
  margin-bottom: 0.45rem;
}

.certificate-issuer,
.certificate-date {
  margin-bottom: 0.45rem;
  font-size: 0.9rem;
}

.certificate-date {
  margin-bottom: 0;
}

.certificate-modal {
  width: min(92vw, 1100px);
  max-width: 1100px;
  max-height: 92vh;
  max-height: 92dvh;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--charcoal);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
}

.certificate-modal::backdrop {
  background: rgba(25, 25, 25, 0.78);
  backdrop-filter: blur(3px);
}

.certificate-modal-content {
  display: flex;
  max-height: calc(92vh - 2rem);
  max-height: calc(92dvh - 2rem);
  flex-direction: column;
}

.certificate-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.75rem;
}

.certificate-modal-title {
  font-size: 1.1rem;
  line-height: 1.4;
  letter-spacing: 0;
}

.certificate-modal-close {
  display: inline-grid;
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg);
  color: var(--charcoal);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}

.certificate-modal-close:hover {
  background: var(--beige);
}

.certificate-modal-close:focus-visible {
  outline: 3px solid var(--charcoal);
  outline-offset: 2px;
}

.certificate-modal-image {
  width: auto;
  max-width: 100%;
  max-height: calc(92vh - 6rem);
  max-height: calc(92dvh - 6rem);
  margin: 0 auto;
  object-fit: contain;
}

@media (max-width: 480px) {
  .certificate-preview {
    height: 200px;
  }

  .certificate-modal {
    width: 96vw;
    max-height: 96vh;
    max-height: 96dvh;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
  }

  .certificate-modal-content {
    max-height: calc(96vh - 1.5rem);
    max-height: calc(96dvh - 1.5rem);
  }

  .certificate-modal-image {
    max-height: calc(96vh - 5.5rem);
    max-height: calc(96dvh - 5.5rem);
  }
}

.education-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.education-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1.5rem;
  align-items: flex-start;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.2rem;
}

.education-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.education-year {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  background: var(--beige);
  border: 1px solid var(--border);
  color: var(--charcoal);
  font-weight: 700;
  width: fit-content;
}

.education-item h3 {
  margin-bottom: 0.5rem;
}

.muted {
  color: var(--gray);
}

.project-card {
  max-width: 760px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(41, 41, 41, 0.09);
}

.project-category {
  display: inline-flex;
  margin-bottom: 0.9rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(232, 226, 217, 0.5);
  color: var(--charcoal);
  font-size: 0.82rem;
  font-weight: 600;
}

.project-card h3 {
  margin-bottom: 0.7rem;
  font-size: clamp(1.3rem, 3vw, 1.6rem);
}

.project-card-content > p:not(.project-category) {
  max-width: 65ch;
}

.project-link {
  margin-top: 0.4rem;
}

.offer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.3rem;
}

.offer-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.7rem 1.4rem;
  box-shadow: var(--shadow);
}

.offer-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  margin-bottom: 1rem;
  background: rgba(232, 226, 217, 0.8);
  border: 1px solid var(--border);
  font-weight: 700;
  color: var(--charcoal);
}

.contact-section {
  padding-bottom: 5rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2rem;
  align-items: start;
}

.contact-copy {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 0.9rem;
  color: var(--charcoal);
}

.contact-list a {
  color: var(--gray);
  overflow-wrap: anywhere;
}

.contact-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.field-row {
  margin-bottom: 1.1rem;
}

label {
  display: block;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 0.5rem;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(248, 247, 244, 0.9);
  color: var(--charcoal);
  padding: 0.9rem 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--taupe);
  box-shadow: 0 0 0 3px rgba(166, 155, 141, 0.12);
}

textarea {
  resize: vertical;
  min-height: 140px;
}

.form-status {
  margin: 1rem 0 0;
  min-height: 1.2em;
  color: var(--charcoal);
  font-weight: 500;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.3);
}

.footer-inner {
  padding: 1.4rem 0;
  text-align: center;
}

.footer-inner p {
  margin-bottom: 0;
}

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

  .certificate-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .skills-grid,
  .offer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-grid {
    max-width: 760px;
    margin: 0 auto;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: flex;
  }

  .nav {
    position: relative;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
    padding: 1rem 1.2rem 1.1rem;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
  }

  .nav-links.is-open {
    display: flex;
  }

  .hero {
    padding-top: 3rem;
  }

  .section {
    padding: 4.5rem 0;
  }

  .skills-grid,
  .certificate-grid,
  .offer-grid,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .education-item {
    grid-template-columns: 1fr;
  }

  .cta-group {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }
}
