/* Default css file for jemdoc, modified for proportional scaling */

table#tlayout {
    border: none;
    border-collapse: separate;
    background: white;
    width: 100%; /* Full viewport width */
    max-width: 100vw; /* No cap, full stretch */
    margin: 0 auto;
}

html {
    font-size: clamp(16px, 1.1vw, 80px); /* Slightly larger base scaling */
}

p {
    font-size: 1rem; /* Scales with root */
}

body {
    background: white;
    font-family: "Adobe Kis", serif;
    padding-bottom: 0.5vw; /* Scale padding */
    margin: 0;
}

#layout-menu {
    background: #f6f6f6;
    border: 1px solid #dddddd;
    padding-top: 0.5vw;
    padding-left: 0.5vw;
    padding-right: 0.5vw;
    font-size: clamp(16px, 1vw, 80px); /* Scales but stays readable */
    width: 12%; /* Fixed proportional width for menu */
    white-space: nowrap;
    text-align: left;
    vertical-align: top;
}

#layout-menu td {
    background: #f4f4f4;
    vertical-align: top;
}

#layout-content {
    padding-top: 0;
    padding-left: 1vw;
    padding-right: 1vw;
    border: none;
    background: white;
    text-align: left;
    vertical-align: top;
    width: 85vw; /* Remaining space after menu */
}

#layout-menu a {
    line-height: 1.5;
    margin-left: 0.5vw;
}

tt {
    background: #ffffdd;
}

pre, tt {
    font-size: 90%;
    font-family: monaco, monospace;
}

a, a > tt {
    color: #224b8d;
    text-decoration: none;
}

a:hover {
    border-bottom: 1px gray dotted;
}

#layout-menu a.current:link, #layout-menu a.current:visited {
    color: #022b6d;
    border-bottom: 1px gray solid;
}

#layout-menu a:link, #layout-menu a:visited, #layout-menu a:hover {
    color: #527bbd;
    text-decoration: none;
}

#layout-menu a:hover {
    text-decoration: none;
}

div.menu-category {
    border-bottom: 1px solid gray;
    margin-top: 0.8em;
    padding-top: 0.2em;
    padding-bottom: 0.1em;
    font-weight: bold;
}

div.menu-item {
    padding-left: 16px;
    text-indent: -16px;
}

div#toptitle {
    padding-bottom: 0.2vw;
    margin-bottom: 1.5vw;
    border-bottom: 3px double gray;
}

div#toptitle + h2, div#toptitle + h3 {
    margin-top: -0.7em;
}

div#subtitle {
    margin-top: 0.0em;
    margin-bottom: 0.0em;
    padding-top: 0em;
    padding-bottom: 0.1em;
}

em {
    font-style: italic;
}

strong {
    font-weight: bold;
}

h1, h2, h3 {
    color: #527bbd;
    margin-top: 0.7vw;
    margin-bottom: 0.3vw;
    padding-bottom: 0.2vw;
    line-height: 1.0;
    padding-top: 0.5vw;
    border-bottom: 1px solid #aaaaaa;
}

h1 {
    font-size: clamp(0.5rem, 1.8vw, 3rem); /* Scales with viewport */
}

h2 {
    padding-top: 0.8vw;
    font-size: clamp(0.2rem, 1.5vw, 2rem);
}

h2 + h3 {
    padding-top: 0.2em;
}

h3 {
    font-size: clamp(1rem, 1.5vw, 1.8rem);
    border-bottom: none;
}

p {
    margin-top: 0;
    margin-bottom: 0.8vw;
    padding: 0;
    line-height: 1.3;
}

pre {
    padding: 0;
    margin: 0;
}

div#footer {
    font-size: clamp(0.8rem, 1vw, 1rem);
    border-top: 1px solid #c0c0c0;
    padding-top: 0.1vw;
    margin-top: 4vw;
    color: #c0c0c0;
}

div#footer a {
    color: #80a0b0;
}

div#footer-text {
    float: left;
    padding-bottom: 8px;
}

ul, ol, dl {
    margin-top: 0.2em;
    padding-top: 0;
    margin-bottom: 0.8em;
}

dt {
    margin-top: 0.5em;
    margin-bottom: 0;
}

dl {
    margin-left: 20px;
}

dd {
    color: #222222;
}

dd > *:first-child {
    margin-top: 0;
}

ul {
    list-style-position: outside;
    list-style-type: square;
}

p + ul, p + ol {
    margin-top: -0.5em;
}

li ul, li ol {
    margin-top: -0.3em;
}

ol {
    list-style-position: outside;
    list-style-type: decimal;
}

li p, dd p {
    margin-bottom: 0.3em;
}

ol ol {
    list-style-type: lower-alpha;
}

ol ol ol {
    list-style-type: lower-roman;
}

p + div.codeblock {
    margin-top: -0.6em;
}

div.codeblock, div.infoblock {
    margin-right: 0%;
    margin-top: 1.2em;
    margin-bottom: 1.3em;
}

div.blocktitle {
    font-weight: bold;
    color: #cd7b62;
    margin-top: 1.2em;
    margin-bottom: 0.1em;
}

div.blockcontent {
    border: 1px solid silver;
    padding: 0.3em 0.5em;
}

div.infoblock > div.blockcontent {
    background: #ffffee;
}

div.blockcontent p + ul, div.blockcontent p + ol {
    margin-top: 0.4em;
}

