* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Manrope", Arial, sans-serif;
  -webkit-user-select: none; /* Safari */
  -ms-user-select: none;     /* IE 10 and Edge */
  user-select: none;         /* Standard syntax */
  
}

html {
  scroll-behavior: smooth;
}

body {
  color: #171a2f;
  background-color: #fafafa;
  line-height: 1.5;
}

.header {
  padding: 0.85rem clamp(1.5rem, 5vw, 5rem);
  text-align: center;
  border-bottom: 1px solid #e5e7ee;
  position: sticky;
  top: 0;
  background-color: white;
  z-index: 10;
  box-shadow: 0 3px 16px rgba(20, 25, 55, 0.04);
}

.header-content {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 100rem;
  margin-inline: auto;
}

.header-title {
  display: flex;
  flex-direction: row;
}

.header-text-title {
  font-size: 18px;
  color: #333;
  display: flex;
  flex-direction: row;
  line-height: 1;
}


.phys-text {
  color: black;
}

.math-text {
  color: rgb(90, 140, 255);
}

.header-text-subtitle {
    color: #62677b;
    font-size: 11px;
    font-weight: 500;
    margin-top: 0.3rem;
}


.header-links {
    color: black;
    width: auto;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: clamp(1.2rem, 3vw, 3rem);
}

.header-link {
    color: #34384c;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.header-link:hover {
    color: rgb(72, 116, 230);
}

.cite-container {
    width: min(100%, 62rem);
    margin: 0 auto;
    padding: clamp(3rem, 7vw, 5.5rem) clamp(1.25rem, 5vw, 3rem) 2rem;
}

.cite-heading {
    max-width: 42rem;
    margin-bottom: 2.25rem;
}

.cite-heading h2 {
    margin-bottom: 0.65rem;
    font-size: clamp(2rem, 5vw, 3.25rem);
    line-height: 1.1;
    letter-spacing: -0.045em;
}

.cite-heading p {
    color: #656a7e;
    font-size: 1rem;
    line-height: 1.7;
}

.citation-list {
    display: grid;
    gap: 1rem;
}

.citation-card {
    padding: clamp(1.25rem, 3vw, 1.75rem);
    border: 1px solid #dfe1e8;
    border-radius: 0.9rem;
    background: #fff;
    box-shadow: 0 8px 24px rgba(20, 25, 55, 0.05);
}

.citation-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.citation-card h3 {
    font-size: 1rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.cite-text {
    width: 100%;
    min-height: 5.75rem;
    padding: 1rem;
    resize: none;
    overflow: hidden;
    border: 1px solid #e2e4ea;
    border-radius: 0.65rem;
    color: #34384c;
    background: #f7f8fb;
    font: inherit;
    font-size: 0.92rem;
    line-height: 1.65;
}

.copy-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-width: 6.5rem;
    padding: 0.65rem 1rem;
    border: 1px solid rgb(72, 116, 230);
    border-radius: 0.55rem;
    color: #fff;
    background: rgb(72, 116, 230);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.copy-button:hover {
    border-color: rgb(54, 96, 205);
    background: rgb(54, 96, 205);
    transform: translateY(-1px);
}

.copy-button:focus-visible {
    outline: 3px solid rgba(72, 116, 230, 0.28);
    outline-offset: 3px;
}

.copy-button.copied {
    border-color: #16835f;
    background: #16835f;
}

@media (max-width: 35rem) {
    .citation-card-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .copy-button {
        width: 100%;
    }
}

.logo-link {
    text-decoration: none;
}

.introduction {
    /* height: 100vh; */
    background-color: rgb(240, 240, 240);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: clamp(2rem, 6vw, 6rem);
    min-height: 30rem;
    padding: clamp(3rem, 7vw, 6rem) clamp(1.5rem, 7vw, 7rem);
}

.introduction-text {
    display: flex;
    flex-direction: column;
    width: 50%;
    gap: 20px;
}

.introduction-text h3 {
    max-width: 38rem;
    font-size: clamp(2.3rem, 5vw, 4.5rem);
    font-weight: 600;
    letter-spacing: -0.05em;
    line-height: 1.05;
}

.introduction-text p {
    max-width: 34rem;
    color: #656a7e;
    font-size: clamp(1rem, 1.5vw, 1.15rem);
}

.introduction-image {
    width: 50%;
    height: 22rem;
    
}

.thumbnail {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0.8rem;
    box-shadow: 0 22px 50px rgba(22, 28, 70, 0.15);
    opacity: 1;
    transition: opacity 0.8s ease-in-out;
}

.thumbnail.is-changing {
    opacity: 0;
}

.simulations {
    padding: 5rem clamp(1.5rem, 7vw, 7rem) 2rem;
}

.simulations > h3 {
    margin-bottom: 2rem;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    letter-spacing: -0.04em;
}

.simulation-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 1.5rem;
}

.simulation-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    border: 1px solid #dfe1e8;
    height: 20rem;
    align-items: center;
    border-radius: 0.65rem;
    margin-left: 0;
    overflow: hidden;
    background-color: white;
    transition: box-shadow 0.3s ease-in-out, transform 0.3s ease-in-out, border-color 0.3s ease;
    padding: 0;
    box-sizing: border-box;
}

