@font-face {
    font-family: "Montserrat";
    src: url("fonts/montserrat/Montserrat-VariableFont_wght.ttf") format("truetype-variations");
    font-weight: 200 900;
    font-style: normal;
}

@font-face {
    font-family: "Montserrat";
    src: url("fonts/montserrat/Montserrat-Italic-VariableFont_wght.ttf") format("truetype-variations");
    font-weight: 300 900;
    font-style: italic;
}

html {
    background-color: #ffffff;
    scroll-behavior: smooth;
}

body {
    margin: 0 auto;
    padding: 20px;
    background-color: #ffffff;
    /* background-color: #f1f5ff; */
    font-family: Montserrat, Helvetica, Arial sans-serif;
    max-width: 1200px;
}

.projects-body {
    background-color: #ffefce;
}

.publications-body {
    background-color: #ffd6dd;
}

.photos-body {
    background-color: #cad5ad;
}

/* .container {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-gap: 55px;
    margin: 0 auto;
} */

.container {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: auto;   /* let each row size itself */
  grid-gap: 15px;  /* reduced from 30px */
}

.header-svg {
    width: 27px;
    height: 27px;
    margin-bottom: 2px;
}

.title {
    grid-column: span 3;
    font-size: 24px;
    min-height: 200px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.title h1 {
    color: #005A92; /* rich blue */
    transform: translateY(50px);
    background-color: #e3f0f8; /* soft blue highlight */
    padding: 0.2em 0.2em;
    border-radius: 3px;
    font-weight: 640;
    display: inline-block;
    align-items: right
}

.menu {
    grid-column: span 3;
    position: relative;
    display: flex;
    font-size: 18px;
    flex-direction: column;
    justify-content: flex-end;
    height: 250px;
    text-align: left;
}


.menu div {
    margin-bottom: 9px;
}

.menu div:last-child {
    margin-bottom: 40px;
}

.nav-link {
    font-size: 1.3em;
    font-weight: 450;
    text-decoration: none;
    color: gray;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link::before {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #005A92;
    transition: width 0.2s ease;
}

.nav-link:hover {
    color: #005A92;
}

.nav-link:hover::before {
    width: 100%;
}

.nav-link-project {
    font-size: 1.3em;
    font-weight: 450;
    text-decoration: none;
    color: #ff8800;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link-project::before {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #cf6f00;
    transition: width 0.2s ease;
}

.nav-link-project:hover {
    color: #cf6f00;
}

.nav-link-project:hover::before {
    width: 100%;
}

.nav-link-publications {
    font-size: 1.3em;
    font-weight: 450;
    text-decoration: none;
    color: #ff7484;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link-publications::before {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #c95461;
    transition: width 0.2s ease;
}

.nav-link-publications:hover {
    color: #c95461;
}

.nav-link-publications:hover::before {
    width: 100%;
}

.nav-link-photo {
    font-size: 1.3em;
    font-weight: 450;
    text-decoration: none;
    color: #606c38;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link-photo::before {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #283618;
    transition: width 0.2s ease;
}

.nav-link-photo:hover {
    color: #283618;
}

.nav-link-photo:hover::before {
    width: 100%;
}

.projects {
    grid-column: 5 / span 2;
    grid-row: 2 / span 2;
    height: auto;
    /* position: relative;
    display: flex;
    flex-direction: column;
    height: 680px; */
}

.subtitle-link {
    font-size: 1.5em;
    font-weight: 500;
    text-decoration: none;
    color: #000000;
    transition: color 0.2s ease;
    position: relative;
}

.subtitle-link::before {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #005A92;
    transition: width 0.2s ease;
}

.subtitle-link:hover {
    color: #005A92;
}

.subtitle-link:hover::before {
    width: 100%;
}

.poetry-breadcrumb-header {
    font-size: 1em;
    font-weight: 600;
    margin-bottom: 0.5em;
}

.poetry-breadcrumb-content {
    font-size: 1em;
    line-height: 1.5;
    font-weight: 400;
    margin-bottom: 0.5em;
}

.arrow-link-poetry-breadcrumb {
    font-size: 0.9em;
    text-decoration: none;
    margin-right: 7px;
    margin-bottom: 2.5em;
    color: #005A92;
    display: inline-flex;
    align-items: center;
    position: relative;
}

.arrow-link-poetry-breadcrumb::after {
    content: "";
    margin-left: 2px;
    display: inline-block;
    width: 12px;
    height: 12px;
    background: url('assets/arrow_link_icon_blue.svg') no-repeat center center;
    background-size: contain;
}

.arrow-link-poetry-breadcrumb::before {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #005A92;
    transition: width 0.3s ease;
}

.arrow-link-poetry-breadcrumb:hover::before {
    width: 100%;
}

.about {
  grid-column: 1 / span 4;
  grid-row: 2 / span 2;  /* span 2 rows instead of 1 */
}

/* Current Interests Styles */
.current-interests {
    grid-column: 5 / span 2;
    grid-row: 2;
    align-self: start;
}

.interests-container {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.interest-item {
    margin-bottom: 0.5rem;  /* reduced from 1rem */
    padding: 0.75rem;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.interest-item:hover {
    background-color: #f8f9fa;
}

.interest-item:last-child {
    margin-bottom: 0;
}

.interest-content {
    flex: 1;
}

.interest-title {
    font-weight: 600;
    color: #212529;
    font-size: 0.95em;
    margin-bottom: 0.25rem;
}

.interest-description {
    color: #6c757d;
    font-size: 0.85em;
    line-height: 1.4;
}

.about-text {
    font-size: 1.3em;
    line-height: 1.3;
    font-weight: 500;
    margin-bottom: 1em;
}

.about-text-subtitle {
    font-size: 1em;
    line-height: 1.5;
    font-weight: 400;
}

.inline-link {
    position: relative;
    color: #000000;
    text-decoration: none;
    transition: color 0.1s ease;
}

.inline-link::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #005A92;
    transition: height 0.1s ease;
}

/* NEW CSS START */

/* .inline-link {
  text-decoration: none;
  color: #000;
  transition: color 0.2s ease, border-bottom-width 0.1s ease;

  border-bottom: 2px solid #005A92;
  height: 2px;

  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.inline-link:hover {
  color: #005A92;
  border-bottom-width: 3px;
  transition: height 0.2s ease;
}  */


/* currently the issue is that the href underline only spans one line */

.inline-link:hover {
    color: #005A92;
}

.inline-link:hover::after {
    height: 3px; 
}



.inline-link-pure-url {
    text-decoration: underline;
    text-decoration-color: #002896;
    color: #002896;
    transition: text-decoration-thickness 0.1s ease;
    text-decoration-thickness: 1px;
}

.inline-link-pure-url:hover {
    text-decoration-thickness: 3px;
}

.publications {
    grid-column: 1 / span 6;
    grid-row: 3;
    height: auto;
    /* position: relative;
    display: flex;
    flex-direction: column;
    height: 610px;  */
}

.publication-breadcrumb-header {
    font-size: 1em;
    font-weight: 600;
    margin-bottom: 0.5em;
}

.publication-breadcrumb-content {
    font-size: 1em;
    line-height: 1.1;
    font-weight: 400;
    margin-bottom: 0.5em;
}

.arrow-link-publication-breadcrumb {
    font-size: 1em;
    text-decoration: none;
    margin-right: 7px;
    color: #000000;
    display: inline-flex;
    align-items: center;
    position: relative;
}

.arrow-link-publication-breadcrumb::after {
    content: "";
    margin-left: 2px;
    display: inline-block;
    width: 12px;
    height: 12px;
    background: url('assets/arrow_link_icon.svg') no-repeat center center;
    background-size: contain;
}

.arrow-link-publication-breadcrumb::before {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #005A92;
    transition: width 0.3s ease;
}

.arrow-link-publication-breadcrumb:hover {
    color: #005A92;
}

.arrow-link-publication-breadcrumb:hover::before {
    width: 100%;
}

.arrow-link-publication-breadcrumb:hover::after {
    background: url('assets/arrow_link_icon_blue.svg') no-repeat center center;
    background-size: contain;
}

.arrow-link-publication-page {
    font-size: 1em;
    text-decoration: none;
    margin-right: 7px;
    color: #000000;
    display: inline-flex;
    align-items: center;
    position: relative;
}

.arrow-link-publication-page::after {
    content: "";
    margin-left: 2px;
    display: inline-block;
    width: 12px;
    height: 12px;
    background: url('assets/arrow_link_icon.svg') no-repeat center center;
    background-size: contain;
}

.arrow-link-publication-page::before {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #FF7484;
    transition: width 0.3s ease;
}

.arrow-link-publication-page:hover {
    color: #FF7484;
}

.arrow-link-publication-page:hover::before {
    width: 100%;
}

.arrow-link-publication-page:hover::after {
    background: url('assets/arrow_link_icon_red.svg') no-repeat center center;
    background-size: contain;
}

.equal-contrib-note {
    font-size: 0.8em;
    color: #005A92;
    font-weight: 500;
}

.equal-contrib-note-pub-page-theme {
    font-size: 0.8em;
    color: #000000;
    font-weight: 500;
}

.footer {
    grid-column: 1 / -1;
    position: relative;
    display: flex;
    flex-direction: column;
}

.footer-contact-info {
    font-size: 1em;
    margin-bottom: 1em;
}

.copyright-info {
    font-size: 0.8em;
    color: gray;
}

.copyright-info-project {
    font-size: 0.8em;
    color: #FF8800;
}

.copyright-info-publications {
    font-size: 0.8em;
    color: #ff7484;
}

.copyright-info-photo {
    font-size: 0.8em;
    color: #606c38;
}

.project-page-item {
    grid-column: 1 / -1;
    position: relative;
    display: flex;
    flex-direction: column;
    height: auto;
}

.project-page-item > div > div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 100%;
}

/* .project-page-table-of-contents {
    grid-column: 5 / span 2;
    grid-row: 2;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 3750px;
} */

.project-subtitle {
    font-size: 1.5em;
    font-weight: 500;
    color: #000000;
}

.publications-subtitle {
    font-size: 1.5em;
    font-weight: 500;
    color: #000000;
}

.photo-subtitle {
    font-size: 1.5em;
    font-weight: 500;
    color: #000000;
}

.subtitle-link-project {
    text-decoration: none;
    color: #000000;
    transition: color 0.2s ease;
    position: relative;
}

.subtitle-link-project::before {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #FF8800;
    transition: width 0.2s ease;
}

.subtitle-link-project:hover {
    color: #FF8800;
}

.subtitle-link-project:hover::before {
    width: 100%;
}

.ol-project {
    counter-reset: section;
    list-style: none;
    padding-left: 0;
}

.ol-project li {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.ol-project li::before {
    counter-increment: section;
    content: counter(section) ". ";
    color: #FF8800;
    font-weight: 600;
}

.inline-link-project {
    position: relative;
    color: #000000;
    text-decoration: none;
    transition: color 0.1s ease;
}

.inline-link-project::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #FF8800;
    transition: height 0.1s ease;
}

.inline-link-project:hover {
    color: #FF8800;
}

.inline-link-project:hover::after {
    height: 3px; 
}

.project-item-content {
    font-size: 1em;
    line-height: 1.5;
}

.centered-image {
    width: 120%;
    max-width: 500px;
    margin: 0 auto;
    display: block;
    border-radius: 20px;
}

.photo-page-item {
    grid-column: 1 / -1;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 650px;
}

.publications-page-item {
    grid-column: 1 / span 3;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 300px;
}

.preprint-page-item {
    grid-column: 4 / span 3;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 300px;
}


.photo-gallery {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px; /* Gap between rows */
}

.photo-row {
    display: flex;
    width: 100%;
    gap: 20px; /* Gap between photos in a row */
    margin-bottom: 20px;
}

.photo-item {
    height: 250px; /* Fixed height for all photos in a row */
    flex-grow: 0;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 8px; /* Optional: rounded corners */
}

.photo-item img {
    height: 100%;
    width: auto;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease; /* Optional: for hover effect */
}

/* Optional: Hover effect */
.photo-item:hover img {
    transform: scale(1.05);
}
/* Social Links Styles */
.social-links {
    margin-top: 1.5rem;  /* add space after the about text */
}

.social-links-container {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    text-decoration: none;
    color: #495057;
    font-weight: 500;
    font-size: 0.95em;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.social-link:hover {
    background-color: #e9ecef;
    border-color: #005A92;
    color: #005A92;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.social-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.social-icon-text {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9em;
    color: #005A92;
}

/* Post Link Styles */
.post-link {
    text-decoration: none;
    color: #212529;
    transition: color 0.2s ease;
    position: relative;
}

.post-link::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #005A92;
    transition: width 0.2s ease;
}

.post-link:hover {
    color: #005A92;
}

.post-link:hover::after {
    width: 100%;
}

.read-more-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: #005A92;
    font-weight: 500;
    font-size: 0.9em;
    transition: all 0.2s ease;
    padding: 0.5rem 0;
}

.read-more-link:hover {
    color: #003d6b;
    transform: translateX(2px);
}

/* Project Row and Card Styles for Equal Heights */
.project-row {
    display: flex;
    gap: 3rem;
    margin-bottom: 3rem;
    align-items: stretch; /* This ensures all cards stretch to the same height */
}

.project-card-wrapper {
    flex: 1;
    min-width: 300px;
    display: flex; /* Make wrapper a flex container */
}

.project-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    width: 100%; /* Take full width of wrapper */
}

