:root {
  --display: "IBM Plex Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --serif: "IBM Plex Serif", "Iowan Old Style", "Georgia", serif;
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #1c1c1c;
  --muted: #5a5a5a;
  --accent: #2f2f2f;
  --accent-ink: #111111;
  --accent-soft: #e3e3e3;
  --border: #dddddd;
  --shadow: none;
  --radius: 16px;
  --max-width: 1120px;
  --section-pad: clamp(64px, 8vw, 120px);
  --skill-bar-width: clamp(140px, 24vw, 200px);
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  font-family: var(--serif);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
}

body::before {
  content: none;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-ink);
}

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

.largecontainer {
  width: 100%;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 24px;
}

.slides {
  animation: fadeUp 0.8s ease both;
}

#header {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  background: #ffffff;
  overflow: hidden;
}

#header::after {
  content: none;
}

#header .container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
  font-family: var(--display);
}

.logo {
  width: 120px;
  height: auto;
}

nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 24px;
}

nav ul li {
  margin: 0;
}

nav ul li a {
  color: var(--text);
  font-size: 0.95rem;
  letter-spacing: 0.3px;
  padding-bottom: 6px;
  position: relative;
}

nav ul li a::after {
  content: "";
  width: 0;
  height: 2px;
  background: var(--accent);
  position: absolute;
  left: 0;
  bottom: 0;
  transition: width 0.3s ease;
}

nav ul li a:hover::after {
  width: 100%;
}

nav .fas {
  display: none;
}

.header-text {
  margin-top: clamp(48px, 16vh, 160px);
  max-width: 720px;
}

.header-text h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 1.1;
  margin-bottom: 12px;
  color: var(--text);
}

.header-text h1 span {
  color: var(--accent);
}

.header-text p {
  font-size: 1.1rem;
}

.row {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.sub-title,
.sub-title-services {
  font-family: var(--display);
  font-weight: 600;
  color: var(--text);
}

.sub-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 10px;
}

.sub-title-services {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 6px;
}

.subsub-text {
  font-size: 0.95rem;
  color: var(--muted);
}

.space {
  margin-bottom: 32px;
}

.highlight {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 55%, var(--accent-soft) 55%);
  padding: 0 4px;
}

a.blank-link,
a.blank-link:visited {
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

a.blank-link:hover {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

#about,
#projects,
#contact {
  padding: var(--section-pad) 0;
  scroll-margin-top: 80px;
}

.page-section {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 16px 0;
}

.js .page-section {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}

.js .page-section.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.experience {
  display: block;
}

.experience-wrapper {
  margin-top: 36px;
}

h3.experience-title {
  font-family: var(--display);
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
  margin-bottom: 16px;
  font-weight: 600;
  color: var(--muted);
}

.js .collapsible {
  cursor: pointer;
}

.js .collapsible:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.whole-position {
  display: grid;
  grid-template-columns: minmax(220px, 28%) 1fr;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.whole-position:last-child {
  border-bottom: none;
}

.company-wrapper,
.job-wrapper {
  margin: 0;
  padding: 0;
}

.company-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.company-title {
  font-family: var(--display);
  font-weight: 600;
  color: var(--text);
}

.time {
  font-size: 0.9rem;
  color: var(--muted);
}

.job-wrapper .experience-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 8px;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
}

.js .whole-position .job-wrapper .experience-title {
  margin-bottom: 0;
}

.js .whole-position.is-open .job-wrapper .experience-title {
  margin-bottom: 8px;
}

.js .whole-position .company-description,
.js .whole-position .time {
  display: none;
}

.js .whole-position.is-open .company-description,
.js .whole-position.is-open .time {
  display: block;
}

.js .whole-position .job-wrapper .experience-title::after {
  content: "+";
  margin-left: 8px;
  color: var(--muted);
  font-weight: 400;
}

.js .whole-position.is-open .job-wrapper .experience-title::after {
  content: "-";
}

.company-description p {
  margin-bottom: 0.5rem;
}

.company-description p:last-child {
  margin-bottom: 0;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
  margin-top: 40px;
}

.section-wrapper {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.section-title {
  font-family: var(--display);
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
  margin-bottom: 16px;
  font-weight: 600;
  color: var(--muted);
}

.section-wrapper ul {
  list-style: none;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.section-wrapper ul.skills-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  grid-template-columns: none;
}

.section-wrapper ul.hobbies-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  grid-template-columns: none;
}

.skill-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--text);
  --level: 50%;
}

.skill-item::after {
  content: "";
  flex: 0 0 var(--skill-bar-width);
  width: var(--skill-bar-width);
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--text) 0 var(--level), var(--border) var(--level) 100%);
  opacity: 0.65;
}

.hobby-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.hobby-item:last-child {
  border-bottom: none;
}

.hobby-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-family: var(--display);
  font-weight: 600;
  color: var(--text);
}

.js .hobby-title::after {
  content: "+";
  color: var(--muted);
  font-weight: 400;
}

.hobby-detail {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.js .hobby-item.is-open .hobby-title::after {
  content: "-";
}

.js .hobby-detail {
  display: none;
}

.js .hobby-item.is-open .hobby-detail {
  display: block;
}

#projects {
  width: 100%;
}

