/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Josefin Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    border: #f0f0f0 solid 1px;
    margin: 30px;
    border-radius: 10px;
    overflow-x: hidden;
}

/* Spotlight Effect */
.spotlight {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: radial-gradient(
        circle 200px at var(--mouse-x, 0) var(--mouse-y, 0),
        transparent 0%,
        rgba(0, 0, 0, 0.7) 100%
    );
    z-index: 999;
}

/* Header */
header {
    padding: 3rem 2rem 2rem;
    text-align: center;
}

.logo-container {
    margin-bottom: 2rem;
}

.logo {
    max-width: 300px;
    height: auto;
}

/* Navigation */
nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

nav a {
    font-family: "Quicksand", sans-serif;
    text-decoration: none;
    color: #333;
    text-transform: uppercase;
    font-weight:100;
    letter-spacing: 2px;
    font-size: 1.35rem;
    transition: letter-spacing 1s ease;
    
}

nav a:hover {
    color: #666;
    letter-spacing: 5px;
}

/* Lights Toggle Button */
.lights-toggle-container {
    position: fixed;
    top: 30px;
    right: 30px;
}

.lights-toggle {
    position: fixed;
    top: 60px;
    right: 60px;
    background: none;
    border: 1px solid #ffffff;
    border-radius: 3%;
    color: #ffffff;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-family: "Quicksand", sans-serif;
    font-size: 0.95rem;
    text-transform: uppercase;
    font-weight: 100;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    z-index: 1000;
}

.lights-toggle:hover {
    background-color: #333;
    color: #fff;
    transform: scale(105%);
}

/* Hide spotlight when lights are on */
body.lights-on .spotlight {
    display: none;
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0rem 2rem;
}

.section {
    margin-bottom: 4rem;
    scroll-margin-top: 100px;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 200;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-align: center;
}

h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
    font-weight: 500;
    letter-spacing: 3px;
    text-align: center;
    text-transform: uppercase;
}


/* Projects Title */
h2:nth-of-type(1) {
    padding-bottom: 5%;
}

h3 {
    font-size: 1.1rem;
    margin: 1rem 0 0.5rem;
    font-weight: 600;
    text-align: center
}

p {
    font-size: 1rem;
    color: #555;
    margin-bottom: 1rem;
    text-align: center;
}

.about-text-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

p.about-text {
    font-size: 1.45rem;
    width:50em;
    text-align:justify;
    text-align-last:left;
}

.main-subtitle {
    font-size: 1.65rem;
    margin-bottom: 2rem;
    font-weight: 400;
    text-align: center;
}

a {
    color: #0052cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.project-card {
    border: 1px solid #eee;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.project-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    background-color: #f0f0f0;
}

.project-card h3,
.project-card p {
    padding: 0 1.5rem;
}

.project-card h3 {
    padding-top: 1.5rem;
}

.project-card p {
    padding-bottom: 1.5rem;
    font-size: 0.9rem;
}

/* Project SVG Card Swap */
.projects-grid {
  display: flex;
  gap: 6rem;
  flex-wrap: wrap;
  justify-content: center;
}

.svg-card {
  width: 250px;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border-radius: 12px;
  transition: box-shadow 0.2s;
  cursor: pointer;
}

.svg-wrapper {
  position: relative;
  width: 250px;
  height: 250px;
  border-radius: 12px;
}

.svg-default,
.svg-hover {
  position: absolute;
  top: 0;
  left: 0;
  width: 250px;
  height: 250px;
  transition: opacity 1s;
  border-radius: 12px;
}

.svg-default {
  opacity: 1;
  z-index: 1;
}

.svg-hover {
  opacity: 0;
  z-index: 2;
}

.svg-card:hover .svg-hover {
  opacity: 1;
}

.svg-card:hover .svg-default {
  opacity: 0;
}

/* About */

.about-title {
    padding: 0;
    margin-bottom: 0rem;
}

.about-media-wrapper {
    width:250px;
    height:250px;
    margin:0 auto;
    padding-top: 0%;
    margin-bottom:4.5rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid #eee;
    font-size: 0.9rem;
    color: #777;
}

/* Responsiveness */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    nav ul {
        gap: 1rem;
    }

    nav a {
        font-size: 0.9rem;
    }

    main {
        padding: 2rem 1rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }

    header {
        border-bottom-color: #333;
    }

    nav a {
        color: #e0e0e0;
    }

    nav a:hover {
        color: #fff;
    }

    p {
        color: #aaa;
    }

    footer {
        border-top-color: #333;
        color: #888;
    }

    .project-card {
        border-color: #333;
    }

    .project-card:hover {
        box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
    }
}
