:root {
    --background: #f7f7f2;
    --surface: #ffffff;
    --text: #211b31;
    --muted: #5c5d66;
    --accent: #383f64;
    --accent-soft: #e7e9f0;
    --border: #8a8c96;
}

* {
    box-sizing: border-box;
}

html{
    scroll-behavior: smooth;
    scroll-padding-top: 32px;
}

body{
    margin: 0;
    padding: 0 6%;
    background: var(--background);
    color: var(--text);
    font-family: "Segoe UI", Arial, sans-serif;
    line-height: 1.7;

    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 32px;
    align-items: center;

    overflow-wrap: anywhere;
}

a{
    color: var(--accent);
    text-decoration: none;
}

a:focus-visible{
    outline: 3px solid var(--accent);
    outline-offset: 5px;
    border-radius: 4px;
}

h1, h2, h3, h4, p{
    margin-top: 0;
}

.logo{
    padding: 28px 0;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

nav{
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 28px;
    padding: 20px 0;
}

nav a{
    padding: 8px 0;
    color: var(--muted);
    font-size: 0.9rem;
    transition: color 180ms ease;
}

nav a:hover{
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 6px;
}

nav a[href="#contact"]{
    padding: 9px 20px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    transition: background-color 180ms ease;
}

nav a[href="#contact"]:hover{
    background: var(--accent-soft);
    border-color: var(--accent);
    text-decoration: none;
    transition: background-color 180ms ease;
}


main, footer{
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
}

footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 0;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: left;
}

footer p {
  margin: 0;
}

main{
    border-top: 1px solid var(--border);
}

section{
    max-width: 1120px;
    margin: 0 auto;
    padding: 80px 0;
}

section + section{
    border-top: 1px solid var(--border);
}

section > h2{
    margin-bottom: 32px;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    line-height: 1.2;
    letter-spacing: -1px;
}

#introduce{
    padding-top: 110px;
    padding-bottom: 110px;

    --intro-soft: #e7e9f2;
    --intro-border: #d6d9e6;

    display: block;
}

#introduce > h4{
    display: inline-block;
    margin-bottom: 28px;
    padding: 7px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    bacground: var(--accent-soft);
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
}

#introduce > h1, #introduce > h2{
    max-width: 950px;
    margin-bottom: 32px;
    font-size: clamp(2.5rem, 5.5vw, 4.8rem);
    font-weight: 650;
    font-weight: 1.12;
    letter-spacing: -0.045rem;
}

#introduce i{
    color: var(--accent);
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-weight: 400;
}

#introduce > .intro-description {
  padding-left: 0;
  margin-left: 0;
  border-left: none;
  text-indent: 0;
  text-align: left;
  color: #2e3364;
}

#introduce > .intro-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
}

#introduce .intro-topics li {
  padding: 8px 13px;
  border: 1px solid var(--intro-border);
  border-radius: 6px;
  background: var(--intro-soft);
  color: var(--intro-accent);
  font-size: 0.8rem;
  line-height: 1.6;
}


#introduce > a[href="projects.html"] {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  padding: 13px 22px;

  background: var(--accent);
  color: #ffffff;
  border: 1px solid var(--accent);
  border-radius: 10px;

  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 180ms ease;
}

#introduce > a[href="projects.html"]:hover {
  background: #292f4e;
  border-color: #292f4e;
  color: #ffffff;
}

#contact > h2 {
  margin-bottom: 32px;
}

#contact > .contact-description {
  max-width: none;
  margin: 0 0 28px;
  padding: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.8;
  text-align: left;
}

.contact-links{
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.contact-links a{
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 48px;
    height: 48px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);

    transition: 
    background-color 200ms ease,
    border-color 200ms ease;
}

.contact-links a:hover{
    background: var(--accent-soft);
    background-color: var(--accent);
}

.contact-links img{
    display: block;
    width: 24px;
    height: 24px;
    object-fit: contain;
}

body {
  grid-template-columns: auto minmax(0, 1fr);
}

.logo {
  color: var(--text);
}

nav {
  min-width: 0;
}

nav a {
  white-space: nowrap;
}

nav a[aria-current="page"] {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 6px;
}

#featured-projects {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}

#featured-projects > article {
  display: flex;
  flex-direction: column;
  align-items: stretch;

  margin: 0;
  padding: 36px 40px;

  background: var(--surface);
  border: 1px solid #e5e5e0;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgb(0 0 0 / 3%);
}


.project-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.project-heading h3 {
  margin: 0;
}

.project-heading > img {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 6px;
}

#featured-projects > article > h4 {
  margin: 0 0 12px;
  font-size: 1.1rem;
  font-weight: 600;
}

#featured-projects > article > p {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.8;
}

#featured-projects > article > a {
  align-self: flex-start;
  margin-top: auto;
  color: var(--accent);
  text-decoration: none;
  transition: color 180ms ease;
}

#featured-projects > article > a:hover {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 6px;
}

@media (max-width: 600px) {
  #featured-projects > article {
    padding: 24px;
  }
}

#featured-projects > article {
  border-color: transparent;
  box-shadow: 0 4px 20px rgb(0 0 0 / 2%);

  transition:
    transform 200ms ease,
    border-color 200ms ease,
    box-shadow 200ms ease;
}

@media (hover: hover) {
  #featured-projects > article:hover {
    transform: translateY(-2px);
    border-color: #e0e0db;
    box-shadow: 0 10px 30px rgb(0 0 0 / 4%);
  }
}

@media (max-width: 800px) {
  body {
    grid-template-columns: minmax(0, 1fr);
  }

  #introduce {
    padding: 60px 0;
  }
}

nav a[href$="#contact"] {
  padding: 7px 14px;
}

main {
  animation: content-enter 650ms ease-out both;
}

@keyframes content-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  main {
    animation: content-enter 650ms ease-out both;
  }
}

@media (max-width: 600px) {
  body {
    grid-template-columns: minmax(0, 1fr);
    column-gap: 0;
    align-items: start;
  }

  .logo {
    padding: 24px 0 16px;
  }

  nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    width: 100%;
    padding: 0 0 24px;
  }

  nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 0;

    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.4;
    white-space: nowrap;

    border: none;
    border-radius: 0;
    background: transparent;
  }

  nav a:hover,
  nav a[aria-current="page"] {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 5px;
  }

  nav a[href$="#contact"] {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
  }

  nav a[href$="#contact"]:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
    text-decoration: none;
  }
}