.services-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  margin-top: 40px;
}

.services-list .project-card {
  padding: 28px;
  font-size: 0.95rem;
  font-weight: 300;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 0.2s ease, border-color 0.2s ease;
  animation: fadeUp 0.6s ease both;
}

.services-list .project-card:nth-child(1) { animation-delay: 0.05s; }
.services-list .project-card:nth-child(2) { animation-delay: 0.1s; }
.services-list .project-card:nth-child(3) { animation-delay: 0.15s; }
.services-list .project-card:nth-child(4) { animation-delay: 0.2s; }
.services-list .project-card:nth-child(5) { animation-delay: 0.25s; }
.services-list .project-card:nth-child(6) { animation-delay: 0.3s; }
.services-list .project-card:nth-child(7) { animation-delay: 0.35s; }

.services-list .project-card h2 {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.js .services-list .project-card h2 {
  margin-bottom: 0;
}

.js .services-list .project-card.is-open h2 {
  margin-bottom: 12px;
}

.js .services-list .project-card h2::after {
  content: "+";
  color: var(--muted);
  font-weight: 400;
}

.js .services-list .project-card.is-open h2::after {
  content: "-";
}

.js .services-list .project-card p,
.js .services-list .project-card .project-links,
.js .services-list .project-card .subsub-text {
  display: none;
}

.js .services-list .project-card.is-open p {
  display: block;
}

.js .services-list .project-card.is-open .project-links {
  display: flex;
}

.js .services-list .project-card.is-open .subsub-text {
  display: block;
}

.services-list .project-card a {
  text-decoration: none;
  color: var(--accent);
  font-size: 0.9rem;
  margin-top: 12px;
  display: inline-block;
  font-family: var(--display);
  font-weight: 500;
}

.project-links {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  white-space: nowrap;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.project-links a {
  margin-top: 0;
}

.link-separator {
  color: var(--muted);
}

.services-list .project-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
}

.bot {
  margin-top: 10px;
  display: inline-block;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  text-decoration: none;
  color: #ffffff;
  background: var(--accent);
  border: 1px solid var(--accent);
  font-family: var(--display);
  font-weight: 600;
  transition: transform 0.2s ease;
}

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

.btn.btn2 {
  background: var(--accent);
}

#contact {
  width: 100%;
  background: #ffffff;
}

.contact-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.contact-left {
  flex-basis: 30%;
}

.contact-right {
  flex-basis: 65%;
}

.contact-left p {
  margin-top: 16px;
}

.contact-left p i {
  color: var(--accent);
  margin-right: 10px;
  font-size: 20px;
}

.social-icons {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.social-icons a {
  text-decoration: none;
  font-size: 18px;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.social-icons a:hover {
  color: var(--accent);
  transform: translateY(-3px);
  border-color: var(--accent);
}

.contact-right form {
  width: 100%;
}

form input,
form textarea {
  width: 100%;
  border: 1px solid var(--border);
  outline: none;
  background: #ffffff;
  padding: 12px 14px;
  margin: 12px 0;
  color: var(--text);
  font-size: 1rem;
  border-radius: 10px;
  font-family: var(--serif);
}

form input:focus,
form textarea:focus {
  border-color: var(--accent);
}

form textarea {
  min-height: 150px;
  resize: vertical;
}

form .btn2 {
  padding: 12px 24px;
  font-size: 1rem;
  margin-top: 12px;
  cursor: pointer;
}

.copyright {
  width: 100%;
  text-align: center;
  padding: 18px 0 0;
  margin-top: 40px;
  border-top: 1px solid var(--border);
  font-weight: 300;
  color: var(--muted);
  font-size: 0.9rem;
  flex-basis: 100%;
}

#msg {
  color: #4a4a4a;
  margin-top: 8px;
  display: block;
}

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

@media only screen and (max-width: 900px) {
  #header {
    min-height: 80vh;
  }

  .header-text {
    margin-top: 12vh;
  }

  nav .fas {
    display: block;
    font-size: 24px;
    color: var(--text);
  }

  nav ul {
    background: var(--surface);
    position: fixed;
    top: 0;
    right: -200px;
    width: 200px;
    height: 100vh;
    padding-top: 70px;
    z-index: 2;
    transition: right 0.3s ease;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    border-left: 1px solid var(--border);
  }

  nav ul li {
    margin: 0 0 6px 24px;
  }

  nav ul .fas {
    position: absolute;
    top: 22px;
    right: 22px;
    cursor: pointer;
  }

  .row {
    flex-direction: column;
  }

  .whole-position {
    grid-template-columns: 1fr;
  }

  .company-wrapper {
    flex-direction: column;
  }

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

  .services-list {
    grid-template-columns: 1fr;
  }

  .contact-left,
  .contact-right {
    flex-basis: 100%;
  }
}

@media only screen and (max-width: 600px) {
  .container {
    padding: 24px 18px;
  }

  .header-text p {
    font-size: 1rem;
  }

  .services-list .project-card {
    padding: 22px;
  }

  .project-links {
    font-size: 0.85rem;
    gap: 6px;
  }

  .contact-card {
    padding: 24px;
  }
}

@media only screen and (max-width: 480px) {
  :root {
    --skill-bar-width: 120px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