.project-card-content {
    flex: 1; /* This makes the content area expand to fill available space */
    display: flex;
    flex-direction: column;
}

.project-card-footer {
    margin-top: auto; /* This pushes the footer to the bottom */
    border-top: 1px solid #e9ecef;
    padding-top: 1.5em;
    margin-top: 1.5em;
}

/* Equal height styles for existing project layout */
.project-page-item > div[style*="display: flex"] {
    align-items: stretch !important; /* Ensure all flex items stretch to same height */
}

.project-page-item > div[style*="display: flex"] > div[style*="flex: 1"] {
    display: flex !important; /* Make each project wrapper a flex container */
}

.project-page-item > div[style*="display: flex"] > div[style*="flex: 1"] > div[style*="background: white"] {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important; /* Take full height of parent */
}

.project-page-item > div[style*="display: flex"] > div[style*="flex: 1"] > div[style*="background: white"] > div[style*="border-top"] {
    margin-top: auto !important; /* Push footer to bottom */
}

/* RESPONSIVE DESIGN - MOBILE FIRST APPROACH */

/* Large screens (1200px and up) */
@media (min-width: 1200px) {
    body {
        padding: 30px;
    }
    
    .container {
        grid-gap: 20px;
    }
    
    .title h1 {
        font-size: 28px;
    }
    
    .menu {
        font-size: 20px;
    }
}

