@charset "utf-8";

/* === Root Variables === */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

:root {
    color-scheme: light dark;

    --accent: color(display-p3 1 0.36 0.36);
    --accent-2: color(display-p3 1 0.72 0.64);
    --bg: color-mix(in srgb, white 90%, color(display-p3 0.97 0.97 0.98));
    --text: color(display-p3 0.12 0.14 0.15);
    --card-bg: color-mix(in srgb, white 95%, var(--accent) 5%);
    --header-height: 8.5rem;
    --page-gutter: 2rem;
    --card-radius: 0.5rem;
    --card-shadow: 0 8px 18px color-mix(in srgb, rgba(0,0,0,0.6) 80%, var(--accent) 20%);
    --ui-speed: 240ms;
}

html.dark {
    --bg: color-mix(in srgb, black 90%, color(display-p3 0.1 0.1 0.1));
    --text: color(display-p3 0.94 0.94 0.94);
    --card-bg: color-mix(in srgb, rgb(45, 39, 39) 80%, var(--accent-2) 20%);
    --card-shadow: 0 8px 18px color-mix(in srgb, rgba(231,231,231,0.6) 80%, var(--accent-2) 20%);
}

html.fun {
    --bg: color(display-p3 0.85 0.92 0.95);       
    --text: color(display-p3 0.10 0.15 0.10);    
    --card-bg: color(display-p3 0.75 0.85 0.80); 
    --accent-1: color(display-p3 0.30 0.60 0.95); 
    --accent-2: color(display-p3 0.65 0.45 0.25);
    --card-shadow: 0 8px 18px rgba(50, 100, 120, 0.35);
}

html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: 'Press Start 2P', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    overflow-x: hidden;
}

body {
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 100dvh;
}

h2 {
    color: var(--accent);
    text-align: center;
}

h3 {
    color: var(--accent-2);
    text-align: center;
    font-size: 1rem;
}

/* === Header / Navigation === */
header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background-color: var(--bg);
    border-bottom: 4px solid var(--accent);
    padding: 1rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

header nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin: 0.5rem 0;
}

header nav a {
    font-size: 0.7rem;
    padding: 0.45rem 0.6rem;
    border-radius: 0.25rem;
    color: var(--text);
    text-decoration: none;
    transition: transform var(--ui-speed) ease, color var(--ui-speed) ease;
}

header nav a:hover {
    color: var(--accent);
    transform: translateY(-2px) scale(1.02);
}

/* === Main Content === */
main {
    max-width: 100%;
    padding: 0 1rem;
    margin: auto;
}

main p,
main ul {
    font-family: 'Roboto', sans-serif;
}

#home-page { 
  background-image: url("./assets/ucsd.png"); 
  background-size: cover; 
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh; width: 100%; 
  margin: 0; display: flex; 
  flex-direction: column; 
  align-items: center; 
  justify-content: center; 
  color: white;
  text-shadow: 1.5px 1.5px 4.5px rgba(0,0,0,0.7); 
  text-align: center; 
  p {
    font-family: 'Roboto', sans-serif;
    font-size: 1.5rem;
  }
}

section {
    max-width: 700px;
    margin: 2rem auto;
    padding: 1.5rem;
    background-color: var(--card-bg);
    border-radius: var(--card-radius);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

section h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--accent-2);
    padding-bottom: 0.5rem;
}

section ul {
    padding-left: 1.5rem;
}

section ul li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* === Dialog === */ 
dialog button, #theme-toggle { 
  margin-top: 0.5rem; 
  border: none; 
  background-color: var(--text); 
  color: var(--bg); 
  font-family: "Press Start 2P", cursive; 
  font-size: 0.5rem; 
  padding: 0.4rem 0.8rem; 
  cursor: pointer; 
  border-radius: var(--card-radius, 5px); 
} 

dialog button:hover { 
  background-color: var(--accent); 
} 

dialog { 
  text-align: center; 
  border-radius: var(--card-radius, 5px); 
} 

dialog p { 
  font-family: "Press Start 2P", cursive; 
} 

dialog[open] { 
  animation: fadeInDialog 0.4s ease forwards; 
}

/* Fade-in animation for dialog */ 
@keyframes fadeInDialog { 
  from { opacity: 0; transform: scale(0.95); } 
  to { opacity: 1; transform: scale(1); } 
}

/* === Info Cards === */
info-card {
    display: block;
    background-color: var(--card-bg);
    border: 3px solid var(--accent);
    border-radius: var(--card-radius);
    padding: 1rem;    
    box-shadow: 0 4px 8px var(--card-shadow);
    margin: 1rem auto;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 600px;
}