div.infoblock p {
    margin-bottom: 0em;
}

div.infoblock li p, div.infoblock dd p {
    margin-bottom: 0.5em;
}

div.infoblock p + p {
    margin-top: 0.8em;
}

div.codeblock > div.blockcontent {
    background: #f6f6f6;
}

span.pycommand {
    color: #000070;
}

span.statement {
    color: #008800;
}

span.builtin {
    color: #000088;
}

span.special {
    color: #990000;
}

span.operator {
    color: #880000;
}

span.error {
    color: #aa0000;
}

span.comment, span.comment > *, span.string, span.string > * {
    color: #606060;
}

@media print {
    #layout-menu { display: none; }
}

#fwtitle {
    margin: 2px;
}

#fwtitle #toptitle {
    padding-left: 0.5em;
    margin-bottom: 0.5em;
}

#layout-content h1:first-child, #layout-content h2:first-child, #layout-content h3:first-child {
    margin-top: -0.7em;
}

div#toptitle h1, #layout-content div#toptitle h1 {
    margin-bottom: 0.0em;
    padding-bottom: 0.1em;
    padding-top: 0;
    margin-top: 0.5em;
    border-bottom: none;
}

img.eq {
    padding: 0;
    padding-left: 0.1em;
    padding-right: 0.1em;
    margin: 0;
}

img.eqwl {
    padding-left: 2em;
    padding-top: 0.6em;
    padding-bottom: 0.2em;
    margin: 0;
}

table {
    /* border: 2px solid black; */
    border-collapse: collapse;
}

td {
    padding: 2px;
    padding-left: 0.5em;
    padding-right: 0.5em;
    text-align: left;
    /* border: 1px solid gray; */
}

table + table {
    margin-top: 1em;
}

tr.heading {
    font-weight: bold;
    border-bottom: 2px solid black;
}

img {
    border: none;
}

table.imgtable {
    width: 100%;
    table-layout: fixed; /* Ensures consistent column proportions */
}

.profile-img {
    width: 10vw; /* Proportional image column */
}

.profile-info {
    width: 40vw; /* Proportional info column */
}

.news-section {
    width: 30vw; /* Proportional news column */
    vertical-align: top;
}

/* News Animation */
@keyframes glitter {
    0% { text-shadow: 0 0 0.5vw rgb(104, 140, 138), 0 0 1vw rgb(124, 129, 112); }
    50% { text-shadow: 0 0 1vw rgb(130, 10, 16), 0 0 1.5vw rgb(230, 221, 221); }
    100% { text-shadow: 0 0 0.5vw rgb(20, 20, 4), 0 0 1vw rgb(127, 109, 109); }
}

@keyframes slideMotion {
    0% { transform: translateX(-1vw); opacity: 0; }
    50% { transform: translateX(0.5vw); opacity: 0.8; }
    100% { transform: translateX(0); opacity: 1; }
}

.news-motion {
    color: red;
    text-align: left;
    margin-bottom: 0.5vw;
    margin-top: 0;
    font-size: clamp(1.2rem, 2vw, 2.5rem);
    font-weight: bold;
    animation: glitter 0.5s infinite alternate, slideMotion 2s ease-in-out infinite alternate;
}

/* Teaching Experience Section (unchanged unless used in this page) */
.teaching-experience {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 90vw;
    margin: auto;
}

.year-row {
    display: grid;
    grid-template-columns: 1fr 2fr 2fr;
    gap: 1vw;
    align-items: center;
    padding: 1vw 0;
    border-bottom: 2px solid #ddd;
}

.year-row h6 {
    grid-column: 1 / 2;
    text-align: center;
    font-size: clamp(1.2rem, 2vw, 2.5rem);
    font-weight: bold;
    color: #2c3e50;
}

.semester {
    margin-top: 0.5vw;
    font-size: clamp(0.8rem, 1vw, 1.2rem);
    line-height: 1.5;
    background: #f1f3f5;
    padding: 0.5vw;
    border-radius: 0.5vw;
    box-shadow: 0 0.1vw 0.3vw rgba(0, 0, 0, 0.1);
    border-left: 0.3vw solid #778492;
}

.semester strong {
    color: #527bbd;
    font-size: clamp(0.9rem, 1.1vw, 1.3rem);
    text-decoration: underline;
    display: inline;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(250px, 20vw, 400px), 1fr));
    column-gap: 2vw;
    row-gap: 1.5vw;
    width: 100%;
    max-width: 80vw;
    padding-left: 1vw;
    margin-top: -0.5vw;
}

.year-box {
    background-color: #a8b6af36;
    padding: 1vw;
    border: 2px solid #ddd;
    border-radius: 0.5vw;
    box-shadow: 0.2vw 0.2vw 0.5vw rgba(0, 0, 0, 0.1);
}

h6 {
    font-size: clamp(1rem, 1.5vw, 1.8rem);
    color: #527bbd;
    text-align: center;
    border-bottom: 2px solid #527bbd;
    padding-bottom: 0.3vw;
    margin-bottom: 0.5vw;
    margin-top: 0.3vw;
}

@media (max-width: 768px) {
    .year-row {
        grid-template-columns: 1fr; /* Stack for small screens */
    }
    .grid-container {
        grid-template-columns: 1fr; /* Single column on small screens */
    }
}

@media (min-width: 1920px) {
    .teaching-experience, .grid-container {
        max-width: 1728px; /* 90% of 1920px, optional cap */
    }
}