/* Medium screens (768px to 1199px) */
@media (max-width: 1199px) and (min-width: 768px) {
    body {
        padding: 20px;
        max-width: 100%;
    }
    
    .container {
        grid-gap: 15px;
    }
    
    .title h1 {
        font-size: 22px;
        transform: translateY(30px);
    }
    
    .menu {
        font-size: 16px;
        height: 200px;
    }
    
    .about-text {
        font-size: 1.2em;
    }
    
    .about-text-subtitle {
        font-size: 0.95em;
    }
}

/* Small screens (tablets - 481px to 767px) */
@media (max-width: 767px) and (min-width: 481px) {
    body {
        padding: 15px;
        max-width: 100%;
    }
    
    .container {
        grid-template-columns: 1fr;
        grid-gap: 20px;
    }
    
    .title {
        grid-column: 1;
        font-size: 20px;
        min-height: 150px;
        justify-content: center;
        text-align: center;
    }
    
    .title h1 {
        font-size: 20px;
        transform: translateY(0);
        text-align: center;
    }
    
    .menu {
        grid-column: 1;
        height: auto;
        flex-direction: row;
        justify-content: center;
        gap: 20px;
        flex-wrap: wrap;
        text-align: center;
    }
    
    .menu div {
        margin-bottom: 0;
    }
    
    .menu div:last-child {
        margin-bottom: 0;
    }
    
    .about {
        grid-column: 1;
        grid-row: 3;
    }
    
    .current-interests {
        grid-column: 1;
        grid-row: 4;
    }
    
    .about-text {
        font-size: 1.1em;
        text-align: center;
    }
    
    .about-text-subtitle {
        font-size: 0.9em;
        text-align: center;
    }
    
    .social-links-container {
        justify-content: center;
    }
    
    /* Project page responsive */
    .project-page-item > div[style*="display: flex"] {
        flex-direction: column !important;
        gap: 2rem !important;
    }
    
    .project-page-item > div[style*="display: flex"] > div[style*="flex: 1"] {
        min-width: auto !important;
    }
    
    /* Writing page responsive */
    .writing-page-item {
        grid-column: 1;
    }
    
    /* Footer responsive */
    .footer {
        text-align: center;
    }
}

