/* ============================
   Base styles
============================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: #f5f5f5;
    background-color: #050505;
    line-height: 1.6;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

main {
    display: block;
}

/* ============================
   Home (landing) hero
============================ */

.background {
    position: fixed;
    inset: 0;
    background: url("images/Index.jpg") center/cover no-repeat;
    filter: blur(15px) brightness(0.5);
    z-index: -1;
}

.name-container {
    min-height: 100vh;
    padding: 6rem 2rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.name {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin: 0 0 0.75rem;
}

.nav-links-container {
    margin-top: 1rem;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.75rem;
}

.nav-links a {
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    position: relative;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.35rem;
    width: 0;
    height: 2px;
    background: #ffffff;
    transition: width 0.22s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* ============================
   Shared layout container
   (About / Work / CV / Contact)
============================ */

.container {
    max-width: min(1600px, 96vw);
    margin: 0 auto;
    padding: 4rem 2rem 3rem; /* top padding gives room under fixed navbar */
    background: #181818;
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}

.container main {
    margin-top: 2rem;
}

.container h1 {
    font-size: clamp(2rem, 3vw, 2.6rem);
    margin: 0 0 1.5rem;
}

/* ============================
   About page
============================ */

.about-content {
    margin-top: 2rem;
}

.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: center;
}

.about-text h2 {
    font-size: clamp(2rem, 2vw, 2.5rem);
    margin-bottom: 1.5rem;
}

.about-text-content p {
    margin-bottom: 1rem;
    color: #e0e0e0;
    max-width: 44rem;
    font-size: clamp(1rem, 0.85vw + 0.3rem, 1.2rem);
    line-height: 1.75;
}

.about-image img {
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.6);
    width: 100%;
}

@media (min-width: 1200px) {
    .about-image img {
        min-height: 460px;
    }
}

/* ============================
   Work page
============================ */

.work-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2.25rem;
    margin-top: 2rem;
}

@media (min-width: 1100px) {
    .work-gallery {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.thesis-study .work-gallery {
    grid-template-columns: 1fr;
}

.work-item {
    background: #222;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.work-item img {
    height: 300px;
    width: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-set {
    display: none;
}

.work-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65);
}

.work-item:hover img {
    transform: scale(1.05);
}

.work-info {
    padding: 1.35rem 1.5rem 1.6rem;
    background: #222;
}

.work-info h3 {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
}

.work-info p {
    margin: 0;
    font-size: 1.05rem;
    color: #c9c9c9;
}

/* ============================
   Contact page
============================ */

.contact-content {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 2.5rem;
}

.contact-info,
.contact-form {
    background: #222;
    border-radius: 12px;
    padding: 1.75rem 2rem;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55);
}

.contact-info h2 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.contact-details p {
    margin: 0 0 0.4rem;
    color: #d0d0d0;
}

.contact-details strong {
    color: #ffffff;
}

.social-icons {
    margin-top: 1.2rem;
    display: flex;
    gap: 0.85rem;
}

.social-icons a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.social-icons a:hover {
    background: #f5f5f5;
    color: #111;
    transform: translateY(-1px);
}

.contact-form h2 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.8rem 0.9rem;
    border-radius: 6px;
    border: 1px solid #444;
    background: #111;
    color: #f5f5f5;
    font-family: inherit;
    font-size: 0.95rem;
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-form button {
    margin-top: 0.5rem;
    align-self: flex-start;
    background: #f5f5f5;
    color: #111;
    border: none;
    padding: 0.8rem 1.7rem;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}

.contact-form button:hover {
    background: #dddddd;
    transform: translateY(-1px);
}

/* ============================
   CV page
============================ */

.cv-header {
    text-align: center;
    margin-bottom: 3rem;
}

.cv-header h1 {
    margin: 0 0 0.5rem;
    font-size: 2.5rem;
}

.cv-header p {
    margin: 0 0 1rem;
    color: #cccccc;
}

.cv-content {
    display: grid;
    grid-template-columns: 1fr 2fr;  /* left column narrow, right column wide like your screenshot */
    gap: 3rem;
}

.cv-section {
    margin-bottom: 2rem;
}

