:root {
    --bgc: #f5f5f5;
    --text-color: #414042;
    --link-color: #3aafa9;
    --accent: #d4d4d4;
    --snowflake-color: black; 
    --xmas-accent: #ff5151;
    transition: background-color 0.4s ease, color 0.4s ease;
}

.darkmode {
    --bgc: #1e1e1e;
    --text-color: #e0e5e8;
    --link-color: #ADD8E6;
    --accent: #464646;
    --snowflake-color: white;
}

* {
    font-family: "Maven Pro", sans-serif;
    font-style: normal;
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

html, body {
    /* overflow: hidden; */
}

#pfp {
    width: 115px; 
    height: 115px; 
    object-fit: cover;
    border: 5px solid #ff0000;
    border-radius: 50%;
    margin-top: -45px;
    box-shadow: 0 0 10px #006400, 0 0 20px #ff0000;
}

body {
    background-color: var(--bgc);
    background: var(—bgc);
    transition: background-color 0.4s ease, opacity 0.5s ease-in-out; 
}

.links-container a {
    margin-right: 20px; 
    margin-left: -5px;
}

.links-container a:last-child {
    margin-right: 0;
}

#headshotheader {
    font-size: 50px;
    margin-top: -50px;
    color: var(--text-color);
    margin-bottom: 0px;
    font-weight: 900;
    transition: color 0.4s ease;
}

body {
    margin: 0px;
    margin-top: -50px;
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    height: 100vh;
}

body.darkmode {
    background-color: #333;
    color: #E8EAED;
}

body.darkmode h1 {
    color: #E8EAED;
}

body.projects-page {
    display: block !important;
    height: auto !important;
    margin-top: 0 !important;
    grid-template-columns: unset !important;
}

.middle-column {
    grid-column: 2; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: -30px;
}

.middle-column div {
    margin: 10px;
    width: 100%; 
}

h2, ul {
    margin-left: 0;
    color: var(--text-color);
    transition: color 0.4s ease;
}

ul {
    list-style-position: outside;
    padding-left: 40px;
    margin-left: -24px;
    margin-bottom: 0px;
}

li {
    margin-left: 0;
    color: var(--text-color);
    font-weight: 75;
    font-family: "Questrial", sans-serif;
    letter-spacing: .075rem;
    font-size: 17px;
    word-spacing: 0.075rem;
    padding-left: 4px;
    transition: color 0.4s ease;
}

.link {
    color: var(--link-color);
    font-size: 17px;
    text-decoration: none;
    font-family: "Questrial", sans-serif;
    font-weight: 75;
    letter-spacing: .075rem;
    transition: color 0.4s ease;
}

.title {
    font-size: 30px;
    font-weight: 700;
    margin-top: 0px;
}

h2.title {
    margin-top: -5px;
    margin-bottom: -5px;
}

.footer {
    font-size: 17px;
    font-family: "Questrial", sans-serif;
    font-weight: 75;
    letter-spacing: .075rem;
    color: var(--text-color);
    transition: color 0.4s ease;
}

.headshot p {
    color: var(--text-color);
    transition: color 0.4s ease;
}

#theme-switch {
    height: 50px;
    width: 50px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background-color: var(--accent);
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 80px;
    right: 50px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

#theme-switch:hover {
    transform: scale(1.1);
}

#xmas-switch {
    height: 50px;
    width: 50px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background-color: var(--accent);
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 80px;
    right: 110px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

#xmas-switch:hover {
    transform: scale(1.1);
}

#xmas-switch svg {
    fill: var(--text-color);
    transition: fill 0.3s ease;
}

#xmas-switch svg:last-child {
    display: none;
}

.xmas-mode #xmas-switch {
    background-color: var(--xmas-accent);
}

.xmas-mode #xmas-switch svg:first-child {
    display: none;
}

.xmas-mode #xmas-switch svg:last-child {
    display: block;
}

#theme-switch svg {
    fill: var(--text-color);
    transition: fill 0.3s ease;
}

.darkmode #theme-switch svg:first-child {
    display: none;
}

.darkmode #theme-switch svg:last-child {
    display: block;
}

#theme-switch svg:last-child {
    display: none;
}

img {
    pointer-events: none;
}

#words.fade-out {
    opacity: 0;
}

#words.fade-in {
    opacity: 1;
}

#arrow {
    position: fixed;
    top: 10px; 
    right: 28px; 
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: "Questrial", sans-serif;
    color: var(--text-color);
    z-index: 1000; 
    animation: fade-in 1.5s ease-out;
    transition: color 0.4s ease;
}