/* Mobile screens (320px to 480px) */
@media (max-width: 480px) {
    body {
        padding: 10px;
        max-width: 100%;
    }
    
    .container {
        grid-template-columns: 1fr;
        grid-gap: 15px;
    }
    
    .title {
        grid-column: 1;
        font-size: 18px;
        min-height: 120px;
        justify-content: center;
        text-align: center;
    }
    
    .title h1 {
        font-size: 18px;
        transform: translateY(0);
        text-align: center;
        padding: 0.15em 0.15em;
    }
    
    .menu {
        grid-column: 1;
        height: auto;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        gap: 10px;
    }
    
    .menu div {
        margin-bottom: 0;
    }
    
    .menu div:last-child {
        margin-bottom: 0;
    }
    
    .nav-link {
        font-size: 1.1em;
    }
    
    .about {
        grid-column: 1;
        grid-row: 3;
    }
    
    .current-interests {
        grid-column: 1;
        grid-row: 4;
    }
    
    .about-text {
        font-size: 1em;
        text-align: center;
        line-height: 1.4;
    }
    
    .about-text-subtitle {
        font-size: 0.85em;
        text-align: center;
        line-height: 1.4;
    }
    
    .social-links-container {
        justify-content: center;
        gap: 0.75rem;
    }
    
    .social-link {
        padding: 0.5rem 1rem;
        font-size: 0.85em;
    }
    
    .social-icon {
        width: 16px;
        height: 16px;
    }
    
    .social-icon-text {
        width: 16px;
        height: 16px;
        font-size: 0.8em;
    }
    
    /* Project page responsive */
    .project-page-item > div[style*="display: flex"] {
        flex-direction: column !important;
        gap: 1.5rem !important;
    }
    
    .project-page-item > div[style*="display: flex"] > div[style*="flex: 1"] {
        min-width: auto !important;
    }
    
    .project-subtitle {
        font-size: 1.3em;
    }
    
    .project-item-content {
        font-size: 0.9em;
    }
    
    .centered-image {
        width: 100%;
        max-width: 100%;
        border-radius: 12px;
    }
    
    /* Writing page responsive */
    .writing-page-item {
        grid-column: 1;
    }
    
    /* Card responsive */
    .project-page-item > div[style*="background: white"] {
        padding: 1.5rem !important;
    }
    
    /* Footer responsive */
    .footer {
        text-align: center;
    }
    
    .footer-contact-info {
        font-size: 0.9em;
        text-align: center;
    }
    
    .copyright-info {
        font-size: 0.75em;
        text-align: center;
    }
}

