:root{
    --bg:#0a1020;
    --bg2:#121a30;
    --card:rgba(255,255,255,0.1);
    --text:#e8eefc;
    --accent:#85d4ff;
    --accent2:#7b7dff;
	--button-bg:#3a95c7;
    --border:rgba(255,255,255,0.12);
	--card-clip: polygon(
        0% 0%,
        calc(100% - 14px) 0%,
        100% 14px,
        100% 100%,
        14px 100%,
        0% calc(100% - 14px)
    );
}

html{
    background:var(--bg);
    overflow-x:hidden;
}

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

.bodybg{
    font-family:'Inter',sans-serif;
    background:var(--bg);
    color:var(--text);
    line-height:1.5;
    font-size:16px;
    overflow-x:hidden;
    background:
        linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px),
        linear-gradient(to bottom right, #0a1020, #111b36);
    background-size: 40px 40px, 40px 40px, cover;
}

.basicfont{
    font-family:'Inter',sans-serif;
    color:var(--text);
    line-height:1.5;
    font-size:16px;
}

.gradient-box {
  width: fit-content;
  border: 3px solid transparent; 
  border-radius: 12px; 
  background:
    linear-gradient(to right, #7f7f8f, #bfbfcf) border-box; 
  padding: 3px;
  color: white;
}

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

a:hover{
    text-decoration:underline;
}

.container{
    max-width:1000px;
    margin:auto;
    padding:1.25rem;
}

header{
    display:grid;
    grid-template-columns:auto 1fr;
    gap:2rem 2rem;
    align-items:center;
	padding:0 0 1rem;
}
.landhead{
    padding:1rem 0 2rem;
}

.profile-photo{
    width:180px;
    height:180px;
    object-fit:cover;
    border-radius:50%;
    border:3px solid var(--accent);
    box-shadow:
        0 0 20px rgba(106,217,255,.25);
}

.profile-photo--small {
  width: 115px;
  height: 115px;
}

.hero h1{
    font-size:2.4rem;
    margin-bottom:.3rem;
    color:white;
    text-shadow:
        0 0 8px rgba(106,217,255,.35);
}

.hero h2{
    font-size:1.2rem;
    color:var(--accent);
    font-weight:400;
    margin-bottom:.8rem;
}

.hero p{
    max-width:650px;
}

section{
    margin:0 0 2.8rem;
}

section.no-style {
  margin: 0;
}

h3{
    font-size:1.7rem;
    margin-bottom:1rem;
    color:var(--accent);
}

section.no-style h3{
  margin-bottom:0;
}


.button{
    display:inline-block;
    margin-top:.8rem;
    background:var(--button-bg);
    color:white;
    padding:.7rem 1.1rem;
    border-radius:8px;
    font-weight:600;
}

.card-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:1rem;
}

.card{
    padding:1.25rem;
}

.card img{
    width:100%;
    margin-bottom:.75rem;
}

.research-scroll{
    display:flex;
    gap:1rem;
    overflow-x:auto;
    padding-bottom:1rem;
    scroll-snap-type:x mandatory;
}

.research-scroll::-webkit-scrollbar{
    height:10px;
}

.research-scroll::-webkit-scrollbar-thumb{
    background:#ccc;
    border-radius:10px;
}

.research-card{
	display: flex;
    flex-direction: column;
    min-width:320px;
    max-width:320px;
    flex:0 0 auto;
    padding:1rem;
    scroll-snap-align:start;
    transition:transform .2s;
}

.research-card > *:last-child {
  margin-top: auto;
}

.card-note {
	font-style: italic;
	color:var(--accent);
}

.card,
.research-card,
.other-card{
    background: var(--card);
    backdrop-filter: blur(10px);
}

.card,
.research-card,
.other-card,
.card img,
.research-card img,
.other-card img {
    border-radius: 0;
    clip-path: var(--card-clip);
}

.research-card:hover{
    transform:translateY(-4px);
}

.research-card img{
    width:100%;
    height:180px;
    object-fit:cover;
    margin-bottom:.75rem;
}

.research-card h4{
    margin-bottom:.4rem;
}

.other-card{
    display:flex;
    flex-direction:column;
    min-width:320px;
    max-width:320px;
    flex:0 0 auto;
    padding:1rem;
    scroll-snap-align:start;
    transition:transform .2s, border-color .2s;
    color:var(--text);
    text-decoration:none;
    border:1px solid transparent;
}

.other-card:hover{
    transform:translateY(-4px);
    border-color:var(--border);
    text-decoration:none;
}

.other-card:hover h4{
    color:var(--accent);
}

.other-card img{
    width:100%;
    height:180px;
    object-fit:cover;
    margin-bottom:.75rem;
}

.other-card h4{
    margin-bottom:.4rem;
    color:var(--text);
    transition:color .2s;
}

.other-card p{
    color:var(--text);
}

footer{
    text-align:center;
    color:#8892b0;
    padding:2rem 0;
    margin-top:4rem;
    border-top:1px solid var(--border);
}

@media(max-width:700px){
    header{
        display:flex;
        flex-wrap:wrap;
        align-items:center;
        text-align:left;
        gap:.75rem 1rem;
        padding:1rem 0;
    }

    /* Unwrap .hero on mobile only, so its children (h1, h2, p) become
       direct flex items of header and can be independently reordered.
       Desktop layout/DOM is untouched. */
    .hero{
        display:contents;
    }

    .profile-photo{
        width:72px;
        height:72px;
        margin:0;
        flex-shrink:0;
        order:1;
    }

    .hero h1{
        order:2;
        font-size:1.5rem;
        flex:1 1 auto;
        min-width:0;
    }

    .pronouns, .bio2, .auth-ven{
        display:none;
    }

    .hero h2{
        order:3;
        width:100%;
        text-align:left;
        font-size:1rem;
    }

    .affiliation{
        font-size:0.9rem;
    }

    .hero p{
        order:4;
        width:100%;
        max-width:none;
        text-align:left;
    }

    .social-links{
        order:5;
        width:100%;
        align-items:flex-start;
        text-align:left;
    }
}

h3::after{
    content:"";
    display:block;
    width:80px;
    height:2px;
    margin-top:.4rem;
    background:linear-gradient(to right,var(--accent),transparent);
}

.top-line{
    height:3px;
    background:linear-gradient(
        90deg,
        transparent,
        var(--accent),
        var(--accent2),
        transparent
    );
    background-size:200% 100%;
    animation: scan 6s linear infinite;
}

@keyframes scan{
    from{background-position:0%}
    to{background-position:200%}
}

#publications-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#publications-list img{
    width:300px;
}

.pronouns {
  font-size: 0.5em;
  color: #999;
  margin-left: 0.5em;
}

.social-links {
  grid-column: 2 / 3;
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.95rem;
}

.icon-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  min-width: 0;
}

.icon-links a {
  text-decoration: none;
  overflow-wrap: break-word;
  word-break: break-word;
  min-width: 0;
}

.icon-links a:hover {
  text-decoration: underline;
}

/* Individual social links */
.social {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
}

.header-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.title {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.affiliation {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.inline-icon {
  height: 1.4em;
  width: auto;
  vertical-align: middle;
}