#xmas-arrow {
    position: fixed;
    top: 10px; 
    right: 73px; 
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: "Questrial", sans-serif;
    color: var(--text-color);
    z-index: 1000;
    animation: fade-in 1.5s ease-out;
    transition: color 0.4s ease;
}

#arrow span, #xmas-arrow span {
    background-color: var(--accent);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
    text-align: center;
    transition: background-color 0.4s ease;
}

.arrow {
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid var(--accent);
    margin-top: -2px;
    transition: border-color 0.4s ease;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

a:link {
    color: var(--link-color); 
    text-decoration: none;
    transition: color 0.3s ease;
}

a:visited {
    color: var(--link-color); 
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0000FF; 
    text-decoration: underline;          
}

a:active {
    color: darken(var(--link-color), 10%); 
    text-decoration: none;
}

body.darkmode a:hover {
    color: #FFD700;
}

#snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none; 
    z-index: 1000;
}

.snowflake {
    position: absolute;
    top: -10px; 
    color: white;
    font-size: 20px;
    opacity: 0.8;
    animation: fall linear infinite;
}

@keyframes fall {
    to {
        transform: translateY(100vh); 
    }
}

.section-divider {
    position: relative;
    top: 60px;
    width: 70%; 
    height: 100px; 
    margin: 10px; 
    margin-left: -18px;
    pointer-events: none; 
    transform: rotate(-20deg);
    z-index: -1;
    visibility: hidden; 
    opacity: 0;
}

.xmas-element {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.xmas-mode .xmas-element {
    visibility: visible;
    opacity: 1;
}

#christmas-tree {
    position: fixed; 
    bottom: 10px; 
    right: 20px; 
    width: 170px; 
    height: auto; 
    z-index: 1000; 
    pointer-events: none; 
}

#weather-time-widget {
    position: fixed;
    top: 20px;
    left: 20px;
    background-color: var(--accent);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-family: "Maven Pro", sans-serif;
    color: var(--text-color);
    min-width: 200px;
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
    cursor: default;
}

#weather-time-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.darkmode #weather-time-widget {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.darkmode #weather-time-widget:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

#weather-time-widget::after {
    content: "Time and Weather in Ottawa";
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--bgc);
    color: var(--text-color);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--accent);
    z-index: 1001;
}

#weather-time-widget::before {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid var(--bgc);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1001;
}

#weather-time-widget:hover::after,
#weather-time-widget:hover::before {
    opacity: 1;
    visibility: visible;
}

#time-display {
    margin-bottom: 12px;
    text-align: center;
}

.time-label {
    font-size: 12px;
    color: var(--text-color);
    opacity: 0.7;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

#current-time {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    font-family: "Questrial", sans-serif;
}

#weather-info {
    border-top: 1px solid #666;
    padding-top: 12px;
}

.darkmode #weather-info {
    border-top-color: #999;
}

.weather-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.weather-icon {
    font-size: 24px;
    filter: grayscale(1);
    opacity: 0.8;
}

.temperature {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color);
}

.weather-details {
    text-align: center;
}

.weather-description {
    font-size: 14px;
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 6px;
    text-transform: capitalize;
}

.weather-extra {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-color);
    opacity: 0.6;
    gap: 12px;
}

.weather-extra span {
    flex: 1;
    text-align: center;
}

.weather-loading, .weather-error {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-color);
    opacity: 0.7;
    text-align: center;
}

.weather-error span:first-child {
    font-size: 18px;
    filter: grayscale(1);
}

@media (max-width: 768px) {
    #weather-time-widget {
        top: 10px;
        left: 10px;
        padding: 12px;
        min-width: 180px;
    }
    
    #current-time {
        font-size: 16px;
    }
    
    .temperature {
        font-size: 18px;
    }
}

@keyframes pageFadeOutUp {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

@keyframes pageFadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-leave {
  animation: pageFadeOutUp 0.5s ease-out forwards;
}

.page-enter {
  animation: pageFadeInDown 0.5s ease-in forwards;
}

.page-content {
  min-height: 100vh;
}

#weather-time-widget {
    position: fixed;
    top: 20px;
    left: 20px;
    background-color: var(--accent);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-family: "Maven Pro", sans-serif;
    color: var(--text-color);
    min-width: 200px;
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
    cursor: default;
}

#weather-time-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.darkmode #weather-time-widget {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.darkmode #weather-time-widget:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