/* Extra small screens (under 320px) */
@media (max-width: 319px) {
    body {
        padding: 8px;
    }
    
    .title h1 {
        font-size: 16px;
    }
    
    .nav-link {
        font-size: 1em;
    }
    
    .about-text {
        font-size: 0.95em;
    }
    
    .about-text-subtitle {
        font-size: 0.8em;
    }
    
    .social-links-container {
        flex-direction: column;
        align-items: center;
    }
    
    .social-link {
        width: 100%;
        justify-content: center;
    }
}

/* Landscape orientation adjustments for mobile */
@media (max-width: 767px) and (orientation: landscape) {
    .title {
        min-height: 100px;
    }
    
    .menu {
        flex-direction: row;
        gap: 15px;
    }
    
    .about-text {
        font-size: 0.95em;
    }
    
    .about-text-subtitle {
        font-size: 0.8em;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .social-icon {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .container {
        grid-template-columns: 1fr;
        grid-gap: 10px;
    }
    
    .title, .menu, .about, .current-interests {
        grid-column: 1;
    }
    
    .social-links {
        display: none;
    }
    
    .footer {
        margin-top: 20px;
        border-top: 1px solid #ccc;
        padding-top: 10px;
    }
}

/* Additional responsive styles for writing and projects pages */

/* Writing page responsive adjustments */
@media (max-width: 767px) {
    /* Writing page card adjustments */
    .writing-page-item > div[style*="background: white"] {
        padding: 1.5rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .writing-page-item > div[style*="background: white"] h3 {
        font-size: 1.1em !important;
    }
    
    .writing-page-item > div[style*="background: white"] p {
        font-size: 0.9em !important;
        line-height: 1.5 !important;
    }
    
    /* Post link adjustments */
    .post-link {
        font-size: 1em !important;
    }
    
    /* Read more link adjustments */
    .read-more-link {
        font-size: 0.85em !important;
    }
    
    /* Category and date adjustments */
    .writing-page-item > div[style*="background: white"] > div[style*="display: flex"] {
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
    }
    
    .writing-page-item > div[style*="background: white"] > div[style*="display: flex"] > div[style*="color: #6c757d"] {
        font-size: 0.8em !important;
    }
}

/* Projects page responsive adjustments */
@media (max-width: 767px) {
    /* Project cards adjustments */
    .project-page-item > div[style*="background: white"] {
        padding: 1.5rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    /* Project subtitle adjustments */
    .project-subtitle {
        font-size: 1.2em !important;
        margin-bottom: 1rem !important;
    }
    
    /* Project content adjustments */
    .project-item-content {
        font-size: 0.9em !important;
        line-height: 1.5 !important;
    }
    
    /* Project links adjustments */
    .project-page-item .inline-link {
        font-size: 0.85em !important;
    }
    
    /* Project footer adjustments */
    .project-page-item > div[style*="border-top"] > div[style*="display: flex"] {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
    
    .project-page-item > div[style*="border-top"] > div[style*="display: flex"] > a {
        width: 100% !important;
        justify-content: center !important;
        text-align: center !important;
    }
}

/* Extra small screens additional adjustments */
@media (max-width: 480px) {
    /* Writing page extra small adjustments */
    .writing-page-item > div[style*="background: white"] {
        padding: 1rem !important;
        margin-bottom: 1rem !important;
    }
    
    .writing-page-item > div[style*="background: white"] h3 {
        font-size: 1em !important;
    }
    
    .writing-page-item > div[style*="background: white"] p {
        font-size: 0.85em !important;
    }
    
    /* Projects page extra small adjustments */
    .project-page-item > div[style*="background: white"] {
        padding: 1rem !important;
        margin-bottom: 1rem !important;
    }
    
    .project-subtitle {
        font-size: 1.1em !important;
    }
    
    .project-item-content {
        font-size: 0.85em !important;
    }
    
    /* Note box adjustments */
    .project-page-item > div[style*="background-color: #f8f9fa"] {
        padding: 1rem !important;
        font-size: 0.9em !important;
    }
    
    /* Writing page note box adjustments */
    .writing-page-item > div[style*="background-color: #f8f9fa"] {
        padding: 1rem !important;
        font-size: 0.9em !important;
    }
}

/* Touch-friendly improvements for mobile */
@media (max-width: 767px) {
    /* Increase touch targets */
    .nav-link {
        padding: 0.5rem 0;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .social-link {
        min-height: 44px;
        padding: 0.75rem 1.25rem;
    }
    
    .post-link {
        padding: 0.25rem 0;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .read-more-link {
        min-height: 44px;
        padding: 0.5rem 0;
    }
    
    /* Improve button spacing */
    .project-page-item > div[style*="border-top"] > div[style*="display: flex"] > a {
        min-height: 44px;
        padding: 0.75rem 1rem !important;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode support (if needed in future) */
@media (prefers-color-scheme: dark) {
    /* This can be expanded later if dark mode is desired */
}

/* Focus improvements for keyboard navigation */
@media (any-hover: none) {
    /* Touch device optimizations */
    .nav-link:hover::before,
    .post-link:hover::after,
    .inline-link:hover::after {
        display: none;
    }
    
    .nav-link:focus::before,
    .post-link:focus::after,
    .inline-link:focus::after {
        width: 100%;
    }
}