info-card:hover {
    transform: scale(1.03);
    box-shadow: var(--card-shadow);
}

info-card .card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

info-card .card-logo {
    width: 80px;
    height: auto;
    object-fit: contain;
}

info-card h3 {
    margin-top: 0;
    font-family: 'Press Start 2P', monospace;
}

info-card p,
info-card ul {
    font-family: 'Roboto', sans-serif;
    line-height: 1.5;
    font-size: 0.9rem;
}

info-card:has(img) {
  border-color: var(--accent);
  border-style: dotted;
  border-width: 2px;
}

.skill {
    background-color: var(--accent);
    color: var(--bg);
    padding: 0.1em 0.4em;
    border-radius: 0.3em;
}

/* === Skills Section === */
#skills {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 700px;
    margin: 0 auto;
}

#skills label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

#skills progress {
    width: 100%;
    height: 1rem;
    border-radius: 5px;
    appearance: none;
}

#skills progress::-webkit-progress-bar { background-color: var(--bg); }
#skills progress::-webkit-progress-value { background-color: var(--accent); }

/* === Summary Section === */
.summary-container {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    max-width: 800px;
    margin: 2rem auto;
    padding: 1rem;
}

.summary-image img {
    width: 230px;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
}

.summary-text { 
  flex: 1; 
}

#swe-image {
  display: block;
  width: min(80%, 350px);
  height: auto;
  margin: 0 auto;
  object-fit: cover;
}

/* === Contact Form === */
.contact-container, .contact-form {
    max-width: 700px;
    margin: 2rem auto;
    padding: 1.5rem;
    color: var(--text);
    background-color: var(--card-bg);
    border: 2px solid var(--accent);
    border-radius: var(--card-radius);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
    text-align: center;
}

.contact-form fieldset { border: none; padding: 0; }
.contact-form legend { font-size: 1.2rem; font-weight: bold; margin-bottom: 1rem; color: var(--accent); }
.contact-form label { display: block; text-align: left; margin-top: 1rem; font-weight: bold; }
.contact-form input,
.contact-form textarea {
    width: 100%; padding: 0.6rem; margin-top: 0.3rem; border: 1px solid #ccc; border-radius: var(--card-radius);
    font-family: 'Roboto', sans-serif; font-size: 0.95rem; box-sizing: border-box;
}
.contact-form textarea { resize: vertical; }
.contact-form button {
    margin-top: 1.5rem; padding: 0.6rem 1.2rem;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.85rem;
    color: var(--bg);
    background-color: var(--accent);
    border: none;
    border-radius: var(--card-radius);
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}
.contact-form button:hover {
    background-color: var(--accent-2);
    transform: translateY(-2px) scale(1.02);
}

/* === Experience === */
.experience-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.exp-link {
    display: inline-block;
    background-color: var(--card-bg);
    color: var(--accent);
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    padding: 1rem 2rem;
    border-radius: var(--card-radius);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.exp-link:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 6px 15px rgba(0,0,0,0.2); }

/* === Footer === */
footer {
    text-align: center;
    font-size: 0.6rem;
    padding: 1rem;
    border-top: 4px solid var(--accent);
    background-color: var(--bg);
}

/* === Responsive Queries === */
@media screen and (max-width: 768px) {
    .experience-links { flex-direction: column; gap: 1rem; align-items: center; }
    .exp-link { width: 80%; }
    .summary-container { flex-direction: column; align-items: center; text-align: center; }

    header nav ul {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
        margin: 0.5rem 0;
        padding: 0;
    }

    header nav a {
        width: 80%;         
        text-align: center;
    }
}

@media screen and (max-width: 480px) {

  section {
    width: 100%;
    padding: 1rem;
    margin: 1rem auto;
    box-sizing: border-box;
  }

  h1 {
    font-size: 1rem;
  }

  info-card {
    width: 90%;
    max-width: none;
    margin: 0 auto 1rem auto;
  }

  .experience-links {
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 0 1rem;
    box-sizing: border-box;
  }

  .exp-link {
    width: 90%;
  }
}
/* Focus outline for accessibility */
.contact-form input:focus,
.contact-form textarea:focus,
.contact-form button:focus {
  outline: 3px solid #005fcc;
  outline-offset: 2px;
}

/* Base input style */
input,
textarea {
  border: 2px solid #ccc;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  font-size: 1rem;
  transition: 0.2s;
}