#weather-time-widget::after {
    content: "Time and Weather in Ottawa";
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--bgc);
    color: var(--text-color);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--accent);
    z-index: 1001;
}

#weather-time-widget::before {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid var(--bgc);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1001;
}

#weather-time-widget:hover::after,
#weather-time-widget:hover::before {
    opacity: 1;
    visibility: visible;
}

#time-display {
    margin-bottom: 12px;
    text-align: center;
}

.time-label {
    font-size: 12px;
    color: var(--text-color);
    opacity: 0.7;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

#current-time {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    font-family: "Questrial", sans-serif;
}

#weather-info {
    border-top: 1px solid #666;
    padding-top: 12px;
}

.darkmode #weather-info {
    border-top-color: #999;
}

.weather-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.weather-icon {
    font-size: 24px;
    filter: grayscale(1);
    opacity: 0.8;
}

.temperature {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color);
}

.weather-details {
    text-align: center;
}

.weather-description {
    font-size: 14px;
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 6px;
    text-transform: capitalize;
}

.weather-extra {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-color);
    opacity: 0.6;
    gap: 12px;
}

.weather-extra span {
    flex: 1;
    text-align: center;
}

.weather-loading, .weather-error {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-color);
    opacity: 0.7;
    text-align: center;
}

.weather-error span:first-child {
    font-size: 18px;
    filter: grayscale(1);
}

.contact-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
}

.contact-title {
    font-size: 2.5em;
    color: var(--text-color);
    margin-bottom: 20px;
    font-family: "Maven Pro", sans-serif;
    font-weight: 700;
}

.contact-description {
    font-size: 1.1em;
    color: var(--text-color);
    margin-bottom: 40px;
    font-family: "Questrial", sans-serif;
    opacity: 0.8;
    line-height: 1.6;
}

.contact-form {
    text-align: left;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-label {
    display: block;
    font-family: "Maven Pro", sans-serif;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
    font-size: 1em;
    transition: color 0.3s ease;
}

.form-group.focused .form-label {
    color: var(--link-color);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--accent);
    border-radius: 8px;
    background-color: var(--bgc);
    color: var(--text-color);
    font-family: "Questrial", sans-serif;
    font-size: 1em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--link-color);
    box-shadow: 0 0 0 3px rgba(58, 175, 169, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
}

.form-submit {
    width: 100%;
    margin-left: 10px;
    padding: 14px 20px;
    background-color: var(--link-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: "Maven Pro", sans-serif;
    font-weight: 600;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

}

.form-submit:hover:not(:disabled) {
    background-color: #309a96;
    transform: translateY(-2px);
}

.form-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.submit-loading {
    display: none;
    align-items: center;
    gap: 8px;
}

.loading-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.form-status {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    font-family: "Maven Pro", sans-serif;
    font-weight: 500;
    position: relative;
    left: -25px; 
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.darkmode .success-message {
    background-color: #1e3d32;
    color: #d4edda;
    border-color: #155724;
}

.darkmode .error-message {
    background-color: #3d1a1e;
    color: #f8d7da;
    border-color: #721c24;
}

.home-button {
    background-color: var(--accent);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: fixed;
    top: 80px;
    left: 20px;
    color: var(--text-color);
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-family: "Maven Pro", sans-serif;
    font-weight: 600;
    text-decoration: none;
    gap: 5px;
    font-size: 12px;
    flex-direction: column;
}

.home-button:hover {
    background-color: var(--link-color);
    color: white;
    transform: translateY(-2px);
    text-decoration: none;
}

.home-button svg {
    width: 20px;
    height: 20px;
}

.home-button span {
    font-size: 8px;
    margin-top: -2px;
}

body.xmas-mode .form-input:focus,
body.xmas-mode .form-textarea:focus {
    border-color: var(--xmas-accent);
    box-shadow: 0 0 0 3px rgba(255, 81, 81, 0.1);
}

body.xmas-mode .form-group.focused .form-label {
    color: var(--xmas-accent);
}

body.xmas-mode .form-submit {
    background-color: var(--xmas-accent);
}

body.xmas-mode .form-submit:hover:not(:disabled) {
    background-color: #e84545;
}

@media (max-width: 768px) {
    .contact-container {
        padding: 20px 15px;
    }
    
    .contact-title {
        font-size: 2em;
    }
    
    .home-button {
        top: 10px;
        left: 10px;
        width: 45px;
        height: 45px;
    }
    
    .home-button svg {
        width: 18px;
        height: 18px;
    }
    
    .home-button span {
        font-size: 7px;
    }
}