.simulation-card:hover{
    border-color: #c8ccda;
    box-shadow: 0 14px 30px rgba(20, 25, 55, 0.12);
    transform: translateY(-4px);
}

.simulation-card-image {
    align-items: center;
    display: flex;
    flex: 1 1 0;
    justify-content: center;
    min-height: 0;
    width: 100%;
    overflow: hidden;
    background-color: #f1f2f6;
}

.simulation-card-image img {
    display: block;
    width: 100% !important;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.simulation-card:hover .simulation-card-image img {
    transform: scale(1.025);
}

.simulation-card-text {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    gap: 0.3rem;
    font-size: 0.9rem;
    justify-content: center;
    min-height: 0;
    padding: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.simulation-card-text > h4 {
    font-size: 1rem;
    line-height: 1.25;
}

.simulation-card-text > p {
    color: #6b7083;
    font-size: 0.78rem;
    line-height: 1.45;
}

.line{
    flex: 0 0 0.1rem;
    width: 100%;
    height: 0.1rem;
    background-color: #e2e4ea;
}

.simulation-card-link {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    color: rgb(72, 116, 230);
    margin-top: auto;
    width: fit-content;
    cursor: pointer;
}

.arrow-icon {
    font-size: 1.2rem;
    font-weight: bold;
    
}

.footer {
    margin-top: 5rem;
    padding: 3.5rem 5rem 1.5rem;
    background-color: #111633;
    color: white;
}

.footer-main {
    display: flex;
    justify-content: space-between;
    gap: 4rem;
    padding-bottom: 3rem;
    width: 100%;
    max-width: 100rem;
    margin-inline: auto;
}

.footer-about {
    max-width: 24rem;
}

.footer-logo {
    display: inline-flex;
    margin-bottom: 1rem;
    font-size: 1.6rem;
    font-weight: bold;
    text-decoration: none;
}

.footer-logo-phys {
    color: white;
}

.footer-logo-math {
    color: rgb(90, 140, 255);
}

.footer-about p {
    color: #aeb3c7;
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-nav {
    display: flex;
    gap: 5rem;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.footer-column h3 {
    margin-bottom: 0.35rem;
    font-size: 0.8rem;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
}

.footer-column a {
    color: #aeb3c7;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

.footer-column a:hover {
    color: rgb(90, 140, 255);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    padding-top: 1.5rem;
    border-top: 1px solid #303652;
    color: #858ba4;
    font-size: 0.75rem;
    width: 100%;
    max-width: 100rem;
    margin-inline: auto;
}

@media (max-width: 700px) {
    .header-links {
        gap: 0.8rem;
    }

    .header-link {
        font-size: 0.75rem;
    }

    .header-text-subtitle {
        display: none;
    }

    .introduction {
        flex-direction: column;
        align-items: stretch;
        min-height: auto;
    }

    .introduction-text,
    .introduction-image {
        width: 100%;
    }

    .introduction-image {
        height: 16rem;
    }

    .simulation-card {
        height: 21rem;
    }

    .footer {
        padding: 3rem 1.5rem 1.5rem;
    }

    .footer-main {
        flex-direction: column;
    }

    .footer-nav {
        gap: 3rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.4rem;
    }
}

@media (max-width: 850px) {
    .header-content {
        flex-wrap: wrap;
        gap: 0.8rem 1.5rem;
    }

    .header-links {
        flex: 1 1 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .header {
        padding-inline: 1rem;
    }

    .header-title {
        margin-inline: auto;
    }

    .header-links {
        flex-wrap: wrap;
        gap: 0.5rem 1.1rem;
    }

    .header-link {
        font-size: 0.72rem;
    }

    .cite-container {
        padding-inline: 1rem;
    }

    .citation-card {
        padding: 1rem;
    }

    .footer-main {
        gap: 2.5rem;
    }

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

.menu-toggle {
    display: none;
}

@media (max-width: 700px) {
    .header-content {
        position: relative;
        flex-wrap: nowrap;
    }

    .header-title {
        margin: 0;
    }

    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 2.75rem;
        height: 2.75rem;
        margin-left: auto;
        padding: 0.65rem;
        border: 1px solid #dfe1e8;
        border-radius: 0.55rem;
        background: white;
        cursor: pointer;
    }

    .menu-toggle span {
        width: 100%;
        height: 2px;
        border-radius: 2px;
        background: #34384c;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .menu-toggle.is-open span:first-child { transform: translateY(7px) rotate(45deg); }
    .menu-toggle.is-open span:nth-child(2) { opacity: 0; }
    .menu-toggle.is-open span:last-child { transform: translateY(-7px) rotate(-45deg); }

    .header-links {
        display: none;
        position: absolute;
        top: calc(100% + 0.75rem);
        right: 0;
        width: min(18rem, calc(100vw - 2rem));
        padding: 0.6rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0.15rem;
        border: 1px solid #dfe1e8;
        border-radius: 0.7rem;
        background: white;
        box-shadow: 0 14px 32px rgba(20, 25, 55, 0.15);
    }

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

    .header-link {
        padding: 0.75rem 0.85rem;
        border-radius: 0.45rem;
        font-size: 0.85rem;
        text-align: left;
    }

    .header-link:hover { background: #f3f6ff; }
}