.cv-section h2 {
    font-size: 1.5rem;
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.cv-item {
    margin-bottom: 1.5rem;
}

.cv-item h3 {
    margin: 0 0 0.3rem;
    font-size: 1rem;
}

.cv-item .date {
    font-size: 0.9rem;
    color: #aaaaaa;
    margin-bottom: 0.5rem;
}

.cv-item p {
    margin: 0;
    color: #d6d6d6;
    font-size: 0.95rem;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    background: #333;
    color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: background 0.2s ease, transform 0.15s ease;
}

.download-btn i {
    font-size: 0.95rem;
}

.download-btn:hover {
    background: #444;
    transform: translateY(-1px);
}




/* ============================
   Responsive tweaks
============================ */

@media (max-width: 900px) {
    .container {
        padding: 5rem 1.5rem 2.5rem;
    }

    .about-grid,
    .contact-content,
    .cv-content {
        grid-template-columns: 1fr;
    }

    .about-image {
        order: -1;
    }
}

@media (max-width: 640px) {
    .name {
        font-size: clamp(2.4rem, 8vw, 3rem);
    }

    .nav-links {
        gap: 1.1rem;
    }

    .container {
        padding: 4.5rem 1.25rem 2.25rem;
        border-radius: 0;
        box-shadow: none;
    }
}






/* ============================
   Project pages
============================ */

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

.work-link:focus-visible{
    outline: 2px solid #f5f5f5;
    outline-offset: 6px;
    border-radius: 12px;
}

.project{
    padding-top: 5.5rem;
}

.back-link{
    display:inline-block;
    margin: 0.25rem 0 1.25rem;
    color:#cfcfcf;
    text-decoration:none;
    letter-spacing: 0.04em;
}

.back-link:hover{
    color:#ffffff;
}

.project-hero{
    display:grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 2rem;
    align-items: center;
    background: #1f1f1f;
    border-radius: 14px;
    padding: 1.75rem;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6);
}

.project-hero h1{
    margin: 0 0 0.5rem;
    font-size: 2.1rem;
}

.project-lede{
    margin: 0;
    color: #c9c9c9;
    line-height: 1.6;
}

.project-hero-media img{
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 12px;
}

/* ============================
   Photography gallery
============================ */

.photo-gallery {
    background: #ffffff;
    color: #121212;
}

.photo-gallery .back-link {
    color: #111111;
}

.photo-gallery .back-link:hover {
    color: #000000;
}

.photo-gallery-main {
    width: min(1800px, 96vw);
    margin: 0 auto;
}

.photo-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    margin: 0 0 1.5rem;
}

.photo-header h1 {
    margin: 0;
    font-size: clamp(2.4rem, 3.2vw, 3.2rem);
    letter-spacing: 0.02em;
}

.photo-header .photo-refresh {
    justify-self: center;
}

.photo-refresh {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.7rem;
    border: 1px solid #111111;
    border-radius: 999px;
    background: transparent;
    color: #111111;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    cursor: pointer;
}

.photo-refresh-icon {
    font-size: 1rem;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.2rem;
    grid-auto-flow: dense;
    padding-bottom: 4rem;
}

.photo-tile {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: transparent;
    padding: 0;
    aspect-ratio: 1 / 1;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.td-hold {
    background: #ffffff;
    color: #000000;
}

.td-hold-main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 1.5rem 3rem;
    position: relative;
}

.td-hold .back-link {
    color: #000000;
    position: absolute;
    top: 5.5rem;
    left: 2rem;
}

.td-hold .back-link:hover {
    color: #000000;
}

.td-hold-message h1 {
    margin: 0 0 0.75rem;
    font-size: clamp(3rem, 7vw, 6rem);
    letter-spacing: 0.02em;
}

.td-hold-message p {
    margin: 0;
    font-size: clamp(1.1rem, 2.2vw, 1.5rem);
    color: #1c1c1c;
}

.photo-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 10px;
}

.photo-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18);
    outline: 4px solid #111111;
    outline-offset: 3px;
}

.photo-tile--lg {
    grid-column: span 2;
}

.photo-tile--xl {
    grid-column: span 2;
}

@media (max-width: 900px) {
    .photo-tile--xl {
        grid-column: span 2;
    }
}

@media (max-width: 640px) {
    .photo-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 0.9rem;
    }

    .photo-tile--lg,
    .photo-tile--xl {
        grid-column: span 1;
    }
}

.project-section{
    margin-top: 2rem;
    background: #222;
    border-radius: 12px;
    padding: 1.75rem 2rem;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55);
}

.project-section h2{
    margin-top: 0;
    font-size: 1.35rem;
}

.pdf-stage{
    margin-top: 2rem;
}

.pdf-strip{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.pdf-page{
    position: relative;
    aspect-ratio: 4 / 5;
}

.pdf-frame{
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    background: transparent;
    display: block;
    pointer-events: none;
    object-fit: contain;
}

.pdf-hotspot{
    position: absolute;
    left: var(--hotspot-left, 32.46%);
    transform: translateX(-50%);
    bottom: var(--hotspot-bottom, 10.05%);
    color: #ffffff;
    font-size: 0.617rem;
    letter-spacing: 0.04em;
}

.pdf-hotspot-list{
    display: flex;
    flex-direction: column;
    gap: 0.0225rem;
    text-align: center;
    font-family: 'CoFo Gothic VF', 'CoFo Gothic', 'Montserrat', sans-serif;
    font-weight: 300;
    transform: translateX(0);
}

.pdf-hotspot-link{
    color: inherit;
    text-decoration: none;
}

.pdf-hotspot-link:hover{
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.9), 0 0 16px rgba(255, 255, 255, 0.6);
}

