:root {
  --ink: #17233c;
  --muted: #69748a;
  --blue: #3159f5;
  --blue-dark: #2446cf;
  --orange: #ff7a45;
  --cream: #f8f7f2;
  --line: #dde2ea;
  --white: #ffffff;
  --surface: #ffffff;
  --surface-muted: #f0f2f8;
  --hero-start: #6277e5;
  --hero-end: #8052b8;
  --hero-foreground: #ffffff;
}

:root[data-theme="dark"] {
  --ink: #edf0f7;
  --muted: #a7b0c1;
  --cream: #111827;
  --line: #303b4e;
  --white: #1b2638;
  --surface: #1b2638;
  --surface-muted: #202c40;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: "DM Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  width: min(1180px, calc(100% - 64px));
  min-height: 84px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: #17233c;
  font-size: 15px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  font-weight: 600;
}

.main-nav a {
  color: var(--muted);
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: var(--blue);
}

.theme-toggle {
  width: 40px;
  height: 40px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.theme-toggle:hover {
  transform: rotate(-12deg);
  background: var(--surface-muted);
}

.theme-toggle svg {
  width: 19px;
  fill: currentColor;
}

.hero {
  position: relative;
  min-height: calc(100vh - 164px);
  width: min(1180px, calc(100% - 64px));
  margin: 44px auto 28px;
  display: grid;
  grid-template-columns: 55% 45%;
  align-items: center;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 24px;
  color: var(--hero-foreground);
  background: linear-gradient(125deg, var(--hero-start), var(--hero-end));
  box-shadow: 0 24px 60px rgba(39, 55, 85, 0.08);
  isolation: isolate;
  clip-path: inset(0 0 100% 0 round 24px);
  animation: blind-unroll 1.3s cubic-bezier(0.2, 0.75, 0.25, 1) forwards;
}

.hero::before {
  content: "";
  position: absolute;
  z-index: 3;
  top: 0;
  left: 24px;
  right: 24px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f8f9fc, #cdd3df 52%, #f8f9fc);
  box-shadow: 0 2px 5px rgba(23, 35, 60, 0.14);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  z-index: 3;
  right: 12px;
  top: 0;
  left: 12px;
  height: 9px;
  border-radius: 0 0 5px 5px;
  background: linear-gradient(180deg, #e5e8ee, #fafbfc);
  box-shadow: 0 3px 6px rgba(23, 35, 60, 0.1);
  pointer-events: none;
  animation: blind-weight-drop 1.3s cubic-bezier(0.2, 0.75, 0.25, 1) forwards;
}

@keyframes blind-unroll {
  from {
    clip-path: inset(0 0 100% 0 round 24px);
  }
  to {
    clip-path: inset(0 0 0 0 round 24px);
  }
}

@keyframes blind-weight-drop {
  to {
    top: calc(100% - 9px);
  }
}

@keyframes reveal-hero-content {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding: 70px 0 84px;
  animation: reveal-hero-content 0.6s ease-out 0.45s both;
}

.hero h1 {
  max-width: 650px;
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(58px, 6.2vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.065em;
}


.hero h1 > span {
  display: block;
  color: inherit;
}

.hero-description {
  max-width: 520px;
  margin: 34px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.7;
}

.hero-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 30px;
}

.hero-links a {
  color: var(--hero-foreground);
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.hero-links a:hover {
  color: #e7eaff;
  transform: translateY(-1px);
}

.hero-links .hero-link-primary {
  padding: 14px 18px;
  border-radius: 8px;
  color: #3448a5;
  background: #ffffff;
}

.hero-links .hero-link-primary:hover {
  color: #25367f;
  background: #edf0ff;
}

.hero-visual {
  display: grid;
  place-items: center;
  padding: 32px;
  animation: reveal-hero-content 0.6s ease-out 0.6s both;
}

.profile-card {
  width: min(100%, 430px);
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 60px rgba(25, 30, 70, 0.12);
  text-align: center;
  backdrop-filter: blur(8px);
}

.profile-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  border-radius: 50%;
  color: var(--hero-foreground);
  background: var(--orange);
}

.profile-mark svg {
  width: 29px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.profile-card h2 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(27px, 3vw, 36px);
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.profile-card p {
  margin: 12px 0 28px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 17px;
}

.profile-socials {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-socials a {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 50%;
  color: var(--hero-foreground);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.profile-socials a:hover {
  transform: translateY(-2px);
  color: var(--hero-end);
  background: #ffffff;
}

.profile-socials svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.portfolio-section {
  width: min(1180px, calc(100% - 64px));
  min-height: calc(100vh - 84px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0 auto;
  padding: 56px 0;
  scroll-margin-top: 84px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 28px;
  text-align: center;
}

.section-heading h2 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(32px, 4vw, 44px);
  letter-spacing: -0.045em;
}

.section-heading h2::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  margin: 12px auto 0;
  border-radius: 999px;
  background: var(--blue);
}

.contact-section {
  align-items: center;
  text-align: center;
}

.contact-section .section-heading {
  width: 100%;
  justify-content: center;
}

.contact-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: clamp(32px, 6vw, 80px);
  width: 100%;
}

.contact-form {
  display: grid;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 16px 36px rgba(39, 55, 85, 0.06);
  text-align: left;
}

.contact-field {
  display: grid;
  gap: 8px;
}

.contact-field label {
  font-size: 14px;
  font-weight: 600;
}

.contact-field input,
.contact-field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  font: inherit;
}

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

.contact-field input:focus,
.contact-field textarea:focus {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.contact-submit {
  width: fit-content;
  padding: 13px 18px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background: var(--blue);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.contact-submit:hover {
  transform: translateY(-1px);
  background: var(--blue-dark);
}

.contact-form-note {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.contact-copy {
  min-width: 0;
  text-align: left;
}

.contact-message-title {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.035em;
}

.contact-message {
  max-width: 560px;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.contact-details {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.contact-detail svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--blue);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.education-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  width: 100%;
  min-height: 320px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.education-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 18px;
}

.education-mark {
  width: 52px;
  height: 52px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  color: var(--blue);
  background: var(--surface-muted);
}

.education-mark svg {
  width: 26px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.education-card h3 {
  margin: 0 0 8px;
  font-family: "Manrope", sans-serif;
  font-size: 21px;
}

.education-institution {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
}

.education-period,
.education-copy {
  color: var(--muted);
  line-height: 1.7;
}

.education-period {
  margin: 0;
  font-size: 14px;
}

.education-copy {
  max-width: 680px;
  margin: 14px 0 0;
}

.education-details {
  display: grid;
  gap: 12px;
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.65;
}

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

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 210px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(39, 55, 85, 0.1);
}

.project-card h3 {
  margin: 0 0 8px;
  font-family: "Manrope", sans-serif;
  font-size: 22px;
}

.project-card .project-kicker {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.project-technologies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.project-technologies span {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
}

.project-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: auto;
  padding-top: 24px;
}

.project-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
}

a.project-action:hover {
  color: var(--blue-dark);
}

.project-action svg {
  width: 18px;
  height: 18px;
}

.project-action:not(.project-live) svg {
  fill: currentColor;
}

.project-live {
  color: var(--muted);
  cursor: not-allowed;
}

.project-live svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.project-live {
  opacity: 0.75;
}

.project-live[title]:hover {
  opacity: 1;
}

.site-footer {
  min-height: 76px;
  width: min(1180px, calc(100% - 64px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.site-footer a:hover {
  color: var(--blue);
}

@media (max-width: 980px) {
  .site-header,
  .hero,
  .portfolio-section,
  .site-footer {
    width: min(100% - 40px, 760px);
  }

  .main-nav {
    gap: 18px;
  }

  .hero {
    grid-template-columns: 1fr 45%;
  }

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

@media (max-width: 720px) {
  .site-header,
  .hero,
  .portfolio-section,
  .site-footer {
    width: calc(100% - 32px);
  }

  .site-header {
    min-height: 76px;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0;
  }

  .main-nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
  }

  .theme-toggle {
    margin-left: auto;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    margin-top: 36px;
    padding: 54px 24px 48px;
  }

  .hero-copy {
    padding: 0;
  }

  .hero h1 {
    font-size: clamp(48px, 15vw, 68px);
  }

  .hero-description {
    font-size: 16px;
  }

  .hero-visual {
    margin-top: 28px;
    padding: 0;
  }

  .profile-card {
    min-height: 250px;
    padding: 32px;
  }

  .portfolio-section {
    padding: 32px 0 64px;
  }

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

  .contact-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact-form {
    padding: 22px;
  }

  .education-card {
    padding: 22px;
  }

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

  .site-footer {
    gap: 16px;
  }
}

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

  .hero {
    clip-path: none;
    animation: none;
  }

  .hero::after {
    top: auto;
    bottom: 0;
    animation: none;
  }

  .hero-copy,
  .hero-visual {
    animation: none;
  }
}