.pdf-hotspot-red{
    color: #b61f24;
    font-size: 0.617rem;
}

.pdf-hotspot-red .pdf-hotspot-link:hover{
    text-shadow: 0 0 8px rgba(182, 31, 36, 0.9), 0 0 16px rgba(182, 31, 36, 0.6);
}

body.thesis-term-1 main{
    max-width: none;
    margin: 0;
    padding: 4rem 2rem 0;
}







body.thesis-term-1 .pdf-stage{
    width: 100%;
    margin-left: 0;
    padding: 0 2rem 3rem;
}

.project-points{
    display:grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-top: 1.25rem;
}


/* Page-specific backgrounds */
.label-bg {
    position: relative;
    background: #050505;
}

.label-bg .container main {
    margin-top: 0;
}

.label-bg .project {
    padding-top: 2.5rem;
}

.label-bg .carousel-item {
    width: 384px;
    height: 540px;
}

.label-bg .project-hero-media img {
    height: 403px;
}

.coding-bg {
    position: relative;
    background: #0b0b0b;
}

.coding-bg::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url("images/Python background thing.jpeg") center/cover no-repeat;
    filter: blur(14px) brightness(0.6);
    transform: scale(1.2);
    z-index: -1;
    pointer-events: none;
}

.about-bg {
    position: relative;
    background: #0b0b0b;
}

.about-bg::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url("images/About background.jpg") center/cover no-repeat;
    filter: blur(14px) brightness(0.3);
    transform: scale(1.2);
    z-index: -1;
    pointer-events: none;
}

.cv-bg {
    position: relative;
    background: #0b0b0b;
}

.cv-bg::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url("images/CV background.jpg") center/cover no-repeat;
    filter: blur(14px) brightness(0.3);
    transform: scale(1.2);
    z-index: -1;
    pointer-events: none;
}

.contact-bg {
    position: relative;
    background: #0b0b0b;
}

.contact-bg::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url("images/Contact Background.jpg") center/cover no-repeat;
    filter: blur(14px) brightness(0.3);
    transform: scale(1.2);
    z-index: -1;
    pointer-events: none;
}

.work-bg {
    position: relative;
    background: #0b0b0b;
}

.work-bg::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url("images/Workbackground.jpg") center/cover no-repeat;
    filter: blur(14px) brightness(1);
    transform: scale(1.2);
    z-index: -1;
    pointer-events: none;
}

.label-bg::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url("images/label_ocad.jpg") center/cover no-repeat;
    filter: blur(14px) brightness(0.55);
    transform: scale(1.25);
    z-index: -1;
    pointer-events: none;
}

.project-point{
    background:#1b1b1b;
    border-radius: 12px;
    padding: 1.25rem 1.25rem;
    border: 1px solid rgba(255,255,255,0.06);
}

.project-point h3{
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

.project-point p{
    margin: 0;
    color: #c9c9c9;
    line-height: 1.6;
}

.term-gallery{
    margin-top: 1.25rem;
}

@media (max-width: 900px){
    .project-hero{
        grid-template-columns: 1fr;
    }
    .project-hero-media img{
        height: 240px;
    }
    .pdf-strip{
        grid-template-columns: 1fr;
    }
}

/* carousel*/

/* Carousel */
.carousel-wrapper {
  position: relative;
  overflow: hidden;
  padding: 60px 0;
}

.carousel {
  display: flex;
  gap: 24px;
  padding: 0 clamp(1.25rem, 4vw, 3rem) 1rem;
  scroll-snap-type: x mandatory;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-color: rgba(255, 255, 255, 0.35) rgba(255, 255, 255, 0.08);
  scrollbar-width: thin;
}

.carousel::-webkit-scrollbar {
  height: 8px;
}

.carousel::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.carousel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.35);
  border-radius: 999px;
}

.carousel::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

.carousel-item {
  flex: 0 0 auto;
  width: 320px;
  height: 450px;
  scroll-snap-align: center;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
}

.carousel img,
.carousel video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.carousel video {
  background: #000;
}

.carousel img:hover,
.carousel video:hover {
  transform: scale(1.05);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
  z-index: 100;
  padding: 40px;
}

.modal-body {
  max-width: 82vw;
  max-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-media {
  max-width: min(82vw, 1100px);
  max-height: 82vh;
  border-radius: 14px;
  background: #000;
  object-fit: contain;
}

.modal-body video.modal-media {
  width: 100%;
  height: auto;
}

.close {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 40px;
  color: white;
  cursor: pointer;
}

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: none;
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.modal-prev {
  left: 24px;
}

.modal-next {
  right: 24px;
}

.modal-nav:hover {
  background: rgba(0, 0, 0, 0.8);
}
